summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-02 19:23:46 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-02 19:23:46 +0000
commiteba47f8f0637f451e21348187591e1f1fd58ac74 (patch)
tree448f10b95c656604acc331a3236c1e59bde5c1ad
parentc7e8736c69373f48b0401319757c742e8607431a (diff)
downloadtdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.tar.gz
tdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.zip
TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1158446 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--kamera/kcontrol/kamera.cpp92
-rw-r--r--kamera/kcontrol/kamera.h36
-rw-r--r--kamera/kcontrol/kameraconfigdialog.cpp100
-rw-r--r--kamera/kcontrol/kameraconfigdialog.h12
-rw-r--r--kamera/kcontrol/kameradevice.cpp122
-rw-r--r--kamera/kcontrol/kameradevice.h72
-rw-r--r--kamera/kioslave/kamera.cpp56
-rw-r--r--kamera/kioslave/kamera.h20
-rw-r--r--kcoloredit/color.cpp6
-rw-r--r--kcoloredit/color.h8
-rw-r--r--kcoloredit/colorselector.cpp70
-rw-r--r--kcoloredit/colorselector.h16
-rw-r--r--kcoloredit/gradientselection.cpp52
-rw-r--r--kcoloredit/gradientselection.h18
-rw-r--r--kcoloredit/imageselection.cpp2
-rw-r--r--kcoloredit/imageselection.h6
-rw-r--r--kcoloredit/kcolorchooser.cpp4
-rw-r--r--kcoloredit/kcoloredit.cpp64
-rw-r--r--kcoloredit/kcoloredit.h6
-rw-r--r--kcoloredit/kcoloreditdoc.cpp42
-rw-r--r--kcoloredit/kcoloreditdoc.h32
-rw-r--r--kcoloredit/kcoloreditview.cpp110
-rw-r--r--kcoloredit/kcoloreditview.h36
-rw-r--r--kcoloredit/kxycolorselector.cpp36
-rw-r--r--kcoloredit/kxycolorselector.h18
-rw-r--r--kcoloredit/kzcolorselector.cpp30
-rw-r--r--kcoloredit/kzcolorselector.h20
-rw-r--r--kcoloredit/loadpalettedlg.cpp42
-rw-r--r--kcoloredit/loadpalettedlg.h14
-rw-r--r--kcoloredit/main.h10
-rw-r--r--kcoloredit/palette.cpp62
-rw-r--r--kcoloredit/palette.h28
-rw-r--r--kcoloredit/paletteview.cpp24
-rw-r--r--kcoloredit/paletteview.h12
-rw-r--r--kcoloredit/paletteviewscrolledarea.cpp74
-rw-r--r--kcoloredit/paletteviewscrolledarea.h34
-rw-r--r--kcoloredit/texteditselection.cpp80
-rw-r--r--kcoloredit/texteditselection.h18
-rw-r--r--kcoloredit/textselection.cpp2
-rw-r--r--kdvi/TeXFont.h6
-rw-r--r--kdvi/TeXFontDefinition.cpp24
-rw-r--r--kdvi/TeXFontDefinition.h30
-rw-r--r--kdvi/TeXFont_PFB.cpp28
-rw-r--r--kdvi/TeXFont_PFB.h2
-rw-r--r--kdvi/TeXFont_PK.cpp28
-rw-r--r--kdvi/TeXFont_PK.h2
-rw-r--r--kdvi/TeXFont_TFM.cpp10
-rw-r--r--kdvi/TeXFont_TFM.h2
-rw-r--r--kdvi/bigEndianByteReader.h2
-rw-r--r--kdvi/dviFile.cpp34
-rw-r--r--kdvi/dviFile.h36
-rw-r--r--kdvi/dviRenderer.cpp158
-rw-r--r--kdvi/dviRenderer.h102
-rw-r--r--kdvi/dviRenderer_draw.cpp20
-rw-r--r--kdvi/dviRenderer_export.cpp84
-rw-r--r--kdvi/dviRenderer_prescan.cpp124
-rw-r--r--kdvi/dviWidget.cpp10
-rw-r--r--kdvi/dviWidget.h14
-rw-r--r--kdvi/dvisourcesplitter.cpp14
-rw-r--r--kdvi/dvisourcesplitter.h12
-rw-r--r--kdvi/fontEncoding.cpp24
-rw-r--r--kdvi/fontEncoding.h8
-rw-r--r--kdvi/fontEncodingPool.cpp2
-rw-r--r--kdvi/fontEncodingPool.h8
-rw-r--r--kdvi/fontMap.cpp48
-rw-r--r--kdvi/fontMap.h26
-rw-r--r--kdvi/fontpool.cpp100
-rw-r--r--kdvi/fontpool.h32
-rw-r--r--kdvi/fontprogress.cpp46
-rw-r--r--kdvi/fontprogress.h16
-rw-r--r--kdvi/glyph.h8
-rw-r--r--kdvi/infodialog.cpp84
-rw-r--r--kdvi/infodialog.h22
-rw-r--r--kdvi/kdvi_multipage.cpp58
-rw-r--r--kdvi/kdvi_multipage.h8
-rw-r--r--kdvi/kdvi_multipage_texthandling.cpp4
-rw-r--r--kdvi/kprinterwrapper.h2
-rw-r--r--kdvi/main.cpp24
-rw-r--r--kdvi/optionDialogFontsWidget.cpp14
-rw-r--r--kdvi/optionDialogFontsWidget.h2
-rw-r--r--kdvi/optionDialogSpecialWidget.cpp20
-rw-r--r--kdvi/optionDialogSpecialWidget.h12
-rw-r--r--kdvi/performanceMeasurement.h4
-rw-r--r--kdvi/prebookmark.h10
-rw-r--r--kdvi/psgs.cpp70
-rw-r--r--kdvi/psgs.h46
-rw-r--r--kdvi/renderedDviPagePixmap.h4
-rw-r--r--kdvi/special.cpp262
-rw-r--r--kdvi/util.cpp2
-rw-r--r--kdvi/vf.cpp2
-rw-r--r--kfax/faxinput.cpp22
-rw-r--r--kfax/kfax.cpp154
-rw-r--r--kfax/kfax.h42
-rw-r--r--kfax/kfax_printsettings.cpp32
-rw-r--r--kfax/kfax_printsettings.h8
-rw-r--r--kfax/options.cpp104
-rw-r--r--kfax/options.h66
-rw-r--r--kfax/viewfax.cpp16
-rw-r--r--kfaxview/faxmultipage.cpp8
-rw-r--r--kfaxview/faxmultipage.h8
-rw-r--r--kfaxview/faxrenderer.cpp20
-rw-r--r--kfaxview/faxrenderer.h4
-rw-r--r--kfaxview/libkfaximage/faxexpand.h10
-rw-r--r--kfaxview/libkfaximage/kfaximage.cpp58
-rw-r--r--kfaxview/libkfaximage/kfaximage.h44
-rw-r--r--kfaxview/main.cpp24
-rw-r--r--kfile-plugins/bmp/kfile_bmp.cpp32
-rw-r--r--kfile-plugins/bmp/kfile_bmp.h4
-rw-r--r--kfile-plugins/dds/kfile_dds.cpp46
-rw-r--r--kfile-plugins/dds/kfile_dds.h4
-rw-r--r--kfile-plugins/dvi/kfile_dvi.cpp32
-rw-r--r--kfile-plugins/dvi/kfile_dvi.h4
-rw-r--r--kfile-plugins/exr/kfile_exr.cpp160
-rw-r--r--kfile-plugins/exr/kfile_exr.h4
-rw-r--r--kfile-plugins/gif/kfile_gif.cpp32
-rw-r--r--kfile-plugins/gif/kfile_gif.h4
-rw-r--r--kfile-plugins/ico/kfile_ico.cpp36
-rw-r--r--kfile-plugins/ico/kfile_ico.h4
-rw-r--r--kfile-plugins/jpeg/exif.cpp26
-rw-r--r--kfile-plugins/jpeg/exif.h34
-rw-r--r--kfile-plugins/jpeg/kfile_jpeg.cpp126
-rw-r--r--kfile-plugins/jpeg/kfile_jpeg.h12
-rw-r--r--kfile-plugins/pcx/kfile_pcx.cpp30
-rw-r--r--kfile-plugins/pcx/kfile_pcx.h2
-rw-r--r--kfile-plugins/pdf/kfile_pdf.cpp30
-rw-r--r--kfile-plugins/pdf/kfile_pdf.h4
-rw-r--r--kfile-plugins/png/kfile_png.cpp42
-rw-r--r--kfile-plugins/png/kfile_png.h4
-rw-r--r--kfile-plugins/pnm/kfile_pnm.cpp28
-rw-r--r--kfile-plugins/pnm/kfile_pnm.h6
-rw-r--r--kfile-plugins/ps/gscreator.cpp38
-rw-r--r--kfile-plugins/ps/gscreator.h6
-rw-r--r--kfile-plugins/ps/kfile_ps.cpp18
-rw-r--r--kfile-plugins/ps/kfile_ps.h6
-rw-r--r--kfile-plugins/raw/kcamerarawplugin.cpp30
-rw-r--r--kfile-plugins/raw/kcamerarawplugin.h6
-rw-r--r--kfile-plugins/rgb/kfile_rgb.cpp50
-rw-r--r--kfile-plugins/rgb/kfile_rgb.h10
-rw-r--r--kfile-plugins/tga/kfile_tga.cpp32
-rw-r--r--kfile-plugins/tga/kfile_tga.h4
-rw-r--r--kfile-plugins/tiff/kfile_tiff.cpp138
-rw-r--r--kfile-plugins/tiff/kfile_tiff.h10
-rw-r--r--kfile-plugins/xbm/kfile_xbm.cpp22
-rw-r--r--kfile-plugins/xbm/kfile_xbm.h4
-rw-r--r--kfile-plugins/xpm/kfile_xpm.cpp10
-rw-r--r--kfile-plugins/xpm/kfile_xpm.h4
-rw-r--r--kgamma/kcmkgamma/displaynumber.cpp20
-rw-r--r--kgamma/kcmkgamma/displaynumber.h8
-rw-r--r--kgamma/kcmkgamma/gammactrl.cpp28
-rw-r--r--kgamma/kcmkgamma/gammactrl.h24
-rw-r--r--kgamma/kcmkgamma/kgamma.cpp162
-rw-r--r--kgamma/kcmkgamma/kgamma.h18
-rw-r--r--kghostview/displayoptions.cpp14
-rw-r--r--kghostview/displayoptions.h20
-rw-r--r--kghostview/dscparse_adapter.cpp28
-rw-r--r--kghostview/dscparse_adapter.h22
-rw-r--r--kghostview/fullscreenfilter.cpp8
-rw-r--r--kghostview/fullscreenfilter.h6
-rw-r--r--kghostview/gssettingswidget.ui.h2
-rw-r--r--kghostview/infodialog.cpp48
-rw-r--r--kghostview/infodialog.h14
-rw-r--r--kghostview/kdscerrordialog.cpp30
-rw-r--r--kghostview/kdscerrordialog.h22
-rw-r--r--kghostview/kgv.h4
-rw-r--r--kghostview/kgv_miniwidget.cpp92
-rw-r--r--kghostview/kgv_miniwidget.h18
-rw-r--r--kghostview/kgv_view.cpp272
-rw-r--r--kghostview/kgv_view.h44
-rw-r--r--kghostview/kgvconfigdialog.cpp38
-rw-r--r--kghostview/kgvdocument.cpp132
-rw-r--r--kghostview/kgvdocument.h46
-rw-r--r--kghostview/kgvfactory.cpp10
-rw-r--r--kghostview/kgvfactory.h6
-rw-r--r--kghostview/kgvmainwidget.cpp10
-rw-r--r--kghostview/kgvmainwidget.h10
-rw-r--r--kghostview/kgvpagedecorator.cpp48
-rw-r--r--kghostview/kgvpagedecorator.h22
-rw-r--r--kghostview/kgvpageview.cpp42
-rw-r--r--kghostview/kgvpageview.h34
-rw-r--r--kghostview/kgvshell.cpp48
-rw-r--r--kghostview/kgvshell.h6
-rw-r--r--kghostview/kpswidget.cpp50
-rw-r--r--kghostview/kpswidget.h30
-rw-r--r--kghostview/logwindow.cpp28
-rw-r--r--kghostview/logwindow.h16
-rw-r--r--kghostview/main.cpp4
-rw-r--r--kghostview/marklist.cpp52
-rw-r--r--kghostview/marklist.h28
-rw-r--r--kghostview/scrollbox.cpp34
-rw-r--r--kghostview/scrollbox.h32
-rw-r--r--kghostview/thumbnailservice.cpp22
-rw-r--r--kghostview/thumbnailservice.h28
-rw-r--r--kghostview/viewcontrol.cpp60
-rw-r--r--kghostview/viewcontrol.h16
-rw-r--r--kiconedit/kcolorgrid.cpp38
-rw-r--r--kiconedit/kcolorgrid.h24
-rw-r--r--kiconedit/kicon.cpp62
-rw-r--r--kiconedit/kicon.h30
-rw-r--r--kiconedit/kiconcolors.cpp22
-rw-r--r--kiconedit/kiconcolors.h16
-rw-r--r--kiconedit/kiconconfig.cpp176
-rw-r--r--kiconedit/kiconconfig.h42
-rw-r--r--kiconedit/kiconedit.cpp192
-rw-r--r--kiconedit/kiconedit.h40
-rw-r--r--kiconedit/kiconeditslots.cpp50
-rw-r--r--kiconedit/kicongrid.cpp246
-rw-r--r--kiconedit/kicongrid.h112
-rw-r--r--kiconedit/knew.cpp66
-rw-r--r--kiconedit/knew.h64
-rw-r--r--kiconedit/kresize.cpp28
-rw-r--r--kiconedit/kresize.h8
-rw-r--r--kiconedit/palettetoolbar.cpp70
-rw-r--r--kiconedit/palettetoolbar.h18
-rw-r--r--kiconedit/properties.cpp16
-rw-r--r--kiconedit/properties.h38
-rw-r--r--kiconedit/utils.cpp18
-rw-r--r--kiconedit/utils.h16
-rw-r--r--kmrml/kmrml/algorithmcombo.cpp8
-rw-r--r--kmrml/kmrml/algorithmcombo.h4
-rw-r--r--kmrml/kmrml/algorithmdialog.cpp56
-rw-r--r--kmrml/kmrml/algorithmdialog.h4
-rw-r--r--kmrml/kmrml/browser.cpp10
-rw-r--r--kmrml/kmrml/browser.h4
-rw-r--r--kmrml/kmrml/collectioncombo.cpp14
-rw-r--r--kmrml/kmrml/collectioncombo.h8
-rw-r--r--kmrml/kmrml/kcontrol/indexcleaner.cpp16
-rw-r--r--kmrml/kmrml/kcontrol/indexcleaner.h10
-rw-r--r--kmrml/kmrml/kcontrol/indexer.cpp46
-rw-r--r--kmrml/kmrml/kcontrol/indexer.h12
-rw-r--r--kmrml/kmrml/kcontrol/indextest.cpp8
-rw-r--r--kmrml/kmrml/kcontrol/indextest.h2
-rw-r--r--kmrml/kmrml/kcontrol/kcmkmrml.cpp36
-rw-r--r--kmrml/kmrml/kcontrol/kcmkmrml.h4
-rw-r--r--kmrml/kmrml/kcontrol/mainpage.cpp138
-rw-r--r--kmrml/kmrml/kcontrol/mainpage.h20
-rw-r--r--kmrml/kmrml/lib/kmrml_config.cpp62
-rw-r--r--kmrml/kmrml/lib/kmrml_config.h46
-rw-r--r--kmrml/kmrml/lib/mrml_shared.cpp220
-rw-r--r--kmrml/kmrml/lib/mrml_shared.h220
-rw-r--r--kmrml/kmrml/lib/mrml_utils.h2
-rw-r--r--kmrml/kmrml/lib/watcher_stub.cpp38
-rw-r--r--kmrml/kmrml/lib/watcher_stub.h22
-rw-r--r--kmrml/kmrml/loader.cpp18
-rw-r--r--kmrml/kmrml/loader.h18
-rw-r--r--kmrml/kmrml/mrml.cpp34
-rw-r--r--kmrml/kmrml/mrml.h28
-rw-r--r--kmrml/kmrml/mrml_creator.cpp36
-rw-r--r--kmrml/kmrml/mrml_creator.h20
-rw-r--r--kmrml/kmrml/mrml_elements.cpp98
-rw-r--r--kmrml/kmrml/mrml_elements.h148
-rw-r--r--kmrml/kmrml/mrml_part.cpp204
-rw-r--r--kmrml/kmrml/mrml_part.h60
-rw-r--r--kmrml/kmrml/mrml_view.cpp120
-rw-r--r--kmrml/kmrml/mrml_view.h68
-rw-r--r--kmrml/kmrml/mrmlsearch.cpp10
-rw-r--r--kmrml/kmrml/propertysheet.cpp26
-rw-r--r--kmrml/kmrml/propertysheet.h34
-rw-r--r--kmrml/kmrml/propertywidgets.cpp26
-rw-r--r--kmrml/kmrml/propertywidgets.h18
-rw-r--r--kmrml/kmrml/server/watcher.cpp50
-rw-r--r--kmrml/kmrml/server/watcher.h46
-rw-r--r--kolourpaint/cursors/kpcursorlightcross.cpp10
-rw-r--r--kolourpaint/cursors/kpcursorlightcross.h4
-rw-r--r--kolourpaint/cursors/kpcursorprovider.cpp6
-rw-r--r--kolourpaint/cursors/kpcursorprovider.h4
-rw-r--r--kolourpaint/kolourpaint.cpp6
-rw-r--r--kolourpaint/kpcolor.cpp14
-rw-r--r--kolourpaint/kpcolor.h22
-rw-r--r--kolourpaint/kpcommandhistory.cpp52
-rw-r--r--kolourpaint/kpcommandhistory.h28
-rw-r--r--kolourpaint/kpdefs.h108
-rw-r--r--kolourpaint/kpdocument.cpp184
-rw-r--r--kolourpaint/kpdocument.h76
-rw-r--r--kolourpaint/kpdocumentmetainfo.cpp42
-rw-r--r--kolourpaint/kpdocumentmetainfo.h30
-rw-r--r--kolourpaint/kpdocumentsaveoptions.cpp88
-rw-r--r--kolourpaint/kpdocumentsaveoptions.h28
-rw-r--r--kolourpaint/kpdocumentsaveoptionswidget.cpp168
-rw-r--r--kolourpaint/kpdocumentsaveoptionswidget.h64
-rw-r--r--kolourpaint/kpmainwindow.cpp164
-rw-r--r--kolourpaint/kpmainwindow.h102
-rw-r--r--kolourpaint/kpmainwindow_edit.cpp156
-rw-r--r--kolourpaint/kpmainwindow_file.cpp142
-rw-r--r--kolourpaint/kpmainwindow_help.cpp20
-rw-r--r--kolourpaint/kpmainwindow_image.cpp38
-rw-r--r--kolourpaint/kpmainwindow_settings.cpp18
-rw-r--r--kolourpaint/kpmainwindow_statusbar.cpp50
-rw-r--r--kolourpaint/kpmainwindow_text.cpp14
-rw-r--r--kolourpaint/kpmainwindow_tools.cpp120
-rw-r--r--kolourpaint/kpmainwindow_view.cpp110
-rw-r--r--kolourpaint/kpselection.cpp272
-rw-r--r--kolourpaint/kpselection.h106
-rw-r--r--kolourpaint/kpselectiondrag.cpp76
-rw-r--r--kolourpaint/kpselectiondrag.h16
-rw-r--r--kolourpaint/kpsinglekeytriggersaction.cpp4
-rw-r--r--kolourpaint/kpsinglekeytriggersaction.h4
-rw-r--r--kolourpaint/kptemppixmap.cpp12
-rw-r--r--kolourpaint/kptemppixmap.h18
-rw-r--r--kolourpaint/kptextstyle.cpp24
-rw-r--r--kolourpaint/kptextstyle.h24
-rw-r--r--kolourpaint/kpthumbnail.cpp42
-rw-r--r--kolourpaint/kpthumbnail.h6
-rw-r--r--kolourpaint/kptool.cpp192
-rw-r--r--kolourpaint/kptool.h148
-rw-r--r--kolourpaint/kpview.cpp342
-rw-r--r--kolourpaint/kpview.h106
-rw-r--r--kolourpaint/kpviewmanager.cpp74
-rw-r--r--kolourpaint/kpviewmanager.h38
-rw-r--r--kolourpaint/kpviewscrollablecontainer.cpp282
-rw-r--r--kolourpaint/kpviewscrollablecontainer.h112
-rw-r--r--kolourpaint/kpwidgetmapper.cpp22
-rw-r--r--kolourpaint/kpwidgetmapper.h14
-rw-r--r--kolourpaint/pixmapfx/kpcoloreffect.cpp32
-rw-r--r--kolourpaint/pixmapfx/kpcoloreffect.h22
-rw-r--r--kolourpaint/pixmapfx/kpeffectbalance.cpp90
-rw-r--r--kolourpaint/pixmapfx/kpeffectbalance.h14
-rw-r--r--kolourpaint/pixmapfx/kpeffectblursharpen.cpp48
-rw-r--r--kolourpaint/pixmapfx/kpeffectblursharpen.h14
-rw-r--r--kolourpaint/pixmapfx/kpeffectemboss.cpp44
-rw-r--r--kolourpaint/pixmapfx/kpeffectemboss.h14
-rw-r--r--kolourpaint/pixmapfx/kpeffectflatten.cpp70
-rw-r--r--kolourpaint/pixmapfx/kpeffectflatten.h42
-rw-r--r--kolourpaint/pixmapfx/kpeffectinvert.cpp64
-rw-r--r--kolourpaint/pixmapfx/kpeffectinvert.h24
-rw-r--r--kolourpaint/pixmapfx/kpeffectreducecolors.cpp82
-rw-r--r--kolourpaint/pixmapfx/kpeffectreducecolors.h24
-rw-r--r--kolourpaint/pixmapfx/kpeffectsdialog.cpp68
-rw-r--r--kolourpaint/pixmapfx/kpeffectsdialog.h18
-rw-r--r--kolourpaint/pixmapfx/kpfloodfill.cpp48
-rw-r--r--kolourpaint/pixmapfx/kpfloodfill.h24
-rw-r--r--kolourpaint/pixmapfx/kppixmapfx.cpp352
-rw-r--r--kolourpaint/pixmapfx/kppixmapfx.h194
-rw-r--r--kolourpaint/tools/kptoolaction.cpp12
-rw-r--r--kolourpaint/tools/kptoolaction.h12
-rw-r--r--kolourpaint/tools/kptoolairspray.cpp58
-rw-r--r--kolourpaint/tools/kptoolairspray.h28
-rw-r--r--kolourpaint/tools/kptoolautocrop.cpp70
-rw-r--r--kolourpaint/tools/kptoolautocrop.h24
-rw-r--r--kolourpaint/tools/kptoolclear.cpp10
-rw-r--r--kolourpaint/tools/kptoolclear.h8
-rw-r--r--kolourpaint/tools/kptoolcolorpicker.cpp16
-rw-r--r--kolourpaint/tools/kptoolcolorpicker.h14
-rw-r--r--kolourpaint/tools/kptoolconverttograyscale.cpp16
-rw-r--r--kolourpaint/tools/kptoolconverttograyscale.h8
-rw-r--r--kolourpaint/tools/kptoolcrop.cpp34
-rw-r--r--kolourpaint/tools/kptoolflip.cpp38
-rw-r--r--kolourpaint/tools/kptoolflip.h10
-rw-r--r--kolourpaint/tools/kptoolfloodfill.cpp30
-rw-r--r--kolourpaint/tools/kptoolfloodfill.h14
-rw-r--r--kolourpaint/tools/kptoolpen.cpp136
-rw-r--r--kolourpaint/tools/kptoolpen.h58
-rw-r--r--kolourpaint/tools/kptoolpolygon.cpp118
-rw-r--r--kolourpaint/tools/kptoolpolygon.h54
-rw-r--r--kolourpaint/tools/kptoolpreviewdialog.cpp74
-rw-r--r--kolourpaint/tools/kptoolpreviewdialog.h36
-rw-r--r--kolourpaint/tools/kptoolrectangle.cpp94
-rw-r--r--kolourpaint/tools/kptoolrectangle.h48
-rw-r--r--kolourpaint/tools/kptoolresizescale.cpp220
-rw-r--r--kolourpaint/tools/kptoolresizescale.h42
-rw-r--r--kolourpaint/tools/kptoolrotate.cpp120
-rw-r--r--kolourpaint/tools/kptoolrotate.h24
-rw-r--r--kolourpaint/tools/kptoolselection.cpp178
-rw-r--r--kolourpaint/tools/kptoolselection.h70
-rw-r--r--kolourpaint/tools/kptoolskew.cpp76
-rw-r--r--kolourpaint/tools/kptoolskew.h16
-rw-r--r--kolourpaint/tools/kptooltext.cpp132
-rw-r--r--kolourpaint/tools/kptooltext.h38
-rw-r--r--kolourpaint/views/kpthumbnailview.cpp6
-rw-r--r--kolourpaint/views/kpthumbnailview.h6
-rw-r--r--kolourpaint/views/kpunzoomedthumbnailview.cpp14
-rw-r--r--kolourpaint/views/kpunzoomedthumbnailview.h4
-rw-r--r--kolourpaint/views/kpzoomedthumbnailview.cpp6
-rw-r--r--kolourpaint/views/kpzoomedthumbnailview.h4
-rw-r--r--kolourpaint/views/kpzoomedview.cpp2
-rw-r--r--kolourpaint/views/kpzoomedview.h2
-rw-r--r--kolourpaint/widgets/kpcolorsimilaritycube.cpp82
-rw-r--r--kolourpaint/widgets/kpcolorsimilaritycube.h16
-rw-r--r--kolourpaint/widgets/kpcolorsimilaritydialog.cpp32
-rw-r--r--kolourpaint/widgets/kpcolorsimilaritydialog.h2
-rw-r--r--kolourpaint/widgets/kpcolortoolbar.cpp266
-rw-r--r--kolourpaint/widgets/kpcolortoolbar.h74
-rw-r--r--kolourpaint/widgets/kpresizesignallinglabel.cpp14
-rw-r--r--kolourpaint/widgets/kpresizesignallinglabel.h8
-rw-r--r--kolourpaint/widgets/kpsqueezedtextlabel.cpp38
-rw-r--r--kolourpaint/widgets/kpsqueezedtextlabel.h20
-rw-r--r--kolourpaint/widgets/kptooltoolbar.cpp108
-rw-r--r--kolourpaint/widgets/kptooltoolbar.h32
-rw-r--r--kolourpaint/widgets/kptoolwidgetbase.cpp62
-rw-r--r--kolourpaint/widgets/kptoolwidgetbase.h34
-rw-r--r--kolourpaint/widgets/kptoolwidgetbrush.cpp24
-rw-r--r--kolourpaint/widgets/kptoolwidgetbrush.h12
-rw-r--r--kolourpaint/widgets/kptoolwidgeterasersize.cpp30
-rw-r--r--kolourpaint/widgets/kptoolwidgeterasersize.h8
-rw-r--r--kolourpaint/widgets/kptoolwidgetfillstyle.cpp42
-rw-r--r--kolourpaint/widgets/kptoolwidgetfillstyle.h16
-rw-r--r--kolourpaint/widgets/kptoolwidgetlinewidth.cpp16
-rw-r--r--kolourpaint/widgets/kptoolwidgetlinewidth.h2
-rw-r--r--kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp2
-rw-r--r--kolourpaint/widgets/kptoolwidgetopaqueortransparent.h2
-rw-r--r--kolourpaint/widgets/kptoolwidgetspraycansize.cpp18
-rw-r--r--kolourpaint/widgets/kptoolwidgetspraycansize.h2
-rw-r--r--kooka/dwmenuaction.cpp10
-rw-r--r--kooka/dwmenuaction.h6
-rw-r--r--kooka/imageselectline.cpp30
-rw-r--r--kooka/imageselectline.h12
-rw-r--r--kooka/img_saver.cpp200
-rw-r--r--kooka/img_saver.h110
-rw-r--r--kooka/imgnamecombo.cpp26
-rw-r--r--kooka/imgnamecombo.h12
-rw-r--r--kooka/imgprintdialog.cpp88
-rw-r--r--kooka/imgprintdialog.h40
-rw-r--r--kooka/kadmosocr.cpp56
-rw-r--r--kooka/kadmosocr.h42
-rw-r--r--kooka/kocrbase.cpp116
-rw-r--r--kooka/kocrbase.h50
-rw-r--r--kooka/kocrgocr.cpp40
-rw-r--r--kooka/kocrgocr.h16
-rw-r--r--kooka/kocrkadmos.cpp122
-rw-r--r--kooka/kocrkadmos.h70
-rw-r--r--kooka/kocrocrad.cpp62
-rw-r--r--kooka/kocrocrad.h28
-rw-r--r--kooka/kooka.cpp118
-rw-r--r--kooka/kooka.h10
-rw-r--r--kooka/kookaimage.cpp42
-rw-r--r--kooka/kookaimage.h28
-rw-r--r--kooka/kookapref.cpp166
-rw-r--r--kooka/kookapref.h38
-rw-r--r--kooka/kookaprint.cpp106
-rw-r--r--kooka/kookaprint.h32
-rw-r--r--kooka/kookaview.cpp230
-rw-r--r--kooka/kookaview.h44
-rw-r--r--kooka/ksaneocr.cpp258
-rw-r--r--kooka/ksaneocr.h64
-rw-r--r--kooka/main.cpp6
-rw-r--r--kooka/ocrresedit.cpp30
-rw-r--r--kooka/ocrresedit.h22
-rw-r--r--kooka/ocrword.cpp42
-rw-r--r--kooka/ocrword.h44
-rw-r--r--kooka/scanpackager.cpp174
-rw-r--r--kooka/scanpackager.h70
-rw-r--r--kooka/thumbview.cpp64
-rw-r--r--kooka/thumbview.h40
-rw-r--r--kooka/thumbviewitem.cpp4
-rw-r--r--kooka/thumbviewitem.h6
-rw-r--r--kpdf/conf/dlggeneral.ui.h2
-rw-r--r--kpdf/conf/dlgperformance.ui.h2
-rw-r--r--kpdf/conf/preferencesdialog.cpp2
-rw-r--r--kpdf/conf/preferencesdialog.h4
-rw-r--r--kpdf/core/document.cpp302
-rw-r--r--kpdf/core/document.h38
-rw-r--r--kpdf/core/generator.h12
-rw-r--r--kpdf/core/generator_kimgio/generator_kimgio.cpp12
-rw-r--r--kpdf/core/generator_kimgio/generator_kimgio.h4
-rw-r--r--kpdf/core/generator_pdf/generator_pdf.cpp146
-rw-r--r--kpdf/core/generator_pdf/generator_pdf.h32
-rw-r--r--kpdf/core/generator_pdf/gp_outputdev.cpp36
-rw-r--r--kpdf/core/generator_pdf/gp_outputdev.h16
-rw-r--r--kpdf/core/link.cpp12
-rw-r--r--kpdf/core/link.h36
-rw-r--r--kpdf/core/observer.h6
-rw-r--r--kpdf/core/page.cpp46
-rw-r--r--kpdf/core/page.h32
-rw-r--r--kpdf/error.cpp6
-rw-r--r--kpdf/part.cpp220
-rw-r--r--kpdf/part.h48
-rw-r--r--kpdf/shell/shell.cpp32
-rw-r--r--kpdf/ui/minibar.cpp162
-rw-r--r--kpdf/ui/minibar.h10
-rw-r--r--kpdf/ui/pagepainter.cpp46
-rw-r--r--kpdf/ui/pagepainter.h6
-rw-r--r--kpdf/ui/pageview.cpp334
-rw-r--r--kpdf/ui/pageview.h42
-rw-r--r--kpdf/ui/pageviewutils.cpp46
-rw-r--r--kpdf/ui/pageviewutils.h26
-rw-r--r--kpdf/ui/presentationwidget.cpp216
-rw-r--r--kpdf/ui/presentationwidget.h56
-rw-r--r--kpdf/ui/propertiesdialog.cpp42
-rw-r--r--kpdf/ui/propertiesdialog.h2
-rw-r--r--kpdf/ui/searchwidget.cpp32
-rw-r--r--kpdf/ui/searchwidget.h6
-rw-r--r--kpdf/ui/thumbnaillist.cpp102
-rw-r--r--kpdf/ui/thumbnaillist.h44
-rw-r--r--kpdf/ui/toc.cpp40
-rw-r--r--kpdf/ui/toc.h12
-rw-r--r--kpdf/xpdf/xpdf/GlobalParams.cc22
-rw-r--r--kpovmodeler/pm2dcontrolpoint.cpp8
-rw-r--r--kpovmodeler/pm2dcontrolpoint.h6
-rw-r--r--kpovmodeler/pm3dcontrolpoint.cpp2
-rw-r--r--kpovmodeler/pm3dcontrolpoint.h2
-rw-r--r--kpovmodeler/pmactions.cpp82
-rw-r--r--kpovmodeler/pmactions.h44
-rw-r--r--kpovmodeler/pmbicubicpatch.cpp12
-rw-r--r--kpovmodeler/pmbicubicpatch.h8
-rw-r--r--kpovmodeler/pmbicubicpatchedit.cpp50
-rw-r--r--kpovmodeler/pmbicubicpatchedit.h10
-rw-r--r--kpovmodeler/pmblendmapmodifiers.cpp20
-rw-r--r--kpovmodeler/pmblendmapmodifiers.h8
-rw-r--r--kpovmodeler/pmblendmapmodifiersedit.cpp52
-rw-r--r--kpovmodeler/pmblendmapmodifiersedit.h24
-rw-r--r--kpovmodeler/pmblob.cpp6
-rw-r--r--kpovmodeler/pmblob.h8
-rw-r--r--kpovmodeler/pmblobcylinder.cpp6
-rw-r--r--kpovmodeler/pmblobcylinder.h8
-rw-r--r--kpovmodeler/pmblobcylinderedit.cpp34
-rw-r--r--kpovmodeler/pmblobcylinderedit.h2
-rw-r--r--kpovmodeler/pmblobedit.cpp22
-rw-r--r--kpovmodeler/pmblobedit.h8
-rw-r--r--kpovmodeler/pmblobsphere.cpp6
-rw-r--r--kpovmodeler/pmblobsphere.h8
-rw-r--r--kpovmodeler/pmblobsphereedit.cpp26
-rw-r--r--kpovmodeler/pmblobsphereedit.h2
-rw-r--r--kpovmodeler/pmboundedby.cpp6
-rw-r--r--kpovmodeler/pmboundedby.h8
-rw-r--r--kpovmodeler/pmboundedbyedit.cpp10
-rw-r--r--kpovmodeler/pmboundedbyedit.h8
-rw-r--r--kpovmodeler/pmbox.cpp6
-rw-r--r--kpovmodeler/pmbox.h8
-rw-r--r--kpovmodeler/pmboxedit.cpp16
-rw-r--r--kpovmodeler/pmboxedit.h2
-rw-r--r--kpovmodeler/pmbumpmap.cpp10
-rw-r--r--kpovmodeler/pmbumpmap.h14
-rw-r--r--kpovmodeler/pmbumpmapedit.cpp76
-rw-r--r--kpovmodeler/pmbumpmapedit.h30
-rw-r--r--kpovmodeler/pmcamera.cpp12
-rw-r--r--kpovmodeler/pmcamera.h12
-rw-r--r--kpovmodeler/pmcameraedit.cpp110
-rw-r--r--kpovmodeler/pmcameraedit.h24
-rw-r--r--kpovmodeler/pmclippedby.cpp6
-rw-r--r--kpovmodeler/pmclippedby.h8
-rw-r--r--kpovmodeler/pmclippedbyedit.cpp10
-rw-r--r--kpovmodeler/pmclippedbyedit.h8
-rw-r--r--kpovmodeler/pmcolor.cpp30
-rw-r--r--kpovmodeler/pmcolor.h16
-rw-r--r--kpovmodeler/pmcoloredit.cpp44
-rw-r--r--kpovmodeler/pmcoloredit.h8
-rw-r--r--kpovmodeler/pmcolorsettings.cpp46
-rw-r--r--kpovmodeler/pmcolorsettings.h2
-rw-r--r--kpovmodeler/pmcommand.h14
-rw-r--r--kpovmodeler/pmcommandmanager.cpp10
-rw-r--r--kpovmodeler/pmcommandmanager.h12
-rw-r--r--kpovmodeler/pmcomment.cpp22
-rw-r--r--kpovmodeler/pmcomment.h18
-rw-r--r--kpovmodeler/pmcommentedit.cpp12
-rw-r--r--kpovmodeler/pmcommentedit.h6
-rw-r--r--kpovmodeler/pmcompositeobject.cpp4
-rw-r--r--kpovmodeler/pmcompositeobject.h2
-rw-r--r--kpovmodeler/pmcone.cpp6
-rw-r--r--kpovmodeler/pmcone.h8
-rw-r--r--kpovmodeler/pmconeedit.cpp38
-rw-r--r--kpovmodeler/pmconeedit.h6
-rw-r--r--kpovmodeler/pmcontrolpoint.cpp2
-rw-r--r--kpovmodeler/pmcontrolpoint.h14
-rw-r--r--kpovmodeler/pmcsg.cpp22
-rw-r--r--kpovmodeler/pmcsg.h8
-rw-r--r--kpovmodeler/pmcsgedit.cpp18
-rw-r--r--kpovmodeler/pmcsgedit.h6
-rw-r--r--kpovmodeler/pmcylinder.cpp6
-rw-r--r--kpovmodeler/pmcylinder.h8
-rw-r--r--kpovmodeler/pmcylinderedit.cpp34
-rw-r--r--kpovmodeler/pmcylinderedit.h6
-rw-r--r--kpovmodeler/pmdatachangecommand.cpp2
-rw-r--r--kpovmodeler/pmdeclare.cpp28
-rw-r--r--kpovmodeler/pmdeclare.h18
-rw-r--r--kpovmodeler/pmdeclareedit.cpp52
-rw-r--r--kpovmodeler/pmdeclareedit.h20
-rw-r--r--kpovmodeler/pmdefaults.h36
-rw-r--r--kpovmodeler/pmdeletecommand.cpp8
-rw-r--r--kpovmodeler/pmdeletecommand.h8
-rw-r--r--kpovmodeler/pmdensity.cpp4
-rw-r--r--kpovmodeler/pmdensity.h6
-rw-r--r--kpovmodeler/pmdensityedit.cpp6
-rw-r--r--kpovmodeler/pmdensityedit.h2
-rw-r--r--kpovmodeler/pmdetailobject.cpp2
-rw-r--r--kpovmodeler/pmdetailobject.h2
-rw-r--r--kpovmodeler/pmdetailobjectedit.cpp22
-rw-r--r--kpovmodeler/pmdetailobjectedit.h14
-rw-r--r--kpovmodeler/pmdialogeditbase.cpp112
-rw-r--r--kpovmodeler/pmdialogeditbase.h60
-rw-r--r--kpovmodeler/pmdialogview.cpp82
-rw-r--r--kpovmodeler/pmdialogview.h44
-rw-r--r--kpovmodeler/pmdisc.cpp6
-rw-r--r--kpovmodeler/pmdisc.h8
-rw-r--r--kpovmodeler/pmdiscedit.cpp40
-rw-r--r--kpovmodeler/pmdiscedit.h2
-rw-r--r--kpovmodeler/pmdistancecontrolpoint.cpp4
-rw-r--r--kpovmodeler/pmdistancecontrolpoint.h4
-rw-r--r--kpovmodeler/pmdockwidget.cpp628
-rw-r--r--kpovmodeler/pmdockwidget.h186
-rw-r--r--kpovmodeler/pmdockwidget_private.cpp68
-rw-r--r--kpovmodeler/pmdockwidget_private.h40
-rw-r--r--kpovmodeler/pmdocumentationmap.cpp46
-rw-r--r--kpovmodeler/pmdocumentationmap.h46
-rw-r--r--kpovmodeler/pmdragwidget.cpp10
-rw-r--r--kpovmodeler/pmdragwidget.h12
-rw-r--r--kpovmodeler/pmenumproperty.cpp8
-rw-r--r--kpovmodeler/pmenumproperty.h10
-rw-r--r--kpovmodeler/pmerrordialog.cpp30
-rw-r--r--kpovmodeler/pmerrordialog.h22
-rw-r--r--kpovmodeler/pmface.h8
-rw-r--r--kpovmodeler/pmfactory.cpp6
-rw-r--r--kpovmodeler/pmfactory.h6
-rw-r--r--kpovmodeler/pmfiledialog.cpp32
-rw-r--r--kpovmodeler/pmfiledialog.h8
-rw-r--r--kpovmodeler/pmfinish.cpp6
-rw-r--r--kpovmodeler/pmfinish.h8
-rw-r--r--kpovmodeler/pmfinishedit.cpp152
-rw-r--r--kpovmodeler/pmfinishedit.h52
-rw-r--r--kpovmodeler/pmfog.cpp6
-rw-r--r--kpovmodeler/pmfog.h8
-rw-r--r--kpovmodeler/pmfogedit.cpp90
-rw-r--r--kpovmodeler/pmfogedit.h22
-rw-r--r--kpovmodeler/pmformulalabel.cpp72
-rw-r--r--kpovmodeler/pmformulalabel.h28
-rw-r--r--kpovmodeler/pmglobalphotons.cpp8
-rw-r--r--kpovmodeler/pmglobalphotons.h8
-rw-r--r--kpovmodeler/pmglobalphotonsedit.cpp118
-rw-r--r--kpovmodeler/pmglobalphotonsedit.h12
-rw-r--r--kpovmodeler/pmglobals.h4
-rw-r--r--kpovmodeler/pmglobalsettings.cpp8
-rw-r--r--kpovmodeler/pmglobalsettings.h8
-rw-r--r--kpovmodeler/pmglobalsettingsedit.cpp110
-rw-r--r--kpovmodeler/pmglobalsettingsedit.h14
-rw-r--r--kpovmodeler/pmglview.cpp188
-rw-r--r--kpovmodeler/pmglview.h92
-rw-r--r--kpovmodeler/pmgraphicalobject.cpp2
-rw-r--r--kpovmodeler/pmgraphicalobject.h2
-rw-r--r--kpovmodeler/pmgraphicalobjectedit.cpp52
-rw-r--r--kpovmodeler/pmgraphicalobjectedit.h24
-rw-r--r--kpovmodeler/pmgridsettings.cpp48
-rw-r--r--kpovmodeler/pmgridsettings.h2
-rw-r--r--kpovmodeler/pmheightfield.cpp32
-rw-r--r--kpovmodeler/pmheightfield.h18
-rw-r--r--kpovmodeler/pmheightfieldedit.cpp60
-rw-r--r--kpovmodeler/pmheightfieldedit.h22
-rw-r--r--kpovmodeler/pmheightfieldroam.cpp14
-rw-r--r--kpovmodeler/pmheightfieldroam.h6
-rw-r--r--kpovmodeler/pmimagemap.cpp32
-rw-r--r--kpovmodeler/pmimagemap.h26
-rw-r--r--kpovmodeler/pmimagemapedit.cpp186
-rw-r--r--kpovmodeler/pmimagemapedit.h56
-rw-r--r--kpovmodeler/pminserterrordialog.cpp18
-rw-r--r--kpovmodeler/pminserterrordialog.h14
-rw-r--r--kpovmodeler/pminsertpopup.cpp10
-rw-r--r--kpovmodeler/pminsertpopup.h4
-rw-r--r--kpovmodeler/pminsertrulesystem.cpp256
-rw-r--r--kpovmodeler/pminsertrulesystem.h222
-rw-r--r--kpovmodeler/pminterior.cpp6
-rw-r--r--kpovmodeler/pminterior.h8
-rw-r--r--kpovmodeler/pminterioredit.cpp48
-rw-r--r--kpovmodeler/pminterioredit.h18
-rw-r--r--kpovmodeler/pminteriortexture.cpp4
-rw-r--r--kpovmodeler/pminteriortexture.h6
-rw-r--r--kpovmodeler/pminteriortextureedit.cpp6
-rw-r--r--kpovmodeler/pminteriortextureedit.h2
-rw-r--r--kpovmodeler/pmiomanager.cpp8
-rw-r--r--kpovmodeler/pmiomanager.h44
-rw-r--r--kpovmodeler/pmisosurface.cpp14
-rw-r--r--kpovmodeler/pmisosurface.h14
-rw-r--r--kpovmodeler/pmisosurfaceedit.cpp96
-rw-r--r--kpovmodeler/pmisosurfaceedit.h30
-rw-r--r--kpovmodeler/pmjuliafractal.cpp22
-rw-r--r--kpovmodeler/pmjuliafractal.h16
-rw-r--r--kpovmodeler/pmjuliafractaledit.cpp64
-rw-r--r--kpovmodeler/pmjuliafractaledit.h12
-rw-r--r--kpovmodeler/pmlathe.cpp68
-rw-r--r--kpovmodeler/pmlathe.h30
-rw-r--r--kpovmodeler/pmlatheedit.cpp68
-rw-r--r--kpovmodeler/pmlatheedit.h26
-rw-r--r--kpovmodeler/pmlayoutsettings.cpp238
-rw-r--r--kpovmodeler/pmlayoutsettings.h74
-rw-r--r--kpovmodeler/pmlibrarybrowser.cpp92
-rw-r--r--kpovmodeler/pmlibrarybrowser.h46
-rw-r--r--kpovmodeler/pmlibraryentrypreview.cpp88
-rw-r--r--kpovmodeler/pmlibraryentrypreview.h42
-rw-r--r--kpovmodeler/pmlibraryhandle.cpp94
-rw-r--r--kpovmodeler/pmlibraryhandle.h50
-rw-r--r--kpovmodeler/pmlibraryhandleedit.cpp52
-rw-r--r--kpovmodeler/pmlibraryhandleedit.h24
-rw-r--r--kpovmodeler/pmlibraryiconview.cpp84
-rw-r--r--kpovmodeler/pmlibraryiconview.h36
-rw-r--r--kpovmodeler/pmlibrarymanager.cpp26
-rw-r--r--kpovmodeler/pmlibrarymanager.h16
-rw-r--r--kpovmodeler/pmlibraryobject.cpp94
-rw-r--r--kpovmodeler/pmlibraryobject.h44
-rw-r--r--kpovmodeler/pmlibraryobjectsearch.cpp42
-rw-r--r--kpovmodeler/pmlibraryobjectsearch.h14
-rw-r--r--kpovmodeler/pmlight.cpp8
-rw-r--r--kpovmodeler/pmlight.h8
-rw-r--r--kpovmodeler/pmlightedit.cpp130
-rw-r--r--kpovmodeler/pmlightedit.h50
-rw-r--r--kpovmodeler/pmlightgroup.cpp8
-rw-r--r--kpovmodeler/pmlightgroup.h8
-rw-r--r--kpovmodeler/pmlightgroupedit.cpp16
-rw-r--r--kpovmodeler/pmlightgroupedit.h6
-rw-r--r--kpovmodeler/pmline.h6
-rw-r--r--kpovmodeler/pmlineedits.cpp26
-rw-r--r--kpovmodeler/pmlineedits.h10
-rw-r--r--kpovmodeler/pmlinkedit.cpp42
-rw-r--r--kpovmodeler/pmlinkedit.h30
-rw-r--r--kpovmodeler/pmlistpattern.cpp26
-rw-r--r--kpovmodeler/pmlistpattern.h40
-rw-r--r--kpovmodeler/pmlistpatternedit.cpp40
-rw-r--r--kpovmodeler/pmlistpatternedit.h14
-rw-r--r--kpovmodeler/pmlookslike.cpp6
-rw-r--r--kpovmodeler/pmlookslike.h8
-rw-r--r--kpovmodeler/pmmapmemento.cpp4
-rw-r--r--kpovmodeler/pmmapmemento.h14
-rw-r--r--kpovmodeler/pmmaterial.cpp4
-rw-r--r--kpovmodeler/pmmaterial.h6
-rw-r--r--kpovmodeler/pmmaterialedit.cpp6
-rw-r--r--kpovmodeler/pmmaterialedit.h2
-rw-r--r--kpovmodeler/pmmaterialmap.cpp10
-rw-r--r--kpovmodeler/pmmaterialmap.h14
-rw-r--r--kpovmodeler/pmmaterialmapedit.cpp66
-rw-r--r--kpovmodeler/pmmaterialmapedit.h28
-rw-r--r--kpovmodeler/pmmatrix.cpp16
-rw-r--r--kpovmodeler/pmmatrix.h6
-rw-r--r--kpovmodeler/pmmedia.cpp6
-rw-r--r--kpovmodeler/pmmedia.h8
-rw-r--r--kpovmodeler/pmmediaedit.cpp128
-rw-r--r--kpovmodeler/pmmediaedit.h30
-rw-r--r--kpovmodeler/pmmemento.cpp10
-rw-r--r--kpovmodeler/pmmemento.h30
-rw-r--r--kpovmodeler/pmmesh.cpp24
-rw-r--r--kpovmodeler/pmmesh.h10
-rw-r--r--kpovmodeler/pmmeshedit.cpp22
-rw-r--r--kpovmodeler/pmmeshedit.h8
-rw-r--r--kpovmodeler/pmmessage.cpp2
-rw-r--r--kpovmodeler/pmmessage.h14
-rw-r--r--kpovmodeler/pmmetaobject.cpp6
-rw-r--r--kpovmodeler/pmmetaobject.h54
-rw-r--r--kpovmodeler/pmmovecommand.cpp14
-rw-r--r--kpovmodeler/pmmovecommand.h2
-rw-r--r--kpovmodeler/pmnamedobject.cpp4
-rw-r--r--kpovmodeler/pmnamedobject.h8
-rw-r--r--kpovmodeler/pmnamedobjectedit.cpp20
-rw-r--r--kpovmodeler/pmnamedobjectedit.h8
-rw-r--r--kpovmodeler/pmnormal.cpp6
-rw-r--r--kpovmodeler/pmnormal.h8
-rw-r--r--kpovmodeler/pmnormaledit.cpp28
-rw-r--r--kpovmodeler/pmnormaledit.h8
-rw-r--r--kpovmodeler/pmobject.cpp22
-rw-r--r--kpovmodeler/pmobject.h48
-rw-r--r--kpovmodeler/pmobjectaction.h10
-rw-r--r--kpovmodeler/pmobjectdrag.cpp72
-rw-r--r--kpovmodeler/pmobjectdrag.h18
-rw-r--r--kpovmodeler/pmobjectlibrarysettings.cpp62
-rw-r--r--kpovmodeler/pmobjectlibrarysettings.h24
-rw-r--r--kpovmodeler/pmobjectlink.cpp8
-rw-r--r--kpovmodeler/pmobjectlink.h8
-rw-r--r--kpovmodeler/pmobjectlinkedit.cpp8
-rw-r--r--kpovmodeler/pmobjectlinkedit.h2
-rw-r--r--kpovmodeler/pmobjectselect.cpp64
-rw-r--r--kpovmodeler/pmobjectselect.h50
-rw-r--r--kpovmodeler/pmobjectsettings.cpp128
-rw-r--r--kpovmodeler/pmobjectsettings.h6
-rw-r--r--kpovmodeler/pmopenglsettings.cpp14
-rw-r--r--kpovmodeler/pmopenglsettings.h6
-rw-r--r--kpovmodeler/pmoutputdevice.cpp40
-rw-r--r--kpovmodeler/pmoutputdevice.h26
-rw-r--r--kpovmodeler/pmpalettevalue.cpp6
-rw-r--r--kpovmodeler/pmpalettevalue.h4
-rw-r--r--kpovmodeler/pmpalettevalueedit.cpp34
-rw-r--r--kpovmodeler/pmpalettevalueedit.h2
-rw-r--r--kpovmodeler/pmpalettevaluememento.cpp16
-rw-r--r--kpovmodeler/pmpalettevaluememento.h14
-rw-r--r--kpovmodeler/pmparser.cpp30
-rw-r--r--kpovmodeler/pmparser.h48
-rw-r--r--kpovmodeler/pmpart.cpp406
-rw-r--r--kpovmodeler/pmpart.h68
-rw-r--r--kpovmodeler/pmpartiface.h18
-rw-r--r--kpovmodeler/pmpattern.cpp14
-rw-r--r--kpovmodeler/pmpattern.h18
-rw-r--r--kpovmodeler/pmpatternedit.cpp244
-rw-r--r--kpovmodeler/pmpatternedit.h68
-rw-r--r--kpovmodeler/pmphotons.cpp6
-rw-r--r--kpovmodeler/pmphotons.h8
-rw-r--r--kpovmodeler/pmphotonsedit.cpp48
-rw-r--r--kpovmodeler/pmphotonsedit.h22
-rw-r--r--kpovmodeler/pmpigment.cpp6
-rw-r--r--kpovmodeler/pmpigment.h8
-rw-r--r--kpovmodeler/pmpigmentedit.cpp10
-rw-r--r--kpovmodeler/pmpigmentedit.h6
-rw-r--r--kpovmodeler/pmplane.cpp6
-rw-r--r--kpovmodeler/pmplane.h8
-rw-r--r--kpovmodeler/pmplaneedit.cpp30
-rw-r--r--kpovmodeler/pmplaneedit.h4
-rw-r--r--kpovmodeler/pmplanenormalcontrolpoint.cpp2
-rw-r--r--kpovmodeler/pmplanenormalcontrolpoint.h2
-rw-r--r--kpovmodeler/pmpluginmanager.cpp22
-rw-r--r--kpovmodeler/pmpluginmanager.h18
-rw-r--r--kpovmodeler/pmpluginsettings.cpp36
-rw-r--r--kpovmodeler/pmpluginsettings.h14
-rw-r--r--kpovmodeler/pmpoint.h6
-rw-r--r--kpovmodeler/pmpolynom.cpp6
-rw-r--r--kpovmodeler/pmpolynom.h8
-rw-r--r--kpovmodeler/pmpolynomedit.cpp64
-rw-r--r--kpovmodeler/pmpolynomedit.h18
-rw-r--r--kpovmodeler/pmpolynomexponents.cpp8
-rw-r--r--kpovmodeler/pmpolynomexponents.h10
-rw-r--r--kpovmodeler/pmpovray31format.cpp24
-rw-r--r--kpovmodeler/pmpovray31format.h16
-rw-r--r--kpovmodeler/pmpovray31serialization.cpp202
-rw-r--r--kpovmodeler/pmpovray35format.cpp24
-rw-r--r--kpovmodeler/pmpovray35format.h16
-rw-r--r--kpovmodeler/pmpovray35serialization.cpp118
-rw-r--r--kpovmodeler/pmpovrayformat.cpp6
-rw-r--r--kpovmodeler/pmpovrayformat.h8
-rw-r--r--kpovmodeler/pmpovraymatrix.cpp6
-rw-r--r--kpovmodeler/pmpovraymatrix.h8
-rw-r--r--kpovmodeler/pmpovraymatrixedit.cpp18
-rw-r--r--kpovmodeler/pmpovraymatrixedit.h2
-rw-r--r--kpovmodeler/pmpovrayoutputwidget.cpp28
-rw-r--r--kpovmodeler/pmpovrayoutputwidget.h14
-rw-r--r--kpovmodeler/pmpovrayparser.cpp88
-rw-r--r--kpovmodeler/pmpovrayparser.h10
-rw-r--r--kpovmodeler/pmpovrayrenderwidget.cpp62
-rw-r--r--kpovmodeler/pmpovrayrenderwidget.h42
-rw-r--r--kpovmodeler/pmpovraysettings.cpp148
-rw-r--r--kpovmodeler/pmpovraysettings.h32
-rw-r--r--kpovmodeler/pmpovraywidget.cpp104
-rw-r--r--kpovmodeler/pmpovraywidget.h36
-rw-r--r--kpovmodeler/pmpreviewsettings.cpp76
-rw-r--r--kpovmodeler/pmpreviewsettings.h16
-rw-r--r--kpovmodeler/pmprism.cpp110
-rw-r--r--kpovmodeler/pmprism.h32
-rw-r--r--kpovmodeler/pmprismedit.cpp196
-rw-r--r--kpovmodeler/pmprismedit.h46
-rw-r--r--kpovmodeler/pmprismmemento.cpp10
-rw-r--r--kpovmodeler/pmprismmemento.h8
-rw-r--r--kpovmodeler/pmprojectedthrough.cpp6
-rw-r--r--kpovmodeler/pmprojectedthrough.h8
-rw-r--r--kpovmodeler/pmprototypemanager.cpp28
-rw-r--r--kpovmodeler/pmprototypemanager.h42
-rw-r--r--kpovmodeler/pmquickcolor.cpp6
-rw-r--r--kpovmodeler/pmquickcolor.h8
-rw-r--r--kpovmodeler/pmquickcoloredit.cpp12
-rw-r--r--kpovmodeler/pmquickcoloredit.h2
-rw-r--r--kpovmodeler/pmradiosity.cpp6
-rw-r--r--kpovmodeler/pmradiosity.h8
-rw-r--r--kpovmodeler/pmradiosityedit.cpp78
-rw-r--r--kpovmodeler/pmradiosityedit.h10
-rw-r--r--kpovmodeler/pmrainbow.cpp6
-rw-r--r--kpovmodeler/pmrainbow.h8
-rw-r--r--kpovmodeler/pmrainbowedit.cpp72
-rw-r--r--kpovmodeler/pmrainbowedit.h22
-rw-r--r--kpovmodeler/pmraw.cpp16
-rw-r--r--kpovmodeler/pmraw.h18
-rw-r--r--kpovmodeler/pmrawedit.cpp16
-rw-r--r--kpovmodeler/pmrawedit.h6
-rw-r--r--kpovmodeler/pmrendermanager.cpp52
-rw-r--r--kpovmodeler/pmrendermanager.h72
-rw-r--r--kpovmodeler/pmrendermode.cpp42
-rw-r--r--kpovmodeler/pmrendermode.h24
-rw-r--r--kpovmodeler/pmrendermodesdialog.cpp180
-rw-r--r--kpovmodeler/pmrendermodesdialog.h56
-rw-r--r--kpovmodeler/pmresourcelocator.cpp26
-rw-r--r--kpovmodeler/pmresourcelocator.h10
-rw-r--r--kpovmodeler/pmrotate.cpp8
-rw-r--r--kpovmodeler/pmrotate.h8
-rw-r--r--kpovmodeler/pmrotateedit.cpp6
-rw-r--r--kpovmodeler/pmrotateedit.h2
-rw-r--r--kpovmodeler/pmscale.cpp6
-rw-r--r--kpovmodeler/pmscale.h8
-rw-r--r--kpovmodeler/pmscaleedit.cpp6
-rw-r--r--kpovmodeler/pmscaleedit.h2
-rw-r--r--kpovmodeler/pmscanner.cpp6
-rw-r--r--kpovmodeler/pmscanner.h20
-rw-r--r--kpovmodeler/pmscene.cpp16
-rw-r--r--kpovmodeler/pmscene.h6
-rw-r--r--kpovmodeler/pmserializer.cpp8
-rw-r--r--kpovmodeler/pmserializer.h20
-rw-r--r--kpovmodeler/pmsettingsdialog.cpp42
-rw-r--r--kpovmodeler/pmsettingsdialog.h34
-rw-r--r--kpovmodeler/pmshell.cpp140
-rw-r--r--kpovmodeler/pmshell.h14
-rw-r--r--kpovmodeler/pmskysphere.cpp4
-rw-r--r--kpovmodeler/pmskysphere.h6
-rw-r--r--kpovmodeler/pmskysphereedit.cpp6
-rw-r--r--kpovmodeler/pmskysphereedit.h2
-rw-r--r--kpovmodeler/pmslope.cpp6
-rw-r--r--kpovmodeler/pmslope.h8
-rw-r--r--kpovmodeler/pmslopeedit.cpp26
-rw-r--r--kpovmodeler/pmslopeedit.h8
-rw-r--r--kpovmodeler/pmsolidcolor.cpp6
-rw-r--r--kpovmodeler/pmsolidcolor.h8
-rw-r--r--kpovmodeler/pmsolidcoloredit.cpp12
-rw-r--r--kpovmodeler/pmsolidcoloredit.h2
-rw-r--r--kpovmodeler/pmsolidobject.cpp2
-rw-r--r--kpovmodeler/pmsolidobject.h2
-rw-r--r--kpovmodeler/pmsolidobjectedit.cpp14
-rw-r--r--kpovmodeler/pmsolidobjectedit.h8
-rw-r--r--kpovmodeler/pmsor.cpp70
-rw-r--r--kpovmodeler/pmsor.h30
-rw-r--r--kpovmodeler/pmsorcontrolpoint.cpp2
-rw-r--r--kpovmodeler/pmsorcontrolpoint.h2
-rw-r--r--kpovmodeler/pmsoredit.cpp70
-rw-r--r--kpovmodeler/pmsoredit.h26
-rw-r--r--kpovmodeler/pmsphere.cpp6
-rw-r--r--kpovmodeler/pmsphere.h8
-rw-r--r--kpovmodeler/pmsphereedit.cpp20
-rw-r--r--kpovmodeler/pmsphereedit.h2
-rw-r--r--kpovmodeler/pmspheresweep.cpp80
-rw-r--r--kpovmodeler/pmspheresweep.h44
-rw-r--r--kpovmodeler/pmspheresweepedit.cpp84
-rw-r--r--kpovmodeler/pmspheresweepedit.h24
-rw-r--r--kpovmodeler/pmsplinememento.cpp8
-rw-r--r--kpovmodeler/pmsplinememento.h8
-rw-r--r--kpovmodeler/pmsplinesegment.h6
-rw-r--r--kpovmodeler/pmsqe.cpp6
-rw-r--r--kpovmodeler/pmsqe.h8
-rw-r--r--kpovmodeler/pmsqeedit.cpp20
-rw-r--r--kpovmodeler/pmsqeedit.h2
-rw-r--r--kpovmodeler/pmsymboltable.cpp18
-rw-r--r--kpovmodeler/pmsymboltable.h22
-rw-r--r--kpovmodeler/pmtext.cpp24
-rw-r--r--kpovmodeler/pmtext.h18
-rw-r--r--kpovmodeler/pmtextedit.cpp56
-rw-r--r--kpovmodeler/pmtextedit.h14
-rw-r--r--kpovmodeler/pmtexture.cpp6
-rw-r--r--kpovmodeler/pmtexture.h8
-rw-r--r--kpovmodeler/pmtexturebase.cpp4
-rw-r--r--kpovmodeler/pmtexturebase.h4
-rw-r--r--kpovmodeler/pmtexturebaseedit.cpp8
-rw-r--r--kpovmodeler/pmtexturebaseedit.h2
-rw-r--r--kpovmodeler/pmtextureedit.cpp10
-rw-r--r--kpovmodeler/pmtextureedit.h6
-rw-r--r--kpovmodeler/pmtexturemap.cpp54
-rw-r--r--kpovmodeler/pmtexturemap.h58
-rw-r--r--kpovmodeler/pmtexturemapedit.cpp32
-rw-r--r--kpovmodeler/pmtexturemapedit.h18
-rw-r--r--kpovmodeler/pmtorus.cpp6
-rw-r--r--kpovmodeler/pmtorus.h8
-rw-r--r--kpovmodeler/pmtorusedit.cpp28
-rw-r--r--kpovmodeler/pmtorusedit.h6
-rw-r--r--kpovmodeler/pmtranslate.cpp6
-rw-r--r--kpovmodeler/pmtranslate.h8
-rw-r--r--kpovmodeler/pmtranslateedit.cpp6
-rw-r--r--kpovmodeler/pmtranslateedit.h2
-rw-r--r--kpovmodeler/pmtreeview.cpp112
-rw-r--r--kpovmodeler/pmtreeview.h56
-rw-r--r--kpovmodeler/pmtreeviewitem.cpp32
-rw-r--r--kpovmodeler/pmtreeviewitem.h20
-rw-r--r--kpovmodeler/pmtriangle.cpp6
-rw-r--r--kpovmodeler/pmtriangle.h8
-rw-r--r--kpovmodeler/pmtriangleedit.cpp50
-rw-r--r--kpovmodeler/pmtriangleedit.h18
-rw-r--r--kpovmodeler/pmtruetypecache.cpp18
-rw-r--r--kpovmodeler/pmtruetypecache.h16
-rw-r--r--kpovmodeler/pmunknownview.cpp14
-rw-r--r--kpovmodeler/pmunknownview.h10
-rw-r--r--kpovmodeler/pmvariant.cpp56
-rw-r--r--kpovmodeler/pmvariant.h20
-rw-r--r--kpovmodeler/pmvector.cpp22
-rw-r--r--kpovmodeler/pmvector.h10
-rw-r--r--kpovmodeler/pmvectorcontrolpoint.cpp4
-rw-r--r--kpovmodeler/pmvectorcontrolpoint.h4
-rw-r--r--kpovmodeler/pmvectoredit.cpp94
-rw-r--r--kpovmodeler/pmvectoredit.h28
-rw-r--r--kpovmodeler/pmvectorlistedit.cpp102
-rw-r--r--kpovmodeler/pmvectorlistedit.h40
-rw-r--r--kpovmodeler/pmview.cpp28
-rw-r--r--kpovmodeler/pmview.h12
-rw-r--r--kpovmodeler/pmviewbase.h24
-rw-r--r--kpovmodeler/pmviewfactory.cpp10
-rw-r--r--kpovmodeler/pmviewfactory.h36
-rw-r--r--kpovmodeler/pmviewlayoutmanager.cpp170
-rw-r--r--kpovmodeler/pmviewlayoutmanager.h78
-rw-r--r--kpovmodeler/pmwarp.cpp8
-rw-r--r--kpovmodeler/pmwarp.h8
-rw-r--r--kpovmodeler/pmwarpedit.cpp132
-rw-r--r--kpovmodeler/pmwarpedit.h48
-rw-r--r--kpovmodeler/pmxmlhelper.cpp42
-rw-r--r--kpovmodeler/pmxmlhelper.h32
-rw-r--r--kpovmodeler/pmxmlparser.cpp28
-rw-r--r--kpovmodeler/pmxmlparser.h12
-rw-r--r--kruler/klineal.cpp204
-rw-r--r--kruler/klineal.h62
-rw-r--r--ksnapshot/ksnapshot.cpp156
-rw-r--r--ksnapshot/ksnapshot.h82
-rw-r--r--ksnapshot/ksnapshotiface.h6
-rw-r--r--ksnapshot/ksnapshotwidget.ui.h16
-rw-r--r--ksnapshot/regiongrabber.cpp80
-rw-r--r--ksnapshot/regiongrabber.h28
-rw-r--r--ksnapshot/windowgrabber.cpp74
-rw-r--r--ksnapshot/windowgrabber.h24
-rw-r--r--ksvg/core/CanvasFactory.cpp32
-rw-r--r--ksvg/core/CanvasFactory.h12
-rw-r--r--ksvg/core/CanvasItem.h18
-rw-r--r--ksvg/core/CanvasItems.cpp26
-rw-r--r--ksvg/core/CanvasItems.h6
-rw-r--r--ksvg/core/DocumentFactory.cpp8
-rw-r--r--ksvg/core/DocumentFactory.h4
-rw-r--r--ksvg/core/KSVGCanvas.cpp102
-rw-r--r--ksvg/core/KSVGCanvas.h54
-rw-r--r--ksvg/core/KSVGHelper.h14
-rw-r--r--ksvg/core/KSVGLoader.cpp112
-rw-r--r--ksvg/core/KSVGLoader.h20
-rw-r--r--ksvg/core/KSVGReader.cc82
-rw-r--r--ksvg/core/KSVGReader.h14
-rw-r--r--ksvg/core/KSVGTextChunk.cpp4
-rw-r--r--ksvg/core/KSVGTextChunk.h10
-rw-r--r--ksvg/ecma/ksvg_ecma.cpp28
-rw-r--r--ksvg/ecma/ksvg_ecma.h12
-rw-r--r--ksvg/ecma/ksvg_ecmaeventlistener.cpp8
-rw-r--r--ksvg/ecma/ksvg_ecmaeventlistener.h6
-rw-r--r--ksvg/ecma/ksvg_helper.cpp14
-rw-r--r--ksvg/ecma/ksvg_scriptinterpreter.h4
-rw-r--r--ksvg/ecma/ksvg_window.cpp30
-rw-r--r--ksvg/ecma/ksvg_window.h16
-rw-r--r--ksvg/impl/LRUCache.h4
-rw-r--r--ksvg/impl/SVGAngleImpl.cc2
-rw-r--r--ksvg/impl/SVGAnimateColorElementImpl.cc6
-rw-r--r--ksvg/impl/SVGAnimateColorElementImpl.h2
-rw-r--r--ksvg/impl/SVGAnimateElementImpl.cc4
-rw-r--r--ksvg/impl/SVGAnimateElementImpl.h4
-rw-r--r--ksvg/impl/SVGAnimateMotionElementImpl.cc6
-rw-r--r--ksvg/impl/SVGAnimateTransformElementImpl.cc14
-rw-r--r--ksvg/impl/SVGAnimateTransformElementImpl.h6
-rw-r--r--ksvg/impl/SVGAnimatedPointsImpl.cc12
-rw-r--r--ksvg/impl/SVGAnimatedPointsImpl.h4
-rw-r--r--ksvg/impl/SVGAnimationElementImpl.cc36
-rw-r--r--ksvg/impl/SVGAnimationElementImpl.h24
-rw-r--r--ksvg/impl/SVGColorImpl.cc20
-rw-r--r--ksvg/impl/SVGColorImpl.h2
-rw-r--r--ksvg/impl/SVGColorProfileElementImpl.cc14
-rw-r--r--ksvg/impl/SVGColorProfileElementImpl.h6
-rw-r--r--ksvg/impl/SVGContainerImpl.cc2
-rw-r--r--ksvg/impl/SVGDocumentImpl.cc34
-rw-r--r--ksvg/impl/SVGDocumentImpl.h42
-rw-r--r--ksvg/impl/SVGEcma.cc2
-rw-r--r--ksvg/impl/SVGElementImpl.cc44
-rw-r--r--ksvg/impl/SVGElementImpl.h28
-rw-r--r--ksvg/impl/SVGEventImpl.cc10
-rw-r--r--ksvg/impl/SVGEventImpl.h10
-rw-r--r--ksvg/impl/SVGFitToViewBoxImpl.cc10
-rw-r--r--ksvg/impl/SVGFitToViewBoxImpl.h4
-rw-r--r--ksvg/impl/SVGGlyphElementImpl.cc2
-rw-r--r--ksvg/impl/SVGGlyphElementImpl.h4
-rw-r--r--ksvg/impl/SVGGradientElementImpl.cc12
-rw-r--r--ksvg/impl/SVGGradientElementImpl.h4
-rw-r--r--ksvg/impl/SVGHelperImpl.cc42
-rw-r--r--ksvg/impl/SVGHelperImpl.h18
-rw-r--r--ksvg/impl/SVGImageElementImpl.cc32
-rw-r--r--ksvg/impl/SVGImageElementImpl.h20
-rw-r--r--ksvg/impl/SVGLangSpaceImpl.cc12
-rw-r--r--ksvg/impl/SVGLangSpaceImpl.h2
-rw-r--r--ksvg/impl/SVGLengthImpl.cc28
-rw-r--r--ksvg/impl/SVGLengthImpl.h6
-rw-r--r--ksvg/impl/SVGLinearGradientElementImpl.cc6
-rw-r--r--ksvg/impl/SVGLinearGradientElementImpl.h2
-rw-r--r--ksvg/impl/SVGList.h4
-rw-r--r--ksvg/impl/SVGMarkerElementImpl.cc2
-rw-r--r--ksvg/impl/SVGMaskElementImpl.cc24
-rw-r--r--ksvg/impl/SVGMaskElementImpl.h16
-rw-r--r--ksvg/impl/SVGMatrixImpl.cc32
-rw-r--r--ksvg/impl/SVGMatrixImpl.h12
-rw-r--r--ksvg/impl/SVGPaintImpl.cc2
-rw-r--r--ksvg/impl/SVGPaintImpl.h2
-rw-r--r--ksvg/impl/SVGPaintServerImpl.cc2
-rw-r--r--ksvg/impl/SVGPaintServerImpl.h2
-rw-r--r--ksvg/impl/SVGPathElementImpl.cc10
-rw-r--r--ksvg/impl/SVGPathElementImpl.h8
-rw-r--r--ksvg/impl/SVGPathSegArcImpl.h4
-rw-r--r--ksvg/impl/SVGPathSegClosePathImpl.h2
-rw-r--r--ksvg/impl/SVGPathSegCurvetoCubicImpl.h4
-rw-r--r--ksvg/impl/SVGPathSegCurvetoCubicSmoothImpl.h4
-rw-r--r--ksvg/impl/SVGPathSegCurvetoQuadraticImpl.h4
-rw-r--r--ksvg/impl/SVGPathSegCurvetoQuadraticSmoothImpl.h4
-rw-r--r--ksvg/impl/SVGPathSegImpl.h2
-rw-r--r--ksvg/impl/SVGPathSegLinetoHorizontalImpl.h4
-rw-r--r--ksvg/impl/SVGPathSegLinetoImpl.h4
-rw-r--r--ksvg/impl/SVGPathSegLinetoVerticalImpl.h4
-rw-r--r--ksvg/impl/SVGPathSegMovetoImpl.h4
-rw-r--r--ksvg/impl/SVGPatternElementImpl.cc28
-rw-r--r--ksvg/impl/SVGPatternElementImpl.h22
-rw-r--r--ksvg/impl/SVGPreserveAspectRatioImpl.cc8
-rw-r--r--ksvg/impl/SVGPreserveAspectRatioImpl.h4
-rw-r--r--ksvg/impl/SVGRadialGradientElementImpl.cc6
-rw-r--r--ksvg/impl/SVGRadialGradientElementImpl.h2
-rw-r--r--ksvg/impl/SVGRectImpl.cc10
-rw-r--r--ksvg/impl/SVGRectImpl.h8
-rw-r--r--ksvg/impl/SVGSVGElementImpl.cc32
-rw-r--r--ksvg/impl/SVGSVGElementImpl.h14
-rw-r--r--ksvg/impl/SVGScriptElementImpl.cc24
-rw-r--r--ksvg/impl/SVGScriptElementImpl.h12
-rw-r--r--ksvg/impl/SVGSetElementImpl.h2
-rw-r--r--ksvg/impl/SVGShapeImpl.cc4
-rw-r--r--ksvg/impl/SVGShapeImpl.h4
-rw-r--r--ksvg/impl/SVGStringListImpl.cc4
-rw-r--r--ksvg/impl/SVGStringListImpl.h4
-rw-r--r--ksvg/impl/SVGStylableImpl.cc74
-rw-r--r--ksvg/impl/SVGStylableImpl.h48
-rw-r--r--ksvg/impl/SVGTRefElementImpl.cc4
-rw-r--r--ksvg/impl/SVGTSpanElementImpl.cc2
-rw-r--r--ksvg/impl/SVGTSpanElementImpl.h2
-rw-r--r--ksvg/impl/SVGTestsImpl.cc8
-rw-r--r--ksvg/impl/SVGTestsImpl.h6
-rw-r--r--ksvg/impl/SVGTextContentElementImpl.cc10
-rw-r--r--ksvg/impl/SVGTextContentElementImpl.h2
-rw-r--r--ksvg/impl/SVGTextElementImpl.cc6
-rw-r--r--ksvg/impl/SVGTextElementImpl.h4
-rw-r--r--ksvg/impl/SVGTextPathElementImpl.cc10
-rw-r--r--ksvg/impl/SVGTextPathElementImpl.h2
-rw-r--r--ksvg/impl/SVGTimeScheduler.cc26
-rw-r--r--ksvg/impl/SVGTimeScheduler.h24
-rw-r--r--ksvg/impl/SVGTransformImpl.cc18
-rw-r--r--ksvg/impl/SVGTransformImpl.h4
-rw-r--r--ksvg/impl/SVGTransformableImpl.h2
-rw-r--r--ksvg/impl/SVGURIReferenceImpl.cc8
-rw-r--r--ksvg/impl/SVGURIReferenceImpl.h8
-rw-r--r--ksvg/impl/SVGUnitConverter.h12
-rw-r--r--ksvg/impl/SVGUseElementImpl.cc16
-rw-r--r--ksvg/impl/SVGViewSpecImpl.cc8
-rw-r--r--ksvg/impl/SVGViewSpecImpl.h2
-rw-r--r--ksvg/impl/SVGWindowImpl.cc22
-rw-r--r--ksvg/impl/SVGWindowImpl.h8
-rw-r--r--ksvg/impl/libs/libtext2path/src/QtUnicode.cpp4
-rw-r--r--ksvg/impl/svgpathparser.cc6
-rw-r--r--ksvg/impl/svgpathparser.h4
-rw-r--r--ksvg/plugin/backends/agg/AggCanvasFactory.cpp2
-rw-r--r--ksvg/plugin/backends/agg/AggCanvasFactory.h2
-rw-r--r--ksvg/plugin/backends/agg/AggCanvasItems.cpp64
-rw-r--r--ksvg/plugin/backends/agg/AggCanvasItems.h32
-rw-r--r--ksvg/plugin/backends/libart/BezierPathLibart.h4
-rw-r--r--ksvg/plugin/backends/libart/LibartCanvas.cpp22
-rw-r--r--ksvg/plugin/backends/libart/LibartCanvas.h10
-rw-r--r--ksvg/plugin/backends/libart/LibartCanvasFactory.cpp2
-rw-r--r--ksvg/plugin/backends/libart/LibartCanvasFactory.h2
-rw-r--r--ksvg/plugin/backends/libart/LibartCanvasItems.cpp82
-rw-r--r--ksvg/plugin/backends/libart/LibartCanvasItems.h64
-rw-r--r--ksvg/plugin/ksvg_factory.cpp14
-rw-r--r--ksvg/plugin/ksvg_factory.h4
-rw-r--r--ksvg/plugin/ksvg_plugin.cpp78
-rw-r--r--ksvg/plugin/ksvg_plugin.h22
-rw-r--r--ksvg/plugin/ksvg_widget.cpp38
-rw-r--r--ksvg/plugin/ksvg_widget.h28
-rw-r--r--ksvg/plugin/svgcreator.cpp10
-rw-r--r--ksvg/plugin/svgcreator.h4
-rw-r--r--ksvg/test/external/SVGTestWidget.cc34
-rw-r--r--ksvg/test/external/SVGTestWidget.h22
-rw-r--r--ksvg/test/external/printnodetest.cpp4
-rw-r--r--ksvg/test/external/printnodetest.h4
-rw-r--r--kuickshow/src/aboutwidget.cpp34
-rw-r--r--kuickshow/src/aboutwidget.h8
-rw-r--r--kuickshow/src/defaultswidget.cpp80
-rw-r--r--kuickshow/src/defaultswidget.h24
-rw-r--r--kuickshow/src/filecache.cpp14
-rw-r--r--kuickshow/src/filecache.h8
-rw-r--r--kuickshow/src/filefinder.cpp24
-rw-r--r--kuickshow/src/filefinder.h12
-rw-r--r--kuickshow/src/filewidget.cpp74
-rw-r--r--kuickshow/src/filewidget.h24
-rw-r--r--kuickshow/src/generalwidget.cpp52
-rw-r--r--kuickshow/src/generalwidget.h14
-rw-r--r--kuickshow/src/imagewindow.cpp176
-rw-r--r--kuickshow/src/imagewindow.h48
-rw-r--r--kuickshow/src/imlibwidget.cpp54
-rw-r--r--kuickshow/src/imlibwidget.h40
-rw-r--r--kuickshow/src/kuick.cpp2
-rw-r--r--kuickshow/src/kuick.h12
-rw-r--r--kuickshow/src/kuickconfigdlg.cpp10
-rw-r--r--kuickshow/src/kuickconfigdlg.h4
-rw-r--r--kuickshow/src/kuickdata.cpp2
-rw-r--r--kuickshow/src/kuickdata.h8
-rw-r--r--kuickshow/src/kuickfile.cpp28
-rw-r--r--kuickshow/src/kuickfile.h10
-rw-r--r--kuickshow/src/kuickimage.cpp16
-rw-r--r--kuickshow/src/kuickimage.h10
-rw-r--r--kuickshow/src/kuickshow.cpp248
-rw-r--r--kuickshow/src/kuickshow.h30
-rw-r--r--kuickshow/src/kurlwidget.cpp6
-rw-r--r--kuickshow/src/kurlwidget.h2
-rw-r--r--kuickshow/src/main.cpp2
-rw-r--r--kuickshow/src/mainwidget.cpp8
-rw-r--r--kuickshow/src/mainwidget.h10
-rw-r--r--kuickshow/src/printing.cpp98
-rw-r--r--kuickshow/src/printing.h30
-rw-r--r--kuickshow/src/slideshowwidget.cpp14
-rw-r--r--kuickshow/src/slideshowwidget.h8
-rw-r--r--kview/config/kviewconfmodules.cpp28
-rw-r--r--kview/config/kviewconfmodules.h6
-rw-r--r--kview/config/plugins/kviewpluginsconfig.cpp6
-rw-r--r--kview/config/plugins/kviewpluginsconfig.h2
-rw-r--r--kview/kimageviewer/canvas.h68
-rw-r--r--kview/kimageviewer/viewer.cpp2
-rw-r--r--kview/kimageviewer/viewer.h4
-rw-r--r--kview/kview.cpp216
-rw-r--r--kview/kview.h28
-rw-r--r--kview/kviewcanvas/config/confmodules.cpp44
-rw-r--r--kview/kviewcanvas/config/confmodules.h8
-rw-r--r--kview/kviewcanvas/config/defaults.h10
-rw-r--r--kview/kviewcanvas/kimagecanvas.cpp152
-rw-r--r--kview/kviewcanvas/kimagecanvas.h96
-rw-r--r--kview/kviewcanvas/kimageholder.cpp68
-rw-r--r--kview/kviewcanvas/kimageholder.h54
-rw-r--r--kview/kviewcanvas/test/test.cpp8
-rw-r--r--kview/kviewviewer/config/kviewviewerpluginsconfig.cpp8
-rw-r--r--kview/kviewviewer/config/kviewviewerpluginsconfig.h2
-rw-r--r--kview/kviewviewer/imagesettings.cpp18
-rw-r--r--kview/kviewviewer/imagesettings.h14
-rw-r--r--kview/kviewviewer/kviewkonqextension.cpp18
-rw-r--r--kview/kviewviewer/kviewviewer.cpp234
-rw-r--r--kview/kviewviewer/kviewviewer.h38
-rw-r--r--kview/kviewviewer/test/test.cpp2
-rw-r--r--kview/main.cpp2
-rw-r--r--kview/modules/browser/kmyfileitemlist.cpp8
-rw-r--r--kview/modules/browser/kmyfileitemlist.h10
-rw-r--r--kview/modules/browser/kviewbrowser.cpp18
-rw-r--r--kview/modules/browser/kviewbrowser.h2
-rw-r--r--kview/modules/effects/kvieweffects.cpp68
-rw-r--r--kview/modules/effects/kvieweffects.h12
-rw-r--r--kview/modules/presenter/config/kviewpresenterconfig.cpp16
-rw-r--r--kview/modules/presenter/config/kviewpresenterconfig.h6
-rw-r--r--kview/modules/presenter/imagelistitem.cpp16
-rw-r--r--kview/modules/presenter/imagelistitem.h12
-rw-r--r--kview/modules/presenter/kviewpresenter.cpp160
-rw-r--r--kview/modules/presenter/kviewpresenter.h18
-rw-r--r--kview/modules/presenter/kviewpresenterconfmodule.cpp14
-rw-r--r--kview/modules/presenter/kviewpresenterconfmodule.h8
-rw-r--r--kview/modules/scale/kfloatspinbox.cpp20
-rw-r--r--kview/modules/scale/kfloatspinbox.h6
-rw-r--r--kview/modules/scale/kview_scale.cpp94
-rw-r--r--kview/modules/scale/kview_scale.h2
-rw-r--r--kview/modules/scale/scaledlg.cpp98
-rw-r--r--kview/modules/scale/scaledlg.h22
-rw-r--r--kview/modules/scanner/kviewscanner.cpp18
-rw-r--r--kview/modules/scanner/kviewscanner.h4
-rw-r--r--kview/modules/template/kviewtemplate.cpp8
-rw-r--r--kview/modules/template/kviewtemplate.h2
-rw-r--r--kview/photobook/photobook.cpp52
-rw-r--r--kview/photobook/photobook.h14
-rw-r--r--kviewshell/bookmark.h14
-rw-r--r--kviewshell/documentPageCache.cpp36
-rw-r--r--kviewshell/documentPageCache.h24
-rw-r--r--kviewshell/documentRenderer.cpp28
-rw-r--r--kviewshell/documentRenderer.h42
-rw-r--r--kviewshell/documentWidget.cpp130
-rw-r--r--kviewshell/documentWidget.h48
-rw-r--r--kviewshell/emptyRenderer.cpp2
-rw-r--r--kviewshell/emptyRenderer.h4
-rw-r--r--kviewshell/empty_multipage.cpp4
-rw-r--r--kviewshell/empty_multipage.h6
-rw-r--r--kviewshell/history.cpp2
-rw-r--r--kviewshell/history.h8
-rw-r--r--kviewshell/hyperlink.h10
-rw-r--r--kviewshell/kmultipage.cpp196
-rw-r--r--kviewshell/kmultipage.h48
-rw-r--r--kviewshell/kmultipageInterface.h6
-rw-r--r--kviewshell/kprintDialogPage_pageoptions.cpp56
-rw-r--r--kviewshell/kprintDialogPage_pageoptions.h22
-rw-r--r--kviewshell/kviewpart.cpp374
-rw-r--r--kviewshell/kviewpart.h40
-rw-r--r--kviewshell/kviewpart_iface.h10
-rw-r--r--kviewshell/kviewshell.cpp70
-rw-r--r--kviewshell/kviewshell.h20
-rw-r--r--kviewshell/main.cpp24
-rw-r--r--kviewshell/marklist.cpp94
-rw-r--r--kviewshell/marklist.h42
-rw-r--r--kviewshell/pageNumber.h2
-rw-r--r--kviewshell/pageSize.cpp36
-rw-r--r--kviewshell/pageSize.h38
-rw-r--r--kviewshell/pageSizeDialog.cpp16
-rw-r--r--kviewshell/pageSizeDialog.h4
-rw-r--r--kviewshell/pageSizeWidget.cpp36
-rw-r--r--kviewshell/pageSizeWidget.h12
-rw-r--r--kviewshell/pageView.cpp88
-rw-r--r--kviewshell/pageView.h42
-rw-r--r--kviewshell/plugins/djvu/djvumultipage.cpp48
-rw-r--r--kviewshell/plugins/djvu/djvumultipage.h8
-rw-r--r--kviewshell/plugins/djvu/djvurenderer.cpp76
-rw-r--r--kviewshell/plugins/djvu/djvurenderer.h14
-rw-r--r--kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions.cpp24
-rw-r--r--kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions.h10
-rw-r--r--kviewshell/plugins/djvu/kprintDialogPage_DJVUpageoptions.cpp36
-rw-r--r--kviewshell/plugins/djvu/kprintDialogPage_DJVUpageoptions.h18
-rw-r--r--kviewshell/plugins/djvu/pageRangeWidget.cpp6
-rw-r--r--kviewshell/plugins/djvu/pageRangeWidget.h2
-rw-r--r--kviewshell/renderedDocumentPage.cpp36
-rw-r--r--kviewshell/renderedDocumentPage.h60
-rw-r--r--kviewshell/renderedDocumentPagePixmap.cpp18
-rw-r--r--kviewshell/renderedDocumentPagePixmap.h24
-rw-r--r--kviewshell/renderedDocumentPagePrinter.cpp14
-rw-r--r--kviewshell/renderedDocumentPagePrinter.h14
-rw-r--r--kviewshell/searchWidget.cpp50
-rw-r--r--kviewshell/searchWidget.h30
-rw-r--r--kviewshell/selection.cpp20
-rw-r--r--kviewshell/selection.h10
-rw-r--r--kviewshell/simplePageSize.cpp6
-rw-r--r--kviewshell/simplePageSize.h14
-rw-r--r--kviewshell/sizePreview.cpp16
-rw-r--r--kviewshell/sizePreview.h12
-rw-r--r--kviewshell/tableOfContents.cpp20
-rw-r--r--kviewshell/tableOfContents.h10
-rw-r--r--kviewshell/textBox.h10
-rw-r--r--kviewshell/units.cpp6
-rw-r--r--kviewshell/units.h4
-rw-r--r--kviewshell/zoom.cpp24
-rw-r--r--kviewshell/zoom.h16
-rw-r--r--libkscan/devselector.cpp70
-rw-r--r--libkscan/devselector.h28
-rw-r--r--libkscan/dispgamma.cpp22
-rw-r--r--libkscan/dispgamma.h24
-rw-r--r--libkscan/gammadialog.cpp32
-rw-r--r--libkscan/gammadialog.h10
-rw-r--r--libkscan/img_canvas.cpp164
-rw-r--r--libkscan/img_canvas.h80
-rw-r--r--libkscan/imgscaledialog.cpp48
-rw-r--r--libkscan/imgscaledialog.h8
-rw-r--r--libkscan/imgscaninfo.cpp8
-rw-r--r--libkscan/imgscaninfo.h14
-rw-r--r--libkscan/kgammatable.cpp2
-rw-r--r--libkscan/kgammatable.h8
-rw-r--r--libkscan/kscandevice.cpp174
-rw-r--r--libkscan/kscandevice.h104
-rw-r--r--libkscan/kscanoption.cpp126
-rw-r--r--libkscan/kscanoption.h50
-rw-r--r--libkscan/kscanoptset.cpp54
-rw-r--r--libkscan/kscanoptset.h36
-rw-r--r--libkscan/kscanslider.cpp116
-rw-r--r--libkscan/kscanslider.h60
-rw-r--r--libkscan/massscandialog.cpp58
-rw-r--r--libkscan/massscandialog.h24
-rw-r--r--libkscan/previewer.cpp212
-rw-r--r--libkscan/previewer.h58
-rw-r--r--libkscan/scandialog.cpp108
-rw-r--r--libkscan/scandialog.h22
-rw-r--r--libkscan/scanparams.cpp234
-rw-r--r--libkscan/scanparams.h40
-rw-r--r--libkscan/scansourcedialog.cpp50
-rw-r--r--libkscan/scansourcedialog.h22
-rw-r--r--libkscan/sizeindicator.cpp26
-rw-r--r--libkscan/sizeindicator.h8
1333 files changed, 24530 insertions, 24530 deletions
diff --git a/kamera/kcontrol/kamera.cpp b/kamera/kcontrol/kamera.cpp
index 0fdc416a..97338181 100644
--- a/kamera/kcontrol/kamera.cpp
+++ b/kamera/kcontrol/kamera.cpp
@@ -20,8 +20,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kgenericfactory.h>
#include <ksimpleconfig.h>
@@ -41,14 +41,14 @@
#include "kamera.h"
#include "kamera.moc"
-typedef KGenericFactory<KKameraConfig, QWidget> KKameraConfigFactory;
+typedef KGenericFactory<KKameraConfig, TQWidget> KKameraConfigFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kamera, KKameraConfigFactory( "kcmkamera" ) )
// --------------- Camera control center module widget ---
KKameraConfig *KKameraConfig::m_instance = NULL;
-KKameraConfig::KKameraConfig(QWidget *parent, const char *name, const QStringList &)
+KKameraConfig::KKameraConfig(TQWidget *parent, const char *name, const TQStringList &)
: KCModule(KKameraConfigFactory::instance(), parent, name)
{
m_devicePopup = new KPopupMenu(this);
@@ -88,7 +88,7 @@ void KKameraConfig::defaults()
void KKameraConfig::displayGPFailureDialogue(void)
{
- new QLabel(i18n("Unable to initialize the gPhoto2 libraries."), this);
+ new TQLabel(i18n("Unable to initialize the gPhoto2 libraries."), this);
}
void KKameraConfig::displayGPSuccessDialogue(void)
@@ -97,7 +97,7 @@ void KKameraConfig::displayGPSuccessDialogue(void)
setButtons(Help | Apply | Cancel | Ok);
// create a layout with two vertical boxes
- QVBoxLayout *topLayout = new QVBoxLayout(this, 0, 0);
+ TQVBoxLayout *topLayout = new TQVBoxLayout(this, 0, 0);
topLayout->setAutoAdd(true);
m_toolbar = new KToolBar(this, "ToolBar");
@@ -106,36 +106,36 @@ void KKameraConfig::displayGPSuccessDialogue(void)
// create list of devices
m_deviceSel = new KIconView(this);
- connect(m_deviceSel, SIGNAL(rightButtonClicked(QIconViewItem *, const QPoint &)),
- SLOT(slot_deviceMenu(QIconViewItem *, const QPoint &)));
- connect(m_deviceSel, SIGNAL(doubleClicked(QIconViewItem *)),
- SLOT(slot_configureCamera()));
- connect(m_deviceSel, SIGNAL(selectionChanged(QIconViewItem *)),
- SLOT(slot_deviceSelected(QIconViewItem *)));
+ connect(m_deviceSel, TQT_SIGNAL(rightButtonClicked(TQIconViewItem *, const TQPoint &)),
+ TQT_SLOT(slot_deviceMenu(TQIconViewItem *, const TQPoint &)));
+ connect(m_deviceSel, TQT_SIGNAL(doubleClicked(TQIconViewItem *)),
+ TQT_SLOT(slot_configureCamera()));
+ connect(m_deviceSel, TQT_SIGNAL(selectionChanged(TQIconViewItem *)),
+ TQT_SLOT(slot_deviceSelected(TQIconViewItem *)));
- m_deviceSel->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
+ m_deviceSel->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding));
// create actions
KAction *act;
- act = new KAction(i18n("Add"), "camera", 0, this, SLOT(slot_addCamera()), m_actions, "camera_add");
+ act = new KAction(i18n("Add"), "camera", 0, 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, SLOT(slot_testCamera()), m_actions, "camera_test");
+ act = new KAction(i18n("Test"), "camera_test", 0, 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, SLOT(slot_removeCamera()), m_actions, "camera_remove");
+ act = new KAction(i18n("Remove"), "edittrash", 0, 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, SLOT(slot_configureCamera()), m_actions, "camera_configure");
+ act = new KAction(i18n("Configure..."), "configure", 0, this, TQT_SLOT(slot_configureCamera()), m_actions, "camera_configure");
act->setWhatsThis(i18n("Click this button to change the configuration of the selected camera.<br><br>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, SLOT(slot_cameraSummary()), m_actions, "camera_summary");
+ act = new KAction(i18n("Information"), "hwinfo", 0, 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.<br><br>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, SLOT(slot_cancelOperation()), m_actions, "camera_cancel");
+ act = new KAction(i18n("Cancel"), "stop", 0, 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);
@@ -147,7 +147,7 @@ void KKameraConfig::populateDeviceListView(void)
CameraDevicesMap::Iterator it;
for (it = m_devices.begin(); it != m_devices.end(); it++) {
if (it.data()) {
- new QIconViewItem(m_deviceSel, it.key(), DesktopIcon("camera"));
+ new TQIconViewItem(m_deviceSel, it.key(), DesktopIcon("camera"));
}
}
slot_deviceSelected(m_deviceSel->currentItem());
@@ -172,8 +172,8 @@ void KKameraConfig::load(void)
void KKameraConfig::load(bool useDefaults )
{
m_config->setReadDefaults( useDefaults );
- QStringList groupList = m_config->groupList();
- QStringList::Iterator it;
+ TQStringList groupList = m_config->groupList();
+ TQStringList::Iterator it;
int i, count;
CameraList *list;
CameraAbilitiesList *al;
@@ -188,8 +188,8 @@ void KKameraConfig::load(bool useDefaults )
continue;
kcamera = new KCamera(*it,m_config->readEntry("Path"));
- connect(kcamera, SIGNAL(error(const QString &)), SLOT(slot_error(const QString &)));
- connect(kcamera, SIGNAL(error(const QString &, const QString &)), SLOT(slot_error(const QString &, const QString &)));
+ connect(kcamera, TQT_SIGNAL(error(const TQString &)), TQT_SLOT(slot_error(const TQString &)));
+ connect(kcamera, TQT_SIGNAL(error(const TQString &, const TQString &)), TQT_SLOT(slot_error(const TQString &, const TQString &)));
kcamera->load(m_config);
m_devices[*it] = kcamera;
}
@@ -208,7 +208,7 @@ void KKameraConfig::load(bool useDefaults )
count = gp_list_count (list);
- QMap<QString,QString> ports, names;
+ TQMap<TQString,TQString> ports, names;
for (i = 0 ; i<count ; i++) {
gp_list_get_name (list, i, &model);
@@ -221,14 +221,14 @@ void KKameraConfig::load(bool useDefaults )
if (ports.contains("usb:") && names[ports["usb:"]]!="usb:")
ports.remove("usb:");
- QMap<QString,QString>::iterator portit;
+ TQMap<TQString,TQString>::iterator portit;
for (portit = ports.begin() ; portit != ports.end(); portit++) {
/* kdDebug() << "Adding USB camera: " << portit.data() << " at " << portit.key() << endl; */
kcamera = new KCamera(portit.data(),portit.key());
- connect(kcamera, SIGNAL(error(const QString &)), SLOT(slot_error(const QString &)));
- connect(kcamera, SIGNAL(error(const QString &, const QString &)), SLOT(slot_error(const QString &, const QString &)));
+ connect(kcamera, TQT_SIGNAL(error(const TQString &)), TQT_SLOT(slot_error(const TQString &)));
+ connect(kcamera, TQT_SIGNAL(error(const TQString &, const TQString &)), TQT_SLOT(slot_error(const TQString &, const TQString &)));
m_devices[portit.data()] = kcamera;
}
populateDeviceListView();
@@ -265,9 +265,9 @@ void KKameraConfig::afterCameraOperation(void)
slot_deviceSelected(m_deviceSel->currentItem());
}
-QString KKameraConfig::suggestName(const QString &name)
+TQString KKameraConfig::suggestName(const TQString &name)
{
- QString new_name = name;
+ TQString new_name = name;
new_name.replace("/", ""); // we cannot have a slash in a URI's host
if (!m_devices.contains(new_name)) return new_name;
@@ -275,20 +275,20 @@ QString KKameraConfig::suggestName(const QString &name)
// try new names with a number appended until we find a free one
int i = 1;
while (i++ < 0xffff) {
- new_name = name + " (" + QString::number(i) + ")";
+ new_name = name + " (" + TQString::number(i) + ")";
if (!m_devices.contains(new_name)) return new_name;
}
- return QString::null;
+ return TQString::null;
}
void KKameraConfig::slot_addCamera()
{
- KCamera *m_device = new KCamera(QString::null,QString::null);
- connect(m_device, SIGNAL(error(const QString &)), SLOT(slot_error(const QString &)));
- connect(m_device, SIGNAL(error(const QString &, const QString &)), SLOT(slot_error(const QString &, const QString &)));
+ KCamera *m_device = new KCamera(TQString::null,TQString::null);
+ 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);
- if (dialog.exec() == QDialog::Accepted) {
+ if (dialog.exec() == TQDialog::Accepted) {
dialog.save();
m_device->setName(suggestName(m_device->model()));
m_devices.insert(m_device->name(), m_device);
@@ -301,7 +301,7 @@ void KKameraConfig::slot_addCamera()
void KKameraConfig::slot_removeCamera()
{
- QString name = m_deviceSel->currentItem()->text();
+ TQString name = m_deviceSel->currentItem()->text();
if (m_devices.contains(name)) {
KCamera *m_device = m_devices[name];
m_devices.remove(name);
@@ -316,7 +316,7 @@ void KKameraConfig::slot_testCamera()
{
beforeCameraOperation();
- QString name = m_deviceSel->currentItem()->text();
+ TQString name = m_deviceSel->currentItem()->text();
if (m_devices.contains(name)) {
KCamera *m_device = m_devices[name];
if (m_device->test())
@@ -328,7 +328,7 @@ void KKameraConfig::slot_testCamera()
void KKameraConfig::slot_configureCamera()
{
- QString name = m_deviceSel->currentItem()->text();
+ TQString name = m_deviceSel->currentItem()->text();
if (m_devices.contains(name)) {
KCamera *m_device = m_devices[name];
m_device->configure();
@@ -337,8 +337,8 @@ void KKameraConfig::slot_configureCamera()
void KKameraConfig::slot_cameraSummary()
{
- QString summary;
- QString name = m_deviceSel->currentItem()->text();
+ TQString summary;
+ TQString name = m_deviceSel->currentItem()->text();
if (m_devices.contains(name)) {
KCamera *m_device = m_devices[name];
summary = m_device->summary();
@@ -357,7 +357,7 @@ void KKameraConfig::slot_cancelOperation()
qApp->setOverrideCursor(Qt::WaitCursor);
}
-void KKameraConfig::slot_deviceMenu(QIconViewItem *item, const QPoint &point)
+void KKameraConfig::slot_deviceMenu(TQIconViewItem *item, const TQPoint &point)
{
if (item) {
m_devicePopup->clear();
@@ -369,7 +369,7 @@ void KKameraConfig::slot_deviceMenu(QIconViewItem *item, const QPoint &point)
}
}
-void KKameraConfig::slot_deviceSelected(QIconViewItem *item)
+void KKameraConfig::slot_deviceSelected(TQIconViewItem *item)
{
m_actions->action("camera_test")->setEnabled(item);
m_actions->action("camera_remove")->setEnabled(item);
@@ -399,7 +399,7 @@ GPContextFeedback KKameraConfig::cbGPCancel(GPContext * /*context*/, void *data)
return GP_CONTEXT_FEEDBACK_OK;
}
-QString KKameraConfig::quickHelp() const
+TQString KKameraConfig::quickHelp() const
{
return i18n("<h1>Digital Camera</h1>\n"
"This module allows you to configure support for your digital camera.\n"
@@ -411,12 +411,12 @@ QString KKameraConfig::quickHelp() const
"<a href=\"camera:/\">camera:/</a> in Konqueror and other KDE applications.");
}
-void KKameraConfig::slot_error(const QString &message)
+void KKameraConfig::slot_error(const TQString &message)
{
KMessageBox::error(this, message);
}
-void KKameraConfig::slot_error(const QString &message, const QString &details)
+void KKameraConfig::slot_error(const TQString &message, const TQString &details)
{
KMessageBox::detailedError(this, message, details);
}
diff --git a/kamera/kcontrol/kamera.h b/kamera/kcontrol/kamera.h
index 35f93bc0..6e66d642 100644
--- a/kamera/kcontrol/kamera.h
+++ b/kamera/kcontrol/kamera.h
@@ -26,15 +26,15 @@
#include <kcmodule.h>
#include <gphoto2.h>
-class QWidget;
-class QRadioButton;
-class QPushButton;
-class QComboBox;
-class QVButtonGroup;
-class QLineEdit;
-class QWidgetStack;
-class QCheckBox;
-class QIconViewItem;
+class TQWidget;
+class TQRadioButton;
+class TQPushButton;
+class TQComboBox;
+class TQVButtonGroup;
+class TQLineEdit;
+class TQWidgetStack;
+class TQCheckBox;
+class TQIconViewItem;
class KCamera;
class KameraDeviceSelectDialog;
@@ -50,7 +50,7 @@ class KKameraConfig : public KCModule
friend class KameraDeviceSelectDialog;
public:
- KKameraConfig(QWidget *parent, const char *name, const QStringList &);
+ KKameraConfig(TQWidget *parent, const char *name, const TQStringList &);
virtual ~KKameraConfig();
// KCModule interface methods
@@ -59,22 +59,22 @@ public:
void save();
void defaults();
int buttons();
- QString quickHelp() const;
+ TQString quickHelp() const;
protected:
- QString suggestName(const QString &name);
+ TQString suggestName(const TQString &name);
protected slots:
- void slot_deviceMenu(QIconViewItem *item, const QPoint &point);
- void slot_deviceSelected(QIconViewItem *item);
+ void slot_deviceMenu(TQIconViewItem *item, const TQPoint &point);
+ void slot_deviceSelected(TQIconViewItem *item);
void slot_addCamera();
void slot_removeCamera();
void slot_configureCamera();
void slot_cameraSummary();
void slot_testCamera();
void slot_cancelOperation();
- void slot_error(const QString &message);
- void slot_error(const QString &message, const QString &details);
+ void slot_error(const TQString &message);
+ void slot_error(const TQString &message, const TQString &details);
private:
void displayGPFailureDialogue(void);
@@ -89,7 +89,7 @@ private:
static GPContextFeedback cbGPCancel(GPContext *context, void *data);
private:
- typedef QMap<QString, KCamera *> CameraDevicesMap;
+ typedef TQMap<TQString, KCamera *> CameraDevicesMap;
KSimpleConfig *m_config;
CameraDevicesMap m_devices;
@@ -101,7 +101,7 @@ private:
// widgets for the cameras listview
KIconView *m_deviceSel;
KActionCollection *m_actions;
- QPushButton *m_addCamera, *m_removeCamera, *m_testCamera, *m_configureCamera;
+ TQPushButton *m_addCamera, *m_removeCamera, *m_testCamera, *m_configureCamera;
KToolBar *m_toolbar;
KPopupMenu *m_devicePopup;
diff --git a/kamera/kcontrol/kameraconfigdialog.cpp b/kamera/kcontrol/kameraconfigdialog.cpp
index 5af0b33d..124ea991 100644
--- a/kamera/kcontrol/kameraconfigdialog.cpp
+++ b/kamera/kcontrol/kameraconfigdialog.cpp
@@ -20,20 +20,20 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qgrid.h>
-#include <qlabel.h>
-#include <qvgroupbox.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qslider.h>
-#include <qvbuttongroup.h>
-#include <qhbuttongroup.h>
-#include <qvbox.h>
-#include <qtabwidget.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqgrid.h>
+#include <tqlabel.h>
+#include <tqvgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqslider.h>
+#include <tqvbuttongroup.h>
+#include <tqhbuttongroup.h>
+#include <tqvbox.h>
+#include <tqtabwidget.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
@@ -42,13 +42,13 @@
KameraConfigDialog::KameraConfigDialog(Camera */*camera*/,
CameraWidget *widget,
- QWidget *parent,
+ TQWidget *parent,
const char *name) :
-KDialogBase(parent, name, true, QString::null, Ok|Cancel, Ok ),
+KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok ),
m_widgetRoot(widget)
{
- QFrame *main = makeMainWidget();
- QVBoxLayout *topLayout = new QVBoxLayout(main, 0, spacingHint());
+ TQFrame *main = makeMainWidget();
+ TQVBoxLayout *topLayout = new TQVBoxLayout(main, 0, spacingHint());
topLayout->setAutoAdd(true);
m_tabWidget = 0;
@@ -56,9 +56,9 @@ m_widgetRoot(widget)
appendWidget(main, widget);
}
-void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
+void KameraConfigDialog::appendWidget(TQWidget *parent, CameraWidget *widget)
{
- QWidget *newParent = parent;
+ TQWidget *newParent = parent;
CameraWidgetType widget_type;
const char *widget_name;
@@ -72,7 +72,7 @@ void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
gp_widget_get_info(widget, &widget_info);
gp_widget_get_name(widget, &widget_name);
- QString whats_this = QString::fromLocal8Bit(widget_info); // gphoto2 doesn't seem to have any standard for i18n
+ TQString whats_this = TQString::fromLocal8Bit(widget_info); // gphoto2 doesn't seem to have any standard for i18n
// Add this widget to parent
switch(widget_type) {
@@ -85,13 +85,13 @@ void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
case GP_WIDGET_SECTION:
{
if (!m_tabWidget)
- m_tabWidget = new QTabWidget(parent);
- QWidget *tab = new QWidget(m_tabWidget);
+ m_tabWidget = new TQTabWidget(parent);
+ TQWidget *tab = new TQWidget(m_tabWidget);
// widgets are to be aligned vertically in the tab
- QVBoxLayout *tabLayout = new QVBoxLayout(tab, marginHint(),
+ TQVBoxLayout *tabLayout = new TQVBoxLayout(tab, marginHint(),
spacingHint());
m_tabWidget->insertTab(tab, widget_label);
- QVBox *tabContainer = new QVBox(tab);
+ TQVBox *tabContainer = new TQVBox(tab);
tabContainer->setSpacing(spacingHint());
tabLayout->addWidget(tabContainer);
newParent = tabContainer;
@@ -104,14 +104,14 @@ void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
{
gp_widget_get_value(widget, &widget_value_string);
- QGrid *grid = new QGrid(2, Horizontal, parent);
+ TQGrid *grid = new TQGrid(2, Horizontal, parent);
grid->setSpacing(spacingHint());
- new QLabel(QString::fromLocal8Bit( widget_label )+":", grid);
- QLineEdit *lineEdit = new QLineEdit(widget_value_string, grid);
+ new TQLabel(TQString::fromLocal8Bit( widget_label )+":", grid);
+ TQLineEdit *lineEdit = new TQLineEdit(widget_value_string, grid);
m_wmap.insert(widget, lineEdit);
if (!whats_this.isEmpty())
- QWhatsThis::add(grid, whats_this);
+ TQWhatsThis::add(grid, whats_this);
break;
}
@@ -123,18 +123,18 @@ void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
gp_widget_get_range(widget, &widget_low, &widget_high, &widget_increment);
gp_widget_get_value(widget, &widget_value_float);
- QGroupBox *groupBox = new QVGroupBox(widget_label, parent);
- QSlider *slider = new QSlider(
+ TQGroupBox *groupBox = new TQVGroupBox(widget_label, parent);
+ TQSlider *slider = new TQSlider(
( int )widget_low,
( int )widget_high,
( int )widget_increment,
( int )widget_value_float,
- QSlider::Horizontal,
+ TQSlider::Horizontal,
groupBox );
m_wmap.insert(widget, slider);
if (!whats_this.isEmpty())
- QWhatsThis::add(groupBox, whats_this);
+ TQWhatsThis::add(groupBox, whats_this);
break;
}
@@ -142,12 +142,12 @@ void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
{
gp_widget_get_value(widget, &widget_value_int);
- QCheckBox *checkBox = new QCheckBox(widget_label, parent);
+ TQCheckBox *checkBox = new TQCheckBox(widget_label, parent);
checkBox->setChecked(widget_value_int);
m_wmap.insert(widget, checkBox);
if (!whats_this.isEmpty())
- QWhatsThis::add(checkBox, whats_this);
+ TQWhatsThis::add(checkBox, whats_this);
break;
}
@@ -158,24 +158,24 @@ void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
int count = gp_widget_count_choices(widget);
// for less than 5 options, align them horizontally
- QButtonGroup *buttonGroup;
+ TQButtonGroup *buttonGroup;
if (count > 4)
- buttonGroup = new QVButtonGroup(widget_label, parent);
+ buttonGroup = new TQVButtonGroup(widget_label, parent);
else
- buttonGroup = new QHButtonGroup(widget_label, parent);
+ buttonGroup = new TQHButtonGroup(widget_label, parent);
for(int i = 0; i < count; ++i) {
const char *widget_choice;
gp_widget_get_choice(widget, i, &widget_choice);
- new QRadioButton(widget_choice, buttonGroup);
+ new TQRadioButton(widget_choice, buttonGroup);
if(!strcmp(widget_value_string, widget_choice))
buttonGroup->setButton(i);
}
m_wmap.insert(widget, buttonGroup);
if (!whats_this.isEmpty())
- QWhatsThis::add(buttonGroup, whats_this);
+ TQWhatsThis::add(buttonGroup, whats_this);
break;
}
@@ -183,7 +183,7 @@ void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
{
gp_widget_get_value(widget, &widget_value_string);
- QComboBox *comboBox = new QComboBox(FALSE, parent);
+ TQComboBox *comboBox = new TQComboBox(FALSE, parent);
comboBox->clear();
for(int i = 0; i < gp_widget_count_choices(widget); ++i) {
const char *widget_choice;
@@ -196,7 +196,7 @@ void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
m_wmap.insert(widget, comboBox);
if (!whats_this.isEmpty())
- QWhatsThis::add(comboBox, whats_this);
+ TQWhatsThis::add(comboBox, whats_this);
break;
}
@@ -206,14 +206,14 @@ void KameraConfigDialog::appendWidget(QWidget *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 QLabel(i18n("Button (not supported by KControl)"), parent);
+ new TQLabel(i18n("Button (not supported by KControl)"), parent);
break;
}
case GP_WIDGET_DATE:
{
// TODO
- new QLabel(i18n("Date (not supported by KControl)"), parent);
+ new TQLabel(i18n("Date (not supported by KControl)"), parent);
break;
}
@@ -233,7 +233,7 @@ void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget)
switch (widget_type) {
case GP_WIDGET_SECTION:
{
- tabLayout->addItem( new QSpacerItem(0, 0, QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding) );
+ tabLayout->addItem( new TQSpacerItem(0, 0, TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding) );
break;
}
}
@@ -254,14 +254,14 @@ void KameraConfigDialog::updateWidgetValue(CameraWidget *widget)
break;
case GP_WIDGET_TEXT:
{
- QLineEdit *lineEdit = static_cast<QLineEdit *>(m_wmap[widget]);
+ TQLineEdit *lineEdit = static_cast<TQLineEdit *>(m_wmap[widget]);
gp_widget_set_value(widget, (void *)lineEdit->text().local8Bit().data());
break;
}
case GP_WIDGET_RANGE:
{
- QSlider *slider = static_cast<QSlider *>(m_wmap[widget]);
+ TQSlider *slider = static_cast<TQSlider *>(m_wmap[widget]);
float value_float = slider->value();
gp_widget_set_value(widget, (void *)&value_float);
@@ -269,7 +269,7 @@ void KameraConfigDialog::updateWidgetValue(CameraWidget *widget)
}
case GP_WIDGET_TOGGLE:
{
- QCheckBox *checkBox = static_cast<QCheckBox *>(m_wmap[widget]);
+ TQCheckBox *checkBox = static_cast<TQCheckBox *>(m_wmap[widget]);
int value_int = checkBox->isChecked() ? 1 : 0;
gp_widget_set_value(widget, (void *)&value_int);
@@ -277,14 +277,14 @@ void KameraConfigDialog::updateWidgetValue(CameraWidget *widget)
}
case GP_WIDGET_RADIO:
{
- QButtonGroup *buttonGroup = static_cast<QVButtonGroup *>(m_wmap[widget]);
+ TQButtonGroup *buttonGroup = static_cast<TQVButtonGroup *>(m_wmap[widget]);
gp_widget_set_value(widget, (void *)buttonGroup->selected()->text().local8Bit().data());
break;
}
case GP_WIDGET_MENU:
{
- QComboBox *comboBox = static_cast<QComboBox *>(m_wmap[widget]);
+ TQComboBox *comboBox = static_cast<TQComboBox *>(m_wmap[widget]);
gp_widget_set_value(widget, (void *)comboBox->currentText().local8Bit().data());
break;
diff --git a/kamera/kcontrol/kameraconfigdialog.h b/kamera/kcontrol/kameraconfigdialog.h
index 73b2a012..575f4aad 100644
--- a/kamera/kcontrol/kameraconfigdialog.h
+++ b/kamera/kcontrol/kameraconfigdialog.h
@@ -23,9 +23,9 @@
#ifndef __kameraconfigdialog_h__
#define __kameraconfigdialog_h__
-#include <qmap.h>
+#include <tqmap.h>
#include <kdialogbase.h>
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
extern "C" {
#include <gphoto2.h>
@@ -36,18 +36,18 @@ class KameraConfigDialog : public KDialogBase
Q_OBJECT
public:
KameraConfigDialog(Camera *camera, CameraWidget *widget,
- QWidget *parent = 0, const char *name = 0);
+ TQWidget *parent = 0, const char *name = 0);
private slots:
void slotOk();
private:
- void appendWidget(QWidget *parent, CameraWidget *widget);
+ void appendWidget(TQWidget *parent, CameraWidget *widget);
void updateWidgetValue(CameraWidget *widget);
- QMap<CameraWidget *, QWidget *> m_wmap;
+ TQMap<CameraWidget *, TQWidget *> m_wmap;
CameraWidget *m_widgetRoot;
- QTabWidget *m_tabWidget;
+ TQTabWidget *m_tabWidget;
};
#endif
diff --git a/kamera/kcontrol/kameradevice.cpp b/kamera/kcontrol/kameradevice.cpp
index 010bf694..9492934b 100644
--- a/kamera/kcontrol/kameradevice.cpp
+++ b/kamera/kcontrol/kameradevice.cpp
@@ -20,16 +20,16 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qvbuttongroup.h>
-#include <qvgroupbox.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qradiobutton.h>
-#include <qwhatsthis.h>
-#include <qlabel.h>
-#include <qgrid.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqvbuttongroup.h>
+#include <tqvgroupbox.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqradiobutton.h>
+#include <tqwhatsthis.h>
+#include <tqlabel.h>
+#include <tqgrid.h>
#include <klocale.h>
#include <kconfig.h>
@@ -54,7 +54,7 @@ static const int INDEX_SERIAL = 1;
static const int INDEX_USB= 3;
static GPContext *glob_context = 0;
-KCamera::KCamera(const QString &name, const QString &path)
+KCamera::KCamera(const TQString &name, const TQString &path)
{
m_name = name;
m_model = name;
@@ -143,7 +143,7 @@ Camera* KCamera::camera()
return m_camera;
}
-QString KCamera::summary()
+TQString KCamera::summary()
{
int result;
CameraText summary;
@@ -153,7 +153,7 @@ QString KCamera::summary()
result = gp_camera_get_summary(m_camera, &summary, glob_context);
if (result != GP_OK)
return i18n("No camera summary information is available.\n");
- return QString(summary.text);
+ return TQString(summary.text);
}
bool KCamera::configure()
@@ -207,27 +207,27 @@ void KCamera::save(KConfig *config)
config->writeEntry("Path", m_path);
}
-QString KCamera::portName()
+TQString KCamera::portName()
{
- QString port = m_path.left(m_path.find(":")).lower();
+ TQString port = m_path.left(m_path.find(":")).lower();
if (port == "serial") return i18n("Serial");
if (port == "usb") return i18n("USB");
return i18n("Unknown port");
}
-void KCamera::setName(const QString &name)
+void KCamera::setName(const TQString &name)
{
m_name = name;
}
-void KCamera::setModel(const QString &model)
+void KCamera::setModel(const TQString &model)
{
m_model = model;
invalidateCamera();
initInformation();
}
-void KCamera::setPath(const QString &path)
+void KCamera::setPath(const TQString &path)
{
m_path = path;
invalidateCamera();
@@ -252,10 +252,10 @@ bool KCamera::isConfigurable()
return m_abilities.operations & GP_OPERATION_CONFIG;
}
-QStringList KCamera::supportedPorts()
+TQStringList KCamera::supportedPorts()
{
initInformation();
- QStringList ports;
+ TQStringList ports;
if (m_abilities.port & GP_PORT_SERIAL)
ports.append("serial");
if (m_abilities.port & GP_PORT_USB)
@@ -270,70 +270,70 @@ CameraAbilities KCamera::abilities()
// ---------- KameraSelectCamera ------------
-KameraDeviceSelectDialog::KameraDeviceSelectDialog(QWidget *parent, KCamera *device)
+KameraDeviceSelectDialog::KameraDeviceSelectDialog(TQWidget *parent, KCamera *device)
: KDialogBase(parent, "kkameradeviceselect", true, i18n("Select Camera Device"), Ok | Cancel, Ok, true)
{
m_device = device;
- connect(m_device, SIGNAL(error(const QString &)),
- SLOT(slot_error(const QString &)));
- connect(m_device, SIGNAL(error(const QString &, const QString &)),
- SLOT(slot_error(const QString &, const QString &)));
+ 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 &)));
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
// a layout with vertical boxes
- QHBoxLayout *topLayout = new QHBoxLayout(page, 0, KDialog::spacingHint());
+ TQHBoxLayout *topLayout = new TQHBoxLayout(page, 0, KDialog::spacingHint());
// the models list
m_modelSel = new KListView(page);
topLayout->addWidget( m_modelSel );
m_modelSel->addColumn(i18n("Supported Cameras"));
- m_modelSel->setColumnWidthMode(0, QListView::Maximum);
- connect(m_modelSel, SIGNAL(selectionChanged(QListViewItem *)),
- SLOT(slot_setModel(QListViewItem *)));
+ m_modelSel->setColumnWidthMode(0, TQListView::Maximum);
+ 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(QSizePolicy(QSizePolicy::Maximum,
- QSizePolicy::Preferred));
+ m_modelSel->setSizePolicy(TQSizePolicy(TQSizePolicy::Maximum,
+ TQSizePolicy::Preferred));
- QVBoxLayout *rightLayout = new QVBoxLayout(0L, 0, KDialog::spacingHint());
+ TQVBoxLayout *rightLayout = new TQVBoxLayout(0L, 0, KDialog::spacingHint());
topLayout->addLayout( rightLayout );
- m_portSelectGroup = new QVButtonGroup(i18n("Port"), page);
+ m_portSelectGroup = new TQVButtonGroup(i18n("Port"), page);
rightLayout->addWidget(m_portSelectGroup);
- m_portSettingsGroup = new QVGroupBox(i18n("Port Settings"), page);
+ m_portSettingsGroup = new TQVGroupBox(i18n("Port Settings"), page);
rightLayout->addWidget(m_portSettingsGroup);
// Create port type selection radiobuttons.
- m_serialRB = new QRadioButton(i18n("Serial"), m_portSelectGroup);
+ m_serialRB = new TQRadioButton(i18n("Serial"), m_portSelectGroup);
m_portSelectGroup->insert(m_serialRB, INDEX_SERIAL);
- QWhatsThis::add(m_serialRB, i18n("If this option is checked, the camera would have to be connected one of the serial ports (known as COM in Microsoft Windows) in your computer."));
- m_USBRB = new QRadioButton(i18n("USB"), m_portSelectGroup);
+ TQWhatsThis::add(m_serialRB, i18n("If this option is checked, the camera would have to be connected one of the serial ports (known as COM in Microsoft Windows) in your computer."));
+ m_USBRB = new TQRadioButton(i18n("USB"), m_portSelectGroup);
m_portSelectGroup->insert(m_USBRB, INDEX_USB);
- QWhatsThis::add(m_USBRB, i18n("If this option is checked, the camera would have to be connected to one of the USB slots in your computer or USB hub."));
+ TQWhatsThis::add(m_USBRB, i18n("If this option is checked, the camera would have to be connected to one of the USB slots in your computer or USB hub."));
// Create port settings widget stack
- m_settingsStack = new QWidgetStack(m_portSettingsGroup);
- connect(m_portSelectGroup, SIGNAL(clicked(int)),
- m_settingsStack, SLOT(raiseWidget(int)));
+ m_settingsStack = new TQWidgetStack(m_portSettingsGroup);
+ connect(m_portSelectGroup, TQT_SIGNAL(clicked(int)),
+ m_settingsStack, TQT_SLOT(raiseWidget(int)));
// none tab
- m_settingsStack->addWidget(new QLabel(i18n("No port type selected."),
+ m_settingsStack->addWidget(new TQLabel(i18n("No port type selected."),
m_settingsStack), INDEX_NONE);
// serial tab
- QGrid *grid = new QGrid(2, m_settingsStack);
+ TQGrid *grid = new TQGrid(2, m_settingsStack);
grid->setSpacing(KDialog::spacingHint());
- new QLabel(i18n("Port:"), grid);
- m_serialPortCombo = new QComboBox(TRUE, grid);
- QWhatsThis::add(m_serialPortCombo, i18n("Here you should choose the serial port you connect the camera to."));
+ new TQLabel(i18n("Port:"), grid);
+ m_serialPortCombo = new TQComboBox(TRUE, grid);
+ TQWhatsThis::add(m_serialPortCombo, i18n("Here you should choose the serial port you connect the camera to."));
m_settingsStack->addWidget(grid, INDEX_SERIAL);
- grid = new QGrid(2, m_settingsStack);
+ grid = new TQGrid(2, m_settingsStack);
grid->setSpacing(KDialog::spacingHint());
- new QLabel(i18n("Port"), grid);
+ new TQLabel(i18n("Port"), grid);
m_settingsStack->addWidget(new
- QLabel(i18n("No further configuration is required for USB."),
+ TQLabel(i18n("No further configuration is required for USB."),
m_settingsStack), INDEX_USB);
// query gphoto2 for existing serial ports
@@ -347,7 +347,7 @@ KameraDeviceSelectDialog::KameraDeviceSelectDialog(QWidget *parent, KCamera *dev
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(QString::fromLatin1(info.path).mid(7));
+ m_serialPortCombo->insertItem(TQString::fromLatin1(info.path).mid(7));
}
}
gp_port_info_list_free(list);
@@ -376,7 +376,7 @@ bool KameraDeviceSelectDialog::populateCameraListView()
} else {
for(int x = 0; x < numCams; ++x) {
if(gp_abilities_list_get_abilities(m_device->m_abilitylist, x, &a) == GP_OK) {
- new QListViewItem(m_modelSel, a.model);
+ new TQListViewItem(m_modelSel, a.model);
}
}
return true;
@@ -388,7 +388,7 @@ void KameraDeviceSelectDialog::save()
m_device->setModel(m_modelSel->currentItem()->text(0));
if (m_portSelectGroup->selected()) {
- QString type = m_portSelectGroup->selected()->text();
+ TQString type = m_portSelectGroup->selected()->text();
if(type == i18n("Serial"))
m_device->setPath("serial:" + m_serialPortCombo->currentText());
@@ -402,13 +402,13 @@ void KameraDeviceSelectDialog::save()
void KameraDeviceSelectDialog::load()
{
- QString path = m_device->path();
- QString port = path.left(path.find(":")).lower();
+ TQString path = m_device->path();
+ TQString port = path.left(path.find(":")).lower();
if (port == "serial") setPortType(INDEX_SERIAL);
if (port == "usb") setPortType(INDEX_USB);
- QListViewItem *modelItem = m_modelSel->firstChild();
+ TQListViewItem *modelItem = m_modelSel->firstChild();
if( modelItem)
{
do {
@@ -420,13 +420,13 @@ void KameraDeviceSelectDialog::load()
}
}
-void KameraDeviceSelectDialog::slot_setModel(QListViewItem *item)
+void KameraDeviceSelectDialog::slot_setModel(TQListViewItem *item)
{
enableButtonOK(true);
m_portSelectGroup->setEnabled(true);
m_portSettingsGroup->setEnabled(true);
- QString model = item->text(0);
+ TQString model = item->text(0);
CameraAbilities abilities;
int index = gp_abilities_list_lookup_model(m_device->m_abilitylist, model.local8Bit().data());
@@ -441,7 +441,7 @@ void KameraDeviceSelectDialog::slot_setModel(QListViewItem *item)
m_USBRB->setEnabled(abilities.port & GP_PORT_USB);
// turn off any selected port
- QButton *selected = m_portSelectGroup->selected();
+ TQButton *selected = m_portSelectGroup->selected();
if(selected != NULL)
selected->toggle();
@@ -465,12 +465,12 @@ void KameraDeviceSelectDialog::setPortType(int type)
m_settingsStack->raiseWidget(type);
}
-void KameraDeviceSelectDialog::slot_error(const QString &message)
+void KameraDeviceSelectDialog::slot_error(const TQString &message)
{
KMessageBox::error(this, message);
}
-void KameraDeviceSelectDialog::slot_error(const QString &message, const QString &details)
+void KameraDeviceSelectDialog::slot_error(const TQString &message, const TQString &details)
{
KMessageBox::detailedError(this, message, details);
}
diff --git a/kamera/kcontrol/kameradevice.h b/kamera/kcontrol/kameradevice.h
index aae24e02..34594f4e 100644
--- a/kamera/kcontrol/kameradevice.h
+++ b/kamera/kcontrol/kameradevice.h
@@ -23,52 +23,52 @@
#ifndef __kameradevice_h__
#define __kameradevice_h__
-#include <qmap.h>
+#include <tqmap.h>
#include <kdialogbase.h>
#include <config.h>
class KConfig;
-class QString;
+class TQString;
class KListView;
-class QWidgetStack;
-class QVButtonGroup;
-class QVGroupBox;
-class QComboBox;
-class QLineEdit;
-class QRadioButton;
-
-class KCamera : public QObject {
+class TQWidgetStack;
+class TQVButtonGroup;
+class TQVGroupBox;
+class TQComboBox;
+class TQLineEdit;
+class TQRadioButton;
+
+class KCamera : public TQObject {
friend class KameraDeviceSelectDialog;
Q_OBJECT
public:
- KCamera(const QString &name, const QString &path);
+ KCamera(const TQString &name, const TQString &path);
~KCamera();
void invalidateCamera();
bool configure();
void load(KConfig *m_config);
void save(KConfig *m_config);
bool test();
- QStringList supportedPorts();
+ TQStringList supportedPorts();
Camera* camera();
- QString name() const { return m_name ; }
- QString model() const { return m_model; }
- QString path() const { return m_path; }
- QString portName();
+ TQString name() const { return m_name ; }
+ TQString model() const { return m_model; }
+ TQString path() const { return m_path; }
+ TQString portName();
- QString summary();
+ TQString summary();
CameraAbilities abilities();
- void setName(const QString &name);
- void setModel(const QString &model);
- void setPath(const QString &path);
+ void setName(const TQString &name);
+ void setModel(const TQString &model);
+ void setPath(const TQString &path);
bool isTestable() const;
bool isConfigurable();
signals:
- void error(const QString &message);
- void error(const QString &message, const QString &details);
+ void error(const TQString &message);
+ void error(const TQString &message, const TQString &details);
protected:
bool initInformation();
@@ -78,9 +78,9 @@ protected:
Camera *m_camera;
// KConfig *m_config;
- QString m_name; // the camera's real name
- QString m_model;
- QString m_path;
+ TQString m_name; // the camera's real name
+ TQString m_model;
+ TQString m_path;
CameraAbilities m_abilities;
CameraAbilitiesList *m_abilitylist;
};
@@ -89,13 +89,13 @@ class KameraDeviceSelectDialog : public KDialogBase
{
Q_OBJECT
public:
- KameraDeviceSelectDialog(QWidget *parent, KCamera *device);
+ KameraDeviceSelectDialog(TQWidget *parent, KCamera *device);
void save();
void load();
protected slots:
- void slot_setModel(QListViewItem *item);
- void slot_error(const QString &message);
- void slot_error(const QString &message, const QString &details);
+ void slot_setModel(TQListViewItem *item);
+ void slot_error(const TQString &message);
+ void slot_error(const TQString &message, const TQString &details);
protected:
KCamera *m_device;
@@ -104,14 +104,14 @@ protected:
// port settings widgets
KListView *m_modelSel;
- QLineEdit *m_nameEdit;
- QWidgetStack *m_settingsStack;
- QVButtonGroup *m_portSelectGroup;
- QVGroupBox *m_portSettingsGroup;
- QComboBox *m_serialPortCombo;
+ TQLineEdit *m_nameEdit;
+ TQWidgetStack *m_settingsStack;
+ TQVButtonGroup *m_portSelectGroup;
+ TQVGroupBox *m_portSettingsGroup;
+ TQComboBox *m_serialPortCombo;
// port selection radio buttons
- QRadioButton *m_serialRB;
- QRadioButton *m_USBRB;
+ TQRadioButton *m_serialRB;
+ TQRadioButton *m_USBRB;
};
#endif
diff --git a/kamera/kioslave/kamera.cpp b/kamera/kioslave/kamera.cpp
index ab4eb469..5aefd632 100644
--- a/kamera/kioslave/kamera.cpp
+++ b/kamera/kioslave/kamera.cpp
@@ -29,8 +29,8 @@
#include <signal.h>
#include <errno.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <kinstance.h>
@@ -79,7 +79,7 @@ int kdemain(int argc, char **argv)
return 0;
}
-KameraProtocol::KameraProtocol(const QCString &pool, const QCString &app)
+KameraProtocol::KameraProtocol(const TQCString &pool, const TQCString &app)
: SlaveBase("camera", pool, app),
m_camera(NULL)
{
@@ -104,7 +104,7 @@ m_camera(NULL)
//
// The existance of a lockfile is used to signify "please give up camera".
//
-void KameraProtocol::special(const QByteArray&) {
+void KameraProtocol::special(const TQByteArray&) {
kdDebug(7123) << "KameraProtocol::special() at " << getpid() << endl;
if (!actiondone && cameraopen) {
@@ -136,7 +136,7 @@ KameraProtocol::~KameraProtocol()
}
// initializes the camera for usage - should be done before operations over the wire
-bool KameraProtocol::openCamera(QString &str) {
+bool KameraProtocol::openCamera(TQString &str) {
idletime = 0;
actiondone = true;
if (!m_camera) {
@@ -188,8 +188,8 @@ void KameraProtocol::closeCamera(void)
return;
}
-static QString fix_foldername(QString ofolder) {
- QString folder = ofolder;
+static TQString fix_foldername(TQString ofolder) {
+ TQString folder = ofolder;
if (folder.length() > 1) {
while ((folder.length()>1) && (folder.right(1) == "/"))
folder = folder.left(folder.length()-1);
@@ -227,7 +227,7 @@ void KameraProtocol::get(const KURL &url)
error(KIO::ERR_DOES_NOT_EXIST, url.path()); \
return; \
} \
- QByteArray chunkDataBuffer; \
+ TQByteArray chunkDataBuffer; \
chunkDataBuffer.setRawData(xx.text, strlen(xx.text)); \
data(chunkDataBuffer); \
processedSize(strlen(xx.text)); \
@@ -329,7 +329,7 @@ void KameraProtocol::get(const KURL &url)
// already.
if ((fileSize > 0) && (fileSize - m_fileSize)>0) {
unsigned long written = 0;
- QByteArray chunkDataBuffer;
+ TQByteArray chunkDataBuffer;
// We need to split it up here. Someone considered it funny
// to discard any data() larger than 16MB.
@@ -518,9 +518,9 @@ void KameraProtocol::listDir(const KURL &url)
if (url.host().isEmpty()) {
KURL xurl;
// List the available cameras
- QStringList groupList = m_config->groupList();
+ TQStringList groupList = m_config->groupList();
kdDebug(7123) << "Found cameras: " << groupList.join(", ") << endl;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
UDSEntry entry;
UDSAtom atom;
@@ -531,8 +531,8 @@ void KameraProtocol::listDir(const KURL &url)
* - List all saved and possible offline cameras.
* - List all autodetected and not yet printed cameras.
*/
- QMap<QString,QString> ports, names;
- QMap<QString,int> modelcnt;
+ TQMap<TQString,TQString> ports, names;
+ TQMap<TQString,int> modelcnt;
/* Autodetect USB cameras ... */
GPContext *glob_context = NULL;
@@ -578,7 +578,7 @@ void KameraProtocol::listDir(const KURL &url)
ports.remove("usb:");
for (it = groupList.begin(); it != groupList.end(); it++) {
- QString m_cfgPath;
+ TQString m_cfgPath;
if (*it == "<default>")
continue;
@@ -619,7 +619,7 @@ void KameraProtocol::listDir(const KURL &url)
listEntry(entry, false);
}
- QMap<QString,QString>::iterator portsit;
+ TQMap<TQString,TQString>::iterator portsit;
for (portsit = ports.begin(); portsit != ports.end(); portsit++) {
entry.clear();
@@ -699,7 +699,7 @@ void KameraProtocol::listDir(const KURL &url)
for(int i = 0; i < gp_list_count(dirList); ++i) {
gp_list_get_name(dirList, i, &name);
- translateDirectoryToUDS(entry, QString::fromLocal8Bit(name));
+ translateDirectoryToUDS(entry, TQString::fromLocal8Bit(name));
listEntry(entry, false);
}
@@ -709,7 +709,7 @@ void KameraProtocol::listDir(const KURL &url)
gp_list_get_name(fileList, i, &name);
// we want to know more info about files (size, type...)
gp_camera_file_get_info(m_camera, tocstr(url.path()), name, &info, m_context);
- translateFileToUDS(entry, info, QString::fromLocal8Bit(name));
+ translateFileToUDS(entry, info, TQString::fromLocal8Bit(name));
listEntry(entry, false);
}
if (!url.path().compare("/")) {
@@ -737,7 +737,7 @@ void KameraProtocol::listDir(const KURL &url)
finished();
}
-void KameraProtocol::setHost(const QString& host, int port, const QString& user, const QString& pass )
+void KameraProtocol::setHost(const TQString& host, int port, const TQString& user, const TQString& pass )
{
kdDebug(7123) << "KameraProtocol::setHost(" << host << ", " << port << ", " << user << ", " << pass << ")" << endl;
int gpr, idx;
@@ -805,7 +805,7 @@ void KameraProtocol::setHost(const QString& host, int port, const QString& user,
gp_camera_set_port_speed(m_camera, 0); // TODO: the value needs to be configurable
kdDebug(7123) << "Opening camera model " << user << " at " << host << endl;
- QString errstr;
+ TQString errstr;
if (!openCamera(errstr)) {
kdDebug(7123) << "Unable to init camera: " << gp_result_as_string(gpr) << endl;
error(KIO::ERR_SERVICE_NOT_AVAILABLE, errstr);
@@ -821,7 +821,7 @@ void KameraProtocol::reparseConfiguration(void)
}
// translate a simple text to a UDS entry
-void KameraProtocol::translateTextToUDS(UDSEntry &udsEntry, const QString &fn,
+void KameraProtocol::translateTextToUDS(UDSEntry &udsEntry, const TQString &fn,
const char *text
) {
UDSAtom atom;
@@ -846,7 +846,7 @@ void KameraProtocol::translateTextToUDS(UDSEntry &udsEntry, const QString &fn,
}
// translate a CameraFileInfo to a UDSEntry which we can return as a directory listing entry
-void KameraProtocol::translateFileToUDS(UDSEntry &udsEntry, const CameraFileInfo &info, QString name)
+void KameraProtocol::translateFileToUDS(UDSEntry &udsEntry, const CameraFileInfo &info, TQString name)
{
UDSAtom atom;
@@ -858,7 +858,7 @@ void KameraProtocol::translateFileToUDS(UDSEntry &udsEntry, const CameraFileInfo
atom.m_uds = UDS_NAME;
if (info.file.fields & GP_FILE_INFO_NAME)
- atom.m_str = QString::fromLocal8Bit(info.file.name);
+ atom.m_str = TQString::fromLocal8Bit(info.file.name);
else
atom.m_str = name;
udsEntry.append(atom);
@@ -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 = QString::fromLatin1(info.file.type);
+ atom.m_str = TQString::fromLatin1(info.file.type);
udsEntry.append(atom);
}
@@ -903,7 +903,7 @@ void KameraProtocol::translateFileToUDS(UDSEntry &udsEntry, const CameraFileInfo
}
// translate a directory name to a UDSEntry which we can return as a directory listing entry
-void KameraProtocol::translateDirectoryToUDS(UDSEntry &udsEntry, const QString &dirname)
+void KameraProtocol::translateDirectoryToUDS(UDSEntry &udsEntry, const TQString &dirname)
{
UDSAtom atom;
@@ -942,7 +942,7 @@ bool KameraProtocol::cameraSupportsPreview(void)
return (m_abilities.file_operations & GP_FILE_OPERATION_PREVIEW);
}
-int KameraProtocol::readCameraFolder(const QString &folder, CameraList *dirList, CameraList *fileList)
+int KameraProtocol::readCameraFolder(const TQString &folder, CameraList *dirList, CameraList *fileList)
{
kdDebug(7123) << "KameraProtocol::readCameraFolder(" << folder << ")" << endl;
@@ -975,7 +975,7 @@ void frontendProgressUpdate(
if (fileSize > 0) {
// XXX using assign() here causes segfault, prolly because
// gp_file_free is called before chunkData goes out of scope
- QByteArray chunkDataBuffer;
+ TQByteArray chunkDataBuffer;
chunkDataBuffer.setRawData(fileData + object->getFileSize(), fileSize - object->getFileSize());
// Note: this will fail with sizes > 16MB ...
object->data(chunkDataBuffer);
@@ -1021,7 +1021,7 @@ unsigned int frontendProgressStart(
vsnprintf(status, 300, format, args);
#endif
- object->infoMessage(QString::fromLocal8Bit(status));
+ object->infoMessage(TQString::fromLocal8Bit(status));
delete [] status;
object->totalSize((int)totalsize); // hack: call slot directly
return GP_OK;
@@ -1061,6 +1061,6 @@ static void frontendCameraStatus(GPContext * /*context*/, const char *format, va
status=new char[300];
vsnprintf(status, 300, format, args);
#endif
- object->infoMessage(QString::fromLocal8Bit(status));
+ object->infoMessage(TQString::fromLocal8Bit(status));
delete [] status;
}
diff --git a/kamera/kioslave/kamera.h b/kamera/kioslave/kamera.h
index 765f6560..b75a0185 100644
--- a/kamera/kioslave/kamera.h
+++ b/kamera/kioslave/kamera.h
@@ -32,15 +32,15 @@ class KSimpleConfig;
class KameraProtocol : public KIO::SlaveBase
{
public:
- KameraProtocol(const QCString &pool, const QCString &app);
+ KameraProtocol(const TQCString &pool, const TQCString &app);
virtual ~KameraProtocol();
virtual void get(const KURL &url);
virtual void stat(const KURL &url);
virtual void del(const KURL &url, bool isFile);
- virtual void setHost(const QString& host, int port, const QString& user, const QString& pass );
+ virtual void setHost(const TQString& host, int port, const TQString& user, const TQString& pass );
virtual void listDir(const KURL &url);
- virtual void special(const QByteArray &data);
+ virtual void special(const TQByteArray &data);
CameraFile *getFile() { return m_file; }
int getFileSize() { return m_fileSize; }
@@ -54,24 +54,24 @@ private:
GPContext *m_context;
void reparseConfiguration(void);
- bool openCamera(QString& str);
+ bool openCamera(TQString& str);
bool openCamera(void ) {
- QString errstr;
+ TQString errstr;
return openCamera(errstr);
}
void closeCamera(void);
void statRoot(void);
void statRegular(const KURL &url);
- void translateTextToUDS(KIO::UDSEntry &udsEntry, const QString &info, const char *txt);
- void translateFileToUDS(KIO::UDSEntry &udsEntry, const CameraFileInfo &info, QString name);
- void translateDirectoryToUDS(KIO::UDSEntry &udsEntry, const QString &dirname);
+ void translateTextToUDS(KIO::UDSEntry &udsEntry, const TQString &info, const char *txt);
+ void translateFileToUDS(KIO::UDSEntry &udsEntry, const CameraFileInfo &info, TQString name);
+ void translateDirectoryToUDS(KIO::UDSEntry &udsEntry, const TQString &dirname);
bool cameraSupportsPreview(void);
bool cameraSupportsDel(void);
bool cameraSupportsPut(void);
- int readCameraFolder(const QString &folder, CameraList *dirList, CameraList *fileList);
+ int readCameraFolder(const TQString &folder, CameraList *dirList, CameraList *fileList);
- QString m_lockfile;
+ TQString m_lockfile;
int idletime;
int m_fileSize;
diff --git a/kcoloredit/color.cpp b/kcoloredit/color.cpp
index db18a5a5..eb06444b 100644
--- a/kcoloredit/color.cpp
+++ b/kcoloredit/color.cpp
@@ -21,7 +21,7 @@ Color::Color(){
setComponents(0, 0, 0);
setName("");
}
-Color::Color(const int red, const int green, const int blue, const QString& name) {
+Color::Color(const int red, const int green, const int blue, const TQString& name) {
setComponents(red, green, blue);
setName(name);
}
@@ -38,7 +38,7 @@ void Color::setComponents(const int red, const int green, const int blue) {
setComponent(BLUE_INDEX, blue);
}
-void Color::setName(const QString& name) {
+void Color::setName(const TQString& name) {
m_name = name;
}
@@ -50,7 +50,7 @@ const int* Color::components() const{
return m_components;
}
-const QString& Color::name() const {
+const TQString& Color::name() const {
return m_name;
}
diff --git a/kcoloredit/color.h b/kcoloredit/color.h
index 723ba2f0..e20bc1de 100644
--- a/kcoloredit/color.h
+++ b/kcoloredit/color.h
@@ -39,7 +39,7 @@ class Color {
Color();
/** constructs a color with given components and a name
*/
- Color(const int red, const int green, const int blue, const QString& name);
+ Color(const int red, const int green, const int blue, const TQString& name);
~Color();
/** sets a component
*/
@@ -49,7 +49,7 @@ class Color {
void setComponents(const int red, const int green, const int blue);
/** sets a name
*/
- void setName(const QString& name);
+ void setName(const TQString& name);
/** @return a component
*/
int component(const int index) const;
@@ -58,7 +58,7 @@ class Color {
const int* components() const;
/** @return a color name
*/
- const QString& name() const;
+ const TQString& name() const;
/** @return if is equal to color
*/
bool equals(const Color& color);
@@ -75,7 +75,7 @@ class Color {
int m_components[COMPONENTS_NUM];
/** a color name
*/
- QString m_name;
+ TQString m_name;
};
#endif
diff --git a/kcoloredit/colorselector.cpp b/kcoloredit/colorselector.cpp
index 2b0530d3..50288313 100644
--- a/kcoloredit/colorselector.cpp
+++ b/kcoloredit/colorselector.cpp
@@ -17,11 +17,11 @@
#include <math.h>
-#include <qlayout.h>
-/* #include <qtabwidget.h> */
-#include <qradiobutton.h>
-#include <qlabel.h>
-#include <qslider.h>
+#include <tqlayout.h>
+/* #include <tqtabwidget.h> */
+#include <tqradiobutton.h>
+#include <tqlabel.h>
+#include <tqslider.h>
#include <kseparator.h>
#include <klocale.h>
@@ -30,59 +30,59 @@
#include "texteditselection.h"
#include "colorselector.h"
-ColorSelector::ColorSelector(QWidget *parent, const char *name ) : QWidget(parent, name) {
+ColorSelector::ColorSelector(TQWidget *parent, const char *name ) : TQWidget(parent, name) {
fComponentsMode = false;
- QVBoxLayout* topLayout = new QVBoxLayout(this, 4);
+ TQVBoxLayout* topLayout = new TQVBoxLayout(this, 4);
/*
- QTabWidget* pages = new QTabWidget(this);
+ TQTabWidget* pages = new TQTabWidget(this);
*/
gradientSelection = new GradientSelection(this);
- connect(gradientSelection, SIGNAL( valueChanged(Color*) ),
- SLOT( slotGradientSelectionChangeColor(Color*) ));
- connect(gradientSelection, SIGNAL( synchronizeColor() ),
- SLOT( slotGradientSelectionSynchronizeColor() ));
- connect(this, SIGNAL( valueChanged(Color*) ), gradientSelection, SLOT( slotSetValue(Color*) ));
+ connect(gradientSelection, TQT_SIGNAL( valueChanged(Color*) ),
+ TQT_SLOT( slotGradientSelectionChangeColor(Color*) ));
+ connect(gradientSelection, TQT_SIGNAL( synchronizeColor() ),
+ TQT_SLOT( slotGradientSelectionSynchronizeColor() ));
+ connect(this, TQT_SIGNAL( valueChanged(Color*) ), gradientSelection, TQT_SLOT( slotSetValue(Color*) ));
/*
pages->addTab(gradientSelection, i18n( "Gradient" ));
ImageSelection* imageSelection = new ImageSelection(this);
- connect(imageSelection, SIGNAL( valueChanged(Color*) ), SLOT( slotSetColor(Color*) ));
- connect(this, SIGNAL( valueChanged(Color*) ), imageSelection, SLOT( slotSetValue(Color*) ));
+ connect(imageSelection, TQT_SIGNAL( valueChanged(Color*) ), TQT_SLOT( slotSetColor(Color*) ));
+ connect(this, TQT_SIGNAL( valueChanged(Color*) ), imageSelection, TQT_SLOT( slotSetValue(Color*) ));
pages->addTab(imageSelection, i18n( "Image" ));
topLayout->addWidget(pages, 10);
*/
topLayout->addWidget(gradientSelection, 10);
KSeparator* hLine = new KSeparator(KSeparator::HLine, this);
topLayout->addWidget(hLine);
- QHBoxLayout* layout = new QHBoxLayout();
+ TQHBoxLayout* layout = new TQHBoxLayout();
TextEditSelection* textEditSelection = new TextEditSelection(this);
- connect(textEditSelection, SIGNAL( valueChanged(Color*) ), SLOT( slotSetColor(Color*) ));
- connect(this, SIGNAL( valueChanged(Color*) ), textEditSelection, SLOT( slotSetValue(Color*) ));
- QVBoxLayout* colorChangeLayout = new QVBoxLayout();
+ connect(textEditSelection, TQT_SIGNAL( valueChanged(Color*) ), TQT_SLOT( slotSetColor(Color*) ));
+ connect(this, TQT_SIGNAL( valueChanged(Color*) ), textEditSelection, TQT_SLOT( slotSetValue(Color*) ));
+ TQVBoxLayout* colorChangeLayout = new TQVBoxLayout();
colorChangeLayout->setMargin(2);
- QRadioButton* replaceButton = new QRadioButton(i18n( "Replace" ), this);
- connect(replaceButton, SIGNAL( clicked() ), SLOT( slotColorReplace() ));
+ TQRadioButton* replaceButton = new TQRadioButton(i18n( "Replace" ), this);
+ connect(replaceButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotColorReplace() ));
replaceButton->setChecked(true);
colorChangeButtons.insert(replaceButton);
colorChangeLayout->addWidget(replaceButton);
- QRadioButton* changeButton = new QRadioButton(i18n( "Change" ) + ":", this);
- connect(changeButton, SIGNAL( clicked() ), SLOT( slotColorChange() ));
+ TQRadioButton* changeButton = new TQRadioButton(i18n( "Change" ) + ":", this);
+ connect(changeButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotColorChange() ));
colorChangeButtons.insert(changeButton);
colorChangeLayout->addWidget(changeButton);
colorChangeValue = 0;
- colorChangeSliderWidget = new QWidget(this);
- QVBoxLayout* colorChangeSliderLayout = new QVBoxLayout(colorChangeSliderWidget, 1);
+ colorChangeSliderWidget = new TQWidget(this);
+ TQVBoxLayout* colorChangeSliderLayout = new TQVBoxLayout(colorChangeSliderWidget, 1);
colorChangeSliderLayout->setMargin(0);
- QSlider* colorChangeSlider = new QSlider(0, MAX_COLOR_CHANGE_VALUE,
- MAX_COLOR_CHANGE_VALUE/4, colorChangeValue, QSlider::Horizontal, colorChangeSliderWidget);
+ TQSlider* colorChangeSlider = new TQSlider(0, MAX_COLOR_CHANGE_VALUE,
+ MAX_COLOR_CHANGE_VALUE/4, colorChangeValue, TQSlider::Horizontal, colorChangeSliderWidget);
colorChangeSlider->setTickInterval(colorChangeSlider->pageStep());
- colorChangeSlider->setTickmarks(QSlider::Above);
- connect(colorChangeSlider, SIGNAL( valueChanged(int) ), SLOT( slotColorChangeValueChanged(int) ));
+ colorChangeSlider->setTickmarks(TQSlider::Above);
+ connect(colorChangeSlider, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( slotColorChangeValueChanged(int) ));
colorChangeSliderLayout->addWidget(colorChangeSlider);
- QHBoxLayout* colorChangeSliderLabelsLayout = new QHBoxLayout(0);
- QLabel* subtractLabel = new QLabel(i18n( "0" ), colorChangeSliderWidget);
+ TQHBoxLayout* colorChangeSliderLabelsLayout = new TQHBoxLayout(0);
+ TQLabel* subtractLabel = new TQLabel(i18n( "0" ), colorChangeSliderWidget);
colorChangeSliderLabelsLayout->addWidget(subtractLabel);
colorChangeSliderLabelsLayout->addStretch(10);
- QLabel* addLabel = new QLabel(" " + i18n( "Replace" ), colorChangeSliderWidget);
+ TQLabel* addLabel = new TQLabel(" " + i18n( "Replace" ), colorChangeSliderWidget);
colorChangeSliderLabelsLayout->addWidget(addLabel);
colorChangeSliderLayout->addLayout(colorChangeSliderLabelsLayout);
colorChangeLayout->addStretch(10);
@@ -95,7 +95,7 @@ ColorSelector::ColorSelector(QWidget *parent, const char *name ) : QWidget(paren
layout->addWidget(vLine);
layout->addWidget(textEditSelection, 1);
colorPatch = new KColorPatch(this);
- connect(colorPatch, SIGNAL( colorChanged(const QColor&) ), SLOT( slotSetColor(const QColor&) ));
+ connect(colorPatch, TQT_SIGNAL( colorChanged(const TQColor&) ), TQT_SLOT( slotSetColor(const TQColor&) ));
colorPatch->setMinimumSize(80, 64);
layout->addWidget(colorPatch, 10);
topLayout->addLayout(layout);
@@ -105,7 +105,7 @@ ColorSelector::~ColorSelector() {
void ColorSelector::slotSetColor(Color color) {
m_color = color;
- colorPatch->setColor(QColor( m_color.component(Color::RED_INDEX),
+ colorPatch->setColor(TQColor( m_color.component(Color::RED_INDEX),
m_color.component(Color::GREEN_INDEX),
m_color.component(Color::BLUE_INDEX) ));
fComponentsMode = false;
@@ -116,7 +116,7 @@ void ColorSelector::slotSetColor(Color* color) {
slotSetColor(*color);
}
-void ColorSelector::slotSetColor(const QColor& color) {
+void ColorSelector::slotSetColor(const TQColor& color) {
m_color.setComponent(Color::RED_INDEX, color.red());
m_color.setComponent(Color::GREEN_INDEX, color.green());
m_color.setComponent(Color::BLUE_INDEX, color.blue());
diff --git a/kcoloredit/colorselector.h b/kcoloredit/colorselector.h
index 21b5902b..72d62ef6 100644
--- a/kcoloredit/colorselector.h
+++ b/kcoloredit/colorselector.h
@@ -18,9 +18,9 @@
#ifndef COLORSELECTOR_H
#define COLORSELECTOR_H
-#include <qwidget.h>
-#include <qcolor.h>
-#include <qbuttongroup.h>
+#include <tqwidget.h>
+#include <tqcolor.h>
+#include <tqbuttongroup.h>
#include <kcolordialog.h>
#include "color.h"
@@ -29,12 +29,12 @@
/** Color selector widget
* @author Artur Rataj
*/
-class ColorSelector : public QWidget {
+class ColorSelector : public TQWidget {
Q_OBJECT
public:
/** constructs a color selector widget */
- ColorSelector(QWidget *parent=0, const char *name=0);
+ ColorSelector(TQWidget *parent=0, const char *name=0);
~ColorSelector();
/** @return the selected color */
const Color& color();
@@ -49,7 +49,7 @@ public slots:
/** Called if a color changed */
void slotSetColor(Color* color);
/** called if a color changed in the color patch */
- void slotSetColor(const QColor& color);
+ void slotSetColor(const TQColor& color);
/** Called by the gradient selection, to replace or modify a color */
void slotGradientSelectionChangeColor(Color* gradientSelectionColor);
/** Called by the gradient selection, to synchronize its color */
@@ -69,9 +69,9 @@ private:
MAX_COLOR_CHANGE_VALUE = 16 };
/** A color change slider widget */
- QWidget* colorChangeSliderWidget;
+ TQWidget* colorChangeSliderWidget;
/** Color change buttons button group widget */
- QButtonGroup colorChangeButtons;
+ TQButtonGroup colorChangeButtons;
/** A color patch widget */
KColorPatch* colorPatch;
/** A gradient selection widget */
diff --git a/kcoloredit/gradientselection.cpp b/kcoloredit/gradientselection.cpp
index a8927c7d..f75547c1 100644
--- a/kcoloredit/gradientselection.cpp
+++ b/kcoloredit/gradientselection.cpp
@@ -15,39 +15,39 @@
* *
***************************************************************************/
-#include <qlayout.h>
-#include <qframe.h>
-#include <qradiobutton.h>
-#include <qcolor.h>
+#include <tqlayout.h>
+#include <tqframe.h>
+#include <tqradiobutton.h>
+#include <tqcolor.h>
#include <klocale.h>
#include "main.h"
#include "gradientselection.h"
-GradientSelection::GradientSelection(QWidget *parent, const char *name ) : QWidget(parent,name) {
- QGridLayout* topLayout = new QGridLayout(this, 2, 2, 0);
- QHBoxLayout* layout = new QHBoxLayout(0);
+GradientSelection::GradientSelection(TQWidget *parent, const char *name ) : TQWidget(parent,name) {
+ TQGridLayout* topLayout = new TQGridLayout(this, 2, 2, 0);
+ TQHBoxLayout* layout = new TQHBoxLayout(0);
layout->setMargin(3);
xyColorSelector = new KXYColorSelector(this);
- connect(xyColorSelector, SIGNAL( valueChanged(int, int) ),
- SLOT( slotXyColorSelectorPosChanged(int, int) ));
+ connect(xyColorSelector, TQT_SIGNAL( valueChanged(int, int) ),
+ TQT_SLOT( slotXyColorSelectorPosChanged(int, int) ));
layout->addWidget(xyColorSelector);
topLayout->addLayout(layout, 0, 0);
topLayout->setRowStretch(0, 10);
topLayout->setRowStretch(1, 0);
- QVBoxLayout* xyColorSelectorLayout = new QVBoxLayout();
- QHBoxLayout* checkBoxLayout = new QHBoxLayout();
+ TQVBoxLayout* xyColorSelectorLayout = new TQVBoxLayout();
+ TQHBoxLayout* checkBoxLayout = new TQHBoxLayout();
checkBoxLayout->setMargin(0);
- variableCheckBox = new QCheckBox(i18n( "Variable" ), this);
+ variableCheckBox = new TQCheckBox(i18n( "Variable" ), this);
variableGlobalComponent = false;
- connect(variableCheckBox, SIGNAL( toggled(bool) ), SLOT( slotSetVariableGlobalComponent(bool) ));
+ connect(variableCheckBox, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotSetVariableGlobalComponent(bool) ));
checkBoxLayout->addSpacing(2);
checkBoxLayout->addWidget(variableCheckBox);
xyColorSelectorLayout->addLayout(checkBoxLayout);
xyColorSelectorLayout->addStretch(10);
- QHBoxLayout* buttonsLayout = new QHBoxLayout();
- synchronizeColorButton = new QPushButton(i18n( "Synchronize" ), this);
- connect(synchronizeColorButton, SIGNAL( clicked() ), SLOT( slotSynchronizeColor() ));
+ TQHBoxLayout* buttonsLayout = new TQHBoxLayout();
+ synchronizeColorButton = new TQPushButton(i18n( "Synchronize" ), this);
+ connect(synchronizeColorButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSynchronizeColor() ));
buttonsLayout->addSpacing(2);
buttonsLayout->addWidget(synchronizeColorButton);
buttonsLayout->addStretch(10);
@@ -55,19 +55,19 @@ GradientSelection::GradientSelection(QWidget *parent, const char *name ) : QWidg
xyColorSelectorLayout->addSpacing(2);
topLayout->addLayout(xyColorSelectorLayout, 1, 0);
zColorSelector = new KZColorSelector(KZColorSelector::Vertical, this);
- connect(zColorSelector, SIGNAL( valueChanged(int) ),
- SLOT( slotZColorSelectorPosChanged(int) ));
+ connect(zColorSelector, TQT_SIGNAL( valueChanged(int) ),
+ TQT_SLOT( slotZColorSelectorPosChanged(int) ));
zColorSelector->setFixedWidth(36);
topLayout->addWidget(zColorSelector, 0, 1);
- QVBoxLayout* zColorSelectorLayout = new QVBoxLayout(0);
- connect(&hsvButtons, SIGNAL( clicked(int) ), SLOT( slotSetColorSelectionMode(int) ));
- QRadioButton* hRadioButton = new QRadioButton("H", this);
+ TQVBoxLayout* zColorSelectorLayout = new TQVBoxLayout(0);
+ connect(&hsvButtons, TQT_SIGNAL( clicked(int) ), TQT_SLOT( slotSetColorSelectionMode(int) ));
+ TQRadioButton* hRadioButton = new TQRadioButton("H", this);
hsvButtons.insert(hRadioButton, H_COMPONENT);
zColorSelectorLayout->addWidget(hRadioButton);
- QRadioButton* sRadioButton = new QRadioButton("S", this);
+ TQRadioButton* sRadioButton = new TQRadioButton("S", this);
hsvButtons.insert(sRadioButton, S_COMPONENT);
zColorSelectorLayout->addWidget(sRadioButton);
- QRadioButton* vRadioButton = new QRadioButton("V", this);
+ TQRadioButton* vRadioButton = new TQRadioButton("V", this);
hsvButtons.insert(vRadioButton, V_COMPONENT);
vRadioButton->toggle();
zColorSelectorLayout->addWidget(vRadioButton);
@@ -88,7 +88,7 @@ void GradientSelection::slotSetValue(Color* color) {
int newHComponent;
int newSComponent;
int newVComponent;
- QColor hsvColor(this->color.component(Color::RED_INDEX),
+ TQColor hsvColor(this->color.component(Color::RED_INDEX),
this->color.component(Color::GREEN_INDEX),
this->color.component(Color::BLUE_INDEX));
hsvColor.hsv(&newHComponent, &newSComponent, &newVComponent);
@@ -210,7 +210,7 @@ void GradientSelection::slotXyColorSelectorPosChanged(int x, int y) {
break;
}
- QColor rgbColor;
+ TQColor rgbColor;
rgbColor.setHsv(hComponent, sComponent, vComponent);
color.setComponents(rgbColor.red(), rgbColor.green(), rgbColor.blue());
updateZColorSelector();
@@ -233,7 +233,7 @@ void GradientSelection::slotZColorSelectorPosChanged(int y) {
break;
}
- QColor rgbColor;
+ TQColor rgbColor;
rgbColor.setHsv(hComponent, sComponent, vComponent);
color.setComponents(rgbColor.red(), rgbColor.green(), rgbColor.blue());
updateXyColorSelector(false);
diff --git a/kcoloredit/gradientselection.h b/kcoloredit/gradientselection.h
index 24a3c5e1..0197f706 100644
--- a/kcoloredit/gradientselection.h
+++ b/kcoloredit/gradientselection.h
@@ -18,10 +18,10 @@
#ifndef GRADIENTSELECTION_H
#define GRADIENTSELECTION_H
-#include <qwidget.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qbuttongroup.h>
+#include <tqwidget.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqbuttongroup.h>
#include "kxycolorselector.h"
#include "kzcolorselector.h"
@@ -30,12 +30,12 @@
/** A widget for selecting colors from gradients
* @author Artur Rataj
*/
-class GradientSelection : public QWidget {
+class GradientSelection : public TQWidget {
Q_OBJECT
public:
/** Constructs the widget */
- GradientSelection(QWidget *parent=0, const char *name=0);
+ GradientSelection(TQWidget *parent=0, const char *name=0);
~GradientSelection();
/** Enables or disables the color synchronize button */
void enableSynchronizeColorButton(bool enable);
@@ -62,11 +62,11 @@ protected:
V_COMPONENT = KXYColorSelector::TYPE_HS };
/** Variable global component checkbox */
- QCheckBox* variableCheckBox;
+ TQCheckBox* variableCheckBox;
/** Synchronize color button */
- QPushButton* synchronizeColorButton;
+ TQPushButton* synchronizeColorButton;
/** HSV buttons button group widget */
- QButtonGroup hsvButtons;
+ TQButtonGroup hsvButtons;
/** The two components selector */
KXYColorSelector* xyColorSelector;
/** The gradient selector */
diff --git a/kcoloredit/imageselection.cpp b/kcoloredit/imageselection.cpp
index 39a8f2f0..b6d47c47 100644
--- a/kcoloredit/imageselection.cpp
+++ b/kcoloredit/imageselection.cpp
@@ -17,7 +17,7 @@
#include "imageselection.h"
-ImageSelection::ImageSelection(QWidget *parent, const char *name ) : QWidget(parent,name) {
+ImageSelection::ImageSelection(TQWidget *parent, const char *name ) : TQWidget(parent,name) {
}
ImageSelection::~ImageSelection(){
}
diff --git a/kcoloredit/imageselection.h b/kcoloredit/imageselection.h
index 3137fec7..dd6a9364 100644
--- a/kcoloredit/imageselection.h
+++ b/kcoloredit/imageselection.h
@@ -18,19 +18,19 @@
#ifndef IMAGESELECTION_H
#define IMAGESELECTION_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "color.h"
/** This is a widget for selecting colors from an image
* @author Artur Rataj
*/
-class ImageSelection : public QWidget {
+class ImageSelection : public TQWidget {
Q_OBJECT
public:
/** constructs the widget */
- ImageSelection(QWidget *parent=0, const char *name=0);
+ ImageSelection(TQWidget *parent=0, const char *name=0);
~ImageSelection();
signals:
diff --git a/kcoloredit/kcolorchooser.cpp b/kcoloredit/kcolorchooser.cpp
index bf1204fb..cbd5292b 100644
--- a/kcoloredit/kcolorchooser.cpp
+++ b/kcoloredit/kcolorchooser.cpp
@@ -57,13 +57,13 @@ int main(int argc, char *argv[])
dlg.setColor(Qt::blue); // Just a color
- app.connect(&dlg, SIGNAL(finished()), SLOT(quit()));
+ app.connect(&dlg, TQT_SIGNAL(finished()), TQT_SLOT(quit()));
dlg.show();
app.exec();
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- const QColor c = dlg.color();
+ const TQColor c = dlg.color();
if ( args->isSet("print") && c.isValid() ) {
std::cout << c.name().utf8().data() << std::endl;
}
diff --git a/kcoloredit/kcoloredit.cpp b/kcoloredit/kcoloredit.cpp
index a5582436..9b093722 100644
--- a/kcoloredit/kcoloredit.cpp
+++ b/kcoloredit/kcoloredit.cpp
@@ -16,9 +16,9 @@
***************************************************************************/
// include files for QT
-#include <qdir.h>
-#include <qprinter.h>
-#include <qpainter.h>
+#include <tqdir.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
// include files for KDE
#include <kiconloader.h>
@@ -64,40 +64,40 @@ KColorEditApp::~KColorEditApp() {
void KColorEditApp::initActions()
{
// File actiojns
- KStdAction::openNew( this, SLOT( slotFileNew() ), actionCollection() );
- KStdAction::open( this, SLOT( slotFileOpen() ), actionCollection() );
- KStdAction::saveAs( this, SLOT( slotFileSaveAs() ), actionCollection() );
- KStdAction::close( this, SLOT( slotClose() ), actionCollection() );
- KStdAction::quit( this, SLOT( slotQuit() ), actionCollection() );
- m_actSave = KStdAction::save( this, SLOT( slotFileSave() ),
+ 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() ),
actionCollection() );
m_actRecent = KStdAction::openRecent( this,
- SLOT( slotFileOpenRecent( const KURL& ) ), actionCollection() );
+ TQT_SLOT( slotFileOpenRecent( const KURL& ) ), actionCollection() );
( void ) new KAction( i18n("New &Window"), kapp->miniIcon(), KShortcut(),
- this, SLOT( slotFileNewWindow() ), actionCollection(),
+ this, TQT_SLOT( slotFileNewWindow() ), actionCollection(),
"file_new_window" );
// Edit actions
- m_actCut = KStdAction::cut( this, SLOT( slotEditCut() ),
+ m_actCut = KStdAction::cut( this, TQT_SLOT( slotEditCut() ),
actionCollection() );
- m_actCopy = KStdAction::copy( this, SLOT( slotEditCopy() ),
+ m_actCopy = KStdAction::copy( this, TQT_SLOT( slotEditCopy() ),
actionCollection() );
- m_actPaste = KStdAction::paste( this, SLOT( slotEditPaste() ),
+ m_actPaste = KStdAction::paste( this, TQT_SLOT( slotEditPaste() ),
actionCollection() );
m_actPaste->setEnabled( false );
// Color Menu
m_actNames = new KToggleAction( i18n("Show &Color Names"), KShortcut(), this,
- SLOT( slotViewColorNames() ), actionCollection(),
+ TQT_SLOT( slotViewColorNames() ), actionCollection(),
"color_view_names" );
m_actNames->setCheckedState(i18n("Hide &Color Names"));
m_actPalette = new KAction( i18n("From &Palette"), KShortcut(), this,
- SLOT( slotColorFromPalette() ), actionCollection(),
+ TQT_SLOT( slotColorFromPalette() ), actionCollection(),
"color_from_palette" );
( void ) new KAction( i18n("From &Screen"), KShortcut(), this,
- SLOT( slotColorFromScreen() ), actionCollection(),
+ TQT_SLOT( slotColorFromScreen() ), actionCollection(),
"color_from_screen" );
}
@@ -112,14 +112,14 @@ void KColorEditApp::initDocument()
doc = new KColorEditDoc(this);
doc->newDocument();
- connect( doc, SIGNAL( selectionChanged( int, int ) ),
- SLOT( slotSelectionChanged( int, int ) ) );
- connect( doc, SIGNAL( clipboardChanged() ),
- SLOT( slotClipboardChanged() ) );
- connect( doc, SIGNAL( modified( bool ) ),
- SLOT( slotModified( bool ) ) );
- connect( doc, SIGNAL( paletteAvailable( bool ) ),
- SLOT( slotPaletteAvailable( bool ) ) );
+ connect( doc, TQT_SIGNAL( selectionChanged( int, int ) ),
+ TQT_SLOT( slotSelectionChanged( int, int ) ) );
+ connect( doc, TQT_SIGNAL( clipboardChanged() ),
+ TQT_SLOT( slotClipboardChanged() ) );
+ connect( doc, TQT_SIGNAL( modified( bool ) ),
+ TQT_SLOT( slotModified( bool ) ) );
+ connect( doc, TQT_SIGNAL( paletteAvailable( bool ) ),
+ TQT_SLOT( slotPaletteAvailable( bool ) ) );
}
void KColorEditApp::initView()
@@ -178,7 +178,7 @@ bool KColorEditApp::queryExit()
}
/////////////////////////////////////////////////////////////////////
-// SLOT IMPLEMENTATION
+// TQT_SLOT IMPLEMENTATION
/////////////////////////////////////////////////////////////////////
void KColorEditApp::slotSelectionChanged( int begin, int end )
@@ -221,7 +221,7 @@ void KColorEditApp::slotFileOpen() {
if(doc->saveModified()) {
LoadPaletteDlg dialog(this);
if(dialog.exec()) {
- QString fileToOpen = dialog.getFileName();
+ TQString fileToOpen = dialog.getFileName();
if(!fileToOpen.isEmpty())
{
if(!doc->openDocument( fileToOpen )) {
@@ -255,12 +255,12 @@ bool KColorEditApp::slotFileSaveAs()
bool result = true;
while(result) {
- QString newName=KFileDialog::getSaveFileName(lastSavePaletteAsFileDir,
+ TQString newName=KFileDialog::getSaveFileName(lastSavePaletteAsFileDir,
"*|" + i18n("All Files"), this, i18n("Save As"));
if(newName.isEmpty())
result = false;
else {
- QFileInfo saveAsInfo(newName);
+ TQFileInfo saveAsInfo(newName);
if(!saveAsInfo.exists() ||
KMessageBox::questionYesNo( this,
i18n("A Document with this name already exists.\n"
@@ -291,7 +291,7 @@ void KColorEditApp::slotClose()
void KColorEditApp::slotFilePrint()
{
- QPrinter printer;
+ TQPrinter printer;
if (printer.setup(this))
{
view->print(&printer);
@@ -348,12 +348,12 @@ void KColorEditApp::slotViewColorNames()
doc->slotChangeViewMode(viewColorNames);
}
-void KColorEditApp::mouseReleaseEvent(QMouseEvent* event) {
+void KColorEditApp::mouseReleaseEvent(TQMouseEvent* event) {
if(gettingColorFromScreen) {
gettingColorFromScreen = false;
releaseMouse();
releaseKeyboard();
- QColor rgbColor = KColorDialog::grabColor(event->globalPos());
+ TQColor rgbColor = KColorDialog::grabColor(event->globalPos());
color.setComponents(rgbColor.red(), rgbColor.green(), rgbColor.blue());
view->chooseColor(&color);
} else
diff --git a/kcoloredit/kcoloredit.h b/kcoloredit/kcoloredit.h
index cd69cdaf..e30fff18 100644
--- a/kcoloredit/kcoloredit.h
+++ b/kcoloredit/kcoloredit.h
@@ -22,8 +22,8 @@
#include <config.h>
// include files for Qt
-#include <qevent.h>
-#include <qstringlist.h>
+#include <tqevent.h>
+#include <tqstringlist.h>
// include files for KDE
#include <kapplication.h>
@@ -109,7 +109,7 @@ class KColorEditApp : public KMainWindow
*/
virtual bool queryExit();
- void mouseReleaseEvent(QMouseEvent* event);
+ void mouseReleaseEvent(TQMouseEvent* event);
public slots:
diff --git a/kcoloredit/kcoloreditdoc.cpp b/kcoloredit/kcoloreditdoc.cpp
index 536300a5..ea9a0433 100644
--- a/kcoloredit/kcoloreditdoc.cpp
+++ b/kcoloredit/kcoloreditdoc.cpp
@@ -16,10 +16,10 @@
***************************************************************************/
// include files for Qt
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qwidget.h>
-#include <qclipboard.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqwidget.h>
+#include <tqclipboard.h>
// include files for KDE
#include <klocale.h>
@@ -31,9 +31,9 @@
#include "kcoloreditview.h"
#include "resource.h"
-KColorEditDoc::KColorEditDoc(QWidget *parent, const char *name) : QObject(parent, name),
+KColorEditDoc::KColorEditDoc(TQWidget *parent, const char *name) : TQObject(parent, name),
m_palette(), m_paletteHistory(&m_palette, 0) {
- m_pViewList = new QPtrList<KColorEditView>();
+ m_pViewList = new TQPtrList<KColorEditView>();
m_pViewList->setAutoDelete(true);
}
@@ -57,22 +57,22 @@ void KColorEditDoc::setModified(bool b) {
emit modified( b );
}
-void KColorEditDoc::setAbsFilePath(const QString &filename)
+void KColorEditDoc::setAbsFilePath(const TQString &filename)
{
m_absFilePath=filename;
}
-const QString &KColorEditDoc::absFilePath() const
+const TQString &KColorEditDoc::absFilePath() const
{
return m_absFilePath;
}
-void KColorEditDoc::setTitle(const QString &_t)
+void KColorEditDoc::setTitle(const TQString &_t)
{
m_title=_t;
}
-const QString &KColorEditDoc::title() const
+const TQString &KColorEditDoc::title() const
{
return m_title;
}
@@ -109,7 +109,7 @@ bool KColorEditDoc::saveModified()
KColorEditApp *window=(KColorEditApp *) parent();
int want_save = KMessageBox::warningYesNoCancel(window,
i18n("The current file has been modified.\n"
- "Do you want to save it?"), QString::null, KStdGuiItem::save(), i18n("Do Not Save"));
+ "Do you want to save it?"), TQString::null, KStdGuiItem::save(), i18n("Do Not Save"));
switch(want_save)
{
case KMessageBox::Yes:
@@ -151,7 +151,7 @@ bool KColorEditDoc::newDocument()
{
deleteContents();
setModified(false);
- setAbsFilePath( QDir::homeDirPath() );
+ setAbsFilePath( TQDir::homeDirPath() );
setTitle( i18n("Untitled") );
setPaletteCursorPos(0);
setPaletteSelection(0, 0);
@@ -159,12 +159,12 @@ bool KColorEditDoc::newDocument()
return true;
}
-bool KColorEditDoc::openDocument(const QString& filename) {
+bool KColorEditDoc::openDocument(const TQString& filename) {
if(filename.isEmpty())
return newDocument();
else {
deleteContents();
- QFileInfo fileInfo(filename);
+ TQFileInfo fileInfo(filename);
setAbsFilePath( fileInfo.absFilePath() );
if(!m_palette.load( absFilePath() )) {
setErrorString(m_palette.errorString());
@@ -181,7 +181,7 @@ bool KColorEditDoc::openDocument(const QString& filename) {
return true;
}
-bool KColorEditDoc::saveDocument(const QString& filename) {
+bool KColorEditDoc::saveDocument(const TQString& filename) {
if(!m_palette.save( filename )) {
setErrorString(m_palette.errorString());
return false;
@@ -194,11 +194,11 @@ void KColorEditDoc::deleteContents() {
m_palette.deleteContents();
}
-void KColorEditDoc::setErrorString(const QString& string) {
+void KColorEditDoc::setErrorString(const TQString& string) {
m_errorString = string;
}
-const QString& KColorEditDoc::errorString() const {
+const TQString& KColorEditDoc::errorString() const {
return m_errorString;
}
@@ -232,8 +232,8 @@ int KColorEditDoc::paletteSelectionEnd() const {
}
void KColorEditDoc::copyToClipboard(Palette& palette) {
- QString text;
- QTextOStream stream(&text);
+ TQString text;
+ TQTextOStream stream(&text);
palette.save(stream, 0, false);
KApplication::clipboard()->setText(text);
@@ -258,8 +258,8 @@ void KColorEditDoc::cut() {
void KColorEditDoc::paste() {
Palette palettePaste;
- QString text;
- QTextIStream stream(&text);
+ TQString text;
+ TQTextIStream stream(&text);
text = KApplication::clipboard()->text();
if(palettePaste.load( stream, false )) {
m_paletteHistory.paste(paletteCursorPos(), palettePaste);
diff --git a/kcoloredit/kcoloreditdoc.h b/kcoloredit/kcoloreditdoc.h
index 1d209f46..03d5ce70 100644
--- a/kcoloredit/kcoloreditdoc.h
+++ b/kcoloredit/kcoloreditdoc.h
@@ -23,9 +23,9 @@
#endif
// include files for QT
-#include <qobject.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
// application specific includes
#include "palette.h"
@@ -50,7 +50,7 @@ class KColorEditDoc : public QObject
public:
/** Constructor for the fileclass of the application */
- KColorEditDoc(QWidget *parent, const char *name=0);
+ KColorEditDoc(TQWidget *parent, const char *name=0);
/** Destructor for the fileclass of the application */
~KColorEditDoc();
@@ -71,19 +71,19 @@ class KColorEditDoc : public QObject
/** closes the actual document */
void closeDocument();
/** loads the document */
- bool openDocument(const QString& filename);
+ bool openDocument(const TQString& filename);
/** saves the document */
- bool saveDocument(const QString& filename);
+ bool saveDocument(const TQString& filename);
/** sets the path to the file connected with the document */
- void setAbsFilePath(const QString &filename);
+ void setAbsFilePath(const TQString &filename);
/** returns the pathname of the current document file*/
- const QString& absFilePath() const;
+ const TQString& absFilePath() const;
/** sets the filename of the document */
- void setTitle(const QString &_t);
+ void setTitle(const TQString &_t);
/** returns the title of the document */
- const QString& title() const;
+ const TQString& title() const;
/** @return a description of a possible unsuccessfull IO operation */
- const QString& errorString() const;
+ const TQString& errorString() const;
/** returns a pointer to paletteHistory */
PaletteHistory* paletteHistory();
/** sets a palette cursor position */
@@ -115,7 +115,7 @@ class KColorEditDoc : public QObject
protected:
/** Sets an error string if an IO operation was unsuccesfull */
- void setErrorString(const QString& string);
+ void setErrorString(const TQString& string);
/** Copies a palette to clipboard */
void copyToClipboard(Palette& palette);
@@ -136,14 +136,14 @@ class KColorEditDoc : public QObject
public:
/** the list of the views currently connected to the document */
- QPtrList<KColorEditView> *m_pViewList;
+ TQPtrList<KColorEditView> *m_pViewList;
private:
/** the modified flag of the current document */
bool m_modified;
- QString m_title;
- QString m_absFilePath;
- QString m_errorString;
+ TQString m_title;
+ TQString m_absFilePath;
+ TQString m_errorString;
protected:
Palette m_palette;
diff --git a/kcoloredit/kcoloreditview.cpp b/kcoloredit/kcoloreditview.cpp
index fe22f136..10484fe8 100644
--- a/kcoloredit/kcoloreditview.cpp
+++ b/kcoloredit/kcoloreditview.cpp
@@ -16,13 +16,13 @@
***************************************************************************/
// include files for Qt
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qvgroupbox.h>
-#include <qlineedit.h>
-#include <qcolor.h>
-#include <qprinter.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqvgroupbox.h>
+#include <tqlineedit.h>
+#include <tqcolor.h>
+#include <tqprinter.h>
// include files for KDE
#include <kseparator.h>
@@ -35,28 +35,28 @@
#include "kcoloredit.h"
#include "palette.h"
-KColorEditView::KColorEditView(QWidget *parent, const char *name) : QSplitter(parent, name) {
+KColorEditView::KColorEditView(TQWidget *parent, const char *name) : TQSplitter(parent, name) {
colorSelector = new ColorSelector(this);
colorSelector->slotSetColor(
Color( RGB_MAX_COMPONENT_VALUE, RGB_MAX_COMPONENT_VALUE, RGB_MAX_COMPONENT_VALUE, "" ));
- QWidget* paletteViewArea = new QWidget(this);
- QVBoxLayout* paletteLayout = new QVBoxLayout(paletteViewArea);
+ TQWidget* paletteViewArea = new TQWidget(this);
+ TQVBoxLayout* paletteLayout = new TQVBoxLayout(paletteViewArea);
paletteView = new PaletteView(16, 16, 2, this, paletteViewArea);
paletteLayout->addWidget(paletteView, 10);
- QHBoxLayout* layout = new QHBoxLayout();
- QVBoxLayout* addColorLayout = new QVBoxLayout(4);
+ TQHBoxLayout* layout = new TQHBoxLayout();
+ TQVBoxLayout* addColorLayout = new TQVBoxLayout(4);
addColorLayout->setMargin(8);
- QHBoxLayout* buttonsLayout = new QHBoxLayout(4);
- QPushButton* addColorButton = new QPushButton(i18n( "Add Color" ), paletteViewArea);
- connect(addColorButton, SIGNAL( clicked() ), SLOT( slotAddColor() ));
+ TQHBoxLayout* buttonsLayout = new TQHBoxLayout(4);
+ TQPushButton* addColorButton = new TQPushButton(i18n( "Add Color" ), paletteViewArea);
+ connect(addColorButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAddColor() ));
buttonsLayout->addWidget(addColorButton);
buttonsLayout->addStretch(10);
addColorLayout->addLayout(buttonsLayout);
- QCheckBox* atCursorCheckBox = new QCheckBox(i18n( "At cursor" ), paletteViewArea);
- connect(atCursorCheckBox, SIGNAL( toggled(bool) ), SLOT( slotAddColorAtCursor(bool) ));
+ TQCheckBox* atCursorCheckBox = new TQCheckBox(i18n( "At cursor" ), paletteViewArea);
+ connect(atCursorCheckBox, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotAddColorAtCursor(bool) ));
addColorLayout->addWidget(atCursorCheckBox);
- overwriteCheckBox = new QCheckBox(i18n( "Overwrite" ), paletteViewArea);
- connect(overwriteCheckBox, SIGNAL( toggled(bool) ), SLOT( slotAddColorOverwrite(bool) ));
+ overwriteCheckBox = new TQCheckBox(i18n( "Overwrite" ), paletteViewArea);
+ connect(overwriteCheckBox, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotAddColorOverwrite(bool) ));
slotAddColorAtCursor(false);
slotAddColorOverwrite(false);
addColorLayout->addWidget(overwriteCheckBox);
@@ -64,66 +64,66 @@ KColorEditView::KColorEditView(QWidget *parent, const char *name) : QSplitter(pa
//KSeparator* hLine = new KSeparator(KSeparator::HLine, paletteViewArea);
//addColorLayout->addWidget(hLine);
//addColorLayout->addStretch(10);
- //QCheckBox* cursorFollowsChosenColor = new QCheckBox(i18n( "Cursor follows" ), paletteViewArea);
+ //TQCheckBox* cursorFollowsChosenColor = new TQCheckBox(i18n( "Cursor follows" ), paletteViewArea);
//addColorLayout->addWidget(cursorFollowsChosenColor);
- //connect(cursorFollowsChosenColor, SIGNAL( toggled(bool) ),
- // paletteView, SLOT( slotCursorFollowsChosenColor(bool) ));
+ //connect(cursorFollowsChosenColor, TQT_SIGNAL( toggled(bool) ),
+ // paletteView, TQT_SLOT( slotCursorFollowsChosenColor(bool) ));
//cursorFollowsChosenColor->toggle();
paletteView->slotCursorFollowsChosenColor(true);
layout->addLayout(addColorLayout, 0);
- QVGroupBox* colorAtCursorFrame = new QVGroupBox(i18n("Color at Cursor"), paletteViewArea);
- QWidget* colorAtCursorFrameArea = new QWidget(colorAtCursorFrame);
- QVBoxLayout* colorAtCursorLayout = new QVBoxLayout(colorAtCursorFrameArea, 4);
- QHBoxLayout* colorNameLayout = new QHBoxLayout(0);
- QLabel* nameLabel = new QLabel(i18n( "Name" ) + ": ", colorAtCursorFrameArea);
+ TQVGroupBox* colorAtCursorFrame = new TQVGroupBox(i18n("Color at Cursor"), paletteViewArea);
+ TQWidget* colorAtCursorFrameArea = new TQWidget(colorAtCursorFrame);
+ TQVBoxLayout* colorAtCursorLayout = new TQVBoxLayout(colorAtCursorFrameArea, 4);
+ TQHBoxLayout* colorNameLayout = new TQHBoxLayout(0);
+ TQLabel* nameLabel = new TQLabel(i18n( "Name" ) + ": ", colorAtCursorFrameArea);
colorNameLayout->addWidget(nameLabel, 0);
- colorName = new QLineEdit(colorAtCursorFrameArea);
- connect(colorName, SIGNAL( textChanged(const QString&) ), SLOT( slotSetColorName(const QString&) ));
+ colorName = new TQLineEdit(colorAtCursorFrameArea);
+ connect(colorName, TQT_SIGNAL( textChanged(const TQString&) ), TQT_SLOT( slotSetColorName(const TQString&) ));
colorNameLayout->addWidget(colorName, 10);
colorAtCursorLayout->addLayout(colorNameLayout);
- QGridLayout* colorAtCursorComponentsLayout = new QGridLayout(3, 6, 4);
+ TQGridLayout* colorAtCursorComponentsLayout = new TQGridLayout(3, 6, 4);
colorAtCursorLayout->addLayout(colorAtCursorComponentsLayout);
colorAtCursorComponentsLayout->setColStretch(1, 10);
colorAtCursorComponentsLayout->addColSpacing(2, 8);
colorAtCursorComponentsLayout->setColStretch(4, 10);
colorAtCursorComponentsLayout->setColStretch(5, 10);
- QLabel* hLabel = new QLabel("H: ", colorAtCursorFrameArea);
+ TQLabel* hLabel = new TQLabel("H: ", colorAtCursorFrameArea);
colorAtCursorComponentsLayout->addWidget(hLabel, 0, 0);
- colorAtCursorHValueLabel = new QLabel("", colorAtCursorFrameArea);
+ colorAtCursorHValueLabel = new TQLabel("", colorAtCursorFrameArea);
setColorAtCursorComponentValueLabelSizes(colorAtCursorHValueLabel);
colorAtCursorComponentsLayout->addWidget(colorAtCursorHValueLabel, 0, 1);
- QLabel* sLabel = new QLabel("S: ", colorAtCursorFrameArea);
+ TQLabel* sLabel = new TQLabel("S: ", colorAtCursorFrameArea);
colorAtCursorComponentsLayout->addWidget(sLabel, 1, 0);
- colorAtCursorSValueLabel = new QLabel("", colorAtCursorFrameArea);
+ colorAtCursorSValueLabel = new TQLabel("", colorAtCursorFrameArea);
setColorAtCursorComponentValueLabelSizes(colorAtCursorSValueLabel);
colorAtCursorComponentsLayout->addWidget(colorAtCursorSValueLabel, 1, 1);
- QLabel* vLabel = new QLabel("V: ", colorAtCursorFrameArea);
+ TQLabel* vLabel = new TQLabel("V: ", colorAtCursorFrameArea);
colorAtCursorComponentsLayout->addWidget(vLabel, 2, 0);
- colorAtCursorVValueLabel = new QLabel("", colorAtCursorFrameArea);
+ colorAtCursorVValueLabel = new TQLabel("", colorAtCursorFrameArea);
setColorAtCursorComponentValueLabelSizes(colorAtCursorVValueLabel);
colorAtCursorComponentsLayout->addWidget(colorAtCursorVValueLabel, 2, 1);
- QLabel* rLabel = new QLabel("R: ", colorAtCursorFrameArea);
+ TQLabel* rLabel = new TQLabel("R: ", colorAtCursorFrameArea);
colorAtCursorComponentsLayout->addWidget(rLabel, 0, 3);
- colorAtCursorRValueLabel = new QLabel("", colorAtCursorFrameArea);
+ colorAtCursorRValueLabel = new TQLabel("", colorAtCursorFrameArea);
setColorAtCursorComponentValueLabelSizes(colorAtCursorRValueLabel);
colorAtCursorComponentsLayout->addWidget(colorAtCursorRValueLabel, 0, 4);
- QLabel* gLabel = new QLabel("G: ", colorAtCursorFrameArea);
+ TQLabel* gLabel = new TQLabel("G: ", colorAtCursorFrameArea);
colorAtCursorComponentsLayout->addWidget(gLabel, 1, 3);
- colorAtCursorGValueLabel = new QLabel("", colorAtCursorFrameArea);
+ colorAtCursorGValueLabel = new TQLabel("", colorAtCursorFrameArea);
setColorAtCursorComponentValueLabelSizes(colorAtCursorGValueLabel);
colorAtCursorComponentsLayout->addWidget(colorAtCursorGValueLabel, 1, 4);
- QLabel* bLabel = new QLabel("B: ", colorAtCursorFrameArea);
+ TQLabel* bLabel = new TQLabel("B: ", colorAtCursorFrameArea);
colorAtCursorComponentsLayout->addWidget(bLabel, 2, 3);
- colorAtCursorBValueLabel = new QLabel("", colorAtCursorFrameArea);
+ colorAtCursorBValueLabel = new TQLabel("", colorAtCursorFrameArea);
setColorAtCursorComponentValueLabelSizes(colorAtCursorBValueLabel);
colorAtCursorComponentsLayout->addWidget(colorAtCursorBValueLabel, 2, 4);
- QHBoxLayout* colorAtCursorRgbStringLayout = new QHBoxLayout();
- QLabel* colorAtCursorRgbStringLabel =
- new QLabel("RGB " + i18n( "hex." ) + ": ", colorAtCursorFrameArea);
+ TQHBoxLayout* colorAtCursorRgbStringLayout = new TQHBoxLayout();
+ TQLabel* colorAtCursorRgbStringLabel =
+ new TQLabel("RGB " + i18n( "hex." ) + ": ", colorAtCursorFrameArea);
colorAtCursorRgbStringLayout->addWidget(colorAtCursorRgbStringLabel);
- colorAtCursorRgbStringValueLabel = new QLabel("", colorAtCursorFrameArea);
+ colorAtCursorRgbStringValueLabel = new TQLabel("", colorAtCursorFrameArea);
colorAtCursorRgbStringValueLabel->setFixedWidth(
- colorAtCursorRgbStringValueLabel->fontMetrics().width( QString("8888888") ));
+ colorAtCursorRgbStringValueLabel->fontMetrics().width( TQString("8888888") ));
colorAtCursorRgbStringLayout->addWidget(colorAtCursorRgbStringValueLabel);
colorAtCursorRgbStringLayout->addStretch();
colorAtCursorLayout->addLayout(colorAtCursorRgbStringLayout);
@@ -139,9 +139,9 @@ KColorEditView::KColorEditView(QWidget *parent, const char *name) : QSplitter(pa
KColorEditView::~KColorEditView() {
}
-void KColorEditView::setColorAtCursorComponentValueLabelSizes(QLabel* const label) {
- label->setMinimumWidth(label->fontMetrics().width( QString("888") ));
- label->setMaximumWidth(label->fontMetrics().width( QString("88888") ));
+void KColorEditView::setColorAtCursorComponentValueLabelSizes(TQLabel* const label) {
+ label->setMinimumWidth(label->fontMetrics().width( TQString("888") ));
+ label->setMaximumWidth(label->fontMetrics().width( TQString("88888") ));
}
KColorEditDoc *KColorEditView::document() const {
@@ -150,8 +150,8 @@ KColorEditDoc *KColorEditView::document() const {
return theApp->document();
}
-void KColorEditView::print(QPrinter *pPrinter) {
- QPainter printpainter;
+void KColorEditView::print(TQPrinter *pPrinter) {
+ TQPainter printpainter;
printpainter.begin(pPrinter);
// TODO: add your printing code here
@@ -167,7 +167,7 @@ void KColorEditView::slotCursorPosChanged(int position) {
Palette* palette = document()->paletteHistory()->editableStream();
if(position < palette->length()) {
Color* color = palette->color(position);
- QString string;
+ TQString string;
inColorNameChanging = true;
colorName->setText(color->name());
colorName->setEnabled(true);
@@ -178,7 +178,7 @@ void KColorEditView::slotCursorPosChanged(int position) {
colorAtCursorRValueLabel->setText(string.setNum( rComponent ));
colorAtCursorGValueLabel->setText(string.setNum( gComponent ));
colorAtCursorBValueLabel->setText(string.setNum( bComponent ));
- QColor hsvColor(rComponent, gComponent, bComponent);
+ TQColor hsvColor(rComponent, gComponent, bComponent);
int hComponent;
int sComponent;
int vComponent;
@@ -254,7 +254,7 @@ void KColorEditView::slotAddColorOverwrite(bool overwrite) {
addColorMode = INSERT_COLOR;
}
-void KColorEditView::slotSetColorName(const QString& name) {
+void KColorEditView::slotSetColorName(const TQString& name) {
if(!inColorNameChanging) {
/*
Palette* palette = getDocument()->getPaletteHistory()->getEditableStream();
diff --git a/kcoloredit/kcoloreditview.h b/kcoloredit/kcoloreditview.h
index ec0ca17f..0bc2a569 100644
--- a/kcoloredit/kcoloreditview.h
+++ b/kcoloredit/kcoloreditview.h
@@ -23,9 +23,9 @@
#endif
// include files for Qt
-#include <qsplitter.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqsplitter.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
// application specific includes
#include "colorselector.h"
@@ -34,19 +34,19 @@
class KColorEditDoc;
/** The KColorEditView class provides the view widget for the KColorEditApp instance.
- * The View instance inherits QWidget as a base class and represents the view object of a KMainWindow. As KColorEditView is part of the
+ * The View instance inherits TQWidget as a base class and represents the view object of a KMainWindow. As KColorEditView is part of the
* docuement-view model, it needs a reference to the document object connected with it by the KColorEditApp class to manipulate and display
* the document structure provided by the KColorEditDoc class.
*
* @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team.
* @version KDevelop version 0.4 code generation
*/
-class KColorEditView : public QSplitter {
+class KColorEditView : public TQSplitter {
Q_OBJECT
public:
/** Constructor for the main view */
- KColorEditView(QWidget *parent = 0, const char *name = 0);
+ KColorEditView(TQWidget *parent = 0, const char *name = 0);
/** Destructor for the main view */
~KColorEditView();
@@ -58,7 +58,7 @@ class KColorEditView : public QSplitter {
KColorEditDoc *document() const;
/** Contains the implementation for printing functionality */
- void print(QPrinter *pPrinter);
+ void print(TQPrinter *pPrinter);
/** Chooses a color to the color selector */
void chooseColor(Color* const color);
/** Updates the view after the document has been changed */
@@ -84,7 +84,7 @@ class KColorEditView : public QSplitter {
/** Sets whether insert or replace a color */
void slotAddColorOverwrite(bool overwrite);
/** Sets a color name */
- void slotSetColorName(const QString& name);
+ void slotSetColorName(const TQString& name);
protected:
/** Add color mode constants */
@@ -92,23 +92,23 @@ class KColorEditView : public QSplitter {
REPLACE_COLOR = 1 };
/** Color mode widget */
- QCheckBox* overwriteCheckBox;
+ TQCheckBox* overwriteCheckBox;
/** Color name widget */
- QLineEdit* colorName;
+ TQLineEdit* colorName;
/** H component value label of the color at cursor */
- QLabel* colorAtCursorHValueLabel;
+ TQLabel* colorAtCursorHValueLabel;
/** S component value label of the color at cursor */
- QLabel* colorAtCursorSValueLabel;
+ TQLabel* colorAtCursorSValueLabel;
/** V component value label of the color at cursor */
- QLabel* colorAtCursorVValueLabel;
+ TQLabel* colorAtCursorVValueLabel;
/** R component value label of the color at cursor */
- QLabel* colorAtCursorRValueLabel;
+ TQLabel* colorAtCursorRValueLabel;
/** G component value label of the color at cursor */
- QLabel* colorAtCursorGValueLabel;
+ TQLabel* colorAtCursorGValueLabel;
/** B component value label of the color at cursor */
- QLabel* colorAtCursorBValueLabel;
+ TQLabel* colorAtCursorBValueLabel;
/** RGB Hex string value label of the color at cursor */
- QLabel* colorAtCursorRgbStringValueLabel;
+ TQLabel* colorAtCursorRgbStringValueLabel;
/** If add a color at cursor */
bool addColorAtCursor;
/** Add color mode */
@@ -120,7 +120,7 @@ class KColorEditView : public QSplitter {
protected:
/** Sets component value label of the color at cursor sizes */
- void setColorAtCursorComponentValueLabelSizes(QLabel* const label);
+ void setColorAtCursorComponentValueLabelSizes(TQLabel* const label);
/** Updates color value labels */
void updateColorValueLabels();
};
diff --git a/kcoloredit/kxycolorselector.cpp b/kcoloredit/kxycolorselector.cpp
index e12f7987..4a717c5e 100644
--- a/kcoloredit/kxycolorselector.cpp
+++ b/kcoloredit/kxycolorselector.cpp
@@ -15,15 +15,15 @@
* *
***************************************************************************/
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qimage.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
#include <kimageeffect.h>
#include <kpalette.h>
#include "kxycolorselector.h"
-KXYColorSelector::KXYColorSelector(QWidget *parent, const char *name) : KXYSelector(parent,name) {
+KXYColorSelector::KXYColorSelector(TQWidget *parent, const char *name) : KXYSelector(parent,name) {
setBackgroundMode(NoBackground);
setRange(0, 0, COMPONENT_SELECTION_RESOLUTION - 1, COMPONENT_SELECTION_RESOLUTION - 1);
setType(TYPE_NONE);
@@ -45,17 +45,17 @@ void KXYColorSelector::updateContents() {
repaint();
}
-void KXYColorSelector::resizeEvent(QResizeEvent*) {
+void KXYColorSelector::resizeEvent(TQResizeEvent*) {
setValues(xValue(), yValue());
updateContents();
}
-void KXYColorSelector::drawContents(QPainter* painter) {
+void KXYColorSelector::drawContents(TQPainter* painter) {
painter->drawPixmap(contentsRect().x(), contentsRect().y(), pixmap);
}
-void KXYColorSelector::drawCursor(QPainter* painter, int x, int y) {
- QColor color;
+void KXYColorSelector::drawCursor(TQPainter* painter, int x, int y) {
+ TQColor color;
int colorX = x - contentsRect().x();
int colorY = y - contentsRect().y();
if(colorX < 0)
@@ -67,13 +67,13 @@ void KXYColorSelector::drawCursor(QPainter* painter, int x, int y) {
if(colorY > contentsRect().height() - 1)
colorY = contentsRect().height() - 1;
setColor(&color, colorX, colorY);
- QColor cursorColor;
+ 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;
else
cursorColor = Qt::white;
- painter->setPen(QPen( cursorColor ));
+ painter->setPen(TQPen( cursorColor ));
const int lineBegin = 2;
const int lineEnd = 6;
painter->drawLine(x + lineBegin, y - lineBegin, x + lineEnd, y - lineEnd);
@@ -90,7 +90,7 @@ int KXYColorSelector::globalComponent() const{
return m_globalComponent;
}
-void KXYColorSelector::setColor(QColor* const color, const int x, const int y) {
+void KXYColorSelector::setColor(TQColor* const color, const int x, const int y) {
int xSize = contentsRect().width();
int ySize = contentsRect().height();
switch(type) {
@@ -131,8 +131,8 @@ void KXYColorSelector::setColor(QColor* const color, const int x, const int y) {
}
}
-QColor* KXYColorSelector::standardColorsPalette() {
- QColor* palette = new QColor[STANDARD_PALETTE_SIZE];
+TQColor* KXYColorSelector::standardColorsPalette() {
+ TQColor* palette = new QColor[STANDARD_PALETTE_SIZE];
int i = 0;
palette[i++] = Qt::red;
palette[i++] = Qt::green;
@@ -154,11 +154,11 @@ QColor* KXYColorSelector::standardColorsPalette() {
return palette;
}
-void KXYColorSelector::drawPalette(QPixmap* pixmap) {
+void KXYColorSelector::drawPalette(TQPixmap* pixmap) {
int xSize = contentsRect().width();
int ySize = contentsRect().height();
- QImage image(xSize, ySize, 32);
- QColor color;
+ TQImage image(xSize, ySize, 32);
+ TQColor color;
int x;
int y;
@@ -173,9 +173,9 @@ void KXYColorSelector::drawPalette(QPixmap* pixmap) {
++p;
}
}
- if (QColor::numBitPlanes() <= 8)
+ if (TQColor::numBitPlanes() <= 8)
{
- QColor* standardPalette = standardColorsPalette();
+ TQColor* standardPalette = standardColorsPalette();
KImageEffect::dither(image, standardPalette, STANDARD_PALETTE_SIZE);
delete[] standardPalette;
}
diff --git a/kcoloredit/kxycolorselector.h b/kcoloredit/kxycolorselector.h
index 3213c59c..6225d74f 100644
--- a/kcoloredit/kxycolorselector.h
+++ b/kcoloredit/kxycolorselector.h
@@ -18,7 +18,7 @@
#ifndef KXYCOLORSELECTOR_H
#define KXYCOLORSELECTOR_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kselect.h>
#include "main.h"
@@ -46,7 +46,7 @@ public:
/** Constructs a two-dimensional color component selector widget,
* with a type TYPE_NONE and ranges 0 .. MAX_COLOR_COMPONENT_VALUE
*/
- KXYColorSelector(QWidget *parent=0, const char *name=0);
+ KXYColorSelector(TQWidget *parent=0, const char *name=0);
~KXYColorSelector();
/** Set the type of the selector */
void setType(const int type);
@@ -72,26 +72,26 @@ protected:
/** Draws the contents of the widget on a pixmap,
* which is used for buffering.
*/
- virtual void drawPalette( QPixmap *pixmap );
+ virtual void drawPalette( TQPixmap *pixmap );
/** @reimplemented */
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
/** Reimplemented from KXYSelector. This drawing is
* buffered in a pixmap here. As real drawing
* routine, drawPalette() is used.
*/
- virtual void drawContents( QPainter *painter );
+ virtual void drawContents( TQPainter *painter );
/** Draws the cursor */
- virtual void drawCursor(QPainter* painter, int x, int y);
+ virtual void drawCursor(TQPainter* painter, int x, int y);
/** set a color at a given coordinate */
- virtual void setColor(QColor* const color, const int x, const int y);
+ virtual void setColor(TQColor* const color, const int x, const int y);
/** @return STANDARD_PALETTE_SIZE colors used to dither the
* pixmap if number of color planes <= 8
*/
- QColor* standardColorsPalette();
+ TQColor* standardColorsPalette();
private:
/* The buffering pixmap */
- QPixmap pixmap;
+ TQPixmap pixmap;
};
#endif
diff --git a/kcoloredit/kzcolorselector.cpp b/kcoloredit/kzcolorselector.cpp
index 36953180..b00991a2 100644
--- a/kcoloredit/kzcolorselector.cpp
+++ b/kcoloredit/kzcolorselector.cpp
@@ -15,20 +15,20 @@
* *
***************************************************************************/
-#include <qpainter.h>
-#include <qimage.h>
+#include <tqpainter.h>
+#include <tqimage.h>
#include <kimageeffect.h>
#include <kpalette.h>
#include "main.h"
#include "kzcolorselector.h"
-KZColorSelector::KZColorSelector(Orientation o, QWidget *parent, const char *name) :
+KZColorSelector::KZColorSelector(Orientation o, TQWidget *parent, const char *name) :
KSelector(o, parent, name) {
baseColorH = -1;
baseColorS = 0;
baseColorV = 0;
- pixmap.setOptimization( QPixmap::BestOptim );
+ pixmap.setOptimization( TQPixmap::BestOptim );
}
KZColorSelector::~KZColorSelector() {
}
@@ -56,15 +56,15 @@ void KZColorSelector::updateContents() {
repaint(false);
}
-void KZColorSelector::resizeEvent(QResizeEvent*) {
+void KZColorSelector::resizeEvent(TQResizeEvent*) {
updateContents();
}
-void KZColorSelector::drawContents(QPainter* painter) {
+void KZColorSelector::drawContents(TQPainter* painter) {
painter->drawPixmap(contentsRect().x(), contentsRect().y(), pixmap);
}
-void KZColorSelector::setBaseColor(const QColor& color) {
+void KZColorSelector::setBaseColor(const TQColor& color) {
color.hsv(&baseColorH, &baseColorS, &baseColorV);
}
@@ -100,7 +100,7 @@ void KZColorSelector::updatePointerPos() {
setValue(pos);
}
-void KZColorSelector::setColor(QColor* const color, const int y) {
+void KZColorSelector::setColor(TQColor* const color, const int y) {
int ySize = contentsRect().height();
switch(type) {
case TYPE_H:
@@ -118,8 +118,8 @@ void KZColorSelector::setColor(QColor* const color, const int y) {
}
}
-QColor* KZColorSelector::getStandardColorsPalette() {
- QColor* palette = new QColor[( int )STANDARD_PALETTE_SIZE];
+TQColor* KZColorSelector::getStandardColorsPalette() {
+ TQColor* palette = new QColor[( int )STANDARD_PALETTE_SIZE];
int i = 0;
palette[i++] = Qt::red;
palette[i++] = Qt::green;
@@ -141,11 +141,11 @@ QColor* KZColorSelector::getStandardColorsPalette() {
return palette;
}
-void KZColorSelector::drawPalette(QPixmap* pixmap) {
+void KZColorSelector::drawPalette(TQPixmap* pixmap) {
int xSize = contentsRect().width();
int ySize = contentsRect().height();
- QImage image(xSize, ySize, 32);
- QColor color;
+ TQImage image(xSize, ySize, 32);
+ TQColor color;
int x;
int y;
@@ -159,9 +159,9 @@ void KZColorSelector::drawPalette(QPixmap* pixmap) {
++p;
}
}
- if (QColor::numBitPlanes() <= 8)
+ if (TQColor::numBitPlanes() <= 8)
{
- QColor* standardPalette = getStandardColorsPalette();
+ TQColor* standardPalette = getStandardColorsPalette();
KImageEffect::dither(image, standardPalette, STANDARD_PALETTE_SIZE);
delete[] standardPalette;
}
diff --git a/kcoloredit/kzcolorselector.h b/kcoloredit/kzcolorselector.h
index cafdb254..60e32f0a 100644
--- a/kcoloredit/kzcolorselector.h
+++ b/kcoloredit/kzcolorselector.h
@@ -18,8 +18,8 @@
#ifndef KZCOLORSELECTOR_H
#define KZCOLORSELECTOR_H
-#include "qcolor.h"
-#include "qpixmap.h"
+#include "tqcolor.h"
+#include "tqpixmap.h"
#include "kselect.h"
#include "color.h"
@@ -37,14 +37,14 @@ public:
TYPE_V = 2 };
/** Constructs the widget */
- KZColorSelector(Orientation o, QWidget *parent=0, const char *name=0);
+ KZColorSelector(Orientation o, TQWidget *parent=0, const char *name=0);
~KZColorSelector();
/** Sets the selector type */
void setType(const int type);
/** Update the pixmap */
void updateContents();
/** Set the global components */
- void setBaseColor(const QColor& color);
+ void setBaseColor(const TQColor& color);
/** Set the global components using HSV components */
void setBaseColorHsv(const int colorH, const int colorS, const int colorV);
/** Updates a pointer position due to the base color */
@@ -69,21 +69,21 @@ protected:
/** Draws the contents of the widget on a pixmap,
* which is used for buffering.
*/
- virtual void drawPalette( QPixmap *pixmap );
+ virtual void drawPalette( TQPixmap *pixmap );
/** @reimplemented */
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
/** Draws a color gradient in the selector */
- virtual void drawContents( QPainter *painter );
+ virtual void drawContents( TQPainter *painter );
/** Sets a color at a given coordinate */
- virtual void setColor(QColor* const color, const int y);
+ virtual void setColor(TQColor* const color, const int y);
/** @return STANDARD_PALETTE_SIZE colors used to dither the
* pixmap if number of color planes <= 8
*/
- QColor* getStandardColorsPalette();
+ TQColor* getStandardColorsPalette();
private:
/* The buffering pixmap */
- QPixmap pixmap;
+ TQPixmap pixmap;
};
#endif
diff --git a/kcoloredit/loadpalettedlg.cpp b/kcoloredit/loadpalettedlg.cpp
index b426a874..23def4d5 100644
--- a/kcoloredit/loadpalettedlg.cpp
+++ b/kcoloredit/loadpalettedlg.cpp
@@ -17,11 +17,11 @@
#include <string.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kpalette.h>
@@ -31,22 +31,22 @@
#include "palette.h"
#include "loadpalettedlg.h"
-LoadPaletteDlg::LoadPaletteDlg(QWidget *parent, const char *name)
+LoadPaletteDlg::LoadPaletteDlg(TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n( "Load Palette" ),
Ok|Cancel, Ok, true) {
fileName = "";
- QWidget *mainWidget = new QWidget( this );
+ TQWidget *mainWidget = new TQWidget( this );
setMainWidget( mainWidget );
- QVBoxLayout* topLayout = new QVBoxLayout(mainWidget, 0, spacingHint());
- QLabel* label = new QLabel(i18n( "Select a palette:" ), mainWidget);
+ TQVBoxLayout* topLayout = new TQVBoxLayout(mainWidget, 0, spacingHint());
+ TQLabel* label = new TQLabel(i18n( "Select a palette:" ), mainWidget);
topLayout->addWidget(label);
- paletteBox = new QComboBox(false, mainWidget);
+ paletteBox = new TQComboBox(false, mainWidget);
browseFileNameInserted = false;
- QStringList palettesList = Palette::kdePalettes();
- for(QStringList::Iterator palette = palettesList.begin();
+ TQStringList palettesList = Palette::kdePalettes();
+ for(TQStringList::Iterator palette = palettesList.begin();
palette != palettesList.end(); ++palette) {
bool prepend = (*palette).contains( "colors/Custom_Colors" );
- QString fileName = locate("config", (*palette));
+ TQString fileName = locate("config", (*palette));
if(prepend) {
palettesFileNames.prepend(fileName);
setFileName(&fileName);
@@ -55,7 +55,7 @@ LoadPaletteDlg::LoadPaletteDlg(QWidget *parent, const char *name)
if(palette == palettesList.begin())
setFileName(&fileName);
}
- QString paletteName = (*palette).mid(palettesDir.length() + 1);
+ TQString paletteName = (*palette).mid(palettesDir.length() + 1);
if(paletteName == "Custom_Colors")
paletteName = i18n("Custom Colors");
else if(paletteName == "Recent_Colors")
@@ -65,12 +65,12 @@ LoadPaletteDlg::LoadPaletteDlg(QWidget *parent, const char *name)
else
paletteBox->insertItem(paletteName);
}
- connect(paletteBox, SIGNAL( activated(int) ), SLOT( setFileName(int) ));
+ connect(paletteBox, TQT_SIGNAL( activated(int) ), TQT_SLOT( setFileName(int) ));
topLayout->addWidget(paletteBox);
- QHBoxLayout* browseLayout = new QHBoxLayout( mainWidget );
- QPushButton* browseButton = new QPushButton(i18n( "Browse..." ),
+ TQHBoxLayout* browseLayout = new TQHBoxLayout( mainWidget );
+ TQPushButton* browseButton = new TQPushButton(i18n( "Browse..." ),
mainWidget);
- connect(browseButton, SIGNAL( clicked() ), SLOT( browseFileNames() ));
+ connect(browseButton, TQT_SIGNAL( clicked() ), TQT_SLOT( browseFileNames() ));
browseLayout->addWidget(browseButton);
browseLayout->addStretch(10);
topLayout->addLayout(browseLayout);
@@ -80,7 +80,7 @@ LoadPaletteDlg::LoadPaletteDlg(QWidget *parent, const char *name)
LoadPaletteDlg::~LoadPaletteDlg() {
}
-void LoadPaletteDlg::setFileName(QString* fileName) {
+void LoadPaletteDlg::setFileName(TQString* fileName) {
this->fileName = *fileName;
}
@@ -89,7 +89,7 @@ void LoadPaletteDlg::setFileName(int index) {
}
void LoadPaletteDlg::browseFileNames() {
- QString fileToOpen = KFileDialog::getOpenFileName(lastOpenPaletteFileDir,
+ TQString fileToOpen = KFileDialog::getOpenFileName(lastOpenPaletteFileDir,
i18n("*|All Files"), this, i18n("Open File"));
if(!fileToOpen.isEmpty()) {
fileName = fileToOpen;
@@ -105,7 +105,7 @@ void LoadPaletteDlg::browseFileNames() {
}
}
-QString LoadPaletteDlg::getFileName() {
+TQString LoadPaletteDlg::getFileName() {
return fileName;
}
#include "loadpalettedlg.moc"
diff --git a/kcoloredit/loadpalettedlg.h b/kcoloredit/loadpalettedlg.h
index 3168ed68..f7dd50cb 100644
--- a/kcoloredit/loadpalettedlg.h
+++ b/kcoloredit/loadpalettedlg.h
@@ -18,7 +18,7 @@
#ifndef LOADPALETTEDLG_H
#define LOADPALETTEDLG_H
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include <kdialog.h>
/**A dialog showing a list of installed palettes, with a possibility
@@ -31,16 +31,16 @@ class LoadPaletteDlg : public KDialogBase {
public:
/** constructs the dialog
*/
- LoadPaletteDlg(QWidget *parent = 0, const char *name = 0);
+ LoadPaletteDlg(TQWidget *parent = 0, const char *name = 0);
~LoadPaletteDlg();
/** @return the fetched file name
*/
- QString getFileName();
+ TQString getFileName();
protected slots:
/** sets fileName
*/
- void setFileName(QString* fileName);
+ void setFileName(TQString* fileName);
/** sets fileName to that at position index in palettesFileNames
*/
void setFileName(int index);
@@ -51,13 +51,13 @@ protected slots:
private:
/** A widget holding palettes names
*/
- QComboBox* paletteBox;
+ TQComboBox* paletteBox;
/** A list of KDE palettes file names
*/
- QStringList palettesFileNames;
+ TQStringList palettesFileNames;
/** A fetched palette file name
*/
- QString fileName;
+ TQString fileName;
/** whether a browse file name hab already been inserted into
* palettesFilenames
*/
diff --git a/kcoloredit/main.h b/kcoloredit/main.h
index 5e0b086a..3794f5ec 100644
--- a/kcoloredit/main.h
+++ b/kcoloredit/main.h
@@ -18,8 +18,8 @@
#ifndef __MAIN_H__
#define __MAIN_H__
-#include <qstring.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqdir.h>
/** The maximum red, green or blue component value in RGB scheme
*/
@@ -39,14 +39,14 @@ const int HSV_MAX_V_VALUE = 255;
/** name of KDE config directories containing palette files
*/
-static const QString palettesDir("colors");
+static const TQString palettesDir("colors");
/** last open file dialog path
*/
-static QString lastOpenPaletteFileDir = QDir::homeDirPath();
+static TQString lastOpenPaletteFileDir = TQDir::homeDirPath();
/** last save file as dialog path
*/
-static QString lastSavePaletteAsFileDir = QDir::homeDirPath();
+static TQString lastSavePaletteAsFileDir = TQDir::homeDirPath();
#endif /* !defined( __MAIN_H__ ) */
diff --git a/kcoloredit/palette.cpp b/kcoloredit/palette.cpp
index 1e11aa27..42758b41 100644
--- a/kcoloredit/palette.cpp
+++ b/kcoloredit/palette.cpp
@@ -15,10 +15,10 @@
* *
***************************************************************************/
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <kglobal.h>
#include <kstandarddirs.h>
#include <klocale.h>
@@ -45,17 +45,17 @@ void Palette::init() {
colors.setAutoDelete(true);
}
-QStringList Palette::kdePalettes() {
- QStringList paletteList;
+TQStringList Palette::kdePalettes() {
+ TQStringList paletteList;
KGlobal::dirs()->findAllResources("config", palettesDir + "/*", false, true, paletteList);
return paletteList;
}
-void Palette::setName(const QString& name) {
+void Palette::setName(const TQString& name) {
m_name = name;
}
-const QString& Palette::name() const {
+const TQString& Palette::name() const {
return m_name;
}
@@ -102,20 +102,20 @@ void Palette::paste(const int index, Palette& palette) {
insert(index + colorIndex, new Color( *palette.color(colorIndex) ));
}
-bool Palette::load(QTextStream& stream, bool loadName /* = true */) {
+bool Palette::load(TQTextStream& stream, bool loadName /* = true */) {
bool result = true;
setName("KDE palette");
int lineNum = 0;
while (!stream.atEnd()) {
- QString string = stream.readLine().append(' ');
- if(string.find( QRegExp("[^\\s]") ) == -1 ||
+ TQString string = stream.readLine().append(' ');
+ if(string.find( 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(QRegExp( "[^\\s]" ));
+ int position = string.find(TQRegExp( "[^\\s]" ));
for(int componentIndex = 0; componentIndex < Color::COMPONENTS_NUM;
++componentIndex) {
if(position == -1) {
@@ -123,13 +123,13 @@ bool Palette::load(QTextStream& stream, bool loadName /* = true */) {
result = false;
break;
}
- int endPosition = string.find(QRegExp( "\\s" ), position);
+ int endPosition = string.find(TQRegExp( "\\s" ), position);
if(endPosition == -1) {
m_errorString = i18n("Invalid format");
result = false;
break;
}
- QString componentString = string.mid(position, endPosition - position);
+ TQString componentString = string.mid(position, endPosition - position);
int componentValue = componentString.toInt(&result);
if(!result ||
componentValue < 0 ||
@@ -139,7 +139,7 @@ bool Palette::load(QTextStream& stream, bool loadName /* = true */) {
break;
}
newColor->setComponent(componentIndex, componentValue);
- position = string.find(QRegExp( "[^\\s]" ), endPosition);
+ position = string.find(TQRegExp( "[^\\s]" ), endPosition);
}
if(!result) {
delete newColor;
@@ -156,44 +156,44 @@ bool Palette::load(QTextStream& stream, bool loadName /* = true */) {
return result;
}
-bool Palette::load(const QString& fileName) {
+bool Palette::load(const TQString& fileName) {
bool result = true;
- QFile file(fileName);
+ TQFile file(fileName);
if(!file.open( IO_ReadOnly )) {
m_errorString = i18n("Could not open file");
result = false;
} else {
- QTextStream stream(&file);
+ TQTextStream stream(&file);
result = load(stream);
file.close();
}
return result;
}
-bool Palette::save(QTextStream& stream, const QFile* file /* = 0 */,
+bool Palette::save(TQTextStream& stream, const TQFile* file /* = 0 */,
bool saveName /* = true */) {
bool result = true;
if(saveName)
- stream << name() + QString("\n");
+ stream << name() + TQString("\n");
if(file && file->status() != IO_Ok) {
m_errorString = i18n("Write error");
result = false;
} else
for(int colorIndex = 0; colorIndex < length(); ++colorIndex) {
Color* col = color(colorIndex);
- QString redComponentString;
- QString greenComponentString;
- QString blueComponentString;
+ TQString redComponentString;
+ TQString greenComponentString;
+ TQString blueComponentString;
redComponentString.setNum(col->component( Color::RED_INDEX ));
greenComponentString.setNum(col->component( Color::GREEN_INDEX ));
blueComponentString.setNum(col->component( Color::BLUE_INDEX ));
- QString nameString = col->name();
+ TQString nameString = col->name();
if(!nameString.isEmpty())
nameString.prepend(" ");
- stream << redComponentString + QString(" ") +
- greenComponentString + QString(" ") +
+ stream << redComponentString + TQString(" ") +
+ greenComponentString + TQString(" ") +
blueComponentString +
- nameString + QString("\n");
+ nameString + TQString("\n");
if(file && file->status() != IO_Ok) {
m_errorString = i18n("Write error");
result = false;
@@ -203,14 +203,14 @@ bool Palette::save(QTextStream& stream, const QFile* file /* = 0 */,
return result;
}
-bool Palette::save(const QString& fileName) {
+bool Palette::save(const TQString& fileName) {
bool result = true;
- QFile file(fileName);
+ TQFile file(fileName);
if(!file.open( IO_WriteOnly|IO_Truncate )) {
m_errorString = i18n("Could not open file for writing");
result = false;
} else {
- QTextStream stream(&file);
+ TQTextStream stream(&file);
result = save(stream);
file.close();
}
@@ -221,6 +221,6 @@ void Palette::deleteContents() {
colors.clear();
}
-const QString& Palette::errorString() const {
+const TQString& Palette::errorString() const {
return m_errorString;
}
diff --git a/kcoloredit/palette.h b/kcoloredit/palette.h
index 7b763296..a363ada4 100644
--- a/kcoloredit/palette.h
+++ b/kcoloredit/palette.h
@@ -18,9 +18,9 @@
#ifndef PALETTE_H
#define PALETTE_H
-#include <qstring.h>
-#include <qtextstream.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
#include "color.h"
@@ -35,11 +35,11 @@ public:
Palette(const Palette& palette);
~Palette();
/** @return A list of KDE palettes */
- static QStringList kdePalettes();
+ static TQStringList kdePalettes();
/** sets palette name */
- void setName(const QString& name);
+ void setName(const TQString& name);
/** @return palette name */
- const QString& name() const;
+ const TQString& name() const;
/** inserts a color at a given position */
void insert(const int index, Color* const color);
/** appends a color */
@@ -61,32 +61,32 @@ public:
/** Loads a palette from a text stream
* @return whether the load was succesfull
*/
- bool load(QTextStream& stream, bool loadName = true);
+ bool load(TQTextStream& stream, bool loadName = true);
/** Loads a palette from a file.
* If loadName is true, palette name is expected.
* @return whether the load was succesfull
*/
- bool load(const QString& fileName);
+ bool load(const TQString& fileName);
/** Saves a palette into a text stream.
* If file is given, it is checked for IO errors.
* If saveName is true, palette name is saved.
* @return whether save was succesfull
*/
- bool save(QTextStream& stream, const QFile* file = 0, bool saveName = true);
+ bool save(TQTextStream& stream, const TQFile* file = 0, bool saveName = true);
/** Saves a palette to a file
* @return whether save was succesfull
*/
- bool save(const QString& fileName);
+ bool save(const TQString& fileName);
/** Deletes contents of the palette */
void deleteContents();
/** @return A possible error description from the last unsuccessfull
* IO operation
*/
- const QString& errorString() const;
+ const TQString& errorString() const;
private:
/** The palette name */
- QString m_name;
+ TQString m_name;
private:
/** Initialization method called by constructors */
@@ -94,9 +94,9 @@ private:
protected:
/** A list of palette colors */
- QPtrList<Color> colors;
+ TQPtrList<Color> colors;
/** An IO error description */
- QString m_errorString;
+ TQString m_errorString;
};
#endif
diff --git a/kcoloredit/paletteview.cpp b/kcoloredit/paletteview.cpp
index 8e05a2d7..6648d88b 100644
--- a/kcoloredit/paletteview.cpp
+++ b/kcoloredit/paletteview.cpp
@@ -15,34 +15,34 @@
* *
***************************************************************************/
-#include <qlayout.h>
+#include <tqlayout.h>
#include "kcoloreditview.h"
#include "paletteview.h"
PaletteView::PaletteView(const int defaultCellWidth, const int defaultCellHeight, const int cellSpacing,
- KColorEditView* view, QWidget *parent, const char *name) :
- QFrame(parent, name, QWidget::WResizeNoErase*0) {
+ KColorEditView* view, TQWidget *parent, const char *name) :
+ TQFrame(parent, name, TQWidget::WResizeNoErase*0) {
setFrameStyle(StyledPanel|Sunken);
setLineWidth(2);
- QGridLayout* topLayout = new QGridLayout(this, 2, 2);
+ TQGridLayout* topLayout = new TQGridLayout(this, 2, 2);
topLayout->setMargin(2);
topLayout->setRowStretch(0, 10);
topLayout->setRowStretch(1, 0);
topLayout->setColStretch(0, 10);
topLayout->setColStretch(1, 0);
- scrollBar = new QScrollBar(this);
- hScrollBar = new QScrollBar(0, 1, 1, 1, 0, QScrollBar::Horizontal, this);
+ scrollBar = new TQScrollBar(this);
+ hScrollBar = new TQScrollBar(0, 1, 1, 1, 0, TQScrollBar::Horizontal, this);
scrolledArea = new PaletteViewScrolledArea(defaultCellWidth,
defaultCellHeight, cellSpacing, scrollBar, hScrollBar, view, this);
- connect(scrollBar, SIGNAL( valueChanged(int) ),
- SLOT( slotRepaintScrolledArea() ));
+ connect(scrollBar, TQT_SIGNAL( valueChanged(int) ),
+ TQT_SLOT( slotRepaintScrolledArea() ));
topLayout->addWidget(scrolledArea, 0, 0);
- connect(hScrollBar, SIGNAL( valueChanged(int) ),
- SLOT( slotRepaintScrolledArea() ));
- QHBoxLayout* hScrollBarLayout = new QHBoxLayout();
+ connect(hScrollBar, TQT_SIGNAL( valueChanged(int) ),
+ TQT_SLOT( slotRepaintScrolledArea() ));
+ TQHBoxLayout* hScrollBarLayout = new TQHBoxLayout();
hScrollBarLayout->addWidget(hScrollBar, 10);
- hScrollBarLayout->addWidget(new QWidget(this), 0);
+ hScrollBarLayout->addWidget(new TQWidget(this), 0);
topLayout->addLayout(hScrollBarLayout, 1, 0);
topLayout->addWidget(scrollBar, 0, 1);
}
diff --git a/kcoloredit/paletteview.h b/kcoloredit/paletteview.h
index 0032997f..9501de40 100644
--- a/kcoloredit/paletteview.h
+++ b/kcoloredit/paletteview.h
@@ -18,8 +18,8 @@
#ifndef PALETTEVIEW_H
#define PALETTEVIEW_H
-#include <qframe.h>
-#include <qscrollbar.h>
+#include <tqframe.h>
+#include <tqscrollbar.h>
#include "paletteviewscrolledarea.h"
@@ -29,7 +29,7 @@ class KColorEditView;
* Its parent is KColorEditView
* @author Artur Rataj
*/
-class PaletteView : public QFrame {
+class PaletteView : public TQFrame {
Q_OBJECT
public:
@@ -37,7 +37,7 @@ public:
* The effective cell sizes may be adjusted to fit the widget sizes.
*/
PaletteView(const int defaultCellWidth, const int defaultCellHeight, const int cellSpacing,
- KColorEditView* view, QWidget *parent = 0, const char *name=0);
+ KColorEditView* view, TQWidget *parent = 0, const char *name=0);
~PaletteView();
/** Calls redraw() in scrolledArea */
void redraw();
@@ -56,9 +56,9 @@ protected:
/** The scrolled area */
PaletteViewScrolledArea* scrolledArea;
/** The scroll bar widget */
- QScrollBar* scrollBar;
+ TQScrollBar* scrollBar;
/** The horizontal scroll bar widget */
- QScrollBar* hScrollBar;
+ TQScrollBar* hScrollBar;
};
#endif
diff --git a/kcoloredit/paletteviewscrolledarea.cpp b/kcoloredit/paletteviewscrolledarea.cpp
index dafb4d10..0b4f0ec4 100644
--- a/kcoloredit/paletteviewscrolledarea.cpp
+++ b/kcoloredit/paletteviewscrolledarea.cpp
@@ -16,18 +16,18 @@
***************************************************************************/
#include <stdlib.h>
-#include <qptrlist.h>
-#include <qcolor.h>
-#include <qcursor.h>
-#include <qbrush.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpen.h>
-#include <qfontmetrics.h>
-#include <qtimer.h>
+#include <tqptrlist.h>
+#include <tqcolor.h>
+#include <tqcursor.h>
+#include <tqbrush.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpen.h>
+#include <tqfontmetrics.h>
+#include <tqtimer.h>
#include <kglobal.h>
#include <kcolordrag.h>
-#include <qscrollbar.h>
+#include <tqscrollbar.h>
#include "palette.h"
#include "palettehistory.h"
@@ -37,9 +37,9 @@
#include "paletteviewscrolledarea.moc"
PaletteViewScrolledArea::PaletteViewScrolledArea(const int defaultCellWidth,
- const int defaultCellHeight, const int cellSpacing, QScrollBar* scrollBar,
- QScrollBar* hScrollBar, KColorEditView* view, QWidget* parent, const char* name)
- : QFrame(parent, name) {
+ const int defaultCellHeight, const int cellSpacing, TQScrollBar* scrollBar,
+ TQScrollBar* hScrollBar, KColorEditView* view, TQWidget* parent, const char* name)
+ : TQFrame(parent, name) {
this->defaultCellWidth = defaultCellWidth;
this->defaultCellHeight = defaultCellHeight;
this->cellSpacing = cellSpacing;
@@ -47,8 +47,8 @@ PaletteViewScrolledArea::PaletteViewScrolledArea(const int defaultCellWidth,
this->hScrollBar = hScrollBar;
this->view = view;
setBackgroundMode(NoBackground);
- scrollTimeoutTimer = new QTimer(this);
- connect(scrollTimeoutTimer, SIGNAL( timeout() ), SLOT( slotScrollTimeout() ));
+ scrollTimeoutTimer = new TQTimer(this);
+ connect(scrollTimeoutTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotScrollTimeout() ));
scrollTimeout = true;
mousePressed = false;
cursorPositioning = false;
@@ -98,7 +98,7 @@ void PaletteViewScrolledArea::scrollPalette(const int amount, const int timeout)
void PaletteViewScrolledArea::slotScrollTimeout() {
scrollTimeout = true;
if(mousePressed) {
- QPoint cursorPoint = mapFromGlobal(QCursor::pos());
+ TQPoint cursorPoint = mapFromGlobal(TQCursor::pos());
setCursorPos(cursorPoint.x(), cursorPoint.y());
selectionEnd = cursorPos();
if(selectionEnd >= selectionBegin)
@@ -166,7 +166,7 @@ void PaletteViewScrolledArea::setCellsSizes() {
cellWidth = defaultCellWidth;
cellHeight = defaultCellHeight;
if(viewColorNames) {
- QPainter painter;
+ TQPainter painter;
painter.begin(this);
if(cellHeight < painter.fontMetrics().height()) {
int prevCellHeight = cellHeight;
@@ -216,12 +216,12 @@ int PaletteViewScrolledArea::selectionMax() const {
return document()->paletteSelectionEnd();
}
-void PaletteViewScrolledArea::paintEvent(QPaintEvent* /*event*/) {
+void PaletteViewScrolledArea::paintEvent(TQPaintEvent* /*event*/) {
setCellsSizes();
- QPixmap pixmap(size());
- QPainter painter;
+ TQPixmap pixmap(size());
+ TQPainter painter;
painter.begin(&pixmap, this);
- QFontMetrics fontMetrics = painter.fontMetrics();
+ TQFontMetrics fontMetrics = painter.fontMetrics();
int maxLineWidth;
if(viewColorNames) {
int maxTextLength = 0;
@@ -249,12 +249,12 @@ void PaletteViewScrolledArea::paintEvent(QPaintEvent* /*event*/) {
int lastRow = (posY + height() - 1 + rowHeight - 1)/rowHeight;
if(viewColorNames)
painter.fillRect(0, 0, rowWidth, height(),
- QBrush( QFrame::palette().active().base() ));
- QBrush normalBackgroundBrush(QFrame::palette().active().background());
- QBrush selectedBackgroundBrush(QFrame::palette().active().highlight());
- QBrush foregroundBrush;
- QBrush cursorBrush(QFrame::palette().active().foreground());
- QPen backgroundPen(QFrame::palette().active().foreground());
+ TQBrush( TQFrame::palette().active().base() ));
+ TQBrush normalBackgroundBrush(TQFrame::palette().active().background());
+ TQBrush selectedBackgroundBrush(TQFrame::palette().active().highlight());
+ TQBrush foregroundBrush;
+ TQBrush cursorBrush(TQFrame::palette().active().foreground());
+ TQPen backgroundPen(TQFrame::palette().active().foreground());
int min = selectionMin();
int max = selectionMax();
int fontAscent = fontMetrics.ascent();
@@ -270,14 +270,14 @@ void PaletteViewScrolledArea::paintEvent(QPaintEvent* /*event*/) {
for(int y = firstRow; y <= lastRow; ++y) {
int yBegin = y*rowHeight - posY;
int currCellNum = y*cellsInRow + x;
- QBrush* backgroundBrush;
+ TQBrush* backgroundBrush;
if(currCellNum >= min && currCellNum < max)
backgroundBrush = &selectedBackgroundBrush;
else
backgroundBrush = &normalBackgroundBrush;
if(currCellNum < palette()->length()) {
Color* color = palette()->color(currCellNum);
- QBrush foregroundBrush(QColor(
+ TQBrush foregroundBrush(TQColor(
color->component(Color::RED_INDEX),
color->component(Color::GREEN_INDEX),
color->component(Color::BLUE_INDEX) ));
@@ -285,7 +285,7 @@ void PaletteViewScrolledArea::paintEvent(QPaintEvent* /*event*/) {
*backgroundBrush);
painter.fillRect(xBegin, yBegin + rowHeight - cellSpacing, cellWithSpacingWidth, cellSpacing,
*backgroundBrush);
- QBrush* backgroundOrCursorBrush;
+ TQBrush* backgroundOrCursorBrush;
if(cursorPos() == currCellNum)
backgroundOrCursorBrush = &cursorBrush;
else
@@ -325,7 +325,7 @@ void PaletteViewScrolledArea::paintEvent(QPaintEvent* /*event*/) {
painter.end();
}
-int PaletteViewScrolledArea::colorIndex(const QPoint& point) const {
+int PaletteViewScrolledArea::colorIndex(const TQPoint& point) const {
int colorColumn = point.x()*cellsInRow/rowWidth;
int colorRow = (point.y() + scrollBar->value())/rowHeight;
int colorIndex = colorRow*cellsInRow + colorColumn;
@@ -335,14 +335,14 @@ int PaletteViewScrolledArea::colorIndex(const QPoint& point) const {
return colorIndex;
}
-QColor PaletteViewScrolledArea::color(const QPoint& point) const {
+TQColor PaletteViewScrolledArea::color(const TQPoint& point) const {
Color* color = palette()->color(colorIndex( point ));
- return QColor(color->component( Color::RED_INDEX ),
+ return TQColor(color->component( Color::RED_INDEX ),
color->component( Color::GREEN_INDEX ),
color->component( Color::BLUE_INDEX ));
}
-void PaletteViewScrolledArea::mousePressEvent(QMouseEvent* event) {
+void PaletteViewScrolledArea::mousePressEvent(TQMouseEvent* event) {
cursorPositioning = false;
if(( cursorPositioning = setCursorPos(event->x(), event->y()) )) {
selectionBegin = cursorPos();
@@ -356,7 +356,7 @@ void PaletteViewScrolledArea::mousePressEvent(QMouseEvent* event) {
mousePressed = true;
}
-void PaletteViewScrolledArea::mouseMoveEvent(QMouseEvent* event) {
+void PaletteViewScrolledArea::mouseMoveEvent(TQMouseEvent* event) {
if(cursorPositioning) {
setCursorPos(event->x(), event->y());
selectionEnd = cursorPos();
@@ -371,7 +371,7 @@ void PaletteViewScrolledArea::mouseMoveEvent(QMouseEvent* event) {
if(colorIndex( colorDragPoint ) != -1) {
if(abs( event->x() - colorDragPoint.x() ) > 2 ||
abs( event->y() - colorDragPoint.y() ) > 2) {
- QColor draggedColor = color(colorDragPoint);
+ TQColor draggedColor = color(colorDragPoint);
KColorDrag* colorDrag = KColorDrag::makeDrag(draggedColor, this);
colorDrag->dragCopy();
} else
@@ -380,7 +380,7 @@ void PaletteViewScrolledArea::mouseMoveEvent(QMouseEvent* event) {
}
}
-void PaletteViewScrolledArea::mouseReleaseEvent(QMouseEvent* /*event*/) {
+void PaletteViewScrolledArea::mouseReleaseEvent(TQMouseEvent* /*event*/) {
if(colorChosen) {
if(colorIndex( colorDragPoint ) != -1) {
int index = colorIndex(colorDragPoint);
diff --git a/kcoloredit/paletteviewscrolledarea.h b/kcoloredit/paletteviewscrolledarea.h
index 18bbae2b..db39e454 100644
--- a/kcoloredit/paletteviewscrolledarea.h
+++ b/kcoloredit/paletteviewscrolledarea.h
@@ -18,28 +18,28 @@
#ifndef PALETTEVIEWSCROLLEDAREA_H
#define PALETTEVIEWSCROLLEDAREA_H
-#include <qframe.h>
-#include <qevent.h>
+#include <tqframe.h>
+#include <tqevent.h>
#include "palette.h"
class KColorEditDoc;
class KColorEditView;
-class QScrollBar;
+class TQScrollBar;
/** This widget draws the palette view scrolled area.
* It has paste and cut features.
* @author Artur Rataj
*/
-class PaletteViewScrolledArea : public QFrame {
+class PaletteViewScrolledArea : public TQFrame {
Q_OBJECT
public:
/** Constructs the widget */
PaletteViewScrolledArea(const int defaultCellWidth, const int defaultCellHeight,
- const int cellSpacing, QScrollBar* scrollBar,
- QScrollBar* hScrollBar, KColorEditView* view,
- QWidget* parent = 0, const char* name = 0);
+ const int cellSpacing, TQScrollBar* scrollBar,
+ TQScrollBar* hScrollBar, KColorEditView* view,
+ TQWidget* parent = 0, const char* name = 0);
~PaletteViewScrolledArea();
/** Sets cells sizes and then calls repaintPalette() */
void redraw();
@@ -52,9 +52,9 @@ public slots:
protected:
/** The scrollbar widget */
- QScrollBar* scrollBar;
+ TQScrollBar* scrollBar;
/** The horizontal scrollbar widget */
- QScrollBar* hScrollBar;
+ TQScrollBar* hScrollBar;
/** Pointer to the document view */
KColorEditView* view;
/** Default cell width */
@@ -82,7 +82,7 @@ protected:
/** A position at which selection ended */
int selectionEnd;
/** Auto scroll timeout timer */
- QTimer* scrollTimeoutTimer;
+ TQTimer* scrollTimeoutTimer;
/** Whether there is auto scroll timeout */
bool scrollTimeout;
/** Whether a mouse has been pressed over the palette and not yet released */
@@ -90,7 +90,7 @@ protected:
/** Whether the cursor is being positioned */
bool cursorPositioning;
/** A color drag point */
- QPoint colorDragPoint;
+ TQPoint colorDragPoint;
/** Whether a color has been chosen and it is not dragged */
bool colorChosen;
/** Whether the cursor follows a chosen color */
@@ -108,9 +108,9 @@ protected:
/** repaints the palette */
void repaintPalette();
/** @return A color index at a given position, -1 if none */
- int colorIndex(const QPoint& point) const;
+ int colorIndex(const TQPoint& point) const;
/** @return A color at a given position */
- QColor color(const QPoint& point) const;
+ TQColor color(const TQPoint& point) const;
/** sets a palette cursor position */
void setCursorPos(const int pos);
/** Sets a cursor position due to a mouse position.
@@ -136,13 +136,13 @@ protected:
*/
void checkSelectionAutoScroll(const int mousePosY);
/** The widget painting */
- void paintEvent(QPaintEvent* event);
+ void paintEvent(TQPaintEvent* event);
/** Used to get mouse press events coordinates */
- void mousePressEvent(QMouseEvent* event);
+ void mousePressEvent(TQMouseEvent* event);
/** Used to get mouse move events coordinates */
- void mouseMoveEvent(QMouseEvent* event);
+ void mouseMoveEvent(TQMouseEvent* event);
/** Used to get mouse release events coordinates */
- void mouseReleaseEvent(QMouseEvent* event);
+ void mouseReleaseEvent(TQMouseEvent* event);
/** If there is a scroll timeout, scrolls palette,
* sets scrollTimeout to false and resets scroll timeout timer
*/
diff --git a/kcoloredit/texteditselection.cpp b/kcoloredit/texteditselection.cpp
index 65d4ecad..4b1d6a56 100644
--- a/kcoloredit/texteditselection.cpp
+++ b/kcoloredit/texteditselection.cpp
@@ -15,62 +15,62 @@
* *
***************************************************************************/
-#include <qlabel.h>
-#include <qvalidator.h>
-#include <qcolor.h>
+#include <tqlabel.h>
+#include <tqvalidator.h>
+#include <tqcolor.h>
#include <klocale.h>
#include "main.h"
#include "texteditselection.h"
-TextEditSelection::TextEditSelection(QWidget *parent, const char *name ) : QWidget(parent,name) {
+TextEditSelection::TextEditSelection(TQWidget *parent, const char *name ) : TQWidget(parent,name) {
inChangingComponents = false;
- QVBoxLayout* topLayout = new QVBoxLayout(this, 4);
- QGridLayout* componentsLayout = new QGridLayout(3, 5, 2);
+ TQVBoxLayout* topLayout = new TQVBoxLayout(this, 4);
+ TQGridLayout* componentsLayout = new TQGridLayout(3, 5, 2);
topLayout->addLayout(componentsLayout);
componentsLayout->setColStretch(1, 10);
componentsLayout->addColSpacing(2, 8);
componentsLayout->setColStretch(4, 10);
- QLineEdit* lineEdit;
- addComponent(H_INDEX, ( lineEdit = new QLineEdit(this) ), HSV_MAX_H_VALUE, "H:", 0, 0, componentsLayout);
- connect(lineEdit, SIGNAL( textChanged(const QString&) ), SLOT( slotHsvComponentChanged() ));
- addComponent(S_INDEX, ( lineEdit = new QLineEdit(this) ), HSV_MAX_S_VALUE, "S:", 1, 0, componentsLayout);
- connect(lineEdit, SIGNAL( textChanged(const QString&) ), SLOT( slotHsvComponentChanged() ));
- addComponent(V_INDEX, ( lineEdit = new QLineEdit(this) ), HSV_MAX_V_VALUE, "V:", 2, 0, componentsLayout);
- connect(lineEdit, SIGNAL( textChanged(const QString&) ), SLOT( slotHsvComponentChanged() ));
- addComponent(R_INDEX, ( lineEdit = new QLineEdit(this) ), RGB_MAX_COMPONENT_VALUE, "R:", 0, 1, componentsLayout);
- connect(lineEdit, SIGNAL( textChanged(const QString&) ), SLOT( slotRgbComponentChanged() ));
- addComponent(G_INDEX, ( lineEdit = new QLineEdit(this) ), RGB_MAX_COMPONENT_VALUE, "G:", 1, 1, componentsLayout);
- connect(lineEdit, SIGNAL( textChanged(const QString&) ), SLOT( slotRgbComponentChanged() ));
- addComponent(B_INDEX, ( lineEdit = new QLineEdit(this) ), RGB_MAX_COMPONENT_VALUE, "B:", 2, 1, componentsLayout);
- connect(lineEdit, SIGNAL( textChanged(const QString&) ), SLOT( slotRgbComponentChanged() ));
- QHBoxLayout* rgbStringLayout = new QHBoxLayout(2);
- QLabel* rgbStringLabel = new QLabel("RGB " + i18n( "hex." ) + ": ", this);
+ TQLineEdit* lineEdit;
+ addComponent(H_INDEX, ( lineEdit = new TQLineEdit(this) ), HSV_MAX_H_VALUE, "H:", 0, 0, componentsLayout);
+ connect(lineEdit, TQT_SIGNAL( textChanged(const TQString&) ), TQT_SLOT( slotHsvComponentChanged() ));
+ addComponent(S_INDEX, ( lineEdit = new TQLineEdit(this) ), HSV_MAX_S_VALUE, "S:", 1, 0, componentsLayout);
+ connect(lineEdit, TQT_SIGNAL( textChanged(const TQString&) ), TQT_SLOT( slotHsvComponentChanged() ));
+ addComponent(V_INDEX, ( lineEdit = new TQLineEdit(this) ), HSV_MAX_V_VALUE, "V:", 2, 0, componentsLayout);
+ connect(lineEdit, TQT_SIGNAL( textChanged(const TQString&) ), TQT_SLOT( slotHsvComponentChanged() ));
+ addComponent(R_INDEX, ( lineEdit = new TQLineEdit(this) ), RGB_MAX_COMPONENT_VALUE, "R:", 0, 1, componentsLayout);
+ connect(lineEdit, TQT_SIGNAL( textChanged(const TQString&) ), TQT_SLOT( slotRgbComponentChanged() ));
+ addComponent(G_INDEX, ( lineEdit = new TQLineEdit(this) ), RGB_MAX_COMPONENT_VALUE, "G:", 1, 1, componentsLayout);
+ connect(lineEdit, TQT_SIGNAL( textChanged(const TQString&) ), TQT_SLOT( slotRgbComponentChanged() ));
+ addComponent(B_INDEX, ( lineEdit = new TQLineEdit(this) ), RGB_MAX_COMPONENT_VALUE, "B:", 2, 1, componentsLayout);
+ connect(lineEdit, TQT_SIGNAL( textChanged(const TQString&) ), TQT_SLOT( slotRgbComponentChanged() ));
+ TQHBoxLayout* rgbStringLayout = new TQHBoxLayout(2);
+ TQLabel* rgbStringLabel = new TQLabel("RGB " + i18n( "hex." ) + ": ", this);
rgbStringLayout->addWidget(rgbStringLabel);
- rgbStringLineEdit = new QLineEdit(this);
- rgbStringLineEdit->setMinimumWidth(lineEdit->fontMetrics().width( QString("8888888") ));
- rgbStringLineEdit->setMaximumWidth(lineEdit->fontMetrics().width( QString("888888888") ));
- connect(rgbStringLineEdit, SIGNAL( textChanged(const QString&) ), SLOT( slotRgbStringChanged() ));
+ rgbStringLineEdit = new TQLineEdit(this);
+ rgbStringLineEdit->setMinimumWidth(lineEdit->fontMetrics().width( TQString("8888888") ));
+ rgbStringLineEdit->setMaximumWidth(lineEdit->fontMetrics().width( TQString("888888888") ));
+ connect(rgbStringLineEdit, TQT_SIGNAL( textChanged(const TQString&) ), TQT_SLOT( slotRgbStringChanged() ));
rgbStringLayout->addWidget(rgbStringLineEdit);
topLayout->addLayout(rgbStringLayout);
}
TextEditSelection::~TextEditSelection(){
}
-void TextEditSelection::addComponent(const int index, QLineEdit* lineEdit, const int maxValue,
- const QString& labelString, const int row, const int column, QGridLayout* layout) {
- QLabel* label = new QLabel(labelString, this);
- lineEdit->setValidator(new QIntValidator( 0, maxValue, lineEdit ));
+void TextEditSelection::addComponent(const int index, TQLineEdit* lineEdit, const int maxValue,
+ const TQString& labelString, const int row, const int column, TQGridLayout* layout) {
+ TQLabel* label = new TQLabel(labelString, this);
+ lineEdit->setValidator(new TQIntValidator( 0, maxValue, lineEdit ));
lineEditTable[index] = lineEdit;
- lineEdit->setMinimumWidth(lineEdit->fontMetrics().width( QString("8888") ));
- lineEdit->setMaximumWidth(lineEdit->fontMetrics().width( QString("8888888") ));
+ 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);
}
void TextEditSelection::setRgbString(const int red, const int green, const int blue) {
- QString string;
+ TQString string;
string.sprintf("%02x%02x%02x", red, green, blue);
rgbStringLineEdit->setText(string);
}
@@ -81,12 +81,12 @@ void TextEditSelection::slotHsvComponentChanged() {
int hComponent = lineEditTable[H_INDEX]->text().toInt();
int sComponent = lineEditTable[S_INDEX]->text().toInt();
int vComponent = lineEditTable[V_INDEX]->text().toInt();
- QColor color;
+ TQColor color;
color.setHsv(hComponent, sComponent, vComponent);
int rComponent = color.red();
int gComponent = color.green();
int bComponent = color.blue();
- QString string;
+ TQString string;
lineEditTable[R_INDEX]->setText(string.setNum( rComponent ));
lineEditTable[G_INDEX]->setText(string.setNum( gComponent ));
lineEditTable[B_INDEX]->setText(string.setNum( bComponent ));
@@ -107,13 +107,13 @@ void TextEditSelection::slotRgbComponentChanged() {
int rComponent = lineEditTable[R_INDEX]->text().toInt();
int gComponent = lineEditTable[G_INDEX]->text().toInt();
int bComponent = lineEditTable[B_INDEX]->text().toInt();
- QColor color;
+ TQColor color;
color.setRgb(rComponent, gComponent, bComponent);
int hComponent;
int sComponent;
int vComponent;
color.hsv(&hComponent, &sComponent, &vComponent);
- QString string;
+ TQString string;
lineEditTable[H_INDEX]->setText(string.setNum( hComponent ));
lineEditTable[S_INDEX]->setText(string.setNum( sComponent ));
lineEditTable[V_INDEX]->setText(string.setNum( vComponent ));
@@ -131,7 +131,7 @@ void TextEditSelection::slotRgbComponentChanged() {
void TextEditSelection::slotRgbStringChanged() {
if(!inChangingComponents) {
inChangingComponents = true;
- QString string = rgbStringLineEdit->text().stripWhiteSpace();
+ TQString string = rgbStringLineEdit->text().stripWhiteSpace();
bool result;
int value = string.toInt(&result, 16);
if(result) {
@@ -144,7 +144,7 @@ void TextEditSelection::slotRgbStringChanged() {
int hComponent;
int sComponent;
int vComponent;
- QColor hsvColor;
+ TQColor hsvColor;
hsvColor.hsv(&hComponent, &sComponent, &vComponent);
lineEditTable[H_INDEX]->setText(string.setNum( hComponent ));
lineEditTable[S_INDEX]->setText(string.setNum( sComponent ));
@@ -164,14 +164,14 @@ void TextEditSelection::slotSetValue(Color* color) {
if(!color->equals( this->color )) {
inChangingComponents = true;
this->color = *color;
- QString string;
+ TQString string;
int rComponent = this->color.component(Color::RED_INDEX);
int gComponent = this->color.component(Color::GREEN_INDEX);
int bComponent = this->color.component(Color::BLUE_INDEX);
lineEditTable[R_INDEX]->setText(string.setNum( rComponent ));
lineEditTable[G_INDEX]->setText(string.setNum( gComponent ));
lineEditTable[B_INDEX]->setText(string.setNum( bComponent ));
- QColor hsvColor(rComponent, gComponent, bComponent);
+ TQColor hsvColor(rComponent, gComponent, bComponent);
int hComponent;
int sComponent;
int vComponent;
diff --git a/kcoloredit/texteditselection.h b/kcoloredit/texteditselection.h
index c2166098..e140a5dc 100644
--- a/kcoloredit/texteditselection.h
+++ b/kcoloredit/texteditselection.h
@@ -18,9 +18,9 @@
#ifndef TEXTEDITSELECTION_H
#define TEXTEDITSELECTION_H
-#include <qwidget.h>
-#include <qlineedit.h>
-#include <qlayout.h>
+#include <tqwidget.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
#include "color.h"
@@ -28,12 +28,12 @@
* can be set.
* @author Artur Rataj
*/
-class TextEditSelection : public QWidget {
+class TextEditSelection : public TQWidget {
Q_OBJECT
public:
/** Constructs the widget */
- TextEditSelection(QWidget *parent=0, const char *name=0);
+ TextEditSelection(TQWidget *parent=0, const char *name=0);
~TextEditSelection();
signals:
@@ -46,8 +46,8 @@ public slots:
protected:
/** Adds a component line edit */
- void addComponent(const int index, QLineEdit* lineEdit, const int maxValue, const QString& labelString,
- const int row, const int column, QGridLayout* layout);
+ void addComponent(const int index, TQLineEdit* lineEdit, const int maxValue, const TQString& labelString,
+ const int row, const int column, TQGridLayout* layout);
/** sets RGB string in rgbStringLineEdit */
void setRgbString(const int red, const int green, const int blue);
@@ -77,9 +77,9 @@ protected:
COMPONENTS_NUM = 6 };
/** Line edit widgets table */
- QLineEdit* lineEditTable[COMPONENTS_NUM];
+ TQLineEdit* lineEditTable[COMPONENTS_NUM];
/** RGB hex string line edit widgets table */
- QLineEdit* rgbStringLineEdit;
+ TQLineEdit* rgbStringLineEdit;
/** The selected color */
Color color;
/** A flag that components are matched */
diff --git a/kcoloredit/textselection.cpp b/kcoloredit/textselection.cpp
index 8a4225bc..f916d48f 100644
--- a/kcoloredit/textselection.cpp
+++ b/kcoloredit/textselection.cpp
@@ -17,7 +17,7 @@
#include "textselection.h"
-TextSelection::TextSelection(QWidget *parent, const char *name ) : QWidget(parent,name) {
+TextSelection::TextSelection(TQWidget *parent, const char *name ) : TQWidget(parent,name) {
}
TextSelection::~TextSelection(){
diff --git a/kdvi/TeXFont.h b/kdvi/TeXFont.h
index 8ff70499..d3ee51af 100644
--- a/kdvi/TeXFont.h
+++ b/kdvi/TeXFont.h
@@ -18,7 +18,7 @@ class TeXFont {
TeXFont(TeXFontDefinition *_parent)
{
parent = _parent;
- errorMessage = QString::null;
+ errorMessage = TQString::null;
};
virtual ~TeXFont();
@@ -29,7 +29,7 @@ class TeXFont {
glyphtable[i].shrunkenCharacter.resize(0, 0);
};
- virtual glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const QColor& color=Qt::black) = 0;
+ virtual glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=Qt::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
@@ -38,7 +38,7 @@ class TeXFont {
// If the font or if some glyphs could not be loaded, error messages
// will be put here.
- QString errorMessage;
+ TQString errorMessage;
protected:
glyph glyphtable[TeXFontDefinition::max_num_of_chars_in_font];
diff --git a/kdvi/TeXFontDefinition.cpp b/kdvi/TeXFontDefinition.cpp
index 9b745c83..03dd1b72 100644
--- a/kdvi/TeXFontDefinition.cpp
+++ b/kdvi/TeXFontDefinition.cpp
@@ -3,7 +3,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "dviRenderer.h"
#include "fontpool.h"
@@ -31,7 +31,7 @@ extern const int MFResolutions[];
// #define DEBUG_FONT
-TeXFontDefinition::TeXFontDefinition(QString nfontname, double _displayResolution_in_dpi, Q_UINT32 chk, Q_INT32 _scaled_size_in_DVI_units,
+TeXFontDefinition::TeXFontDefinition(TQString nfontname, double _displayResolution_in_dpi, Q_UINT32 chk, Q_INT32 _scaled_size_in_DVI_units,
class fontPool *pool, double _enlargement)
{
#ifdef DEBUG_FONT
@@ -46,7 +46,7 @@ TeXFontDefinition::TeXFontDefinition(QString nfontname, double _displayResolutio
checksum = chk;
flags = TeXFontDefinition::FONT_IN_USE;
file = 0;
- filename = QString::null;
+ filename = TQString::null;
scaled_size_in_DVI_units = _scaled_size_in_DVI_units;
macrotable = 0;
@@ -84,7 +84,7 @@ TeXFontDefinition::~TeXFontDefinition()
}
-void TeXFontDefinition::fontNameReceiver(const QString& fname)
+void TeXFontDefinition::fontNameReceiver(const TQString& fname)
{
#ifdef DEBUG_FONT
kdDebug(4300) << "void TeXFontDefinition::fontNameReceiver( " << fname << " )" << endl;
@@ -93,17 +93,17 @@ void TeXFontDefinition::fontNameReceiver(const QString& fname)
flags |= TeXFontDefinition::FONT_LOADED;
filename = fname;
#ifdef HAVE_FREETYPE
- fullFontName = QString::null;
- fullEncodingName = QString::null;
+ fullFontName = TQString::null;
+ fullEncodingName = TQString::null;
#endif
- file = fopen(QFile::encodeName(filename), "r");
+ file = fopen(TQFile::encodeName(filename), "r");
// Check if the file could be opened. If not, try to find the file
// in the DVI file's directory. If that works, modify the filename
// accordingly and go on.
if (file == 0) {
- QString filename_test(font_pool->getExtraSearchPath() + "/" + filename);
- file = fopen( QFile::encodeName(filename_test), "r");
+ 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;
return;
@@ -149,7 +149,7 @@ void TeXFontDefinition::fontNameReceiver(const QString& fname)
file = 0;
#ifdef HAVE_FREETYPE
// Find the encoding for that font
- const QString &enc = font_pool->fontsByTeXName.findEncoding(fontname);
+ const TQString &enc = font_pool->fontsByTeXName.findEncoding(fontname);
if (enc.isEmpty() == false) {
#ifdef DEBUG_FONT
@@ -195,7 +195,7 @@ void TeXFontDefinition::reset()
vf_table.clear();
}
- filename = QString::null;
+ filename = TQString::null;
flags = TeXFontDefinition::FONT_IN_USE;
set_char_p = &dviRenderer::set_empty_char;
}
@@ -225,7 +225,7 @@ void TeXFontDefinition::mark_as_used()
// For virtual fonts, also go through the list of referred fonts
if (flags & TeXFontDefinition::FONT_VIRTUAL) {
- QIntDictIterator<TeXFontDefinition> it(vf_table);
+ TQIntDictIterator<TeXFontDefinition> it(vf_table);
while( it.current() ) {
it.current()->mark_as_used();
++it;
diff --git a/kdvi/TeXFontDefinition.h b/kdvi/TeXFontDefinition.h
index e3effc2a..d64e6d59 100644
--- a/kdvi/TeXFontDefinition.h
+++ b/kdvi/TeXFontDefinition.h
@@ -15,8 +15,8 @@
#ifndef _FONT_H
#define _FONT_H
-#include <qintdict.h>
-#include <qstring.h>
+#include <tqintdict.h>
+#include <tqstring.h>
#include <stdio.h>
@@ -56,12 +56,12 @@ class TeXFontDefinition {
};
- TeXFontDefinition(QString nfontname, double _displayResolution_in_dpi, Q_UINT32 chk, Q_INT32 _scaled_size_in_DVI_units,
+ TeXFontDefinition(TQString nfontname, double _displayResolution_in_dpi, Q_UINT32 chk, Q_INT32 _scaled_size_in_DVI_units,
class fontPool *pool, double _enlargement);
~TeXFontDefinition();
void reset();
- void fontNameReceiver(const QString&);
+ void fontNameReceiver(const TQString&);
// Members for character fonts
void setDisplayResolution(double _displayResolution_in_dpi);
@@ -71,7 +71,7 @@ class TeXFontDefinition {
void mark_as_used();
class fontPool *font_pool; // Pointer to the pool that contains this font.
- QString fontname; // name of font, such as "cmr10"
+ 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
@@ -82,34 +82,34 @@ class TeXFontDefinition {
double displayResolution_in_dpi;
FILE *file; // open font file or NULL
- QString filename; // name of font file
+ TQString filename; // name of font file
TeXFont *font;
macro *macrotable; // used by (loaded) virtual fonts
- QIntDict<TeXFontDefinition> vf_table; // used by (loaded) virtual fonts, list of fonts used by this vf,
+ TQIntDict<TeXFontDefinition> vf_table; // used by (loaded) virtual fonts, list of fonts used by this vf,
// acessible by number
TeXFontDefinition *first_font; // used by (loaded) virtual fonts, list of fonts used by this vf
#ifdef HAVE_FREETYPE
- const QString &getFullFontName() const {return fullFontName;}
- const QString &getFullEncodingName() const {return fullEncodingName;}
+ const TQString &getFullFontName() const {return fullFontName;}
+ const TQString &getFullEncodingName() const {return fullEncodingName;}
#endif
- const QString &getFontTypeName() const {return fontTypeName;}
+ const TQString &getFontTypeName() const {return fontTypeName;}
#ifdef HAVE_FREETYPE
/** 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
- QString::null. Only subclasses of TeXFont should write into this
+ TQString::null. Only subclasses of TeXFont should write into this
field. */
- QString fullFontName;
+ 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 QString::null. Only subclasses of TeXFont should write
+ will be TQString::null. Only subclasses of TeXFont should write
into this field. */
- QString fullEncodingName;
+ TQString fullEncodingName;
#endif
private:
@@ -117,7 +117,7 @@ class TeXFontDefinition {
/** This will be set to a human-readable description of the font,
e.g. "virtual" or "TeX PK", or "Type 1" */
- QString fontTypeName;
+ TQString fontTypeName;
// Functions related to virtual fonts
void read_VF_index(void );
diff --git a/kdvi/TeXFont_PFB.cpp b/kdvi/TeXFont_PFB.cpp
index 927c84bc..2b3883fe 100644
--- a/kdvi/TeXFont_PFB.cpp
+++ b/kdvi/TeXFont_PFB.cpp
@@ -14,7 +14,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qimage.h>
+#include <tqimage.h>
#include "fontpool.h"
@@ -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(QString::fromLatin1( "Encoding" ));
- parent->fullEncodingName = enc->encodingFullName.remove(QString::fromLatin1( "encoding" ));
+ parent->fullEncodingName = enc->encodingFullName.remove(TQString::fromLatin1( "Encoding" ));
+ parent->fullEncodingName = enc->encodingFullName.remove(TQString::fromLatin1( "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 QColor& color)
+glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQColor& color)
{
#ifdef DEBUG_PFB
kdDebug(4300) << "TeXFont_PFB::getGlyph( ch=" << ch << ", '" << (char)(ch) << "', generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl;
@@ -168,12 +168,12 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const QC
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 );
error = FT_Set_Char_Size(face, 0, characterSize_in_printers_points_by_64, res, res );
if (error) {
- QString 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.").arg(parent->filename);
if (errorMessage.isEmpty())
errorMessage = msg;
kdError(4300) << msg << endl;
g->shrunkenCharacter.resize(1,1);
- g->shrunkenCharacter.fill(QColor(255, 255, 255));
+ g->shrunkenCharacter.fill(TQColor(255, 255, 255));
return g;
}
@@ -184,24 +184,24 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const QC
error = FT_Load_Glyph(face, charMap[ch], FT_LOAD_NO_HINTING );
if (error) {
- QString 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.").arg(ch).arg(parent->filename);
if (errorMessage.isEmpty())
errorMessage = msg;
kdError(4300) << msg << endl;
g->shrunkenCharacter.resize(1,1);
- g->shrunkenCharacter.fill(QColor(255, 255, 255));
+ g->shrunkenCharacter.fill(TQColor(255, 255, 255));
return g;
}
// convert to an anti-aliased bitmap
error = FT_Render_Glyph( face->glyph, ft_render_mode_normal );
if (error) {
- QString 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.").arg(ch).arg(parent->filename);
if (errorMessage.isEmpty())
errorMessage = msg;
kdError(4300) << msg << endl;
g->shrunkenCharacter.resize(1,1);
- g->shrunkenCharacter.fill(QColor(255, 255, 255));
+ g->shrunkenCharacter.fill(TQColor(255, 255, 255));
return g;
}
@@ -212,11 +212,11 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const QC
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;
g->shrunkenCharacter.resize( 15, 15 );
- g->shrunkenCharacter.fill(QColor(255, 0, 0));
+ g->shrunkenCharacter.fill(TQColor(255, 0, 0));
g->x2 = 0;
g->y2 = 15;
} else {
- QImage imgi(slot->bitmap.width, slot->bitmap.rows, 32);
+ TQImage imgi(slot->bitmap.width, slot->bitmap.rows, 32);
imgi.setAlphaBuffer(true);
// Do QPixmaps fully support the alpha channel? If yes, we use
@@ -240,7 +240,7 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const QC
} 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 resulting QPixmap. In this case, we define the
+ // 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
// transparent" values. When characters are rendered,
@@ -279,7 +279,7 @@ glyph *TeXFont_PFB::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const QC
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) {
- QString 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.").arg(ch).arg(parent->filename);
if (errorMessage.isEmpty())
errorMessage = msg;
kdError(4300) << msg << endl;
diff --git a/kdvi/TeXFont_PFB.h b/kdvi/TeXFont_PFB.h
index 68211cdb..4e2d8122 100644
--- a/kdvi/TeXFont_PFB.h
+++ b/kdvi/TeXFont_PFB.h
@@ -26,7 +26,7 @@ class TeXFont_PFB : public TeXFont {
TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc=0, double slant=0.0 );
~TeXFont_PFB();
- glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const QColor& color=Qt::black);
+ glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=Qt::black);
private:
FT_Face face;
diff --git a/kdvi/TeXFont_PK.cpp b/kdvi/TeXFont_PK.cpp
index 6a3c9b3a..7e1ce60d 100644
--- a/kdvi/TeXFont_PK.cpp
+++ b/kdvi/TeXFont_PK.cpp
@@ -54,10 +54,10 @@
#include <kdebug.h>
#include <klocale.h>
#include <math.h>
-#include <qbitmap.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qpainter.h>
+#include <tqbitmap.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqpainter.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -76,7 +76,7 @@
#define PK_MAGIC (PK_PRE << 8) + PK_ID
-extern void oops(QString message);
+extern void oops(TQString message);
@@ -89,7 +89,7 @@ TeXFont_PK::TeXFont_PK(TeXFontDefinition *parent)
for(unsigned int i=0; i<TeXFontDefinition::max_num_of_chars_in_font; i++)
characterBitmaps[i] = 0;
- file = fopen(QFile::encodeName(parent->filename), "r");
+ file = fopen(TQFile::encodeName(parent->filename), "r");
if (file == 0)
kdError(4300) << i18n("Cannot open font file %1.").arg(parent->filename) << endl;
#ifdef DEBUG_PK
@@ -116,7 +116,7 @@ TeXFont_PK::~TeXFont_PK()
}
-glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const QColor& color)
+glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const TQColor& color)
{
#ifdef DEBUG_PK
kdDebug(4300) << "TeXFont_PK::getGlyph( ch=" << ch << ", generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl;
@@ -158,7 +158,7 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const QCo
}
// At this point, g points to a properly loaded character. Generate
- // a smoothly scaled QPixmap if the user asks for it.
+ // a smoothly scaled TQPixmap if the user asks for it.
if ((generateCharacterPixmap == true) &&
((g->shrunkenCharacter.isNull()) || (color != g->color)) &&
(characterBitmaps[ch]->w != 0)) {
@@ -208,7 +208,7 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const QCo
int shrunk_height = (int)ceil( (characterBitmaps[ch]->h - srcYTrans)/shrinkFactor );
// Turn the image into 8 bit
- QByteArray translated(characterBitmaps[ch]->w * characterBitmaps[ch]->h);
+ TQByteArray translated(characterBitmaps[ch]->w * characterBitmaps[ch]->h);
Q_UINT8 *data = (Q_UINT8 *)translated.data();
for(int x=0; x<characterBitmaps[ch]->w; x++)
for(int y=0; y<characterBitmaps[ch]->h; y++) {
@@ -219,7 +219,7 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const QCo
}
// Now shrink the image. We shrink the X-direction first
- QByteArray xshrunk(shrunk_width*characterBitmaps[ch]->h);
+ TQByteArray xshrunk(shrunk_width*characterBitmaps[ch]->h);
Q_UINT8 *xdata = (Q_UINT8 *)xshrunk.data();
// Do the shrinking. The pixel (x,y) that we want to calculate
@@ -247,7 +247,7 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const QCo
}
// Now shrink the Y-direction
- QByteArray xyshrunk(shrunk_width*shrunk_height);
+ TQByteArray xyshrunk(shrunk_width*shrunk_height);
Q_UINT8 *xydata = (Q_UINT8 *)xyshrunk.data();
for(int x=0; x<shrunk_width; x++)
for(int y=0; y<shrunk_height; y++) {
@@ -266,7 +266,7 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const QCo
xydata[shrunk_width*y + x] = (int)(value/shrinkFactor);
}
- QImage im32(shrunk_width, shrunk_height, 32);
+ TQImage im32(shrunk_width, shrunk_height, 32);
im32.setAlphaBuffer(true);
// Do QPixmaps fully support the alpha channel? If yes, we use
// that. Otherwise, use other routines as a fallback
@@ -284,7 +284,7 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const QCo
} 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
- // resulting QPixmap. In this case, we define the character
+ // 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 transparent"
// values. When characters are rendered, overlapping characters
@@ -313,7 +313,7 @@ glyph* TeXFont_PK::getGlyph(Q_UINT16 ch, bool generateCharacterPixmap, const QCo
}
g->shrunkenCharacter.convertFromImage(im32,0);
- g->shrunkenCharacter.setOptimization(QPixmap::BestOptim);
+ g->shrunkenCharacter.setOptimization(TQPixmap::BestOptim);
}
return g;
}
diff --git a/kdvi/TeXFont_PK.h b/kdvi/TeXFont_PK.h
index b555934e..80a0c0e1 100644
--- a/kdvi/TeXFont_PK.h
+++ b/kdvi/TeXFont_PK.h
@@ -12,7 +12,7 @@ class TeXFont_PK : public TeXFont {
TeXFont_PK(TeXFontDefinition *parent);
~TeXFont_PK();
- glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const QColor& color=Qt::black);
+ glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=Qt::black);
private:
FILE *file; // open font file or NULL
diff --git a/kdvi/TeXFont_TFM.cpp b/kdvi/TeXFont_TFM.cpp
index 54edd2fc..c8268f01 100644
--- a/kdvi/TeXFont_TFM.cpp
+++ b/kdvi/TeXFont_TFM.cpp
@@ -11,8 +11,8 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qdatastream.h>
-#include <qfile.h>
+#include <tqdatastream.h>
+#include <tqfile.h>
#include "glyph.h"
#include "TeXFont_TFM.h"
@@ -28,12 +28,12 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent)
kdDebug(4300) << "TeXFont_TFM::TeXFont_TFM( parent=" << parent << " )" << endl;
#endif
- QFile file( parent->filename );
+ TQFile file( parent->filename );
if ( !file.open( IO_ReadOnly ) ) {
kdError(4300) << "TeXFont_TFM::TeXFont_TFM(): Could not read TFM file" << endl;
return;
}
- QDataStream stream( &file );
+ TQDataStream stream( &file );
// Data from the very beginning of the TFM file, as specified in
// "The DVI Driver Standard, Level 0", section D.2.1
@@ -122,7 +122,7 @@ TeXFont_TFM::~TeXFont_TFM()
}
-glyph *TeXFont_TFM::getGlyph(Q_UINT16 characterCode, bool generateCharacterPixmap, const QColor& color)
+glyph *TeXFont_TFM::getGlyph(Q_UINT16 characterCode, bool generateCharacterPixmap, const TQColor& color)
{
#ifdef DEBUG_TFM
kdDebug(4300) << "TeXFont_TFM::getGlyph( ch=" << ch << ", generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl;
diff --git a/kdvi/TeXFont_TFM.h b/kdvi/TeXFont_TFM.h
index e68ba872..737c8bed 100644
--- a/kdvi/TeXFont_TFM.h
+++ b/kdvi/TeXFont_TFM.h
@@ -26,7 +26,7 @@ class TeXFont_TFM : public TeXFont {
TeXFont_TFM(TeXFontDefinition *parent);
~TeXFont_TFM();
- glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const QColor& color=Qt::black);
+ glyph* getGlyph(Q_UINT16 character, bool generateCharacterPixmap=false, const TQColor& color=Qt::black);
private:
fix_word characterWidth_in_units_of_design_size[256];
diff --git a/kdvi/bigEndianByteReader.h b/kdvi/bigEndianByteReader.h
index 674ca1c1..06ef1b13 100644
--- a/kdvi/bigEndianByteReader.h
+++ b/kdvi/bigEndianByteReader.h
@@ -18,7 +18,7 @@
#ifndef _bigEndianByteReader_H
#define _bigEndianByteReader_H
-#include <qglobal.h>
+#include <tqglobal.h>
class bigEndianByteReader {
public:
diff --git a/kdvi/dviFile.cpp b/kdvi/dviFile.cpp
index 521fb39f..336507db 100644
--- a/kdvi/dviFile.cpp
+++ b/kdvi/dviFile.cpp
@@ -54,8 +54,8 @@
#include <kdebug.h>
#include <klocale.h>
#include <ktempfile.h>
-#include <qdir.h>
-#include <qfileinfo.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
#include <stdlib.h>
#include <kprocio.h>
@@ -71,7 +71,7 @@ extern "C" {
dvifile::dvifile(const dvifile *old, fontPool *fp)
{
- errorMsg = QString::null;
+ errorMsg = TQString::null;
errorCounter = 0;
page_offset = 0;
suggestedPageSize = 0;
@@ -267,13 +267,13 @@ void dvifile::prepare_pages()
}
-dvifile::dvifile(const QString& fname, fontPool* pool)
+dvifile::dvifile(const TQString& fname, fontPool* pool)
{
#ifdef DEBUG_DVIFILE
kdDebug(4300) << "init_dvi_file: " << fname << endl;
#endif
- errorMsg = QString::null;
+ errorMsg = TQString::null;
errorCounter = 0;
page_offset = 0;
suggestedPageSize = 0;
@@ -282,7 +282,7 @@ dvifile::dvifile(const QString& fname, fontPool* pool)
font_pool = pool;
sourceSpecialMarker = true;
- QFile file(fname);
+ TQFile file(fname);
filename = file.name();
file.open( IO_ReadOnly );
size_of_file = file.size();
@@ -319,9 +319,9 @@ dvifile::~dvifile()
#endif
// Delete converted PDF files
- QMap<QString, QString>::Iterator it;
+ TQMap<TQString, TQString>::Iterator it;
for ( it = convertedFiles.begin(); it != convertedFiles.end(); ++it )
- QFile::remove(it.data());
+ TQFile::remove(it.data());
if (suggestedPageSize != 0)
delete suggestedPageSize;
@@ -359,18 +359,18 @@ void dvifile::renumber()
}
-QString dvifile::convertPDFtoPS(const QString &PDFFilename)
+TQString dvifile::convertPDFtoPS(const TQString &PDFFilename)
{
// Check if the PDFFile is known
- QMap<QString, QString>::Iterator it = convertedFiles.find(PDFFilename);
+ TQMap<TQString, TQString>::Iterator it = convertedFiles.find(PDFFilename);
if (it != convertedFiles.end()) {
// PDF-File is known. Good.
return it.data();
}
// Get the name of a temporary file
- KTempFile tmpfile(QString::null, ".ps");
- QString convertedFileName = tmpfile.name();
+ KTempFile tmpfile(TQString::null, ".ps");
+ TQString convertedFileName = tmpfile.name();
tmpfile.close();
tmpfile.unlink();
@@ -378,9 +378,9 @@ QString dvifile::convertPDFtoPS(const QString &PDFFilename)
KProcIO proc;
proc << "pdf2ps" << PDFFilename << convertedFileName;
if (proc.start(KProcess::Block) == false)
- convertedFileName = QString::null; // Indicates that conversion failed, won't try again.
- if (!QFile::exists(convertedFileName))
- convertedFileName = QString::null; // Indicates that conversion failed, won't try again.
+ convertedFileName = TQString::null; // Indicates that conversion failed, won't try again.
+ if (!TQFile::exists(convertedFileName))
+ convertedFileName = TQString::null; // 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
@@ -391,12 +391,12 @@ QString dvifile::convertPDFtoPS(const QString &PDFFilename)
}
-bool dvifile::saveAs(const QString &filename)
+bool dvifile::saveAs(const TQString &filename)
{
if (dvi_Data() == 0)
return false;
- QFile out(filename);
+ TQFile out(filename);
if (out.open( IO_Raw|IO_WriteOnly ) == false)
return false;
if (out.writeBlock ( (char *)(dvi_Data()), size_of_file ) == -1)
diff --git a/kdvi/dviFile.h b/kdvi/dviFile.h
index 069ae6d9..59ffe65c 100644
--- a/kdvi/dviFile.h
+++ b/kdvi/dviFile.h
@@ -13,10 +13,10 @@
#include "bigEndianByteReader.h"
-#include <qintdict.h>
-#include <qiodevice.h>
-#include <qmemarray.h>
-#include <qstring.h>
+#include <tqintdict.h>
+#include <tqiodevice.h>
+#include <tqmemarray.h>
+#include <tqstring.h>
class fontPool;
class pageSize;
@@ -28,25 +28,25 @@ class dvifile : public bigEndianByteReader
public:
/** Makes a deep copy of the old DVI file. */
dvifile(const dvifile *old, fontPool *fp );
- dvifile(const QString& fname, class fontPool* pool);
+ dvifile(const TQString& fname, class fontPool* pool);
~dvifile();
fontPool * font_pool;
- QString filename;
- QString generatorString;
+ TQString filename;
+ TQString generatorString;
Q_UINT16 total_pages;
- QMemArray<Q_UINT32> page_offset;
+ TQMemArray<Q_UINT32> page_offset;
/** Saves the DVI file. Returns true on success. */
- bool saveAs(const QString &filename);
+ 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();}
- QIODevice::Offset size_of_file;
- QString errorMsg;
+ TQIODevice::Offset size_of_file;
+ TQString errorMsg;
/** This field is set to zero when the DVI file is constructed, and
will be modified during the prescan phase (at this time the
@@ -68,7 +68,7 @@ class dvifile : public bigEndianByteReader
KDVI ensures that the user is only informed once. */
bool sourceSpecialMarker;
- QIntDict<TeXFontDefinition> tn_table;
+ TQIntDict<TeXFontDefinition> tn_table;
/** Returns the number of centimeters per DVI unit in this DVI
file. */
@@ -89,7 +89,7 @@ class dvifile : public bigEndianByteReader
/** Sets new DVI data; all old data is erased. EXPERIMENTAL, use
with care. */
- void setNewData(const QMemArray<Q_UINT8>& newData) {dviData = newData;}
+ void setNewData(const TQMemArray<Q_UINT8>& 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,9 +112,9 @@ 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 QString::null on failure.
+ @returns The name of the PS file, or TQString::null on failure.
*/
- QString convertPDFtoPS(const QString &PDFFilename);
+ TQString convertPDFtoPS(const TQString &PDFFilename);
private:
/** process_preamble reads the information in the preamble and
@@ -134,17 +134,17 @@ class dvifile : public bigEndianByteReader
double cmPerDVIunit;
- QMemArray<Q_UINT8> dviData;
+ TQMemArray<Q_UINT8> 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 QString::null, if the file could not
+ of the associated PS file, or TQString::null, if the file could not
be converted. The PS files are deleted when the DVI-file is
destructed. */
- QMap<QString, QString> convertedFiles;
+ TQMap<TQString, TQString> convertedFiles;
};
#endif //ifndef _DVIFILE_H
diff --git a/kdvi/dviRenderer.cpp b/kdvi/dviRenderer.cpp
index b9bf6256..2e0b0512 100644
--- a/kdvi/dviRenderer.cpp
+++ b/kdvi/dviRenderer.cpp
@@ -14,19 +14,19 @@
#include <stdlib.h>
#include <string.h>
-#include <qcheckbox.h>
-#include <qclipboard.h>
-#include <qcursor.h>
-#include <qlabel.h>
-#include <qfileinfo.h>
-#include <qlayout.h>
-#include <qmessagebox.h>
-#include <qpaintdevice.h>
-#include <qpainter.h>
-#include <qptrstack.h>
-#include <qregexp.h>
-#include <qurl.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqclipboard.h>
+#include <tqcursor.h>
+#include <tqlabel.h>
+#include <tqfileinfo.h>
+#include <tqlayout.h>
+#include <tqmessagebox.h>
+#include <tqpaintdevice.h>
+#include <tqpainter.h>
+#include <tqptrstack.h>
+#include <tqregexp.h>
+#include <tqurl.h>
+#include <tqvbox.h>
#include <kapplication.h>
#include <kmessagebox.h>
@@ -62,12 +62,12 @@
//#define DEBUG_DVIRENDERER
-QPainter *foreGroundPainter; // QPainter used for text
+TQPainter *foreGroundPainter; // TQPainter used for text
//------ now comes the dviRenderer class implementation ----------
-dviRenderer::dviRenderer(QWidget *par)
+dviRenderer::dviRenderer(TQWidget *par)
: DocumentRenderer(par), info(new infoDialog(par))
{
#ifdef DEBUG_DVIRENDERER
@@ -77,14 +77,14 @@ dviRenderer::dviRenderer(QWidget *par)
// initialize the dvi machinery
dviFile = 0;
- connect(&font_pool, SIGNAL( setStatusBarText( const QString& ) ), this, SIGNAL( setStatusBarText( const QString& ) ) );
+ connect(&font_pool, TQT_SIGNAL( setStatusBarText( const TQString& ) ), this, TQT_SIGNAL( setStatusBarText( const TQString& ) ) );
parentWidget = par;
shrinkfactor = 3;
current_page = 0;
resolutionInDPI = 0.0;
- connect( &clearStatusBarTimer, SIGNAL(timeout()), this, SLOT(clearStatusBar()) );
+ connect( &clearStatusBarTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(clearStatusBar()) );
currentlyDrawnPage = 0;
editorCommand = "";
@@ -103,7 +103,7 @@ dviRenderer::dviRenderer(QWidget *par)
PS_interface = new ghostscript_interface();
// pass status bar messages through
- connect(PS_interface, SIGNAL( setStatusBarText( const QString& ) ), this, SIGNAL( setStatusBarText( const QString& ) ) );
+ connect(PS_interface, TQT_SIGNAL( setStatusBarText( const TQString& ) ), this, TQT_SIGNAL( setStatusBarText( const TQString& ) ) );
}
@@ -125,9 +125,9 @@ dviRenderer::~dviRenderer()
}
-void dviRenderer::setPrefs(bool flag_showPS, const QString &str_editorCommand, bool useFontHints )
+void dviRenderer::setPrefs(bool flag_showPS, const TQString &str_editorCommand, bool useFontHints )
{
- QMutexLocker locker(&mutex);
+ TQMutexLocker locker(&mutex);
_postscript = flag_showPS;
editorCommand = str_editorCommand;
font_pool.setParameters( useFontHints );
@@ -195,14 +195,14 @@ void dviRenderer::drawPage(double resolution, RenderedDocumentPage *page)
colorStack.clear();
globalColor = Qt::black;
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
foreGroundPainter = page->getPainter();
if (foreGroundPainter != 0) {
- errorMsg = QString::null;
+ errorMsg = TQString::null;
draw_page();
page->returnPainter(foreGroundPainter);
}
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
page->isEmpty = false;
if (errorMsg.isEmpty() != true) {
@@ -210,7 +210,7 @@ void dviRenderer::drawPage(double resolution, RenderedDocumentPage *page)
i18n("<qt><strong>File corruption!</strong> KDVI had trouble interpreting your DVI file. Most "
"likely this means that the DVI file is broken.</qt>"),
errorMsg, i18n("DVI File Error"));
- errorMsg = QString::null;
+ errorMsg = TQString::null;
currentlyDrawnPage = 0;
mutex.unlock();
return;
@@ -225,7 +225,7 @@ void dviRenderer::drawPage(double resolution, RenderedDocumentPage *page)
dviFile->sourceSpecialMarker = false;
// Show the dialog as soon as event processing is finished, and
// the program is idle
- QTimer::singleShot( 0, this, SLOT(showThatSourceInformationIsPresent()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(showThatSourceInformationIsPresent()) );
}
}
@@ -262,27 +262,27 @@ void dviRenderer::showThatSourceInformationIsPresent()
KDialogBase *dialog= new KDialogBase(i18n("KDVI: Information"), KDialogBase::Yes, KDialogBase::Yes, KDialogBase::Yes,
parentWidget, "information", true, true,KStdGuiItem::ok() );
- QVBox *topcontents = new QVBox (dialog);
+ TQVBox *topcontents = new TQVBox (dialog);
topcontents->setSpacing(KDialog::spacingHint()*2);
topcontents->setMargin(KDialog::marginHint()*2);
- QWidget *contents = new QWidget(topcontents);
- QHBoxLayout * lay = new QHBoxLayout(contents);
+ TQWidget *contents = new TQWidget(topcontents);
+ TQHBoxLayout * lay = new TQHBoxLayout(contents);
lay->setSpacing(KDialog::spacingHint()*2);
lay->addStretch(1);
- QLabel *label1 = new QLabel( contents);
- label1->setPixmap(QMessageBox::standardIcon(QMessageBox::Information));
+ TQLabel *label1 = new TQLabel( contents);
+ label1->setPixmap(TQMessageBox::standardIcon(TQMessageBox::Information));
lay->add( label1 );
- QLabel *label2 = new QLabel( i18n("<qt>This DVI file contains source file information. You may click into the text with the "
+ TQLabel *label2 = new TQLabel( i18n("<qt>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.</qt>"),
contents);
label2->setMinimumSize(label2->sizeHint());
lay->add( label2 );
lay->addStretch(1);
- QSize extraSize = QSize(50,30);
- QCheckBox *checkbox = new QCheckBox(i18n("Do not show this message again"), topcontents);
- extraSize = QSize(50,0);
+ TQSize extraSize = TQSize(50,30);
+ TQCheckBox *checkbox = new TQCheckBox(i18n("Do not show this message again"), topcontents);
+ extraSize = TQSize(50,0);
dialog->setHelpLinkText(i18n("Explain in more detail..."));
dialog->setHelp("inverse-search", "kdvi");
dialog->enableLinkedHelp(true);
@@ -312,7 +312,7 @@ void dviRenderer::embedPostScript()
return;
embedPS_progress = new KProgressDialog(parentWidget, "embedPSProgressDialog",
- i18n("Embedding PostScript Files"), QString::null, true);
+ i18n("Embedding PostScript Files"), TQString::null, true);
if (!embedPS_progress)
return;
embedPS_progress->setAllowCancel(false);
@@ -324,7 +324,7 @@ void dviRenderer::embedPostScript()
Q_UINT16 currPageSav = current_page;
- errorMsg = QString::null;
+ errorMsg = TQString::null;
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];
@@ -343,22 +343,22 @@ void dviRenderer::embedPostScript()
if (!errorMsg.isEmpty()) {
errorMsg = "<qt>" + errorMsg + "</qt>";
KMessageBox::detailedError(parentWidget, "<qt>" + i18n("Not all PostScript files could be embedded into your document.") + "</qt>", errorMsg);
- errorMsg = QString::null;
+ errorMsg = TQString::null;
} else
KMessageBox::information(parentWidget, "<qt>" + i18n("All external PostScript files were embedded into your document. You "
"will probably want to save the DVI file now.") + "</qt>",
- QString::null, "embeddingDone");
+ TQString::null, "embeddingDone");
// Prescan phase starts here
#ifdef PERFORMANCE_MEASUREMENT
kdDebug(4300) << "Time elapsed till prescan phase starts " << performanceTimer.elapsed() << "ms" << endl;
- QTime preScanTimer;
+ TQTime preScanTimer;
preScanTimer.start();
#endif
dviFile->numberOfExternalPSFiles = 0;
prebookmarks.clear();
for(current_page=0; current_page < dviFile->total_pages; current_page++) {
- PostScriptOutPutString = new QString();
+ PostScriptOutPutString = new TQString();
if (current_page < dviFile->total_pages) {
command_pointer = dviFile->dvi_Data() + dviFile->page_offset[current_page];
@@ -387,9 +387,9 @@ void dviRenderer::embedPostScript()
}
-bool dviRenderer::isValidFile(const QString& filename) const
+bool dviRenderer::isValidFile(const TQString& filename) const
{
- QFile f(filename);
+ TQFile f(filename);
if (!f.open(IO_ReadOnly))
return false;
@@ -411,16 +411,16 @@ bool dviRenderer::isValidFile(const QString& filename) const
}
-bool dviRenderer::setFile(const QString &fname, const KURL &base)
+bool dviRenderer::setFile(const TQString &fname, const KURL &base)
{
#ifdef DEBUG_DVIRENDERER
kdDebug(4300) << "dviRenderer::setFile( fname='" << fname << "', ref='" << ref << "', sourceMarker=" << sourceMarker << " )" << endl;
#endif
- QMutexLocker lock(&mutex);
+ TQMutexLocker lock(&mutex);
- QFileInfo fi(fname);
- QString filename = fi.absFilePath();
+ TQFileInfo fi(fname);
+ TQString filename = fi.absFilePath();
// If fname is the empty string, then this means: "close". Delete
// the dvifile and the pixmap.
@@ -446,7 +446,7 @@ bool dviRenderer::setFile(const QString &fname, const KURL &base)
// mime type, if the file is not DVI. Perhaps we should move the
// procedure later to the kviewpart, instead of the implementaton in
// the multipage.
- QString mimetype( KMimeMagic::self()->findFileType( fname )->mimeType() );
+ TQString mimetype( KMimeMagic::self()->findFileType( fname )->mimeType() );
if (mimetype != "application/x-dvi") {
KMessageBox::sorry( parentWidget,
i18n( "<qt>Could not open file <nobr><strong>%1</strong></nobr> which has "
@@ -466,7 +466,7 @@ bool dviRenderer::setFile(const QString &fname, const KURL &base)
return false;
}
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
dvifile *dviFile_new = new dvifile(filename, &font_pool);
if ((dviFile == 0) || (dviFile->filename != filename))
@@ -475,7 +475,7 @@ bool dviRenderer::setFile(const QString &fname, const KURL &base)
dviFile_new->sourceSpecialMarker = false;
if ((dviFile_new->dvi_Data() == NULL)||(dviFile_new->errorMsg.isEmpty() != true)) {
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if (dviFile_new->errorMsg.isEmpty() != true)
KMessageBox::detailedError(parentWidget,
i18n("<qt>File corruption! KDVI had trouble interpreting your DVI file. Most "
@@ -504,7 +504,7 @@ bool dviRenderer::setFile(const QString &fname, const KURL &base)
// web server), we limit the PostScript files that can be accessed
// by this file to the download directory, in order to limit the
// possibilities of a denial of service attack.
- QString includePath;
+ TQString includePath;
if (!baseURL.isLocalFile()) {
includePath = filename;
includePath.truncate(includePath.findRev('/'));
@@ -534,7 +534,7 @@ bool dviRenderer::setFile(const QString &fname, const KURL &base)
// PRESCAN STARTS HERE
#ifdef PERFORMANCE_MEASUREMENT
kdDebug(4300) << "Time elapsed till prescan phase starts " << performanceTimer.elapsed() << "ms" << endl;
- QTime preScanTimer;
+ TQTime preScanTimer;
preScanTimer.start();
#endif
dviFile->numberOfExternalPSFiles = 0;
@@ -542,7 +542,7 @@ bool dviRenderer::setFile(const QString &fname, const KURL &base)
prebookmarks.clear();
for(current_page=0; current_page < dviFile->total_pages; current_page++) {
- PostScriptOutPutString = new QString();
+ PostScriptOutPutString = new TQString();
if (current_page < dviFile->total_pages) {
command_pointer = dviFile->dvi_Data() + dviFile->page_offset[current_page];
@@ -563,9 +563,9 @@ bool dviRenderer::setFile(const QString &fname, const KURL &base)
// Generate the list of bookmarks
bookmarks.clear();
- QPtrStack<Bookmark> stack;
+ TQPtrStack<Bookmark> stack;
stack.setAutoDelete (false);
- QValueVector<PreBookmark>::iterator it;
+ TQValueVector<PreBookmark>::iterator it;
for( it = prebookmarks.begin(); it != prebookmarks.end(); ++it ) {
Bookmark *bmk = new Bookmark((*it).title, findAnchor((*it).anchorName));
if (stack.isEmpty())
@@ -593,12 +593,12 @@ bool dviRenderer::setFile(const QString &fname, const KURL &base)
pageSizes.resize(dviFile->total_pages, *(dviFile->suggestedPageSize));
}
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return true;
}
-Anchor dviRenderer::parseReference(const QString &reference)
+Anchor dviRenderer::parseReference(const TQString &reference)
{
mutex.lock();
@@ -634,7 +634,7 @@ Anchor dviRenderer::parseReference(const QString &reference)
// Extract the file name and the numeral part from the reference string
DVI_SourceFileSplitter splitter(reference, dviFile->filename);
Q_UINT32 refLineNumber = splitter.line();
- QString refFileName = splitter.filePath();
+ TQString refFileName = splitter.filePath();
if (sourceHyperLinkAnchors.isEmpty()) {
KMessageBox::sorry(parentWidget, i18n("<qt>You have asked KDVI to locate the place in the DVI file which corresponds to "
@@ -662,8 +662,8 @@ Anchor dviRenderer::parseReference(const QString &reference)
// document.
bool anchorForRefFileFound = false; // Flag that is set if source file anchors for the refFileName could be found at all
- QValueVector<DVI_SourceFileAnchor>::iterator bestMatch = sourceHyperLinkAnchors.end();
- QValueVector<DVI_SourceFileAnchor>::iterator it;
+ TQValueVector<DVI_SourceFileAnchor>::iterator bestMatch = sourceHyperLinkAnchors.end();
+ TQValueVector<DVI_SourceFileAnchor>::iterator it;
for( it = sourceHyperLinkAnchors.begin(); it != sourceHyperLinkAnchors.end(); ++it )
if (refFileName.stripWhiteSpace() == it->fileName.stripWhiteSpace()
|| refFileName.stripWhiteSpace() == it->fileName.stripWhiteSpace() + ".tex"
@@ -715,11 +715,11 @@ void dviRenderer::setResolution(double resolution_in_DPI)
void dviRenderer::clearStatusBar()
{
- emit setStatusBarText( QString::null );
+ emit setStatusBarText( TQString::null );
}
-void dviRenderer::handleSRCLink(const QString &linkText, QMouseEvent *e, DocumentWidget *win)
+void dviRenderer::handleSRCLink(const TQString &linkText, TQMouseEvent *e, DocumentWidget *win)
{
#ifdef DEBUG_SPECIAL
RenderedDviPagePixmap* currentDVIPage = dynamic_cast<RenderedDviPagePixmap*> currentlyDrawnPage;
@@ -730,25 +730,25 @@ void dviRenderer::handleSRCLink(const QString &linkText, QMouseEvent *e, Documen
#endif
DVI_SourceFileSplitter splitter(linkText, dviFile->filename);
- QString TeXfile = splitter.filePath();
+ TQString TeXfile = splitter.filePath();
if ( ! splitter.fileExists() )
{
- KMessageBox::sorry(parentWidget, QString("<qt>") +
+ KMessageBox::sorry(parentWidget, TQString("<qt>") +
i18n("The DVI-file refers to the TeX-file "
"<strong>%1</strong> which could not be found.").arg(KShellProcess::quote(TeXfile)) +
- QString("</qt>"),
+ TQString("</qt>"),
i18n( "Could Not Find File" ));
return;
}
- QString command = editorCommand;
+ TQString command = editorCommand;
if (command.isEmpty() == true) {
- int r = KMessageBox::warningContinueCancel(parentWidget, QString("<qt>") +
+ int r = KMessageBox::warningContinueCancel(parentWidget, TQString("<qt>") +
i18n("You have not yet specified an editor for inverse search. "
"Please choose your favorite editor in the "
"<strong>DVI options dialog</strong> "
"which you will find in the <strong>Settings</strong>-menu.") +
- QString("</qt>"),
+ TQString("</qt>"),
i18n("Need to Specify Editor"),
i18n("Use KDE's Editor Kate for Now"));
if (r == KMessageBox::Continue)
@@ -756,7 +756,7 @@ void dviRenderer::handleSRCLink(const QString &linkText, QMouseEvent *e, Documen
else
return;
}
- command = command.replace( "%l", QString::number(splitter.line()) ).replace( "%f", KShellProcess::quote(TeXfile) );
+ command = command.replace( "%l", TQString::number(splitter.line()) ).replace( "%f", KShellProcess::quote(TeXfile) );
#ifdef DEBUG_SPECIAL
kdDebug(4300) << "Calling program: " << command << endl;
@@ -767,8 +767,8 @@ void dviRenderer::handleSRCLink(const QString &linkText, QMouseEvent *e, Documen
// 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, SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0);
- qApp->disconnect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0);
+ qApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0);
+ qApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0);
proc = 0;
}
@@ -778,9 +778,9 @@ void dviRenderer::handleSRCLink(const QString &linkText, QMouseEvent *e, Documen
kdError(4300) << "Could not allocate ShellProcess for the editor command." << endl;
return;
}
- qApp->connect(proc, SIGNAL(receivedStderr(KProcess *, char *, int)), this, SLOT(dvips_output_receiver(KProcess *, char *, int)));
- qApp->connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)), this, SLOT(dvips_output_receiver(KProcess *, char *, int)));
- qApp->connect(proc, SIGNAL(processExited(KProcess *)), this, SLOT(editorCommand_terminated(KProcess *)));
+ 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 *)));
// Merge the editor-specific editor message here.
export_errorString = i18n("<qt>The external program<br><br><tt><strong>%1</strong></tt><br/><br/>which was used to call the editor "
"for inverse search, reported an error. You might wish to look at the <strong>document info "
@@ -804,12 +804,12 @@ void dviRenderer::handleSRCLink(const QString &linkText, QMouseEvent *e, Documen
}
-QString dviRenderer::PDFencodingToQString(const QString& _pdfstring)
+TQString dviRenderer::PDFencodingToQString(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.
- QString pdfstring = _pdfstring;
+ TQString pdfstring = _pdfstring;
pdfstring = pdfstring.replace("\\n", "\n");
pdfstring = pdfstring.replace("\\r", "\n");
pdfstring = pdfstring.replace("\\t", "\t");
@@ -820,17 +820,17 @@ QString dviRenderer::PDFencodingToQString(const QString& _pdfstring)
// Now replace octal character codes with the characters they encode
int pos;
- QRegExp rx( "(\\\\)(\\d\\d\\d)" ); // matches "\xyz" where x,y,z are numbers
+ TQRegExp rx( "(\\\\)(\\d\\d\\d)" ); // matches "\xyz" where x,y,z are numbers
while((pos = rx.search( pdfstring )) != -1) {
- pdfstring = pdfstring.replace(pos, 4, QChar(rx.cap(2).toInt(0,8)));
+ pdfstring = pdfstring.replace(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, QChar(rx.cap(2).toInt(0,8)));
+ pdfstring = pdfstring.replace(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, QChar(rx.cap(2).toInt(0,8)));
+ pdfstring = pdfstring.replace(pos, 4, TQChar(rx.cap(2).toInt(0,8)));
}
return pdfstring;
}
diff --git a/kdvi/dviRenderer.h b/kdvi/dviRenderer.h
index 98f0f4bd..863a2786 100644
--- a/kdvi/dviRenderer.h
+++ b/kdvi/dviRenderer.h
@@ -15,11 +15,11 @@
#include "fontpool.h"
#include <kurl.h>
-#include <qintdict.h>
-#include <qpointarray.h>
-#include <qtimer.h>
-#include <qvaluestack.h>
-#include <qvaluevector.h>
+#include <tqintdict.h>
+#include <tqpointarray.h>
+#include <tqtimer.h>
+#include <tqvaluestack.h>
+#include <tqvaluevector.h>
class Anchor;
class DocumentWidget;
@@ -41,11 +41,11 @@ extern const int MFResolutions[];
class DVI_SourceFileAnchor {
public:
DVI_SourceFileAnchor() {}
- DVI_SourceFileAnchor(const QString& name, Q_UINT32 ln, Q_UINT32 pg, const Length& _distance_from_top)
+ DVI_SourceFileAnchor(const TQString& name, Q_UINT32 ln, Q_UINT32 pg, const Length& _distance_from_top)
: fileName(name), line(ln), page(pg),
distance_from_top(_distance_from_top) {}
- QString fileName;
+ TQString fileName;
Q_UINT32 line;
Q_UINT32 page;
Length distance_from_top;
@@ -76,7 +76,7 @@ struct drawinf {
TeXFontDefinition *fontp;
set_char_proc set_char_p;
- QIntDict<TeXFontDefinition> *fonttable;
+ TQIntDict<TeXFontDefinition> *fonttable;
TeXFontDefinition *_virtual;
};
@@ -87,20 +87,20 @@ class dviRenderer : public DocumentRenderer, bigEndianByteReader
Q_OBJECT
public:
- dviRenderer(QWidget *parent);
+ dviRenderer(TQWidget *parent);
~dviRenderer();
- virtual bool setFile(const QString &fname, const KURL &base);
+ virtual bool setFile(const TQString &fname, const KURL &base);
class dvifile *dviFile;
- void setPrefs(bool flag_showPS, const QString &editorCommand, bool useFontHints );
+ void setPrefs(bool flag_showPS, const TQString &editorCommand, bool useFontHints );
virtual bool supportsTextSearch() const {return true;}
bool showPS() { return _postscript; }
int curr_page() { return current_page+1; }
- virtual bool isValidFile(const QString& fileName) const;
+ virtual bool isValidFile(const TQString& fileName) const;
/** This method will try to parse the reference part of the DVI
@@ -108,7 +108,7 @@ public:
number, or src:<line><filename>) and see if a corresponding
section of the DVI file can be found. If so, it returns an
anchor to that section. If not, it returns an invalid anchor. */
- virtual Anchor parseReference(const QString &reference);
+ virtual Anchor parseReference(const TQString &reference);
// These should not be public... only for the moment
void read_postamble();
@@ -120,23 +120,23 @@ public:
void applicationDoSpecial(char * cp);
void special(long nbytes);
- void printErrorMsgForSpecials(const QString& msg);
- void color_special(const QString& cp);
- void html_href_special(const QString& cp);
+ void printErrorMsgForSpecials(const TQString& msg);
+ void color_special(const TQString& cp);
+ void html_href_special(const TQString& cp);
void html_anchor_end();
void draw_page();
public slots:
- void exportPS(const QString& fname = QString::null, const QString& options = QString::null, KPrinter* printer = 0);
+ void exportPS(const TQString& fname = TQString::null, const TQString& options = TQString::null, KPrinter* printer = 0);
void exportPDF();
void showInfo();
- void handleSRCLink(const QString &linkText, QMouseEvent *e, DocumentWidget *widget);
+ void handleSRCLink(const TQString &linkText, TQMouseEvent *e, DocumentWidget *widget);
void embedPostScript();
void abortExternalProgramm();
- /** simply emits "setStatusBarText( QString::null )". This is used
+ /** simply emits "setStatusBarText( TQString::null )". This is used
in dviRenderer::mouseMoveEvent(), see the explanation there. */
void clearStatusBar();
@@ -150,7 +150,7 @@ public slots:
signals:
/** Passed through to the top-level kpart. */
- // void setStatusBarText( const QString& );
+ // void setStatusBarText( const TQString& );
private slots:
/** This method shows a dialog that tells the user that source
@@ -169,17 +169,17 @@ private:
/** This method parses a color specification of type "gray 0.5", "rgb
0.5 0.7 1.0", "hsb ...", "cmyk .." or "PineGreen". See the source
code for details. */
- QColor parseColorSpecification(const QString& colorSpec);
+ TQColor parseColorSpecification(const TQString& colorSpec);
/** This map contains the colors which are known by name. This field
is initialized in the method parseColorSpecification() as soon as
it is needed. */
- QMap<QString, QColor> namedColors;
+ TQMap<TQString, TQColor> namedColors;
/* 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 */
- QString PDFencodingToQString(const QString& pdfstring);
+ TQString PDFencodingToQString(const TQString& pdfstring);
void setResolution(double resolution_in_DPI);
@@ -193,19 +193,19 @@ private:
void prescan_embedPS(char *cp, Q_UINT8 *);
void prescan_removePageSizeInfo(char *cp, Q_UINT8 *);
void prescan_parseSpecials(char *cp, Q_UINT8 *);
- void prescan_ParsePapersizeSpecial(const QString& cp);
- void prescan_ParseBackgroundSpecial(const QString& cp);
- void prescan_ParseHTMLAnchorSpecial(const QString& cp);
- void prescan_ParsePSHeaderSpecial(const QString& cp);
- void prescan_ParsePSBangSpecial(const QString& cp);
- void prescan_ParsePSQuoteSpecial(const QString& cp);
- void prescan_ParsePSSpecial(const QString& cp);
- void prescan_ParsePSFileSpecial(const QString& cp);
- void prescan_ParseSourceSpecial(const QString& cp);
+ void prescan_ParsePapersizeSpecial(const TQString& cp);
+ void prescan_ParseBackgroundSpecial(const TQString& cp);
+ void prescan_ParseHTMLAnchorSpecial(const TQString& cp);
+ void prescan_ParsePSHeaderSpecial(const TQString& cp);
+ void prescan_ParsePSBangSpecial(const TQString& cp);
+ void prescan_ParsePSQuoteSpecial(const TQString& cp);
+ void prescan_ParsePSSpecial(const TQString& cp);
+ void prescan_ParsePSFileSpecial(const TQString& cp);
+ void prescan_ParseSourceSpecial(const TQString& cp);
void prescan_setChar(unsigned int ch);
/* */
- QValueVector<PreBookmark> prebookmarks;
+ TQValueVector<PreBookmark> prebookmarks;
@@ -216,15 +216,15 @@ private:
/** Shrink factor. Units are not quite clear */
double shrinkfactor;
- QString errorMsg;
+ TQString errorMsg;
/** Methods which handle certain special commands. */
- void epsf_special(const QString& cp);
- void source_special(const QString& cp);
+ void epsf_special(const TQString& cp);
+ void source_special(const TQString& cp);
/** TPIC specials */
- void TPIC_setPen_special(const QString& cp);
- void TPIC_addPath_special(const QString& cp);
+ void TPIC_setPen_special(const TQString& cp);
+ void TPIC_addPath_special(const TQString& cp);
void TPIC_flushPath_special();
/** This timer is used to delay clearing of the statusbar. Clearing
@@ -232,39 +232,39 @@ private:
mouse moves over a block of text that contains source
hyperlinks. The signal timeout() is connected to the method
clearStatusBar() of *this. */
- QTimer clearStatusBarTimer;
+ TQTimer clearStatusBarTimer;
// List of source-hyperlinks on all pages. This vector is generated
// when the DVI-file is first loaded, i.e. when draw_part is called
// with PostScriptOutPutString != NULL
- QValueVector<DVI_SourceFileAnchor> sourceHyperLinkAnchors;
+ TQValueVector<DVI_SourceFileAnchor> sourceHyperLinkAnchors;
// If not NULL, the text currently drawn represents a source
// hyperlink to the (relative) URL given in the string;
- QString *source_href;
+ TQString *source_href;
// If not NULL, the text currently drawn represents a hyperlink to
// the (relative) URL given in the string;
- QString *HTML_href;
+ TQString *HTML_href;
- QString editorCommand;
+ TQString editorCommand;
/** Stack for register compounds, used for the DVI-commands PUSH/POP
as explained in section 2.5 and 2.6.2 of the DVI driver standard,
Level 0, published by the TUG DVI driver standards committee. */
- QValueStack<struct framedata> stack;
+ TQValueStack<struct framedata> stack;
/** A stack where color are stored, according to the documentation of
DVIPS */
- QValueStack<QColor> colorStack;
+ TQValueStack<TQColor> colorStack;
/** The global color is to be used when the color stack is empty */
- QColor globalColor;
+ TQColor globalColor;
/** If PostScriptOutPutFile is non-zero, then no rendering takes
place. Instead, the PostScript code which is generated by the
\special-commands is written to the PostScriptString */
- QString *PostScriptOutPutString;
+ TQString *PostScriptOutPutString;
ghostscript_interface *PS_interface;
@@ -284,13 +284,13 @@ private:
fontProgressDialog *progress;
KShellProcess *proc;
KPrinter *export_printer;
- QString export_fileName;
- QString export_tmpFileName;
- QString export_errorString;
+ TQString export_fileName;
+ TQString export_tmpFileName;
+ TQString export_errorString;
/** Data required for handling TPIC specials */
float penWidth_in_mInch;
- QPointArray TPIC_path;
+ TQPointArray TPIC_path;
Q_UINT16 number_of_elements_in_path;
struct drawinf currinf;
diff --git a/kdvi/dviRenderer_draw.cpp b/kdvi/dviRenderer_draw.cpp
index d09caf6d..b65f240e 100644
--- a/kdvi/dviRenderer_draw.cpp
+++ b/kdvi/dviRenderer_draw.cpp
@@ -70,13 +70,13 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <kprocess.h>
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qfileinfo.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqfileinfo.h>
-extern QPainter *foreGroundPainter;
+extern TQPainter *foreGroundPainter;
/** Routine to print characters. */
@@ -97,7 +97,7 @@ void dviRenderer::set_char(unsigned int cmd, unsigned int ch)
long dvi_h_sav = currinf.data.dvi_h;
- QPixmap pix = g->shrunkenCharacter;
+ TQPixmap pix = g->shrunkenCharacter;
int x = ((int) ((currinf.data.dvi_h) / (shrinkfactor * 65536))) - g->x2;
int y = currinf.data.pxl_v - g->y2;
@@ -117,7 +117,7 @@ void dviRenderer::set_char(unsigned int cmd, unsigned int ch)
dhl.linkText = *HTML_href;
currentlyDrawnPage->hyperLinkList.push_back(dhl);
} else {
- QRect dshunion = currentlyDrawnPage->hyperLinkList[currentlyDrawnPage->hyperLinkList.size()-1].box.unite(QRect(x, y, pix.width(), pix.height())) ;
+ TQRect dshunion = currentlyDrawnPage->hyperLinkList[currentlyDrawnPage->hyperLinkList.size()-1].box.unite(TQRect(x, y, pix.width(), pix.height())) ;
currentlyDrawnPage->hyperLinkList[currentlyDrawnPage->hyperLinkList.size()-1].box = dshunion;
}
}
@@ -141,7 +141,7 @@ void dviRenderer::set_char(unsigned int cmd, unsigned int ch)
dhl.linkText = "";
currentDVIPage->sourceHyperLinkList.push_back(dhl);
} else {
- QRect dshunion = currentDVIPage->sourceHyperLinkList[currentDVIPage->sourceHyperLinkList.size()-1].box.unite(QRect(x, y, pix.width(), pix.height())) ;
+ TQRect dshunion = currentDVIPage->sourceHyperLinkList[currentDVIPage->sourceHyperLinkList.size()-1].box.unite(TQRect(x, y, pix.width(), pix.height())) ;
currentDVIPage->sourceHyperLinkList[currentDVIPage->sourceHyperLinkList.size()-1].box = dshunion;
}
}
@@ -188,7 +188,7 @@ void dviRenderer::set_char(unsigned int cmd, unsigned int ch)
default:
if ((ch >= 0x21) && (ch <= 0x7a))
- currentlyDrawnPage->textBoxList[currentlyDrawnPage->textBoxList.size()-1].text += QChar(ch);
+ currentlyDrawnPage->textBoxList[currentlyDrawnPage->textBoxList.size()-1].text += TQChar(ch);
else
currentlyDrawnPage->textBoxList[currentlyDrawnPage->textBoxList.size()-1].text += "?";
break;
diff --git a/kdvi/dviRenderer_export.cpp b/kdvi/dviRenderer_export.cpp
index 4745bf18..5fbdbf35 100644
--- a/kdvi/dviRenderer_export.cpp
+++ b/kdvi/dviRenderer_export.cpp
@@ -36,8 +36,8 @@
#include <kprinter.h>
#include <kprocess.h>
#include <ktempfile.h>
-#include <qlabel.h>
-#include <qpainter.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
#include "dviRenderer.h"
#include "dviFile.h"
@@ -45,7 +45,7 @@
#include "infodialog.h"
#include "kdvi_multipage.h"
-extern QPainter foreGroundPaint; // QPainter used for text
+extern TQPainter foreGroundPaint; // TQPainter used for text
@@ -60,8 +60,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, SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0);
- qApp->disconnect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0);
+ qApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0);
+ qApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0);
proc = 0;
}
@@ -70,11 +70,11 @@ void dviRenderer::exportPDF()
return;
// Is the dvipdfm-Programm available ??
- QStringList texList = QStringList::split(":", QString::fromLocal8Bit(getenv("PATH")));
+ TQStringList texList = TQStringList::split(":", TQString::fromLocal8Bit(getenv("PATH")));
bool found = false;
- for (QStringList::Iterator it=texList.begin(); it!=texList.end(); ++it) {
- QString temp = (*it) + "/" + "dvipdfm";
- if (QFile::exists(temp)) {
+ for (TQStringList::Iterator it=texList.begin(); it!=texList.end(); ++it) {
+ TQString temp = (*it) + "/" + "dvipdfm";
+ if (TQFile::exists(temp)) {
found = true;
break;
}
@@ -92,13 +92,13 @@ void dviRenderer::exportPDF()
}
// Generate a suggestion for a reasonable file name
- QString suggestedName = dviFile->filename;
+ TQString suggestedName = dviFile->filename;
suggestedName = suggestedName.left(suggestedName.find(".")) + ".pdf";
- QString 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)"), parentWidget, i18n("Export File As"));
if (fileName.isEmpty())
return;
- QFileInfo finfo(fileName);
+ 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),
i18n("Overwrite File"), i18n("Overwrite"));
@@ -107,9 +107,9 @@ void dviRenderer::exportPDF()
}
// Initialize the progress dialog
- progress = new fontProgressDialog( QString::null,
+ progress = new fontProgressDialog( TQString::null,
i18n("Using dvipdfm to export the file to PDF"),
- QString::null,
+ TQString::null,
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 "
@@ -119,7 +119,7 @@ void dviRenderer::exportPDF()
if (progress != 0) {
progress->TextLabel2->setText( i18n("Please be patient") );
progress->setTotalSteps( dviFile->total_pages );
- qApp->connect(progress, SIGNAL(finished()), this, SLOT(abortExternalProgramm()));
+ qApp->connect(progress, TQT_SIGNAL(finished()), this, TQT_SLOT(abortExternalProgramm()));
}
proc = new KShellProcess();
@@ -127,11 +127,11 @@ void dviRenderer::exportPDF()
kdError(4300) << "Could not allocate ShellProcess for the dvipdfm command." << endl;
return;
}
- qApp->disconnect( this, SIGNAL(mySignal()), 0, 0 );
+ qApp->disconnect( this, TQT_SIGNAL(mySignal()), 0, 0 );
- qApp->connect(proc, SIGNAL(receivedStderr(KProcess *, char *, int)), this, SLOT(dvips_output_receiver(KProcess *, char *, int)));
- qApp->connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)), this, SLOT(dvips_output_receiver(KProcess *, char *, int)));
- qApp->connect(proc, SIGNAL(processExited(KProcess *)), this, SLOT(dvips_terminated(KProcess *)));
+ 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 *)));
export_errorString = i18n("<qt>The external program 'dvipdf', which was used to export the file, reported an error. "
"You might wish to look at the <strong>document info dialog</strong> which you will "
@@ -140,8 +140,8 @@ void dviRenderer::exportPDF()
proc->clearArguments();
finfo.setFile(dviFile->filename);
- *proc << QString("cd %1; dvipdfm").arg(KShellProcess::quote(finfo.dirPath(true)));
- *proc << QString("-o %1").arg(KShellProcess::quote(fileName));
+ *proc << TQString("cd %1; dvipdfm").arg(KShellProcess::quote(finfo.dirPath(true)));
+ *proc << TQString("-o %1").arg(KShellProcess::quote(fileName));
*proc << KShellProcess::quote(dviFile->filename);
proc->closeStdin();
if (proc->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false) {
@@ -152,7 +152,7 @@ void dviRenderer::exportPDF()
}
-void dviRenderer::exportPS(const QString& fname, const QString& options, KPrinter* printer)
+void dviRenderer::exportPS(const TQString& fname, const TQString& options, KPrinter* printer)
{
// Safety check.
if (dviFile->page_offset.isEmpty() == true)
@@ -166,8 +166,8 @@ void dviRenderer::exportPS(const QString& fname, const QString& options, KPrinte
// 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, SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0);
- qApp->disconnect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0);
+ qApp->disconnect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), 0, 0);
+ qApp->disconnect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), 0, 0);
proc = 0;
}
@@ -188,16 +188,16 @@ void dviRenderer::exportPS(const QString& fname, const QString& options, KPrinte
return;
}
- QString fileName;
+ TQString fileName;
if (fname.isEmpty()) {
// Generate a suggestion for a reasonable file name
- QString suggestedName = dviFile->filename;
+ TQString suggestedName = dviFile->filename;
suggestedName = suggestedName.left(suggestedName.find(".")) + ".ps";
fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.ps|PostScript (*.ps)"), parentWidget, i18n("Export File As"));
if (fileName.isEmpty())
return;
- QFileInfo finfo(fileName);
+ 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),
i18n("Overwrite File"));
@@ -210,9 +210,9 @@ void dviRenderer::exportPS(const QString& fname, const QString& options, KPrinte
export_printer = printer;
// Initialize the progress dialog
- progress = new fontProgressDialog( QString::null,
+ progress = new fontProgressDialog( TQString::null,
i18n("Using dvips to export the file to PostScript"),
- QString::null,
+ TQString::null,
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 "
@@ -222,7 +222,7 @@ void dviRenderer::exportPS(const QString& fname, const QString& options, KPrinte
if (progress != 0) {
progress->TextLabel2->setText( i18n("Please be patient") );
progress->setTotalSteps( dviFile->total_pages );
- qApp->connect(progress, SIGNAL(finished()), this, SLOT(abortExternalProgramm()));
+ qApp->connect(progress, TQT_SIGNAL(finished()), this, TQT_SLOT(abortExternalProgramm()));
}
// There is a major problem with dvips, at least 5.86 and lower: the
@@ -246,7 +246,7 @@ void dviRenderer::exportPS(const QString& fname, const QString& options, KPrinte
// Sourcefile is the name of the DVI which is used by dvips, either
// the original file, or a temporary file with a new numbering.
- QString sourceFileName = dviFile->filename;
+ TQString sourceFileName = dviFile->filename;
if ((options.isEmpty() == false) || (dviFile->suggestedPageSize != 0) ) {
// Get a name for a temporary file.
KTempFile export_tmpFile;
@@ -265,7 +265,7 @@ void dviRenderer::exportPS(const QString& fname, const QString& options, KPrinte
Q_UINT16 currPageSav = current_page;
dvifile *dvsav = dviFile;
dviFile = &newFile;
- errorMsg = QString::null;
+ errorMsg = TQString::null;
for(current_page=0; current_page < newFile.total_pages; current_page++) {
@@ -293,23 +293,23 @@ void dviRenderer::exportPS(const QString& fname, const QString& options, KPrinte
return;
}
- qApp->connect(proc, SIGNAL(receivedStderr(KProcess *, char *, int)), this, SLOT(dvips_output_receiver(KProcess *, char *, int)));
- qApp->connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)), this, SLOT(dvips_output_receiver(KProcess *, char *, int)));
- qApp->connect(proc, SIGNAL(processExited(KProcess *)), this, SLOT(dvips_terminated(KProcess *)));
+ 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 *)));
export_errorString = i18n("<qt>The external program 'dvips', which was used to export the file, reported an error. "
"You might wish to look at the <strong>document info dialog</strong> which you will "
"find in the File-Menu for a precise error report.</qt>") ;
info->clear(i18n("Export: %1 to PostScript").arg(KShellProcess::quote(dviFile->filename)));
proc->clearArguments();
- QFileInfo finfo(dviFile->filename);
- *proc << QString("cd %1; dvips").arg(KShellProcess::quote(finfo.dirPath(true)));
+ TQFileInfo finfo(dviFile->filename);
+ *proc << TQString("cd %1; dvips").arg(KShellProcess::quote(finfo.dirPath(true)));
if (printer == 0)
*proc << "-z"; // export Hyperlinks
if (options.isEmpty() == false)
*proc << options;
- *proc << QString("%1").arg(KShellProcess::quote(sourceFileName));
- *proc << QString("-o %1").arg(KShellProcess::quote(fileName));
+ *proc << TQString("%1").arg(KShellProcess::quote(sourceFileName));
+ *proc << TQString("-o %1").arg(KShellProcess::quote(fileName));
proc->closeStdin();
if (proc->start(KProcess::NotifyOnExit, KProcess::Stderr) == false) {
kdError(4300) << "dvips failed to start" << endl;
@@ -324,7 +324,7 @@ void dviRenderer::dvips_output_receiver(KProcess *, char *buffer, int buflen)
// Paranoia.
if (buflen < 0)
return;
- QString op = QString::fromLocal8Bit(buffer, buflen);
+ TQString op = TQString::fromLocal8Bit(buffer, buflen);
info->outputReceiver(op);
if (progress != 0)
@@ -343,7 +343,7 @@ void dviRenderer::dvips_terminated(KProcess *sproc)
KMessageBox::error( parentWidget, export_errorString );
if (export_printer != 0)
- export_printer->printFiles( QStringList(export_fileName), true );
+ export_printer->printFiles( TQStringList(export_fileName), true );
// Kill and delete the remaining process, delete the printer, etc.
abortExternalProgramm();
@@ -375,7 +375,7 @@ void dviRenderer::abortExternalProgramm()
proc = 0;
if (export_tmpFileName.isEmpty() != true) {
- unlink(QFile::encodeName(export_tmpFileName)); // That should delete the file.
+ unlink(TQFile::encodeName(export_tmpFileName)); // That should delete the file.
export_tmpFileName = "";
}
diff --git a/kdvi/dviRenderer_prescan.cpp b/kdvi/dviRenderer_prescan.cpp
index 59bdeb25..d0c35bbd 100644
--- a/kdvi/dviRenderer_prescan.cpp
+++ b/kdvi/dviRenderer_prescan.cpp
@@ -24,17 +24,17 @@
#include <kprocess.h>
#include <kprocio.h>
#include <kprogress.h>
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qpaintdevice.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqpaintdevice.h>
-extern QPainter foreGroundPaint;
-extern void parse_special_argument(const QString& strg, const char* argument_name, int* variable);
+extern TQPainter foreGroundPaint;
+extern void parse_special_argument(const TQString& strg, const char* argument_name, int* variable);
//#define DEBUG_PRESCAN
@@ -50,16 +50,16 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand)
if (strncasecmp(cp, "PSfile=", 7) != 0)
return;
- QString command(cp+7);
+ TQString command(cp+7);
- QString include_command = command.simplifyWhiteSpace();
+ TQString include_command = command.simplifyWhiteSpace();
// The line is supposed to start with "..ile=", and then comes the
// filename. Figure out what the filename is and stow it away. Of
// course, this does not work if the filename contains spaces
// (already the simplifyWhiteSpace() above is wrong). If you have
// files like this, go away.
- QString EPSfilename = include_command;
+ TQString EPSfilename = include_command;
EPSfilename.truncate(EPSfilename.find(' '));
// Strip enclosing quotation marks which are included by some LaTeX
@@ -73,7 +73,7 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand)
// The graphic file is later read when the page is rendered.
KMimeType::Ptr const mime_type =
KMimeType::findByFileContent(EPSfilename);
- QString const & mime_type_name = mime_type->name();
+ TQString const & mime_type_name = mime_type->name();
bool const is_ps_file = (mime_type_name == "application/postscript" ||
mime_type_name == "image/x-eps");
@@ -82,7 +82,7 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand)
if (!(is_ps_file || is_pdf_file))
return;
- QString originalFName = EPSfilename;
+ TQString originalFName = EPSfilename;
embedPS_progress->setLabel(i18n("Embedding %1").arg(EPSfilename));
qApp->processEvents();
@@ -95,7 +95,7 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand)
if (is_pdf_file)
EPSfilename = dviFile->convertPDFtoPS(EPSfilename);
- if (!QFile::exists(EPSfilename)) {
+ if (!TQFile::exists(EPSfilename)) {
// Find the number of the page
Q_UINT32 currentOffset = beginningOfSpecialCommand - dviFile->dvi_Data();
Q_UINT16 page;
@@ -131,20 +131,20 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand)
int clip=include_command.find(" clip"); // -1 if clip keyword is not present, >= 0 otherwise
// Generate the PostScript commands to be included
- QString PS = QString("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").arg(llx).arg(lly).arg(urx).arg(ury);
if (rwi != 0)
- PS.append( QString(" %1 @rwi").arg(rwi) );
+ PS.append( TQString(" %1 @rwi").arg(rwi) );
if (rhi != 0)
- PS.append( QString(" %1 @rhi").arg(rhi) );
+ PS.append( TQString(" %1 @rhi").arg(rhi) );
if (angle != 0)
- PS.append( QString(" %1 @angle").arg(angle) );
+ PS.append( TQString(" %1 @angle").arg(angle) );
if (clip != -1)
PS.append(" @clip");
PS.append( " @setspecial\n" );
- QFile file( EPSfilename );
+ TQFile file( EPSfilename );
if ( file.open( IO_ReadOnly ) ) {
- QTextStream stream( &file );
+ TQTextStream stream( &file );
while ( !stream.atEnd() ) {
PS += stream.readLine().section( '%', 0, 0);
PS += "\n";
@@ -159,7 +159,7 @@ void dviRenderer::prescan_embedPS(char *cp, Q_UINT8 *beginningOfSpecialCommand)
Q_UINT32 lengthOfOldSpecial = command_pointer - beginningOfSpecialCommand;
Q_UINT32 lengthOfNewSpecial = PS.length()+5;
- QMemArray<Q_UINT8> newDVI(dviFile->size_of_file + lengthOfNewSpecial-lengthOfOldSpecial);
+ TQMemArray<Q_UINT8> newDVI(dviFile->size_of_file + lengthOfNewSpecial-lengthOfOldSpecial);
Q_UINT8 *commandPtrSav = command_pointer;
Q_UINT8 *endPtrSav = end_pointer;
@@ -239,13 +239,13 @@ void dviRenderer::prescan_removePageSizeInfo(char *cp, Q_UINT8 *beginningOfSpeci
}
-void dviRenderer::prescan_ParsePapersizeSpecial(const QString& _cp)
+void dviRenderer::prescan_ParsePapersizeSpecial(const TQString& _cp)
{
#ifdef DEBUG_PRESCAN
kdDebug(4300) << "Papersize-Special : papersize" << cp << endl;
#endif
- QString cp = _cp.simplifyWhiteSpace();
+ TQString cp = _cp.simplifyWhiteSpace();
if (cp[0] == '=') {
cp = cp.mid(1);
@@ -258,9 +258,9 @@ void dviRenderer::prescan_ParsePapersizeSpecial(const QString& _cp)
}
-void dviRenderer::prescan_ParseBackgroundSpecial(const QString& cp)
+void dviRenderer::prescan_ParseBackgroundSpecial(const TQString& cp)
{
- QColor col = parseColorSpecification(cp.stripWhiteSpace());
+ TQColor col = parseColorSpecification(cp.stripWhiteSpace());
if (col.isValid())
for(Q_UINT16 page=current_page; page < dviFile->total_pages; page++)
PS_interface->setBackgroundColor(page, col);
@@ -268,9 +268,9 @@ void dviRenderer::prescan_ParseBackgroundSpecial(const QString& cp)
}
-void dviRenderer::prescan_ParseHTMLAnchorSpecial(const QString& _cp)
+void dviRenderer::prescan_ParseHTMLAnchorSpecial(const TQString& _cp)
{
- QString cp = _cp;
+ TQString cp = _cp;
cp.truncate(cp.find('"'));
Length l;
l.setLength_in_inch(currinf.data.dvi_v/(resolutionInDPI*shrinkfactor));
@@ -278,17 +278,17 @@ void dviRenderer::prescan_ParseHTMLAnchorSpecial(const QString& _cp)
}
-void dviRenderer::prescan_ParsePSHeaderSpecial(const QString& cp)
+void dviRenderer::prescan_ParsePSHeaderSpecial(const TQString& cp)
{
#ifdef DEBUG_PRESCAN
kdDebug(4300) << "PostScript-special, header " << cp.latin1() << endl;
#endif
- QString _file = cp;
+ TQString _file = cp;
// If the file is not found in the current directory, use kpsewhich
// to find it.
- if (!QFile::exists(_file)) {
+ if (!TQFile::exists(_file)) {
// Otherwise, use kpsewhich to find the eps file.
KProcIO proc;
proc << "kpsewhich" << cp;
@@ -296,12 +296,12 @@ void dviRenderer::prescan_ParsePSHeaderSpecial(const QString& cp)
proc.readln(_file);
}
- if (QFile::exists(_file))
- PS_interface->PostScriptHeaderString->append( QString(" (%1) run\n").arg(_file) );
+ if (TQFile::exists(_file))
+ PS_interface->PostScriptHeaderString->append( TQString(" (%1) run\n").arg(_file) );
}
-void dviRenderer::prescan_ParsePSBangSpecial(const QString& cp)
+void dviRenderer::prescan_ParsePSBangSpecial(const TQString& cp)
{
#ifdef DEBUG_PRESCAN
kdDebug(4300) << "PostScript-special, literal header " << cp.latin1() << endl;
@@ -313,7 +313,7 @@ void dviRenderer::prescan_ParsePSBangSpecial(const QString& cp)
}
-void dviRenderer::prescan_ParsePSQuoteSpecial(const QString& cp)
+void dviRenderer::prescan_ParsePSQuoteSpecial(const TQString& cp)
{
#ifdef DEBUG_PRESCAN
kdError(4300) << "PostScript-special, literal PostScript " << cp.latin1() << endl;
@@ -321,14 +321,14 @@ void dviRenderer::prescan_ParsePSQuoteSpecial(const QString& 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( QString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
+ PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
PostScriptOutPutString->append( " @beginspecial @setspecial \n" );
PostScriptOutPutString->append( cp );
PostScriptOutPutString->append( " @endspecial \n" );
}
-void dviRenderer::prescan_ParsePSSpecial(const QString& cp)
+void dviRenderer::prescan_ParsePSSpecial(const TQString& cp)
{
#ifdef DEBUG_PRESCAN
kdDebug(4300) << "PostScript-special, direct PostScript " << cp << endl;
@@ -356,7 +356,7 @@ void dviRenderer::prescan_ParsePSSpecial(const QString& cp)
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
- QString anchorName = cp.section('(', 1, 1).section(')', 0, 0);
+ 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);
@@ -375,37 +375,37 @@ void dviRenderer::prescan_ParsePSSpecial(const QString& cp)
double PS_V = (currinf.data.dvi_v*300.0)/1200 - 300;
if (cp.find("ps::[begin]", 0, false) == 0) {
- PostScriptOutPutString->append( QString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
- PostScriptOutPutString->append( QString(" %1\n").arg(cp.mid(11)) );
+ PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
+ PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(11)) );
} else {
if (cp.find("ps::[end]", 0, false) == 0) {
- PostScriptOutPutString->append( QString(" %1\n").arg(cp.mid(9)) );
+ PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(9)) );
} else {
if (cp.find("ps::", 0, false) == 0) {
- PostScriptOutPutString->append( QString(" %1\n").arg(cp.mid(4)) );
+ PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(4)) );
} else {
- PostScriptOutPutString->append( QString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
- PostScriptOutPutString->append( QString(" %1\n").arg(cp.mid(3)) );
+ PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
+ PostScriptOutPutString->append( TQString(" %1\n").arg(cp.mid(3)) );
}
}
}
}
-void dviRenderer::prescan_ParsePSFileSpecial(const QString& cp)
+void dviRenderer::prescan_ParsePSFileSpecial(const TQString& cp)
{
#ifdef DEBUG_PRESCAN
kdDebug(4300) << "epsf-special: psfile=" << cp <<endl;
#endif
- QString include_command = cp.simplifyWhiteSpace();
+ TQString include_command = cp.simplifyWhiteSpace();
// The line is supposed to start with "..ile=", and then comes the
// filename. Figure out what the filename is and stow it away. Of
// course, this does not work if the filename contains spaces
// (already the simplifyWhiteSpace() above is wrong). If you have
// files like this, go away.
- QString EPSfilename = include_command;
+ TQString EPSfilename = include_command;
EPSfilename.truncate(EPSfilename.find(' '));
// Strip enclosing quotation marks which are included by some LaTeX
@@ -418,7 +418,7 @@ void dviRenderer::prescan_ParsePSFileSpecial(const QString& cp)
// If the file name ends in 'png', 'gif', 'jpg' or 'jpeg', we assume
// that this is NOT a PostScript file, and we exit here.
- QString ending = EPSfilename.section('.', -1).lower();
+ TQString ending = EPSfilename.section('.', -1).lower();
if ((ending == "png") || (ending == "gif") || (ending == "jpg") || (ending == "jpeg")) {
dviFile->numberOfExternalNONPSFiles++;
return;
@@ -456,25 +456,25 @@ void dviRenderer::prescan_ParsePSFileSpecial(const QString& cp)
int clip=include_command.find(" clip"); // -1 if clip keyword is not present, >= 0 otherwise
- if (QFile::exists(EPSfilename)) {
+ 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( QString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
+ PostScriptOutPutString->append( TQString(" %1 %2 moveto\n").arg(PS_H).arg(PS_V) );
PostScriptOutPutString->append( "@beginspecial " );
- PostScriptOutPutString->append( QString(" %1 @llx").arg(llx) );
- PostScriptOutPutString->append( QString(" %1 @lly").arg(lly) );
- PostScriptOutPutString->append( QString(" %1 @urx").arg(urx) );
- PostScriptOutPutString->append( QString(" %1 @ury").arg(ury) );
+ 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) );
if (rwi != 0)
- PostScriptOutPutString->append( QString(" %1 @rwi").arg(rwi) );
+ PostScriptOutPutString->append( TQString(" %1 @rwi").arg(rwi) );
if (rhi != 0)
- PostScriptOutPutString->append( QString(" %1 @rhi").arg(rhi) );
+ PostScriptOutPutString->append( TQString(" %1 @rhi").arg(rhi) );
if (angle != 0)
- PostScriptOutPutString->append( QString(" %1 @angle").arg(angle) );
+ PostScriptOutPutString->append( TQString(" %1 @angle").arg(angle) );
if (clip != -1)
PostScriptOutPutString->append(" @clip");
PostScriptOutPutString->append( " @setspecial \n" );
- PostScriptOutPutString->append( QString(" (%1) run\n").arg(EPSfilename) );
+ PostScriptOutPutString->append( TQString(" (%1) run\n").arg(EPSfilename) );
PostScriptOutPutString->append( "@endspecial \n" );
}
@@ -482,7 +482,7 @@ void dviRenderer::prescan_ParsePSFileSpecial(const QString& cp)
}
-void dviRenderer::prescan_ParseSourceSpecial(const QString& cp)
+void dviRenderer::prescan_ParseSourceSpecial(const TQString& cp)
{
// if no rendering takes place, i.e. when the DVI file is first
// loaded, generate a DVI_SourceFileAnchor. These anchors are used
@@ -495,8 +495,8 @@ void dviRenderer::prescan_ParseSourceSpecial(const QString& cp)
if (!cp.at(j).isNumber())
break;
Q_UINT32 sourceLineNumber = cp.left(j).toUInt();
- QFileInfo fi1(dviFile->filename);
- QString sourceFileName = QFileInfo(fi1.dir(), cp.mid(j).stripWhiteSpace()).absFilePath();
+ TQFileInfo fi1(dviFile->filename);
+ TQString sourceFileName = TQFileInfo(fi1.dir(), cp.mid(j).stripWhiteSpace()).absFilePath();
Length l;
l.setLength_in_inch(currinf.data.dvi_v/(resolutionInDPI*shrinkfactor));
DVI_SourceFileAnchor sfa(sourceFileName, sourceLineNumber, current_page+1, l);
@@ -506,7 +506,7 @@ void dviRenderer::prescan_ParseSourceSpecial(const QString& cp)
void dviRenderer::prescan_parseSpecials(char *cp, Q_UINT8 *)
{
- QString special_command(cp);
+ TQString special_command(cp);
// Now to those specials which are only interpreted during the
// prescan phase, and NOT during rendering.
diff --git a/kdvi/dviWidget.cpp b/kdvi/dviWidget.cpp
index 8475af92..ddcac8e6 100644
--- a/kdvi/dviWidget.cpp
+++ b/kdvi/dviWidget.cpp
@@ -22,13 +22,13 @@
#include "renderedDviPagePixmap.h"
#include "selection.h"
-DVIWidget::DVIWidget(QWidget* parent, PageView* sv, DocumentPageCache* cache, const char* name)
+DVIWidget::DVIWidget(TQWidget* parent, PageView* sv, DocumentPageCache* cache, const char* name)
: DocumentWidget(parent, sv, cache, name)
{
}
-void DVIWidget::mousePressEvent(QMouseEvent* e)
+void DVIWidget::mousePressEvent(TQMouseEvent* e)
{
// pageNr == 0 indicated an invalid page (e.g. page number not yet set)
if (pageNr == 0)
@@ -60,7 +60,7 @@ void DVIWidget::mousePressEvent(QMouseEvent* e)
return;
}
// Remember the closest source link
- QPoint center = pageData->sourceHyperLinkList[i].box.center();
+ TQPoint center = pageData->sourceHyperLinkList[i].box.center();
int dx = center.x() - e->pos().x();
int dy = center.y() - e->pos().y();
if (dx*dx + dy*dy < minimum || i == 0)
@@ -79,7 +79,7 @@ void DVIWidget::mousePressEvent(QMouseEvent* e)
}
-void DVIWidget::mouseMoveEvent(QMouseEvent* e)
+void DVIWidget::mouseMoveEvent(TQMouseEvent* e)
{
// pageNr == 0 indicated an invalid page (e.g. page number not yet set)
if (pageNr == 0)
@@ -105,7 +105,7 @@ void DVIWidget::mouseMoveEvent(QMouseEvent* e)
// The macro-package srcltx gives a special like "src:99 test.tex"
// while MikTeX gives "src:99test.tex". KDVI tries
// to understand both.
- QString cp = pageData->sourceHyperLinkList[i].linkText;
+ TQString cp = pageData->sourceHyperLinkList[i].linkText;
int max = cp.length();
int i;
for(i=0; i<max; i++)
diff --git a/kdvi/dviWidget.h b/kdvi/dviWidget.h
index 7c008d5a..5867b39e 100644
--- a/kdvi/dviWidget.h
+++ b/kdvi/dviWidget.h
@@ -14,9 +14,9 @@
class PageView;
class DocumentPageCache;
-class QPaintEvent;
-class QMouseEvent;
-class QWidget;
+class TQPaintEvent;
+class TQMouseEvent;
+class TQWidget;
class textSelection;
@@ -25,14 +25,14 @@ class DVIWidget : public DocumentWidget
Q_OBJECT
public:
- DVIWidget(QWidget* parent, PageView* sv, DocumentPageCache* cache, const char* name);
+ DVIWidget(TQWidget* parent, PageView* sv, DocumentPageCache* cache, const char* name);
signals:
- void SRCLink(const QString&, QMouseEvent* e, DocumentWidget*);
+ void SRCLink(const TQString&, TQMouseEvent* e, DocumentWidget*);
private:
- virtual void mousePressEvent(QMouseEvent* e);
- virtual void mouseMoveEvent(QMouseEvent* e);
+ virtual void mousePressEvent(TQMouseEvent* e);
+ virtual void mouseMoveEvent(TQMouseEvent* e);
};
#endif
diff --git a/kdvi/dvisourcesplitter.cpp b/kdvi/dvisourcesplitter.cpp
index a052a10a..e0d17aa1 100644
--- a/kdvi/dvisourcesplitter.cpp
+++ b/kdvi/dvisourcesplitter.cpp
@@ -8,7 +8,7 @@
#include <config.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kdebug.h>
#include "dvisourcesplitter.h"
@@ -16,9 +16,9 @@
//#define DEBUG_SOURCESPLITTER
-DVI_SourceFileSplitter::DVI_SourceFileSplitter(const QString &srclink, const QString &dviFile)
+DVI_SourceFileSplitter::DVI_SourceFileSplitter(const TQString &srclink, const TQString &dviFile)
{
- QString filepart = srclink, linepart;
+ TQString filepart = srclink, linepart;
bool possibleNumberMixUp = false; //if sourcefilename starts with a number
//then there could be a mix up, i.e. src:123file.tex
//line 123 and file.tex or line 12 and 3file.tex?
@@ -48,11 +48,11 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const QString &srclink, const QSt
#endif
//test if the file exists
- m_fileInfo.setFile(QFileInfo(dviFile).dir(true), filepart);
+ m_fileInfo.setFile(TQFileInfo(dviFile).dir(true), filepart);
bool fiExists = m_fileInfo.exists();
//if it doesn't exist, but adding ".tex"
- if ( !fiExists && QFileInfo(m_fileInfo.absFilePath() + ".tex").exists() )
+ if ( !fiExists && TQFileInfo(m_fileInfo.absFilePath() + ".tex").exists() )
m_fileInfo.setFile(m_fileInfo.absFilePath() + ".tex");
//if that doesn't help either, perhaps the file started with a
@@ -60,8 +60,8 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const QString &srclink, const QSt
//one by one (also try to add .tex repeatedly)
if ( possibleNumberMixUp && !fiExists )
{
- QFileInfo tempInfo(m_fileInfo);
- QString tempFileName = tempInfo.fileName();
+ TQFileInfo tempInfo(m_fileInfo);
+ TQString tempFileName = tempInfo.fileName();
Q_UINT32 index, maxindex = linepart.length();
bool found = false;
for ( index = 1; index < maxindex; ++index)
diff --git a/kdvi/dvisourcesplitter.h b/kdvi/dvisourcesplitter.h
index f0028bf2..5253ce4a 100644
--- a/kdvi/dvisourcesplitter.h
+++ b/kdvi/dvisourcesplitter.h
@@ -10,24 +10,24 @@
#ifndef DVI_SOURCEFILESPLITTER_H
#define DVI_SOURCEFILESPLITTER_H
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
-class QString;
+class TQString;
class DVI_SourceFileSplitter
{
public:
- DVI_SourceFileSplitter(const QString & scrlink, const QString & dviFile);
+ DVI_SourceFileSplitter(const TQString & scrlink, const TQString & dviFile);
- QString fileName() { return m_fileInfo.fileName(); }
- QString filePath() { return m_fileInfo.absFilePath(); }
+ TQString fileName() { return m_fileInfo.fileName(); }
+ TQString filePath() { return m_fileInfo.absFilePath(); }
bool fileExists() { return m_fileInfo.exists(); }
Q_UINT32 line() { return m_line; }
private:
- QFileInfo m_fileInfo;
+ TQFileInfo m_fileInfo;
Q_UINT32 m_line;
bool m_exists;
};
diff --git a/kdvi/fontEncoding.cpp b/kdvi/fontEncoding.cpp
index 0ca83372..9f2d4de2 100644
--- a/kdvi/fontEncoding.cpp
+++ b/kdvi/fontEncoding.cpp
@@ -10,14 +10,14 @@
#include <kdebug.h>
#include <kprocio.h>
-#include <qfile.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
#include "fontEncoding.h"
//#define DEBUG_FONTENC
-fontEncoding::fontEncoding(const QString &encName)
+fontEncoding::fontEncoding(const TQString &encName)
{
#ifdef DEBUG_FONTENC
kdDebug(4300) << "fontEncoding( " << encName << " )" << endl;
@@ -26,7 +26,7 @@ fontEncoding::fontEncoding(const QString &encName)
_isValid = false;
// Use kpsewhich to find the encoding file.
KProcIO proc;
- QString encFileName;
+ TQString encFileName;
proc << "kpsewhich" << encName;
if (proc.start(KProcess::Block) == false) {
kdError(4300) << "fontEncoding::fontEncoding(...): kpsewhich could not be started." << endl;
@@ -36,7 +36,7 @@ fontEncoding::fontEncoding(const QString &encName)
encFileName = encFileName.stripWhiteSpace();
if (encFileName.isEmpty()) {
- kdError(4300) << QString("fontEncoding::fontEncoding(...): The file '%1' could not be found by kpsewhich.").arg(encName) << endl;
+ kdError(4300) << TQString("fontEncoding::fontEncoding(...): The file '%1' could not be found by kpsewhich.").arg(encName) << endl;
return;
}
@@ -44,12 +44,12 @@ fontEncoding::fontEncoding(const QString &encName)
kdDebug(4300) << "FileName of the encoding: " << encFileName << endl;
#endif
- QFile file( encFileName );
+ TQFile file( encFileName );
if ( file.open( IO_ReadOnly ) ) {
- // Read the file (excluding comments) into the QString variable
+ // Read the file (excluding comments) into the TQString variable
// 'fileContent'
- QTextStream stream( &file );
- QString fileContent;
+ TQTextStream stream( &file );
+ TQString fileContent;
while ( !stream.atEnd() )
fileContent += stream.readLine().section('%', 0, 0); // line of text excluding '\n' until first '%'-sign
file.close();
@@ -63,10 +63,10 @@ fontEncoding::fontEncoding(const QString &encName)
#endif
fileContent = fileContent.section('[', 1, 1).section(']',0,0).simplifyWhiteSpace();
- QStringList glyphNameList = QStringList::split( '/', fileContent );
+ TQStringList glyphNameList = TQStringList::split( '/', fileContent );
int i = 0;
- for ( QStringList::Iterator it = glyphNameList.begin(); (it != glyphNameList.end())&&(i<256); ++it ) {
+ for ( TQStringList::Iterator it = glyphNameList.begin(); (it != glyphNameList.end())&&(i<256); ++it ) {
glyphNameVector[i] = (*it).simplifyWhiteSpace();
#ifdef DEBUG_FONTENC
kdDebug(4300) << i << ": " << glyphNameVector[i] << endl;
@@ -76,7 +76,7 @@ fontEncoding::fontEncoding(const QString &encName)
for(; i<256; i++)
glyphNameVector[i] = ".notdef";
} else {
- kdError(4300) << QString("fontEncoding::fontEncoding(...): The file '%1' could not be opened.").arg(encFileName) << endl;
+ kdError(4300) << TQString("fontEncoding::fontEncoding(...): The file '%1' could not be opened.").arg(encFileName) << endl;
return;
}
diff --git a/kdvi/fontEncoding.h b/kdvi/fontEncoding.h
index b5ca1344..8ce0d18b 100644
--- a/kdvi/fontEncoding.h
+++ b/kdvi/fontEncoding.h
@@ -9,7 +9,7 @@
#ifndef _FONTENCODING_H
#define _FONTENCODING_H
-#include <qstring.h>
+#include <tqstring.h>
/**
@@ -63,15 +63,15 @@ class fontEncoding {
// located, opened or parsed, errors are printed using the kdError()
// channel, and the array glyphNameVector will contain empty
// strings.
- fontEncoding(const QString &encName);
+ fontEncoding(const TQString &encName);
// Full name of the encoding, as read from the encoding file
- QString encodingFullName;
+ TQString encodingFullName;
// List of 256 glyph names. The name can be '.notdef' to indicate
// that a certain position is left open, or empty, if the encoding
// file did not contain 256 characters or could not be properly read
- QString glyphNameVector[256];
+ TQString glyphNameVector[256];
// Returns 'true' if the encoding file was found and could
// successfully be loaded.
diff --git a/kdvi/fontEncodingPool.cpp b/kdvi/fontEncodingPool.cpp
index 0100ee90..59b38167 100644
--- a/kdvi/fontEncodingPool.cpp
+++ b/kdvi/fontEncodingPool.cpp
@@ -16,7 +16,7 @@ fontEncodingPool::fontEncodingPool()
}
-fontEncoding *fontEncodingPool::findByName(const QString &name)
+fontEncoding *fontEncodingPool::findByName(const TQString &name)
{
fontEncoding *ptr = dictionary.find( name );
diff --git a/kdvi/fontEncodingPool.h b/kdvi/fontEncodingPool.h
index b875bf52..05736137 100644
--- a/kdvi/fontEncodingPool.h
+++ b/kdvi/fontEncodingPool.h
@@ -11,19 +11,19 @@
#include "fontEncoding.h"
-#include <qdict.h>
+#include <tqdict.h>
-class QString;
+class TQString;
class fontEncodingPool {
public:
fontEncodingPool();
- fontEncoding *findByName(const QString &name);
+ fontEncoding *findByName(const TQString &name);
private:
- QDict<fontEncoding> dictionary;
+ TQDict<fontEncoding> dictionary;
};
#endif
diff --git a/kdvi/fontMap.cpp b/kdvi/fontMap.cpp
index cf5fa841..66d230d7 100644
--- a/kdvi/fontMap.cpp
+++ b/kdvi/fontMap.cpp
@@ -10,7 +10,7 @@
#include <kdebug.h>
#include <kprocio.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "fontMap.h"
@@ -38,7 +38,7 @@ fontMap::fontMap()
return;
}
- QString map_fileName;
+ TQString map_fileName;
proc.readln(map_fileName);
map_fileName = map_fileName.stripWhiteSpace();
if (map_fileName.isEmpty()) {
@@ -59,19 +59,19 @@ fontMap::fontMap()
}
}
- QFile file( map_fileName );
+ TQFile file( map_fileName );
if ( file.open( IO_ReadOnly ) ) {
- QTextStream stream( &file );
- QString line;
+ TQTextStream stream( &file );
+ TQString line;
while ( !stream.atEnd() ) {
line = stream.readLine().simplifyWhiteSpace();
if (line.at(0) == '%')
continue;
- QString TeXName = line.section(' ', 0, 0);
- QString FullName = line.section(' ', 1, 1);
- QString fontFileName = line.section('<', -1).stripWhiteSpace().section(' ', 0, 0);
- QString encodingName = line.section('<', -2, -2).stripWhiteSpace().section(' ', 0, 0);
+ TQString TeXName = line.section(' ', 0, 0);
+ TQString FullName = line.section(' ', 1, 1);
+ TQString fontFileName = line.section('<', -1).stripWhiteSpace().section(' ', 0, 0);
+ TQString encodingName = line.section('<', -2, -2).stripWhiteSpace().section(' ', 0, 0);
// It seems that sometimes the encoding is prepended by the
// letter '[', which we ignore
if ((!encodingName.isEmpty()) && (encodingName[0] == '['))
@@ -81,7 +81,7 @@ fontMap::fontMap()
int i = line.find("SlantFont");
if (i >= 0) {
bool ok;
- slant = line.left(i).section(' ', -1, -1 ,QString::SectionSkipEmpty).toDouble(&ok);
+ slant = line.left(i).section(' ', -1, -1 ,TQString::SectionSkipEmpty).toDouble(&ok);
if (ok == false)
slant = 0.0;
}
@@ -94,15 +94,15 @@ fontMap::fontMap()
if (encodingName.endsWith(".enc"))
entry.fontEncoding = encodingName;
else
- entry.fontEncoding = QString::null;
+ entry.fontEncoding = TQString::null;
}
file.close();
} else
- kdError(4300) << QString("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.").arg(map_fileName) << endl;
#ifdef DEBUG_FONTMAP
kdDebug(4300) << "FontMap file parsed. Results:" << endl;
- QMap<QString, fontMapEntry>::Iterator it;
+ TQMap<TQString, fontMapEntry>::Iterator it;
for ( it = fontMapEntries.begin(); it != fontMapEntries.end(); ++it )
kdDebug(4300) << "TeXName: " << it.key()
<< ", FontFileName=" << it.data().fontFileName
@@ -113,42 +113,42 @@ fontMap::fontMap()
}
-const QString &fontMap::findFileName(const QString &TeXName)
+const TQString &fontMap::findFileName(const TQString &TeXName)
{
- QMap<QString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName);
+ TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName);
if (it != fontMapEntries.end())
return it.data().fontFileName;
else
- return QString::null;
+ return TQString::null;
}
-const QString &fontMap::findFontName(const QString &TeXName)
+const TQString &fontMap::findFontName(const TQString &TeXName)
{
- QMap<QString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName);
+ TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName);
if (it != fontMapEntries.end())
return it.data().fullFontName;
else
- return QString::null;
+ return TQString::null;
}
-const QString &fontMap::findEncoding(const QString &TeXName)
+const TQString &fontMap::findEncoding(const TQString &TeXName)
{
- QMap<QString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName);
+ TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName);
if (it != fontMapEntries.end())
return it.data().fontEncoding;
else
- return QString::null;
+ return TQString::null;
}
-double fontMap::findSlant(const QString &TeXName)
+double fontMap::findSlant(const TQString &TeXName)
{
- QMap<QString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName);
+ TQMap<TQString, fontMapEntry>::Iterator it = fontMapEntries.find(TeXName);
if (it != fontMapEntries.end())
return it.data().slant;
diff --git a/kdvi/fontMap.h b/kdvi/fontMap.h
index 55e44082..3e0177a8 100644
--- a/kdvi/fontMap.h
+++ b/kdvi/fontMap.h
@@ -9,8 +9,8 @@
#ifndef _FONTMAP_H
#define _FONTMAP_H
-#include <qmap.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqstring.h>
/**
* This class represents one line of a font map file, and contains
@@ -25,18 +25,18 @@ class fontMapEntry {
// File name of the font WITHOUT the path. The full path name must
// be looked by using the kpathsea library, e.g. by means of the
// kpsewhich command. A valid entry would be 'ubkd8a.pfb'
- QString fontFileName;
+ TQString fontFileName;
// This string contains the full name of the font,
// e.g. 'URWBookmanL-DemiBold'
- QString fullFontName;
+ TQString fullFontName;
// If the font requires an encoding (see fontEncoding.h for an
// explanation), this string is not empty and contains the name of
// the encoding, e.g. '8r'. The path of the associated encoding file
// (on the author's machine: /usr/share/texmf/dvips/psnfss/8r.enc)
// must be looked up using the kpsewhich comman.
- QString fontEncoding;
+ TQString fontEncoding;
// Some fonts need to be slanted, and the font map file defines by
// how much. This field is set to 0.0 if no slanting is specified in
@@ -92,27 +92,27 @@ 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
- QString::null if the font could not be found. */
- const QString &findFileName(const QString &TeXName);
+ TQString::null 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
- QString::null if the font could not be found. */
- const QString &findFontName(const QString &TeXName);
+ TQString::null 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
- QString::null if the font could not be found. */
- const QString &findEncoding(const QString &TeXName);
+ TQString::null 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
was defined. */
- double findSlant(const QString &TeXName);
+ double findSlant(const TQString &TeXName);
private:
/** This member maps TeX font names mapEntry classes that contain
the font's filenames, full font names and encodings. */
- QMap<QString, fontMapEntry> fontMapEntries;
+ TQMap<TQString, fontMapEntry> fontMapEntries;
};
#endif // ifndef _FONTMAP_H
diff --git a/kdvi/fontpool.cpp b/kdvi/fontpool.cpp
index adec497b..fecd2b0b 100644
--- a/kdvi/fontpool.cpp
+++ b/kdvi/fontpool.cpp
@@ -13,10 +13,10 @@
#include <kprocess.h>
#include <kprocio.h>
#include <math.h>
-#include <qapplication.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qpainter.h>
+#include <tqapplication.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqpainter.h>
#include <stdlib.h>
#include "fontpool.h"
@@ -35,7 +35,7 @@
//const int MFResolutions[] = { 300, 600, 1200 };
#ifdef PERFORMANCE_MEASUREMENT
-QTime fontPoolTimer;
+TQTime fontPoolTimer;
bool fontPoolTimerFlag;
#endif
@@ -60,7 +60,7 @@ fontPool::fontPool()
displayResolution_in_dpi = 100.0; // A not-too-bad-default
useFontHints = true;
CMperDVIunit = 0;
- extraSearchPath = QString::null;
+ extraSearchPath = TQString::null;
fontList.setAutoDelete(true);
@@ -78,14 +78,14 @@ fontPool::fontPool()
// 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.
- QImage start(1, 1, 32); // Generate a 1x1 image, black with alpha=0x10
+ TQImage start(1, 1, 32); // Generate a 1x1 image, black with alpha=0x10
start.setAlphaBuffer(true);
Q_UINT32 *destScanLine = (Q_UINT32 *)start.scanLine(0);
*destScanLine = 0x80000000;
- QPixmap intermediate(start);
- QPixmap dest(1,1);
+ TQPixmap intermediate(start);
+ TQPixmap dest(1,1);
dest.fill(Qt::white);
- QPainter paint( &dest );
+ TQPainter paint( &dest );
paint.drawPixmap(0, 0, intermediate);
paint.end();
start = dest.convertToImage().convertDepth(32);
@@ -93,12 +93,12 @@ fontPool::fontPool()
if ((result == 0xff) || (result == 0x00)) {
#ifdef DEBUG_FONTPOOL
- kdDebug(4300) << "fontPool::fontPool(): QPixmap does not support the alpha channel" << endl;
+ kdDebug(4300) << "fontPool::fontPool(): TQPixmap does not support the alpha channel" << endl;
#endif
QPixmapSupportsAlpha = false;
} else {
#ifdef DEBUG_FONTPOOL
- kdDebug(4300) << "fontPool::fontPool(): QPixmap supports the alpha channel" << endl;
+ kdDebug(4300) << "fontPool::fontPool(): TQPixmap supports the alpha channel" << endl;
#endif
QPixmapSupportsAlpha = true;
}
@@ -137,7 +137,7 @@ void fontPool::setParameters( bool _useFontHints )
}
-TeXFontDefinition* fontPool::appendx(const QString& fontname, Q_UINT32 checksum, Q_UINT32 scale, double enlargement)
+TeXFontDefinition* fontPool::appendx(const TQString& fontname, Q_UINT32 checksum, Q_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
@@ -173,20 +173,20 @@ TeXFontDefinition* fontPool::appendx(const QString& fontname, Q_UINT32 checksum,
}
-QString fontPool::status()
+TQString fontPool::status()
{
#ifdef DEBUG_FONTPOOL
kdDebug(4300) << "fontPool::status() called" << endl;
#endif
- QString text;
- QStringList tmp;
+ TQString text;
+ TQStringList tmp;
if (fontList.isEmpty())
return i18n("The fontlist is currently empty.");
text.append("<table WIDTH=\"100%\" NOSAVE >");
- text.append( QString("<tr><td><b>%1</b></td> <td><b>%2</b></td> <td><b>%3</b></td> <td><b>%4</b> <td><b>%5</b></td> <td><b>%6</b></td></tr>")
+ text.append( TQString("<tr><td><b>%1</b></td> <td><b>%2</b></td> <td><b>%3</b></td> <td><b>%4</b> <td><b>%5</b></td> <td><b>%6</b></td></tr>")
.arg(i18n("TeX Name"))
.arg(i18n("Family"))
.arg(i18n("Zoom"))
@@ -196,7 +196,7 @@ QString fontPool::status()
TeXFontDefinition *fontp = fontList.first();
while ( fontp != 0 ) {
- QString errMsg, encoding;
+ TQString errMsg, encoding;
if (!(fontp->flags & TeXFontDefinition::FONT_VIRTUAL)) {
#ifdef HAVE_FREETYPE
@@ -209,7 +209,7 @@ QString fontPool::status()
}
#ifdef HAVE_FREETYPE
- tmp << QString ("<tr><td>%1</td> <td>%2</td> <td>%3%</td> <td>%4</td> <td>%5</td> <td>%6</td></tr>")
+ tmp << TQString ("<tr><td>%1</td> <td>%2</td> <td>%3%</td> <td>%4</td> <td>%5</td> <td>%6</td></tr>")
.arg(fontp->fontname)
.arg(fontp->getFullFontName())
.arg((int)(fontp->enlargement*100 + 0.5))
@@ -252,7 +252,7 @@ bool fontPool::areFontsLocated()
void fontPool::locateFonts()
{
- kpsewhichOutput = QString::null;
+ kpsewhichOutput = TQString::null;
// 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();
- QString details = QString("<qt><p><b>PATH:</b> %1</p>%2</qt>").arg(getenv("PATH")).arg(kpsewhichOutput);
+ TQString details = TQString("<qt><p><b>PATH:</b> %1</p>%2</qt>").arg(getenv("PATH")).arg(kpsewhichOutput);
KMessageBox::detailedError( 0, i18n("<qt><p>KDVI was not able to locate all the font files "
"which are necessary to display the current DVI file. "
"Your document might be unreadable.</p></qt>"),
@@ -298,14 +298,14 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
// enabled globally.
emit setStatusBarText(i18n("Locating fonts..."));
- QStringList shellProcessCmdLine;
+ TQStringList shellProcessCmdLine;
KProcIO kpsewhichIO;
// 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, SIGNAL(receivedStderr(KProcess *, char *, int)),
- this, SLOT(mf_output_receiver(KProcess *, char *, int)));
+ qApp->connect(&kpsewhichIO, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
+ this, TQT_SLOT(mf_output_receiver(KProcess *, char *, int)));
kpsewhichIO.setUseShell(true);
@@ -313,8 +313,8 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
// Now generate the command line for the kpsewhich
// program. Unfortunately, this can be rather long and involved...
shellProcessCmdLine += "kpsewhich";
- shellProcessCmdLine += QString("--dpi 1200");
- shellProcessCmdLine += QString("--mode lexmarks");
+ shellProcessCmdLine += TQString("--dpi 1200");
+ shellProcessCmdLine += TQString("--mode lexmarks");
// Disable automatic pk-font generation.
if (makePK == true)
@@ -330,17 +330,17 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
numFontsInJob++;
if (locateTFMonly == true)
- shellProcessCmdLine += KShellProcess::quote(QString("%1.tfm").arg(fontp->fontname));
+ shellProcessCmdLine += KShellProcess::quote(TQString("%1.tfm").arg(fontp->fontname));
else {
#ifdef HAVE_FREETYPE
if (FreeType_could_be_loaded == true) {
- const QString &filename = fontsByTeXName.findFileName(fontp->fontname);
+ const TQString &filename = fontsByTeXName.findFileName(fontp->fontname);
if (!filename.isEmpty())
- shellProcessCmdLine += KShellProcess::quote(QString("%1").arg(filename));
+ shellProcessCmdLine += KShellProcess::quote(TQString("%1").arg(filename));
}
#endif
- shellProcessCmdLine += KShellProcess::quote(QString("%1.vf").arg(fontp->fontname));
- shellProcessCmdLine += KShellProcess::quote(QString("%1.1200pk").arg(fontp->fontname));
+ shellProcessCmdLine += KShellProcess::quote(TQString("%1.vf").arg(fontp->fontname));
+ shellProcessCmdLine += KShellProcess::quote(TQString("%1.1200pk").arg(fontp->fontname));
}
}
fontp=fontList.next();
@@ -352,18 +352,18 @@ 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 = QString::null;
+ MetafontOutput = TQString::null;
kpsewhichOutput += "<p><b>"+shellProcessCmdLine.join(" ")+"</b></p>";
kpsewhichIO << shellProcessCmdLine;
- QString importanceOfKPSEWHICH = i18n("<p>KDVI relies on the <b>kpsewhich</b> program to locate font files "
+ TQString importanceOfKPSEWHICH = i18n("<p>KDVI relies on the <b>kpsewhich</b> program to locate font files "
"on your hard disc and to generate PK fonts, if necessary.</p>");
if (kpsewhichIO.start(KProcess::NotifyOnExit, false) == false) {
- QString msg = i18n( "<p>The shell process for the kpsewhich program could not "
+ TQString msg = i18n( "<p>The shell process for the kpsewhich program could not "
"be started. Consequently, some font files could not be found, "
"and your document might by unreadable. If this error is reproducable "
"please report the issue to the KDVI developers using the 'Help' menu.<p>" );
- QApplication::restoreOverrideCursor();
- KMessageBox::error( 0, QString("<qt>%1%2</qt>").arg(importanceOfKPSEWHICH).arg(msg),
+ TQApplication::restoreOverrideCursor();
+ KMessageBox::error( 0, TQString("<qt>%1%2</qt>").arg(importanceOfKPSEWHICH).arg(msg),
i18n("Problem locating fonts - KDVI") );
markFontsAsLocated();
return;
@@ -390,8 +390,8 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
if (kpsewhichIO.exitStatus() == 127) {
// An exit status of 127 means that the kpsewhich executable
// could not be found. We give extra explanation then.
- QApplication::restoreOverrideCursor();
- QString msg = i18n( "<p>There were problems running kpsewhich. As a result, "
+ TQApplication::restoreOverrideCursor();
+ TQString msg = i18n( "<p>There were problems running kpsewhich. As a result, "
"some font files could not be located, and your document might be unreadable.</p>"
"<p><b>Possible reason:</b> The kpsewhich program is perhaps not installed on your system, or it "
"cannot be found in the current search path.</p>"
@@ -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.</p>");
- QString details = QString("<qt><p><b>PATH:</b> %1</p>%2</qt>").arg(getenv("PATH")).arg(kpsewhichOutput);
+ TQString details = TQString("<qt><p><b>PATH:</b> %1</p>%2</qt>").arg(getenv("PATH")).arg(kpsewhichOutput);
- KMessageBox::detailedError( 0, QString("<qt>%1%2</qt>").arg(importanceOfKPSEWHICH).arg(msg), details,
+ KMessageBox::detailedError( 0, TQString("<qt>%1%2</qt>").arg(importanceOfKPSEWHICH).arg(msg), details,
i18n("Problem locating fonts - KDVI") );
// This makes sure the we don't try to run kpsewhich again
markFontsAsLocated();
@@ -409,8 +409,8 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
}
// Create a list with all filenames found by the kpsewhich program.
- QStringList fileNameList;
- QString line;
+ TQStringList fileNameList;
+ TQString line;
while(kpsewhichIO.readln(line) >= 0)
fileNameList += line;
@@ -418,9 +418,9 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
fontp=fontList.first();
while ( fontp != 0 ) {
if (fontp->filename.isEmpty() == true) {
- QStringList matchingFiles;
+ TQStringList matchingFiles;
#ifdef HAVE_FREETYPE
- const QString &fn = fontsByTeXName.findFileName(fontp->fontname);
+ const TQString &fn = fontsByTeXName.findFileName(fontp->fontname);
if (!fn.isEmpty())
matchingFiles = fileNameList.grep(fn);
#endif
@@ -431,7 +431,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo
#ifdef DEBUG_FONTPOOL
kdDebug(4300) << "Associated " << fontp->fontname << " to " << matchingFiles.first() << endl;
#endif
- QString fname = matchingFiles.first();
+ TQString fname = matchingFiles.first();
fontp->fontNameReceiver(fname);
fontp->flags |= TeXFontDefinition::FONT_KPSE_NAME;
if (fname.endsWith(".vf")) {
@@ -550,7 +550,7 @@ void fontPool::mf_output_receiver(KProcess *, char *buffer, int buflen)
if (buflen < 0)
return;
- QString op = QString::fromLocal8Bit(buffer, buflen);
+ TQString op = TQString::fromLocal8Bit(buffer, buflen);
kpsewhichOutput.append(op);
MetafontOutput.append(op);
@@ -559,7 +559,7 @@ void fontPool::mf_output_receiver(KProcess *, char *buffer, int buflen)
int numleft;
bool show_prog = false;
while( (numleft = MetafontOutput.find('\n')) != -1) {
- QString line = MetafontOutput.left(numleft+1);
+ TQString line = MetafontOutput.left(numleft+1);
#ifdef DEBUG_FONTPOOL
kdDebug(4300) << "MF OUTPUT RECEIVED: " << line;
#endif
@@ -575,16 +575,16 @@ void fontPool::mf_output_receiver(KProcess *, char *buffer, int buflen)
int startlineindex = line.find("kpathsea:");
if (startlineindex != -1) {
int endstartline = line.find("\n",startlineindex);
- QString startLine = line.mid(startlineindex,endstartline-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(' ');
- QString fontName = startLine.mid(lastblank+1);
+ TQString fontName = startLine.mid(lastblank+1);
int secondblank = startLine.findRev(' ',lastblank-1);
- QString dpi = startLine.mid(secondblank+1,lastblank-secondblank-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) );
diff --git a/kdvi/fontpool.h b/kdvi/fontpool.h
index 2e9d25da..3edcaffe 100644
--- a/kdvi/fontpool.h
+++ b/kdvi/fontpool.h
@@ -12,8 +12,8 @@
#include "fontprogress.h"
#include "TeXFontDefinition.h"
-#include <qptrlist.h>
-#include <qobject.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
#ifdef HAVE_FREETYPE
#include <ft2build.h>
@@ -36,7 +36,7 @@ class KShellProcess;
*
**/
-class fontPool : public QObject {
+class fontPool : public TQObject {
Q_OBJECT
public:
@@ -56,12 +56,12 @@ public:
current working directory for the kpsewhich command, so that
kpsewhich will find fonts that are stored in the DVI file's
directory. */
- void setExtraSearchPath( const QString &path ) {extraSearchPath = path;}
+ void setExtraSearchPath( const TQString &path ) {extraSearchPath = path;}
/** Returns the path that is set as the current working directory
for the kpsewhich command, so that kpsewhich will find fonts
that are stored in the DVI file's directory. */
- QString getExtraSearchPath( ) const {return extraSearchPath;}
+ TQString getExtraSearchPath( ) const {return extraSearchPath;}
/** Sets the resolution of the output device. */
void setDisplayResolution( double _displayResolution_in_dpi );
@@ -78,14 +78,14 @@ 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 QString& fontname, Q_UINT32 checksum, Q_UINT32 scale, double enlargement);
+ TeXFontDefinition* appendx(const TQString& fontname, Q_UINT32 checksum, Q_UINT32 scale, double enlargement);
// Returns a string in a very basic HTML format which describes the
// fonts in the pool.
- QString status();
+ TQString status();
// This is the list which actually holds pointers to the fonts
- QPtrList<TeXFontDefinition> fontList;
+ TQPtrList<TeXFontDefinition> fontList;
// This method marks all fonts in the fontpool as "not in use". The
// fonts are, however, not removed from memory until the method
@@ -131,7 +131,7 @@ public:
signals:
/** Passed through to the top-level kpart. */
- void setStatusBarText( const QString& );
+ void setStatusBarText( const TQString& );
public slots:
// Locates font files on the disk using the kpsewhich program. If
@@ -177,18 +177,18 @@ private:
// virtual font is found, the variable remains untouched.
void locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFound=0);
- // This QString is used internally by the mf_output_receiver()
- // method. This string is set to QString::null in locateFonts(bool,
+ // This TQString is used internally by the mf_output_receiver()
+ // method. This string is set to TQString::null in locateFonts(bool,
// bool, bool *). Values are set and read by the
// mf_output_receiver(...) method
- QString MetafontOutput;
+ TQString MetafontOutput;
- // This QString is used to collect the output of kpsewhich and
- // MetaFont. The string is set to QString::null in the
+ // This TQString is used to collect the output of kpsewhich and
+ // MetaFont. The string is set to TQString::null 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.
- QString kpsewhichOutput;
+ TQString kpsewhichOutput;
// This string is set to the DVI file's path. It is used to set the
// current working directory for the kpsewhich command, so that
@@ -196,7 +196,7 @@ private:
// directory. Used by the locateFonts() and the locateFonts(bool,
// bool, bool *) method. Values are set by the
// setExtraSearchPath(...) method
- QString extraSearchPath;
+ TQString extraSearchPath;
// FontProgress; the progress dialog used when generating fonts.
fontProgressDialog progress;
diff --git a/kdvi/fontprogress.cpp b/kdvi/fontprogress.cpp
index 3935ceba..e5e34270 100644
--- a/kdvi/fontprogress.cpp
+++ b/kdvi/fontprogress.cpp
@@ -11,24 +11,24 @@
#include <klocale.h>
#include <kprocio.h>
#include <kprogress.h>
-#include <qapplication.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqapplication.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
-#include <qvbox.h>
+#include <tqvbox.h>
/*
* Constructs a fontProgressDialog which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
-fontProgressDialog::fontProgressDialog(const QString& helpIndex, const QString& label, const QString& abortTip, const QString& whatsThis, const QString& ttip, QWidget* parent, const QString& name, bool progressbar)
+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 )
{
- setCursor( QCursor( 3 ) );
+ setCursor( TQCursor( 3 ) );
setButtonCancel(KGuiItem(i18n("Abort"), "stop", abortTip));
@@ -39,29 +39,29 @@ fontProgressDialog::fontProgressDialog(const QString& helpIndex, const QString&
} else
enableLinkedHelp(false);
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
- TextLabel1 = new QLabel( label, page, "TextLabel2" );
- TextLabel1->setAlignment( int( QLabel::AlignCenter ) );
- QWhatsThis::add( TextLabel1, whatsThis );
- QToolTip::add( TextLabel1, ttip );
+ TextLabel1 = new TQLabel( label, page, "TextLabel2" );
+ TextLabel1->setAlignment( int( TQLabel::AlignCenter ) );
+ TQWhatsThis::add( TextLabel1, whatsThis );
+ TQToolTip::add( TextLabel1, ttip );
if (progressbar) {
ProgressBar1 = new KProgress( page, "ProgressBar1" );
ProgressBar1->setFormat(i18n("%v of %m"));
- QWhatsThis::add( ProgressBar1, whatsThis );
- QToolTip::add( ProgressBar1, ttip );
+ TQWhatsThis::add( ProgressBar1, whatsThis );
+ TQToolTip::add( ProgressBar1, ttip );
} else
ProgressBar1 = NULL;
- TextLabel2 = new QLabel( "", page, "TextLabel2" );
- TextLabel2->setAlignment( int( QLabel::AlignCenter ) );
- QWhatsThis::add( TextLabel2, whatsThis );
- QToolTip::add( TextLabel2, ttip );
+ TextLabel2 = new TQLabel( "", page, "TextLabel2" );
+ TextLabel2->setAlignment( int( TQLabel::AlignCenter ) );
+ TQWhatsThis::add( TextLabel2, whatsThis );
+ TQToolTip::add( TextLabel2, ttip );
progress = 0;
procIO = 0;
- qApp->connect(this, SIGNAL(finished()), this, SLOT(killProcIO()));
+ qApp->connect(this, TQT_SIGNAL(finished()), this, TQT_SLOT(killProcIO()));
}
@@ -75,7 +75,7 @@ fontProgressDialog::~fontProgressDialog()
}
-void fontProgressDialog::increaseNumSteps(const QString& explanation)
+void fontProgressDialog::increaseNumSteps(const TQString& explanation)
{
if (ProgressBar1 != 0)
ProgressBar1->setProgress(progress++);
diff --git a/kdvi/fontprogress.h b/kdvi/fontprogress.h
index f9c7232b..6f4267cc 100644
--- a/kdvi/fontprogress.h
+++ b/kdvi/fontprogress.h
@@ -9,11 +9,11 @@
#define FONT_GENERATION_H
#include <kdialogbase.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
class KProcIO;
class KProgress;
-class QLabel;
+class TQLabel;
/**
@@ -33,13 +33,13 @@ class fontProgressDialog : public KDialogBase
Q_OBJECT
public:
- fontProgressDialog( const QString& helpIndex, const QString& label, const QString& abortTip, const QString& whatsThis, const QString& ttip,
- QWidget* parent = 0, const QString &name = 0, bool progressbar=true );
+ 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 );
~fontProgressDialog();
/** The number of steps already done is increased, the text received
here is analyzed and presented to the user. */
- void increaseNumSteps(const QString& explanation);
+ void increaseNumSteps(const TQString& explanation);
/** Used to initialize the progress bar. If the argument proc is
non-zero, the associated process will be killed when the "abort"
@@ -47,7 +47,7 @@ public:
internally, so it is save to delete the KProcIO anytime. */
void setTotalSteps(int, KProcIO *proc=0);
- QLabel* TextLabel2;
+ TQLabel* TextLabel2;
private slots:
/** Calling this slot does nothing than to kill the process that is
@@ -55,10 +55,10 @@ private slots:
void killProcIO();
private:
- QLabel* TextLabel1;
+ TQLabel* TextLabel1;
KProgress* ProgressBar1;
int progress;
- QGuardedPtr<KProcIO> procIO;
+ TQGuardedPtr<KProcIO> procIO;
};
#endif // FONT_GENERATION_H
diff --git a/kdvi/glyph.h b/kdvi/glyph.h
index 1cc41823..65f86327 100644
--- a/kdvi/glyph.h
+++ b/kdvi/glyph.h
@@ -3,8 +3,8 @@
#ifndef _GLYPH_H
#define _GLYPH_H
-#include <qcolor.h>
-#include <qpixmap.h>
+#include <tqcolor.h>
+#include <tqpixmap.h>
struct bitmap {
@@ -21,7 +21,7 @@ class glyph {
// address of bitmap in font file
long addr;
- QColor color;
+ TQColor color;
// DVI units to move reference point
Q_INT32 dvi_advance_in_units_of_design_size_by_2e20;
@@ -29,7 +29,7 @@ class glyph {
// x and y offset in pixels
short x, y;
- QPixmap shrunkenCharacter;
+ TQPixmap shrunkenCharacter;
short x2, y2; /* x and y offset in pixels (shrunken bitmap) */
};
diff --git a/kdvi/infodialog.cpp b/kdvi/infodialog.cpp
index f645def8..91de53d3 100644
--- a/kdvi/infodialog.cpp
+++ b/kdvi/infodialog.cpp
@@ -8,73 +8,73 @@
#include <kdebug.h>
#include <kio/global.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qregexp.h>
-#include <qtextview.h>
-#include <qtooltip.h>
-#include <qvariant.h>
-#include <qwhatsthis.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
+#include <tqtextview.h>
+#include <tqtooltip.h>
+#include <tqvariant.h>
+#include <tqwhatsthis.h>
#include "dviFile.h"
#include "fontpool.h"
#include "infodialog.h"
-infoDialog::infoDialog( QWidget* parent )
+infoDialog::infoDialog( TQWidget* parent )
: KDialogBase( Tabbed, i18n("Document Info"), Ok, Ok, parent, "Document Info", false, false)
{
- QFrame *page1 = addPage( i18n("DVI File") );
- QVBoxLayout *topLayout1 = new QVBoxLayout( page1, 0, 6 );
- TextLabel1 = new QTextView( page1, "TextLabel1" );
- QToolTip::add( TextLabel1, i18n("Information on the currently loaded DVI-file.") );
+ TQFrame *page1 = addPage( i18n("DVI File") );
+ TQVBoxLayout *topLayout1 = new TQVBoxLayout( page1, 0, 6 );
+ TextLabel1 = new TQTextView( page1, "TextLabel1" );
+ TQToolTip::add( TextLabel1, i18n("Information on the currently loaded DVI-file.") );
topLayout1->addWidget( TextLabel1 );
- QFrame *page2 = addPage( i18n("Fonts") );
- QVBoxLayout *topLayout2 = new QVBoxLayout( page2, 0, 6 );
- TextLabel2 = new QTextView( page2, "TextLabel1" );
+ TQFrame *page2 = addPage( i18n("Fonts") );
+ TQVBoxLayout *topLayout2 = new TQVBoxLayout( page2, 0, 6 );
+ TextLabel2 = new TQTextView( page2, "TextLabel1" );
TextLabel2->setMinimumWidth(fontMetrics().maxWidth()*40);
TextLabel2->setMinimumHeight(fontMetrics().height()*10);
- QToolTip::add( TextLabel2, i18n("Information on currently loaded fonts.") );
- QWhatsThis::add( TextLabel2, i18n("This text field shows detailed information about the currently loaded fonts. "
+ TQToolTip::add( TextLabel2, i18n("Information on currently loaded fonts.") );
+ TQWhatsThis::add( TextLabel2, i18n("This text field shows detailed information about the currently loaded fonts. "
"This is useful for experts who want to locate problems in the setup of TeX or KDVI.") );
topLayout2->addWidget( TextLabel2 );
- QFrame *page3 = addPage( i18n("External Programs") );
- QVBoxLayout *topLayout3 = new QVBoxLayout( page3, 0, 6 );
- TextLabel3 = new QTextView( page3, "TextLabel1" );
+ TQFrame *page3 = addPage( i18n("External Programs") );
+ TQVBoxLayout *topLayout3 = new TQVBoxLayout( page3, 0, 6 );
+ TextLabel3 = new TQTextView( page3, "TextLabel1" );
TextLabel3->setText( i18n("No output from any external program received.") );
- QToolTip::add( TextLabel3, i18n("Output of external programs.") );
- QWhatsThis::add( TextLabel3, i18n("KDVI uses external programs, such as MetaFont, dvipdfm or dvips. "
+ TQToolTip::add( TextLabel3, i18n("Output of external programs.") );
+ TQWhatsThis::add( TextLabel3, i18n("KDVI uses external programs, such as MetaFont, dvipdfm or dvips. "
"This text field shows the output of these programs. "
"That is useful for experts who want to find problems in the setup of TeX or KDVI.") );
topLayout3->addWidget( TextLabel3 );
MFOutputReceived = false;
- headline = QString::null;
- pool = QString::null;
+ headline = TQString::null;
+ pool = TQString::null;
}
void infoDialog::setDVIData(dvifile *dviFile)
{
- QString text = "";
+ TQString text = "";
if (dviFile == NULL)
text = i18n("There is no DVI file loaded at the moment.");
else {
text.append("<table WIDTH=\"100%\" NOSAVE >");
- text.append(QString("<tr><td><b>%1</b></td> <td>%2</td></tr>").arg(i18n("Filename")).arg(dviFile->filename));
+ text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").arg(i18n("Filename")).arg(dviFile->filename));
- QFile file(dviFile->filename);
+ TQFile file(dviFile->filename);
if (file.exists())
- text.append(QString("<tr><td><b>%1</b></td> <td>%2</td></tr>").arg(i18n("File Size")).arg(KIO::convertSize(file.size())));
+ text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").arg(i18n("File Size")).arg(KIO::convertSize(file.size())));
else
- text.append(QString("<tr><td><b> </b></td> <td>%1</td></tr>").arg(i18n("The file does no longer exist.")));
+ text.append(TQString("<tr><td><b> </b></td> <td>%1</td></tr>").arg(i18n("The file does no longer exist.")));
- text.append(QString("<tr><td><b> </b></td> <td> </td></tr>"));
- text.append(QString("<tr><td><b>%1</b></td> <td>%2</td></tr>").arg(i18n("#Pages")).arg(dviFile->total_pages));
- text.append(QString("<tr><td><b>%1</b></td> <td>%2</td></tr>").arg(i18n("Generator/Date")).arg(dviFile->generatorString));
+ text.append(TQString("<tr><td><b> </b></td> <td> </td></tr>"));
+ text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").arg(i18n("#Pages")).arg(dviFile->total_pages));
+ text.append(TQString("<tr><td><b>%1</b></td> <td>%2</td></tr>").arg(i18n("Generator/Date")).arg(dviFile->generatorString));
} // else (dviFile == NULL)
TextLabel1->setText( text );
@@ -86,23 +86,23 @@ void infoDialog::setFontInfo(fontPool *fp)
TextLabel2->setText(fp->status());
}
-void infoDialog::outputReceiver(const QString& _op)
+void infoDialog::outputReceiver(const TQString& _op)
{
- QString op = _op;
- op = op.replace( QRegExp("<"), "&lt;" );
+ TQString op = _op;
+ op = op.replace( TQRegExp("<"), "&lt;" );
if (MFOutputReceived == false) {
TextLabel3->setText("<b>"+headline+"</b><br>");
- headline = QString::null;
+ headline = TQString::null;
}
- // It seems that the QTextView wants that we append only full lines.
+ // It seems that the TQTextView wants that we append only full lines.
// We see to that.
pool = pool+op;
int idx = pool.findRev("\n");
while(idx != -1) {
- QString line = pool.left(idx);
+ TQString line = pool.left(idx);
pool = pool.mid(idx+1);
// If the Output of the kpsewhich program contains a line starting
@@ -111,7 +111,7 @@ void infoDialog::outputReceiver(const QString& _op)
int startlineindex = line.find("kpathsea:");
if (startlineindex != -1) {
int endstartline = line.find("\n",startlineindex);
- QString startLine = line.mid(startlineindex,endstartline-startlineindex);
+ TQString startLine = line.mid(startlineindex,endstartline-startlineindex);
if (MFOutputReceived)
TextLabel3->append("<hr>\n<b>"+startLine+"</b>");
else
@@ -125,10 +125,10 @@ void infoDialog::outputReceiver(const QString& _op)
MFOutputReceived = true;
}
-void infoDialog::clear(const QString& op)
+void infoDialog::clear(const TQString& op)
{
headline = op;
- pool = QString::null;
+ pool = TQString::null;
MFOutputReceived = false;
}
#include "infodialog.moc"
diff --git a/kdvi/infodialog.h b/kdvi/infodialog.h
index 916d0d13..8b3ea7d2 100644
--- a/kdvi/infodialog.h
+++ b/kdvi/infodialog.h
@@ -9,12 +9,12 @@
#include <kdialogbase.h>
-#include <qstring.h>
+#include <tqstring.h>
class dvifile;
class fontPool;
-class QTextView;
-class QWidget;
+class TQTextView;
+class TQWidget;
class infoDialog : public KDialogBase
@@ -22,21 +22,21 @@ class infoDialog : public KDialogBase
Q_OBJECT
public:
- infoDialog( QWidget* parent = 0 );
+ infoDialog( TQWidget* parent = 0 );
/** This method is used to set the data coming from the DVI
file. Note that 0 is a permissible argument, that just means:
"no file loaded" */
void setDVIData(dvifile *dviFile);
- QTextView* TextLabel1;
- QTextView* TextLabel2;
- QTextView* TextLabel3;
+ TQTextView* TextLabel1;
+ TQTextView* TextLabel2;
+ TQTextView* TextLabel3;
public slots:
/** This slot is called when Output from the MetaFont programm
is received via the fontpool/kpsewhich */
- void outputReceiver(const QString&);
+ void outputReceiver(const TQString&);
/** This slot is called whenever anything in the fontpool has
changed. If the infoDialog is shown, the dialog could then
@@ -47,12 +47,12 @@ public slots:
headline. The next time output is received via the
outputReceiver, the headline is displayed in bold on top of
the text view. */
- void clear(const QString&);
+ void clear(const TQString&);
protected:
bool MFOutputReceived;
- QString headline;
- QString pool;
+ TQString headline;
+ TQString pool;
};
#endif // INFO_KDVI_H
diff --git a/kdvi/kdvi_multipage.cpp b/kdvi/kdvi_multipage.cpp
index 973e4d5f..8a7b1f59 100644
--- a/kdvi/kdvi_multipage.cpp
+++ b/kdvi/kdvi_multipage.cpp
@@ -13,7 +13,7 @@
#include <kstdaction.h>
#include <ktempfile.h>
#include <ktip.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kparts/part.h>
#include <kparts/genericfactory.h>
@@ -34,13 +34,13 @@
#include "renderedDocumentPagePixmap.h"
-#include <qlabel.h>
+#include <tqlabel.h>
//#define KDVI_MULTIPAGE_DEBUG
#ifdef PERFORMANCE_MEASUREMENT
// These objects are explained in the file "performanceMeasurement.h"
-QTime performanceTimer;
+TQTime performanceTimer;
int performanceFlag = 0;
#endif
@@ -49,8 +49,8 @@ K_EXPORT_COMPONENT_FACTORY(kdvipart, KDVIMultiPageFactory)
-KDVIMultiPage::KDVIMultiPage(QWidget *parentWidget, const char *widgetName, QObject *parent,
- const char *name, const QStringList& args)
+KDVIMultiPage::KDVIMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent,
+ const char *name, const TQStringList& args)
: KMultiPage(parentWidget, widgetName, parent, name), DVIRenderer(parentWidget)
{
Q_UNUSED(args);
@@ -67,13 +67,13 @@ KDVIMultiPage::KDVIMultiPage(QWidget *parentWidget, const char *widgetName, QObj
DVIRenderer.setName("DVI renderer");
setRenderer(&DVIRenderer);
- docInfoAction = new KAction(i18n("Document &Info"), "info", 0, &DVIRenderer, SLOT(showInfo()), actionCollection(), "info_dvi");
- embedPSAction = new KAction(i18n("Embed External PostScript Files..."), 0, this, SLOT(slotEmbedPostScript()), actionCollection(), "embed_postscript");
- new KAction(i18n("Enable All Warnings && Messages"), 0, this, SLOT(doEnableWarnings()), actionCollection(), "enable_msgs");
- exportPSAction = new KAction(i18n("PostScript..."), 0, &DVIRenderer, SLOT(exportPS()), actionCollection(), "export_postscript");
- exportPDFAction = new KAction(i18n("PDF..."), 0, &DVIRenderer, SLOT(exportPDF()), actionCollection(), "export_pdf");
+ docInfoAction = new KAction(i18n("Document &Info"), "info", 0, &DVIRenderer, TQT_SLOT(showInfo()), actionCollection(), "info_dvi");
+ embedPSAction = new KAction(i18n("Embed External PostScript Files..."), 0, this, TQT_SLOT(slotEmbedPostScript()), actionCollection(), "embed_postscript");
+ new KAction(i18n("Enable All Warnings && Messages"), 0, this, TQT_SLOT(doEnableWarnings()), actionCollection(), "enable_msgs");
+ exportPSAction = new KAction(i18n("PostScript..."), 0, &DVIRenderer, TQT_SLOT(exportPS()), actionCollection(), "export_postscript");
+ exportPDFAction = new KAction(i18n("PDF..."), 0, &DVIRenderer, TQT_SLOT(exportPDF()), actionCollection(), "export_pdf");
- KStdAction::tipOfDay(this, SLOT(showTip()), actionCollection(), "help_tipofday");
+ KStdAction::tipOfDay(this, TQT_SLOT(showTip()), actionCollection(), "help_tipofday");
setXMLFile("kdvi_part.rc");
@@ -81,7 +81,7 @@ KDVIMultiPage::KDVIMultiPage(QWidget *parentWidget, const char *widgetName, QObj
enableActions(false);
// Show tip of the day, when the first main window is shown.
- QTimer::singleShot(0,this,SLOT(showTipOnStart()));
+ TQTimer::singleShot(0,this,TQT_SLOT(showTipOnStart()));
}
@@ -139,18 +139,18 @@ void KDVIMultiPage::setEmbedPostScriptAction()
void KDVIMultiPage::slotSave()
{
// Try to guess the proper ending...
- QString formats;
- QString ending;
+ TQString formats;
+ TQString ending;
int rindex = m_file.findRev(".");
if (rindex == -1) {
- ending = QString::null;
- formats = QString::null;
+ ending = TQString::null;
+ formats = TQString::null;
} else {
ending = m_file.mid(rindex); // e.g. ".dvi"
formats = fileFormats().grep(ending).join("\n");
}
- QString fileName = KFileDialog::getSaveFileName(QString::null, formats, 0, i18n("Save File As"));
+ TQString fileName = KFileDialog::getSaveFileName(TQString::null, formats, 0, i18n("Save File As"));
if (fileName.isEmpty())
return;
@@ -160,7 +160,7 @@ void KDVIMultiPage::slotSave()
if (!ending.isEmpty() && fileName.find(ending) == -1)
fileName = fileName+ending;
- if (QFile(fileName).exists()) {
+ if (TQFile(fileName).exists()) {
int r = KMessageBox::warningContinueCancel (0, i18n("The file %1\nexists. Do you want to overwrite that file?").arg(fileName),
i18n("Overwrite File"), i18n("Overwrite"));
if (r == KMessageBox::Cancel)
@@ -190,9 +190,9 @@ void KDVIMultiPage::setFile(bool r)
}
-QStringList KDVIMultiPage::fileFormats() const
+TQStringList KDVIMultiPage::fileFormats() const
{
- QStringList r;
+ TQStringList r;
r << i18n("*.dvi *.DVI|TeX Device Independent Files (*.dvi)");
return r;
}
@@ -256,7 +256,7 @@ void KDVIMultiPage::print()
// Turn the results of the options requestor into a list arguments
// which are used by dvips.
- QString dvips_options = QString::null;
+ TQString dvips_options = TQString::null;
// Print in reverse order.
if ( printer->pageOrder() == KPrinter::LastPageFirst )
dvips_options += "-r ";
@@ -371,15 +371,15 @@ void KDVIMultiPage::print()
// List of pages to print.
- QValueList<int> pageList = printer->pageList();
+ TQValueList<int> pageList = printer->pageList();
dvips_options += "-pp ";
int commaflag = 0;
- for( QValueList<int>::ConstIterator it = pageList.begin(); it != pageList.end(); ++it ) {
+ for( TQValueList<int>::ConstIterator it = pageList.begin(); it != pageList.end(); ++it ) {
if (commaflag == 1)
- dvips_options += QString(",");
+ dvips_options += TQString(",");
else
commaflag = 1;
- dvips_options += QString("%1").arg(*it);
+ dvips_options += TQString("%1").arg(*it);
}
// Now print. For that, export the DVI-File to PostScript. Note that
@@ -435,12 +435,12 @@ DocumentWidget* KDVIMultiPage::createDocumentWidget()
"singlePageWidget" );
// Lets not forget the connections we make in the KMultiPage
- connect(documentWidget, SIGNAL(clearSelection()), this, SLOT(clearSelection()));
- connect(this, SIGNAL(enableMoveTool(bool)), documentWidget, SLOT(slotEnableMoveTool(bool)));
+ connect(documentWidget, TQT_SIGNAL(clearSelection()), this, TQT_SLOT(clearSelection()));
+ connect(this, TQT_SIGNAL(enableMoveTool(bool)), documentWidget, TQT_SLOT(slotEnableMoveTool(bool)));
// Handle source links
- connect(documentWidget, SIGNAL(SRCLink(const QString&, QMouseEvent*, DocumentWidget*)), getRenderer(),
- SLOT(handleSRCLink(const QString& ,QMouseEvent*, DocumentWidget*)));
+ connect(documentWidget, TQT_SIGNAL(SRCLink(const TQString&, TQMouseEvent*, DocumentWidget*)), getRenderer(),
+ TQT_SLOT(handleSRCLink(const TQString& ,TQMouseEvent*, DocumentWidget*)));
return documentWidget;
}
diff --git a/kdvi/kdvi_multipage.h b/kdvi/kdvi_multipage.h
index 713afab7..c3e60aea 100644
--- a/kdvi/kdvi_multipage.h
+++ b/kdvi/kdvi_multipage.h
@@ -5,7 +5,7 @@
#include "kmultipage.h"
#include "dviRenderer.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KPrinter;
@@ -14,14 +14,14 @@ class KDVIMultiPage : public KMultiPage
Q_OBJECT
public:
- KDVIMultiPage(QWidget *parentWidget, const char *widgetName, QObject *parent,
- const char *name, const QStringList& args = QStringList());
+ KDVIMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent,
+ const char *name, const TQStringList& args = TQStringList());
virtual ~KDVIMultiPage();
// Interface definition start ------------------------------------------------
/// returns the list of supported file formats
- virtual QStringList fileFormats() const;
+ virtual TQStringList fileFormats() const;
virtual void setFile(bool r);
diff --git a/kdvi/kdvi_multipage_texthandling.cpp b/kdvi/kdvi_multipage_texthandling.cpp
index c667584e..dc237da5 100644
--- a/kdvi/kdvi_multipage_texthandling.cpp
+++ b/kdvi/kdvi_multipage_texthandling.cpp
@@ -32,8 +32,8 @@
#include <kfiledialog.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qapplication.h>
-#include <qprogressdialog.h>
+#include <tqapplication.h>
+#include <tqprogressdialog.h>
#include "kdvi_multipage.h"
#include "dviFile.h"
diff --git a/kdvi/kprinterwrapper.h b/kdvi/kprinterwrapper.h
index 03959361..d7133f03 100644
--- a/kdvi/kprinterwrapper.h
+++ b/kdvi/kprinterwrapper.h
@@ -16,7 +16,7 @@
class KDVIPrinterWrapper : public KPrinter
{
public:
- KDVIPrinterWrapper() : KPrinter(true, QPrinter::ScreenResolution) {; };
+ KDVIPrinterWrapper() : KPrinter(true, TQPrinter::ScreenResolution) {; };
void doPreparePrinting() { preparePrinting(); };
};
diff --git a/kdvi/main.cpp b/kdvi/main.cpp
index 4340f0e8..af7bc928 100644
--- a/kdvi/main.cpp
+++ b/kdvi/main.cpp
@@ -8,7 +8,7 @@
#include <kurl.h>
#include <klocale.h>
#include <kaboutdata.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <stdlib.h>
@@ -77,22 +77,22 @@ int main(int argc, char** argv)
if (!url.isValid())
{
- kdError(4300) << QString(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.")).arg(args->arg(0)) << endl;
return -1;
}
if (!url.isLocalFile())
{
- kdError(4300) << QString(I18N_NOOP("The URL %1 does not point to a local file. You can only specify local "
+ 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;
return -1;
}
- QString qualPath = QFileInfo(url.path()).absFilePath();
+ TQString qualPath = TQFileInfo(url.path()).absFilePath();
app.dcopClient()->attach();
// We need to register as "kviewshell" to stay compatible with existing DCOP-skripts.
- QCString id = app.dcopClient()->registerAs("unique-kviewshell");
+ TQCString id = app.dcopClient()->registerAs("unique-kviewshell");
if (id.isNull())
kdError(4300) << "There was an error using dcopClient()->registerAs()." << endl;
QCStringList apps = app.dcopClient()->registeredApplications();
@@ -100,22 +100,22 @@ int main(int argc, char** argv)
{
if ((*it).find("kviewshell") == 0)
{
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
bool result;
arg << qualPath.stripWhiteSpace();
- if (!app.dcopClient()->call( *it, "kmultipage", "is_file_loaded(QString)", data, replyType, replyData))
+ if (!app.dcopClient()->call( *it, "kmultipage", "is_file_loaded(TQString)", data, replyType, replyData))
kdError(4300) << "There was an error using DCOP." << endl;
else
{
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
if (replyType == "bool")
{
reply >> result;
if (result == true)
{
- if (app.dcopClient()->send( *it, "kmultipage", "jumpToReference(QString)", url.ref()) == true)
+ if (app.dcopClient()->send( *it, "kmultipage", "jumpToReference(TQString)", url.ref()) == true)
{
app.dcopClient()->detach();
return 0;
@@ -143,7 +143,7 @@ int main(int argc, char** argv)
// If the url doesn't already has a reference part, add the
// argument of --goto to the url as reference, to make the
// KViewShell jump to this page.
- QString reference = args->getOption("goto");
+ TQString reference = args->getOption("goto");
url.setHTMLRef(reference);
}
shell->openURL(url);
diff --git a/kdvi/optionDialogFontsWidget.cpp b/kdvi/optionDialogFontsWidget.cpp
index a3a76425..14a72ee2 100644
--- a/kdvi/optionDialogFontsWidget.cpp
+++ b/kdvi/optionDialogFontsWidget.cpp
@@ -12,10 +12,10 @@
#include <kcombobox.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include "fontpool.h"
#include "optionDialogFontsWidget.h"
@@ -23,7 +23,7 @@
// Constructs a optionDialogWidget_base which is a child of 'parent', with
// the name 'name' and widget flags set to 'f'.
-optionDialogFontsWidget::optionDialogFontsWidget( QWidget* parent, const char* name, WFlags fl )
+optionDialogFontsWidget::optionDialogFontsWidget( TQWidget* parent, const char* name, WFlags fl )
: optionDialogFontsWidget_base( parent, name, fl )
{
#ifndef HAVE_FREETYPE
@@ -31,8 +31,8 @@ optionDialogFontsWidget::optionDialogFontsWidget( QWidget* parent, const char*
kcfg_UseType1Fonts->setEnabled(false);
kcfg_UseFontHints->setEnabled(false);
kcfg_UseFontHints->setChecked(false);
- QToolTip::add(PFB_ButtonGroup, i18n("This version of KDVI does not support type 1 fonts."));
- QWhatsThis::add(PFB_ButtonGroup, i18n("KDVI needs the FreeType library to access type 1 fonts. This library "
+ TQToolTip::add(PFB_ButtonGroup, i18n("This version of KDVI does not support type 1 fonts."));
+ TQWhatsThis::add(PFB_ButtonGroup, i18n("KDVI needs the FreeType library to access type 1 fonts. This library "
"was not present when KDVI was compiled. If you want to use type 1 "
"fonts, you must either install the FreeType library and recompile KDVI "
"yourself, or find a precompiled software package for your operating "
diff --git a/kdvi/optionDialogFontsWidget.h b/kdvi/optionDialogFontsWidget.h
index 63ce98cc..f7ad740f 100644
--- a/kdvi/optionDialogFontsWidget.h
+++ b/kdvi/optionDialogFontsWidget.h
@@ -17,7 +17,7 @@ class optionDialogFontsWidget : public optionDialogFontsWidget_base
Q_OBJECT
public:
- optionDialogFontsWidget( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ optionDialogFontsWidget( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~optionDialogFontsWidget();
};
diff --git a/kdvi/optionDialogSpecialWidget.cpp b/kdvi/optionDialogSpecialWidget.cpp
index e93cdc70..1b61e4a5 100644
--- a/kdvi/optionDialogSpecialWidget.cpp
+++ b/kdvi/optionDialogSpecialWidget.cpp
@@ -16,8 +16,8 @@
#include <klineedit.h>
#include <klocale.h>
#include <kurllabel.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include "optionDialogSpecialWidget.h"
#include "prefs.h"
@@ -25,7 +25,7 @@
// Constructs a optionDialogWidget_base which is a child of 'parent', with
// the name 'name' and widget flags set to 'f'.
-optionDialogSpecialWidget::optionDialogSpecialWidget( QWidget* parent, const char* name, WFlags fl )
+optionDialogSpecialWidget::optionDialogSpecialWidget( TQWidget* parent, const char* name, WFlags fl )
: optionDialogSpecialWidget_base( parent, name, fl )
{
// Set up the list of known and supported editors
@@ -64,7 +64,7 @@ optionDialogSpecialWidget::optionDialogSpecialWidget( QWidget* parent, const ch
// not recognized, switch to "User defined editor". That way, kdvi
// stays compatible even if the EditorCommands[] change between
// different versions of kdvi.
- QString currentEditorCommand = Prefs::editorCommand();
+ TQString currentEditorCommand = Prefs::editorCommand();
int i;
for(i = editorCommandString.count()-1; i>0; i--)
if (editorCommandString[i] == currentEditorCommand)
@@ -73,28 +73,28 @@ optionDialogSpecialWidget::optionDialogSpecialWidget( QWidget* parent, const ch
usersEditorCommand = currentEditorCommand;
slotComboBox(i);
- connect(urll, SIGNAL(leftClickedURL(const QString&)), this, SLOT(slotExtraHelpButton(const QString&)));
- connect(editorChoice, SIGNAL( activated( int ) ), this, SLOT( slotComboBox( int ) ) );
+ connect(urll, TQT_SIGNAL(leftClickedURL(const TQString&)), this, TQT_SLOT(slotExtraHelpButton(const TQString&)));
+ connect(editorChoice, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotComboBox( int ) ) );
// Editor description strings (and their translations) vary in
// size. Find the longest description string available to make sure
// that the page is always large enough.
int maximumWidth = 0;
- for ( QStringList::Iterator it = editorDescriptionString.begin(); it != editorDescriptionString.end(); ++it ) {
+ for ( TQStringList::Iterator it = editorDescriptionString.begin(); it != editorDescriptionString.end(); ++it ) {
int width = editorDescription->fontMetrics().width(*it);
if (width > maximumWidth)
maximumWidth = width;
}
editorDescription->setMinimumWidth(maximumWidth+10);
- connect(kcfg_EditorCommand, SIGNAL( textChanged (const QString &) ), this, SLOT( slotUserDefdEditorCommand( const QString & ) ) );
+ connect(kcfg_EditorCommand, TQT_SIGNAL( textChanged (const TQString &) ), this, TQT_SLOT( slotUserDefdEditorCommand( const TQString & ) ) );
}
optionDialogSpecialWidget::~optionDialogSpecialWidget()
{
}
-void optionDialogSpecialWidget::slotUserDefdEditorCommand( const QString &text )
+void optionDialogSpecialWidget::slotUserDefdEditorCommand( const TQString &text )
{
if (isUserDefdEditor == true)
EditorCommand = usersEditorCommand = text;
@@ -121,7 +121,7 @@ void optionDialogSpecialWidget::slotComboBox(int item)
}
}
-void optionDialogSpecialWidget::slotExtraHelpButton( const QString & )
+void optionDialogSpecialWidget::slotExtraHelpButton( const TQString & )
{
kapp->invokeHelp( "inv-search", "kdvi" );
}
diff --git a/kdvi/optionDialogSpecialWidget.h b/kdvi/optionDialogSpecialWidget.h
index cdd81100..0bdca8dd 100644
--- a/kdvi/optionDialogSpecialWidget.h
+++ b/kdvi/optionDialogSpecialWidget.h
@@ -17,20 +17,20 @@ class optionDialogSpecialWidget : public optionDialogSpecialWidget_base
Q_OBJECT
public:
- optionDialogSpecialWidget( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ optionDialogSpecialWidget( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~optionDialogSpecialWidget();
public slots:
void apply();
void slotComboBox(int item);
- void slotUserDefdEditorCommand( const QString &text );
- void slotExtraHelpButton( const QString &anchor);
+ void slotUserDefdEditorCommand( const TQString &text );
+ void slotExtraHelpButton( const TQString &anchor);
private:
- QStringList editorNameString, editorCommandString, editorDescriptionString;
- QString EditorCommand;
+ TQStringList editorNameString, editorCommandString, editorDescriptionString;
+ TQString EditorCommand;
bool isUserDefdEditor;
- QString usersEditorCommand;
+ TQString usersEditorCommand;
};
#endif // OPTIONDIALOGSPECIALWIDGET_H
diff --git a/kdvi/performanceMeasurement.h b/kdvi/performanceMeasurement.h
index b6cb46c7..d7e4c9b4 100644
--- a/kdvi/performanceMeasurement.h
+++ b/kdvi/performanceMeasurement.h
@@ -3,13 +3,13 @@
//#define PERFORMANCE_MEASUREMENT
#ifdef PERFORMANCE_MEASUREMENT
-#include <qdatetime.h>
+#include <tqdatetime.h>
// This is the central timer used for performance measurement. It is
// set to zero and started when the kdvi_multipage is
// constructed. This object is statically defined in
// kdvi_multipage.cpp.
-extern QTime performanceTimer;
+extern TQTime performanceTimer;
// A flag that is set to true once the first page of the document was
// successfully drawn. This object is statically defined in
diff --git a/kdvi/prebookmark.h b/kdvi/prebookmark.h
index 141c8d6c..ef637a60 100644
--- a/kdvi/prebookmark.h
+++ b/kdvi/prebookmark.h
@@ -23,7 +23,7 @@
#ifndef _PREBOOKMARK_H_
#define _PREBOOKMARK_H_
-#include <qstring.h>
+#include <tqstring.h>
/*! \brief Bookmark representation
@@ -34,14 +34,14 @@ the DVI prescan routines.
class PreBookmark
{
public:
- PreBookmark(const QString& t, const QString& a, Q_UINT16 n) {title=t; anchorName=a; noOfChildren=n;}
- PreBookmark() {title=QString::null; anchorName=QString::null; noOfChildren=0;}
+ 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;}
// Title of the bookmark
- QString title;
+ TQString title;
// Name of the anchor
- QString anchorName;
+ TQString anchorName;
// Number of subordinate bookmarks
Q_UINT16 noOfChildren;
diff --git a/kdvi/psgs.cpp b/kdvi/psgs.cpp
index 9e23fcad..2c745a7c 100644
--- a/kdvi/psgs.cpp
+++ b/kdvi/psgs.cpp
@@ -14,8 +14,8 @@
#include <kprocio.h>
#include <ktempfile.h>
#include <kurl.h>
-#include <qdir.h>
-#include <qpainter.h>
+#include <tqdir.h>
+#include <tqpainter.h>
#include "psgs.h"
#include "dviFile.h"
@@ -26,8 +26,8 @@ extern const char psheader[];
//#define DEBUG_PSGS
-pageInfo::pageInfo(const QString& _PostScriptString) {
- PostScriptString = new QString(_PostScriptString);
+pageInfo::pageInfo(const TQString& _PostScriptString) {
+ PostScriptString = new TQString(_PostScriptString);
background = Qt::white;
permanentBackground = Qt::white;
}
@@ -44,7 +44,7 @@ pageInfo::~pageInfo() {
ghostscript_interface::ghostscript_interface() {
pageList.setAutoDelete(true);
- PostScriptHeaderString = new QString();
+ PostScriptHeaderString = new TQString();
knownDevices.append("png256");
knownDevices.append("jpeg");
@@ -59,7 +59,7 @@ ghostscript_interface::~ghostscript_interface() {
}
-void ghostscript_interface::setPostScript(const PageNumber& page, const QString& PostScript) {
+void ghostscript_interface::setPostScript(const PageNumber& page, const TQString& PostScript) {
#ifdef DEBUG_PSGS
kdDebug(4300) << "ghostscript_interface::setPostScript( " << page << ", ... )" << endl;
#endif
@@ -75,7 +75,7 @@ void ghostscript_interface::setPostScript(const PageNumber& page, const QString&
}
-void ghostscript_interface::setIncludePath(const QString &_includePath) {
+void ghostscript_interface::setIncludePath(const TQString &_includePath) {
if (_includePath.isEmpty())
includePath = "*"; // Allow all files
else
@@ -83,13 +83,13 @@ void ghostscript_interface::setIncludePath(const QString &_includePath) {
}
-void ghostscript_interface::setBackgroundColor(const PageNumber& page, const QColor& background_color, bool permanent) {
+void ghostscript_interface::setBackgroundColor(const PageNumber& page, const TQColor& background_color, bool permanent) {
#ifdef DEBUG_PSGS
kdDebug(4300) << "ghostscript_interface::setBackgroundColor( " << page << ", " << background_color << " )" << endl;
#endif
if (pageList.find(page) == 0) {
- pageInfo *info = new pageInfo(QString::null);
+ pageInfo *info = new pageInfo(TQString::null);
info->background = background_color;
if (permanent)
info->permanentBackground = background_color;
@@ -119,7 +119,7 @@ void ghostscript_interface::restoreBackgroundColor(const PageNumber& page)
// Returns the background color for a certain page. This color is
// always guaranteed to be valid
-QColor ghostscript_interface::getBackgroundColor(const PageNumber& page) const {
+TQColor ghostscript_interface::getBackgroundColor(const PageNumber& page) const {
#ifdef DEBUG_PSGS
kdDebug(4300) << "ghostscript_interface::getBackgroundColor( " << page << " )" << endl;
#endif
@@ -139,7 +139,7 @@ void ghostscript_interface::clear() {
}
-void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, const QString& filename, long magnification) {
+void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, const TQString& filename, long magnification) {
#ifdef DEBUG_PSGS
kdDebug(4300) << "ghostscript_interface::gs_generate_graphics_file( " << page << ", " << filename << " )" << endl;
#endif
@@ -155,9 +155,9 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
// Generate a PNG-file
// Step 1: Write the PostScriptString to a File
- KTempFile PSfile(QString::null,".ps");
+ KTempFile PSfile(TQString::null,".ps");
- QTextStream& os = *PSfile.textStream();
+ TQTextStream& os = *PSfile.textStream();
os << "%!PS-Adobe-2.0\n"
<< "%%Creator: kdvi\n"
<< "%%Title: KDVI temporary PostScript\n"
@@ -190,7 +190,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
os << PostScriptHeaderString->latin1();
if (info->background != Qt::white) {
- QString colorCommand = QString("gsave %1 %2 %3 setrgbcolor clippath fill grestore\n").
+ TQString colorCommand = TQString("gsave %1 %2 %3 setrgbcolor clippath fill grestore\n").
arg(info->background.red()/255.0).
arg(info->background.green()/255.0).
arg(info->background.blue()/255.0);
@@ -206,16 +206,16 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
PSfile.close();
// Step 2: Call GS with the File
- QFile::remove(filename.ascii());
+ TQFile::remove(filename.ascii());
KProcIO proc;
- QStringList argus;
+ TQStringList argus;
argus << "gs";
argus << "-dSAFER" << "-dPARANOIDSAFER" << "-dDELAYSAFER" << "-dNOPAUSE" << "-dBATCH";
- argus << QString("-sDEVICE=%1").arg(*gsDevice);
- argus << QString("-sOutputFile=%1").arg(filename);
- argus << QString("-sExtraIncludePath=%1").arg(includePath);
- argus << QString("-g%1x%2").arg(pixel_page_w).arg(pixel_page_h); // page size in pixels
- argus << QString("-r%1").arg(resolution); // resolution in dpi
+ 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 << "-c" << "<< /PermitFileReading [ ExtraIncludePath ] /PermitFileWriting [] /PermitFileControl [] >> setuserparams .locksafe";
argus << "-f" << PSfile.name();
@@ -232,15 +232,15 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
PSfile.unlink();
// Check if gs has indeed produced a file.
- if (QFile::exists(filename) == false) {
+ if (TQFile::exists(filename) == false) {
kdError(4300) << "GS did not produce output." << endl;
// No. Check is the reason is that the device is not compiled into
// ghostscript. If so, try again with another device.
- QString GSoutput;
+ TQString GSoutput;
while(proc.readln(GSoutput) != -1) {
if (GSoutput.contains("Unknown device")) {
- kdDebug(4300) << QString("The version of ghostview installed on this computer does not support "
+ kdDebug(4300) << TQString("The version of ghostview installed on this computer does not support "
"the '%1' ghostview device driver.").arg(*gsDevice) << endl;
knownDevices.remove(gsDevice);
gsDevice = knownDevices.begin();
@@ -267,24 +267,24 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
"drivers. Note that KDVI needs to be restarted to re-enable PostScript support."
"</p></qt>"));
else {
- kdDebug(4300) << QString("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.").arg(*gsDevice) << endl;
gs_generate_graphics_file(page, filename, magnification);
}
return;
}
}
}
- emit(setStatusBarText(QString::null));
+ emit(setStatusBarText(TQString::null));
}
-void ghostscript_interface::graphics(const PageNumber& page, double dpi, long magnification, QPainter* paint) {
+void ghostscript_interface::graphics(const PageNumber& page, double dpi, long magnification, TQPainter* paint) {
#ifdef DEBUG_PSGS
kdDebug(4300) << "ghostscript_interface::graphics( " << page << ", " << dpi << ", ... ) called." << endl;
#endif
if (paint == 0) {
- kdError(4300) << "ghostscript_interface::graphics(PageNumber page, double dpi, long magnification, QPainter *paint) called with paint == 0" << endl;
+ kdError(4300) << "ghostscript_interface::graphics(PageNumber page, double dpi, long magnification, TQPainter *paint) called with paint == 0" << endl;
return;
}
@@ -303,32 +303,32 @@ void ghostscript_interface::graphics(const PageNumber& page, double dpi, long ma
return;
}
- KTempFile gfxFile(QString::null, ".png");
+ KTempFile gfxFile(TQString::null, ".png");
gfxFile.setAutoDelete(1);
gfxFile.close(); // we are want the filename, not the file
gs_generate_graphics_file(page, gfxFile.name(), magnification);
- QPixmap MemoryCopy(gfxFile.name());
+ TQPixmap MemoryCopy(gfxFile.name());
paint->drawPixmap(0, 0, MemoryCopy);
return;
}
-QString ghostscript_interface::locateEPSfile(const QString &filename, const KURL &base)
+TQString ghostscript_interface::locateEPSfile(const TQString &filename, const KURL &base)
{
// If the base URL indicates that the DVI file is local, try to find
// the graphics file in the directory where the DVI file resides
if (base.isLocalFile()) {
- QString path = base.path(); // -> "/bar/foo.dvi"
- QFileInfo fi1(path);
- QFileInfo fi2(fi1.dir(),filename);
+ TQString path = base.path(); // -> "/bar/foo.dvi"
+ TQFileInfo fi1(path);
+ TQFileInfo fi2(fi1.dir(),filename);
if (fi2.exists())
return fi2.absFilePath();
}
// Otherwise, use kpsewhich to find the eps file.
- QString EPSfilename;
+ TQString EPSfilename;
KProcIO proc;
proc << "kpsewhich" << filename;
proc.start(KProcess::Block);
diff --git a/kdvi/psgs.h b/kdvi/psgs.h
index 0b6e679d..c1062f13 100644
--- a/kdvi/psgs.h
+++ b/kdvi/psgs.h
@@ -10,28 +10,28 @@
#ifndef _PSGS_H_
#define _PSGS_H_
-#include <qcolor.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qintdict.h>
+#include <tqcolor.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqintdict.h>
class PageNumber;
-class QPainter;
+class TQPainter;
class pageInfo
{
public:
- pageInfo(const QString& _PostScriptString);
+ pageInfo(const TQString& _PostScriptString);
~pageInfo();
- QColor background;
- QColor permanentBackground;
- QString *PostScriptString;
+ TQColor background;
+ TQColor permanentBackground;
+ TQString *PostScriptString;
};
-class ghostscript_interface : public QObject
+class ghostscript_interface : public TQObject
{
Q_OBJECT
@@ -42,16 +42,16 @@ public:
void clear();
// sets the PostScript which is used on a certain page
- void setPostScript(const PageNumber& page, const QString& PostScript);
+ void setPostScript(const PageNumber& page, const TQString& PostScript);
// sets path from additional postscript files may be read
- void setIncludePath(const QString &_includePath);
+ void setIncludePath(const TQString &_includePath);
// Sets the background color for a certain page. If permanent is false then the original
// background color can be restored by calling restoreBackground(page).
// The Option permanent = false is used when we want to display a different paper
// color as the one specified in the dvi file.
- void setBackgroundColor(const PageNumber& page, const QColor& background_color, bool permanent = true);
+ void setBackgroundColor(const PageNumber& page, const TQColor& background_color, bool permanent = true);
// Restore the background to the color which was specified by the last call to setBackgroundColor()
// With option permanent = true.
@@ -59,13 +59,13 @@ public:
// Draws the graphics of the page into the painter, if possible. If
// the page does not contain any graphics, nothing happens
- void graphics(const PageNumber& page, double dpi, long magnification, QPainter* paint);
+ 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.
- QColor getBackgroundColor(const PageNumber& page) const;
+ TQColor getBackgroundColor(const PageNumber& page) const;
- QString *PostScriptHeaderString;
+ TQString *PostScriptHeaderString;
/** This method tries to find the PostScript file 'filename' in the
DVI file's directory (if the base-URL indicates that the DVI file
@@ -74,17 +74,17 @@ public:
returned. Otherwise, the method returns the first argument. TODO:
use the DVI file's baseURL, once this is implemented.
*/
- static QString locateEPSfile(const QString &filename, const KURL &base);
+ static TQString locateEPSfile(const TQString &filename, const KURL &base);
private:
- void gs_generate_graphics_file(const PageNumber& page, const QString& filename, long magnification);
- QIntDict<pageInfo> pageList;
+ void gs_generate_graphics_file(const PageNumber& page, const TQString& filename, long magnification);
+ TQIntDict<pageInfo> pageList;
double resolution; // in dots per inch
int pixel_page_w; // in pixels
int pixel_page_h; // in pixels
- QString includePath;
+ TQString includePath;
// Output device that ghostscript is supposed tp use. Default is
// "png256". If that does not work, gs_generate_graphics_file will
@@ -92,16 +92,16 @@ private:
// device can be found, something is badly wrong. In that case,
// "gsDevice" is set to an empty string, and
// gs_generate_graphics_file will return immediately.
- QValueListIterator<QString> gsDevice;
+ TQValueListIterator<TQString> gsDevice;
// A list of known devices, set by the constructor. This includes
// "png256", "pnm". If a device is found to not work, its name is
// removed from the list, and another device name is tried.
- QStringList knownDevices;
+ TQStringList knownDevices;
signals:
/** Passed through to the top-level kpart. */
- void setStatusBarText( const QString& );
+ void setStatusBarText( const TQString& );
};
#endif
diff --git a/kdvi/renderedDviPagePixmap.h b/kdvi/renderedDviPagePixmap.h
index 3b0f7272..c618806b 100644
--- a/kdvi/renderedDviPagePixmap.h
+++ b/kdvi/renderedDviPagePixmap.h
@@ -24,7 +24,7 @@
#include "renderedDocumentPagePixmap.h"
-#include <qobject.h>
+#include <tqobject.h>
class RenderedDviPagePixmap : public RenderedDocumentPagePixmap
@@ -43,7 +43,7 @@ class RenderedDviPagePixmap : public RenderedDocumentPagePixmap
List of source-hyperlinks in the current page. This vector is
generated when the current page is drawn.
*/
- QValueVector<Hyperlink> sourceHyperLinkList;
+ TQValueVector<Hyperlink> sourceHyperLinkList;
};
#endif
diff --git a/kdvi/special.cpp b/kdvi/special.cpp
index 23e58441..9f7eeb3d 100644
--- a/kdvi/special.cpp
+++ b/kdvi/special.cpp
@@ -12,11 +12,11 @@
#include <klocale.h>
#include <kmimetype.h>
#include <kprocio.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qimage.h>
-#include <qstringlist.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqimage.h>
+#include <tqstringlist.h>
#include "dviFile.h"
#include "dviRenderer.h"
@@ -28,9 +28,9 @@
//#define DEBUG_SPECIAL
-extern QPainter *foreGroundPainter;
+extern TQPainter *foreGroundPainter;
-void dviRenderer::printErrorMsgForSpecials(const QString& msg)
+void dviRenderer::printErrorMsgForSpecials(const TQString& msg)
{
if (dviFile->errorCounter < 25) {
kdError(4300) << msg << endl;
@@ -44,98 +44,98 @@ void dviRenderer::printErrorMsgForSpecials(const QString& msg)
// dvips. If the spec could not be parsed, an invalid color will be
// returned.
-QColor dviRenderer::parseColorSpecification(const QString& colorSpec)
+TQColor dviRenderer::parseColorSpecification(const TQString& colorSpec)
{
// Initialize the map of known colors, if that is not done yet.
if (namedColors.isEmpty()) {
- namedColors["Red"] = QColor( (int)(255.0*1), (int)(255.0*0), (int)(255.0*0));
- namedColors["Tan"] = QColor( (int)(255.0*0.86), (int)(255.0*0.58), (int)(255.0*0.44));
- namedColors["Blue"] = QColor( (int)(255.0*0), (int)(255.0*0), (int)(255.0*1));
- namedColors["Cyan"] = QColor( (int)(255.0*0), (int)(255.0*1), (int)(255.0*1));
- namedColors["Gray"] = QColor( (int)(255.0*0.5), (int)(255.0*0.5), (int)(255.0*0.5));
- namedColors["Plum"] = QColor( (int)(255.0*0.5), (int)(255.0*0), (int)(255.0*1));
- namedColors["Black"] = QColor( (int)(255.0*0), (int)(255.0*0), (int)(255.0*0));
- namedColors["Brown"] = QColor( (int)(255.0*0.4), (int)(255.0*0), (int)(255.0*0));
- namedColors["Green"] = QColor( (int)(255.0*0), (int)(255.0*1), (int)(255.0*0));
- namedColors["Melon"] = QColor( (int)(255.0*1), (int)(255.0*0.54), (int)(255.0*0.5));
- namedColors["Peach"] = QColor( (int)(255.0*1), (int)(255.0*0.5), (int)(255.0*0.3));
- namedColors["Sepia"] = QColor( (int)(255.0*0.3), (int)(255.0*0), (int)(255.0*0));
- namedColors["White"] = QColor( (int)(255.0*1), (int)(255.0*1), (int)(255.0*1));
- namedColors["Maroon"] = QColor( (int)(255.0*0.68), (int)(255.0*0), (int)(255.0*0));
- namedColors["Orange"] = QColor( (int)(255.0*1), (int)(255.0*0.39), (int)(255.0*0.13));
- namedColors["Orchid"] = QColor( (int)(255.0*0.68), (int)(255.0*0.36), (int)(255.0*1));
- namedColors["Purple"] = QColor( (int)(255.0*0.55), (int)(255.0*0.14), (int)(255.0*1));
- namedColors["Salmon"] = QColor( (int)(255.0*1), (int)(255.0*0.47), (int)(255.0*0.62));
- namedColors["Violet"] = QColor( (int)(255.0*0.21), (int)(255.0*0.12), (int)(255.0*1));
- namedColors["Yellow"] = QColor( (int)(255.0*1), (int)(255.0*1), (int)(255.0*0));
- namedColors["Apricot"] = QColor( (int)(255.0*1), (int)(255.0*0.68), (int)(255.0*0.48));
- namedColors["Emerald"] = QColor( (int)(255.0*0), (int)(255.0*1), (int)(255.0*0.5));
- namedColors["Fuchsia"] = QColor( (int)(255.0*0.45), (int)(255.0*0.01), (int)(255.0*0.92));
- namedColors["Magenta"] = QColor( (int)(255.0*1), (int)(255.0*0), (int)(255.0*1));
- namedColors["SkyBlue"] = QColor( (int)(255.0*0.38), (int)(255.0*1), (int)(255.0*0.88));
- namedColors["Thistle"] = QColor( (int)(255.0*0.88), (int)(255.0*0.41), (int)(255.0*1));
- namedColors["BrickRed"] = QColor( (int)(255.0*0.72), (int)(255.0*0), (int)(255.0*0));
- namedColors["Cerulean"] = QColor( (int)(255.0*0.06), (int)(255.0*0.89), (int)(255.0*1));
- namedColors["Lavender"] = QColor( (int)(255.0*1), (int)(255.0*0.52), (int)(255.0*1));
- namedColors["Mahogany"] = QColor( (int)(255.0*0.65), (int)(255.0*0), (int)(255.0*0));
- namedColors["Mulberry"] = QColor( (int)(255.0*0.64), (int)(255.0*0.08), (int)(255.0*0.98));
- namedColors["NavyBlue"] = QColor( (int)(255.0*0.06), (int)(255.0*0.46), (int)(255.0*1));
- namedColors["SeaGreen"] = QColor( (int)(255.0*0.31), (int)(255.0*1), (int)(255.0*0.5));
- namedColors["TealBlue"] = QColor( (int)(255.0*0.12), (int)(255.0*0.98), (int)(255.0*0.64));
- namedColors["BlueGreen"] = QColor( (int)(255.0*0.15), (int)(255.0*1), (int)(255.0*0.67));
- namedColors["CadetBlue"] = QColor( (int)(255.0*0.38), (int)(255.0*0.43), (int)(255.0*0.77));
- namedColors["Dandelion"] = QColor( (int)(255.0*1), (int)(255.0*0.71), (int)(255.0*0.16));
- namedColors["Goldenrod"] = QColor( (int)(255.0*1), (int)(255.0*0.9), (int)(255.0*0.16));
- namedColors["LimeGreen"] = QColor( (int)(255.0*0.5), (int)(255.0*1), (int)(255.0*0));
- namedColors["OrangeRed"] = QColor( (int)(255.0*1), (int)(255.0*0), (int)(255.0*0.5));
- namedColors["PineGreen"] = QColor( (int)(255.0*0), (int)(255.0*0.75), (int)(255.0*0.16));
- namedColors["RawSienna"] = QColor( (int)(255.0*0.55), (int)(255.0*0), (int)(255.0*0));
- namedColors["RedOrange"] = QColor( (int)(255.0*1), (int)(255.0*0.23), (int)(255.0*0.13));
- namedColors["RedViolet"] = QColor( (int)(255.0*0.59), (int)(255.0*0), (int)(255.0*0.66));
- namedColors["Rhodamine"] = QColor( (int)(255.0*1), (int)(255.0*0.18), (int)(255.0*1));
- namedColors["RoyalBlue"] = QColor( (int)(255.0*0), (int)(255.0*0.5), (int)(255.0*1));
- namedColors["RubineRed"] = QColor( (int)(255.0*1), (int)(255.0*0), (int)(255.0*0.87));
- namedColors["Turquoise"] = QColor( (int)(255.0*0.15), (int)(255.0*1), (int)(255.0*0.8));
- namedColors["VioletRed"] = QColor( (int)(255.0*1), (int)(255.0*0.19), (int)(255.0*1));
- namedColors["Aquamarine"] = QColor( (int)(255.0*0.18), (int)(255.0*1), (int)(255.0*0.7));
- namedColors["BlueViolet"] = QColor( (int)(255.0*0.1), (int)(255.0*0.05), (int)(255.0*0.96));
- namedColors["DarkOrchid"] = QColor( (int)(255.0*0.6), (int)(255.0*0.2), (int)(255.0*0.8));
- namedColors["OliveGreen"] = QColor( (int)(255.0*0), (int)(255.0*0.6), (int)(255.0*0));
- namedColors["Periwinkle"] = QColor( (int)(255.0*0.43), (int)(255.0*0.45), (int)(255.0*1));
- namedColors["Bittersweet"] = QColor( (int)(255.0*0.76), (int)(255.0*0.01), (int)(255.0*0));
- namedColors["BurntOrange"] = QColor( (int)(255.0*1), (int)(255.0*0.49), (int)(255.0*0));
- namedColors["ForestGreen"] = QColor( (int)(255.0*0), (int)(255.0*0.88), (int)(255.0*0));
- namedColors["GreenYellow"] = QColor( (int)(255.0*0.85), (int)(255.0*1), (int)(255.0*0.31));
- namedColors["JungleGreen"] = QColor( (int)(255.0*0.01), (int)(255.0*1), (int)(255.0*0.48));
- namedColors["ProcessBlue"] = QColor( (int)(255.0*0.04), (int)(255.0*1), (int)(255.0*1));
- namedColors["RoyalPurple"] = QColor( (int)(255.0*0.25), (int)(255.0*0.1), (int)(255.0*1));
- namedColors["SpringGreen"] = QColor( (int)(255.0*0.74), (int)(255.0*1), (int)(255.0*0.24));
- namedColors["YellowGreen"] = QColor( (int)(255.0*0.56), (int)(255.0*1), (int)(255.0*0.26));
- namedColors["MidnightBlue"] = QColor( (int)(255.0*0), (int)(255.0*0.44), (int)(255.0*0.57));
- namedColors["YellowOrange"] = QColor( (int)(255.0*1), (int)(255.0*0.58), (int)(255.0*0));
- namedColors["CarnationPink"] = QColor( (int)(255.0*1), (int)(255.0*0.37), (int)(255.0*1));
- namedColors["CornflowerBlue"] = QColor( (int)(255.0*0.35), (int)(255.0*0.87), (int)(255.0*1));
- namedColors["WildStrawberry"] = QColor( (int)(255.0*1), (int)(255.0*0.04), (int)(255.0*0.61));
+ namedColors["Red"] = TQColor( (int)(255.0*1), (int)(255.0*0), (int)(255.0*0));
+ namedColors["Tan"] = TQColor( (int)(255.0*0.86), (int)(255.0*0.58), (int)(255.0*0.44));
+ namedColors["Blue"] = TQColor( (int)(255.0*0), (int)(255.0*0), (int)(255.0*1));
+ namedColors["Cyan"] = TQColor( (int)(255.0*0), (int)(255.0*1), (int)(255.0*1));
+ namedColors["Gray"] = TQColor( (int)(255.0*0.5), (int)(255.0*0.5), (int)(255.0*0.5));
+ namedColors["Plum"] = TQColor( (int)(255.0*0.5), (int)(255.0*0), (int)(255.0*1));
+ namedColors["Black"] = TQColor( (int)(255.0*0), (int)(255.0*0), (int)(255.0*0));
+ namedColors["Brown"] = TQColor( (int)(255.0*0.4), (int)(255.0*0), (int)(255.0*0));
+ namedColors["Green"] = TQColor( (int)(255.0*0), (int)(255.0*1), (int)(255.0*0));
+ namedColors["Melon"] = TQColor( (int)(255.0*1), (int)(255.0*0.54), (int)(255.0*0.5));
+ namedColors["Peach"] = TQColor( (int)(255.0*1), (int)(255.0*0.5), (int)(255.0*0.3));
+ namedColors["Sepia"] = TQColor( (int)(255.0*0.3), (int)(255.0*0), (int)(255.0*0));
+ namedColors["White"] = TQColor( (int)(255.0*1), (int)(255.0*1), (int)(255.0*1));
+ namedColors["Maroon"] = TQColor( (int)(255.0*0.68), (int)(255.0*0), (int)(255.0*0));
+ namedColors["Orange"] = TQColor( (int)(255.0*1), (int)(255.0*0.39), (int)(255.0*0.13));
+ namedColors["Orchid"] = TQColor( (int)(255.0*0.68), (int)(255.0*0.36), (int)(255.0*1));
+ namedColors["Purple"] = TQColor( (int)(255.0*0.55), (int)(255.0*0.14), (int)(255.0*1));
+ namedColors["Salmon"] = TQColor( (int)(255.0*1), (int)(255.0*0.47), (int)(255.0*0.62));
+ namedColors["Violet"] = TQColor( (int)(255.0*0.21), (int)(255.0*0.12), (int)(255.0*1));
+ namedColors["Yellow"] = TQColor( (int)(255.0*1), (int)(255.0*1), (int)(255.0*0));
+ namedColors["Apricot"] = TQColor( (int)(255.0*1), (int)(255.0*0.68), (int)(255.0*0.48));
+ namedColors["Emerald"] = TQColor( (int)(255.0*0), (int)(255.0*1), (int)(255.0*0.5));
+ namedColors["Fuchsia"] = TQColor( (int)(255.0*0.45), (int)(255.0*0.01), (int)(255.0*0.92));
+ namedColors["Magenta"] = TQColor( (int)(255.0*1), (int)(255.0*0), (int)(255.0*1));
+ namedColors["SkyBlue"] = TQColor( (int)(255.0*0.38), (int)(255.0*1), (int)(255.0*0.88));
+ namedColors["Thistle"] = TQColor( (int)(255.0*0.88), (int)(255.0*0.41), (int)(255.0*1));
+ namedColors["BrickRed"] = TQColor( (int)(255.0*0.72), (int)(255.0*0), (int)(255.0*0));
+ namedColors["Cerulean"] = TQColor( (int)(255.0*0.06), (int)(255.0*0.89), (int)(255.0*1));
+ namedColors["Lavender"] = TQColor( (int)(255.0*1), (int)(255.0*0.52), (int)(255.0*1));
+ namedColors["Mahogany"] = TQColor( (int)(255.0*0.65), (int)(255.0*0), (int)(255.0*0));
+ namedColors["Mulberry"] = TQColor( (int)(255.0*0.64), (int)(255.0*0.08), (int)(255.0*0.98));
+ namedColors["NavyBlue"] = TQColor( (int)(255.0*0.06), (int)(255.0*0.46), (int)(255.0*1));
+ namedColors["SeaGreen"] = TQColor( (int)(255.0*0.31), (int)(255.0*1), (int)(255.0*0.5));
+ namedColors["TealBlue"] = TQColor( (int)(255.0*0.12), (int)(255.0*0.98), (int)(255.0*0.64));
+ namedColors["BlueGreen"] = TQColor( (int)(255.0*0.15), (int)(255.0*1), (int)(255.0*0.67));
+ namedColors["CadetBlue"] = TQColor( (int)(255.0*0.38), (int)(255.0*0.43), (int)(255.0*0.77));
+ namedColors["Dandelion"] = TQColor( (int)(255.0*1), (int)(255.0*0.71), (int)(255.0*0.16));
+ namedColors["Goldenrod"] = TQColor( (int)(255.0*1), (int)(255.0*0.9), (int)(255.0*0.16));
+ namedColors["LimeGreen"] = TQColor( (int)(255.0*0.5), (int)(255.0*1), (int)(255.0*0));
+ namedColors["OrangeRed"] = TQColor( (int)(255.0*1), (int)(255.0*0), (int)(255.0*0.5));
+ namedColors["PineGreen"] = TQColor( (int)(255.0*0), (int)(255.0*0.75), (int)(255.0*0.16));
+ namedColors["RawSienna"] = TQColor( (int)(255.0*0.55), (int)(255.0*0), (int)(255.0*0));
+ namedColors["RedOrange"] = TQColor( (int)(255.0*1), (int)(255.0*0.23), (int)(255.0*0.13));
+ namedColors["RedViolet"] = TQColor( (int)(255.0*0.59), (int)(255.0*0), (int)(255.0*0.66));
+ namedColors["Rhodamine"] = TQColor( (int)(255.0*1), (int)(255.0*0.18), (int)(255.0*1));
+ namedColors["RoyalBlue"] = TQColor( (int)(255.0*0), (int)(255.0*0.5), (int)(255.0*1));
+ namedColors["RubineRed"] = TQColor( (int)(255.0*1), (int)(255.0*0), (int)(255.0*0.87));
+ namedColors["Turquoise"] = TQColor( (int)(255.0*0.15), (int)(255.0*1), (int)(255.0*0.8));
+ namedColors["VioletRed"] = TQColor( (int)(255.0*1), (int)(255.0*0.19), (int)(255.0*1));
+ namedColors["Aquamarine"] = TQColor( (int)(255.0*0.18), (int)(255.0*1), (int)(255.0*0.7));
+ namedColors["BlueViolet"] = TQColor( (int)(255.0*0.1), (int)(255.0*0.05), (int)(255.0*0.96));
+ namedColors["DarkOrchid"] = TQColor( (int)(255.0*0.6), (int)(255.0*0.2), (int)(255.0*0.8));
+ namedColors["OliveGreen"] = TQColor( (int)(255.0*0), (int)(255.0*0.6), (int)(255.0*0));
+ namedColors["Periwinkle"] = TQColor( (int)(255.0*0.43), (int)(255.0*0.45), (int)(255.0*1));
+ namedColors["Bittersweet"] = TQColor( (int)(255.0*0.76), (int)(255.0*0.01), (int)(255.0*0));
+ namedColors["BurntOrange"] = TQColor( (int)(255.0*1), (int)(255.0*0.49), (int)(255.0*0));
+ namedColors["ForestGreen"] = TQColor( (int)(255.0*0), (int)(255.0*0.88), (int)(255.0*0));
+ namedColors["GreenYellow"] = TQColor( (int)(255.0*0.85), (int)(255.0*1), (int)(255.0*0.31));
+ namedColors["JungleGreen"] = TQColor( (int)(255.0*0.01), (int)(255.0*1), (int)(255.0*0.48));
+ namedColors["ProcessBlue"] = TQColor( (int)(255.0*0.04), (int)(255.0*1), (int)(255.0*1));
+ namedColors["RoyalPurple"] = TQColor( (int)(255.0*0.25), (int)(255.0*0.1), (int)(255.0*1));
+ namedColors["SpringGreen"] = TQColor( (int)(255.0*0.74), (int)(255.0*1), (int)(255.0*0.24));
+ namedColors["YellowGreen"] = TQColor( (int)(255.0*0.56), (int)(255.0*1), (int)(255.0*0.26));
+ namedColors["MidnightBlue"] = TQColor( (int)(255.0*0), (int)(255.0*0.44), (int)(255.0*0.57));
+ namedColors["YellowOrange"] = TQColor( (int)(255.0*1), (int)(255.0*0.58), (int)(255.0*0));
+ namedColors["CarnationPink"] = TQColor( (int)(255.0*1), (int)(255.0*0.37), (int)(255.0*1));
+ namedColors["CornflowerBlue"] = TQColor( (int)(255.0*0.35), (int)(255.0*0.87), (int)(255.0*1));
+ namedColors["WildStrawberry"] = TQColor( (int)(255.0*1), (int)(255.0*0.04), (int)(255.0*0.61));
}
- QString specType = colorSpec.section(' ', 0, 0);
+ TQString specType = colorSpec.section(' ', 0, 0);
if (specType.find("rgb", false) == 0) {
bool ok;
double r = colorSpec.section(' ', 1, 1).toDouble(&ok);
if ((ok == false) || (r < 0.0) || (r > 1.0))
- return QColor();
+ return TQColor();
double g = colorSpec.section(' ', 2, 2).toDouble(&ok);
if ((ok == false) || (g < 0.0) || (g > 1.0))
- return QColor();
+ return TQColor();
double b = colorSpec.section(' ', 3, 3).toDouble(&ok);
if ((ok == false) || (b < 0.0) || (b > 1.0))
- return QColor();
+ return TQColor();
- return QColor((int)(r*255.0+0.5), (int)(g*255.0+0.5), (int)(b*255.0+0.5));
+ 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) {
@@ -143,17 +143,17 @@ QColor dviRenderer::parseColorSpecification(const QString& colorSpec)
double h = colorSpec.section(' ', 1, 1).toDouble(&ok);
if ((ok == false) || (h < 0.0) || (h > 1.0))
- return QColor();
+ return TQColor();
double s = colorSpec.section(' ', 2, 2).toDouble(&ok);
if ((ok == false) || (s < 0.0) || (s > 1.0))
- return QColor();
+ return TQColor();
double b = colorSpec.section(' ', 3, 3).toDouble(&ok);
if ((ok == false) || (b < 0.0) || (b > 1.0))
- return QColor();
+ return TQColor();
- return QColor((int)(h*359.0+0.5), (int)(s*255.0+0.5), (int)(b*255.0+0.5), QColor::Hsv);
+ 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) {
@@ -161,19 +161,19 @@ QColor dviRenderer::parseColorSpecification(const QString& colorSpec)
double c = colorSpec.section(' ', 1, 1).toDouble(&ok);
if ((ok == false) || (c < 0.0) || (c > 1.0))
- return QColor();
+ return TQColor();
double m = colorSpec.section(' ', 2, 2).toDouble(&ok);
if ((ok == false) || (m < 0.0) || (m > 1.0))
- return QColor();
+ return TQColor();
double y = colorSpec.section(' ', 3, 3).toDouble(&ok);
if ((ok == false) || (y < 0.0) || (y > 1.0))
- return QColor();
+ return TQColor();
double k = colorSpec.section(' ', 3, 3).toDouble(&ok);
if ((ok == false) || (k < 0.0) || (k > 1.0))
- return QColor();
+ return TQColor();
// Convert cmyk coordinates to rgb.
double r = 1.0 - c - k;
@@ -186,7 +186,7 @@ QColor dviRenderer::parseColorSpecification(const QString& colorSpec)
if (b < 0.0)
b = 0.0;
- return QColor((int)(r*255.0+0.5), (int)(g*255.0+0.5), (int)(b*255.0+0.5));
+ 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) {
@@ -194,17 +194,17 @@ QColor dviRenderer::parseColorSpecification(const QString& colorSpec)
double g = colorSpec.section(' ', 1, 1).toDouble(&ok);
if ((ok == false) || (g < 0.0) || (g > 1.0))
- return QColor();
+ return TQColor();
- return QColor((int)(g*255.0+0.5), (int)(g*255.0+0.5), (int)(g*255.0+0.5));
+ return TQColor((int)(g*255.0+0.5), (int)(g*255.0+0.5), (int)(g*255.0+0.5));
}
// Check if the color is one of the known named colors.
- QMap<QString, QColor>::Iterator f = namedColors.find(specType);
+ TQMap<TQString, TQColor>::Iterator f = namedColors.find(specType);
if (f != namedColors.end())
return *f;
- return QColor(specType);
+ return TQColor(specType);
}
@@ -212,11 +212,11 @@ QColor dviRenderer::parseColorSpecification(const QString& colorSpec)
-void dviRenderer::color_special(const QString& _cp)
+void dviRenderer::color_special(const TQString& _cp)
{
- QString const cp = _cp.stripWhiteSpace();
+ TQString const cp = _cp.stripWhiteSpace();
- QString command = cp.section(' ', 0, 0);
+ TQString command = cp.section(' ', 0, 0);
if (command == "pop") {
// Take color off the stack
@@ -230,7 +230,7 @@ void dviRenderer::color_special(const QString& _cp)
if (command == "push") {
// Get color specification
- QColor const col = parseColorSpecification(cp.section(' ', 1));
+ TQColor const col = parseColorSpecification(cp.section(' ', 1));
// Set color
if (col.isValid())
colorStack.push(col);
@@ -241,7 +241,7 @@ void dviRenderer::color_special(const QString& _cp)
// Get color specification and set the color for the rest of this
// page
- QColor col = parseColorSpecification(cp);
+ TQColor col = parseColorSpecification(cp);
// Set color
if (col.isValid())
globalColor = col;
@@ -251,15 +251,15 @@ void dviRenderer::color_special(const QString& _cp)
}
-void dviRenderer::html_href_special(const QString& _cp)
+void dviRenderer::html_href_special(const TQString& _cp)
{
- QString cp = _cp;
+ TQString cp = _cp;
cp.truncate(cp.find('"'));
#ifdef DEBUG_SPECIAL
kdDebug(4300) << "HTML-special, href " << cp.latin1() << endl;
#endif
- HTML_href = new QString(cp);
+ HTML_href = new TQString(cp);
}
@@ -276,7 +276,7 @@ void dviRenderer::html_anchor_end()
}
-void dviRenderer::source_special(const QString& cp)
+void dviRenderer::source_special(const TQString& cp)
{
// only when rendering really takes place: set source_href to the
// current special string. When characters are rendered, the
@@ -286,15 +286,15 @@ void dviRenderer::source_special(const QString& cp)
if (source_href)
*source_href = cp;
else
- source_href = new QString(cp);
+ source_href = new TQString(cp);
}
-void parse_special_argument(const QString& strg, const char* argument_name, int* variable)
+void parse_special_argument(const TQString& strg, const char* argument_name, int* variable)
{
int index = strg.find(argument_name);
if (index >= 0) {
- QString tmp = strg.mid(index + strlen(argument_name));
+ TQString tmp = strg.mid(index + strlen(argument_name));
index = tmp.find(' ');
if (index >= 0)
tmp.truncate(index);
@@ -313,20 +313,20 @@ void parse_special_argument(const QString& strg, const char* argument_name, int*
}
-void dviRenderer::epsf_special(const QString& cp)
+void dviRenderer::epsf_special(const TQString& cp)
{
#ifdef DEBUG_SPECIAL
kdDebug(4300) << "epsf-special: psfile=" << cp <<endl;
#endif
- QString include_command = cp.simplifyWhiteSpace();
+ TQString include_command = cp.simplifyWhiteSpace();
// The line is supposed to start with "..ile=", and then comes the
// filename. Figure out what the filename is and stow it away. Of
// course, this does not work if the filename contains spaces
// (already the simplifyWhiteSpace() above is wrong). If you have
// files like this, go away.
- QString EPSfilename_orig = include_command;
+ TQString EPSfilename_orig = include_command;
EPSfilename_orig.truncate(EPSfilename_orig.find(' '));
// Strip enclosing quotation marks which are included by some LaTeX
@@ -336,7 +336,7 @@ void dviRenderer::epsf_special(const QString& cp)
if ((EPSfilename_orig.at(0) == '\"') && (EPSfilename_orig.at(EPSfilename_orig.length()-1) == '\"')) {
EPSfilename_orig = EPSfilename_orig.mid(1,EPSfilename_orig.length()-2);
}
- QString EPSfilename = ghostscript_interface::locateEPSfile(EPSfilename_orig, baseURL);
+ TQString EPSfilename = ghostscript_interface::locateEPSfile(EPSfilename_orig, baseURL);
// Now parse the arguments.
int llx = 0;
@@ -360,7 +360,7 @@ void dviRenderer::epsf_special(const QString& cp)
// If we have a png, gif, jpeg or mng file, we need to draw it here.
KMimeType::Ptr const mime_type = KMimeType::findByFileContent(EPSfilename);
- QString const & mime_type_name = mime_type->name();
+ TQString const & mime_type_name = mime_type->name();
bool const isGFX = (mime_type_name == "image/png" ||
mime_type_name == "image/gif" ||
mime_type_name == "image/jpeg" ||
@@ -368,7 +368,7 @@ void dviRenderer::epsf_special(const QString& cp)
// So, if we do not have a PostScript file, but a graphics file, and
// if that file exists, we draw it here.
- if (isGFX && QFile::exists(EPSfilename)) {
+ if (isGFX && TQFile::exists(EPSfilename)) {
// Don't show PostScript, just draw the bounding box. For this,
// calculate the size of the bounding box in Pixels.
double bbox_width = urx - llx;
@@ -388,13 +388,13 @@ void dviRenderer::epsf_special(const QString& cp)
bbox_width *= 0.1 * 65536.0*fontPixelPerDVIunit / shrinkfactor;
bbox_height *= 0.1 * 65536.0*fontPixelPerDVIunit / shrinkfactor;
- QImage image(EPSfilename);
+ TQImage image(EPSfilename);
image = image.smoothScale((int)(bbox_width), (int)(bbox_height));
foreGroundPainter->drawImage( ((int) ((currinf.data.dvi_h) / (shrinkfactor * 65536))), currinf.data.pxl_v - (int)bbox_height, image);
return;
}
- if (!_postscript || !QFile::exists(EPSfilename)) {
+ if (!_postscript || !TQFile::exists(EPSfilename)) {
// Don't show PostScript, just draw the bounding box. For this,
// calculate the size of the bounding box in Pixels.
double bbox_width = urx - llx;
@@ -414,21 +414,21 @@ void dviRenderer::epsf_special(const QString& cp)
bbox_width *= 0.1 * 65536.0*fontPixelPerDVIunit / shrinkfactor;
bbox_height *= 0.1 * 65536.0*fontPixelPerDVIunit / shrinkfactor;
- QRect bbox(((int) ((currinf.data.dvi_h) / (shrinkfactor * 65536))), currinf.data.pxl_v - (int)bbox_height,
+ TQRect bbox(((int) ((currinf.data.dvi_h) / (shrinkfactor * 65536))), currinf.data.pxl_v - (int)bbox_height,
(int)bbox_width, (int)bbox_height);
foreGroundPainter->save();
- if (QFile::exists(EPSfilename))
+ if (TQFile::exists(EPSfilename))
foreGroundPainter->setBrush(Qt::lightGray);
else
foreGroundPainter->setBrush(Qt::red);
foreGroundPainter->setPen(Qt::black);
foreGroundPainter->drawRoundRect(bbox, 2, 2);
- QFont f = foreGroundPainter->font();
+ TQFont f = foreGroundPainter->font();
f.setPointSize(8);
foreGroundPainter->setFont(f);
- if (QFile::exists(EPSfilename))
+ if (TQFile::exists(EPSfilename))
foreGroundPainter->drawText (bbox, (int)(Qt::AlignCenter), EPSfilename_orig, -1);
else
foreGroundPainter->drawText (bbox, (int)(Qt::AlignCenter),
@@ -451,30 +451,30 @@ void dviRenderer::TPIC_flushPath_special()
return;
}
- QPen pen(Qt::black, (int)(penWidth_in_mInch*resolutionInDPI/1000.0 + 0.5)); // Sets the pen size in milli-inches
+ TQPen pen(Qt::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);
number_of_elements_in_path = 0;
}
-void dviRenderer::TPIC_addPath_special(const QString& cp)
+void dviRenderer::TPIC_addPath_special(const TQString& cp)
{
#ifdef DEBUG_SPECIAL
kdDebug(4300) << "TPIC special addPath: " << cp << endl;
#endif
// Adds a point to the path list
- QString cp_noWhiteSpace = cp.stripWhiteSpace();
+ TQString cp_noWhiteSpace = cp.stripWhiteSpace();
bool ok;
float xKoord = cp_noWhiteSpace.section(' ', 0, 0).toFloat(&ok);
if (ok == false) {
- printErrorMsgForSpecials( QString("TPIC special; cannot parse first argument in 'pn %1'.").arg(cp) );
+ printErrorMsgForSpecials( TQString("TPIC special; cannot parse first argument in 'pn %1'.").arg(cp) );
return;
}
float yKoord = cp_noWhiteSpace.section(' ', 1, 1).toFloat(&ok);
if (ok == false) {
- printErrorMsgForSpecials( QString("TPIC special; cannot parse second argument in 'pn %1'.").arg(cp) );
+ printErrorMsgForSpecials( TQString("TPIC special; cannot parse second argument in 'pn %1'.").arg(cp) );
return;
}
@@ -492,7 +492,7 @@ void dviRenderer::TPIC_addPath_special(const QString& cp)
}
-void dviRenderer::TPIC_setPen_special(const QString& cp)
+void dviRenderer::TPIC_setPen_special(const TQString& cp)
{
#ifdef DEBUG_SPECIAL
kdDebug(4300) << "TPIC special setPen: " << cp << endl;
@@ -502,7 +502,7 @@ void dviRenderer::TPIC_setPen_special(const QString& cp)
bool ok;
penWidth_in_mInch = cp.stripWhiteSpace().toFloat(&ok);
if (ok == false) {
- printErrorMsgForSpecials( QString("TPIC special; cannot parse argument in 'pn %1'.").arg(cp) );
+ printErrorMsgForSpecials( TQString("TPIC special; cannot parse argument in 'pn %1'.").arg(cp) );
penWidth_in_mInch = 0.0;
return;
}
@@ -511,7 +511,7 @@ void dviRenderer::TPIC_setPen_special(const QString& cp)
void dviRenderer::applicationDoSpecial(char *cp)
{
- QString special_command(cp);
+ TQString special_command(cp);
// First come specials which is only interpreted during rendering,
// and NOT during the prescan phase
@@ -572,7 +572,7 @@ void dviRenderer::applicationDoSpecial(char *cp)
// Hyperref: start of hyperref rectangle. At this stage it is not
// yet clear if the rectangle will conain a hyperlink, an anchor,
// or another type of object. We suspect that this rectangle will
- // define a hyperlink, allocate a QString and set HTML_href to
+ // define a hyperlink, allocate a TQString and set HTML_href to
// point to this string. The string contains the name of the
// destination which ---due to the nature of the PostScript
// language--- will be defined only after characters are drawn and
@@ -595,7 +595,7 @@ void dviRenderer::applicationDoSpecial(char *cp)
else
break;
- HTML_href = new QString("glopglyph");
+ HTML_href = new TQString("glopglyph");
return;
}
@@ -656,8 +656,8 @@ void dviRenderer::applicationDoSpecial(char *cp)
// - Sec. 3.2.2. The specification is implemented completely:
// balanced parentheses and all escape sequences are
// considered.
- QString tmpTargetName = special_command.section('(', 1);
- QString targetName;
+ TQString tmpTargetName = special_command.section('(', 1);
+ TQString targetName;
int parencount = 1;
for(int i=0; i<tmpTargetName.length(); i++) {
if (tmpTargetName[i] == '(')
@@ -672,7 +672,7 @@ void dviRenderer::applicationDoSpecial(char *cp)
}
targetName = PDFencodingToQString(targetName);
- QValueVector<Hyperlink>::iterator it;
+ TQValueVector<Hyperlink>::iterator it;
for( it = currentlyDrawnPage->hyperLinkList.begin(); it != currentlyDrawnPage->hyperLinkList.end(); ++it )
if (it->linkText == "glopglyph")
it->linkText = targetName;
diff --git a/kdvi/util.cpp b/kdvi/util.cpp
index d25b7e03..5b242cf1 100644
--- a/kdvi/util.cpp
+++ b/kdvi/util.cpp
@@ -68,7 +68,7 @@
* Print error message and quit.
*/
-void oops(QString message)
+void oops(TQString message)
{
kdError() << i18n("Fatal Error! ") << message << endl;
diff --git a/kdvi/vf.cpp b/kdvi/vf.cpp
index 36cad0ba..679aa9e0 100644
--- a/kdvi/vf.cpp
+++ b/kdvi/vf.cpp
@@ -36,7 +36,7 @@
#include "fontpool.h"
#include "xdvi.h"
-extern void oops(QString message);
+extern void oops(TQString message);
/***
*** VF font reading routines.
diff --git a/kfax/faxinput.cpp b/kfax/faxinput.cpp
index 8ca7fe85..47fdfa26 100644
--- a/kfax/faxinput.cpp
+++ b/kfax/faxinput.cpp
@@ -26,14 +26,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
#include <sys/time.h>
#include <fcntl.h>
#include "faxexpand.h"
-#include <qstring.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <klocale.h>
#include <kdebug.h>
void statusbarupdate(char* name,int width,int height,char* res);
-extern void kfaxerror(const QString& title, const QString& error);
+extern void kfaxerror(const TQString& title, const TQString& error);
#define FAXMAGIC "\000PC Research, Inc\000\000\000\000\000\000"
@@ -106,11 +106,11 @@ notetiff(const char *name)
int endian;
t32bits IFDoff;
struct pagenode *pn = NULL;
- QString str;
+ TQString str;
if ((tf = fopen(name, "r")) == NULL) {
- QString mesg = i18n("Unable to open:\n%1\n").arg(QFile::decodeName(name));
+ TQString mesg = i18n("Unable to open:\n%1\n").arg(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(QFile::decodeName(name));
+ str = i18n("Invalid tiff file:\n%1\n").arg(TQFile::decodeName(name));
kfaxerror(i18n("Sorry"),str);
bad:
if (strips)
@@ -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(QFile::decodeName(name)).arg(nstrips).arg(count);
+ .arg(TQFile::decodeName(name)).arg(nstrips).arg(count);
kfaxerror(i18n("Message"),str);
goto realbad;
}
@@ -395,7 +395,7 @@ getstrip(struct pagenode *pn, int strip)
struct stat sbuf;
unsigned char *Data;
union { t16bits s; unsigned char b[2]; } so;
- QString str;
+ TQString str;
#define ShortOrder so.b[1]
@@ -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(QFile::decodeName(pn->pathname));
+ str = i18n("Trying to expand too many strips\n%1%n").arg(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(QFile::decodeName(pn->pathname));
+ .arg(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(QFile::decodeName(pn->pathname));
+ str = i18n("No fax found in file:\n%1\n").arg(TQFile::decodeName(pn->pathname));
kfaxerror(i18n("Sorry"),str);
errno = 0;
badfile(pn);
diff --git a/kfax/kfax.cpp b/kfax/kfax.cpp
index 02661325..8a29f92c 100644
--- a/kfax/kfax.cpp
+++ b/kfax/kfax.cpp
@@ -31,13 +31,13 @@
#include <time.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qstrlist.h>
-#include <qtimer.h>
-#include <qpopupmenu.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
-#include <qbitmap.h>
+#include <tqfile.h>
+#include <tqstrlist.h>
+#include <tqtimer.h>
+#include <tqpopupmenu.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqbitmap.h>
#include <klocale.h>
#include <kaboutdata.h>
@@ -187,7 +187,7 @@ bool MyApp::x11EventFilter( XEvent * ev)
}
-TopLevel::TopLevel (QWidget *, const char *name)
+TopLevel::TopLevel (TQWidget *, const char *name)
: KMainWindow (0, name)
{
setMinimumSize (100, 100);
@@ -203,21 +203,21 @@ TopLevel::TopLevel (QWidget *, const char *name)
readSettings();
- faxqtwin = new QFrame(this);
+ faxqtwin = new TQFrame(this);
qtwin = faxqtwin->winId();
- faxqtwin->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+ faxqtwin->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
// Create a Vertical scroll bar
- vsb = new QScrollBar( QScrollBar::Vertical,faxqtwin,"scrollBar" );
+ vsb = new TQScrollBar( TQScrollBar::Vertical,faxqtwin,"scrollBar" );
vsb->hide();
- connect( vsb, SIGNAL(valueChanged(int)), SLOT(scrollVert(int)) );
+ connect( vsb, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(scrollVert(int)) );
// Create a Horizontal scroll bar
- hsb = new QScrollBar( QScrollBar::Horizontal,faxqtwin,"scrollBar" );
- connect( hsb, SIGNAL(valueChanged(int)), SLOT(scrollHorz(int)) );
+ hsb = new TQScrollBar( TQScrollBar::Horizontal,faxqtwin,"scrollBar" );
+ connect( hsb, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(scrollHorz(int)) );
hsb->hide();
setCentralWidget(faxqtwin);
@@ -235,43 +235,43 @@ TopLevel::~TopLevel()
void TopLevel::setupMenuBar()
{
// File menu
- KStdAction::open( this, SLOT( faxOpen() ), actionCollection() );
- actRecent = KStdAction::openRecent( this, SLOT( faxOpen( const KURL & ) ),
+ KStdAction::open( this, TQT_SLOT( faxOpen() ), actionCollection() );
+ actRecent = KStdAction::openRecent( this, TQT_SLOT( faxOpen( const KURL & ) ),
actionCollection() );
- actSave = KStdAction::save( this, SLOT( faxSave() ), actionCollection() );
- actSaveAs = KStdAction::saveAs( this, SLOT( faxSaveAs() ),
+ actSave = KStdAction::save( this, TQT_SLOT( faxSave() ), actionCollection() );
+ actSaveAs = KStdAction::saveAs( this, TQT_SLOT( faxSaveAs() ),
actionCollection() );
- actPrint = KStdAction::print( this, SLOT( print() ), actionCollection() );
- KStdAction::quit( this, SLOT( close() ), 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,
- SLOT( faxAdd() ), actionCollection(), "file_add_fax" );
+ TQT_SLOT( faxAdd() ), actionCollection(), "file_add_fax" );
actRecent->setMaxItems( 5 );
// View Menu
- actSize = KStdAction::actualSize( this, SLOT( actualSize() ),
+ actSize = KStdAction::actualSize( this, TQT_SLOT( actualSize() ),
actionCollection() );
- actZoomIn = KStdAction::zoomIn( this, SLOT( zoomin() ), actionCollection() );
- actZoomOut = KStdAction::zoomOut( this, SLOT( zoomout() ),
+ actZoomIn = KStdAction::zoomIn( this, TQT_SLOT( zoomin() ), actionCollection() );
+ actZoomOut = KStdAction::zoomOut( this, TQT_SLOT( zoomout() ),
actionCollection() );
actRotate = new KAction( i18n( "&Rotate Page" ), "rotate", KShortcut(), this,
- SLOT( rotatePage() ), actionCollection(), "view_rotate" );
+ TQT_SLOT( rotatePage() ), actionCollection(), "view_rotate" );
actMirror = new KAction( i18n( "Mirror Page" ), KShortcut(), this,
- SLOT( mirrorPage() ), actionCollection(), "view_mirror" );
+ TQT_SLOT( mirrorPage() ), actionCollection(), "view_mirror" );
actFlip = new KAction( i18n( "&Flip Page" ), KShortcut(), this,
- SLOT( flipPage() ), actionCollection(), "view_flip" );
+ TQT_SLOT( flipPage() ), actionCollection(), "view_flip" );
// Go menu
- actNext = KStdAction::next( this, SLOT( nextPage() ), actionCollection() );
- actPrev = KStdAction::prior( this, SLOT( prevPage() ), actionCollection() );
- actFirst = KStdAction::firstPage( this, SLOT( firstPage() ),
+ actNext = KStdAction::next( this, TQT_SLOT( nextPage() ), actionCollection() );
+ actPrev = KStdAction::prior( this, TQT_SLOT( prevPage() ), actionCollection() );
+ actFirst = KStdAction::firstPage( this, TQT_SLOT( firstPage() ),
actionCollection() );
- actLast = KStdAction::lastPage( this, SLOT( lastPage() ),
+ actLast = KStdAction::lastPage( this, TQT_SLOT( lastPage() ),
actionCollection() );
// Settings menu
- KStdAction::preferences( this, SLOT( faxoptions() ), actionCollection() );
+ KStdAction::preferences( 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(QString::null, ID_FNAME, 1);
+ statusbar->insertItem(TQString::null, ID_FNAME, 1);
statusbar->setItemAlignment( ID_FNAME, AlignLeft );
- statusbar->changeItem(QString::null, ID_INS_OVR);
- statusbar->changeItem(QString::null, ID_GENERAL);
- statusbar->changeItem(QString::null, ID_TYPE);
- statusbar->changeItem(QString::null, ID_PAGE_NO);
- statusbar->changeItem(QString::null, ID_FNAME);
+ 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);
}
void TopLevel::readSettings()
@@ -378,7 +378,7 @@ void TopLevel::writeSettings()
void TopLevel::faxOpen()
{
- KURL url = KFileDialog::getOpenURL(QString::null, KFAX_FILETYPES);
+ KURL url = KFileDialog::getOpenURL(TQString::null, KFAX_FILETYPES);
faxOpen( url );
@@ -400,7 +400,7 @@ void TopLevel::faxOpen( const KURL & url )
void TopLevel::faxAdd()
{
- KURL url = KFileDialog::getOpenURL(QString::null, KFAX_FILETYPES);
+ KURL url = KFileDialog::getOpenURL(TQString::null, KFAX_FILETYPES);
faxAdd( url );
@@ -424,7 +424,7 @@ void TopLevel::faxSave()
void TopLevel::faxSaveAs()
{
- fileURL = KFileDialog::getSaveURL(QString::null, KFAX_FILETYPES);
+ fileURL = KFileDialog::getSaveURL(TQString::null, KFAX_FILETYPES);
if (fileURL.isEmpty())
return;
@@ -509,24 +509,24 @@ void TopLevel::actualSize()
zoom( oz );
}
-void loadfile(QString filename)
+void loadfile(TQString filename)
{
// Typical FAX resolutions are:
// Standard: 203 dpi x 98 dpi
// Fine: 203 dpi x 196 lpi
// Super Fine: 203 dpi y 392 lpi, or
// 406 dpi x 392 lpi
- QSize dpi(203,196);
+ TQSize dpi(203,196);
KFileMetaInfo metaInfo(filename);
if (metaInfo.isValid() && metaInfo.item("Resolution").isValid())
{
- QSize s = metaInfo.item("Resolution").value().toSize();
+ TQSize s = metaInfo.item("Resolution").value().toSize();
if (s.width() >= 100 && s.height() >= 100)
dpi = s;
}
- (void) notetiff(QFile::encodeName(filename));
+ (void) notetiff(TQFile::encodeName(filename));
struct pagenode *pn;
for(pn = firstpage; pn; pn = pn->next)
@@ -536,7 +536,7 @@ void loadfile(QString filename)
}
}
-void TopLevel::openadd(QString filename)
+void TopLevel::openadd(TQString filename)
{
auxpage = lastpage;
@@ -557,14 +557,14 @@ void TopLevel::openadd(QString filename)
putImage();
}
-void TopLevel::resizeEvent(QResizeEvent *e)
+void TopLevel::resizeEvent(TQResizeEvent *e)
{
KMainWindow::resizeEvent(e);
resizeView();
}
-void TopLevel::wheelEvent( QWheelEvent *e )
+void TopLevel::wheelEvent( TQWheelEvent *e )
{
e->accept();
@@ -577,7 +577,7 @@ void TopLevel::wheelEvent( QWheelEvent *e )
}
else
{
- int offset = QApplication::wheelScrollLines()*vsb->lineStep();
+ int offset = TQApplication::wheelScrollLines()*vsb->lineStep();
if ( e->state() & ControlButton )
offset = vsb->pageStep();
offset = -e->delta()*offset/120;
@@ -697,11 +697,11 @@ void TopLevel::print(){
int pages, currentpage;
loadAllPages(pages, currentpage);
- KPrinter printer(true, QPrinter::HighResolution);
+ KPrinter printer(true, TQPrinter::HighResolution);
printer.setFullPage( true );
printer.setUsePrinterResolution( true );
printer.setCreator( i18n("KFax") + " " KFAXVERSION );
- printer.setDocName( QString("%1 - %2").arg(firstpage->name).arg(i18n("KFax")));
+ printer.setDocName( TQString("%1 - %2").arg(firstpage->name).arg(i18n("KFax")));
printer.setDocFileName( firstpage->name );
printer.setPageSelection( KPrinter::ApplicationSide );
printer.setMinMax( 1, pages );
@@ -710,18 +710,18 @@ void TopLevel::print(){
if ( !printer.setup( this ) )
return;
- QPainter painter;
+ TQPainter painter;
painter.begin( &printer );
printIt(printer, painter);
painter.end();
}
-void TopLevel::printIt( KPrinter &printer, QPainter &painter )
+void TopLevel::printIt( KPrinter &printer, TQPainter &painter )
{
- QPaintDeviceMetrics dm(painter.device());
+ TQPaintDeviceMetrics dm(painter.device());
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
kapp->processEvents();
const bool fullpage = printer.option(APP_KFAX_SCALE_FULLPAGE) == "true";
@@ -743,7 +743,7 @@ void TopLevel::printIt( KPrinter &printer, QPainter &painter )
continue;
// byte-swapping the image
- QByteArray bytes( Image->height*Image->bytes_per_line );
+ 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);
@@ -761,17 +761,17 @@ void TopLevel::printIt( KPrinter &printer, QPainter &painter )
}
}
- QImage image( (uchar *)bytes.data(), Image->bytes_per_line*8, Image->height, 1, NULL, 2, QImage::LittleEndian);
+ TQImage image( (uchar *)bytes.data(), Image->bytes_per_line*8, Image->height, 1, NULL, 2, TQImage::LittleEndian);
if (first_page_printed)
printer.newPage();
first_page_printed = true;
- const QSize printersize( dm.width(), dm.height() );
+ const TQSize printersize( dm.width(), dm.height() );
kdDebug() << "Printersize = " << printersize << endl;
// print Image in original size if possible, else scale it.
- const QSize size( // logical size of the image
+ const TQSize size( // logical size of the image
Image->width * dm.logicalDpiX() / pn->dpiX,
Image->height * dm.logicalDpiY() / pn->dpiY
);
@@ -788,15 +788,15 @@ void TopLevel::printIt( KPrinter &printer, QPainter &painter )
printer.margins( &top, &left, &bottom, &right );
kdDebug() << "Margins = " << top << " " << left << " " << bottom << " " << right << endl;
- const QSize maxSize( printersize.width()-left-right, printersize.height()-top-bottom );
- QSize scaledImageSize = size;
+ const TQSize maxSize( printersize.width()-left-right, printersize.height()-top-bottom );
+ TQSize scaledImageSize = size;
if (size.width() > maxSize.width() || size.height() > maxSize.height() ) {
// Image does not fit - scale it and print centered
- scaledImageSize.scale( maxSize, QSize::ScaleMin );
+ scaledImageSize.scale( 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, QSize::ScaleMin );
+ scaledImageSize.scale( size, TQSize::ScaleMin );
kdDebug() << "Image does fit - scaling to " << size << endl;
}
kdDebug() << "Final image size " << scaledImageSize << endl;
@@ -809,11 +809,11 @@ void TopLevel::printIt( KPrinter &printer, QPainter &painter )
y = (maxSize.height()-scaledImageSize.height())/2 + top;
else
y = top;
- painter.drawImage( QRect(x,y,scaledImageSize.width(), scaledImageSize.height()), image );
+ painter.drawImage( TQRect(x,y,scaledImageSize.width(), scaledImageSize.height()), image );
}
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
void TopLevel::saveNetFile( const KURL& dest)
@@ -846,7 +846,7 @@ void TopLevel::openNetFile( const KURL &u)
if ( u.isLocalFile() )
{
- QString string = i18n("Loading '%1'").arg(u.path());
+ TQString string = i18n("Loading '%1'").arg(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..."));
- QString tmpFile = QString::null;
+ TQString tmpFile = TQString::null;
if ( KIO::NetAccess::download( u, tmpFile, this ) )
{
openadd( tmpFile );
@@ -865,12 +865,12 @@ void TopLevel::openNetFile( const KURL &u)
}
}
-void TopLevel::dragEnterEvent( QDragEnterEvent * event)
+void TopLevel::dragEnterEvent( TQDragEnterEvent * event)
{
event->accept(KURLDrag::canDecode(event));
}
-void TopLevel::dropEvent( QDropEvent * event)
+void TopLevel::dropEvent( TQDropEvent * event)
{
KURL::List list;
@@ -1355,7 +1355,7 @@ void TopLevel::newPage(){
Image = Images[0] = Pimage(thispage);
- setCaption(QFile::decodeName(thispage->name));
+ setCaption(TQFile::decodeName(thispage->name));
Image = generateZoomImages(oz);
@@ -1382,7 +1382,7 @@ void TopLevel::faxClose()
vsb->hide();
hsb->hide();
- fileURL = QString::null;
+ fileURL = TQString::null;
updateActions();
}
@@ -1441,22 +1441,22 @@ void TopLevel::uiUpdate(){
currentpage = pages;
}
- QString pagestr = i18n("Page: %1 of %2").arg(currentpage).arg(pages);
+ TQString pagestr = i18n("Page: %1 of %2").arg(currentpage).arg(pages);
statusbar->changeItem(pagestr, ID_PAGE_NO);
if(Image){
- QString wh = i18n("W: %1 H: %2").arg(Image->width).arg(Image->height);
+ TQString wh = i18n("W: %1 H: %2").arg(Image->width).arg(Image->height);
statusbar->changeItem(wh, ID_INS_OVR);
}
- QString resolution = i18n("Res: %1").arg(thispage->vres?i18n("Fine"):i18n("Normal"));
- // TODO: resolution += QString("%1x%2").arg(thispage->dpiX).arg(thispage->dpiY);
+ TQString resolution = i18n("Res: %1").arg(thispage->vres?i18n("Fine"):i18n("Normal"));
+ // TODO: resolution += TQString("%1x%2").arg(thispage->dpiX).arg(thispage->dpiY);
statusbar->changeItem(resolution, ID_GENERAL);
statusbar->changeItem(thispage->name, ID_FNAME);
- QString typestring;
+ TQString typestring;
if(thispage->type == FAX_TIFF){
typestring = i18n("Type: Tiff ");
@@ -1479,7 +1479,7 @@ void TopLevel::uiUpdate(){
}
}
-void kfaxerror(const QString& title, const QString& error){
+void kfaxerror(const TQString& title, const TQString& error){
KMessageBox::error(toplevel, error, title);
}
diff --git a/kfax/kfax.h b/kfax/kfax.h
index 506a1452..99ad9940 100644
--- a/kfax/kfax.h
+++ b/kfax/kfax.h
@@ -30,19 +30,19 @@
#include <kapplication.h>
#include <kmainwindow.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kurl.h>
#define Pimage(p) ((XImage *)(p)->extra)
-class QPopupMenu;
+class TQPopupMenu;
class KConfig;
class KStatusBar;
class KAction;
class KRecentFilesAction;
class KPrinter;
-class QPainter;
-class QScrollBar;
+class TQPainter;
+class TQScrollBar;
typedef KToolBar::BarPosition BarPosition;
@@ -58,24 +58,24 @@ class TopLevel : public KMainWindow
public:
- TopLevel( QWidget *parent=0, const char *name=0 );
+ TopLevel( TQWidget *parent=0, const char *name=0 );
~TopLevel();
void openNetFile( const KURL& _url);
void saveNetFile( const KURL& _url );
- static QPtrList<TopLevel> windowList;
- QPopupMenu *right_mouse_button, *colors;
+ static TQPtrList<TopLevel> windowList;
+ TQPopupMenu *right_mouse_button, *colors;
void handle_X_event(XEvent Event);
void putImage();
protected:
- void resizeEvent( QResizeEvent * );
- void wheelEvent( QWheelEvent * );
- void dragEnterEvent( QDragEnterEvent * event );
- void dropEvent( QDropEvent * event );
+ void resizeEvent( TQResizeEvent * );
+ void wheelEvent( TQWheelEvent * );
+ void dragEnterEvent( TQDragEnterEvent * event );
+ void dropEvent( TQDropEvent * event );
void updateActions();
void updateGoActions();
@@ -95,11 +95,11 @@ protected:
private:
- QFrame *faxqtwin;
+ TQFrame *faxqtwin;
int indentID;
- QColor forecolor;
- QColor backcolor;
+ TQColor forecolor;
+ TQColor backcolor;
KURL fileURL;
KStatusBar *statusbar;
@@ -113,11 +113,11 @@ private:
KConfig *config;
- QScrollBar *hsb;
- QScrollBar *vsb;
- QFrame* mainpane;
+ TQScrollBar *hsb;
+ TQScrollBar *vsb;
+ TQFrame* mainpane;
- void printIt( KPrinter &printer, QPainter &painter );
+ void printIt( KPrinter &printer, TQPainter &painter );
bool loadAllPages( int &numpages, int &currentpage );
public slots:
@@ -146,14 +146,14 @@ public slots:
void lastPage();
void uiUpdate();
- void openadd(QString filename);
+ void openadd(TQString filename);
void FreeFax();
void scrollHorz(int);
void scrollVert(int);
};
-void kfaxerror(const QString&, const QString&);
-void loadfile(QString filename);
+void kfaxerror(const TQString&, const TQString&);
+void loadfile(TQString filename);
#endif // _KFAX_H_
diff --git a/kfax/kfax_printsettings.cpp b/kfax/kfax_printsettings.cpp
index 02aa4050..5382c2e5 100644
--- a/kfax/kfax_printsettings.cpp
+++ b/kfax/kfax_printsettings.cpp
@@ -20,14 +20,14 @@
#include "kfax_printsettings.h"
#include <klocale.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
-KFAXPrintSettings::KFAXPrintSettings(QWidget *parent, const char *name)
+KFAXPrintSettings::KFAXPrintSettings(TQWidget *parent, const char *name)
: KPrintDialogPage(parent, name)
{
- QString whatsThisScaleFullPage = i18n( "<qt>"
+ TQString whatsThisScaleFullPage = i18n( "<qt>"
"<p><strong>'Ignore Paper Margins'</strong></p>"
"<p>"
"If this checkbox is enabled, the paper margins will be ignored "
@@ -38,7 +38,7 @@ KFAXPrintSettings::KFAXPrintSettings(QWidget *parent, const char *name)
"margins and print the fax inside this printable area."
"</p>"
" </qt>" );
- QString whatsThisCenterHorz = i18n( "<qt>"
+ TQString whatsThisCenterHorz = i18n( "<qt>"
"<p><strong>'Horizontal centered'</strong></p>"
"<p>"
"If this checkbox is enabled, the fax will be centered horizontally "
@@ -49,7 +49,7 @@ KFAXPrintSettings::KFAXPrintSettings(QWidget *parent, const char *name)
"side of the page."
"</p>"
" </qt>" );
- QString whatsThisCenterVert = i18n( "<qt>"
+ TQString whatsThisCenterVert = i18n( "<qt>"
"<p><strong>'Vertical centered'</strong></p>"
"<p>"
"If this checkbox is enabled, the fax will be centered vertically "
@@ -63,14 +63,14 @@ KFAXPrintSettings::KFAXPrintSettings(QWidget *parent, const char *name)
setTitle(i18n("&Layout"));
- m_scaleFullPage = new QCheckBox(i18n("Ignore paper margins"), this);
- QWhatsThis::add(m_scaleFullPage, whatsThisScaleFullPage);
- m_center_horz = new QCheckBox(i18n("Horizontal centered"), this);
- QWhatsThis::add(m_center_horz, whatsThisCenterHorz);
- m_center_vert = new QCheckBox(i18n("Vertical centered"), this);
- QWhatsThis::add(m_center_vert, whatsThisCenterVert);
+ m_scaleFullPage = new TQCheckBox(i18n("Ignore paper margins"), this);
+ TQWhatsThis::add(m_scaleFullPage, whatsThisScaleFullPage);
+ m_center_horz = new TQCheckBox(i18n("Horizontal centered"), this);
+ TQWhatsThis::add(m_center_horz, whatsThisCenterHorz);
+ m_center_vert = new TQCheckBox(i18n("Vertical centered"), this);
+ TQWhatsThis::add(m_center_vert, whatsThisCenterVert);
- QVBoxLayout *l0 = new QVBoxLayout(this, 0, 10);
+ TQVBoxLayout *l0 = new TQVBoxLayout(this, 0, 10);
l0->addWidget(m_scaleFullPage);
l0->addWidget(m_center_horz);
l0->addWidget(m_center_vert);
@@ -81,14 +81,14 @@ KFAXPrintSettings::~KFAXPrintSettings()
{
}
-void KFAXPrintSettings::getOptions(QMap<QString,QString>& opts, bool /*incldef*/)
+void KFAXPrintSettings::getOptions(TQMap<TQString,TQString>& opts, bool /*incldef*/)
{
opts[APP_KFAX_SCALE_FULLPAGE] = (m_scaleFullPage->isChecked() ? "true" : "false");
opts[APP_KFAX_CENTER_HORZ] = (m_center_horz->isChecked() ? "true" : "false");
opts[APP_KFAX_CENTER_VERT] = (m_center_vert->isChecked() ? "true" : "false");
}
-void KFAXPrintSettings::setOptions(const QMap<QString,QString>& opts)
+void KFAXPrintSettings::setOptions(const TQMap<TQString,TQString>& opts)
{
m_scaleFullPage->setChecked(opts[APP_KFAX_SCALE_FULLPAGE] == "true");
m_center_horz->setChecked(opts[APP_KFAX_CENTER_HORZ] != "false");
diff --git a/kfax/kfax_printsettings.h b/kfax/kfax_printsettings.h
index e43e3530..3213b7d2 100644
--- a/kfax/kfax_printsettings.h
+++ b/kfax/kfax_printsettings.h
@@ -22,7 +22,7 @@
#include <kdeprint/kprintdialogpage.h>
-class QCheckBox;
+class TQCheckBox;
#define APP_KFAX_SCALE_FULLPAGE "app-kfax-scalefullpage"
#define APP_KFAX_CENTER_HORZ "app-kfax-center-horz"
@@ -32,11 +32,11 @@ class KFAXPrintSettings : public KPrintDialogPage
{
Q_OBJECT
public:
- KFAXPrintSettings(QWidget *parent = 0, const char *name = 0);
+ KFAXPrintSettings(TQWidget *parent = 0, const char *name = 0);
~KFAXPrintSettings();
- void getOptions(QMap<QString,QString>& opts, bool incldef = false);
- void setOptions(const QMap<QString,QString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& opts);
private:
QCheckBox *m_scaleFullPage;
diff --git a/kfax/options.cpp b/kfax/options.cpp
index b8bf8067..b692b28d 100644
--- a/kfax/options.cpp
+++ b/kfax/options.cpp
@@ -27,142 +27,142 @@
#include <stdio.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <knuminput.h>
-#include <qdir.h>
-#include <qprinter.h>
-#include <qframe.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qscrollbar.h>
-#include <qtooltip.h>
+#include <tqdir.h>
+#include <tqprinter.h>
+#include <tqframe.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqscrollbar.h>
+#include <tqtooltip.h>
#include "kfax.h"
#include "options.h"
-OptionsDialog::OptionsDialog( QWidget *parent, const char *name)
+OptionsDialog::OptionsDialog( TQWidget *parent, const char *name)
: KDialogBase( parent, name, true, i18n("Configure"), Ok|Cancel)
{
- QWidget *mainWidget = new QWidget(this);
+ TQWidget *mainWidget = new TQWidget(this);
setMainWidget(mainWidget);
- QVBoxLayout *mainLayout = new QVBoxLayout(mainWidget, 0, spacingHint());
+ TQVBoxLayout *mainLayout = new TQVBoxLayout(mainWidget, 0, spacingHint());
- bg = new QGroupBox(mainWidget,"bg");
+ bg = new TQGroupBox(mainWidget,"bg");
bg->setColumnLayout( 0, Qt::Horizontal );
mainLayout->addWidget( bg );
- QVBoxLayout *vbl = new QVBoxLayout(bg->layout());
+ TQVBoxLayout *vbl = new TQVBoxLayout(bg->layout());
- QHBoxLayout *hbl1 = new QHBoxLayout();
+ TQHBoxLayout *hbl1 = new TQHBoxLayout();
vbl->addLayout( hbl1 );
- displaylabel = new QLabel(i18n("Display options:"), bg,"displaylabel");
+ displaylabel = new TQLabel(i18n("Display options:"), bg,"displaylabel");
displaylabel->setFixedSize( displaylabel->sizeHint() );
hbl1->addWidget( displaylabel );
- landscape = new QCheckBox(i18n("Landscape"), bg,"Landscape");
+ landscape = new TQCheckBox(i18n("Landscape"), bg,"Landscape");
landscape->setFixedSize( landscape->sizeHint() );
hbl1->addSpacing( 10 );
hbl1->addWidget( landscape );
- flip = new QCheckBox(i18n("Upside down"), bg,"upsidedown");
+ flip = new TQCheckBox(i18n("Upside down"), bg,"upsidedown");
flip->setFixedSize( flip->sizeHint() );
hbl1->addSpacing( 10 );
hbl1->addWidget( flip );
- invert = new QCheckBox(i18n("Invert"), bg,"invert");
+ invert = new TQCheckBox(i18n("Invert"), bg,"invert");
invert->setFixedSize( invert->sizeHint() );
hbl1->addSpacing( 10 );
hbl1->addWidget( invert );
vbl->addSpacing( 20 );
- QHBoxLayout *hbl8 = new QHBoxLayout();
+ TQHBoxLayout *hbl8 = new TQHBoxLayout();
vbl->addLayout( hbl8 );
hbl8->addSpacing( 10 );
- resgroup = new QButtonGroup(bg,"resgroup");
- resgroup->setFrameStyle(QFrame::NoFrame);
+ resgroup = new TQButtonGroup(bg,"resgroup");
+ resgroup->setFrameStyle(TQFrame::NoFrame);
hbl8->addWidget( resgroup );
- QHBoxLayout *hbl2 = new QHBoxLayout(resgroup);
+ TQHBoxLayout *hbl2 = new TQHBoxLayout(resgroup);
- reslabel = new QLabel(i18n("Raw fax resolution:"),resgroup,"relabel");
+ reslabel = new TQLabel(i18n("Raw fax resolution:"),resgroup,"relabel");
hbl2->addWidget( reslabel );
- resauto = new QRadioButton(i18n("Auto"),resgroup,"resauto");
+ resauto = new TQRadioButton(i18n("Auto"),resgroup,"resauto");
hbl2->addSpacing( 20 );
hbl2->addWidget( resauto );
- fine = new QRadioButton(i18n("Fine"),resgroup,"fine");
+ fine = new TQRadioButton(i18n("Fine"),resgroup,"fine");
hbl2->addSpacing( 30 );
hbl2->addWidget( fine );
- normal = new QRadioButton(i18n("Normal"),resgroup,"normal");
+ normal = new TQRadioButton(i18n("Normal"),resgroup,"normal");
hbl2->addSpacing( 30 );
hbl2->addWidget( normal );
vbl->addSpacing( 20 );
- QHBoxLayout *hbl3 = new QHBoxLayout();
+ TQHBoxLayout *hbl3 = new TQHBoxLayout();
vbl->addLayout( hbl3 );
- lsblabel = new QLabel(i18n("Raw fax data are:"), bg,"lsblabel");
+ lsblabel = new TQLabel(i18n("Raw fax data are:"), bg,"lsblabel");
hbl3->addSpacing( 10 );
hbl3->addWidget( lsblabel );
- lsb = new QCheckBox(i18n("LS-Bit first"), bg,"lsbitfirst");
+ lsb = new TQCheckBox(i18n("LS-Bit first"), bg,"lsbitfirst");
hbl3->addSpacing( 10 );
hbl3->addWidget( lsb );
vbl->addSpacing( 15 );
- QHBoxLayout *hbl9 = new QHBoxLayout();
+ TQHBoxLayout *hbl9 = new TQHBoxLayout();
vbl->addLayout( hbl9 );
hbl9->addSpacing( 10 );
- rawgroup = new QButtonGroup(bg,"rawgroup");
+ rawgroup = new TQButtonGroup(bg,"rawgroup");
hbl9->addWidget( rawgroup );
- QHBoxLayout *hbl4 = new QHBoxLayout( rawgroup );
+ TQHBoxLayout *hbl4 = new TQHBoxLayout( rawgroup );
- rawgroup->setFrameStyle(QFrame::NoFrame);
+ rawgroup->setFrameStyle(TQFrame::NoFrame);
- rawlabel = new QLabel(i18n("Raw fax format:"),rawgroup,"rawlabel");
+ rawlabel = new TQLabel(i18n("Raw fax format:"),rawgroup,"rawlabel");
rawlabel->setFixedSize( rawlabel->sizeHint() );
hbl4->addWidget( rawlabel );
- g3 = new QRadioButton("G3",rawgroup,"g3");
- connect(g3,SIGNAL(clicked()), this, SLOT(g3toggled()));
+ g3 = new TQRadioButton("G3",rawgroup,"g3");
+ connect(g3,TQT_SIGNAL(clicked()), this, TQT_SLOT(g3toggled()));
hbl4->addSpacing( 20 );
hbl4->addWidget( g3 );
- g32d = new QRadioButton("G32d",rawgroup,"g32d");
- connect(g32d,SIGNAL(clicked()), this,SLOT(g32toggled()));
+ g32d = new TQRadioButton("G32d",rawgroup,"g32d");
+ connect(g32d,TQT_SIGNAL(clicked()), this,TQT_SLOT(g32toggled()));
hbl4->addSpacing( 30 );
hbl4->addWidget( g32d );
- g4 = new QRadioButton("G4",rawgroup,"g4");
- connect(g4,SIGNAL(clicked()), this, SLOT(g4toggled()));
+ g4 = new TQRadioButton("G4",rawgroup,"g4");
+ connect(g4,TQT_SIGNAL(clicked()), this, TQT_SLOT(g4toggled()));
hbl4->addSpacing( 30 );
hbl4->addWidget( g4 );
vbl->addSpacing( 20 );
- QHBoxLayout *hbl5 = new QHBoxLayout();
+ TQHBoxLayout *hbl5 = new TQHBoxLayout();
vbl->addLayout( hbl5 );
- widthlabel = new QLabel(i18n("Raw fax width:"),bg,"widthlabel");
+ widthlabel = new TQLabel(i18n("Raw fax width:"),bg,"widthlabel");
hbl5->addSpacing( 10 );
hbl5->addWidget( widthlabel );
@@ -170,7 +170,7 @@ OptionsDialog::OptionsDialog( QWidget *parent, const char *name)
widthedit->setRange(1, 10000, 1, false);
hbl5->addWidget( widthedit );
- heightlabel = new QLabel(i18n("Height:"),bg,"heightlabel");
+ heightlabel = new TQLabel(i18n("Height:"),bg,"heightlabel");
hbl5->addSpacing( 10 );
hbl5->addWidget( heightlabel );
@@ -178,8 +178,8 @@ OptionsDialog::OptionsDialog( QWidget *parent, const char *name)
heightedit->setRange(0, 100000, 1, false);
hbl5->addWidget( heightedit );
- geomauto = new QCheckBox(i18n("Auto"),bg,"geomauto");
- connect(geomauto,SIGNAL(clicked()),this,SLOT(geomtoggled()));
+ geomauto = new TQCheckBox(i18n("Auto"),bg,"geomauto");
+ connect(geomauto,TQT_SIGNAL(clicked()),this,TQT_SLOT(geomtoggled()));
hbl5->addSpacing( 10 );
hbl5->addWidget( geomauto );
}
diff --git a/kfax/options.h b/kfax/options.h
index fa9c61c9..693616e4 100644
--- a/kfax/options.h
+++ b/kfax/options.h
@@ -27,17 +27,17 @@
#ifndef _OPTIONS_DIALOG_H_
#define _OPTIONS_DIALOG_H_
-#include <qapplication.h>
-#include <qfiledialog.h>
+#include <tqapplication.h>
+#include <tqfiledialog.h>
#include <kdialogbase.h>
-#include <qstring.h>
+#include <tqstring.h>
-class QGroupBox;
-class QLabel;
-class QButtonGroup;
-class QRadioButton;
-class QCheckBox;
-class QRadioButton;
+class TQGroupBox;
+class TQLabel;
+class TQButtonGroup;
+class TQRadioButton;
+class TQCheckBox;
+class TQRadioButton;
struct optionsinfo {
@@ -60,7 +60,7 @@ class OptionsDialog : public KDialogBase {
Q_OBJECT
public:
- OptionsDialog( QWidget *parent = 0, const char *name = 0);
+ OptionsDialog( TQWidget *parent = 0, const char *name = 0);
struct optionsinfo* getInfo();
void setWidgets(struct optionsinfo *oi);
@@ -77,30 +77,30 @@ public slots:
private:
QGroupBox *bg;
- QLabel *reslabel;
- QButtonGroup *resgroup;
- QRadioButton *fine;
- QRadioButton *resauto;
- QRadioButton *normal;
+ TQLabel *reslabel;
+ TQButtonGroup *resgroup;
+ TQRadioButton *fine;
+ TQRadioButton *resauto;
+ TQRadioButton *normal;
QLabel *displaylabel;
- QButtonGroup *displaygroup;
- QCheckBox *landscape;
- QCheckBox *geomauto;
- QCheckBox *flip;
- QCheckBox *invert;
-
- QButtonGroup *lsbgroup;
- QLabel *lsblabel;
- QCheckBox *lsb;
- QButtonGroup *rawgroup;
- QRadioButton *g3;
- QRadioButton *g32d;
- QRadioButton *g4;
-
- QLabel *rawlabel;
-
- QLabel *widthlabel;
- QLabel *heightlabel;
+ TQButtonGroup *displaygroup;
+ TQCheckBox *landscape;
+ TQCheckBox *geomauto;
+ TQCheckBox *flip;
+ TQCheckBox *invert;
+
+ TQButtonGroup *lsbgroup;
+ TQLabel *lsblabel;
+ TQCheckBox *lsb;
+ TQButtonGroup *rawgroup;
+ TQRadioButton *g3;
+ TQRadioButton *g32d;
+ TQRadioButton *g4;
+
+ TQLabel *rawlabel;
+
+ TQLabel *widthlabel;
+ TQLabel *heightlabel;
KIntNumInput *widthedit;
KIntNumInput *heightedit;
diff --git a/kfax/viewfax.cpp b/kfax/viewfax.cpp
index fe1e4246..26a98613 100644
--- a/kfax/viewfax.cpp
+++ b/kfax/viewfax.cpp
@@ -36,12 +36,12 @@
#include <sys/time.h>
#include <unistd.h>
-#include <qglobal.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qevent.h>
-#include <qprinter.h>
-#include <qstring.h>
+#include <tqglobal.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqevent.h>
+#include <tqprinter.h>
+#include <tqstring.h>
#include <kcmdlineargs.h>
#include <klocale.h>
@@ -222,7 +222,7 @@ int viewfaxmain()
defaultpage.width = args->getOption("width").toInt();
}
- QCString mem = args->getOption("mem");
+ TQCString mem = args->getOption("mem");
Memlimit = atoi(mem.data());
switch(mem[mem.length()-1]) {
case 'M':
@@ -240,7 +240,7 @@ int viewfaxmain()
firstpage = lastpage = thispage = helppage = auxpage = 0;
for (int i = 0; i < args->count(); i++){
- loadfile(QFile::decodeName(args->arg(i)));
+ loadfile(TQFile::decodeName(args->arg(i)));
}
args->clear();
diff --git a/kfaxview/faxmultipage.cpp b/kfaxview/faxmultipage.cpp
index bbf4e566..44c1e273 100644
--- a/kfaxview/faxmultipage.cpp
+++ b/kfaxview/faxmultipage.cpp
@@ -31,8 +31,8 @@ typedef KParts::GenericFactory<FaxMultiPage> FaxMultiPageFactory;
K_EXPORT_COMPONENT_FACTORY(kfaxviewpart, FaxMultiPageFactory)
-FaxMultiPage::FaxMultiPage(QWidget *parentWidget, const char *widgetName, QObject *parent,
- const char *name, const QStringList&)
+FaxMultiPage::FaxMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent,
+ const char *name, const TQStringList&)
: KMultiPage(parentWidget, widgetName, parent, name), faxRenderer(parentWidget)
{
/* This is kparts wizardry that cannot be understood by man. Simply
@@ -72,11 +72,11 @@ KAboutData* FaxMultiPage::createAboutData()
}
-QStringList FaxMultiPage::fileFormats() const
+TQStringList FaxMultiPage::fileFormats() const
{
/* This list is used in the file selection dialog when the file is
saved */
- QStringList r;
+ TQStringList r;
r << i18n("*.g3|Fax (g3) file (*.g3)");
return r;
}
diff --git a/kfaxview/faxmultipage.h b/kfaxview/faxmultipage.h
index 1ea8b6c5..65a7fa25 100644
--- a/kfaxview/faxmultipage.h
+++ b/kfaxview/faxmultipage.h
@@ -21,7 +21,7 @@
#ifndef FAXMULTIPAGE_H
#define FAXMULTIPAGE_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "kmultipage.h"
#include "faxrenderer.h"
@@ -89,8 +89,8 @@ public:
kmultipage. Please have a look at the constructor's source code to
see how to adjust this for your implementation.
*/
- FaxMultiPage(QWidget *parentWidget, const char *widgetName, QObject *parent,
- const char *name, const QStringList& args = QStringList());
+ FaxMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent,
+ const char *name, const TQStringList& args = TQStringList());
/** Destructor
@@ -103,7 +103,7 @@ public:
This method returns the list of supported file formats for saving
the file.
*/
- virtual QStringList fileFormats() const;
+ virtual TQStringList fileFormats() const;
/** Author information
diff --git a/kfaxview/faxrenderer.cpp b/kfaxview/faxrenderer.cpp
index ec18d431..3e597863 100644
--- a/kfaxview/faxrenderer.cpp
+++ b/kfaxview/faxrenderer.cpp
@@ -23,8 +23,8 @@
#include <kmessagebox.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qfileinfo.h>
-#include <qpainter.h>
+#include <tqfileinfo.h>
+#include <tqpainter.h>
#include "documentWidget.h"
#include "faxrenderer.h"
@@ -32,7 +32,7 @@
//#define KF_DEBUG
-FaxRenderer::FaxRenderer(QWidget* par)
+FaxRenderer::FaxRenderer(TQWidget* par)
: DocumentRenderer(par)
{
#ifdef KF_DEBUG
@@ -81,11 +81,11 @@ void FaxRenderer::drawPage(double resolution, RenderedDocumentPage* page)
return;
}
- QImage img = fax.page(page->getPageNumber() - 1);
+ TQImage img = fax.page(page->getPageNumber() - 1);
SimplePageSize psize = pageSizes[page->getPageNumber() - 1];
if (psize.isValid()) {
- QPainter *foreGroundPaint = page->getPainter();
+ TQPainter *foreGroundPaint = page->getPainter();
if (foreGroundPaint != 0) {
// Compute an image for the page.
@@ -113,7 +113,7 @@ void FaxRenderer::drawPage(double resolution, RenderedDocumentPage* page)
}
-bool FaxRenderer::setFile(const QString &fname, const KURL &)
+bool FaxRenderer::setFile(const TQString &fname, const KURL &)
{
#ifdef KF_DEBUG
kdDebug() << "FaxRenderer::setFile(" << fname << ") called" << endl;
@@ -132,8 +132,8 @@ bool FaxRenderer::setFile(const QString &fname, const KURL &)
// Paranoid saftey checks: make sure the file actually exists, and
// that it is a file, not a directory. Otherwise, show an error
// message and exit..
- QFileInfo fi(fname);
- QString filename = fi.absFilePath();
+ TQFileInfo fi(fname);
+ TQString filename = fi.absFilePath();
if (!fi.exists() || fi.isDir()) {
KMessageBox::error( parentWidget,
i18n("<qt><strong>File error.</strong> The specified file '%1' does not exist.</qt>").arg(filename),
@@ -179,8 +179,8 @@ bool FaxRenderer::setFile(const QString &fname, const KURL &)
if (numPages != 0) {
for(Q_UINT16 pg=0; pg < numPages; pg++) {
- QSize pageSize = fax.page_size(pg);
- QPoint dpi = fax.page_dpi(pg);
+ TQSize pageSize = fax.page_size(pg);
+ TQPoint dpi = fax.page_dpi(pg);
double dpix = dpi.x();
double dpiy = dpi.y();
diff --git a/kfaxview/faxrenderer.h b/kfaxview/faxrenderer.h
index d2b37657..e83f6ff4 100644
--- a/kfaxview/faxrenderer.h
+++ b/kfaxview/faxrenderer.h
@@ -46,7 +46,7 @@ public:
This constructor simply prints a message (if debugging is
enabled) and calls the default constructor.
*/
- FaxRenderer(QWidget* parent);
+ FaxRenderer(TQWidget* parent);
/** Destructor
@@ -67,7 +67,7 @@ public:
@param fname the name of the file that should be opened.
*/
- virtual bool setFile(const QString& fname, const KURL &);
+ virtual bool setFile(const TQString& fname, const KURL &);
/** Rendering a page
diff --git a/kfaxview/libkfaximage/faxexpand.h b/kfaxview/libkfaximage/faxexpand.h
index 8da4e8bc..736779bd 100644
--- a/kfaxview/libkfaximage/faxexpand.h
+++ b/kfaxview/libkfaximage/faxexpand.h
@@ -24,8 +24,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
#include <sys/types.h>
#include <unistd.h>
-#include <qglobal.h>
-#include <qimage.h>
+#include <tqglobal.h>
+#include <tqimage.h>
#define t32bits Q_UINT32
#define t16bits Q_UINT16
@@ -61,15 +61,15 @@ class pagenode { /* compressed page descriptor */
struct strip *strips; /* array of strips containing fax data in file */
t16bits *data; /* in-memory copy of strip */
size_t length; /* length of data */
- QSize size; /* width & height of page in pixels */
+ TQSize size; /* width & height of page in pixels */
int inverse; /* black <=> white */
int lsbfirst; /* bit order is lsb first */
int type; /* Bernd: tiff vs no tiff*/
int orient; /* orientation - upsidedown, landscape, mirrored */
int vres; /* vertical resolution: 1 = fine */
- QPoint dpi; /* DPI horz/vert */
+ TQPoint dpi; /* DPI horz/vert */
void (*expander)(class pagenode *, drawfunc);
- QImage image;
+ TQImage image;
unsigned int bytes_per_line;
};
diff --git a/kfaxview/libkfaximage/kfaximage.cpp b/kfaxview/libkfaximage/kfaximage.cpp
index 28744923..c0efb624 100644
--- a/kfaxview/libkfaximage/kfaximage.cpp
+++ b/kfaxview/libkfaximage/kfaximage.cpp
@@ -24,8 +24,8 @@
#include <stdlib.h>
-#include <qimage.h>
-#include <qfile.h>
+#include <tqimage.h>
+#include <tqfile.h>
#include <kglobal.h>
#include <klocale.h>
@@ -38,22 +38,22 @@ 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 QString &filename, QObject *parent, const char *name )
- : QObject(parent,name)
+KFaxImage::KFaxImage( const TQString &filename, TQObject *parent, const char *name )
+ : TQObject(parent,name)
{
- KGlobal::locale()->insertCatalogue( QString::fromLatin1("libkfaximage") );
+ KGlobal::locale()->insertCatalogue( TQString::fromLatin1("libkfaximage") );
loadImage(filename);
}
KFaxImage::~KFaxImage()
{ }
-bool KFaxImage::loadImage( const QString &filename )
+bool KFaxImage::loadImage( const TQString &filename )
{
reset();
m_filename = filename;
- m_errorString = QString::null;
+ m_errorString = TQString::null;
if (m_filename.isEmpty())
return false;
@@ -74,33 +74,33 @@ void KFaxImage::reset()
// they may be needed by calling application
}
-QImage KFaxImage::page( unsigned int pageNr )
+TQImage KFaxImage::page( unsigned int pageNr )
{
if (pageNr >= numPages()) {
kdDebug() << "KFaxImage::page() called with invalid page number\n";
- return QImage();
+ return TQImage();
}
pagenode *pn = m_pagenodes.at(pageNr);
GetImage(pn);
return pn->image;
}
-QPoint KFaxImage::page_dpi( unsigned int pageNr )
+TQPoint KFaxImage::page_dpi( unsigned int pageNr )
{
if (pageNr >= numPages()) {
kdDebug() << "KFaxImage::page_dpi() called with invalid page number\n";
- return QPoint(0,0);
+ return TQPoint(0,0);
}
pagenode *pn = m_pagenodes.at(pageNr);
GetImage(pn);
return pn->dpi;
}
-QSize KFaxImage::page_size( unsigned int pageNr )
+TQSize KFaxImage::page_size( unsigned int pageNr )
{
if (pageNr >= numPages()) {
kdDebug() << "KFaxImage::page_size() called with invalid page number\n";
- return QSize(0,0);
+ return TQSize(0,0);
}
pagenode *pn = m_pagenodes.at(pageNr);
GetImage(pn);
@@ -115,7 +115,7 @@ pagenode *KFaxImage::AppendImageNode(int type)
pn->type = type;
pn->expander = g31expand;
pn->strips = NULL;
- pn->size = QSize(1728,2339);
+ pn->size = TQSize(1728,2339);
pn->vres = -1;
pn->dpi = KFAX_DPI_FINE;
m_pagenodes.append(pn);
@@ -125,7 +125,7 @@ pagenode *KFaxImage::AppendImageNode(int type)
bool KFaxImage::NewImage(pagenode *pn, int w, int h)
{
- pn->image = QImage( w, h, 1, 2, QImage::systemByteOrder() );
+ 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();
@@ -137,12 +137,12 @@ bool KFaxImage::NewImage(pagenode *pn, int w, int h)
void KFaxImage::FreeImage(pagenode *pn)
{
- pn->image = QImage();
+ pn->image = TQImage();
pn->data = NULL;
pn->bytes_per_line = 0;
}
-void KFaxImage::kfaxerror(const QString& error)
+void KFaxImage::kfaxerror(const TQString& error)
{
m_errorString = error;
kdError() << "kfaxerror: " << error << endl;
@@ -155,22 +155,22 @@ KFaxImage::notefile(int type)
{
pagenode *newnode = new pagenode();
newnode->type = type;
- newnode->size = QSize(1728,0);
+ newnode->size = TQSize(1728,0);
return newnode;
}
static t32bits
-get4(unsigned char *p, QImage::Endian endian)
+get4(unsigned char *p, TQImage::Endian endian)
{
- return (endian == QImage::BigEndian)
+ return (endian == TQImage::BigEndian)
? (p[0]<<24)|(p[1]<<16)|(p[2]<<8)|p[3] :
p[0]|(p[1]<<8)|(p[2]<<16)|(p[3]<<24);
}
static int
-get2(unsigned char *p, QImage::Endian endian)
+get2(unsigned char *p, TQImage::Endian endian)
{
- return (endian == QImage::BigEndian) ? (p[0]<<8)|p[1] : p[0]|(p[1]<<8);
+ return (endian == TQImage::BigEndian) ? (p[0]<<8)|p[1] : p[0]|(p[1]<<8);
}
/* generate pagenodes for the images in a tiff file */
@@ -179,12 +179,12 @@ KFaxImage::notetiff()
{
#define SC(x) (char *)(x)
unsigned char header[8];
- QImage::Endian endian;
+ TQImage::Endian endian;
t32bits IFDoff;
pagenode *pn = NULL;
- QString str;
+ TQString str;
- QFile file(filename());
+ TQFile file(filename());
if (!file.open(IO_ReadOnly)) {
kfaxerror(i18n("Unable to open file for reading."));
return 0;
@@ -195,9 +195,9 @@ KFaxImage::notetiff()
return 0;
}
if (memcmp(header, &littleTIFF, 4) == 0)
- endian = QImage::LittleEndian;
+ endian = TQImage::LittleEndian;
else if (memcmp(header, &bigTIFF, 4) == 0)
- endian = QImage::BigEndian;
+ endian = TQImage::BigEndian;
else {
maybe_RAW_FAX:
kfaxerror(i18n("This is not a TIFF FAX file."));
@@ -381,7 +381,7 @@ KFaxImage::notetiff()
pn->nstrips = nstrips;
pn->rowsperstrip = nstrips > 1 ? rowsperstrip : iheight;
pn->strips = strips;
- pn->size = QSize(iwidth,iheight);
+ pn->size = TQSize(iwidth,iheight);
pn->inverse = inverse;
pn->lsbfirst = lsbfirst;
pn->orient = orient;
@@ -454,7 +454,7 @@ KFaxImage::getstrip(pagenode *pn, int strip)
#define ShortOrder so.b[1]
so.s = 1; /* XXX */
- QFile file(filename());
+ TQFile file(filename());
if (!file.open(IO_ReadOnly)) {
badfile(pn);
return NULL;
diff --git a/kfaxview/libkfaximage/kfaximage.h b/kfaxview/libkfaximage/kfaximage.h
index 0ed2db90..c0d61cb6 100644
--- a/kfaxview/libkfaximage/kfaximage.h
+++ b/kfaxview/libkfaximage/kfaximage.h
@@ -20,10 +20,10 @@
#ifndef _LIBKFAXIMAGE_H_
#define _LIBKFAXIMAGE_H_
-#include <qobject.h>
-#include <qstring.h>
-#include <qimage.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqimage.h>
+#include <tqptrlist.h>
#include <kdelibs_export.h>
class pagenode;
@@ -45,9 +45,9 @@ class pagenode;
* 406 dpi x 392 lpi
*/
-#define KFAX_DPI_STANDARD QPoint(203,98)
-#define KFAX_DPI_FINE QPoint(203,196)
-#define KFAX_DPI_SUPERFINE QPoint(406,392)
+#define KFAX_DPI_STANDARD TQPoint(203,98)
+#define KFAX_DPI_FINE TQPoint(203,196)
+#define KFAX_DPI_SUPERFINE TQPoint(406,392)
class KDE_EXPORT KFaxImage : public QObject
@@ -63,7 +63,7 @@ public:
* @see: numPages
*/
- KFaxImage( const QString &filename = QString::null, QObject *parent = 0, const char *name = 0 );
+ KFaxImage( const TQString &filename = TQString::null, TQObject *parent = 0, const char *name = 0 );
/**
* Destructor
@@ -81,14 +81,14 @@ public:
* @see: errorString
*/
- bool loadImage( const QString &filename );
+ bool loadImage( const TQString &filename );
/**
* returns currently loaded image file name.
* @return FAX filename
*/
- QString filename() { return m_filename; };
+ TQString filename() { return m_filename; };
/**
* returns number of pages which are stored in the FAX file
@@ -98,34 +98,34 @@ public:
unsigned int numPages() const { return m_pagenodes.count(); };
/**
- * returns a QImage which holds the contents of page pageNr
+ * returns a TQImage which holds the contents of page pageNr
* @param pageNr: page number (starting with 0)
- * @return QImage of the page pageNr
+ * @return TQImage of the page pageNr
*/
- QImage page( unsigned int pageNr );
+ TQImage page( unsigned int pageNr );
/**
* returns the DPI (dots per inch) of page pageNr
* @param pageNr: page number (starting with 0)
- * @return a QPoint value with the DPIs in X- and Y-direction
+ * @return a TQPoint value with the DPIs in X- and Y-direction
*/
- QPoint page_dpi( unsigned int pageNr );
+ TQPoint page_dpi( unsigned int pageNr );
/**
* returns the physical pixels of page pageNr
* @param pageNr: page number (starting with 0)
- * @return a QSize value with the width and height of the image
+ * @return a TQSize value with the width and height of the image
*/
- QSize page_size( unsigned int pageNr );
+ TQSize page_size( unsigned int pageNr );
/**
* @return a user-visible, translated error string
*/
- const QString errorString() const { return m_errorString; };
+ const TQString errorString() const { return m_errorString; };
@@ -135,10 +135,10 @@ public:
* private member variables
*/
- QString m_filename;
- QString m_errorString;
+ TQString m_filename;
+ TQString m_errorString;
- typedef QPtrList<pagenode> t_PageNodeList;
+ typedef TQPtrList<pagenode> t_PageNodeList;
t_PageNodeList m_pagenodes;
/**
@@ -146,7 +146,7 @@ public:
*/
void reset();
- void kfaxerror(const QString& error);
+ void kfaxerror(const TQString& error);
pagenode *AppendImageNode(int type);
bool NewImage(pagenode *pn, int w, int h);
void FreeImage(pagenode *pn);
diff --git a/kfaxview/main.cpp b/kfaxview/main.cpp
index 8e967a96..05692315 100644
--- a/kfaxview/main.cpp
+++ b/kfaxview/main.cpp
@@ -8,7 +8,7 @@
#include <kurl.h>
#include <klocale.h>
#include <kaboutdata.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <stdlib.h>
@@ -97,22 +97,22 @@ int main(int argc, char** argv)
if (!url.isValid())
{
- kdError(4300) << QString(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.")).arg(args->arg(0)) << endl;
return -1;
}
if (!url.isLocalFile())
{
- kdError(4300) << QString(I18N_NOOP("The URL %1 does not point to a local file. You can only specify local "
+ 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;
return -1;
}
- QString qualPath = QFileInfo(url.path()).absFilePath();
+ TQString qualPath = TQFileInfo(url.path()).absFilePath();
app.dcopClient()->attach();
// We need to register as "kviewshell" to stay compatible with existing DCOP-skripts.
- QCString id = app.dcopClient()->registerAs("unique-kviewshell");
+ TQCString id = app.dcopClient()->registerAs("unique-kviewshell");
if (id.isNull())
kdError(4300) << "There was an error using dcopClient()->registerAs()." << endl;
QCStringList apps = app.dcopClient()->registeredApplications();
@@ -120,22 +120,22 @@ int main(int argc, char** argv)
{
if ((*it).find("kviewshell") == 0)
{
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
bool result;
arg << qualPath.stripWhiteSpace();
- if (!app.dcopClient()->call( *it, "kmultipage", "is_file_loaded(QString)", data, replyType, replyData))
+ if (!app.dcopClient()->call( *it, "kmultipage", "is_file_loaded(TQString)", data, replyType, replyData))
kdError(4300) << "There was an error using DCOP." << endl;
else
{
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
if (replyType == "bool")
{
reply >> result;
if (result == true)
{
- if (app.dcopClient()->send( *it, "kmultipage", "jumpToReference(QString)", url.ref()) == true)
+ if (app.dcopClient()->send( *it, "kmultipage", "jumpToReference(TQString)", url.ref()) == true)
{
app.dcopClient()->detach();
return 0;
@@ -163,7 +163,7 @@ int main(int argc, char** argv)
// If the url doesn't already has a reference part, add the
// argument of --goto to the url as reference, to make the
// KViewShell jump to this page.
- QString reference = args->getOption("goto");
+ TQString reference = args->getOption("goto");
url.setHTMLRef(reference);
}
shell->openURL(url);
diff --git a/kfile-plugins/bmp/kfile_bmp.cpp b/kfile-plugins/bmp/kfile_bmp.cpp
index b9d6a7ad..790161a6 100644
--- a/kfile-plugins/bmp/kfile_bmp.cpp
+++ b/kfile-plugins/bmp/kfile_bmp.cpp
@@ -26,11 +26,11 @@
#include <kstringvalidator.h>
#include <kdebug.h>
-#include <qdict.h>
-#include <qvalidator.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qdatetime.h>
+#include <tqdict.h>
+#include <tqvalidator.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
#if !defined(__osf__)
#include <inttypes.h>
@@ -43,8 +43,8 @@ typedef KGenericFactory<KBmpPlugin> BmpFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_bmp, BmpFactory( "kfile_bmp" ))
-KBmpPlugin::KBmpPlugin(QObject *parent, const char *name,
- const QStringList &args)
+KBmpPlugin::KBmpPlugin(TQObject *parent, const char *name,
+ const TQStringList &args)
: KFilePlugin(parent, name, args)
{
@@ -56,16 +56,16 @@ KBmpPlugin::KBmpPlugin(QObject *parent, const char *name,
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Type", i18n("Type"), QVariant::String);
+ item = addItemInfo(group, "Type", i18n("Type"), TQVariant::String);
- item = addItemInfo(group, "Dimensions", i18n("Dimensions"), QVariant::Size);
+ item = addItemInfo(group, "Dimensions", i18n("Dimensions"), TQVariant::Size);
setHint( item, KFileMimeTypeInfo::Size );
setUnit(item, KFileMimeTypeInfo::Pixels);
- item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), QVariant::Int);
+ item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), TQVariant::Int);
setUnit(item, KFileMimeTypeInfo::BitsPerPixel);
- item = addItemInfo(group, "Compression", i18n("Compression"), QVariant::String);
+ item = addItemInfo(group, "Compression", i18n("Compression"), TQVariant::String);
}
@@ -79,18 +79,18 @@ bool KBmpPlugin::readInfo( KFileMetaInfo& info, uint what)
const char * bmptype_ic = "IC";
const char * bmptype_pt = "PT";
- QFile file(info.path());
+ TQFile file(info.path());
if (!file.open(IO_ReadOnly))
{
- kdDebug(7034) << "Couldn't open " << QFile::encodeName(info.path()) << endl;
+ kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl;
return false;
}
- QDataStream dstream(&file);
+ TQDataStream dstream(&file);
// BMP files are little-endian
- dstream.setByteOrder(QDataStream::LittleEndian);
+ dstream.setByteOrder(TQDataStream::LittleEndian);
// create this now because we output image type early on
KFileMetaInfoGroup group = appendGroup(info, "Technical");
@@ -148,7 +148,7 @@ bool KBmpPlugin::readInfo( KFileMetaInfo& info, uint what)
// output the useful bits
- appendItem(group, "Dimensions", QSize(bmpi_width, bmpi_height));
+ appendItem(group, "Dimensions", TQSize(bmpi_width, bmpi_height));
appendItem(group, "BitDepth", bmpi_bitcount);
switch (bmpi_compression) {
diff --git a/kfile-plugins/bmp/kfile_bmp.h b/kfile-plugins/bmp/kfile_bmp.h
index b72ee16d..f34e3e86 100644
--- a/kfile-plugins/bmp/kfile_bmp.h
+++ b/kfile-plugins/bmp/kfile_bmp.h
@@ -22,14 +22,14 @@
#include <kfilemetainfo.h>
-class QStringList;
+class TQStringList;
class KBmpPlugin: public KFilePlugin
{
Q_OBJECT
public:
- KBmpPlugin( QObject *parent, const char *name, const QStringList& args );
+ KBmpPlugin( TQObject *parent, const char *name, const TQStringList& args );
virtual bool readInfo( KFileMetaInfo& info, uint what);
};
diff --git a/kfile-plugins/dds/kfile_dds.cpp b/kfile-plugins/dds/kfile_dds.cpp
index dd7f8f1e..f8c3346e 100644
--- a/kfile-plugins/dds/kfile_dds.cpp
+++ b/kfile-plugins/dds/kfile_dds.cpp
@@ -26,11 +26,11 @@
#include <kstringvalidator.h>
#include <kdebug.h>
-#include <qdict.h>
-#include <qvalidator.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qdatetime.h>
+#include <tqdict.h>
+#include <tqvalidator.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
typedef KGenericFactory<KDdsPlugin> DdsFactory;
@@ -96,7 +96,7 @@ namespace { // Private.
uint amask;
};
- QDataStream & operator>> ( QDataStream & s, DDSPixelFormat & pf )
+ TQDataStream & operator>> ( TQDataStream & s, DDSPixelFormat & pf )
{
s >> pf.size;
s >> pf.flags;
@@ -116,7 +116,7 @@ namespace { // Private.
uint caps4;
};
- QDataStream & operator>> ( QDataStream & s, DDSCaps & caps )
+ TQDataStream & operator>> ( TQDataStream & s, DDSCaps & caps )
{
s >> caps.caps1;
s >> caps.caps2;
@@ -139,7 +139,7 @@ namespace { // Private.
uint notused;
};
- QDataStream & operator>> ( QDataStream & s, DDSHeader & header )
+ TQDataStream & operator>> ( TQDataStream & s, DDSHeader & header )
{
s >> header.size;
s >> header.flags;
@@ -182,7 +182,7 @@ namespace { // Private.
K_EXPORT_COMPONENT_FACTORY(kfile_dds, DdsFactory( "kfile_dds" ))
// Constructor, init mime type info.
-KDdsPlugin::KDdsPlugin(QObject *parent, const char *name, const QStringList &args) :
+KDdsPlugin::KDdsPlugin(TQObject *parent, const char *name, const TQStringList &args) :
KFilePlugin(parent, name, args)
{
KFileMimeTypeInfo * info = addMimeTypeInfo( "image/x-dds" );
@@ -193,41 +193,41 @@ KDdsPlugin::KDdsPlugin(QObject *parent, const char *name, const QStringList &arg
KFileMimeTypeInfo::ItemInfo * item;
- item = addItemInfo(group, "Dimensions", i18n("Dimensions"), QVariant::Size);
+ item = addItemInfo(group, "Dimensions", i18n("Dimensions"), TQVariant::Size);
setHint(item, KFileMimeTypeInfo::Size);
setUnit(item, KFileMimeTypeInfo::Pixels);
- item = addItemInfo(group, "Depth", i18n("Depth"), QVariant::Int);
+ item = addItemInfo(group, "Depth", i18n("Depth"), TQVariant::Int);
setUnit(item, KFileMimeTypeInfo::Pixels);
- item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), QVariant::Int);
+ item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), TQVariant::Int);
setUnit(item, KFileMimeTypeInfo::BitsPerPixel);
- addItemInfo(group, "MipmapCount", i18n("Mipmap Count"), QVariant::Int);
+ addItemInfo(group, "MipmapCount", i18n("Mipmap Count"), TQVariant::Int);
- addItemInfo(group, "Type", i18n("Type"), QVariant::String);
- addItemInfo(group, "ColorMode", i18n("Color Mode"), QVariant::String);
- addItemInfo(group, "Compression", i18n("Compression"), QVariant::String);
+ addItemInfo(group, "Type", i18n("Type"), TQVariant::String);
+ addItemInfo(group, "ColorMode", i18n("Color Mode"), TQVariant::String);
+ addItemInfo(group, "Compression", i18n("Compression"), TQVariant::String);
}
// Read mime type info.
bool KDdsPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
{
- QFile file(info.path());
+ TQFile file(info.path());
if (!file.open(IO_ReadOnly)) {
- kdDebug(7034) << "Couldn't open " << QFile::encodeName(info.path()) << endl;
+ kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl;
return false;
}
- QDataStream s(&file);
- s.setByteOrder(QDataStream::LittleEndian);
+ TQDataStream s(&file);
+ s.setByteOrder(TQDataStream::LittleEndian);
// Validate header.
uint fourcc;
s >> fourcc;
if( fourcc != FOURCC_DDS ) {
- kdDebug(7034) << QFile::encodeName(info.path()) << " is not a DDS file." << endl;
+ kdDebug(7034) << TQFile::encodeName(info.path()) << " is not a DDS file." << endl;
return false;
}
@@ -237,13 +237,13 @@ bool KDdsPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
// Check image file format.
if( s.atEnd() || !IsValid( header ) ) {
- kdDebug(7034) << QFile::encodeName(info.path()) << " is not a valid DDS file." << endl;
+ kdDebug(7034) << TQFile::encodeName(info.path()) << " is not a valid DDS file." << endl;
return false;
}
// Set file info.
KFileMetaInfoGroup group = appendGroup(info, "Technical");
- appendItem(group, "Dimensions", QSize(header.width, header.height));
+ appendItem(group, "Dimensions", TQSize(header.width, header.height));
appendItem(group, "MipmapCount", header.mipmapcount);
// Set file type.
diff --git a/kfile-plugins/dds/kfile_dds.h b/kfile-plugins/dds/kfile_dds.h
index 342581bb..63dd156b 100644
--- a/kfile-plugins/dds/kfile_dds.h
+++ b/kfile-plugins/dds/kfile_dds.h
@@ -22,14 +22,14 @@
#include <kfilemetainfo.h>
-class QStringList;
+class TQStringList;
class KDdsPlugin: public KFilePlugin
{
Q_OBJECT
public:
- KDdsPlugin( QObject *parent, const char *name, const QStringList& args );
+ KDdsPlugin( TQObject *parent, 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 4140b98b..e8fb7af7 100644
--- a/kfile-plugins/dvi/kfile_dvi.cpp
+++ b/kfile-plugins/dvi/kfile_dvi.cpp
@@ -27,19 +27,19 @@
#include <klocale.h>
#include <kfilemetainfo.h>
-#include <qstring.h>
-#include <qvariant.h>
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
+#include <tqstring.h>
+#include <tqvariant.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
// preprocessormacro K_EXPORT_COMPONENT_FACTORY loads shared library 'kfile_dvi.so' dynamic if necessary
typedef KGenericFactory<KDviPlugin> DviFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_dvi, DviFactory("kfile_dvi"))
-KDviPlugin::KDviPlugin (QObject * parent, const char * name, const QStringList & preferredItems)
+KDviPlugin::KDviPlugin (TQObject * parent, const char * name, const TQStringList & preferredItems)
: KFilePlugin(parent, name, preferredItems)
{
kdDebug(7034) << "dvi plugin" << endl;
@@ -50,9 +50,9 @@ KDviPlugin::KDviPlugin (QObject * parent, const char * name, const QStringList &
KFileMimeTypeInfo::GroupInfo * group = this->addGroupInfo(info, "General", "General");
- this->addItemInfo(group, "3_Created", i18n("Created"), QVariant::String);
- this->addItemInfo(group, "6_Comment", i18n("Comment"), QVariant::String);
- this->addItemInfo(group, "7_Pages", i18n("Pages"), QVariant::UInt);
+ this->addItemInfo(group, "3_Created", i18n("Created"), TQVariant::String);
+ this->addItemInfo(group, "6_Comment", i18n("Comment"), TQVariant::String);
+ this->addItemInfo(group, "7_Pages", i18n("Pages"), TQVariant::UInt);
}
bool KDviPlugin::readInfo (KFileMetaInfo & info, uint /* what (unused in this plugin) */)
@@ -60,11 +60,11 @@ bool KDviPlugin::readInfo (KFileMetaInfo & info, uint /* what (unused in this pl
if ( info.path().isEmpty() )
return false;
KFileMetaInfoGroup GeneralGroup = appendGroup(info, "General");
- QFile f(info.path());
- QFileInfo f_info;
+ TQFile f(info.path());
+ TQFileInfo f_info;
Q_UINT16 bytes_to_read;
Q_UINT8 comment_length;
- QString comment;
+ 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;
@@ -134,14 +134,14 @@ bool KDviPlugin::readInfo (KFileMetaInfo & info, uint /* what (unused in this pl
pages = buffer[0];
pages = (pages << 8) | buffer[1];
- appendItem(GeneralGroup, "7_Pages", QVariant(pages) );
+ appendItem(GeneralGroup, "7_Pages", TQVariant(pages) );
f.close();
// now get and set up some basic informations about the file (same informations would be displayed, if there is no dvi-plugin)
- appendItem(GeneralGroup, "1_Type", QVariant( i18n("TeX Device Independent file") ) ); // set up type of file
+ appendItem(GeneralGroup, "1_Type", TQVariant( i18n("TeX Device Independent file") ) ); // set up type of file
- appendItem(GeneralGroup, "4_Modified", QVariant(f_info.lastModified().toString("yyyy-MM-dd hh:mm")) );
+ appendItem(GeneralGroup, "4_Modified", TQVariant(f_info.lastModified().toString("yyyy-MM-dd hh:mm")) );
// ISO 8601 date format (without seconds)
return true;
diff --git a/kfile-plugins/dvi/kfile_dvi.h b/kfile-plugins/dvi/kfile_dvi.h
index 66e7b218..60326144 100644
--- a/kfile-plugins/dvi/kfile_dvi.h
+++ b/kfile-plugins/dvi/kfile_dvi.h
@@ -23,13 +23,13 @@
#include <kfilemetainfo.h>
-class QStringList;
+class TQStringList;
class KDviPlugin : public KFilePlugin
{
Q_OBJECT
public:
- KDviPlugin ( QObject * parent, const char * name, const QStringList & preferredItems );
+ KDviPlugin ( TQObject * parent, 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 2e995fc6..e2ae9a06 100644
--- a/kfile-plugins/exr/kfile_exr.cpp
+++ b/kfile-plugins/exr/kfile_exr.cpp
@@ -45,12 +45,12 @@
#include <kgenericfactory.h>
#include <kdebug.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qdatetime.h>
-#include <qdict.h>
-#include <qvalidator.h>
-#include <qimage.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
+#include <tqdict.h>
+#include <tqvalidator.h>
+#include <tqimage.h>
#include "kfile_exr.h"
@@ -60,8 +60,8 @@ typedef KGenericFactory<KExrPlugin> ExrFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_exr, ExrFactory("kfile_exr"))
-KExrPlugin::KExrPlugin(QObject *parent, const char *name,
- const QStringList &args)
+KExrPlugin::KExrPlugin(TQObject *parent, const char *name,
+ const TQStringList &args)
: KFilePlugin(parent, name, args)
{
// set up our mime type
@@ -72,92 +72,92 @@ KExrPlugin::KExrPlugin(QObject *parent, const char *name,
// info group
group = addGroupInfo( info, "Info", i18n("Information") );
- addItemInfo( group, "Version", i18n("Format Version"), QVariant::Int );
- addItemInfo( group, "Tiled image", i18n("Tiled Image"), QVariant::String );
- item = addItemInfo( group, "Dimensions", i18n("Dimensions"), QVariant::Size );
+ addItemInfo( group, "Version", i18n("Format Version"), TQVariant::Int );
+ addItemInfo( group, "Tiled image", i18n("Tiled Image"), TQVariant::String );
+ item = addItemInfo( group, "Dimensions", i18n("Dimensions"), TQVariant::Size );
setHint( item, KFileMimeTypeInfo::Size );
setUnit( item, KFileMimeTypeInfo::Pixels );
item = addItemInfo( group, "ThumbnailDimensions",
- i18n("Thumbnail Dimensions"), QVariant::Size );
+ i18n("Thumbnail Dimensions"), TQVariant::Size );
setHint( item, KFileMimeTypeInfo::Size );
setUnit( item, KFileMimeTypeInfo::Pixels );
- addItemInfo( group, "Comment", i18n("Comment"), QVariant::String );
- item = addItemInfo( group, "Thumbnail", i18n("Thumbnail"), QVariant::Image );
+ addItemInfo( group, "Comment", i18n("Comment"), TQVariant::String );
+ item = addItemInfo( group, "Thumbnail", i18n("Thumbnail"), TQVariant::Image );
setHint( item, KFileMimeTypeInfo::Thumbnail );
// standard attributes group
group = addGroupInfo( info, "Standard", i18n("Standard Attributes") );
- addItemInfo( group, "Owner", i18n("Owner"), QVariant::String );
- addItemInfo( group, "Comments", i18n("Comments"), QVariant::String );
- addItemInfo( group, "Capture Date", i18n("Capture Date"), QVariant::String );
- item = addItemInfo( group, "UTC Offset", i18n("UTC Offset"), QVariant::String );
- item = addItemInfo( group, "Exposure time", i18n("Exposure Time"), QVariant::Double);
+ addItemInfo( group, "Owner", i18n("Owner"), TQVariant::String );
+ addItemInfo( group, "Comments", i18n("Comments"), TQVariant::String );
+ addItemInfo( group, "Capture Date", i18n("Capture Date"), TQVariant::String );
+ item = addItemInfo( group, "UTC Offset", i18n("UTC Offset"), TQVariant::String );
+ item = addItemInfo( group, "Exposure time", i18n("Exposure Time"), TQVariant::Double);
setUnit( item, KFileMimeTypeInfo::Seconds );
- item = addItemInfo( group, "Focus", i18n("Focus"), QVariant::Double);
+ item = addItemInfo( group, "Focus", i18n("Focus"), TQVariant::Double);
setSuffix( item, i18n("Metres", "m") );
- item = addItemInfo( group, "X Density", i18n("X Density"), QVariant::Double);
+ item = addItemInfo( group, "X Density", i18n("X Density"), TQVariant::Double);
setSuffix( item, i18n("Pixels Per Inch", " ppi") );
- item = addItemInfo( group, "White luminance", i18n("White Luminance"), QVariant::Double);
+ item = addItemInfo( group, "White luminance", i18n("White Luminance"), TQVariant::Double);
setSuffix( item, i18n("Candelas per square metre", " Nits") );
- addItemInfo( group, "Longitude", i18n("Longitude"), QVariant::String );
- addItemInfo( group, "Latitude", i18n("Latitude"), QVariant::String );
- item = addItemInfo( group, "Altitude", i18n("Altitude"), QVariant::String );
+ addItemInfo( group, "Longitude", i18n("Longitude"), TQVariant::String );
+ addItemInfo( group, "Latitude", i18n("Latitude"), TQVariant::String );
+ item = addItemInfo( group, "Altitude", i18n("Altitude"), TQVariant::String );
setSuffix( item, i18n("Metres", "m") );
- addItemInfo( group, "ISO speed", i18n("ISO Speed"), QVariant::Double );
- addItemInfo( group, "Aperture", i18n("Aperture"), QVariant::Double );
+ addItemInfo( group, "ISO speed", i18n("ISO Speed"), TQVariant::Double );
+ addItemInfo( group, "Aperture", i18n("Aperture"), TQVariant::Double );
// channel group
group = addGroupInfo( info, "Channel", i18n("Channels") );
- addItemInfo( group, "A", i18n("A"), QVariant::String );
- addItemInfo( group, "R", i18n("R"), QVariant::String );
- addItemInfo( group, "G", i18n("G"), QVariant::String );
- addItemInfo( group, "B", i18n("B"), QVariant::String );
- addItemInfo( group, "Z", i18n("Z"), QVariant::String );
- addItemInfo( group, "NX", i18n("NX"), QVariant::String );
- addItemInfo( group, "NY", i18n("NY"), QVariant::String );
- addItemInfo( group, "NZ", i18n("NZ"), QVariant::String );
- addItemInfo( group, "R", i18n("R"), QVariant::String );
- addItemInfo( group, "U", i18n("U"), QVariant::String );
- addItemInfo( group, "V", i18n("V"), QVariant::String );
- addItemInfo( group, "materialID", i18n("materialID"), QVariant::String );
- addItemInfo( group, "objectID", i18n("objectID"), QVariant::String );
- addItemInfo( group, "renderID", i18n("renderID"), QVariant::String );
- addItemInfo( group, "pixelCover", i18n("pixelCover"), QVariant::String );
- addItemInfo( group, "velX", i18n("velX"), QVariant::String );
- addItemInfo( group, "velY", i18n("velY"), QVariant::String );
- addItemInfo( group, "packedRGBA", i18n("packedRGBA"), QVariant::String );
+ addItemInfo( group, "A", i18n("A"), TQVariant::String );
+ addItemInfo( group, "R", i18n("R"), TQVariant::String );
+ addItemInfo( group, "G", i18n("G"), TQVariant::String );
+ addItemInfo( group, "B", i18n("B"), TQVariant::String );
+ addItemInfo( group, "Z", i18n("Z"), TQVariant::String );
+ addItemInfo( group, "NX", i18n("NX"), TQVariant::String );
+ addItemInfo( group, "NY", i18n("NY"), TQVariant::String );
+ addItemInfo( group, "NZ", i18n("NZ"), TQVariant::String );
+ addItemInfo( group, "R", i18n("R"), TQVariant::String );
+ addItemInfo( group, "U", i18n("U"), TQVariant::String );
+ addItemInfo( group, "V", i18n("V"), TQVariant::String );
+ addItemInfo( group, "materialID", i18n("materialID"), TQVariant::String );
+ addItemInfo( group, "objectID", i18n("objectID"), TQVariant::String );
+ addItemInfo( group, "renderID", i18n("renderID"), TQVariant::String );
+ addItemInfo( group, "pixelCover", i18n("pixelCover"), TQVariant::String );
+ addItemInfo( group, "velX", i18n("velX"), TQVariant::String );
+ addItemInfo( group, "velY", i18n("velY"), TQVariant::String );
+ addItemInfo( group, "packedRGBA", i18n("packedRGBA"), TQVariant::String );
// technical group
group = addGroupInfo( info, "Technical", i18n("Technical Details") );
- addItemInfo( group, "Compression", i18n("Compression"), QVariant::String );
- addItemInfo( group, "Line Order", i18n("Line Order"), QVariant::String );
+ addItemInfo( group, "Compression", i18n("Compression"), TQVariant::String );
+ addItemInfo( group, "Line Order", i18n("Line Order"), TQVariant::String );
// 3dsMax group
// This supports a special plugin for 3D Studio Max
group = addGroupInfo( info, "3dsMax", i18n("3dsMax Details") );
- addItemInfo( group, "Local time", i18n("Local Time"), QVariant::String );
- addItemInfo( group, "System time", i18n("System Time"), QVariant::String );
- addItemInfo( group, "Plugin version", i18n("Plugin Version"), QVariant::String );
- addItemInfo( group, "EXR version", i18n("EXR Version"), QVariant::String );
- addItemInfo( group, "Computer name", i18n("Computer Name"), QVariant::String );
+ addItemInfo( group, "Local time", i18n("Local Time"), TQVariant::String );
+ addItemInfo( group, "System time", i18n("System Time"), TQVariant::String );
+ addItemInfo( group, "Plugin version", i18n("Plugin Version"), TQVariant::String );
+ addItemInfo( group, "EXR version", i18n("EXR Version"), TQVariant::String );
+ addItemInfo( group, "Computer name", i18n("Computer Name"), TQVariant::String );
}
-QCString doType( PixelType pt )
+TQCString doType( PixelType pt )
{
switch (pt)
{
case UINT:
- return QCString("32-bit unsigned integer");
+ return TQCString("32-bit unsigned integer");
break;
case HALF:
- return QCString("16-bit floating-point");
+ return TQCString("16-bit floating-point");
break;
case FLOAT:
- return QCString("32-bit floating-point");
+ return TQCString("32-bit floating-point");
break;
default:
- return QCString();
+ return TQCString();
break;
}
}
@@ -183,13 +183,13 @@ bool KExrPlugin::readInfo( KFileMetaInfo& info, uint what)
}
Imath::Box2i dw = h.dataWindow();
- appendItem( infogroup, "Dimensions", QSize( (dw.max.x - dw.min.x + 1 ),
+ appendItem( infogroup, "Dimensions", TQSize( (dw.max.x - dw.min.x + 1 ),
(dw.max.y - dw.min.y + 1 ) ) );
if ( h.hasPreviewImage() ) {
const PreviewImage &preview = in.header().previewImage();
- appendItem( infogroup, "ThumbnailDimensions", QSize(preview.width(), preview.height()) );
- QImage qpreview(preview.width(), preview.height(), 32, 0, QImage::BigEndian);
+ appendItem( infogroup, "ThumbnailDimensions", TQSize(preview.width(), preview.height()) );
+ TQImage qpreview(preview.width(), preview.height(), 32, 0, TQImage::BigEndian);
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())];
@@ -202,7 +202,7 @@ bool KExrPlugin::readInfo( KFileMetaInfo& info, uint what)
const StringAttribute *commentSA = h.findTypedAttribute <StringAttribute> ("comment");
if (commentSA) {
std::string commentString = commentSA->value();
- QString qcommentString(commentString.data());
+ TQString qcommentString(commentString.data());
qcommentString.setLength(commentString.size());
appendItem( infogroup, "Comment", qcommentString );
}
@@ -211,19 +211,19 @@ bool KExrPlugin::readInfo( KFileMetaInfo& info, uint what)
// meaningfully represent.
if ( hasComments(h) ) {
std::string commentsString = comments(h);
- QString qcommentsString(commentsString.data());
+ TQString qcommentsString(commentsString.data());
qcommentsString.setLength(commentsString.size());
appendItem( stdgroup, "Comments", qcommentsString );
}
if ( hasOwner(h) ) {
std::string ownerString = owner(h);
- QString qownerString(ownerString.data());
+ TQString qownerString(ownerString.data());
qownerString.setLength(ownerString.size());
appendItem( stdgroup, "Owner", qownerString );
}
if ( hasCapDate(h) ) {
std::string capDateString = capDate(h);
- QString qcapDateString(capDateString.data());
+ TQString qcapDateString(capDateString.data());
qcapDateString.setLength(capDateString.size());
appendItem( stdgroup, "Capture Date", qcapDateString );
}
@@ -235,12 +235,12 @@ bool KExrPlugin::readInfo( KFileMetaInfo& info, uint what)
// This is the 1.6.0 and later version
if ( hasUtcOffset(h) ) {
#endif
- QString UTCOffset;
+ TQString UTCOffset;
if (utcOffset(h)>0.0) {
- UTCOffset.append(QString("%1").arg(utcOffset(h)/3600, 0, 'f', 1));
+ UTCOffset.append(TQString("%1").arg(utcOffset(h)/3600, 0, 'f', 1));
UTCOffset.append(" hours behind UTC");
} else {
- UTCOffset.append(QString("%1").arg(-1.0*utcOffset(h)/3600, 0, 'f', 1));
+ UTCOffset.append(TQString("%1").arg(-1.0*utcOffset(h)/3600, 0, 'f', 1));
UTCOffset.append(" hours ahead of UTC");
}
appendItem( stdgroup, "UTC Offset", UTCOffset);
@@ -262,30 +262,30 @@ bool KExrPlugin::readInfo( KFileMetaInfo& info, uint what)
appendItem( stdgroup, "White luminance", WhiteLuminance );
}
if ( hasLongitude(h) ) {
- QString Longitude;
+ TQString Longitude;
if (longitude(h)<0.0) {
- Longitude.append(QString("%1").arg(-1.0*longitude(h),0,'f',3));
+ Longitude.append(TQString("%1").arg(-1.0*longitude(h),0,'f',3));
Longitude.append(" deg West");
} else {
- Longitude.append(QString("%1").arg(longitude(h),0,'f',3));
+ Longitude.append(TQString("%1").arg(longitude(h),0,'f',3));
Longitude.append(" deg East");
}
appendItem( stdgroup, "Longitude", Longitude);
}
if ( hasLatitude(h) ) {
- QString Latitude;
+ TQString Latitude;
if (latitude(h)<0.0) {
- Latitude.append(QString("%1").arg(-1.0*latitude(h),0,'f',3));
+ Latitude.append(TQString("%1").arg(-1.0*latitude(h),0,'f',3));
Latitude.append(" deg South");
} else {
- Latitude.append(QString("%1").arg(latitude(h),0,'f',3));
+ Latitude.append(TQString("%1").arg(latitude(h),0,'f',3));
Latitude.append(" deg North");
}
appendItem( stdgroup, "Latitude", Latitude );
}
if ( hasAltitude(h) ) {
double Altitude = altitude(h);
- appendItem( stdgroup, "Altitude", QString("%1").arg(Altitude,0,'f',1) );
+ appendItem( stdgroup, "Altitude", TQString("%1").arg(Altitude,0,'f',1) );
}
if ( hasIsoSpeed(h) ) {
double IsoSpeed = isoSpeed(h);
@@ -348,35 +348,35 @@ bool KExrPlugin::readInfo( KFileMetaInfo& info, uint what)
const StringAttribute *ver3DSM = h.findTypedAttribute <StringAttribute> ("version3dsMax");
if (ver3DSM) {
std::string ver3DSMstring = ver3DSM->value();
- QString qver3DSMstring(ver3DSMstring.data());
+ TQString qver3DSMstring(ver3DSMstring.data());
qver3DSMstring.setLength(ver3DSMstring.size());
appendItem( threedsmaxgroup, "Plugin version", qver3DSMstring );
}
const StringAttribute *verEXR = h.findTypedAttribute <StringAttribute> ("versionEXR");
if (verEXR) {
std::string verEXRstring = verEXR->value();
- QString qverEXRstring(verEXRstring.data());
+ TQString qverEXRstring(verEXRstring.data());
qverEXRstring.setLength(verEXRstring.size());
- appendItem( threedsmaxgroup, "EXR version", QString( verEXRstring.data() ) );
+ appendItem( threedsmaxgroup, "EXR version", TQString( verEXRstring.data() ) );
}
const StringAttribute *localTime = h.findTypedAttribute <StringAttribute> ("localTime");
if (localTime) {
std::string localTimeString = localTime->value();
- QString qlocalTimeString(localTimeString.data());
+ TQString qlocalTimeString(localTimeString.data());
qlocalTimeString.setLength(localTimeString.size());
appendItem( threedsmaxgroup, "Local time", qlocalTimeString );
}
const StringAttribute *systemTime = h.findTypedAttribute <StringAttribute> ("systemTime");
if (systemTime) {
std::string systemTimeString = systemTime->value();
- QString qsystemTimeString(systemTimeString.data());
+ TQString qsystemTimeString(systemTimeString.data());
qsystemTimeString.setLength(systemTimeString.size());
appendItem( threedsmaxgroup, "System time", qsystemTimeString );
}
const StringAttribute *computerName = h.findTypedAttribute <StringAttribute> ("computerName");
if (computerName) {
std::string computerNameString = computerName->value();
- QString qcomputerNameString(computerNameString.data());
+ TQString qcomputerNameString(computerNameString.data());
qcomputerNameString.setLength(computerNameString.size());
appendItem( threedsmaxgroup, "Computer name", qcomputerNameString );
}
diff --git a/kfile-plugins/exr/kfile_exr.h b/kfile-plugins/exr/kfile_exr.h
index cb795ba5..d3718792 100644
--- a/kfile-plugins/exr/kfile_exr.h
+++ b/kfile-plugins/exr/kfile_exr.h
@@ -24,14 +24,14 @@
#include <kfilemetainfo.h>
#include <kurl.h>
-class QStringList;
+class TQStringList;
class KExrPlugin: public KFilePlugin
{
Q_OBJECT
public:
- KExrPlugin( QObject *parent, const char *name, const QStringList& preferredItems );
+ KExrPlugin( TQObject *parent, const char *name, const TQStringList& preferredItems );
virtual bool readInfo( KFileMetaInfo& info, uint );
};
diff --git a/kfile-plugins/gif/kfile_gif.cpp b/kfile-plugins/gif/kfile_gif.cpp
index 3c29f05f..ce54458b 100644
--- a/kfile-plugins/gif/kfile_gif.cpp
+++ b/kfile-plugins/gif/kfile_gif.cpp
@@ -31,19 +31,19 @@
#include <kgenericfactory.h>
#include <kdebug.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qdatetime.h>
-#include <qdict.h>
-#include <qvalidator.h>
-#include <qimage.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
+#include <tqdict.h>
+#include <tqvalidator.h>
+#include <tqimage.h>
typedef KGenericFactory<KGifPlugin> GifFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_gif, GifFactory("kfile_gif"))
-KGifPlugin::KGifPlugin(QObject *parent, const char *name,
- const QStringList &args)
+KGifPlugin::KGifPlugin(TQObject *parent, const char *name,
+ const TQStringList &args)
: KFilePlugin(parent, name, args)
{
kdDebug(7034) << "gif KFileMetaInfo plugin\n";
@@ -56,13 +56,13 @@ KGifPlugin::KGifPlugin(QObject *parent, const char *name,
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Version", i18n("Version"), QVariant::String);
+ item = addItemInfo(group, "Version", i18n("Version"), TQVariant::String);
- item = addItemInfo( group, "Dimensions", i18n("Dimensions"), QVariant::Size );
+ item = addItemInfo( group, "Dimensions", i18n("Dimensions"), TQVariant::Size );
setHint( item, KFileMimeTypeInfo::Size );
setUnit( item, KFileMimeTypeInfo::Pixels );
- item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), QVariant::Int);
+ item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), TQVariant::Int);
setUnit(item, KFileMimeTypeInfo::BitsPerPixel);
}
@@ -73,14 +73,14 @@ bool KGifPlugin::readInfo( KFileMetaInfo& info, uint what )
kdDebug(7034) << "gif KFileMetaInfo readInfo\n";
- QFile file(info.path());
+ TQFile file(info.path());
if (!file.open(IO_ReadOnly)) {
- kdDebug(7034) << "Couldn't open " << QFile::encodeName(info.path()) << endl;
+ kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl;
return false;
}
- QDataStream fstream(&file);
+ TQDataStream fstream(&file);
bool isGIF87a = false;
char magic[7];
@@ -92,7 +92,7 @@ bool KGifPlugin::readInfo( KFileMetaInfo& info, uint what )
magic[6] = 0x00; // null terminate
// I have special requirements...
- fstream.setByteOrder( QDataStream::LittleEndian );
+ fstream.setByteOrder( TQDataStream::LittleEndian );
fstream >> width;
fstream >> height;
fstream >> miscInfo;
@@ -108,7 +108,7 @@ bool KGifPlugin::readInfo( KFileMetaInfo& info, uint what )
appendItem( group, "Version", i18n("Unknown") );
}
- appendItem( group, "Dimensions", QSize(width, height) );
+ appendItem( group, "Dimensions", TQSize(width, height) );
if ( isGIF87a ) {
appendItem( group, "BitDepth", ( (miscInfo & 0x07) + 1) );
diff --git a/kfile-plugins/gif/kfile_gif.h b/kfile-plugins/gif/kfile_gif.h
index 6f932f37..f4c0be51 100644
--- a/kfile-plugins/gif/kfile_gif.h
+++ b/kfile-plugins/gif/kfile_gif.h
@@ -22,14 +22,14 @@
#include <kfilemetainfo.h>
#include <kurl.h>
-class QStringList;
+class TQStringList;
class KGifPlugin: public KFilePlugin
{
Q_OBJECT
public:
- KGifPlugin( QObject *parent, const char *name, const QStringList& args );
+ KGifPlugin( TQObject *parent, 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 01c5b65e..e85935fb 100644
--- a/kfile-plugins/ico/kfile_ico.cpp
+++ b/kfile-plugins/ico/kfile_ico.cpp
@@ -26,11 +26,11 @@
#include <kstringvalidator.h>
#include <kdebug.h>
-#include <qdict.h>
-#include <qvalidator.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qdatetime.h>
+#include <tqdict.h>
+#include <tqvalidator.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
#if !defined(__osf__)
#include <inttypes.h>
@@ -44,8 +44,8 @@ typedef KGenericFactory<KIcoPlugin> IcoFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_ico, IcoFactory( "kfile_ico" ))
-KIcoPlugin::KIcoPlugin(QObject *parent, const char *name,
- const QStringList &args)
+KIcoPlugin::KIcoPlugin(TQObject *parent, const char *name,
+ const TQStringList &args)
: KFilePlugin(parent, name, args)
{
@@ -57,13 +57,13 @@ KIcoPlugin::KIcoPlugin(QObject *parent, const char *name,
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Number", i18n("Number of Icons"), QVariant::Int);
+ item = addItemInfo(group, "Number", i18n("Number of Icons"), TQVariant::Int);
- item = addItemInfo(group, "Dimensions", i18n("Dimensions"), QVariant::Size);
- item = addItemInfo(group, "Colors", i18n("Colors"), QVariant::Int);
+ item = addItemInfo(group, "Dimensions", i18n("Dimensions"), TQVariant::Size);
+ item = addItemInfo(group, "Colors", i18n("Colors"), TQVariant::Int);
- item = addItemInfo(group, "DimensionsM", i18n("Dimensions (1st icon)"), QVariant::Size);
- item = addItemInfo(group, "ColorsM", i18n("Colors (1st icon)"), QVariant::Int);
+ item = addItemInfo(group, "DimensionsM", i18n("Dimensions (1st icon)"), TQVariant::Size);
+ item = addItemInfo(group, "ColorsM", i18n("Colors (1st icon)"), TQVariant::Int);
}
@@ -71,18 +71,18 @@ bool KIcoPlugin::readInfo( KFileMetaInfo& info, uint what)
{
- QFile file(info.path());
+ TQFile file(info.path());
if (!file.open(IO_ReadOnly))
{
- kdDebug(7034) << "Couldn't open " << QFile::encodeName(info.path()) << endl;
+ kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl;
return false;
}
- QDataStream dstream(&file);
+ TQDataStream dstream(&file);
// ICO files are little-endian
- dstream.setByteOrder(QDataStream::LittleEndian);
+ dstream.setByteOrder(TQDataStream::LittleEndian);
// read the beginning of the file and make sure it looks ok
@@ -124,7 +124,7 @@ bool KIcoPlugin::readInfo( KFileMetaInfo& info, uint what)
appendItem(group, "Number", ico_count);
if (ico_count == 1) {
- appendItem(group, "Dimensions", QSize(icoe_width, icoe_height));
+ appendItem(group, "Dimensions", TQSize(icoe_width, icoe_height));
if (icoe_colorcount > 0)
appendItem(group, "Colors", icoe_colorcount);
@@ -133,7 +133,7 @@ bool KIcoPlugin::readInfo( KFileMetaInfo& info, uint what)
} else {
- appendItem(group, "DimensionsM", QSize(icoe_width, icoe_height));
+ appendItem(group, "DimensionsM", TQSize(icoe_width, icoe_height));
if (icoe_colorcount > 0)
appendItem(group, "ColorsM", icoe_colorcount);
diff --git a/kfile-plugins/ico/kfile_ico.h b/kfile-plugins/ico/kfile_ico.h
index e06e8094..b354fe22 100644
--- a/kfile-plugins/ico/kfile_ico.h
+++ b/kfile-plugins/ico/kfile_ico.h
@@ -22,14 +22,14 @@
#include <kfilemetainfo.h>
-class QStringList;
+class TQStringList;
class KIcoPlugin: public KFilePlugin
{
Q_OBJECT
public:
- KIcoPlugin( QObject *parent, const char *name, const QStringList& args );
+ KIcoPlugin( TQObject *parent, 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 f25e8a78..b6a2f88b 100644
--- a/kfile-plugins/jpeg/exif.cpp
+++ b/kfile-plugins/jpeg/exif.cpp
@@ -9,7 +9,7 @@
#include "exif.h"
-#include <qwmatrix.h>
+#include <tqwmatrix.h>
#include <kglobal.h>
@@ -214,7 +214,7 @@ static int BytesPerFormat[] = {0,1,1,2,4,8,1,1,2,4,8,4,8};
//--------------------------------------------------------------------------
// Parse the marker stream until SOS or EOI is seen;
//--------------------------------------------------------------------------
-int ExifData::ReadJpegSections (QFile & infile, ReadMode_t ReadMode)
+int ExifData::ReadJpegSections (TQFile & infile, ReadMode_t ReadMode)
{
int a;
@@ -525,11 +525,11 @@ void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBa
switch(Tag){
case TAG_MAKE:
- ExifData::CameraMake = QString::fromLatin1((const char*)ValuePtr, 31);
+ ExifData::CameraMake = TQString::fromLatin1((const char*)ValuePtr, 31);
break;
case TAG_MODEL:
- ExifData::CameraModel = QString::fromLatin1((const char*)ValuePtr, 39);
+ ExifData::CameraModel = TQString::fromLatin1((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 = QString::fromLatin1((const char*)ValuePtr, 19);
+ DateTime = TQString::fromLatin1((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 = QString::fromLatin1((const char*)(a+ValuePtr), 199);
+ UserComment = TQString::fromLatin1((const char*)(a+ValuePtr), 199);
break;
}
}
}else{
- UserComment = QString::fromLatin1((const char*)ValuePtr, 199);
+ UserComment = TQString::fromLatin1((const char*)ValuePtr, 199);
}
break;
@@ -740,7 +740,7 @@ void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBa
//--------------------------------------------------------------------------
void ExifData::process_COM (const uchar * Data, int length)
{
- Comment = QString::fromUtf8((char *)Data+2, (length-2));
+ Comment = TQString::fromUtf8((char *)Data+2, (length-2));
}
@@ -880,11 +880,11 @@ ExifData::ExifData()
//--------------------------------------------------------------------------
// process a EXIF jpeg file
//--------------------------------------------------------------------------
-bool ExifData::scan(const QString & path)
+bool ExifData::scan(const TQString & path)
{
int ret;
- QFile f(path);
+ TQFile f(path);
if ( !f.open(IO_ReadOnly) )
return false;
@@ -940,13 +940,13 @@ bool ExifData::isThumbnailSane() {
// return a thumbnail that respects the orientation flag
// only if it seems sane
//--------------------------------------------------------------------------
-QImage ExifData::getThumbnail() {
+TQImage ExifData::getThumbnail() {
if (!isThumbnailSane()) return NULL;
if (!Orientation || Orientation == 1) return Thumbnail;
// now fix orientation
- QWMatrix M;
- QWMatrix flip= QWMatrix(-1,0,0,1,0,0);
+ TQWMatrix M;
+ TQWMatrix flip= TQWMatrix(-1,0,0,1,0,0);
switch (Orientation) { // notice intentional fallthroughs
case 2: M = flip; break;
case 4: M = flip;
diff --git a/kfile-plugins/jpeg/exif.h b/kfile-plugins/jpeg/exif.h
index 2b4e5606..f8eb13ef 100644
--- a/kfile-plugins/jpeg/exif.h
+++ b/kfile-plugins/jpeg/exif.h
@@ -10,9 +10,9 @@
#include <math.h>
#include <time.h>
-#include "qstring.h"
-#include "qfile.h"
-#include "qimage.h"
+#include "tqstring.h"
+#include "tqfile.h"
+#include "tqimage.h"
#include <kdebug.h>
typedef enum {
@@ -42,9 +42,9 @@ typedef struct {
class ExifData {
Section_t Sections[MAX_SECTIONS];
- QString CameraMake;
- QString CameraModel;
- QString DateTime;
+ TQString CameraMake;
+ TQString CameraModel;
+ TQString DateTime;
int Orientation;
int Height, Width;
int ExifImageLength, ExifImageWidth;
@@ -62,11 +62,11 @@ class ExifData {
int ExposureProgram;
int ISOequivalent;
int CompressionLevel;
- QString UserComment;
- QString Comment;
- QImage Thumbnail;
+ TQString UserComment;
+ TQString Comment;
+ TQImage Thumbnail;
- int ReadJpegSections (QFile & infile, ReadMode_t ReadMode);
+ int ReadJpegSections (TQFile & infile, ReadMode_t ReadMode);
void DiscardData(void);
int Get16u(void * Short);
int Get32s(void * Long);
@@ -82,10 +82,10 @@ class ExifData {
public:
ExifData();
- bool scan(const QString &);
- QString getCameraMake() { return CameraMake; }
- QString getCameraModel() { return CameraModel; }
- QString getDateTime() { return DateTime; }
+ bool scan(const TQString &);
+ TQString getCameraMake() { return CameraMake; }
+ TQString getCameraModel() { return CameraModel; }
+ TQString getDateTime() { return DateTime; }
int getOrientation() { return Orientation; }
int getHeight() { return Height; }
int getWidth() { return Width; }
@@ -103,9 +103,9 @@ public:
int getExposureProgram() { return ExposureProgram; }
int getISOequivalent() { return ISOequivalent; }
int getCompressionLevel() { return CompressionLevel; }
- QString getUserComment() { return UserComment; }
- QString getComment() { return Comment; }
- QImage getThumbnail();
+ TQString getUserComment() { return UserComment; }
+ TQString getComment() { return Comment; }
+ TQImage getThumbnail();
bool isThumbnailSane();
bool isNullThumbnail() { return !isThumbnailSane(); }
};
diff --git a/kfile-plugins/jpeg/kfile_jpeg.cpp b/kfile-plugins/jpeg/kfile_jpeg.cpp
index d302cf65..5c7e8076 100644
--- a/kfile-plugins/jpeg/kfile_jpeg.cpp
+++ b/kfile-plugins/jpeg/kfile_jpeg.cpp
@@ -29,12 +29,12 @@
#include <kgenericfactory.h>
#include <kdebug.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qdatetime.h>
-#include <qdict.h>
-#include <qvalidator.h>
-#include <qimage.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
+#include <tqdict.h>
+#include <tqvalidator.h>
+#include <tqimage.h>
#include "exif.h"
@@ -44,8 +44,8 @@ typedef KGenericFactory<KJpegPlugin> JpegFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_jpeg, JpegFactory("kfile_jpeg"))
-KJpegPlugin::KJpegPlugin(QObject *parent, const char *name,
- const QStringList &args )
+KJpegPlugin::KJpegPlugin(TQObject *parent, const char *name,
+ const TQStringList &args )
: KFilePlugin(parent, name, args)
{
kdDebug(7034) << "jpeg plugin\n";
@@ -58,110 +58,110 @@ KJpegPlugin::KJpegPlugin(QObject *parent, const char *name,
i18n("JPEG Exif") );
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo( exifGroup, "Comment", i18n("Comment"), QVariant::String);
+ item = addItemInfo( exifGroup, "Comment", i18n("Comment"), TQVariant::String);
setAttributes( item,
KFileMimeTypeInfo::Modifiable |
KFileMimeTypeInfo::Addable |
KFileMimeTypeInfo::MultiLine );
item = addItemInfo( exifGroup, "Manufacturer", i18n("Camera Manufacturer"),
- QVariant::String );
+ TQVariant::String );
item = addItemInfo( exifGroup, "Model", i18n("Camera Model"),
- QVariant::String );
+ TQVariant::String );
item = addItemInfo( exifGroup, "Date/time", i18n("Date/Time"),
- QVariant::DateTime );
+ TQVariant::DateTime );
item = addItemInfo( exifGroup, "CreationDate", i18n("Creation Date"),
- QVariant::Date );
+ TQVariant::Date );
item = addItemInfo( exifGroup, "CreationTime", i18n("Creation Time"),
- QVariant::Time );
+ TQVariant::Time );
item = addItemInfo( exifGroup, "Dimensions", i18n("Dimensions"),
- QVariant::Size );
+ TQVariant::Size );
setHint( item, KFileMimeTypeInfo::Size );
setUnit( item, KFileMimeTypeInfo::Pixels );
item = addItemInfo( exifGroup, "Orientation", i18n("Orientation"),
- QVariant::Int );
+ TQVariant::Int );
item = addItemInfo( exifGroup, "ColorMode", i18n("Color Mode"),
- QVariant::String );
+ TQVariant::String );
item = addItemInfo( exifGroup, "Flash used", i18n("Flash Used"),
- QVariant::String );
+ TQVariant::String );
item = addItemInfo( exifGroup, "Focal length", i18n("Focal Length"),
- QVariant::String );
+ TQVariant::String );
setUnit( item, KFileMimeTypeInfo::Millimeters );
item = addItemInfo( exifGroup, "35mm equivalent", i18n("35mm Equivalent"),
- QVariant::Int );
+ TQVariant::Int );
setUnit( item, KFileMimeTypeInfo::Millimeters );
item = addItemInfo( exifGroup, "CCD width", i18n("CCD Width"),
- QVariant::String );
+ TQVariant::String );
setUnit( item, KFileMimeTypeInfo::Millimeters );
item = addItemInfo( exifGroup, "Exposure time", i18n("Exposure Time"),
- QVariant::String );
+ TQVariant::String );
setHint( item, KFileMimeTypeInfo::Seconds );
item = addItemInfo( exifGroup, "Aperture", i18n("Aperture"),
- QVariant::String );
+ TQVariant::String );
item = addItemInfo( exifGroup, "Focus dist.", i18n("Focus Dist."),
- QVariant::String );
+ TQVariant::String );
item = addItemInfo( exifGroup, "Exposure bias", i18n("Exposure Bias"),
- QVariant::String );
+ TQVariant::String );
item = addItemInfo( exifGroup, "Whitebalance", i18n("Whitebalance"),
- QVariant::String );
+ TQVariant::String );
item = addItemInfo( exifGroup, "Metering mode", i18n("Metering Mode"),
- QVariant::String );
+ TQVariant::String );
item = addItemInfo( exifGroup, "Exposure", i18n("Exposure"),
- QVariant::String );
+ TQVariant::String );
item = addItemInfo( exifGroup, "ISO equiv.", i18n("ISO Equiv."),
- QVariant::String );
+ TQVariant::String );
item = addItemInfo( exifGroup, "JPEG quality", i18n("JPEG Quality"),
- QVariant::String );
+ TQVariant::String );
item = addItemInfo( exifGroup, "User comment", i18n("User Comment"),
- QVariant::String );
+ TQVariant::String );
setHint(item, KFileMimeTypeInfo::Description);
item = addItemInfo( exifGroup, "JPEG process", i18n("JPEG Process"),
- QVariant::String );
+ TQVariant::String );
item = addItemInfo( exifGroup, "Thumbnail", i18n("Thumbnail"),
- QVariant::Image );
+ TQVariant::Image );
setHint( item, KFileMimeTypeInfo::Thumbnail );
// ###
// exifGroup.setSupportsVariableKeys(true);
}
-QValidator* KJpegPlugin::createValidator(const KFileMetaInfoItem& /*item*/,
- QObject */*parent*/,
+TQValidator* KJpegPlugin::createValidator(const KFileMetaInfoItem& /*item*/,
+ TQObject */*parent*/,
const char */*name*/ ) const
{
// no need to return a validator that validates everything as OK :)
// if (item.isEditable())
-// return new QRegExpValidator(QRegExp(".*"), parent, name);
+// return new TQRegExpValidator(TQRegExp(".*"), parent, name);
// else
return 0L;
}
bool KJpegPlugin::writeInfo( const KFileMetaInfo& info ) const
{
- QString comment = info[EXIFGROUP].value("Comment").toString();
- QString path = info.path();
+ TQString comment = info[EXIFGROUP].value("Comment").toString();
+ TQString path = info.path();
kdDebug(7034) << "exif writeInfo: " << info.path() << " \"" << comment << "\"\n";
@@ -182,7 +182,7 @@ bool KJpegPlugin::writeInfo( const KFileMetaInfo& info ) const
which is fully backwards compatible with readers expecting ascii.
Readers expecting a national character set are out of luck...
*/
- if( safe_copy_and_modify( QFile::encodeName( path ), comment.utf8() ) ) {
+ if( safe_copy_and_modify( TQFile::encodeName( path ), comment.utf8() ) ) {
return false;
}
return true;
@@ -190,11 +190,11 @@ bool KJpegPlugin::writeInfo( const KFileMetaInfo& info ) const
bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what )
{
- const QString path( info.path() );
+ const TQString path( info.path() );
if ( path.isEmpty() ) // remote file
return false;
- QString tag;
+ TQString tag;
ExifData ImageInfo;
// parse the jpeg file now
@@ -230,7 +230,7 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what )
tag = ImageInfo.getDateTime();
if (tag.length()){
- QDateTime dt = parseDateTime( tag.stripWhiteSpace() );
+ TQDateTime dt = parseDateTime( tag.stripWhiteSpace() );
if ( dt.isValid() ) {
appendItem( exifGroup, "Date/time", dt );
appendItem( exifGroup, "CreationDate", dt.date() );
@@ -238,7 +238,7 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what )
}
}
- appendItem( exifGroup,"Dimensions", QSize( ImageInfo.getWidth(),
+ appendItem( exifGroup,"Dimensions", TQSize( ImageInfo.getWidth(),
ImageInfo.getHeight() ) );
if ( ImageInfo.getOrientation() )
@@ -249,7 +249,7 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what )
int flashUsed = ImageInfo.getFlashUsed(); // -1, <set>
if ( flashUsed >= 0 ) {
- QString flash = i18n("Flash", "(unknown)");
+ TQString flash = i18n("Flash", "(unknown)");
switch ( flashUsed ) {
case 0: flash = i18n("Flash", "No");
break;
@@ -286,7 +286,7 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what )
if (ImageInfo.getFocalLength()){
appendItem( exifGroup, "Focal length",
- QString().sprintf("%4.1f", ImageInfo.getFocalLength()) );
+ TQString().sprintf("%4.1f", ImageInfo.getFocalLength()) );
if (ImageInfo.getCCDWidth()){
appendItem( exifGroup, "35mm equivalent",
@@ -296,21 +296,21 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what )
if (ImageInfo.getCCDWidth()){
appendItem( exifGroup, "CCD width",
- QString().sprintf("%4.2f", ImageInfo.getCCDWidth()) );
+ TQString().sprintf("%4.2f", ImageInfo.getCCDWidth()) );
}
if (ImageInfo.getExposureTime()){
- tag=QString().sprintf("%6.3f", ImageInfo.getExposureTime());
+ tag=TQString().sprintf("%6.3f", ImageInfo.getExposureTime());
float exposureTime = ImageInfo.getExposureTime();
if (exposureTime > 0 && exposureTime <= 0.5){
- tag+=QString().sprintf(" (1/%d)", (int)(0.5 + 1/exposureTime) );
+ tag+=TQString().sprintf(" (1/%d)", (int)(0.5 + 1/exposureTime) );
}
appendItem( exifGroup, "Exposure time", tag );
}
if (ImageInfo.getApertureFNumber()){
appendItem( exifGroup, "Aperture",
- QString().sprintf("f/%3.1f",
+ TQString().sprintf("f/%3.1f",
(double)ImageInfo.getApertureFNumber()));
}
@@ -318,14 +318,14 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what )
if (ImageInfo.getDistance() < 0){
tag=i18n("Infinite");
}else{
- tag=QString().sprintf("%5.2fm",(double)ImageInfo.getDistance());
+ tag=TQString().sprintf("%5.2fm",(double)ImageInfo.getDistance());
}
appendItem( exifGroup, "Focus dist.", tag );
}
if (ImageInfo.getExposureBias()){
appendItem( exifGroup, "Exposure bias",
- QString().sprintf("%4.2f",
+ TQString().sprintf("%4.2f",
(double)ImageInfo.getExposureBias()) );
}
@@ -443,7 +443,7 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what )
if (ImageInfo.getISOequivalent()){
appendItem( exifGroup, "ISO equiv.",
- QString().sprintf("%2d",
+ TQString().sprintf("%2d",
(int)ImageInfo.getISOequivalent()) );
}
@@ -473,7 +473,7 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what )
for (a=0;;a++){
if (ProcessTable[a].Tag == ImageInfo.getProcess() || ProcessTable[a].Tag == 0){
appendItem( exifGroup, "JPEG process",
- QString::fromUtf8( ProcessTable[a].Desc) );
+ TQString::fromUtf8( ProcessTable[a].Desc) );
break;
}
}
@@ -487,18 +487,18 @@ bool KJpegPlugin::readInfo( KFileMetaInfo& info, uint what )
// format of the string is:
// YYYY:MM:DD HH:MM:SS
-QDateTime KJpegPlugin::parseDateTime( const QString& string )
+TQDateTime KJpegPlugin::parseDateTime( const TQString& string )
{
- QDateTime dt;
+ TQDateTime dt;
if ( string.length() != 19 )
return dt;
- QString year = string.left( 4 );
- QString month = string.mid( 5, 2 );
- QString day = string.mid( 8, 2 );
- QString hour = string.mid( 11, 2 );
- QString minute = string.mid( 14, 2 );
- QString seconds = string.mid( 17, 2 );
+ TQString year = string.left( 4 );
+ TQString month = string.mid( 5, 2 );
+ TQString day = string.mid( 8, 2 );
+ TQString hour = string.mid( 11, 2 );
+ TQString minute = string.mid( 14, 2 );
+ TQString seconds = string.mid( 17, 2 );
bool ok;
bool allOk = true;
@@ -521,8 +521,8 @@ QDateTime KJpegPlugin::parseDateTime( const QString& string )
allOk &= ok;
if ( allOk ) {
- dt.setDate( QDate( y, mo, d ) );
- dt.setTime( QTime( h, mi, s ) );
+ dt.setDate( TQDate( y, mo, d ) );
+ dt.setTime( TQTime( h, mi, s ) );
}
return dt;
diff --git a/kfile-plugins/jpeg/kfile_jpeg.h b/kfile-plugins/jpeg/kfile_jpeg.h
index 5c585fb0..70c14501 100644
--- a/kfile-plugins/jpeg/kfile_jpeg.h
+++ b/kfile-plugins/jpeg/kfile_jpeg.h
@@ -20,7 +20,7 @@
#ifndef __KFILE_JPEG_H__
#define __KFILE_JPEG_H__
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kfilemetainfo.h>
class KJpegPlugin: public KFilePlugin
@@ -28,16 +28,16 @@ class KJpegPlugin: public KFilePlugin
Q_OBJECT
public:
- KJpegPlugin( QObject *parent, const char *name,
- const QStringList& args );
+ KJpegPlugin( TQObject *parent, const char *name,
+ const TQStringList& args );
virtual bool readInfo ( KFileMetaInfo& info, uint what );
virtual bool writeInfo( const KFileMetaInfo& info ) const;
- virtual QValidator* createValidator( const KFileMetaInfoItem& item,
- QObject* parent, const char* name) const;
+ virtual TQValidator* createValidator( const KFileMetaInfoItem& item,
+ TQObject* parent, const char* name) const;
private:
- QDateTime parseDateTime( const QString& string );
+ TQDateTime parseDateTime( const TQString& string );
};
#endif
diff --git a/kfile-plugins/pcx/kfile_pcx.cpp b/kfile-plugins/pcx/kfile_pcx.cpp
index a7468a57..5dceec9d 100644
--- a/kfile-plugins/pcx/kfile_pcx.cpp
+++ b/kfile-plugins/pcx/kfile_pcx.cpp
@@ -22,14 +22,14 @@
#include <kgenericfactory.h>
#include <kdebug.h>
-#include <qdatastream.h>
-#include <qfile.h>
+#include <tqdatastream.h>
+#include <tqfile.h>
typedef KGenericFactory<KPcxPlugin> PcxFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_pcx, PcxFactory("kfile_pcx"))
-QDataStream &operator>>( QDataStream &s, PALETTE &pal )
+TQDataStream &operator>>( TQDataStream &s, PALETTE &pal )
{
for ( int i=0; i<16; ++i )
s >> pal.p[ i ].r >> pal.p[ i ].g >> pal.p[ i ].b;
@@ -37,7 +37,7 @@ QDataStream &operator>>( QDataStream &s, PALETTE &pal )
return s;
}
-QDataStream &operator>>( QDataStream &s, PCXHEADER &ph )
+TQDataStream &operator>>( TQDataStream &s, PCXHEADER &ph )
{
s >> ph.Manufacturer;
s >> ph.Version;
@@ -56,8 +56,8 @@ QDataStream &operator>>( QDataStream &s, PCXHEADER &ph )
return s;
}
-KPcxPlugin::KPcxPlugin( QObject *parent, const char *name,
- const QStringList &args ) : KFilePlugin( parent, name, args )
+KPcxPlugin::KPcxPlugin( TQObject *parent, const char *name,
+ const TQStringList &args ) : KFilePlugin( parent, name, args )
{
kdDebug(7034) << "PCX file meta info plugin" << endl;
KFileMimeTypeInfo* info = addMimeTypeInfo( "image/x-pcx" );
@@ -67,17 +67,17 @@ KPcxPlugin::KPcxPlugin( QObject *parent, const char *name,
KFileMimeTypeInfo::ItemInfo* item;
item = addItemInfo( group, "Dimensions", i18n( "Dimensions" ),
- QVariant::Size );
+ TQVariant::Size );
setHint( item, KFileMimeTypeInfo::Size );
setUnit( item, KFileMimeTypeInfo::Pixels );
item = addItemInfo( group, "BitDepth", i18n( "Bit Depth" ),
- QVariant::Int );
+ TQVariant::Int );
setUnit( item, KFileMimeTypeInfo::BitsPerPixel );
item = addItemInfo( group, "Resolution", i18n( "Resolution" ),
- QVariant::Size );
+ TQVariant::Size );
setUnit( item, KFileMimeTypeInfo::DotsPerInch );
item = addItemInfo( group, "Compression", i18n( "Compression" ),
- QVariant::String );
+ TQVariant::String );
}
bool KPcxPlugin::readInfo( KFileMetaInfo& info, uint )
@@ -87,12 +87,12 @@ bool KPcxPlugin::readInfo( KFileMetaInfo& info, uint )
struct PCXHEADER header;
- QFile f( info.path() );
+ TQFile f( info.path() );
if ( !f.open( IO_ReadOnly ) )
return false;
- QDataStream s( &f );
- s.setByteOrder( QDataStream::LittleEndian );
+ TQDataStream s( &f );
+ s.setByteOrder( TQDataStream::LittleEndian );
s >> header;
@@ -102,9 +102,9 @@ bool KPcxPlugin::readInfo( KFileMetaInfo& info, uint )
KFileMetaInfoGroup group = appendGroup( info, "General" );
- appendItem( group, "Dimensions", QSize( w, h ) );
+ appendItem( group, "Dimensions", TQSize( w, h ) );
appendItem( group, "BitDepth", bpp );
- appendItem( group, "Resolution", QSize( header.HDpi, header.YDpi ) );
+ appendItem( group, "Resolution", TQSize( header.HDpi, header.YDpi ) );
if ( header.Encoding == 1 )
appendItem( group, "Compression", i18n( "Yes (RLE)" ) );
else
diff --git a/kfile-plugins/pcx/kfile_pcx.h b/kfile-plugins/pcx/kfile_pcx.h
index 434f89a3..2d9b772f 100644
--- a/kfile-plugins/pcx/kfile_pcx.h
+++ b/kfile-plugins/pcx/kfile_pcx.h
@@ -75,7 +75,7 @@ class KPcxPlugin: public KFilePlugin
Q_OBJECT
public:
- KPcxPlugin(QObject *parent, const char *name, const QStringList& args);
+ KPcxPlugin(TQObject *parent, const char *name, const TQStringList& args);
virtual bool readInfo(KFileMetaInfo& info, uint what);
private:
diff --git a/kfile-plugins/pdf/kfile_pdf.cpp b/kfile-plugins/pdf/kfile_pdf.cpp
index d5beeb60..a3dcbde7 100644
--- a/kfile-plugins/pdf/kfile_pdf.cpp
+++ b/kfile-plugins/pdf/kfile_pdf.cpp
@@ -27,7 +27,7 @@ typedef KGenericFactory<KPdfPlugin> PdfFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_pdf, PdfFactory("kfile_pdf"))
-KPdfPlugin::KPdfPlugin(QObject *parent, const char *name, const QStringList &preferredItems)
+KPdfPlugin::KPdfPlugin(TQObject *parent, const char *name, const TQStringList &preferredItems)
: KFilePlugin(parent, name, preferredItems)
{
kdDebug(7034) << "pdf plugin\n";
@@ -40,21 +40,21 @@ KPdfPlugin::KPdfPlugin(QObject *parent, const char *name, const QStringList &pre
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Title", i18n("Title"), QVariant::String);
+ item = addItemInfo(group, "Title", i18n("Title"), TQVariant::String);
setHint(item, KFileMimeTypeInfo::Name);
- item = addItemInfo(group, "Subject", i18n("Subject"), QVariant::String);
+ item = addItemInfo(group, "Subject", i18n("Subject"), TQVariant::String);
setHint(item, KFileMimeTypeInfo::Description);
- item = addItemInfo(group, "Author", i18n("Author"), QVariant::String);
+ item = addItemInfo(group, "Author", i18n("Author"), TQVariant::String);
setHint(item, KFileMimeTypeInfo::Author);
- addItemInfo(group, "Keywords", i18n("Key Words"), QVariant::String);
- addItemInfo(group, "Creator", i18n("Creator"), QVariant::String);
- addItemInfo(group, "Producer", i18n("Producer"), QVariant::String);
- addItemInfo(group, "CreationDate", i18n("Creation Date"), QVariant::DateTime);
- addItemInfo(group, "ModificationDate", i18n("Modified"), QVariant::DateTime);
- addItemInfo(group, "Pages", i18n("Pages"), QVariant::Int);
- addItemInfo(group, "Protected", i18n("Protected"), QVariant::String);
- addItemInfo(group, "Linearized", i18n("Linearized"), QVariant::String);
- addItemInfo(group, "Version", i18n("Version"), QVariant::String);
+ addItemInfo(group, "Keywords", i18n("Key Words"), TQVariant::String);
+ addItemInfo(group, "Creator", i18n("Creator"), TQVariant::String);
+ addItemInfo(group, "Producer", i18n("Producer"), TQVariant::String);
+ addItemInfo(group, "CreationDate", i18n("Creation Date"), TQVariant::DateTime);
+ addItemInfo(group, "ModificationDate", i18n("Modified"), TQVariant::DateTime);
+ addItemInfo(group, "Pages", i18n("Pages"), TQVariant::Int);
+ addItemInfo(group, "Protected", i18n("Protected"), TQVariant::String);
+ addItemInfo(group, "Linearized", i18n("Linearized"), TQVariant::String);
+ addItemInfo(group, "Version", i18n("Version"), TQVariant::String);
}
bool KPdfPlugin::readInfo( KFileMetaInfo& info, uint /* what */)
@@ -79,7 +79,7 @@ bool KPdfPlugin::readInfo( KFileMetaInfo& info, uint /* what */)
appendItem(generalGroup, "ModificationDate", doc->getDate("ModDate") );
appendItem(generalGroup, "Pages", doc->getNumPages() );
- QString enc;
+ TQString enc;
if (doc->isEncrypted())
{
enc = i18n("Yes (Can Print:%1 Can Copy:%2 Can Change:%3 Can Add notes:%4)")
@@ -92,7 +92,7 @@ bool KPdfPlugin::readInfo( KFileMetaInfo& info, uint /* what */)
appendItem(generalGroup, "Protected", enc );
appendItem(generalGroup, "Linearized", doc->isLinearized() ? i18n("Yes") : i18n("No") );
- QString versionString = QString("%1").arg( doc->getPDFVersion(), 0, 'f', 1 );
+ TQString versionString = TQString("%1").arg( 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 b0214f54..eaecdb5d 100644
--- a/kfile-plugins/pdf/kfile_pdf.h
+++ b/kfile-plugins/pdf/kfile_pdf.h
@@ -24,13 +24,13 @@
#include <kfilemetainfo.h>
#include <poppler-qt.h>
-class QStringList;
+class TQStringList;
class KPdfPlugin: public KFilePlugin
{
Q_OBJECT
public:
- KPdfPlugin( QObject *parent, const char *name, const QStringList& preferredItems );
+ KPdfPlugin( TQObject *parent, const char *name, const TQStringList& preferredItems );
virtual bool readInfo(KFileMetaInfo& info, uint what);
};
diff --git a/kfile-plugins/png/kfile_png.cpp b/kfile-plugins/png/kfile_png.cpp
index c3e54b66..531fdfe3 100644
--- a/kfile-plugins/png/kfile_png.cpp
+++ b/kfile-plugins/png/kfile_png.cpp
@@ -27,11 +27,11 @@
#include <kgenericfactory.h>
#include <kdebug.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qdatetime.h>
-#include <qdict.h>
-#include <qvalidator.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
+#include <tqdict.h>
+#include <tqvalidator.h>
#include <zlib.h>
// some defines to make it easier
@@ -87,8 +87,8 @@ typedef KGenericFactory<KPngPlugin> PngFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_png, PngFactory("kfile_png"))
-KPngPlugin::KPngPlugin(QObject *parent, const char *name,
- const QStringList &args)
+KPngPlugin::KPngPlugin(TQObject *parent, const char *name,
+ const TQStringList &args)
: KFilePlugin(parent, name, args)
{
kdDebug(7034) << "png plugin\n";
@@ -101,32 +101,32 @@ KPngPlugin::KPngPlugin(QObject *parent, const char *name,
// comment group
group = addGroupInfo(info, "Comment", i18n("Comment"));
- addVariableInfo(group, QVariant::String, 0);
+ addVariableInfo(group, TQVariant::String, 0);
// technical group
group = addGroupInfo(info, "Technical", i18n("Technical Details"));
- item = addItemInfo(group, "Dimensions", i18n("Dimensions"), QVariant::Size);
+ item = addItemInfo(group, "Dimensions", i18n("Dimensions"), TQVariant::Size);
setHint( item, KFileMimeTypeInfo::Size );
setUnit(item, KFileMimeTypeInfo::Pixels);
- item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), QVariant::Int);
+ item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), TQVariant::Int);
setUnit(item, KFileMimeTypeInfo::BitsPerPixel);
- addItemInfo(group, "ColorMode", i18n("Color Mode"), QVariant::String);
- addItemInfo(group, "Compression", i18n("Compression"), QVariant::String);
- addItemInfo(group, "InterlaceMode", i18n("Interlace Mode"),QVariant::String);
+ addItemInfo(group, "ColorMode", i18n("Color Mode"), TQVariant::String);
+ addItemInfo(group, "Compression", i18n("Compression"), TQVariant::String);
+ addItemInfo(group, "InterlaceMode", i18n("Interlace Mode"),TQVariant::String);
}
bool KPngPlugin::readInfo( KFileMetaInfo& info, uint what)
{
if ( info.path().isEmpty() ) // remote file
return false;
- QFile f(info.path());
+ TQFile f(info.path());
if ( !f.open(IO_ReadOnly) )
return false;
- QIODevice::Offset fileSize = f.size();
+ TQIODevice::Offset fileSize = f.size();
if (fileSize < 29) return false;
// the technical group will be read from the first 29 bytes. If the file
@@ -176,7 +176,7 @@ bool KPngPlugin::readInfo( KFileMetaInfo& info, uint what)
KFileMetaInfoGroup techgroup = appendGroup(info, "Technical");
- appendItem(techgroup, "Dimensions", QSize(x, y));
+ appendItem(techgroup, "Dimensions", TQSize(x, y));
appendItem(techgroup, "BitDepth", bpp);
appendItem(techgroup, "ColorMode",
(type < sizeof(colors)/sizeof(colors[0]))
@@ -227,7 +227,7 @@ bool KPngPlugin::readInfo( KFileMetaInfo& info, uint what)
if (8+index+keysize>=fileSize)
goto end;
- QByteArray arr;
+ TQByteArray arr;
if(!strncmp((char*)CHUNK_TYPE(data,index), "zTXt", 4)) {
kdDebug(7034) << "We found a zTXt field\n";
// we get the compression method after the key
@@ -288,7 +288,7 @@ bool KPngPlugin::readInfo( KFileMetaInfo& info, uint what)
goto end;
arr.resize(textsize);
- arr = QByteArray(textsize).duplicate((const char*)text,
+ arr = TQByteArray(textsize).duplicate((const char*)text,
textsize);
} else {
@@ -296,11 +296,11 @@ bool KPngPlugin::readInfo( KFileMetaInfo& info, uint what)
goto end;
}
appendItem(commentGroup,
- QString(reinterpret_cast<char*>(key)),
- QString(arr));
+ TQString(reinterpret_cast<char*>(key)),
+ TQString(arr));
kdDebug(7034) << "adding " << key << " / "
- << QString(arr) << endl;
+ << TQString(arr) << endl;
index += CHUNK_SIZE(data, index) + CHUNK_HEADER_SIZE;
}
diff --git a/kfile-plugins/png/kfile_png.h b/kfile-plugins/png/kfile_png.h
index 0873d55d..54e626de 100644
--- a/kfile-plugins/png/kfile_png.h
+++ b/kfile-plugins/png/kfile_png.h
@@ -24,14 +24,14 @@
#include <kfilemetainfo.h>
#include <kurl.h>
-class QStringList;
+class TQStringList;
class KPngPlugin: public KFilePlugin
{
Q_OBJECT
public:
- KPngPlugin( QObject *parent, const char *name, const QStringList& preferredItems );
+ KPngPlugin( TQObject *parent, 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 b0a1dcca..abe576b4 100644
--- a/kfile-plugins/pnm/kfile_pnm.cpp
+++ b/kfile-plugins/pnm/kfile_pnm.cpp
@@ -21,8 +21,8 @@
#include <math.h>
#include <kgenericfactory.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
static const char* formats[] = {
I18N_NOOP("plain"),
@@ -33,14 +33,14 @@ typedef KGenericFactory<KPnmPlugin> PnmFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_pnm, PnmFactory("kfile_pnm"))
-KPnmPlugin::KPnmPlugin(QObject *parent, const char *name, const QStringList &args) : KFilePlugin(parent, name, args)
+KPnmPlugin::KPnmPlugin(TQObject *parent, const char *name, const TQStringList &args) : KFilePlugin(parent, name, args)
{
makeMimeTypeInfo( "image/x-portable-bitmap" );
makeMimeTypeInfo( "image/x-portable-greymap" );
makeMimeTypeInfo( "image/x-portable-pixmap" );
}
-void KPnmPlugin::makeMimeTypeInfo(const QString& mimetype)
+void KPnmPlugin::makeMimeTypeInfo(const TQString& mimetype)
{
KFileMimeTypeInfo* info = addMimeTypeInfo( mimetype );
@@ -49,26 +49,26 @@ void KPnmPlugin::makeMimeTypeInfo(const QString& mimetype)
group = addGroupInfo(info, "General", i18n("General"));
- addItemInfo(group, "Format", i18n("Format"), QVariant::String);
+ addItemInfo(group, "Format", i18n("Format"), TQVariant::String);
- item = addItemInfo(group, "Dimensions", i18n("Dimensions"), QVariant::Size);
+ item = addItemInfo(group, "Dimensions", i18n("Dimensions"), TQVariant::Size);
setUnit(item, KFileMimeTypeInfo::Pixels);
- item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), QVariant::Int);
+ item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), TQVariant::Int);
setUnit(item, KFileMimeTypeInfo::BitsPerPixel);
- addItemInfo(group, "Comment", i18n("Comment"), QVariant::String);
+ addItemInfo(group, "Comment", i18n("Comment"), TQVariant::String);
}
bool KPnmPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
{
- QFile f(info.path());
+ TQFile f(info.path());
if(!f.open(IO_ReadOnly))
return false;
if(f.size() <= 2)
return false;
- QTextStream stream(&f);
+ TQTextStream stream(&f);
char c;
stream >> c;
@@ -83,7 +83,7 @@ bool KPnmPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
return false;
int type = (n - 1) % 3;
- QString comments, buffer;
+ TQString comments, buffer;
while(!stream.atEnd()) {
stream >> c;
// comment
@@ -94,11 +94,11 @@ bool KPnmPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
}
// image size
// unfortunately Qt doesn't have some kind of push-back method for
- // QTextStream, so we need to manually decode the first part of the
+ // TQTextStream, so we need to manually decode the first part of the
// image size.
if( c >= '0' && c <= '9' ) {
buffer = "";
- QChar tmp(c);
+ TQChar tmp(c);
while(!stream.atEnd() && tmp.isDigit()) {
buffer += tmp;
stream >> tmp;
@@ -125,7 +125,7 @@ bool KPnmPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
KFileMetaInfoGroup group = appendGroup(info, "General");
appendItem(group, "Format", formats[format]);
- appendItem(group, "Dimensions", QSize(x, y));
+ appendItem(group, "Dimensions", TQSize(x, y));
if(!comments.isEmpty())
appendItem(group, "Comment", comments.stripWhiteSpace());
appendItem(group, "BitDepth", bpp);
diff --git a/kfile-plugins/pnm/kfile_pnm.h b/kfile-plugins/pnm/kfile_pnm.h
index 4f1043e5..59b146e5 100644
--- a/kfile-plugins/pnm/kfile_pnm.h
+++ b/kfile-plugins/pnm/kfile_pnm.h
@@ -22,18 +22,18 @@
#include <kfilemetainfo.h>
-class QStringList;
+class TQStringList;
class KPnmPlugin: public KFilePlugin
{
Q_OBJECT
public:
- KPnmPlugin( QObject *parent, const char *name, const QStringList& preferredItems );
+ KPnmPlugin( TQObject *parent, const char *name, const TQStringList& preferredItems );
virtual bool readInfo( KFileMetaInfo& info, uint );
private:
- void makeMimeTypeInfo( const QString&);
+ void makeMimeTypeInfo( const TQString&);
};
#endif
diff --git a/kfile-plugins/ps/gscreator.cpp b/kfile-plugins/ps/gscreator.cpp
index 33cbc141..0f0c50e8 100644
--- a/kfile-plugins/ps/gscreator.cpp
+++ b/kfile-plugins/ps/gscreator.cpp
@@ -69,10 +69,10 @@
#include <errno.h>
#include <kdemacros.h>
-#include <qcolor.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qregexp.h>
+#include <tqcolor.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqregexp.h>
#include "gscreator.h"
@@ -161,7 +161,7 @@ static const char *dvipsargs[] = {
0
};
-static bool correctDVI(const QString& filename);
+static bool correctDVI(const TQString& filename);
namespace {
@@ -172,7 +172,7 @@ namespace {
}
-bool GSCreator::create(const QString &path, int width, int height, QImage &img)
+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:
@@ -194,7 +194,7 @@ bool GSCreator::create(const QString &path, int width, int height, QImage &img)
int output[2];
int dvipipe[2];
- QByteArray data(1024);
+ TQByteArray data(1024);
bool ok = false;
@@ -216,7 +216,7 @@ bool GSCreator::create(const QString &path, int width, int height, QImage &img)
if (no_dvi)
{
- FILE* fp = fopen(QFile::encodeName(path), "r");
+ FILE* fp = fopen(TQFile::encodeName(path), "r");
if (fp == 0) return false;
char buf[4096];
@@ -234,7 +234,7 @@ bool GSCreator::create(const QString &path, int width, int height, QImage &img)
}
const bool is_encapsulated = no_dvi &&
- (path.find(QRegExp("\\.epsi?$", false, false)) > 0) &&
+ (path.find(TQRegExp("\\.epsi?$", false, false)) > 0) &&
(dsc.bbox()->width() > 0) && (dsc.bbox()->height() > 0) &&
(dsc.page_count() <= 1);
@@ -246,7 +246,7 @@ bool GSCreator::create(const QString &path, int width, int height, QImage &img)
// GhostScript's rendering at the extremely low resolutions
// required for thumbnails leaves something to be desired. To
// get nicer images, we render to four times the required
- // resolution and let QImage scale the result.
+ // resolution and let TQImage scale the result.
const int hres = (width * 72) / bbox->width();
const int vres = (height * 72) / bbox->height();
const int resolution = (hres > vres ? vres : hres) * 4;
@@ -317,7 +317,7 @@ bool GSCreator::create(const QString &path, int width, int height, QImage &img)
}
// find next zero entry and put the filename there
- QCString fname = QFile::encodeName( path );
+ TQCString fname = TQFile::encodeName( path );
while (*arg)
++arg;
if( no_dvi )
@@ -478,9 +478,9 @@ void GSCreator::comment(Name name)
// Quick function to check if the filename corresponds to a valid DVI
// file. Returns true if <filename> is a DVI file, false otherwise.
-static bool correctDVI(const QString& filename)
+static bool correctDVI(const TQString& filename)
{
- QFile f(filename);
+ TQFile f(filename);
if (!f.open(IO_ReadOnly))
return FALSE;
@@ -501,11 +501,11 @@ static bool correctDVI(const QString& filename)
return TRUE;
}
-bool GSCreator::getEPSIPreview(const QString &path, long start, long
- end, QImage &outimg, int imgwidth, int imgheight)
+bool GSCreator::getEPSIPreview(const TQString &path, long start, long
+ end, TQImage &outimg, int imgwidth, int imgheight)
{
FILE *fp;
- fp = fopen(QFile::encodeName(path), "r");
+ fp = fopen(TQFile::encodeName(path), "r");
if (fp == 0) return false;
const long previewsize = end - start + 1;
@@ -521,7 +521,7 @@ bool GSCreator::getEPSIPreview(const QString &path, long start, long
return false;
}
- QString previewstr = QString::fromLatin1(buf);
+ TQString previewstr = TQString::fromLatin1(buf);
free(buf);
int offset = 0;
@@ -560,7 +560,7 @@ bool GSCreator::getEPSIPreview(const QString &path, long start, long
}
unsigned int colors = (1U << depth);
- QImage img(width, height, imagedepth, colors);
+ TQImage img(width, height, imagedepth, colors);
img.setAlphaBuffer(false);
if (imagedepth <= 8) {
@@ -575,7 +575,7 @@ bool GSCreator::getEPSIPreview(const QString &path, long start, long
unsigned int bytes_per_scan_line = bits_per_scan_line / 8;
if (bits_per_scan_line % 8) bytes_per_scan_line++;
const unsigned int bindatabytes = height * bytes_per_scan_line;
- QMemArray<unsigned char> bindata(bindatabytes);
+ TQMemArray<unsigned char> bindata(bindatabytes);
for (unsigned int i = 0; i < bindatabytes; i++) {
if (offset >= previewsize)
diff --git a/kfile-plugins/ps/gscreator.h b/kfile-plugins/ps/gscreator.h
index b91fb0b0..7139b233 100644
--- a/kfile-plugins/ps/gscreator.h
+++ b/kfile-plugins/ps/gscreator.h
@@ -27,14 +27,14 @@ class GSCreator : public ThumbCreator, public KDSCCommentHandler
{
public:
GSCreator() {};
- virtual bool create(const QString &path, int, int, QImage &img);
+ virtual bool create(const TQString &path, int, int, TQImage &img);
virtual Flags flags() const;
void comment(Name name);
private:
- static bool getEPSIPreview(const QString &path,
+ static bool getEPSIPreview(const TQString &path,
long start, long end,
- QImage &outimg,
+ TQImage &outimg,
int imgwidth, int imgheight);
bool endComments;
};
diff --git a/kfile-plugins/ps/kfile_ps.cpp b/kfile-plugins/ps/kfile_ps.cpp
index 6d3caa31..01136d88 100644
--- a/kfile-plugins/ps/kfile_ps.cpp
+++ b/kfile-plugins/ps/kfile_ps.cpp
@@ -20,7 +20,7 @@
#include "kfile_ps.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <klocale.h>
#include <kgenericfactory.h>
@@ -30,8 +30,8 @@ typedef KGenericFactory<KPSPlugin> PSFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_ps, PSFactory("kfile_ps"))
-KPSPlugin::KPSPlugin(QObject *parent, const char *name,
- const QStringList &preferredItems) :
+KPSPlugin::KPSPlugin(TQObject *parent, const char *name,
+ const TQStringList &preferredItems) :
KFilePlugin( parent, name, preferredItems )
{
kdDebug(7034) << "ps plugin\n";
@@ -47,11 +47,11 @@ void KPSPlugin::makeMimeTypeInfo( const char* mimeType )
// general group
KFileMimeTypeInfo::GroupInfo* group = addGroupInfo(info, "General", i18n("General"));
- addItemInfo(group, "Title", i18n("Title"), QVariant::String);
- addItemInfo(group, "Creator", i18n("Creator"), QVariant::String);
- addItemInfo(group, "CreationDate", i18n("Creation Date"), QVariant::String);
- addItemInfo(group, "For", i18n("For"), QVariant::String);
- addItemInfo(group, "Pages", i18n("Pages"), QVariant::UInt);
+ addItemInfo(group, "Title", i18n("Title"), TQVariant::String);
+ addItemInfo(group, "Creator", i18n("Creator"), TQVariant::String);
+ addItemInfo(group, "CreationDate", i18n("Creation Date"), TQVariant::String);
+ addItemInfo(group, "For", i18n("For"), TQVariant::String);
+ addItemInfo(group, "Pages", i18n("Pages"), TQVariant::UInt);
}
bool KPSPlugin::readInfo( KFileMetaInfo& info, uint /* what */)
@@ -63,7 +63,7 @@ bool KPSPlugin::readInfo( KFileMetaInfo& info, uint /* what */)
_dsc = new KDSC;
_dsc->setCommentHandler( this );
- FILE* fp = fopen( QFile::encodeName( info.path() ), "r" );
+ FILE* fp = fopen( TQFile::encodeName( info.path() ), "r" );
if( fp == 0 )
return false;
diff --git a/kfile-plugins/ps/kfile_ps.h b/kfile-plugins/ps/kfile_ps.h
index 339020d1..96a400a8 100644
--- a/kfile-plugins/ps/kfile_ps.h
+++ b/kfile-plugins/ps/kfile_ps.h
@@ -25,14 +25,14 @@
#include "dscparse_adapter.h"
-class QStringList;
+class TQStringList;
class KPSPlugin: public KFilePlugin, public KDSCCommentHandler
{
Q_OBJECT
public:
- KPSPlugin( QObject *parent, const char *name,
- const QStringList& preferredItems );
+ KPSPlugin( TQObject *parent, 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 525e53ae..8a0b0ce8 100644
--- a/kfile-plugins/raw/kcamerarawplugin.cpp
+++ b/kfile-plugins/raw/kcamerarawplugin.cpp
@@ -28,9 +28,9 @@
#include <kdebug.h>
#include <ktempfile.h>
#include <kimageio.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qwmatrix.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqwmatrix.h>
#include <cstdio>
@@ -49,10 +49,10 @@ extern "C" {
extern char model[];
}
-bool KCameraRawPlugin::createPreview(const QString &path, QImage &img)
+bool KCameraRawPlugin::createPreview(const TQString &path, TQImage &img)
{
/* Open file and extract thumbnail */
- FILE* input = fopen( QFile::encodeName(path), "rb" );
+ FILE* input = fopen( TQFile::encodeName(path), "rb" );
if( !input ) return false;
KTempFile output;
output.setAutoDelete(true);
@@ -66,8 +66,8 @@ bool KCameraRawPlugin::createPreview(const QString &path, QImage &img)
if( !img.load( output.name() ) ) return false;
if(orientation) {
- QWMatrix M;
- QWMatrix flip= QWMatrix(-1,0,0,1,0,0);
+ TQWMatrix M;
+ TQWMatrix flip= TQWMatrix(-1,0,0,1,0,0);
switch(orientation+1) { // notice intentional fallthroughs
case 2: M = flip; break;
case 4: M = flip;
@@ -83,8 +83,8 @@ bool KCameraRawPlugin::createPreview(const QString &path, QImage &img)
return true;
}
-KCameraRawPlugin::KCameraRawPlugin(QObject *parent, const char *name,
- const QStringList &args )
+KCameraRawPlugin::KCameraRawPlugin(TQObject *parent, const char *name,
+ const TQStringList &args )
: KFilePlugin(parent, name, args)
{
kdDebug(7034) << "KCameraRawPlugin c'tor" << endl;
@@ -98,11 +98,11 @@ KCameraRawPlugin::KCameraRawPlugin(QObject *parent, const char *name,
KFileMimeTypeInfo::ItemInfo* item;
item = addItemInfo( group, "Manufacturer", i18n("Camera Manufacturer"),
- QVariant::String );
+ TQVariant::String );
item = addItemInfo( group, "Model", i18n("Camera Model"),
- QVariant::String );
+ TQVariant::String );
item = addItemInfo( group, "Thumbnail", i18n("Thumbnail"),
- QVariant::Image );
+ TQVariant::Image );
setHint( item, KFileMimeTypeInfo::Thumbnail );
}
@@ -110,20 +110,20 @@ bool KCameraRawPlugin::readInfo( KFileMetaInfo& info, uint what )
{
kdDebug(7034) << "KCameraRawPlugin::readInfo()" << endl;
- const QString path( info.path() );
+ const TQString path( info.path() );
if ( path.isEmpty() ) // remote file
return false;
KFileMetaInfoGroup group = appendGroup( info, "Info" );
if ( what & KFileMetaInfo::Thumbnail ){
- QImage img;
+ TQImage img;
if( createPreview( path,img ) ) {
appendItem( group, "Thumbnail", img );
kdDebug(7034) << "thumbnail " << path << " created" << endl;
}
} else {
// HACK: We have to extract thumbnail to get any info...
- QImage img;
+ TQImage img;
createPreview( path,img );
}
kdDebug(7034) << "make=" << make << endl;
diff --git a/kfile-plugins/raw/kcamerarawplugin.h b/kfile-plugins/raw/kcamerarawplugin.h
index 5a097784..e205aa37 100644
--- a/kfile-plugins/raw/kcamerarawplugin.h
+++ b/kfile-plugins/raw/kcamerarawplugin.h
@@ -22,17 +22,17 @@
#include <kfilemetainfo.h>
-class QImage;
+class TQImage;
class KCameraRawPlugin: public KFilePlugin {
Q_OBJECT
public:
- KCameraRawPlugin(QObject *parent, const char *name, const QStringList& args);
+ KCameraRawPlugin(TQObject *parent, const char *name, const TQStringList& args);
virtual bool readInfo(KFileMetaInfo& info, uint what);
private:
- bool createPreview(const QString &path, QImage &img);
+ bool createPreview(const TQString &path, TQImage &img);
};
#endif /* KCAMERARAWPLUGIN_H */
diff --git a/kfile-plugins/rgb/kfile_rgb.cpp b/kfile-plugins/rgb/kfile_rgb.cpp
index b7b55035..cf832343 100644
--- a/kfile-plugins/rgb/kfile_rgb.cpp
+++ b/kfile-plugins/rgb/kfile_rgb.cpp
@@ -20,8 +20,8 @@
#include <config.h>
#include "kfile_rgb.h"
-#include <qfile.h>
-#include <qvalidator.h>
+#include <tqfile.h>
+#include <tqvalidator.h>
#include <kdebug.h>
#include <kgenericfactory.h>
@@ -32,7 +32,7 @@ typedef KGenericFactory<KRgbPlugin> RgbFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_rgb, RgbFactory("kfile_rgb"))
-KRgbPlugin::KRgbPlugin(QObject *parent, const char *name, const QStringList &args) :
+KRgbPlugin::KRgbPlugin(TQObject *parent, const char *name, const TQStringList &args) :
KFilePlugin(parent, name, args)
{
KFileMimeTypeInfo* info = addMimeTypeInfo("image/x-rgb");
@@ -43,39 +43,39 @@ KRgbPlugin::KRgbPlugin(QObject *parent, const char *name, const QStringList &arg
group = addGroupInfo(info, "Comment", i18n("Comment"));
- item = addItemInfo(group, "ImageName", i18n("Name"), QVariant::String);
+ item = addItemInfo(group, "ImageName", i18n("Name"), TQVariant::String);
setAttributes(item, KFileMimeTypeInfo::Modifiable);
setHint(item, KFileMimeTypeInfo::Description);
group = addGroupInfo(info, "Technical", i18n("Technical Details"));
- item = addItemInfo(group, "Dimensions", i18n("Dimensions"), QVariant::Size);
+ item = addItemInfo(group, "Dimensions", i18n("Dimensions"), TQVariant::Size);
setHint(item, KFileMimeTypeInfo::Size);
setUnit(item, KFileMimeTypeInfo::Pixels);
- item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), QVariant::Int);
+ item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), TQVariant::Int);
setUnit(item, KFileMimeTypeInfo::BitsPerPixel);
- item = addItemInfo(group, "ColorMode", i18n("Color Mode"), QVariant::String);
- item = addItemInfo(group, "Compression", i18n("Compression"), QVariant::String);
+ item = addItemInfo(group, "ColorMode", i18n("Color Mode"), TQVariant::String);
+ item = addItemInfo(group, "Compression", i18n("Compression"), TQVariant::String);
item = addItemInfo(group, "SharedRows",
i18n("percentage of avoided vertical redundancy (the higher the better)",
- "Shared Rows"), QVariant::String);
+ "Shared Rows"), TQVariant::String);
}
bool KRgbPlugin::readInfo(KFileMetaInfo& info, uint /*what*/)
{
- QFile file(info.path());
+ TQFile file(info.path());
if (!file.open(IO_ReadOnly)) {
- kdDebug(7034) << "Couldn't open " << QFile::encodeName(info.path()) << endl;
+ kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl;
return false;
}
- QDataStream dstream(&file);
+ TQDataStream dstream(&file);
Q_UINT16 magic;
Q_UINT8 storage;
@@ -116,7 +116,7 @@ bool KRgbPlugin::readInfo(KFileMetaInfo& info, uint /*what*/)
if (dimension == 1)
ysize = 1;
- appendItem(group, "Dimensions", QSize(xsize, ysize));
+ appendItem(group, "Dimensions", TQSize(xsize, ysize));
appendItem(group, "BitDepth", zsize * 8 * bpc);
if (zsize == 1)
@@ -134,13 +134,13 @@ bool KRgbPlugin::readInfo(KFileMetaInfo& info, uint /*what*/)
long compressed = file.size() - 512;
long verbatim = xsize * ysize * zsize;
appendItem(group, "Compression", i18n("Runlength Encoded")
- + QString(", %1%").arg(compressed * 100.0 / verbatim, 0, 'f', 1));
+ + TQString(", %1%").arg(compressed * 100.0 / verbatim, 0, 'f', 1));
long k;
Q_UINT32 offs;
- QMap<Q_UINT32, uint> map;
- QMap<Q_UINT32, uint>::Iterator it;
- QMap<Q_UINT32, uint>::Iterator end = map.end();
+ TQMap<Q_UINT32, uint> map;
+ TQMap<Q_UINT32, uint>::Iterator it;
+ TQMap<Q_UINT32, uint>::Iterator end = map.end();
for (k = 0; k < (ysize * zsize); k++) {
dstream >> offs;
if ((it = map.find(offs)) != end)
@@ -152,7 +152,7 @@ bool KRgbPlugin::readInfo(KFileMetaInfo& info, uint /*what*/)
k += it.data();
if (k)
- appendItem(group, "SharedRows", QString("%1%").arg(k * 100.0
+ appendItem(group, "SharedRows", TQString("%1%").arg(k * 100.0
/ (ysize * zsize), 0, 'f', 1));
else
appendItem(group, "SharedRows", i18n("None"));
@@ -170,10 +170,10 @@ bool KRgbPlugin::readInfo(KFileMetaInfo& info, uint /*what*/)
bool KRgbPlugin::writeInfo(const KFileMetaInfo& info) const
{
- QFile file(info.path());
+ TQFile file(info.path());
if (!file.open(IO_WriteOnly|IO_Raw)) {
- kdDebug(7034) << "couldn't open " << QFile::encodeName(info.path()) << endl;
+ kdDebug(7034) << "couldn't open " << TQFile::encodeName(info.path()) << endl;
return false;
}
@@ -182,8 +182,8 @@ bool KRgbPlugin::writeInfo(const KFileMetaInfo& info) const
return false;
}
- QDataStream dstream(&file);
- QString s = info["Comment"]["ImageName"].value().toString();
+ TQDataStream dstream(&file);
+ TQString s = info["Comment"]["ImageName"].value().toString();
s.truncate(79);
unsigned i;
@@ -198,10 +198,10 @@ bool KRgbPlugin::writeInfo(const KFileMetaInfo& info) const
// restrict to 79 ASCII characters
-QValidator* KRgbPlugin::createValidator(const QString&, const QString &,
- const QString &, QObject* parent, const char* name) const
+TQValidator* KRgbPlugin::createValidator(const TQString&, const TQString &,
+ const TQString &, TQObject* parent, const char* name) const
{
- return new QRegExpValidator(QRegExp("[\x0020-\x007E]{79}"), parent, name);
+ return new TQRegExpValidator(TQRegExp("[\x0020-\x007E]{79}"), parent, name);
}
diff --git a/kfile-plugins/rgb/kfile_rgb.h b/kfile-plugins/rgb/kfile_rgb.h
index dbbfef0e..c00ddfb5 100644
--- a/kfile-plugins/rgb/kfile_rgb.h
+++ b/kfile-plugins/rgb/kfile_rgb.h
@@ -22,19 +22,19 @@
#include <kfilemetainfo.h>
-class QStringList;
+class TQStringList;
class KRgbPlugin : public KFilePlugin
{
Q_OBJECT
public:
- KRgbPlugin(QObject *parent, const char *name, const QStringList& args);
+ KRgbPlugin(TQObject *parent, const char *name, const TQStringList& args);
virtual bool readInfo(KFileMetaInfo& info, uint what);
virtual bool writeInfo(const KFileMetaInfo& info) const;
- virtual QValidator* createValidator(const QString& mimetype,
- const QString &group, const QString &key,
- QObject* parent, const char* name) const;
+ virtual TQValidator* createValidator(const TQString& mimetype,
+ const TQString &group, const TQString &key,
+ TQObject* parent, const char* name) const;
};
diff --git a/kfile-plugins/tga/kfile_tga.cpp b/kfile-plugins/tga/kfile_tga.cpp
index 9c2c24dc..21d2c6d2 100644
--- a/kfile-plugins/tga/kfile_tga.cpp
+++ b/kfile-plugins/tga/kfile_tga.cpp
@@ -26,11 +26,11 @@
#include <kstringvalidator.h>
#include <kdebug.h>
-#include <qdict.h>
-#include <qvalidator.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qdatetime.h>
+#include <tqdict.h>
+#include <tqvalidator.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
#if !defined(__osf__)
#include <inttypes.h>
@@ -44,8 +44,8 @@ typedef KGenericFactory<KTgaPlugin> TgaFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_tga, TgaFactory( "kfile_tga" ))
-KTgaPlugin::KTgaPlugin(QObject *parent, const char *name,
- const QStringList &args)
+KTgaPlugin::KTgaPlugin(TQObject *parent, const char *name,
+ const TQStringList &args)
: KFilePlugin(parent, name, args)
{
@@ -57,15 +57,15 @@ KTgaPlugin::KTgaPlugin(QObject *parent, const char *name,
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Dimensions", i18n("Dimensions"), QVariant::Size);
+ item = addItemInfo(group, "Dimensions", i18n("Dimensions"), TQVariant::Size);
setHint( item, KFileMimeTypeInfo::Size );
setUnit(item, KFileMimeTypeInfo::Pixels);
- item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), QVariant::Int);
+ item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), TQVariant::Int);
setUnit(item, KFileMimeTypeInfo::BitsPerPixel);
- item = addItemInfo(group, "ColorMode", i18n("Color Mode"), QVariant::String);
- item = addItemInfo(group, "Compression", i18n("Compression"), QVariant::String);
+ item = addItemInfo(group, "ColorMode", i18n("Color Mode"), TQVariant::String);
+ item = addItemInfo(group, "Compression", i18n("Compression"), TQVariant::String);
}
@@ -73,18 +73,18 @@ bool KTgaPlugin::readInfo( KFileMetaInfo& info, uint what)
{
- QFile file(info.path());
+ TQFile file(info.path());
if (!file.open(IO_ReadOnly))
{
- kdDebug(7034) << "Couldn't open " << QFile::encodeName(info.path()) << endl;
+ kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl;
return false;
}
- QDataStream dstream(&file);
+ TQDataStream dstream(&file);
// TGA files are little-endian
- dstream.setByteOrder(QDataStream::LittleEndian);
+ dstream.setByteOrder(TQDataStream::LittleEndian);
// the vars for the image data
uint8_t tga_idlength;
@@ -116,7 +116,7 @@ bool KTgaPlugin::readInfo( KFileMetaInfo& info, uint what)
// output the useful bits
KFileMetaInfoGroup group = appendGroup(info, "Technical");
- appendItem(group, "Dimensions", QSize(tga_imagespec_width, tga_imagespec_height));
+ appendItem(group, "Dimensions", TQSize(tga_imagespec_width, tga_imagespec_height));
appendItem(group, "BitDepth", tga_imagespec_depth);
switch (tga_imagetype) {
diff --git a/kfile-plugins/tga/kfile_tga.h b/kfile-plugins/tga/kfile_tga.h
index cd224fdf..8b130e49 100644
--- a/kfile-plugins/tga/kfile_tga.h
+++ b/kfile-plugins/tga/kfile_tga.h
@@ -22,14 +22,14 @@
#include <kfilemetainfo.h>
-class QStringList;
+class TQStringList;
class KTgaPlugin: public KFilePlugin
{
Q_OBJECT
public:
- KTgaPlugin( QObject *parent, const char *name, const QStringList& args );
+ KTgaPlugin( TQObject *parent, 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 1e844d0d..ce55e5b3 100644
--- a/kfile-plugins/tiff/kfile_tiff.cpp
+++ b/kfile-plugins/tiff/kfile_tiff.cpp
@@ -22,10 +22,10 @@
#include <kgenericfactory.h>
#include <kdebug.h>
-#include <qstringlist.h>
-#include <qfile.h>
-#include <qdatetime.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
#include <tiff.h>
#include <tiffio.h>
@@ -34,8 +34,8 @@ typedef KGenericFactory<KTiffPlugin> TiffFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_tiff, TiffFactory("kfile_tiff"))
-KTiffPlugin::KTiffPlugin(QObject *parent, const char *name,
- const QStringList &args) : KFilePlugin(parent, name, args)
+KTiffPlugin::KTiffPlugin(TQObject *parent, const char *name,
+ const TQStringList &args) : KFilePlugin(parent, name, args)
{
kdDebug(7034) << "TIFF file meta info plugin" << endl;
KFileMimeTypeInfo* info = addMimeTypeInfo( "image/tiff" );
@@ -45,121 +45,121 @@ KTiffPlugin::KTiffPlugin(QObject *parent, const char *name,
KFileMimeTypeInfo::ItemInfo* item;
item = addItemInfo(group, "Description", i18n("Description"),
- QVariant::String);
+ TQVariant::String);
setHint(item, KFileMimeTypeInfo::Description);
item = addItemInfo(group, "Copyright", i18n("Copyright"),
- QVariant::String);
+ TQVariant::String);
item = addItemInfo(group, "ColorMode", i18n("Color Mode"),
- QVariant::String);
+ TQVariant::String);
item = addItemInfo(group, "Dimensions", i18n("Dimensions"),
- QVariant::Size);
+ TQVariant::Size);
setHint(item, KFileMimeTypeInfo::Size);
setUnit(item, KFileMimeTypeInfo::Pixels);
item = addItemInfo(group, "Resolution", i18n("Resolution"),
- QVariant::Size);
+ TQVariant::Size);
setUnit(item, KFileMimeTypeInfo::DotsPerInch);
item = addItemInfo(group, "BitDepth", i18n("Bit Depth"),
- QVariant::Int);
+ TQVariant::Int);
setUnit(item, KFileMimeTypeInfo::BitsPerPixel);
item = addItemInfo(group, "Compression", i18n("Compression"),
- QVariant::String);
+ TQVariant::String);
item = addItemInfo(group, "Software", i18n("Software"),
- QVariant::String);
+ TQVariant::String);
item = addItemInfo(group, "DateTime", i18n("Date/Time"),
- QVariant::DateTime);
+ TQVariant::DateTime);
item = addItemInfo(group, "Artist", i18n("Artist"),
- QVariant::String);
+ TQVariant::String);
setHint(item, KFileMimeTypeInfo::Author);
item = addItemInfo(group, "FaxPages", i18n("Fax Pages"),
- QVariant::Int);
+ TQVariant::Int);
group = addGroupInfo(info, "Scanner", i18n("Scanner"));
- item = addItemInfo(group, "Make", i18n("Make"), QVariant::String);
- item = addItemInfo(group, "Model", i18n("Model"), QVariant::String);
+ item = addItemInfo(group, "Make", i18n("Make"), TQVariant::String);
+ item = addItemInfo(group, "Model", i18n("Model"), TQVariant::String);
m_colorMode.setAutoDelete(true);
m_imageCompression.setAutoDelete(true);
m_colorMode.insert(PHOTOMETRIC_MINISWHITE,
- new QString(I18N_NOOP("Monochrome")));
+ new TQString(I18N_NOOP("Monochrome")));
m_colorMode.insert(PHOTOMETRIC_MINISBLACK,
- new QString(I18N_NOOP("Monochrome")));
+ new TQString(I18N_NOOP("Monochrome")));
m_colorMode.insert(PHOTOMETRIC_RGB,
- new QString(I18N_NOOP("RGB")));
+ new TQString(I18N_NOOP("RGB")));
m_colorMode.insert(PHOTOMETRIC_PALETTE,
- new QString(I18N_NOOP("Palette color")));
+ new TQString(I18N_NOOP("Palette color")));
m_colorMode.insert(PHOTOMETRIC_MASK,
- new QString(I18N_NOOP("Transparency mask")));
+ new TQString(I18N_NOOP("Transparency mask")));
m_colorMode.insert(PHOTOMETRIC_SEPARATED,
- new QString(I18N_NOOP("Color separations")));
+ new TQString(I18N_NOOP("Color separations")));
m_colorMode.insert(PHOTOMETRIC_YCBCR,
- new QString(I18N_NOOP("YCbCr")));
+ new TQString(I18N_NOOP("YCbCr")));
m_colorMode.insert(PHOTOMETRIC_CIELAB,
- new QString(I18N_NOOP("CIE Lab")));
+ new TQString(I18N_NOOP("CIE Lab")));
#ifdef PHOTOMETRIC_ITULAB
m_colorMode.insert(PHOTOMETRIC_ITULAB,
- new QString(I18N_NOOP("ITU Lab")));
+ new TQString(I18N_NOOP("ITU Lab")));
#endif
m_colorMode.insert(PHOTOMETRIC_LOGL,
- new QString(I18N_NOOP("LOGL")));
+ new TQString(I18N_NOOP("LOGL")));
m_colorMode.insert(PHOTOMETRIC_LOGLUV,
- new QString(I18N_NOOP("LOGLUV")));
+ new TQString(I18N_NOOP("LOGLUV")));
m_imageCompression.insert(COMPRESSION_NONE,
- new QString(I18N_NOOP("None")));
+ new TQString(I18N_NOOP("None")));
m_imageCompression.insert(COMPRESSION_CCITTRLE,
- new QString(I18N_NOOP("RLE")));
+ new TQString(I18N_NOOP("RLE")));
m_imageCompression.insert(COMPRESSION_CCITTFAX3,
- new QString(I18N_NOOP("G3 Fax")));
+ new TQString(I18N_NOOP("G3 Fax")));
m_imageCompression.insert(COMPRESSION_CCITTFAX4,
- new QString(I18N_NOOP("G4 Fax")));
+ new TQString(I18N_NOOP("G4 Fax")));
m_imageCompression.insert(COMPRESSION_LZW,
- new QString(I18N_NOOP("LZW")));
+ new TQString(I18N_NOOP("LZW")));
m_imageCompression.insert(COMPRESSION_OJPEG,
- new QString(I18N_NOOP("JPEG")));
+ new TQString(I18N_NOOP("JPEG")));
m_imageCompression.insert(COMPRESSION_JPEG,
- new QString(I18N_NOOP("JPEG DCT")));
+ new TQString(I18N_NOOP("JPEG DCT")));
#ifdef COMPRESSION_ADOBE_DEFLATE
m_imageCompression.insert(COMPRESSION_ADOBE_DEFLATE,
- new QString(I18N_NOOP("Adobe Deflate")));
+ new TQString(I18N_NOOP("Adobe Deflate")));
#endif
m_imageCompression.insert(COMPRESSION_NEXT,
- new QString(I18N_NOOP("NeXT 2-bit RLE")));
+ new TQString(I18N_NOOP("NeXT 2-bit RLE")));
m_imageCompression.insert(COMPRESSION_CCITTRLEW,
- new QString(I18N_NOOP("RLE Word")));
+ new TQString(I18N_NOOP("RLE Word")));
m_imageCompression.insert(COMPRESSION_PACKBITS,
- new QString(I18N_NOOP("Packbits")));
+ new TQString(I18N_NOOP("Packbits")));
m_imageCompression.insert(COMPRESSION_THUNDERSCAN,
- new QString(I18N_NOOP("Thunderscan RLE")));
+ new TQString(I18N_NOOP("Thunderscan RLE")));
m_imageCompression.insert(COMPRESSION_IT8CTPAD,
- new QString(I18N_NOOP("IT8 CT w/padding")));
+ new TQString(I18N_NOOP("IT8 CT w/padding")));
m_imageCompression.insert(COMPRESSION_IT8LW,
- new QString(I18N_NOOP("IT8 linework RLE")));
+ new TQString(I18N_NOOP("IT8 linework RLE")));
m_imageCompression.insert(COMPRESSION_IT8MP,
- new QString(I18N_NOOP("IT8 monochrome")));
+ new TQString(I18N_NOOP("IT8 monochrome")));
m_imageCompression.insert(COMPRESSION_IT8BL,
- new QString(I18N_NOOP("IT8 binary lineart")));
+ new TQString(I18N_NOOP("IT8 binary lineart")));
m_imageCompression.insert(COMPRESSION_PIXARFILM,
- new QString(I18N_NOOP("Pixar 10-bit LZW")));
+ new TQString(I18N_NOOP("Pixar 10-bit LZW")));
m_imageCompression.insert(COMPRESSION_PIXARLOG,
- new QString(I18N_NOOP("Pixar 11-bit ZIP")));
+ new TQString(I18N_NOOP("Pixar 11-bit ZIP")));
m_imageCompression.insert(COMPRESSION_DEFLATE,
- new QString(I18N_NOOP("Pixar deflate")));
+ new TQString(I18N_NOOP("Pixar deflate")));
m_imageCompression.insert(COMPRESSION_DCS,
- new QString(I18N_NOOP("Kodak DCS")));
+ new TQString(I18N_NOOP("Kodak DCS")));
m_imageCompression.insert(COMPRESSION_JBIG,
- new QString(I18N_NOOP("ISO JBIG")));
+ new TQString(I18N_NOOP("ISO JBIG")));
m_imageCompression.insert(COMPRESSION_SGILOG,
- new QString(I18N_NOOP("SGI log luminance RLE")));
+ new TQString(I18N_NOOP("SGI log luminance RLE")));
m_imageCompression.insert(COMPRESSION_SGILOG24,
- new QString(I18N_NOOP("SGI log 24-bit packed")));
+ new TQString(I18N_NOOP("SGI log 24-bit packed")));
}
-QDateTime KTiffPlugin::tiffDate(const QString& s) const
+TQDateTime KTiffPlugin::tiffDate(const TQString& s) const
{
- QDateTime dt;
- QRegExp rxDate("^([0-9]{4}):([0-9]{2}):([0-9]{2})\\s"
+ TQDateTime dt;
+ TQRegExp rxDate("^([0-9]{4}):([0-9]{2}):([0-9]{2})\\s"
"([0-9]{2}):([0-9]{2}):([0-9]{2})$");
if (rxDate.search(s) != -1)
@@ -171,8 +171,8 @@ QDateTime KTiffPlugin::tiffDate(const QString& s) const
int min = rxDate.cap(5).toInt();
int sec = rxDate.cap(6).toInt();
- QDate d = QDate(year, month, day);
- QTime t = QTime(hour, min, sec);
+ TQDate d = TQDate(year, month, day);
+ TQTime t = TQTime(hour, min, sec);
if (d.isValid() && t.isValid())
{
@@ -186,7 +186,7 @@ QDateTime KTiffPlugin::tiffDate(const QString& s) const
bool KTiffPlugin::readInfo(KFileMetaInfo& info, uint)
{
- TIFF *tiff = TIFFOpen(QFile::encodeName(info.path()), "r");
+ TIFF *tiff = TIFFOpen(TQFile::encodeName(info.path()), "r");
if (!tiff)
return false;
@@ -248,15 +248,15 @@ bool KTiffPlugin::readInfo(KFileMetaInfo& info, uint)
int imageBpp = bitsPerSample*samplesPerPixel;
if (imageAlpha && colorMode==PHOTOMETRIC_RGB)
- m_colorMode.replace(PHOTOMETRIC_RGB, new QString(I18N_NOOP("RGBA")));
+ m_colorMode.replace(PHOTOMETRIC_RGB, new TQString(I18N_NOOP("RGBA")));
KFileMetaInfoGroup group = appendGroup(info, "General");
if (description)
- appendItem(group, "Description", QString(description));
- appendItem(group, "Dimensions", QSize(imageWidth, imageLength));
+ appendItem(group, "Description", TQString(description));
+ appendItem(group, "Dimensions", TQSize(imageWidth, imageLength));
appendItem(group, "BitDepth", imageBpp);
if (imageXResolution>0 && imageYResolution>0)
- appendItem(group, "Resolution", QSize(
+ appendItem(group, "Resolution", TQSize(
static_cast<int>(imageXResolution),
static_cast<int>(imageYResolution)));
if (m_colorMode[colorMode])
@@ -265,16 +265,16 @@ bool KTiffPlugin::readInfo(KFileMetaInfo& info, uint)
appendItem(group, "Compression", *m_imageCompression[imageCompression]);
if (datetime)
{
- QDateTime dt = tiffDate(QString(datetime));
+ TQDateTime dt = tiffDate(TQString(datetime));
if (dt.isValid())
appendItem(group, "DateTime", dt);
}
if (copyright)
- appendItem(group, "Copyright", QString(copyright));
+ appendItem(group, "Copyright", TQString(copyright));
if (software)
- appendItem(group, "Software", QString(software));
+ appendItem(group, "Software", TQString(software));
if (artist)
- appendItem(group, "Artist", QString(artist));
+ appendItem(group, "Artist", TQString(artist));
if (faxPages>0 && (imageCompression==COMPRESSION_CCITTFAX3 ||
imageCompression==COMPRESSION_CCITTFAX4))
@@ -286,9 +286,9 @@ bool KTiffPlugin::readInfo(KFileMetaInfo& info, uint)
{
group = appendGroup(info, "Scanner");
if (scannerMake)
- appendItem(group, "Make", QString(scannerMake));
+ appendItem(group, "Make", TQString(scannerMake));
if (scannerModel)
- appendItem(group, "Model", QString(scannerModel));
+ appendItem(group, "Model", TQString(scannerModel));
}
TIFFClose(tiff);
diff --git a/kfile-plugins/tiff/kfile_tiff.h b/kfile-plugins/tiff/kfile_tiff.h
index 8985288d..54087ea4 100644
--- a/kfile-plugins/tiff/kfile_tiff.h
+++ b/kfile-plugins/tiff/kfile_tiff.h
@@ -22,21 +22,21 @@
#include <kfilemetainfo.h>
-#include <qintdict.h>
+#include <tqintdict.h>
class KTiffPlugin: public KFilePlugin
{
Q_OBJECT
public:
- KTiffPlugin(QObject *parent, const char *name, const QStringList& args);
+ KTiffPlugin(TQObject *parent, const char *name, const TQStringList& args);
virtual bool readInfo(KFileMetaInfo& info, uint what);
private:
- QDateTime tiffDate(const QString&) const;
+ TQDateTime tiffDate(const TQString&) const;
- QIntDict<QString> m_colorMode;
- QIntDict<QString> m_imageCompression;
+ TQIntDict<TQString> m_colorMode;
+ TQIntDict<TQString> m_imageCompression;
};
#endif
diff --git a/kfile-plugins/xbm/kfile_xbm.cpp b/kfile-plugins/xbm/kfile_xbm.cpp
index d62471f5..755201a3 100644
--- a/kfile-plugins/xbm/kfile_xbm.cpp
+++ b/kfile-plugins/xbm/kfile_xbm.cpp
@@ -26,11 +26,11 @@
#include <kstringvalidator.h>
#include <kdebug.h>
-#include <qdict.h>
-#include <qvalidator.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qdatetime.h>
+#include <tqdict.h>
+#include <tqvalidator.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
#if !defined(__osf__)
#include <inttypes.h>
@@ -42,8 +42,8 @@ typedef KGenericFactory<KXbmPlugin> XbmFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_xbm, XbmFactory( "kfile_xbm" ))
-KXbmPlugin::KXbmPlugin(QObject *parent, const char *name,
- const QStringList &args)
+KXbmPlugin::KXbmPlugin(TQObject *parent, const char *name,
+ const TQStringList &args)
: KFilePlugin(parent, name, args)
{
@@ -55,7 +55,7 @@ KXbmPlugin::KXbmPlugin(QObject *parent, const char *name,
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Dimensions", i18n("Dimensions"), QVariant::Size);
+ item = addItemInfo(group, "Dimensions", i18n("Dimensions"), TQVariant::Size);
setHint( item, KFileMimeTypeInfo::Size );
setUnit(item, KFileMimeTypeInfo::Pixels);
}
@@ -96,11 +96,11 @@ unsigned long KXbmPlugin::xbm_processLine(char * linebuf)
bool KXbmPlugin::readInfo( KFileMetaInfo& info, uint what)
{
- QFile file(info.path());
+ TQFile file(info.path());
if (!file.open(IO_ReadOnly))
{
- kdDebug(7034) << "Couldn't open " << QFile::encodeName(info.path()) << endl;
+ kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl;
return false;
}
@@ -118,7 +118,7 @@ bool KXbmPlugin::readInfo( KFileMetaInfo& info, uint what)
if ((width > 0) && (height > 0)) {
// we have valid looking data
KFileMetaInfoGroup group = appendGroup(info, "Technical");
- appendItem(group, "Dimensions", QSize(width, height));
+ appendItem(group, "Dimensions", TQSize(width, height));
return true;
}
diff --git a/kfile-plugins/xbm/kfile_xbm.h b/kfile-plugins/xbm/kfile_xbm.h
index 8cc571e1..7b62047c 100644
--- a/kfile-plugins/xbm/kfile_xbm.h
+++ b/kfile-plugins/xbm/kfile_xbm.h
@@ -22,14 +22,14 @@
#include <kfilemetainfo.h>
-class QStringList;
+class TQStringList;
class KXbmPlugin: public KFilePlugin
{
Q_OBJECT
public:
- KXbmPlugin( QObject *parent, const char *name, const QStringList& args );
+ KXbmPlugin( TQObject *parent, 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 3fd188b7..c0e80027 100644
--- a/kfile-plugins/xpm/kfile_xpm.cpp
+++ b/kfile-plugins/xpm/kfile_xpm.cpp
@@ -19,7 +19,7 @@
***************************************************************************/
#include <config.h>
-#include <qimage.h>
+#include <tqimage.h>
#include "kfile_xpm.h"
#include <kgenericfactory.h>
@@ -32,7 +32,7 @@ K_EXPORT_COMPONENT_FACTORY(kfile_xpm, xpmFactory( "kfile_xpm" ))
//--------------------------------------------------------------------------------
-xpmPlugin::xpmPlugin(QObject *parent, const char *name, const QStringList &args)
+xpmPlugin::xpmPlugin(TQObject *parent, const char *name, const TQStringList &args)
: KFilePlugin(parent, name, args)
{
KFileMimeTypeInfo* info = addMimeTypeInfo( "image/x-xpm" );
@@ -44,11 +44,11 @@ xpmPlugin::xpmPlugin(QObject *parent, const char *name, const QStringList &args)
KFileMimeTypeInfo::ItemInfo* item;
// our new items in the group
- item = addItemInfo(group, "Dimension", i18n("Dimension"), QVariant::Size);
+ item = addItemInfo(group, "Dimension", i18n("Dimension"), TQVariant::Size);
setHint(item, KFileMimeTypeInfo::Size);
setUnit(item, KFileMimeTypeInfo::Pixels);
- item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), QVariant::Int);
+ item = addItemInfo(group, "BitDepth", i18n("Bit Depth"), TQVariant::Int);
setUnit(item, KFileMimeTypeInfo::BitsPerPixel);
}
@@ -56,7 +56,7 @@ xpmPlugin::xpmPlugin(QObject *parent, const char *name, const QStringList &args)
bool xpmPlugin::readInfo(KFileMetaInfo& info, uint /*what*/)
{
- QImage pix;
+ TQImage pix;
if ( ! pix.load(info.path(), "XPM") ) return false;
diff --git a/kfile-plugins/xpm/kfile_xpm.h b/kfile-plugins/xpm/kfile_xpm.h
index c68ad4eb..f4660c45 100644
--- a/kfile-plugins/xpm/kfile_xpm.h
+++ b/kfile-plugins/xpm/kfile_xpm.h
@@ -29,14 +29,14 @@
*/
#include <kfilemetainfo.h>
-class QStringList;
+class TQStringList;
class xpmPlugin: public KFilePlugin
{
Q_OBJECT
public:
- xpmPlugin(QObject *parent, const char *name, const QStringList& args);
+ xpmPlugin(TQObject *parent, const char *name, const TQStringList& args);
virtual bool readInfo(KFileMetaInfo& info, uint what);
};
diff --git a/kgamma/kcmkgamma/displaynumber.cpp b/kgamma/kcmkgamma/displaynumber.cpp
index cb04f513..b3486e38 100644
--- a/kgamma/kcmkgamma/displaynumber.cpp
+++ b/kgamma/kcmkgamma/displaynumber.cpp
@@ -15,18 +15,18 @@
* *
***************************************************************************/
-#include <qstring.h>
-#include <qfontmetrics.h>
+#include <tqstring.h>
+#include <tqfontmetrics.h>
#include "displaynumber.h"
-DisplayNumber::DisplayNumber(QWidget *parent, int digits, \
- int prec, const char *name) : QLabel(parent,name) {
+DisplayNumber::DisplayNumber(TQWidget *parent, int digits, \
+ int prec, const char *name) : TQLabel(parent,name) {
setPrecision(prec);
setWidth(digits);
- setFrameStyle(QFrame::Panel | QFrame::Sunken);
+ setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
setBackgroundMode(Qt::PaletteBase);
setAlignment(Qt::AlignCenter);
setFocusPolicy(NoFocus);
@@ -35,14 +35,14 @@ DisplayNumber::DisplayNumber(QWidget *parent, int digits, \
DisplayNumber::~DisplayNumber(){
}
-void DisplayNumber::setFont( const QFont & f ) {
- QLabel::setFont(f);
+void DisplayNumber::setFont( const TQFont & f ) {
+ TQLabel::setFont(f);
setWidth(dg);
}
void DisplayNumber::setWidth(int digits) {
- QFontMetrics fm(font());
- QString s("0123456789.+-");
+ TQFontMetrics fm(font());
+ TQString s("0123456789.+-");
int width = 0, charWidth=0;
for (int i = 0; i < 11; i++, width = fm.width(s[i]))
@@ -53,7 +53,7 @@ void DisplayNumber::setWidth(int digits) {
}
void DisplayNumber::setNum(double num) {
- QString text;
+ TQString text;
setText(text.setNum(num, 'f', precision));
}
diff --git a/kgamma/kcmkgamma/displaynumber.h b/kgamma/kcmkgamma/displaynumber.h
index e86d6d3a..d5662fae 100644
--- a/kgamma/kcmkgamma/displaynumber.h
+++ b/kgamma/kcmkgamma/displaynumber.h
@@ -18,18 +18,18 @@
#ifndef DISPLAYNUMBER_H
#define DISPLAYNUMBER_H
-#include <qlabel.h>
+#include <tqlabel.h>
/**
*@author Michael v.Ostheim
*/
-class DisplayNumber : public QLabel {
+class DisplayNumber : public TQLabel {
Q_OBJECT
public:
- DisplayNumber(QWidget *parent=0, int digits=0, int prec=0, const char *name=0);
+ DisplayNumber(TQWidget *parent=0, int digits=0, int prec=0, const char *name=0);
~DisplayNumber();
- void setFont( const QFont & f );
+ void setFont( const TQFont & f );
void setNum(double num);
void setWidth(int digits);
void setPrecision(int prec) { precision = prec; };
diff --git a/kgamma/kcmkgamma/gammactrl.cpp b/kgamma/kcmkgamma/gammactrl.cpp
index 2052fd34..3871a18d 100644
--- a/kgamma/kcmkgamma/gammactrl.cpp
+++ b/kgamma/kcmkgamma/gammactrl.cpp
@@ -15,9 +15,9 @@
* *
***************************************************************************/
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qstring.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqstring.h>
#include <kdialog.h>
@@ -26,9 +26,9 @@
#include "displaynumber.h"
#include "gammactrl.moc"
-GammaCtrl::GammaCtrl(QWidget *parent, XVidExtWrap *xvid, int channel, \
- const QString& mingamma, const QString& maxgamma, const QString& setgamma, \
- const char *name) : QHBox(parent, name)
+GammaCtrl::GammaCtrl(TQWidget *parent, XVidExtWrap *xvid, int channel, \
+ const TQString& mingamma, const TQString& maxgamma, const TQString& setgamma, \
+ const char *name) : TQHBox(parent, name)
{
int maxslider = (int)( ( maxgamma.toDouble() - mingamma.toDouble() \
+ 0.0005 ) * 20 );
@@ -47,14 +47,14 @@ GammaCtrl::GammaCtrl(QWidget *parent, XVidExtWrap *xvid, int channel, \
setSpacing(KDialog::spacingHint());
- slider = new QSlider(Horizontal, this);
+ slider = new TQSlider(Horizontal, this);
slider->setFixedHeight(24);
- slider->setTickmarks(QSlider::Below);
+ slider->setTickmarks(TQSlider::Below);
slider->setRange(0, maxslider);
slider->setTickInterval(2);
slider->setValue(setslider);
- connect(slider, SIGNAL(valueChanged(int)), SLOT(setGamma(int)));
- connect(slider, SIGNAL(sliderPressed()), SLOT(pressed()));
+ connect(slider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(setGamma(int)));
+ connect(slider, TQT_SIGNAL(sliderPressed()), TQT_SLOT(pressed()));
textfield = new DisplayNumber(this, 4, 2);
textfield->setText(setgamma);
@@ -66,7 +66,7 @@ GammaCtrl::~GammaCtrl()
}
/** set gamma, slider and textfield */
-void GammaCtrl::setGamma(const QString& gamma){
+void GammaCtrl::setGamma(const TQString& gamma){
int sliderpos;
sliderpos = (int)( ( gamma.toDouble() - mgamma.toDouble() + 0.0005 ) * 20 );
@@ -81,7 +81,7 @@ void GammaCtrl::setGamma(const QString& gamma){
}
/** set slider and textfield */
-void GammaCtrl::setControl(const QString& gamma){
+void GammaCtrl::setControl(const TQString& gamma){
int sliderpos;
sliderpos = (int)( ( gamma.toDouble() - mgamma.toDouble() + 0.0005 ) * 20 );
@@ -89,8 +89,8 @@ void GammaCtrl::setControl(const QString& gamma){
}
/** Return the current gamma value with precision prec */
-QString GammaCtrl::gamma(int prec){
- QString gammatext;
+TQString GammaCtrl::gamma(int prec){
+ TQString gammatext;
gammatext.setNum(xv->getGamma(gchannel) + 0.0005, 'f', prec);
return(gammatext);
diff --git a/kgamma/kcmkgamma/gammactrl.h b/kgamma/kcmkgamma/gammactrl.h
index 0d6ea890..97a1ab9e 100644
--- a/kgamma/kcmkgamma/gammactrl.h
+++ b/kgamma/kcmkgamma/gammactrl.h
@@ -21,35 +21,35 @@
#ifndef GAMMACTRL_H
#define GAMMACTRL_H
-#include <qhbox.h>
-#include <qslider.h>
+#include <tqhbox.h>
+#include <tqslider.h>
-class QString;
+class TQString;
class DisplayNumber;
class XVidExtWrap;
-class GammaCtrl : public QHBox {
+class GammaCtrl : public TQHBox {
Q_OBJECT
public:
/** construktor */
- GammaCtrl(QWidget *parent=0, XVidExtWrap *xvid=0, int channel=0, \
- const QString& mingamma="0.40", const QString& maxgamma="3.50", \
- const QString& setgamma="1.00", const char *name=0 );
+ GammaCtrl(TQWidget *parent=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 */
~GammaCtrl();
/** Return the current gamma value with precision prec */
- QString gamma(int);
+ TQString gamma(int);
/** Set gamma, slider and textfield */
- void setGamma(const QString&);
+ void setGamma(const TQString&);
/** Set slider and textfield */
- void setControl(const QString&);
+ void setControl(const TQString&);
/** Disable the slider */
void disableSlider() { slider->setDisabled(true);};
private:
- QString mgamma;
- QSlider *slider;
+ TQString mgamma;
+ TQSlider *slider;
DisplayNumber *textfield;
bool suspended, changed;
int gchannel, oldpos;
diff --git a/kgamma/kcmkgamma/kgamma.cpp b/kgamma/kcmkgamma/kgamma.cpp
index 427d01c4..ebcfb737 100644
--- a/kgamma/kcmkgamma/kgamma.cpp
+++ b/kgamma/kcmkgamma/kgamma.cpp
@@ -17,15 +17,15 @@
#include <unistd.h>
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qstring.h>
-#include <qlayout.h>
-#include <qstringlist.h>
-#include <qdir.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qwidgetstack.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
+#include <tqdir.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqwidgetstack.h>
#include <kstandarddirs.h>
#include <kconfig.h>
@@ -42,7 +42,7 @@
#include "kgamma.h"
#include "kgamma.moc"
-typedef KGenericFactory<KGamma, QWidget> KGammaFactory;
+typedef KGenericFactory<KGamma, TQWidget> KGammaFactory;
K_EXPORT_COMPONENT_FACTORY ( kcm_kgamma, KGammaFactory( "kgamma" ) )
extern "C"
@@ -55,7 +55,7 @@ extern "C"
}
}
-KGamma::KGamma(QWidget *parent, const char *name, const QStringList&)
+KGamma::KGamma(TQWidget *parent, const char *name, const TQStringList&)
:KCModule(parent,name)
{
bool ok;
@@ -123,15 +123,15 @@ KGamma::~KGamma() {
/** User interface */
void KGamma::setupUI() {
- QBoxLayout *topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQBoxLayout *topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
if (GammaCorrection) {
- QHBoxLayout *hbox = new QHBoxLayout( topLayout );
- QLabel *label = new QLabel( i18n( "&Select test picture:" ) , this);
- QComboBox *combo = new QComboBox( this );
+ TQHBoxLayout *hbox = new TQHBoxLayout( topLayout );
+ TQLabel *label = new TQLabel( i18n( "&Select test picture:" ) , this);
+ TQComboBox *combo = new TQComboBox( this );
label->setBuddy( combo );
- QStringList list;
+ TQStringList list;
list << i18n( "Gray Scale" )
<< i18n( "RGB Scale" )
<< i18n( "CMY Scale" )
@@ -144,100 +144,100 @@ void KGamma::setupUI() {
hbox->addWidget( combo );
hbox->addStretch();
- QWidgetStack *stack = new QWidgetStack( this );
- stack->setFrameStyle( QFrame::Box | QFrame::Raised );
+ TQWidgetStack *stack = new TQWidgetStack( this );
+ stack->setFrameStyle( TQFrame::Box | TQFrame::Raised );
- connect( combo, SIGNAL( activated( int ) ),
- stack, SLOT( raiseWidget( int ) ) );
+ connect( combo, TQT_SIGNAL( activated( int ) ),
+ stack, TQT_SLOT( raiseWidget( int ) ) );
- QPixmap background;
+ TQPixmap background;
background.load(locate("data", "kgamma/pics/background.png"));
- QLabel *pic1 = new QLabel(stack);
+ TQLabel *pic1 = new TQLabel(stack);
pic1->setMinimumSize(530, 171);
pic1->setBackgroundPixmap(background);
- pic1->setPixmap(QPixmap(locate("data", "kgamma/pics/greyscale.png")));
+ pic1->setPixmap(TQPixmap(locate("data", "kgamma/pics/greyscale.png")));
pic1->setAlignment(AlignCenter);
stack->addWidget( pic1, 0 );
- QLabel *pic2 = new QLabel(stack);
+ TQLabel *pic2 = new TQLabel(stack);
pic2->setBackgroundPixmap(background);
- pic2->setPixmap(QPixmap(locate("data", "kgamma/pics/rgbscale.png")));
+ pic2->setPixmap(TQPixmap(locate("data", "kgamma/pics/rgbscale.png")));
pic2->setAlignment(AlignCenter);
stack->addWidget( pic2, 1 );
- QLabel *pic3 = new QLabel(stack);
+ TQLabel *pic3 = new TQLabel(stack);
pic3->setBackgroundPixmap(background);
- pic3->setPixmap(QPixmap(locate("data", "kgamma/pics/cmyscale.png")));
+ pic3->setPixmap(TQPixmap(locate("data", "kgamma/pics/cmyscale.png")));
pic3->setAlignment(AlignCenter);
stack->addWidget( pic3, 2 );
- QLabel *pic4 = new QLabel(stack);
+ TQLabel *pic4 = new TQLabel(stack);
pic4->setBackgroundPixmap(background);
- pic4->setPixmap(QPixmap(locate("data", "kgamma/pics/darkgrey.png")));
+ pic4->setPixmap(TQPixmap(locate("data", "kgamma/pics/darkgrey.png")));
pic4->setAlignment(AlignCenter);
stack->addWidget( pic4, 3 );
- QLabel *pic5 = new QLabel(stack);
+ TQLabel *pic5 = new TQLabel(stack);
pic5->setBackgroundPixmap(background);
- pic5->setPixmap(QPixmap(locate("data", "kgamma/pics/midgrey.png")));
+ pic5->setPixmap(TQPixmap(locate("data", "kgamma/pics/midgrey.png")));
pic5->setAlignment(AlignCenter);
stack->addWidget( pic5, 4 );
- QLabel *pic6 = new QLabel(stack);
+ TQLabel *pic6 = new TQLabel(stack);
pic6->setBackgroundPixmap(background);
- pic6->setPixmap(QPixmap(locate("data", "kgamma/pics/lightgrey.png")));
+ pic6->setPixmap(TQPixmap(locate("data", "kgamma/pics/lightgrey.png")));
pic6->setAlignment(AlignCenter);
stack->addWidget( pic6, 5 );
topLayout->addWidget(stack, 10);
//Sliders for gamma correction
- QFrame *frame1 = new QFrame(this);
- frame1->setFrameStyle( QFrame::GroupBoxPanel | QFrame::Plain );
+ TQFrame *frame1 = new TQFrame(this);
+ frame1->setFrameStyle( TQFrame::GroupBoxPanel | TQFrame::Plain );
- QFrame *frame2 = new QFrame(this);
- frame2->setFrameStyle( QFrame::GroupBoxPanel | QFrame::Plain );
+ TQFrame *frame2 = new TQFrame(this);
+ frame2->setFrameStyle( TQFrame::GroupBoxPanel | TQFrame::Plain );
- QLabel *gammalabel = new QLabel(this);
+ TQLabel *gammalabel = new TQLabel(this);
gammalabel->setText(i18n("Gamma:"));
- QLabel *redlabel = new QLabel(this);
+ TQLabel *redlabel = new TQLabel(this);
redlabel->setText(i18n("Red:"));
- QLabel *greenlabel = new QLabel(this);
+ TQLabel *greenlabel = new TQLabel(this);
greenlabel->setText(i18n("Green:"));
- QLabel *bluelabel = new QLabel(this);
+ TQLabel *bluelabel = new TQLabel(this);
bluelabel->setText(i18n("Blue:"));
gctrl = new GammaCtrl(this, xv);
- connect(gctrl, SIGNAL(gammaChanged(int)), SLOT(Changed()));
- connect(gctrl, SIGNAL(gammaChanged(int)), SLOT(SyncScreens()));
+ connect(gctrl, TQT_SIGNAL(gammaChanged(int)), TQT_SLOT(Changed()));
+ connect(gctrl, TQT_SIGNAL(gammaChanged(int)), TQT_SLOT(SyncScreens()));
gammalabel->setBuddy( gctrl );
rgctrl = new GammaCtrl(this, xv, XVidExtWrap::Red);
- connect(rgctrl, SIGNAL(gammaChanged(int)), SLOT(Changed()));
- connect(rgctrl, SIGNAL(gammaChanged(int)), SLOT(SyncScreens()));
- connect(gctrl, SIGNAL(gammaChanged(int)), rgctrl, SLOT(setCtrl(int)));
- connect(rgctrl, SIGNAL(gammaChanged(int)), gctrl, SLOT(suspend()));
+ connect(rgctrl, TQT_SIGNAL(gammaChanged(int)), TQT_SLOT(Changed()));
+ connect(rgctrl, TQT_SIGNAL(gammaChanged(int)), TQT_SLOT(SyncScreens()));
+ connect(gctrl, TQT_SIGNAL(gammaChanged(int)), rgctrl, TQT_SLOT(setCtrl(int)));
+ connect(rgctrl, TQT_SIGNAL(gammaChanged(int)), gctrl, TQT_SLOT(suspend()));
redlabel->setBuddy( rgctrl );
ggctrl = new GammaCtrl(this, xv, XVidExtWrap::Green);
- connect(ggctrl, SIGNAL(gammaChanged(int)), SLOT(Changed()));
- connect(ggctrl, SIGNAL(gammaChanged(int)), SLOT(SyncScreens()));
- connect(gctrl, SIGNAL(gammaChanged(int)), ggctrl, SLOT(setCtrl(int)));
- connect(ggctrl, SIGNAL(gammaChanged(int)), gctrl, SLOT(suspend()));
+ connect(ggctrl, TQT_SIGNAL(gammaChanged(int)), TQT_SLOT(Changed()));
+ connect(ggctrl, TQT_SIGNAL(gammaChanged(int)), TQT_SLOT(SyncScreens()));
+ connect(gctrl, TQT_SIGNAL(gammaChanged(int)), ggctrl, TQT_SLOT(setCtrl(int)));
+ connect(ggctrl, TQT_SIGNAL(gammaChanged(int)), gctrl, TQT_SLOT(suspend()));
greenlabel->setBuddy( ggctrl );
bgctrl = new GammaCtrl(this, xv, XVidExtWrap::Blue);
- connect(bgctrl, SIGNAL(gammaChanged(int)), SLOT(Changed()));
- connect(bgctrl, SIGNAL(gammaChanged(int)), SLOT(SyncScreens()));
- connect(gctrl, SIGNAL(gammaChanged(int)), bgctrl, SLOT(setCtrl(int)));
- connect(bgctrl, SIGNAL(gammaChanged(int)), gctrl, SLOT(suspend()));
+ connect(bgctrl, TQT_SIGNAL(gammaChanged(int)), TQT_SLOT(Changed()));
+ connect(bgctrl, TQT_SIGNAL(gammaChanged(int)), TQT_SLOT(SyncScreens()));
+ connect(gctrl, TQT_SIGNAL(gammaChanged(int)), bgctrl, TQT_SLOT(setCtrl(int)));
+ connect(bgctrl, TQT_SIGNAL(gammaChanged(int)), gctrl, TQT_SLOT(suspend()));
bluelabel->setBuddy( bgctrl );
- QGridLayout *grid = new QGridLayout(4, 9);
+ TQGridLayout *grid = new TQGridLayout(4, 9);
grid->setSpacing(8);
grid->addMultiCellWidget(frame1, 0, 2, 0, 3);
grid->addMultiCellWidget(frame2, 4, 8, 0, 3);
@@ -253,20 +253,20 @@ void KGamma::setupUI() {
topLayout->addLayout(grid);
//Options
- QHBox *options = new QHBox(this);
+ TQHBox *options = new TQHBox(this);
- xf86cfgbox = new QCheckBox( i18n("Save settings to XF86Config"), options );
- connect(xf86cfgbox, SIGNAL(clicked()), SLOT(changeConfig()));
+ xf86cfgbox = new TQCheckBox( i18n("Save settings to XF86Config"), options );
+ connect(xf86cfgbox, TQT_SIGNAL(clicked()), TQT_SLOT(changeConfig()));
- syncbox = new QCheckBox( i18n("Sync screens"), options );
- connect(syncbox, SIGNAL(clicked()), SLOT(SyncScreens()));
- connect(syncbox, SIGNAL(clicked()), SLOT(Changed()));
+ syncbox = new TQCheckBox( i18n("Sync screens"), options );
+ connect(syncbox, TQT_SIGNAL(clicked()), TQT_SLOT(SyncScreens()));
+ connect(syncbox, TQT_SIGNAL(clicked()), TQT_SLOT(Changed()));
- screenselect = new QComboBox( options );
+ screenselect = new TQComboBox( options );
for ( int i = 0; i < ScreenCount; i++ )
screenselect->insertItem( i18n("Screen %1").arg(i+1) );
screenselect->setCurrentItem(currentScreen);
- connect(screenselect, SIGNAL(activated(int)), SLOT(changeScreen(int)));
+ connect(screenselect, TQT_SIGNAL(activated(int)), TQT_SLOT(changeScreen(int)));
options->setSpacing( 10 );
options->setStretchFactor( xf86cfgbox, 10 );
@@ -276,7 +276,7 @@ void KGamma::setupUI() {
topLayout->addWidget(options);
}
else {
- QLabel *error = new QLabel(this);
+ TQLabel *error = new TQLabel(this);
error->setText(i18n("Gamma correction is not supported by your"
" graphics hardware or driver."));
error->setAlignment(AlignCenter);
@@ -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( QString("Screen %1").arg(i) );
+ config->setGroup( TQString("Screen %1").arg(i) );
config->writeEntry("rgamma", rgamma[i]);
config->writeEntry("ggamma", ggamma[i]);
config->writeEntry("bgamma", bgamma[i]);
@@ -364,7 +364,7 @@ void KGamma::save() {
config->writeEntry("use", "XF86Config");
if ( !rootProcess->isRunning() ) {
- QString Arguments = "xf86gammacfg ";
+ TQString Arguments = "xf86gammacfg ";
for (int i = 0; i < ScreenCount; i++)
Arguments += rgamma[assign[i]] + " " + ggamma[assign[i]] + " " + \
bgamma[assign[i]] + " ";
@@ -387,7 +387,7 @@ void KGamma::defaults() {
bool KGamma::loadSettings() {
KConfig *config = new KConfig("kgammarc");
config->setGroup("ConfigFile");
- QString ConfigFile( config->readEntry("use") );
+ TQString ConfigFile( config->readEntry("use") );
config->setGroup("SyncBox");
if ( config->readEntry("sync") == "yes" ) syncbox->setChecked(true);
delete config;
@@ -405,7 +405,7 @@ bool KGamma::loadUserSettings() {
KConfig *config = new KConfig("kgammarc");
for (int i = 0; i < ScreenCount; i++) {
- config->setGroup(QString( "Screen %1" ).arg(i) );
+ config->setGroup(TQString( "Screen %1" ).arg(i) );
rgamma[i] = config->readEntry("rgamma");
ggamma[i] = config->readEntry("ggamma");
bgamma[i] = config->readEntry("bgamma");
@@ -416,22 +416,22 @@ bool KGamma::loadUserSettings() {
}
bool KGamma::loadSystemSettings() {
- QStringList Monitor, Screen, ScreenLayout, ScreenMonitor, Gamma;
- QValueList<int> ScreenNr;
- QString Section;
+ TQStringList Monitor, Screen, ScreenLayout, ScreenMonitor, Gamma;
+ TQValueList<int> ScreenNr;
+ TQString Section;
XF86ConfigPath Path;
- QFile f( Path.get() );
+ TQFile f( Path.get() );
if ( f.open(IO_ReadOnly) ) {
- QTextStream t( &f );
- QString s;
+ TQTextStream t( &f );
+ TQString s;
int sn = 0;
bool gm = false;
// Analyse Screen<->Monitor assignments of multi-head configurations
while ( !t.eof() ) {
s = (t.readLine()).simplifyWhiteSpace();
- QStringList words = QStringList::split(' ', s);
+ TQStringList words = TQStringList::split(' ', s);
if ( !words.empty() ) {
if ( words[0] == "Section" && words.size() > 1 ) {
@@ -491,8 +491,8 @@ bool KGamma::loadSystemSettings() {
for ( int i = 0; i < ScreenCount; i++) {
rgamma[i] = ggamma[i] = bgamma[i] = "";
- QStringList words = QStringList::split(' ', Gamma[assign[i]]);
- QStringList::ConstIterator it = words.begin();
+ TQStringList words = TQStringList::split(' ', Gamma[assign[i]]);
+ TQStringList::ConstIterator it = words.begin();
if ( words.size() < 4 )
rgamma[i] = ggamma[i] = bgamma[i] = *(++it); // single gamma value
else {
@@ -560,7 +560,7 @@ void KGamma::SyncScreens() {
}
void KGamma::changeScreen(int sn) {
- QString red, green, blue;
+ TQString red, green, blue;
xv->setScreen(sn);
currentScreen = sn;
@@ -580,7 +580,7 @@ int KGamma::buttons () {
return Default|Apply|Help;
}
-QString KGamma::quickHelp() const
+TQString KGamma::quickHelp() const
{
return i18n("<h1>Monitor Gamma</h1> This is a tool for changing monitor gamma"
" correction. Use the four sliders to define the gamma correction either"
@@ -610,7 +610,7 @@ extern "C"
for (int i = 0; i < xv._ScreenCount(); i++) {
xv.setScreen(i);
- config->setGroup( QString("Screen %1").arg(i) );
+ config->setGroup( TQString("Screen %1").arg(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 b347e2a1..9af24905 100644
--- a/kgamma/kcmkgamma/kgamma.h
+++ b/kgamma/kcmkgamma/kgamma.h
@@ -20,8 +20,8 @@
#include <kcmodule.h>
class GammaCtrl;
-class QCheckBox;
-class QComboBox;
+class TQCheckBox;
+class TQComboBox;
class XVidExtWrap;
class KProcess;
@@ -29,7 +29,7 @@ class KGamma: public KCModule
{
Q_OBJECT
public:
- KGamma(QWidget *parent, const char *name, const QStringList&);
+ KGamma(TQWidget *parent, const char *name, const TQStringList&);
virtual ~KGamma();
void load();
@@ -37,7 +37,7 @@ class KGamma: public KCModule
void save();
void defaults();
int buttons();
- QString quickHelp() const;
+ TQString quickHelp() const;
protected: // Protected methods
/** The user interface */
@@ -64,12 +64,12 @@ class KGamma: public KCModule
private:
bool saved, GammaCorrection;
int ScreenCount, currentScreen;
- QStringList rgamma, ggamma, bgamma;
- QValueList<int> assign;
- QValueList<float> rbak, gbak, bbak;
+ TQStringList rgamma, ggamma, bgamma;
+ TQValueList<int> assign;
+ TQValueList<float> rbak, gbak, bbak;
GammaCtrl *gctrl, *rgctrl, *ggctrl, *bgctrl;
- QCheckBox *xf86cfgbox, *syncbox;
- QComboBox *screenselect;
+ TQCheckBox *xf86cfgbox, *syncbox;
+ TQComboBox *screenselect;
KProcess *rootProcess;
XVidExtWrap *xv;
};
diff --git a/kghostview/displayoptions.cpp b/kghostview/displayoptions.cpp
index 48d45e7e..ab33e384 100644
--- a/kghostview/displayoptions.cpp
+++ b/kghostview/displayoptions.cpp
@@ -17,7 +17,7 @@
*/
#include "displayoptions.h"
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kcmdlineargs.h>
#include <kconfig.h>
@@ -65,18 +65,18 @@ namespace {
const char* const qformat = ".page: %1; .magnification: %2; .orientation = %3; .media = %4;";
}
-QString DisplayOptions::toString( const DisplayOptions& options )
+TQString DisplayOptions::toString( const DisplayOptions& options )
{
- return QString( qformat )
+ return TQString( qformat )
.arg( options.page() )
.arg( options.magnification() )
.arg( options.overrideOrientation() )
.arg( options.overridePageMedia().utf8() );
}
-bool DisplayOptions::fromString( DisplayOptions& out, const QString& in )
+bool DisplayOptions::fromString( DisplayOptions& out, const TQString& in )
{
- QRegExp regex( QString::fromLatin1( rformat ) );
+ TQRegExp regex( TQString::fromLatin1( rformat ) );
if ( regex.search( in ) < 0 ) return false;
out.reset();
@@ -138,8 +138,8 @@ unsigned DisplayOptions::closestIndex() const {
return res;
}
-QValueList<double> DisplayOptions::normalMagnificationValues() {
- QValueList<double> res;
+TQValueList<double> DisplayOptions::normalMagnificationValues() {
+ TQValueList<double> res;
for ( const double *first = allowedMagnifications, *last = allowedMagnifications + numberOfMagnifications;
first != last;
++first ) {
diff --git a/kghostview/displayoptions.h b/kghostview/displayoptions.h
index e929d8b7..8a19a812 100644
--- a/kghostview/displayoptions.h
+++ b/kghostview/displayoptions.h
@@ -17,8 +17,8 @@
*/
#ifndef DISPLAYOPTIONS_H
#define DISPLAYOPTIONS_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include "dscparse_adapter.h"
#include <kdemacros.h>
class KCmdLineArgs;
@@ -39,9 +39,9 @@ class KDE_EXPORT DisplayOptions
void setOverrideOrientation(CDSC_ORIENTATION_ENUM e) { _overrideOrientation = e; }
CDSC_ORIENTATION_ENUM overrideOrientation() const { return _overrideOrientation; }
- void restoreOverridePageMedia() { _overridePageMedia = QString::null; }
- void setOverridePageMedia(const QString& newMedia) { _overridePageMedia = newMedia; }
- const QString& overridePageMedia() const { return _overridePageMedia; }
+ void restoreOverridePageMedia() { _overridePageMedia = TQString::null; }
+ void setOverridePageMedia(const TQString& newMedia) { _overridePageMedia = newMedia; }
+ const TQString& overridePageMedia() const { return _overridePageMedia; }
/**
* The current page.
@@ -76,26 +76,26 @@ class KDE_EXPORT DisplayOptions
*
* \sa fromString
*/
- static QString toString( const DisplayOptions& );
+ static TQString toString( const DisplayOptions& );
/**
* Reads the display options from a string formatted by toString.
*
* \return true if the convertion succeeded.
*/
- static bool fromString( DisplayOptions&, const QString& );
+ static bool fromString( DisplayOptions&, const TQString& );
/**
* Returns a list of values that normally we can get through
* zoomIn() & zoomOut()
*/
- static QValueList<double> normalMagnificationValues();
+ static TQValueList<double> normalMagnificationValues();
private:
unsigned closestIndex() const;
CDSC_ORIENTATION_ENUM _overrideOrientation;
- QString _overridePageMedia;
+ TQString _overridePageMedia;
int _page;
double _magnification;
};
@@ -103,7 +103,7 @@ class KDE_EXPORT DisplayOptions
inline
DisplayOptions::DisplayOptions()
:_overrideOrientation( CDSC_ORIENT_UNKNOWN ),
- _overridePageMedia ( QString::null ),
+ _overridePageMedia ( TQString::null ),
_page( 0 )
{
setMagnification( 1.0 );
diff --git a/kghostview/dscparse_adapter.cpp b/kghostview/dscparse_adapter.cpp
index 4db450bb..b04e89bc 100644
--- a/kghostview/dscparse_adapter.cpp
+++ b/kghostview/dscparse_adapter.cpp
@@ -67,7 +67,7 @@ int KDSCBBOX::ury() const { return _ury; }
int KDSCBBOX::width() const { return _urx - _llx; }
int KDSCBBOX::height() const { return _ury - _lly; }
-QSize KDSCBBOX::size() const { return QSize( width(), height() ); }
+TQSize KDSCBBOX::size() const { return TQSize( width(), height() ); }
ostream& operator << ( ostream& os, const KDSCBBOX& source )
{
@@ -78,7 +78,7 @@ ostream& operator << ( ostream& os, const KDSCBBOX& source )
/*-- KDSCError implementation ----------------------------------------------*/
-KDSCError::KDSCError( Type type, Severity severity, const QCString& line,
+KDSCError::KDSCError( Type type, Severity severity, const TQCString& line,
unsigned int lineNumber ) :
_type( type ),
_severity( severity ),
@@ -96,7 +96,7 @@ KDSCError::Severity KDSCError::severity() const
return _severity;
}
-QCString KDSCError::line() const
+TQCString KDSCError::line() const
{
return _line;
}
@@ -132,9 +132,9 @@ KDSC::~KDSC()
delete _scanHandler;
}
-QString KDSC::dsc_version() const
+TQString KDSC::dsc_version() const
{
- return QString( _cdsc->dsc_version );
+ return TQString( _cdsc->dsc_version );
}
bool KDSC::dsc() const
@@ -298,24 +298,24 @@ auto_ptr<KDSCBBOX> KDSC::page_bbox() const
return auto_ptr<KDSCBBOX>( new KDSCBBOX( *_cdsc->page_bbox ) );
}
-QString KDSC::dsc_title() const
+TQString KDSC::dsc_title() const
{
- return QString( _cdsc->dsc_title );
+ return TQString( _cdsc->dsc_title );
}
-QString KDSC::dsc_creator() const
+TQString KDSC::dsc_creator() const
{
- return QString( _cdsc->dsc_creator );
+ return TQString( _cdsc->dsc_creator );
}
-QString KDSC::dsc_date() const
+TQString KDSC::dsc_date() const
{
- return QString( _cdsc->dsc_date );
+ return TQString( _cdsc->dsc_date );
}
-QString KDSC::dsc_for() const
+TQString KDSC::dsc_for() const
{
- return QString( _cdsc->dsc_for );
+ return TQString( _cdsc->dsc_for );
}
bool KDSC::scanData( char* buffer, unsigned int count )
@@ -378,7 +378,7 @@ int KDSC::errorFunction( void* caller_data, CDSC* dsc,
KDSCError error(
static_cast< KDSCError::Type >( explanation ),
static_cast< KDSCError::Severity >( dsc->severity[explanation] ),
- QCString( line, line_len + 1 ),
+ TQCString( line, line_len + 1 ),
dsc->line_count
);
diff --git a/kghostview/dscparse_adapter.h b/kghostview/dscparse_adapter.h
index 9e41f3c2..c5c1cbf9 100644
--- a/kghostview/dscparse_adapter.h
+++ b/kghostview/dscparse_adapter.h
@@ -23,8 +23,8 @@
#include <map>
#include <memory>
-#include <qsize.h>
-#include <qstring.h>
+#include <tqsize.h>
+#include <tqstring.h>
#include "dscparse.h"
@@ -94,7 +94,7 @@ public:
int width() const;
int height() const;
- QSize size() const;
+ TQSize size() const;
private:
int _llx, _lly, _urx, _ury;
@@ -133,18 +133,18 @@ public:
Error = CDSC_ERROR_ERROR
};
- KDSCError( Type, Severity, const QCString& line,
+ KDSCError( Type, Severity, const TQCString& line,
unsigned int lineNumber );
Type type() const;
Severity severity() const;
- QCString line() const;
+ TQCString line() const;
unsigned int lineNumber() const;
private:
Type _type;
Severity _severity;
- QCString _line;
+ TQCString _line;
unsigned int _lineNumber;
};
@@ -266,7 +266,7 @@ public:
~KDSC();
/*--- Adapter for CDSC ------------------------------------------------*/
- QString dsc_version() const;
+ TQString dsc_version() const;
bool dsc() const;
bool ctrld() const;
@@ -314,10 +314,10 @@ public:
// CDSCDOSEPS *doseps;
- QString dsc_title() const;
- QString dsc_creator() const;
- QString dsc_date() const;
- QString dsc_for() const;
+ TQString dsc_title() const;
+ TQString dsc_creator() const;
+ TQString dsc_date() const;
+ TQString dsc_for() const;
// unsigned int max_error
diff --git a/kghostview/fullscreenfilter.cpp b/kghostview/fullscreenfilter.cpp
index ec208169..724031f4 100644
--- a/kghostview/fullscreenfilter.cpp
+++ b/kghostview/fullscreenfilter.cpp
@@ -23,20 +23,20 @@
#include "kgvpageview.h"
FullScreenFilter::FullScreenFilter( KGVShell& parent )
- :QObject( &parent, "full-screen-filter" ),
+ :TQObject( &parent, "full-screen-filter" ),
parent( parent )
{
}
-bool FullScreenFilter::eventFilter( QObject* /*object*/, QEvent* ev) {
- if ( QKeyEvent* keyevent = dynamic_cast<QKeyEvent*>( ev ) ) {
+bool FullScreenFilter::eventFilter( TQObject* /*object*/, TQEvent* ev) {
+ if ( TQKeyEvent* keyevent = dynamic_cast<TQKeyEvent*>( ev ) ) {
if ( keyevent->key() == Key_Escape ) {
parent.setFullScreen( false );
keyevent->accept();
return true;
}
}
- if ( QMouseEvent* mouseevent = dynamic_cast<QMouseEvent*>( ev ) ) {
+ if ( TQMouseEvent* mouseevent = dynamic_cast<TQMouseEvent*>( ev ) ) {
if ( mouseevent->stateAfter() & mouseevent->button() & LeftButton ) {
// if ( The whole image is visible at once )
if ( parent.m_gvpart->pageView()->contentsHeight() <= parent.m_gvpart->widget()->height() &&
diff --git a/kghostview/fullscreenfilter.h b/kghostview/fullscreenfilter.h
index e60090a1..7d5fa489 100644
--- a/kghostview/fullscreenfilter.h
+++ b/kghostview/fullscreenfilter.h
@@ -18,7 +18,7 @@
#ifndef DB_FULLSCREENFILTER_H1055977622_INCLUDE_GUARD_
#define DB_FULLSCREENFILTER_H1055977622_INCLUDE_GUARD_
-#include <qobject.h>
+#include <tqobject.h>
class KGVShell;
/* @class FullScreenFilter
@@ -26,7 +26,7 @@ class KGVShell;
* @short This class is to have in one place the special event all the special
* key/mouse handling related to full-screen mode without bloating further KGVPart
*/
-class FullScreenFilter : public QObject {
+class FullScreenFilter : public TQObject {
Q_OBJECT
public:
FullScreenFilter( KGVShell& parent );
@@ -34,7 +34,7 @@ class FullScreenFilter : public QObject {
/**
* @reimplemented
*/
- virtual bool eventFilter( QObject*, QEvent* );
+ virtual bool eventFilter( TQObject*, TQEvent* );
private:
KGVShell& parent;
};
diff --git a/kghostview/gssettingswidget.ui.h b/kghostview/gssettingswidget.ui.h
index 87937c76..fb2209c7 100644
--- a/kghostview/gssettingswidget.ui.h
+++ b/kghostview/gssettingswidget.ui.h
@@ -7,7 +7,7 @@
** place of a destructor.
*****************************************************************************/
-void GSSettingsWidget::setDetectedVersion( QString v)
+void GSSettingsWidget::setDetectedVersion( TQString v)
{
mDetectedVersion->setText(mDetectedVersion->text().arg( v ));
}
diff --git a/kghostview/infodialog.cpp b/kghostview/infodialog.cpp
index b9cc8a91..e429d712 100644
--- a/kghostview/infodialog.cpp
+++ b/kghostview/infodialog.cpp
@@ -17,11 +17,11 @@
*
*/
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qdatetime.h>
-#include <qregexp.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
@@ -32,28 +32,28 @@
//
// Using KDialogBase in message box mode (gives centered action button)
//
-InfoDialog::InfoDialog( QWidget *parent, const char *name, bool modal )
+InfoDialog::InfoDialog( TQWidget *parent, const char *name, bool modal )
:KDialogBase( i18n("Document Information"), Yes, Yes, Yes, parent,
name, modal, true, KStdGuiItem::ok() )
{
- QFrame *page = makeMainWidget();
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
- QGridLayout *glay = new QGridLayout( topLayout, 3, 2 );
+ TQFrame *page = makeMainWidget();
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
+ TQGridLayout *glay = new TQGridLayout( topLayout, 3, 2 );
glay->setColStretch(1,1);
- QLabel *label = new QLabel( i18n("File name:" ), page );
+ TQLabel *label = new TQLabel( i18n("File name:" ), page );
glay->addWidget( label, 0, 0, AlignRight|AlignVCenter );
- mFileLabel = new QLabel( page );
+ mFileLabel = new TQLabel( page );
glay->addWidget( mFileLabel, 0, 1 );
- label = new QLabel( i18n("Document title:" ), page );
+ label = new TQLabel( i18n("Document title:" ), page );
glay->addWidget( label, 1, 0, AlignRight|AlignVCenter );
- mTitleLabel = new QLabel( page );
+ mTitleLabel = new TQLabel( page );
glay->addWidget( mTitleLabel, 1, 1 );
- label = new QLabel( i18n("Publication date:" ), page );
+ label = new TQLabel( i18n("Publication date:" ), page );
glay->addWidget( label, 2, 0, AlignRight|AlignVCenter );
- mDateLabel = new QLabel( page );
+ mDateLabel = new TQLabel( page );
glay->addWidget( mDateLabel, 2, 1 );
topLayout->addStretch(1);
@@ -81,17 +81,17 @@ namespace {
* For PS files, there is no such standard and dates appear
* in any format they desire.
*/
- QString parseDate( const QString& dateStr ) {
+ TQString parseDate( const TQString& dateStr ) {
kdDebug( 4500 ) << "parseDate( \"" << dateStr << "\" )" << endl;
- QRegExp exp( "\\((?:D:)?"
+ TQRegExp exp( "\\((?:D:)?"
"(\\d\\d\\d\\d)"
"(\\d\\d)?(\\d\\d)?(\\d\\d)?.*"
"(\\d\\d)?(\\d\\d)?.*"
"(?:(\\+|\\-)(\\d\\d)\'?(\\d\\d)\'?)?"
"\\)" );
if ( exp.exactMatch( dateStr ) ) {
- QStringList list = exp.capturedTexts();
- QStringList::iterator iter = list.begin();
+ TQStringList list = exp.capturedTexts();
+ TQStringList::iterator iter = list.begin();
++iter; // whole string!
#undef GET
#define GET( variable, def ) \
@@ -108,18 +108,18 @@ namespace {
GET( sec, 0 )
#undef GET
// FIXME: this ignores the timezone
- QDate date( year, month, day );
- QTime time( hour, min, sec );
+ TQDate date( year, month, day );
+ TQTime time( hour, min, sec );
KLocale locale( "kghostview" );
- return locale.formatDateTime( QDateTime( date, time ) );
+ return locale.formatDateTime( TQDateTime( date, time ) );
}
kdDebug( 4500 ) << "parseDate failed." << endl;
return dateStr;
}
}
-void InfoDialog::setup( const QString &fileName, const QString &documentTitle,
- const QString &publicationDate )
+void InfoDialog::setup( const TQString &fileName, const TQString &documentTitle,
+ const TQString &publicationDate )
{
mFileLabel->setText( fileName );
mTitleLabel->setText( documentTitle );
diff --git a/kghostview/infodialog.h b/kghostview/infodialog.h
index 1c857fc1..689790d0 100644
--- a/kghostview/infodialog.h
+++ b/kghostview/infodialog.h
@@ -20,7 +20,7 @@
#ifndef _INFO_DIALOG_H_
#define _INFO_DIALOG_H_
-class QLabel;
+class TQLabel;
#include <kdialogbase.h>
@@ -29,14 +29,14 @@ class InfoDialog : public KDialogBase
Q_OBJECT
public:
- InfoDialog( QWidget *parent=0, const char *name=0, bool modal=true );
- void setup( const QString &fileName, const QString &documentTitle,
- const QString &publicationDate );
+ InfoDialog( TQWidget *parent=0, const char *name=0, bool modal=true );
+ void setup( const TQString &fileName, const TQString &documentTitle,
+ const TQString &publicationDate );
private:
- QLabel *mFileLabel;
- QLabel *mTitleLabel;
- QLabel *mDateLabel;
+ TQLabel *mFileLabel;
+ TQLabel *mTitleLabel;
+ TQLabel *mDateLabel;
};
#endif
diff --git a/kghostview/kdscerrordialog.cpp b/kghostview/kdscerrordialog.cpp
index 601f5fc5..61245ed5 100644
--- a/kghostview/kdscerrordialog.cpp
+++ b/kghostview/kdscerrordialog.cpp
@@ -16,9 +16,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtextedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtextedit.h>
#include <kdebug.h>
#include <klocale.h>
@@ -46,26 +46,26 @@ KDSCErrorHandler::Response KDSCErrorThreshold::error( const KDSCError& err )
return Cancel;
}
-KDSCErrorDialog::KDSCErrorDialog( QWidget* parent ) :
+KDSCErrorDialog::KDSCErrorDialog( TQWidget* parent ) :
KDialog( parent, "dscerrordialog", true ),
_response( Ok )
{
- QVBoxLayout* vbox = new QVBoxLayout( this, marginHint(), spacingHint() );
+ TQVBoxLayout* vbox = new TQVBoxLayout( this, marginHint(), spacingHint() );
- _lineNumberLabel = new QLabel( this );
+ _lineNumberLabel = new TQLabel( this );
vbox->addWidget( _lineNumberLabel );
- _lineLabel = new QTextEdit( this );
+ _lineLabel = new TQTextEdit( this );
_lineLabel->setReadOnly( true );
vbox->addWidget( _lineLabel );
- _descriptionLabel = new QLabel( this );
+ _descriptionLabel = new TQLabel( this );
vbox->addWidget( _descriptionLabel );
KSeparator* sep = new KSeparator( KSeparator::HLine, this );
vbox->addWidget( sep );
- QHBoxLayout* hbox = new QHBoxLayout( vbox );
+ TQHBoxLayout* hbox = new TQHBoxLayout( vbox );
hbox->addStretch();
@@ -73,13 +73,13 @@ KDSCErrorDialog::KDSCErrorDialog( QWidget* parent ) :
hbox->addWidget( _okButton );
_cancelButton = new KPushButton( KStdGuiItem::cancel(), this );
hbox->addWidget( _cancelButton );
- _ignoreAllButton = new QPushButton( i18n("Ignore All"), this );
+ _ignoreAllButton = new TQPushButton( i18n("Ignore All"), this );
hbox->addWidget( _ignoreAllButton );
- connect( _okButton, SIGNAL( clicked() ), this, SLOT( slotOk() ) );
- connect( _cancelButton, SIGNAL( clicked() ), this, SLOT( slotCancel() ) );
- connect( _ignoreAllButton, SIGNAL( clicked() ),
- this, SLOT( slotIgnoreAll() ) );
+ connect( _okButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOk() ) );
+ connect( _cancelButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotCancel() ) );
+ connect( _ignoreAllButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotIgnoreAll() ) );
}
KDSCErrorHandler::Response KDSCErrorDialog::error( const KDSCError& err )
@@ -108,7 +108,7 @@ KDSCErrorHandler::Response KDSCErrorDialog::error( const KDSCError& err )
return _response;
}
-QString KDSCErrorDialog::description( KDSCError::Type type ) const
+TQString KDSCErrorDialog::description( KDSCError::Type type ) const
{
switch( type )
{
diff --git a/kghostview/kdscerrordialog.h b/kghostview/kdscerrordialog.h
index 0aee24d2..67d3dd4a 100644
--- a/kghostview/kdscerrordialog.h
+++ b/kghostview/kdscerrordialog.h
@@ -23,9 +23,9 @@
#include "dscparse_adapter.h"
-class QLabel;
-class QPushButton;
-class QTextEdit;
+class TQLabel;
+class TQPushButton;
+class TQTextEdit;
class KDSCErrorThreshold : public KDSCErrorHandler
{
@@ -44,12 +44,12 @@ class KDSCErrorDialog : public KDialog, public KDSCErrorHandler
Q_OBJECT
public:
- KDSCErrorDialog( QWidget* parent = 0 );
+ KDSCErrorDialog( TQWidget* parent = 0 );
Response error( const KDSCError& );
protected:
- QString description( KDSCError::Type ) const;
+ TQString description( KDSCError::Type ) const;
protected slots:
void slotOk();
@@ -57,13 +57,13 @@ protected slots:
void slotIgnoreAll();
private:
- QLabel* _lineNumberLabel;
- QTextEdit* _lineLabel;
- QLabel* _descriptionLabel;
+ TQLabel* _lineNumberLabel;
+ TQTextEdit* _lineLabel;
+ TQLabel* _descriptionLabel;
- QPushButton* _okButton;
- QPushButton* _cancelButton;
- QPushButton* _ignoreAllButton;
+ TQPushButton* _okButton;
+ TQPushButton* _cancelButton;
+ TQPushButton* _ignoreAllButton;
Response _response;
};
diff --git a/kghostview/kgv.h b/kghostview/kgv.h
index db7a1679..669d94f1 100644
--- a/kghostview/kgv.h
+++ b/kghostview/kgv.h
@@ -1,12 +1,12 @@
#ifndef KGV_H
#define KGV_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
namespace KGV
{
-typedef QValueList<int> PageList;
+typedef TQValueList<int> PageList;
}
diff --git a/kghostview/kgv_miniwidget.cpp b/kghostview/kgv_miniwidget.cpp
index 33045b17..a6acdd53 100644
--- a/kghostview/kgv_miniwidget.cpp
+++ b/kghostview/kgv_miniwidget.cpp
@@ -18,7 +18,7 @@
#include <math.h>
-#include <qlistbox.h>
+#include <tqlistbox.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -32,8 +32,8 @@
#if KDE_VERSION >= KDE_MAKE_VERSION(3,1,90)
#include <kinputdialog.h>
#else
- #include <qvalidator.h>
- #include <qwidget.h>
+ #include <tqvalidator.h>
+ #include <tqwidget.h>
#include <klineeditdlg.h>
#endif
@@ -54,7 +54,7 @@
using namespace KGV;
KGVMiniWidget::KGVMiniWidget( KGVPart* part, const char* name ) :
- QObject( part, name ),
+ TQObject( part, name ),
_document( 0 ),
_part( part ),
_psWidget( 0 ),
@@ -63,32 +63,32 @@ KGVMiniWidget::KGVMiniWidget( KGVPart* part, const char* name ) :
{
KLocale locale( "kghostview" );
_fallBackPageMedia = pageSizeToString(
- static_cast< QPrinter::PageSize >( locale.pageSize() ) );
+ static_cast< TQPrinter::PageSize >( locale.pageSize() ) );
_thumbnailService = new ThumbnailService( this );
- connect( this, SIGNAL( newPageShown( int ) ),
- SLOT( updateStatusBarText( int ) ) );
+ connect( this, TQT_SIGNAL( newPageShown( int ) ),
+ TQT_SLOT( updateStatusBarText( int ) ) );
}
void KGVMiniWidget::setDocument( KGVDocument* document )
{
_document = document;
if( _document )
- connect( _document, SIGNAL( completed() ),
- SLOT( slotDocumentOpened() ) );
+ connect( _document, TQT_SIGNAL( completed() ),
+ TQT_SLOT( slotDocumentOpened() ) );
}
-QString KGVMiniWidget::pageSizeToString( QPrinter::PageSize pageSize )
+TQString KGVMiniWidget::pageSizeToString( TQPrinter::PageSize pageSize )
{
switch( pageSize )
{
- case QPrinter::A3: return "A3";
- case QPrinter::A4: return "A4";
- case QPrinter::A5: return "A5";
- case QPrinter::B4: return "B4";
- case QPrinter::Ledger: return "Ledger";
- case QPrinter::Legal: return "Legal";
- case QPrinter::Letter: return "Letter";
+ case TQPrinter::A3: return "A3";
+ case TQPrinter::A4: return "A4";
+ case TQPrinter::A5: return "A5";
+ case TQPrinter::B4: return "B4";
+ case TQPrinter::Ledger: return "Ledger";
+ case TQPrinter::Legal: return "Legal";
+ case TQPrinter::Letter: return "Letter";
default: return "Unknown";
}
}
@@ -109,8 +109,8 @@ void KGVMiniWidget::setPSWidget( KPSWidget* psWidget )
{
_psWidget = psWidget;
// setMagnification( _magnification );
- connect( _psWidget, SIGNAL( newPageImage( QPixmap ) ),
- this, SLOT( sendPage() ) );
+ connect( _psWidget, TQT_SIGNAL( newPageImage( TQPixmap ) ),
+ this, TQT_SLOT( sendPage() ) );
}
void KGVMiniWidget::goToPage()
@@ -122,9 +122,9 @@ void KGVMiniWidget::goToPage()
1, dsc()->page_count(), 1, 10, &ok, _part->widget());
if (ok) goToPage( num-1 );
#else
- QString num;
+ TQString num;
bool b = false;
- num = KLineEditDlg::getText(i18n("Go to Page"), i18n("Page:"), QString::null, &b, _part->widget(), new QIntValidator(1, dsc()->page_count(), this));
+ num = KLineEditDlg::getText(i18n("Go to Page"), i18n("Page:"), TQString::null, &b, _part->widget(), new TQIntValidator(1, dsc()->page_count(), this));
if (b) goToPage( num.toInt() - 1 );
#endif
}
@@ -172,29 +172,29 @@ bool KGVMiniWidget::atMinZoom() const
void KGVMiniWidget::fitWidth( unsigned int width )
{
if ( (orientation() == CDSC_LANDSCAPE) || (orientation() == CDSC_SEASCAPE) )
- setMagnification( ( (double)width / QPaintDevice::x11AppDpiY()) /
+ setMagnification( ( (double)width / TQPaintDevice::x11AppDpiY()) /
( (double)boundingBox().height() / 72) );
else // default
- setMagnification( ( (double)width / QPaintDevice::x11AppDpiX() ) /
+ setMagnification( ( (double)width / TQPaintDevice::x11AppDpiX() ) /
( (double)boundingBox().width() / 72) );
}
void KGVMiniWidget::fitHeight( unsigned int height )
{
if ( (orientation() == CDSC_LANDSCAPE) || (orientation() == CDSC_SEASCAPE) )
- setMagnification( ( (double)height / QPaintDevice::x11AppDpiY()) /
+ setMagnification( ( (double)height / TQPaintDevice::x11AppDpiY()) /
( (double)boundingBox().width() / 72) );
else //default
- setMagnification( ( (double)height / QPaintDevice::x11AppDpiY()) /
+ setMagnification( ( (double)height / TQPaintDevice::x11AppDpiY()) /
( (double)boundingBox().height() / 72) );
}
void KGVMiniWidget::fitWidthHeight( unsigned int w, unsigned int h )
{
double magnification = std::min<double>(
- ( ( double )h / QPaintDevice::x11AppDpiY() ) /
+ ( ( double )h / TQPaintDevice::x11AppDpiY() ) /
( ( double )boundingBox().height() / 72.0 ),
- ( ( double )w / QPaintDevice::x11AppDpiX() ) /
+ ( ( double )w / TQPaintDevice::x11AppDpiX() ) /
( ( double )boundingBox().width() / 72.0 ) );
setMagnification( magnification );
}
@@ -310,25 +310,25 @@ void KGVMiniWidget::restoreOverridePageMedia()
showPage( _options.page() );
}
-void KGVMiniWidget::setOverridePageMedia( const QString& mediaName )
+void KGVMiniWidget::setOverridePageMedia( const TQString& mediaName )
{
_options.setOverridePageMedia( mediaName );
showPage( _options.page() );
}
-QString KGVMiniWidget::pageMedia() const
+TQString KGVMiniWidget::pageMedia() const
{
if( !_options.overridePageMedia().isNull() )
return _options.overridePageMedia();
else if( dsc()->page_media() != 0 )
- return QString( dsc()->page_media()->name );
+ return TQString( dsc()->page_media()->name );
else if( dsc()->bbox().get() != 0 )
- return QString( "BoundingBox" );
+ return TQString( "BoundingBox" );
else
return _fallBackPageMedia;
}
-QString KGVMiniWidget::pageMedia( int pagenumber ) const
+TQString KGVMiniWidget::pageMedia( int pagenumber ) const
{
kdDebug( 4500 ) << "KGVMiniWidget::pageMedia( " << pagenumber << " )" << endl;
if ( !dsc() ) return pageMedia();
@@ -336,33 +336,33 @@ QString KGVMiniWidget::pageMedia( int pagenumber ) const
if( !_options.overridePageMedia().isNull() )
return _options.overridePageMedia();
else if( dsc()->page()[ pagenumber ].media != 0 )
- return QString( dsc()->page()[ pagenumber ].media->name );
+ return TQString( dsc()->page()[ pagenumber ].media->name );
else if( dsc()->page_media() != 0 )
- return QString( dsc()->page_media()->name );
+ return TQString( dsc()->page_media()->name );
else if( dsc()->bbox().get() != 0 )
- return QString( "BoundingBox" );
+ return TQString( "BoundingBox" );
else
return _fallBackPageMedia;
}
KDSCBBOX KGVMiniWidget::boundingBox() const
{
- QString currentMedia = pageMedia();
+ TQString currentMedia = pageMedia();
if( currentMedia == "BoundingBox" )
return KDSCBBOX( *dsc()->bbox().get() );
else {
- QSize size = document()->computePageSize( currentMedia );
+ TQSize size = document()->computePageSize( currentMedia );
return KDSCBBOX( 0, 0, size.width(), size.height() );
}
}
KDSCBBOX KGVMiniWidget::boundingBox( int pageNo ) const
{
- QString currentMedia = pageMedia( pageNo );
+ TQString currentMedia = pageMedia( pageNo );
if( currentMedia == "BoundingBox" )
return KDSCBBOX( *dsc()->bbox().get() );
else {
- QSize size = document()->computePageSize( currentMedia );
+ TQSize size = document()->computePageSize( currentMedia );
return KDSCBBOX( 0, 0, size.width(), size.height() );
}
}
@@ -384,7 +384,7 @@ void KGVMiniWidget::showPage( int pagenumber )
kdDebug(4500) << "KGVMiniWidget::showPage( " << pagenumber << " )" << endl;
- static_cast< QWidget* >( _psWidget->parent() )->show();
+ static_cast< TQWidget* >( _psWidget->parent() )->show();
_psWidget->setFileName(_document->fileName(), dsc()->isStructured() );
_psWidget->clear();
@@ -452,8 +452,8 @@ void KGVMiniWidget::showPage( int pagenumber )
}
}
// Do this after ajusting pagenumber above
- _thumbnailService->cancelRequests( -1 , _part->scrollBox(), SLOT( setThumbnail( QPixmap ) ) );
- _thumbnailService->delayedGetThumbnail( pagenumber, _part->scrollBox(), SLOT( setThumbnail( QPixmap ) ), true );
+ _thumbnailService->cancelRequests( -1 , _part->scrollBox(), TQT_SLOT( setThumbnail( TQPixmap ) ) );
+ _thumbnailService->delayedGetThumbnail( pagenumber, _part->scrollBox(), TQT_SLOT( setThumbnail( TQPixmap ) ), true );
emit newPageShown( pagenumber );
}
@@ -479,7 +479,7 @@ void KGVMiniWidget::updateStatusBarText( int pageNumber )
if( dsc()->isStructured() )
{
- QString text;
+ TQString text;
if( pageNumber == -1 )
text = i18n( "Page 1" );
@@ -520,10 +520,10 @@ void KGVMiniWidget::buildTOC()
}
// finally set marked list
- QString s;
+ TQString s;
for( unsigned i = 0; i < dsc()->page_count(); ++i ) {
const char * label = dsc()->page()[ i ].label;
- QString tip = QString::fromLocal8Bit( label ? label : "" );
+ TQString tip = TQString::fromLocal8Bit( label ? label : "" );
if( !_usePageLabels )
s.setNum( i + 1 );
@@ -534,7 +534,7 @@ void KGVMiniWidget::buildTOC()
}
}
else {
- marklist->insertItem( QString::fromLatin1( "1" ), 0 );
+ marklist->insertItem( TQString::fromLatin1( "1" ), 0 );
}
}
diff --git a/kghostview/kgv_miniwidget.h b/kghostview/kgv_miniwidget.h
index 3c445d14..a518657b 100644
--- a/kghostview/kgv_miniwidget.h
+++ b/kghostview/kgv_miniwidget.h
@@ -19,7 +19,7 @@
#ifndef __KGV_MINIWIDGET_H
#define __KGV_MINIWIDGET_H
-#include <qprinter.h>
+#include <tqprinter.h>
#include "dscparse_adapter.h"
#include "kgv.h"
@@ -28,7 +28,7 @@
#include "thumbnailservice.h"
-#include <qobject.h>
+#include <tqobject.h>
class InfoDialog;
class KGVPart;
@@ -44,7 +44,7 @@ public:
void setDocument( KGVDocument* document );
- static QString pageSizeToString( QPrinter::PageSize );
+ static TQString pageSizeToString( TQPrinter::PageSize );
void setPSWidget( KPSWidget* psWidget );
@@ -55,7 +55,7 @@ public:
void setOverrideOrientation( CDSC_ORIENTATION_ENUM );
void restoreOverridePageMedia();
- void setOverridePageMedia( const QString& mediaName );
+ void setOverridePageMedia( const TQString& mediaName );
ThumbnailService* getThumbnailService() { return _thumbnailService; }
@@ -113,9 +113,9 @@ signals:
*/
void newPageShown( int pageNumber ); // Should this one be under DOCUMENT?
- void newPageImage( QPixmap image );
+ void newPageImage( TQPixmap image );
- void setStatusBarText( const QString& );
+ void setStatusBarText( const TQString& );
protected:
void showPage( int pageNumber );
@@ -133,8 +133,8 @@ private:
CDSC_ORIENTATION_ENUM orientation() const;
CDSC_ORIENTATION_ENUM orientation( int pageNo ) const;
- QString pageMedia() const;
- QString pageMedia( int pageNo ) const;
+ TQString pageMedia() const;
+ TQString pageMedia( int pageNo ) const;
KDSCBBOX boundingBox() const;
KDSCBBOX boundingBox( int pageNo ) const;
@@ -165,7 +165,7 @@ private:
int _visiblePage;
DisplayOptions _options;
- QString _fallBackPageMedia;
+ TQString _fallBackPageMedia;
};
#endif
diff --git a/kghostview/kgv_view.cpp b/kghostview/kgv_view.cpp
index 3c25ef41..ed08e8e4 100644
--- a/kghostview/kgv_view.cpp
+++ b/kghostview/kgv_view.cpp
@@ -16,12 +16,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qframe.h>
-#include <qtable.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqframe.h>
+#include <tqtable.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <kaction.h>
#include <kapplication.h>
@@ -74,14 +74,14 @@ namespace KGV {
}
}
-KGVPart::KGVPart( QWidget* parentWidget, const char*,
- QObject* parent, const char* name,
- const QStringList &args ) :
+KGVPart::KGVPart( TQWidget* parentWidget, const char*,
+ TQObject* parent, const char* name,
+ const TQStringList &args ) :
KParts::ReadOnlyPart( parent, name ),
- _fitTimer( new QTimer( this ) ),
+ _fitTimer( new TQTimer( this ) ),
_job( 0 ),
_mimetypeScanner( 0 ),
- _dirtyHandler( new QTimer( this ) ),
+ _dirtyHandler( new TQTimer( this ) ),
_isGuiInitialized( false ),
_isFileDirty( false ),
_stickyOptions( false ),
@@ -94,31 +94,31 @@ KGVPart::KGVPart( QWidget* parentWidget, const char*,
setProgressInfoEnabled( !args.contains( "Browser/View") );
_document = new KGVDocument( this );
- connect( _document, SIGNAL( fileChangeFailed() ),
- this, SLOT( slotCancelWatch() ) );
- connect( _document, SIGNAL( completed() ),
- this, SLOT( slotOpenFileCompleted() ) );
- connect( _document, SIGNAL( canceled( const QString& ) ),
- this, SIGNAL( canceled( const QString& ) ) );
+ connect( _document, TQT_SIGNAL( fileChangeFailed() ),
+ this, TQT_SLOT( slotCancelWatch() ) );
+ connect( _document, TQT_SIGNAL( completed() ),
+ this, TQT_SLOT( slotOpenFileCompleted() ) );
+ connect( _document, TQT_SIGNAL( canceled( const TQString& ) ),
+ this, TQT_SIGNAL( canceled( const TQString& ) ) );
_fileWatcher = new KDirWatch( this );
- connect( _fileWatcher, SIGNAL( dirty( const QString& ) ),
- this, SLOT( slotFileDirty( const QString& ) ) );
- connect( _dirtyHandler, SIGNAL( timeout() ),
- this, SLOT( slotDoFileDirty() ) );
+ connect( _fileWatcher, TQT_SIGNAL( dirty( const TQString& ) ),
+ this, TQT_SLOT( slotFileDirty( const TQString& ) ) );
+ connect( _dirtyHandler, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotDoFileDirty() ) );
// Setup main widget
_mainWidget = new KGVMainWidget( parentWidget );
- _mainWidget->setFocusPolicy( QWidget::StrongFocus );
+ _mainWidget->setFocusPolicy( TQWidget::StrongFocus );
_mainWidget->installEventFilter( this );
_mainWidget->setAcceptDrops( true );
- connect( _mainWidget, SIGNAL( spacePressed() ),
- this, SLOT( slotReadDown() ) );
- connect( _mainWidget, SIGNAL( urlDropped( const KURL& ) ),
- this, SLOT( openURL( const KURL& ) ) );
+ connect( _mainWidget, TQT_SIGNAL( spacePressed() ),
+ this, TQT_SLOT( slotReadDown() ) );
+ connect( _mainWidget, TQT_SIGNAL( urlDropped( const KURL& ) ),
+ this, TQT_SLOT( openURL( const KURL& ) ) );
- QHBoxLayout* hlay = new QHBoxLayout( _mainWidget, 0, 0 );
- QVBoxLayout* vlay = new QVBoxLayout( hlay );
+ TQHBoxLayout* hlay = new TQHBoxLayout( _mainWidget, 0, 0 );
+ TQVBoxLayout* vlay = new TQVBoxLayout( hlay );
const int PAGELIST_WIDTH = 75;
@@ -127,14 +127,14 @@ KGVPart::KGVPart( QWidget* parentWidget, const char*,
_scrollBox->setMinimumHeight( PAGELIST_WIDTH );
vlay->addWidget( _scrollBox );
- _divider = new QFrame( _mainWidget, "divider" );
- _divider->setFrameStyle( QFrame::Panel | QFrame::Raised );
+ _divider = new TQFrame( _mainWidget, "divider" );
+ _divider->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
_divider->setLineWidth( 1 );
_divider->setMinimumWidth( 3 );
hlay->addWidget( _divider );
_pageView = new KGVPageView( _mainWidget, "pageview" );
- _pageView->viewport()->setBackgroundMode( QWidget::PaletteMid );
+ _pageView->viewport()->setBackgroundMode( TQWidget::PaletteMid );
hlay->addWidget( _pageView, 1 );
_mainWidget->setFocusProxy( _pageView );
setWidget( _mainWidget );
@@ -146,17 +146,17 @@ KGVPart::KGVPart( QWidget* parentWidget, const char*,
_psWidget = new KPSWidget( _pageDecorator );
_psWidget->readSettings();
_pageView->setPage( _pageDecorator );
- connect( _psWidget, SIGNAL( output( char*, int ) ),
- this, SLOT( slotGhostscriptOutput( char*, int ) ) );
+ connect( _psWidget, TQT_SIGNAL( output( char*, int ) ),
+ this, TQT_SLOT( slotGhostscriptOutput( char*, int ) ) );
- connect( _psWidget, SIGNAL( ghostscriptError( const QString& ) ),
- this, SLOT( slotGhostscriptError( const QString& ) ) );
+ connect( _psWidget, TQT_SIGNAL( ghostscriptError( const TQString& ) ),
+ this, TQT_SLOT( slotGhostscriptError( const TQString& ) ) );
_logWindow = new LogWindow( i18n( "Ghostscript Messages" ), _mainWidget, "logwindow" );
_showLogWindow = false;
- connect( _logWindow, SIGNAL( configureGS() ), SLOT( slotConfigure() ) );
+ connect( _logWindow, TQT_SIGNAL( configureGS() ), TQT_SLOT( slotConfigure() ) );
_docManager = new KGVMiniWidget( this );
_docManager->setPSWidget( _psWidget );
@@ -165,57 +165,57 @@ KGVPart::KGVPart( QWidget* parentWidget, const char*,
_markList = new MarkList( _mainWidget, "marklist", _docManager );
_markList->setFixedWidth( PAGELIST_WIDTH );
vlay->addWidget( _markList, 1 );
- connect( _markList, SIGNAL( contextMenuRequested ( int, int, const QPoint& ) ),
- this, SLOT( showPopup( int, int, const QPoint& ) ) );
-
-
- connect( _markList, SIGNAL( selected( int ) ),
- _docManager, SLOT( goToPage( int ) ) );
- connect( _docManager, SIGNAL( newPageShown( int ) ),
- _markList, SLOT( select( int ) ) );
- connect( _docManager, SIGNAL( setStatusBarText( const QString& ) ),
- this, SIGNAL( setStatusBarText( const QString& ) ) );
- connect( _scrollBox, SIGNAL( valueChangedRelative( int, int ) ),
- _pageView, SLOT( scrollBy( int, int ) ) );
- connect( _pageView, SIGNAL( pageSizeChanged( const QSize& ) ),
- _scrollBox, SLOT( setPageSize( const QSize& ) ) );
- connect( _pageView, SIGNAL( viewSizeChanged( const QSize& ) ),
- _scrollBox, SLOT( setViewSize( const QSize& ) ) );
- connect( _pageView, SIGNAL( contentsMoving( int, int ) ),
- _scrollBox, SLOT( setViewPos( int, int ) ) );
+ connect( _markList, TQT_SIGNAL( contextMenuRequested ( int, int, const TQPoint& ) ),
+ this, TQT_SLOT( showPopup( int, int, const TQPoint& ) ) );
+
+
+ connect( _markList, TQT_SIGNAL( selected( int ) ),
+ _docManager, TQT_SLOT( goToPage( int ) ) );
+ connect( _docManager, TQT_SIGNAL( newPageShown( int ) ),
+ _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 ) ),
+ _pageView, TQT_SLOT( scrollBy( int, int ) ) );
+ connect( _pageView, TQT_SIGNAL( pageSizeChanged( const TQSize& ) ),
+ _scrollBox, TQT_SLOT( setPageSize( const TQSize& ) ) );
+ connect( _pageView, TQT_SIGNAL( viewSizeChanged( const TQSize& ) ),
+ _scrollBox, TQT_SLOT( setViewSize( const TQSize& ) ) );
+ connect( _pageView, TQT_SIGNAL( contentsMoving( int, int ) ),
+ _scrollBox, TQT_SLOT( setViewPos( int, int ) ) );
//-- File Menu ----------------------------------------------------------
- KStdAction::saveAs( document(), SLOT( saveAs() ),
+ KStdAction::saveAs( document(), TQT_SLOT( saveAs() ),
actionCollection() );
new KAction( i18n( "Document &Info" ), 0,
- miniWidget(), SLOT( info() ),
+ miniWidget(), TQT_SLOT( info() ),
actionCollection(), "info" );
//-- Edit Menu -----------------------------------------------------
_popup = new KPopupMenu( _markList, "marklist_menu" );
KAction *act = new KAction( i18n( "Mark Current Page" ), "flag", CTRL+SHIFT+Key_M,
- _markList, SLOT( markCurrent() ),
+ _markList, TQT_SLOT( markCurrent() ),
actionCollection(), "mark_current" );
act->plug( _popup );
act = new KAction( i18n( "Mark &All Pages" ), 0,
- _markList, SLOT( markAll() ),
+ _markList, TQT_SLOT( markAll() ),
actionCollection(), "mark_all" );
act->plug( _popup );
act = new KAction( i18n( "Mark &Even Pages" ), 0,
- _markList, SLOT( markEven() ),
+ _markList, TQT_SLOT( markEven() ),
actionCollection(), "mark_even" );
act->plug( _popup );
act = new KAction( i18n( "Mark &Odd Pages" ), 0,
- _markList, SLOT( markOdd() ),
+ _markList, TQT_SLOT( markOdd() ),
actionCollection(), "mark_odd" );
act->plug( _popup );
act = new KAction( i18n( "&Toggle Page Marks" ), 0,
- _markList, SLOT( toggleMarks() ),
+ _markList, TQT_SLOT( toggleMarks() ),
actionCollection(), "toggle" );
act->plug( _popup );
act = new KAction( i18n("&Remove Page Marks"), 0,
- _markList, SLOT( removeMarks() ),
+ _markList, TQT_SLOT( removeMarks() ),
actionCollection(), "remove" );
act->plug( _popup );
@@ -228,10 +228,10 @@ KGVPart::KGVPart( QWidget* parentWidget, const char*,
actionCollection(), "media_menu" );
_flick = new KToggleAction( i18n( "No &Flicker" ), 0,
- this, SLOT( slotFlicker() ),
+ this, TQT_SLOT( slotFlicker() ),
actionCollection(), "no_flicker" );
- QStringList orientations;
+ TQStringList orientations;
orientations.append( i18n( "Auto" ) );
orientations.append( i18n( "Portrait" ) );
orientations.append( i18n( "Landscape" ) );
@@ -239,32 +239,32 @@ KGVPart::KGVPart( QWidget* parentWidget, const char*,
orientations.append( i18n( "Seascape" ) );
_selectOrientation->setItems( orientations );
- connect( _selectOrientation, SIGNAL( activated( int ) ),
- this, SLOT( slotOrientation( int ) ) );
- connect( _selectMedia, SIGNAL( activated( int ) ),
- this, SLOT( slotMedia( int ) ) );
+ connect( _selectOrientation, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotOrientation( int ) ) );
+ connect( _selectMedia, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotMedia( int ) ) );
{
KShortcut zoomInShort = KStdAccel::zoomIn();
zoomInShort.append( KKey( CTRL+Key_Equal ) );
- _zoomIn = KStdAction::zoomIn( this, SLOT( slotZoomIn() ),
+ _zoomIn = KStdAction::zoomIn( this, TQT_SLOT( slotZoomIn() ),
actionCollection(), "zoomIn" );
_zoomIn->setShortcut( zoomInShort );
}
- _zoomOut = KStdAction::zoomOut( this, SLOT( slotZoomOut() ),
+ _zoomOut = KStdAction::zoomOut( this, TQT_SLOT( slotZoomOut() ),
actionCollection(), "zoomOut" );
_zoomTo = new KSelectAction( i18n( "Zoom" ), "viewmag", 0, actionCollection(), "zoomTo" );
- connect( _zoomTo, SIGNAL( activated( const QString & ) ), this, SLOT( slotZoom( const QString& ) ) );
+ connect( _zoomTo, TQT_SIGNAL( activated( const TQString & ) ), this, TQT_SLOT( slotZoom( const TQString& ) ) );
_zoomTo->setEditable( true );
_zoomTo->clear();
- QValueList<double> mags = DisplayOptions::normalMagnificationValues();
- QStringList zooms;
+ TQValueList<double> mags = DisplayOptions::normalMagnificationValues();
+ TQStringList zooms;
int idx = 0;
int cur = 0;
- for ( QValueList<double>::iterator first = mags.begin(), last = mags.end();
+ for ( TQValueList<double>::iterator first = mags.begin(), last = mags.end();
first != last;
++first ) {
- QString str = QString( "%1%" ).arg( KGlobal::locale()->formatNumber( *first * 100.0, 2 ));
+ TQString str = TQString( "%1%" ).arg( KGlobal::locale()->formatNumber( *first * 100.0, 2 ));
str.remove( KGlobal::locale()->decimalSymbol() + "00" );
zooms << str;
if ( *first == 1.0 ) idx = cur;
@@ -274,41 +274,41 @@ KGVPart::KGVPart( QWidget* parentWidget, const char*,
_zoomTo->setCurrentItem( idx );
_fitWidth = new KAction( i18n( "&Fit to Page Width" ), 0, this,
- SLOT( slotFitToPage() ), actionCollection(),
+ TQT_SLOT( slotFitToPage() ), actionCollection(),
"fit_to_page");
_fitScreen = new KAction( i18n( "&Fit to Screen" ), Key_S, this,
- SLOT( slotFitToScreen() ), actionCollection(),
+ TQT_SLOT( slotFitToScreen() ), actionCollection(),
"fit_to_screen");
- _prevPage = new KAction( i18n( "Previous Page" ), CTRL+Key_PageUp, this, SLOT( slotPrevPage() ),
+ _prevPage = new KAction( i18n( "Previous Page" ), CTRL+Key_PageUp, this, TQT_SLOT( slotPrevPage() ),
actionCollection(), "prevPage" );
_prevPage->setWhatsThis( i18n( "Moves to the previous page of the document" ) );
- _nextPage = new KAction( i18n( "Next Page" ), CTRL + Key_PageDown, this, SLOT( slotNextPage() ),
+ _nextPage = new KAction( i18n( "Next Page" ), CTRL + Key_PageDown, this, TQT_SLOT( slotNextPage() ),
actionCollection(), "nextPage" );
_nextPage->setWhatsThis( i18n( "Moves to the next page of the document" ) );
- _firstPage = KStdAction::firstPage( this, SLOT( slotGotoStart() ),
+ _firstPage = KStdAction::firstPage( this, TQT_SLOT( slotGotoStart() ),
actionCollection(), "goToStart" );
_firstPage->setWhatsThis( i18n( "Moves to the first page of the document" ) );
- _lastPage = KStdAction::lastPage( this, SLOT( slotGotoEnd() ),
+ _lastPage = KStdAction::lastPage( this, TQT_SLOT( slotGotoEnd() ),
actionCollection(), "goToEnd" );
_lastPage->setWhatsThis( i18n( "Moves to the last page of the document" ) );
KShortcut readUpShort = KStdAccel::shortcut( KStdAccel::Prior );
readUpShort.append( KKey( SHIFT+Key_Space ) );
_readUp = new KAction( i18n( "Read Up" ), "up",
- readUpShort, this, SLOT( slotReadUp() ),
+ readUpShort, this, TQT_SLOT( slotReadUp() ),
actionCollection(), "readUp" );
KShortcut readDownShort = KStdAccel::shortcut( KStdAccel::Next );
readDownShort.append( KKey( Key_Space ) );
_readDown = new KAction( i18n( "Read Down" ), "down",
- readDownShort, this, SLOT( slotReadDown() ),
+ readDownShort, this, TQT_SLOT( slotReadDown() ),
actionCollection(), "readDown" );
- _gotoPage = KStdAction::gotoPage( _docManager, SLOT( goToPage() ),
+ _gotoPage = KStdAction::gotoPage( _docManager, TQT_SLOT( goToPage() ),
actionCollection(), "goToPage" );
//-- Settings Menu ------------------------------------------------------
@@ -316,7 +316,7 @@ KGVPart::KGVPart( QWidget* parentWidget, const char*,
actionCollection(), "show_scrollbars" );
_showScrollBars->setCheckedState(i18n("Hide &Scrollbars"));
_watchFile = new KToggleAction( i18n( "&Watch File" ), 0,
- this, SLOT( slotWatchFile() ),
+ this, TQT_SLOT( slotWatchFile() ),
actionCollection(), "watch_file" );
_showPageList = new KToggleAction( i18n( "Show &Page List" ), 0,
actionCollection(), "show_page_list" );
@@ -324,31 +324,31 @@ KGVPart::KGVPart( QWidget* parentWidget, const char*,
_showPageLabels = new KToggleAction( i18n("Show Page &Labels"), 0,
actionCollection(), "show_page_labels" );
_showPageLabels->setCheckedState(i18n("Hide Page &Labels"));
- KStdAction::preferences( this, SLOT( slotConfigure() ), actionCollection() );
- connect( _showScrollBars, SIGNAL( toggled( bool ) ),
- SLOT( showScrollBars( bool ) ) );
- connect( _showPageList, SIGNAL( toggled( bool ) ),
- SLOT( showMarkList( bool ) ) );
- connect( _showPageLabels, SIGNAL( toggled( bool ) ),
- SLOT( showPageLabels( bool ) ) );
+ KStdAction::preferences( this, TQT_SLOT( slotConfigure() ), actionCollection() );
+ connect( _showScrollBars, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( showScrollBars( bool ) ) );
+ connect( _showPageList, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( showMarkList( bool ) ) );
+ connect( _showPageLabels, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( showPageLabels( bool ) ) );
_extension = new KGVBrowserExtension( this );
setXMLFile( "kgv_part.rc" );
- connect( miniWidget(), SIGNAL( newPageShown( int ) ),
- this, SLOT( slotNewPage( int ) ) );
- connect( _pageView, SIGNAL( contentsMoving( int, int ) ),
- this, SLOT( slotPageMoved( int, int ) ) );
+ connect( miniWidget(), TQT_SIGNAL( newPageShown( int ) ),
+ this, TQT_SLOT( slotNewPage( int ) ) );
+ connect( _pageView, TQT_SIGNAL( contentsMoving( int, int ) ),
+ this, TQT_SLOT( slotPageMoved( int, int ) ) );
- connect( _pageView, SIGNAL( nextPage() ), SLOT( slotNextPage() ));
- connect( _pageView, SIGNAL( prevPage() ), SLOT( slotPrevPage() ));
- connect( _pageView, SIGNAL( zoomIn() ), SLOT( slotZoomIn() ));
- connect( _pageView, SIGNAL( zoomOut() ), SLOT( slotZoomOut() ));
- connect( _pageView, SIGNAL( ReadUp() ), SLOT( slotReadUp() ));
- connect( _pageView, SIGNAL( ReadDown() ), SLOT( slotReadDown() ));
+ connect( _pageView, TQT_SIGNAL( nextPage() ), TQT_SLOT( slotNextPage() ));
+ connect( _pageView, TQT_SIGNAL( prevPage() ), TQT_SLOT( slotPrevPage() ));
+ connect( _pageView, TQT_SIGNAL( zoomIn() ), TQT_SLOT( slotZoomIn() ));
+ connect( _pageView, TQT_SIGNAL( zoomOut() ), TQT_SLOT( slotZoomOut() ));
+ connect( _pageView, TQT_SIGNAL( ReadUp() ), TQT_SLOT( slotReadUp() ));
+ connect( _pageView, TQT_SIGNAL( ReadDown() ), TQT_SLOT( slotReadDown() ));
- QStringList items = document()->mediaNames();
+ TQStringList items = document()->mediaNames();
items.prepend( i18n( "Auto ") );
_selectMedia->setItems( items );
@@ -426,7 +426,7 @@ bool KGVPart::closeURL()
_mimetypeScanner->abort();
if( !m_file.isEmpty() )
_fileWatcher->removeFile( m_file );
- _mimetype = QString::null;
+ _mimetype = TQString::null;
updatePageDepActions();
stateChanged( "initState" );
return KParts::ReadOnlyPart::closeURL();
@@ -568,7 +568,7 @@ void KGVPart::updateZoomActions()
_zoomIn->setEnabled(!_docManager->atMaxZoom());
_zoomOut->setEnabled(!_docManager->atMinZoom());
_zoomTo->setEnabled( true );
- QStringList items = _zoomTo->items();
+ TQStringList items = _zoomTo->items();
bool updateItems = false;
if (_customZoomIndex != -1)
{
@@ -578,10 +578,10 @@ void KGVPart::updateZoomActions()
}
double zoom = floor(miniWidget()->displayOptions().magnification()*1000.0) / 10.0;
unsigned idx = 0;
- for ( QStringList::iterator first = items.begin(), last = items.end();
+ for ( TQStringList::iterator first = items.begin(), last = items.end();
first != last;
++first ) {
- QString cur = *first;
+ TQString cur = *first;
cur.remove( cur.find( '%' ), 1 );
cur = cur.simplifyWhiteSpace();
bool ok = false;
@@ -600,7 +600,7 @@ void KGVPart::updateZoomActions()
}
// Show percentage that isn't predefined
- QString str = QString( "%1%" ).arg( KGlobal::locale()->formatNumber( zoom, 2 ));
+ TQString str = TQString( "%1%" ).arg( KGlobal::locale()->formatNumber( zoom, 2 ));
str.remove( KGlobal::locale()->decimalSymbol() + "00" );
items.insert( items.at(idx), 1, str );
_zoomTo->setItems( items );
@@ -658,10 +658,10 @@ bool KGVPart::openURL( const KURL& url )
emit setWindowCaption( m_url.prettyURL() );
_mimetypeScanner = new KGVRun( m_url, 0, m_url.isLocalFile(), false );
- connect( _mimetypeScanner, SIGNAL( finished( const QString& ) ),
- SLOT( slotMimetypeFinished( const QString& ) ) );
- connect( _mimetypeScanner, SIGNAL( error() ),
- SLOT( slotMimetypeError() ) );
+ connect( _mimetypeScanner, TQT_SIGNAL( finished( const TQString& ) ),
+ TQT_SLOT( slotMimetypeFinished( const TQString& ) ) );
+ connect( _mimetypeScanner, TQT_SIGNAL( error() ),
+ TQT_SLOT( slotMimetypeError() ) );
return true;
}
@@ -680,12 +680,12 @@ void KGVPart::openURLContinue()
m_bTemp = true;
// Use same extension as remote file. This is important for
// mimetype-determination (e.g. koffice)
- QString extension;
- QString fileName = m_url.fileName();
+ TQString extension;
+ TQString fileName = m_url.fileName();
int extensionPos = fileName.findRev( '.' );
if( extensionPos != -1 )
extension = fileName.mid( extensionPos ); // keep the '.'
- KTempFile tempFile( QString::null, extension );
+ KTempFile tempFile( TQString::null, extension );
m_file = tempFile.name();
_tmpFile.setName( m_file );
_tmpFile.open( IO_ReadWrite );
@@ -693,15 +693,15 @@ void KGVPart::openURLContinue()
/*
d->m_job = KIO::file_copy( m_url, m_file, 0600, true, false, d->m_showProgressInfo );
emit started( d->m_job );
- connect( d->m_job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotJobFinished ( KIO::Job * ) ) );
+ connect( d->m_job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotJobFinished ( KIO::Job * ) ) );
*/
_job = KIO::get( m_url, false, isProgressInfoEnabled() );
- connect( _job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- SLOT( slotData( KIO::Job*, const QByteArray& ) ) );
- connect( _job, SIGNAL( result( KIO::Job* ) ),
- SLOT( slotJobFinished( KIO::Job* ) ) );
+ connect( _job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) );
+ connect( _job, TQT_SIGNAL( result( KIO::Job* ) ),
+ TQT_SLOT( slotJobFinished( KIO::Job* ) ) );
emit started( _job );
}
@@ -736,13 +736,13 @@ void KGVPart::slotOpenFileCompleted()
void KGVPart::slotGhostscriptOutput( char* data, int len )
{
- _logWindow->append( QString::fromLocal8Bit( data, len ) );
+ _logWindow->append( TQString::fromLocal8Bit( data, len ) );
if( _showLogWindow )
_logWindow->show();
}
-void KGVPart::slotGhostscriptError( const QString& error )
+void KGVPart::slotGhostscriptError( const TQString& error )
{
_logWindow->setLabel( i18n( "<qt>An error occurred in rendering.<br>"
"<strong>%1</strong><br>"
@@ -770,7 +770,7 @@ void KGVPart::guiActivateEvent( KParts::GUIActivateEvent* event )
KParts::ReadOnlyPart::guiActivateEvent( event );
}
-void KGVPart::slotData( KIO::Job* job, const QByteArray& data )
+void KGVPart::slotData( KIO::Job* job, const TQByteArray& data )
{
Q_ASSERT( _job == job );
@@ -779,12 +779,12 @@ void KGVPart::slotData( KIO::Job* job, const QByteArray& data )
_tmpFile.writeBlock( data );
}
-void KGVPart::slotMimetypeFinished( const QString& type )
+void KGVPart::slotMimetypeFinished( const TQString& type )
{
kdDebug(4500) << "KGVPart::slotMimetypeFinished( " << type << " )" << endl;
_mimetype = type;
if( !_mimetypeScanner || _mimetypeScanner->hasError() )
- emit canceled( QString::null );
+ emit canceled( TQString::null );
else
openURLContinue();
_mimetypeScanner = 0;
@@ -796,7 +796,7 @@ void KGVPart::slotMimetypeError()
_mimetypeScanner = 0;
emit started( 0 );
//kapp->processEvents();
- emit canceled( QString::null );
+ emit canceled( TQString::null );
}
void KGVPart::slotJobFinished( KIO::Job* job )
@@ -815,7 +815,7 @@ void KGVPart::slotJobFinished( KIO::Job* job )
document()->openFile( m_file, _mimetype );
}
-void KGVPart::slotFileDirty( const QString& fileName )
+void KGVPart::slotFileDirty( const TQString& fileName )
{
// The beauty of this is that each start cancels the previous one.
// This means that timeout() is only fired when there have
@@ -897,9 +897,9 @@ void KGVPart::slotZoomOut()
updateZoomActions();
}
-void KGVPart::slotZoom( const QString& nz )
+void KGVPart::slotZoom( const TQString& nz )
{
- QString z = nz;
+ TQString z = nz;
double zoom;
z.remove( z.find( '%' ), 1 );
zoom = KGlobal::locale()->readNumber( z ) / 100;
@@ -926,8 +926,8 @@ void KGVPart::slotFitToScreen()
{
kdDebug(4500) << "KGVPart::slotFitToScreen()" << endl;
if ( _fitTimer->isActive() ) {
- disconnect( _fitTimer, SIGNAL( timeout() ), this, 0 );
- connect( _fitTimer, SIGNAL( timeout() ), SLOT( slotDoFitToScreen() ) );
+ disconnect( _fitTimer, TQT_SIGNAL( timeout() ), this, 0 );
+ connect( _fitTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDoFitToScreen() ) );
}
else slotDoFitToScreen();
}
@@ -967,8 +967,8 @@ void KGVPart::setDisplayOptions( const DisplayOptions& options )
_markList->select( options.page() );
_docManager->setDisplayOptions( options );
_selectOrientation->setCurrentItem( options.overrideOrientation() );
- QStringList medias = document()->mediaNames();
- QStringList::Iterator now = medias.find( options.overridePageMedia() );
+ TQStringList medias = document()->mediaNames();
+ TQStringList::Iterator now = medias.find( options.overridePageMedia() );
if ( now != medias.end() ){
// The options are displayed in inverted order.
// Therefore, size() - index gets you the display index
@@ -996,13 +996,13 @@ KGVRun::KGVRun( const KURL& url, mode_t mode, bool isLocalFile,
bool showProgressInfo ) :
KRun( url, mode, isLocalFile, showProgressInfo )
{
- connect( this, SIGNAL( finished() ), SLOT( emitFinishedWithMimetype() ) );
+ connect( this, TQT_SIGNAL( finished() ), TQT_SLOT( emitFinishedWithMimetype() ) );
}
KGVRun::~KGVRun()
{}
-void KGVRun::foundMimeType( const QString& mimetype )
+void KGVRun::foundMimeType( const TQString& mimetype )
{
kdDebug(4500) << "KGVRun::foundMimeType( " << mimetype << " )" << endl;
@@ -1026,7 +1026,7 @@ void KGVPart::updateFullScreen( bool fs )
else showMarkList( _showPageList->isChecked() );
}
-void KGVPart::showPopup( int, int, const QPoint& pos )
+void KGVPart::showPopup( int, int, const TQPoint& pos )
{
_popup->exec( pos );
}
diff --git a/kghostview/kgv_view.h b/kghostview/kgv_view.h
index 3a426f58..634704fe 100644
--- a/kghostview/kgv_view.h
+++ b/kghostview/kgv_view.h
@@ -19,8 +19,8 @@
#ifndef __KGV_VIEW_H
#define __KGV_VIEW_H
-#include <qcstring.h> // QByteArray
-#include <qfile.h>
+#include <tqcstring.h> // QByteArray
+#include <tqfile.h>
#include <kio/job.h>
#include <kparts/browserextension.h>
@@ -28,8 +28,8 @@
#include "displayoptions.h"
-class QFrame;
-class QWidget;
+class TQFrame;
+class TQWidget;
class KAboutData;
class KAction;
@@ -56,9 +56,9 @@ class KGVPart: public KParts::ReadOnlyPart
{
Q_OBJECT
public:
- KGVPart( QWidget* parentWidget, const char* widgetName,
- QObject* parent, const char* name,
- const QStringList& args = QStringList() );
+ KGVPart( TQWidget* parentWidget, const char* widgetName,
+ TQObject* parent, const char* name,
+ const TQStringList& args = TQStringList() );
virtual ~KGVPart();
@@ -94,7 +94,7 @@ public slots:
void updateFullScreen( bool );
- void showPopup( int, int, const QPoint &pos );
+ void showPopup( int, int, const TQPoint &pos );
void slotScrollLeft();
void slotScrollRight();
@@ -120,7 +120,7 @@ public slots:
void slotZoomIn();
void slotZoomOut();
- void slotZoom( const QString& );
+ void slotZoom( const TQString& );
void slotConfigure();
void slotConfigurationChanged();
@@ -134,13 +134,13 @@ public slots:
void setDisplayOptions( const DisplayOptions& opts );
protected slots:
- void slotData( KIO::Job*, const QByteArray& );
+ void slotData( KIO::Job*, const TQByteArray& );
void slotJobFinished( KIO::Job* );
- void slotMimetypeFinished( const QString& );
+ void slotMimetypeFinished( const TQString& );
void slotMimetypeError();
- void slotFileDirty( const QString& );
+ void slotFileDirty( const TQString& );
void slotDoFileDirty();
void slotOrientation (int);
@@ -166,25 +166,25 @@ protected:
private slots:
void slotGhostscriptOutput( char* data, int len );
- void slotGhostscriptError( const QString& );
+ void slotGhostscriptError( const TQString& );
private:
KGVBrowserExtension* _extension;
KGVDocument* _document;
- QWidget* _mainWidget;
+ TQWidget* _mainWidget;
KGVPageView* _pageView;
KGVPageDecorator* _pageDecorator;
KPSWidget* _psWidget;
ScrollBox* _scrollBox;
- QFrame* _divider;
+ TQFrame* _divider;
MarkList* _markList;
KGVMiniWidget* _docManager;
LogWindow* _logWindow;
- QTimer* _fitTimer;
+ TQTimer* _fitTimer;
KSelectAction* _selectOrientation;
KSelectAction* _selectMedia;
@@ -207,13 +207,13 @@ private:
KToggleAction* _showPageLabels;
KPopupMenu* _popup;
- QFile _tmpFile;
+ TQFile _tmpFile;
KIO::TransferJob* _job;
KDirWatch* _fileWatcher;
KGVRun* _mimetypeScanner;
- QTimer* _dirtyHandler;
+ TQTimer* _dirtyHandler;
- QString _mimetype;
+ TQString _mimetype;
bool _isGuiInitialized : 1;
bool _isFileDirty : 1;
@@ -251,16 +251,16 @@ public:
virtual ~KGVRun();
signals:
- void finished( const QString& mimetype );
+ void finished( const TQString& mimetype );
protected:
- void foundMimeType( const QString& mimetype );
+ void foundMimeType( const TQString& mimetype );
protected slots:
void emitFinishedWithMimetype() { emit finished( _mimetype ); }
private:
- QString _mimetype;
+ TQString _mimetype;
};
#endif
diff --git a/kghostview/kgvconfigdialog.cpp b/kghostview/kgvconfigdialog.cpp
index a9952008..ed55df1e 100644
--- a/kghostview/kgvconfigdialog.cpp
+++ b/kghostview/kgvconfigdialog.cpp
@@ -19,7 +19,7 @@
// Add header files alphabetically
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -43,14 +43,14 @@
namespace {
- QString getGSVersion( QString fullPathToExec )
+ TQString getGSVersion( TQString fullPathToExec )
{
- QString res;
- QString chkVersion = KProcess::quote(fullPathToExec) + " --version";
- FILE* p = popen( QFile::encodeName(chkVersion), "r" );
+ TQString res;
+ TQString chkVersion = KProcess::quote(fullPathToExec) + " --version";
+ FILE* p = popen( TQFile::encodeName(chkVersion), "r" );
if( p ) {
// FIXME: a badly configured interpreter can hang us
- QFile qp;
+ TQFile qp;
qp.open( IO_ReadOnly, p );
qp.readLine( res, 80 );
qp.close();
@@ -96,18 +96,18 @@ namespace {
*
*/
- QString recommendSetSafe( QString version )
+ TQString recommendSetSafe( TQString version )
{
- if ( version < QString::number( 6.53 ) ) return QString::number( 6.53 );
- if ( version[ 0 ] == '7' && version < QString::number( 7.04 ) ) return QString::number( 7.05 );
- return QString::null;
+ 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;
}
// This function should contain all the gs version specific workarounds.
void redoGSDetection()
{
kdDebug(4500) << "kgvconfigdialog.cpp::{unnamed}::redoGSDetection()" << endl;
- QString version = getGSVersion( Configuration::interpreter() );
- QString recommended = recommendSetSafe( version );
+ TQString version = getGSVersion( Configuration::interpreter() );
+ TQString recommended = recommendSetSafe( version );
if ( !recommended.isNull() ) {
KMessageBox::sorry( 0,
i18n( "Your version of gs (version %1) is too old, since it has security issues "
@@ -117,11 +117,11 @@ namespace {
.arg( version )
.arg( recommended ) );
}
- if ( version < QString::number( 7.00 ) )
+ if ( version < TQString::number( 7.00 ) )
{
- QStringList arguments = QStringList::split( ' ', Configuration::antialiasingArguments() );
- arguments.remove( QString::fromLatin1( "-dMaxBitmap=10000000" ) );
- QString antiAliasArgs = arguments.join( " " );
+ TQStringList arguments = TQStringList::split( ' ', Configuration::antialiasingArguments() );
+ arguments.remove( TQString::fromLatin1( "-dMaxBitmap=10000000" ) );
+ TQString antiAliasArgs = arguments.join( " " );
Configuration::setAntialiasingArguments( antiAliasArgs );
}
@@ -140,13 +140,13 @@ void ConfigDialog::showSettings( KGVPart* main ) {
KConfigDialog* dialog = new KConfigDialog( 0, name,
Configuration::self(), KDialogBase::IconList );
dialog->addPage( new GeneralSettingsWidget( 0, "general-settings" ),
- i18n( "General" ), QString::fromLatin1( "kghostview" ) );
+ i18n( "General" ), TQString::fromLatin1( "kghostview" ) );
GSSettingsWidget *gssw = new GSSettingsWidget( 0, "gs-settings" );
- dialog->addPage( gssw, i18n( "Ghostscript\nConfiguration" ), QString::fromLatin1( "pdf" ) );
+ dialog->addPage( gssw, i18n( "Ghostscript\nConfiguration" ), TQString::fromLatin1( "pdf" ) );
gssw->setDetectedVersion(Configuration::version());
- QObject::connect( dialog, SIGNAL( settingsChanged() ), main, SLOT( slotConfigurationChanged() ) );
+ TQObject::connect( dialog, TQT_SIGNAL( settingsChanged() ), main, TQT_SLOT( slotConfigurationChanged() ) );
dialog->show();
}
diff --git a/kghostview/kgvdocument.cpp b/kghostview/kgvdocument.cpp
index d5b7df41..8b522f5d 100644
--- a/kghostview/kgvdocument.cpp
+++ b/kghostview/kgvdocument.cpp
@@ -19,7 +19,7 @@
#include <algorithm>
#include <memory>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <kconfig.h>
#include <kfiledialog.h>
@@ -50,7 +50,7 @@ using namespace std;
using namespace KGV;
KGVDocument::KGVDocument( KGVPart* part, const char* name ) :
- QObject( part, name ),
+ TQObject( part, name ),
_psFile( 0 ),
_part( part ),
_tmpUnzipped( 0 ),
@@ -63,8 +63,8 @@ KGVDocument::KGVDocument( KGVPart* part, const char* name ) :
readSettings();
_pdf2dsc = new Pdf2dsc( _interpreterPath, this );
- connect( _pdf2dsc, SIGNAL( finished( bool ) ),
- SLOT( openPDFFileContinue( bool ) ) );
+ connect( _pdf2dsc, TQT_SIGNAL( finished( bool ) ),
+ TQT_SLOT( openPDFFileContinue( bool ) ) );
}
KGVDocument::~KGVDocument()
@@ -79,7 +79,7 @@ void KGVDocument::readSettings()
/*- OPENING and READING ---------------------------------------------------*/
-void KGVDocument::openFile( const QString& name, const QString& mimetype )
+void KGVDocument::openFile( const TQString& name, const TQString& mimetype )
{
kdDebug(4500) << "KGVDocument::openFile" << endl;
@@ -87,19 +87,19 @@ void KGVDocument::openFile( const QString& name, const QString& mimetype )
_fileName = name;
_mimetype = mimetype;
- QTimer::singleShot( 0, this, SLOT( doOpenFile() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( doOpenFile() ) );
}
void KGVDocument::doOpenFile()
{
- QFileInfo fileInfo( _fileName );
+ TQFileInfo fileInfo( _fileName );
if( !fileInfo.exists() )
{
KMessageBox::sorry( _part->widget(),
i18n( "<qt>Could not open <nobr><strong>%1</strong></nobr>: "
"File does not exist.</qt>" )
.arg( _fileName ) );
- emit canceled( QString() );
+ emit canceled( TQString() );
return;
}
if( !fileInfo.isReadable() )
@@ -108,7 +108,7 @@ void KGVDocument::doOpenFile()
i18n( "<qt>Could not open <nobr><strong>%1</strong></nobr>: "
"Permission denied.</qt>" )
.arg( _fileName ) );
- emit canceled( QString() );
+ emit canceled( TQString() );
return;
}
@@ -127,13 +127,13 @@ void KGVDocument::doOpenFile()
if( _mimetype == "application/pdf"
|| _mimetype == "application/x-pdf" ) // see bug:67474
{
- _tmpDSC = new KTempFile( QString::null, ".ps" );
+ _tmpDSC = new KTempFile( TQString::null, ".ps" );
Q_CHECK_PTR( _tmpDSC );
if( _tmpDSC->status() != 0 ) {
KMessageBox::error( _part->widget(),
i18n( "Could not create temporary file: %1" )
.arg( strerror( _tmpDSC->status() ) ) );
- emit canceled( QString() );
+ emit canceled( TQString() );
return;
}
@@ -161,7 +161,7 @@ void KGVDocument::doOpenFile()
"Document Format (.pdf) files.</qt>" )
.arg( _fileName )
.arg( _mimetype ) );
- emit canceled( QString() );
+ emit canceled( TQString() );
return;
}
}
@@ -171,7 +171,7 @@ bool KGVDocument::uncompressFile()
// If the file is gzipped, gunzip it to the temporary file _tmpUnzipped.
kdDebug(4500) << "KGVDocument::uncompressFile()" << endl;
- auto_ptr<QIODevice> filterDev( KFilterDev::deviceForFile( _fileName, _mimetype, true ) );
+ auto_ptr<TQIODevice> filterDev( KFilterDev::deviceForFile( _fileName, _mimetype, true ) );
if ( !filterDev.get() ) {
KMimeType::Ptr mt = KMimeType::mimeType(_mimetype);
if ( (_fileName.right( 3 ) == ".gz") || mt->is("application/x-gzip") ) {
@@ -191,7 +191,7 @@ bool KGVDocument::uncompressFile()
KMessageBox::error( _part->widget(),
i18n( "<qt>Could not uncompress <nobr><strong>%1</strong></nobr>.</qt>" )
.arg( _fileName ) );
- emit canceled( QString() );
+ emit canceled( TQString() );
return false;
}
@@ -202,12 +202,12 @@ bool KGVDocument::uncompressFile()
KMessageBox::error( _part->widget(),
i18n( "Could not create temporary file: %2" )
.arg( strerror( _tmpUnzipped->status() ) ) );
- emit canceled( QString() );
+ emit canceled( TQString() );
return false;
}
- QByteArray buf( 8192 );
+ TQByteArray buf( 8192 );
int read = 0, wrtn = 0;
while( ( read = filterDev->readBlock( buf.data(), buf.size() ) )
> 0 )
@@ -222,7 +222,7 @@ bool KGVDocument::uncompressFile()
KMessageBox::error( _part->widget(),
i18n( "<qt>Could not uncompress <nobr><strong>%1</strong></nobr>.</qt>" )
.arg( _fileName ) );
- emit canceled( QString() );
+ emit canceled( TQString() );
return false;
}
@@ -240,7 +240,7 @@ void KGVDocument::openPDFFileContinue( bool pdf2dscResult )
KMessageBox::error( _part->widget(),
i18n( "<qt>Could not open file <nobr><strong>%1</strong></nobr>.</qt>" )
.arg( _part->url().url() ) );
- emit canceled( QString() );
+ emit canceled( TQString() );
return;
}
@@ -250,12 +250,12 @@ void KGVDocument::openPDFFileContinue( bool pdf2dscResult )
openPSFile(_tmpDSC->name());
}
-void KGVDocument::openPSFile(const QString &file)
+void KGVDocument::openPSFile(const TQString &file)
{
- QString fileName = file.isEmpty() ? _fileName : file;
+ TQString fileName = file.isEmpty() ? _fileName : file;
kdDebug(4500) << "KGVDocument::openPSFile (" << fileName << ")" << endl;
- FILE* fp = fopen( QFile::encodeName( fileName ), "r");
+ FILE* fp = fopen( TQFile::encodeName( fileName ), "r");
if( fp == 0 )
{
KMessageBox::error( _part->widget(),
@@ -274,7 +274,7 @@ void KGVDocument::openPSFile(const QString &file)
}
}
-void KGVDocument::fileChanged( const QString& name )
+void KGVDocument::fileChanged( const TQString& name )
{
kdDebug(4500) << "KGVDocument: fileChanged " << name << endl;
@@ -304,7 +304,7 @@ void KGVDocument::scanDSC()
char buf[4096];
int count;
/*
- QTime clock;
+ TQTime clock;
clock.start();
*/
while( ( count = fread( buf, sizeof(char), sizeof( buf ), _psFile ) ) != 0 )
@@ -339,7 +339,7 @@ void KGVDocument::close()
clearTemporaryFiles();
}
-bool KGVDocument::convertFromPDF( const QString& saveFileName,
+bool KGVDocument::convertFromPDF( const TQString& saveFileName,
unsigned int firstPage,
unsigned int lastPage )
{
@@ -353,17 +353,17 @@ bool KGVDocument::convertFromPDF( const QString& saveFileName,
<< "-dSAFER"
<< "-dPARANOIDSAFER"
<< "-sDEVICE=pswrite"
- << ( QCString("-sOutputFile=")+QFile::encodeName(saveFileName) )
- << ( QString("-dFirstPage=")+QString::number( firstPage ) )
- << ( QString("-dLastPage=")+QString::number( lastPage ) )
+ << ( TQCString("-sOutputFile=")+TQFile::encodeName(saveFileName) )
+ << ( TQString("-dFirstPage=")+TQString::number( firstPage ) )
+ << ( TQString("-dLastPage=")+TQString::number( lastPage ) )
<< "-c"
<< "save"
<< "pop"
<< "-f"
- << QFile::encodeName(_fileName);
+ << TQFile::encodeName(_fileName);
- /*QValueList<QCString> args = process.args();
- QValueList<QCString>::Iterator it = args.begin();
+ /*TQValueList<TQCString> args = process.args();
+ TQValueList<TQCString>::Iterator it = args.begin();
for ( ; it != args.end() ; ++it )
kdDebug(4500) << ( *it ) << endl;*/
@@ -405,9 +405,9 @@ void KGVDocument::clearTemporaryFiles()
/*- DOCUMENT --------------------------------------------------------------*/
-QStringList KGVDocument::mediaNames() const
+TQStringList KGVDocument::mediaNames() const
{
- QStringList names;
+ TQStringList names;
const CDSCMEDIA* m = dsc_known_media;
while( m->name ) {
@@ -425,7 +425,7 @@ QStringList KGVDocument::mediaNames() const
return names;
}
-const CDSCMEDIA* KGVDocument::findMediaByName( const QString& mediaName ) const
+const CDSCMEDIA* KGVDocument::findMediaByName( const TQString& mediaName ) const
{
if( !isOpen() )
return 0;
@@ -452,7 +452,7 @@ const CDSCMEDIA* KGVDocument::findMediaByName( const QString& mediaName ) const
return 0;
}
-QSize KGVDocument::computePageSize( const QString& mediaName ) const
+TQSize KGVDocument::computePageSize( const TQString& mediaName ) const
{
kdDebug(4500) << "KGVDocument::computePageSize( " << mediaName << " )" << endl;
@@ -460,20 +460,20 @@ QSize KGVDocument::computePageSize( const QString& mediaName ) const
if( dsc()->bbox().get() != 0 )
return dsc()->bbox()->size();
else
- return QSize( 0, 0 );
+ return TQSize( 0, 0 );
}
const CDSCMEDIA* m = findMediaByName( mediaName );
Q_ASSERT( m );
- return QSize( static_cast<int>( m->width ), static_cast<int>( m->height ) );
+ return TQSize( static_cast<int>( m->width ), static_cast<int>( m->height ) );
}
/*- PRINTING and SAVING ---------------------------------------------------*/
-QString KGVDocument::pageListToRange( const PageList& pageList )
+TQString KGVDocument::pageListToRange( const PageList& pageList )
{
- QString range;
+ TQString range;
// Iterators marking the begin and end of a successive sequence
// of pages.
@@ -495,9 +495,9 @@ QString KGVDocument::pageListToRange( const PageList& pageList )
range += ",";
if( bss == ess )
- range += QString::number( *ess );
+ range += TQString::number( *ess );
else
- range += QString( "%1-%2" ).arg( *bss ).arg( *ess );
+ range += TQString( "%1-%2" ).arg( *bss ).arg( *ess );
bss = it;
}
@@ -523,7 +523,7 @@ void KGVDocument::print()
if( printer.setup( _part->widget(), i18n("Print %1").arg(_part->url().fileName()) ) )
{
- KTempFile tf( QString::null, ".ps" );
+ KTempFile tf( TQString::null, ".ps" );
if( tf.status() == 0 )
{
if ( printer.pageList().empty() ) {
@@ -532,7 +532,7 @@ void KGVDocument::print()
"pages to be printed was empty." ),
i18n( "Error Printing" ) );
} else if ( savePages( tf.name(), printer.pageList() ) ) {
- printer.printFiles( QStringList( tf.name() ), true );
+ printer.printFiles( TQStringList( tf.name() ), true );
} else {
KMessageBox::error( 0, i18n( "<qt><strong>Printing failure:</strong><br>Could not convert to PostScript</qt>" ) );
}
@@ -562,17 +562,17 @@ void KGVDocument::saveAs()
_part->url().isLocalFile()
? _part->url().url()
: _part->url().fileName(),
- QString::null,
+ TQString::null,
_part->widget(),
- QString::null );
+ TQString::null );
if( !KIO::NetAccess::upload( _fileName,
saveURL,
- static_cast<QWidget*>( 0 ) ) ) {
+ static_cast<TQWidget*>( 0 ) ) ) {
// TODO: Proper error dialog
}
}
-bool KGVDocument::savePages( const QString& saveFileName,
+bool KGVDocument::savePages( const TQString& saveFileName,
const PageList& pageList )
{
if( pageList.empty() )
@@ -580,7 +580,7 @@ bool KGVDocument::savePages( const QString& saveFileName,
if( _format == PDF )
{
- KTempFile psSaveFile( QString::null, ".ps" );
+ KTempFile psSaveFile( TQString::null, ".ps" );
psSaveFile.setAutoDelete( true );
if( psSaveFile.status() != 0 )
return false;
@@ -639,8 +639,8 @@ bool KGVDocument::savePages( const QString& saveFileName,
// Copy the headers, marked pages, and trailer to fp
-bool KGVDocument::psCopyDoc( const QString& inputFile,
- const QString& outputFile, const PageList& pageList )
+bool KGVDocument::psCopyDoc( const TQString& inputFile,
+ const TQString& outputFile, const PageList& pageList )
{
FILE* from;
FILE* to;
@@ -665,8 +665,8 @@ bool KGVDocument::psCopyDoc( const QString& inputFile,
return false;
}
- from = fopen( QFile::encodeName( inputFile ), "r" );
- to = fopen( QFile::encodeName( outputFile ), "w" );
+ from = fopen( TQFile::encodeName( inputFile ), "r" );
+ to = fopen( TQFile::encodeName( outputFile ), "w" );
// Hack in order to make printing of PDF files work. FIXME
CDSC* dsc;
@@ -674,7 +674,7 @@ bool KGVDocument::psCopyDoc( const QString& inputFile,
if( _format == PS )
dsc = _dsc->cdsc();
else {
- FILE* fp = fopen( QFile::encodeName( inputFile ), "r");
+ FILE* fp = fopen( TQFile::encodeName( inputFile ), "r");
char buf[256];
int count;
dsc = dsc_init( 0 );
@@ -768,17 +768,17 @@ bool KGVDocument::psCopyDoc( const QString& inputFile,
/*- Conversion stuff ------------------------------------------------------*/
/*
-void KGVDocument::runPdf2ps( const QString& pdfName,
- const QString& dscName )
+void KGVDocument::runPdf2ps( const TQString& pdfName,
+ const TQString& dscName )
{
KProcess process;
process << _interpreterPath
<< "-dNODISPLAY"
<< "-dQUIET"
- << QString( "-sPDFname=%1" ).arg( pdfName )
- << QString( "-sDSCnamale locale( "kghostview" );
+ << TQString( "-sPDFname=%1" ).arg( pdfName )
+ << TQString( "-sDSCnamale locale( "kghostview" );
_fallBackPageMedia = pageSizeToString(
- static_cast< QPrinter::PageSize >( locale.pageSize() ) );
+ static_cast< TQPrinter::PageSize >( locale.pageSize() ) );
_usePageLabels = false;
e=%1" ).arg( dscName )
@@ -786,8 +786,8 @@ e=%1" ).arg( dscName )
<< "-c"
<< "quit";
- connect( &process, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( pdf2psExited( KProcess* ) ) );
+ connect( &process, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( pdf2psExited( KProcess* ) ) );
kdDebug(4500) << "KGVDocument: pdf2ps started" << endl;
process.start( KProcess::NotifyOnExit );
@@ -801,8 +801,8 @@ void KGVDocument::pdf2psExited( KProcess* process )
}
*/
-Pdf2dsc::Pdf2dsc( const QString& ghostscriptPath, QObject* parent, const char* name ) :
- QObject( parent, name ),
+Pdf2dsc::Pdf2dsc( const TQString& ghostscriptPath, TQObject* parent, const char* name ) :
+ TQObject( parent, name ),
_process( 0 ),
_ghostscriptPath( ghostscriptPath )
{}
@@ -812,7 +812,7 @@ Pdf2dsc::~Pdf2dsc()
kill();
}
-void Pdf2dsc::run( const QString& pdfName, const QString& dscName )
+void Pdf2dsc::run( const TQString& pdfName, const TQString& dscName )
{
kill();
@@ -823,8 +823,8 @@ void Pdf2dsc::run( const QString& pdfName, const QString& dscName )
<< "-dDELAYSAFER"
<< "-dNODISPLAY"
<< "-dQUIET"
- << QString( "-sPDFname=%1" ).arg( pdfName )
- << QString( "-sDSCname=%1" ).arg( dscName )
+ << TQString( "-sPDFname=%1" ).arg( pdfName )
+ << TQString( "-sDSCname=%1" ).arg( dscName )
<< "-c"
<< "<< /PermitFileReading [ PDFname ] /PermitFileWriting [ DSCname ] /PermitFileControl [] >> setuserparams .locksafe"
<< "-f"
@@ -832,8 +832,8 @@ void Pdf2dsc::run( const QString& pdfName, const QString& dscName )
<< "-c"
<< "quit";
- connect( _process, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( processExited() ) );
+ connect( _process, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( processExited() ) );
kdDebug(4500) << "Pdf2dsc: started" << endl;
_process->start( KProcess::NotifyOnExit );
diff --git a/kghostview/kgvdocument.h b/kghostview/kgvdocument.h
index 960843f8..581e5ba8 100644
--- a/kghostview/kgvdocument.h
+++ b/kghostview/kgvdocument.h
@@ -19,9 +19,9 @@
#ifndef __KGV_DOCUMENT_H__
#define __KGV_DOCUMENT_H__
-#include <qprinter.h>
-#include <qsize.h>
-#include <qstring.h>
+#include <tqprinter.h>
+#include <tqsize.h>
+#include <tqstring.h>
#include "kgv.h"
#include "dscparse_adapter.h"
@@ -51,14 +51,14 @@ public:
/**
* Open the @em local file @p filename asynchronously.
*/
- void openFile( const QString& filename, const QString& mimetype );
+ void openFile( const TQString& filename, const TQString& mimetype );
/**
* Close the document.
*/
void close();
- const QString& fileName() const { return _fileName; }
+ const TQString& fileName() const { return _fileName; }
FILE* psFile() { return _psFile; }
Format format() const { return _format; }
@@ -72,24 +72,24 @@ public:
/**
* A list of page media (sizes).
*/
- QStringList mediaNames() const;
+ TQStringList mediaNames() const;
- const CDSCMEDIA* findMediaByName( const QString& mediaName ) const;
+ const CDSCMEDIA* findMediaByName( const TQString& mediaName ) const;
- QSize computePageSize( const QString& pageMedia ) const;
+ TQSize computePageSize( const TQString& pageMedia ) const;
- static QString pageSizeToString( QPrinter::PageSize );
+ static TQString pageSizeToString( TQPrinter::PageSize );
/**
- * Returns a QString which contains a range representation of @p pageList.
+ * Returns a TQString which contains a range representation of @p pageList.
* Examples: [1,3] -> "1,3"
* [1,2,3] -> "1-3"
* [1,3,4,5,8] -> "1,3-5,8"
*/
- static QString pageListToRange( const KGV::PageList& );
+ static TQString pageListToRange( const KGV::PageList& );
public slots:
- void fileChanged( const QString& );
+ void fileChanged( const TQString& );
void saveAs();
void print();
@@ -101,7 +101,7 @@ signals:
void fileChangeFailed();
void completed();
- void canceled( const QString& );
+ void canceled( const TQString& );
protected:
void scanDSC();
@@ -116,16 +116,16 @@ protected:
* kdelibs installed. Generally it will work for .gz and .bz2
*/
bool uncompressFile();
- void openPSFile(const QString &file=QString::null);
+ void openPSFile(const TQString &file=TQString::null);
protected:
- bool savePages( const QString& saveFileName,
+ bool savePages( const TQString& saveFileName,
const KGV::PageList& pageList );
- bool psCopyDoc( const QString& inputFile, const QString& outputFile,
+ bool psCopyDoc( const TQString& inputFile, const TQString& outputFile,
const KGV::PageList& pageList );
- bool convertFromPDF( const QString& saveFileName,
+ bool convertFromPDF( const TQString& saveFileName,
unsigned int firstPage, unsigned int lastPage );
protected slots:
@@ -135,8 +135,8 @@ protected slots:
private:
FILE* _psFile;
- QString _fileName;
- QString _mimetype;
+ TQString _fileName;
+ TQString _mimetype;
KGVPart* _part;
@@ -148,7 +148,7 @@ private:
Pdf2dsc* _pdf2dsc;
- QString _interpreterPath;
+ TQString _interpreterPath;
bool _isFileOpen;
@@ -161,10 +161,10 @@ class Pdf2dsc : public QObject
Q_OBJECT
public:
- Pdf2dsc( const QString& ghostscriptPath, QObject* parent = 0, const char* name = 0 );
+ Pdf2dsc( const TQString& ghostscriptPath, TQObject* parent = 0, const char* name = 0 );
~Pdf2dsc();
- void run( const QString& pdfName, const QString& dscName );
+ void run( const TQString& pdfName, const TQString& dscName );
void kill();
signals:
@@ -175,7 +175,7 @@ protected slots:
private:
KProcess* _process;
- QString _ghostscriptPath;
+ TQString _ghostscriptPath;
};
diff --git a/kghostview/kgvfactory.cpp b/kghostview/kgvfactory.cpp
index edf20144..d7a082b0 100644
--- a/kghostview/kgvfactory.cpp
+++ b/kghostview/kgvfactory.cpp
@@ -52,19 +52,19 @@ KGVFactory *KGVFactory::s_self;
KInstance *KGVFactory::s_instance;
KAboutData *KGVFactory::s_aboutData;
-KParts::Part *KGVFactory::createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
+KParts::Part *KGVFactory::createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
const char *className,
- const QStringList &args_ )
+ const TQStringList &args_ )
{
- QStringList args = args_;
+ TQStringList args = args_;
/* Below is the reason why we must
* have our own factory instead of
* typedef KParts::GenericFactory<KGVPart> KGVFactory
*
* as we did before.
*/
- args << QString::fromLatin1( className );
+ args << TQString::fromLatin1( className );
if ( !strcmp( className, "Browser/View" ) ) {
className = "KParts::ReadOnlyPart";
}
diff --git a/kghostview/kgvfactory.h b/kghostview/kgvfactory.h
index 238e3557..9a5d507f 100644
--- a/kghostview/kgvfactory.h
+++ b/kghostview/kgvfactory.h
@@ -33,10 +33,10 @@ class KDE_EXPORT KGVFactory : public KParts::Factory
static KInstance *instance();
static KAboutData *aboutData();
- virtual KParts::Part *createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
+ virtual KParts::Part *createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
const char *className,
- const QStringList &args );
+ const TQStringList &args );
protected:
virtual KInstance *createInstance();
diff --git a/kghostview/kgvmainwidget.cpp b/kghostview/kgvmainwidget.cpp
index 2bad7f84..5e9bd40b 100644
--- a/kghostview/kgvmainwidget.cpp
+++ b/kghostview/kgvmainwidget.cpp
@@ -20,10 +20,10 @@
#include <kurl.h>
#include <kurldrag.h>
-KGVMainWidget::KGVMainWidget( QWidget* parent, const char* name )
- : QWidget( parent, name ) {}
+KGVMainWidget::KGVMainWidget( TQWidget* parent, const char* name )
+ : TQWidget( parent, name ) {}
-void KGVMainWidget::keyPressEvent( QKeyEvent* event )
+void KGVMainWidget::keyPressEvent( TQKeyEvent* event )
{
if( event->key() == Key_Space && event->state() != ShiftButton ) {
event->accept();
@@ -31,7 +31,7 @@ void KGVMainWidget::keyPressEvent( QKeyEvent* event )
}
}
-void KGVMainWidget::dropEvent( QDropEvent* ev )
+void KGVMainWidget::dropEvent( TQDropEvent* ev )
{
KURL::List lst;
if ( KURLDrag::decode( ev, lst ) ) {
@@ -40,7 +40,7 @@ void KGVMainWidget::dropEvent( QDropEvent* ev )
}
-void KGVMainWidget::dragEnterEvent( QDragEnterEvent * ev )
+void KGVMainWidget::dragEnterEvent( TQDragEnterEvent * ev )
{
ev->accept();
}
diff --git a/kghostview/kgvmainwidget.h b/kghostview/kgvmainwidget.h
index 0e79fbd6..99b9dc9b 100644
--- a/kghostview/kgvmainwidget.h
+++ b/kghostview/kgvmainwidget.h
@@ -19,7 +19,7 @@
#ifndef KGVMAINWIDGET_H
#define KGVMAINWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KURL;
@@ -28,16 +28,16 @@ class KGVMainWidget : public QWidget
Q_OBJECT
public:
- KGVMainWidget( QWidget* parent = 0, const char* name = 0 );
+ KGVMainWidget( TQWidget* parent = 0, const char* name = 0 );
signals:
void spacePressed();
void urlDropped( const KURL& );
protected:
- virtual void keyPressEvent( QKeyEvent* );
- virtual void dragEnterEvent( QDragEnterEvent* );
- virtual void dropEvent( QDropEvent* );
+ virtual void keyPressEvent( TQKeyEvent* );
+ virtual void dragEnterEvent( TQDragEnterEvent* );
+ virtual void dropEvent( TQDropEvent* );
};
#endif
diff --git a/kghostview/kgvpagedecorator.cpp b/kghostview/kgvpagedecorator.cpp
index e1eccfc7..b6304c1d 100644
--- a/kghostview/kgvpagedecorator.cpp
+++ b/kghostview/kgvpagedecorator.cpp
@@ -16,15 +16,15 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qbitmap.h>
-#include <qdrawutil.h>
-#include <qpainter.h>
-#include <qregion.h>
+#include <tqbitmap.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
+#include <tqregion.h>
#include "kgvpagedecorator.h"
-KGVPageDecorator::KGVPageDecorator( QWidget* parent, const char* name ) :
- QHBox( parent, name ),
+KGVPageDecorator::KGVPageDecorator( TQWidget* parent, const char* name ) :
+ TQHBox( parent, name ),
_margin( 5 ),
_borderWidth( 1 ),
_shadowOffset( 2, 2 )
@@ -35,35 +35,35 @@ KGVPageDecorator::KGVPageDecorator( QWidget* parent, const char* name ) :
setAutoMask( true );
}
-bool KGVPageDecorator::eventFilter( QObject* o, QEvent* e )
+bool KGVPageDecorator::eventFilter( TQObject* o, TQEvent* e )
{
switch( e->type() ) {
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonDblClick:
- case QEvent::MouseMove:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonDblClick:
+ case TQEvent::MouseMove:
return event( e );
default:
;
}
- return QHBox::eventFilter( o, e );
+ return TQHBox::eventFilter( o, e );
}
-void KGVPageDecorator::childEvent( QChildEvent* e )
+void KGVPageDecorator::childEvent( TQChildEvent* e )
{
if( e->child()->isWidgetType() && e->inserted() )
e->child()->installEventFilter( this );
}
-void KGVPageDecorator::drawFrame( QPainter* p )
+void KGVPageDecorator::drawFrame( TQPainter* p )
{
- QRect r( frameRect().topLeft() + QPoint(_margin,_margin),
- frameRect().bottomRight() - QPoint(_margin,_margin) );
+ TQRect r( frameRect().topLeft() + TQPoint(_margin,_margin),
+ frameRect().bottomRight() - TQPoint(_margin,_margin) );
if( !r.isValid() )
return;
- const QColorGroup& cg = colorGroup();
+ const TQColorGroup& cg = colorGroup();
r.moveCenter( r.center() + _shadowOffset );
qDrawPlainRect( p, r, cg.shadow(), _shadowOffset.manhattanLength() );
@@ -72,17 +72,17 @@ void KGVPageDecorator::drawFrame( QPainter* p )
qDrawPlainRect( p, r, cg.foreground(), _borderWidth );
}
-void KGVPageDecorator::drawMask( QPainter* p )
+void KGVPageDecorator::drawMask( TQPainter* p )
{
- QRect r( frameRect().topLeft() + QPoint(_margin,_margin),
- frameRect().bottomRight() - QPoint(_margin,_margin) );
+ TQRect r( frameRect().topLeft() + TQPoint(_margin,_margin),
+ frameRect().bottomRight() - TQPoint(_margin,_margin) );
if( !r.isValid() )
return;
- QColorGroup cg( color1, color1, color1, color1, color1, color1, color1,
+ TQColorGroup cg( color1, color1, color1, color1, color1, color1, color1,
color1, color0 );
- QBrush brush( cg.foreground() );
+ TQBrush brush( cg.foreground() );
r.moveCenter( r.center() + _shadowOffset );
qDrawPlainRect( p, r, cg.foreground(), _shadowOffset.manhattanLength() );
@@ -93,9 +93,9 @@ void KGVPageDecorator::drawMask( QPainter* p )
void KGVPageDecorator::updateMask()
{
- QBitmap bm( size() );
+ TQBitmap bm( size() );
bm.fill( color0 );
- QPainter p( &bm, this );
+ TQPainter p( &bm, this );
p.setPen( color1 );
p.setBrush( color1 );
drawMask( &p );
diff --git a/kghostview/kgvpagedecorator.h b/kghostview/kgvpagedecorator.h
index 72ceb956..40839fdc 100644
--- a/kghostview/kgvpagedecorator.h
+++ b/kghostview/kgvpagedecorator.h
@@ -19,43 +19,43 @@
#ifndef KGVPAGEDECORATOR_H
#define KGVPAGEDECORATOR_H
-#include <qhbox.h>
+#include <tqhbox.h>
class KGVPageDecorator : public QHBox
{
public:
- KGVPageDecorator( QWidget* parent = 0, const char* name = 0 );
+ KGVPageDecorator( TQWidget* parent = 0, const char* name = 0 );
~KGVPageDecorator() { ; }
unsigned int margin() const;
unsigned int borderWidth() const;
/**
- * Reimplemented from QObject to let mouse events from child widgets
+ * Reimplemented from TQObject to let mouse events from child widgets
* appear to come from this widget.
*/
- bool eventFilter( QObject*, QEvent* );
+ bool eventFilter( TQObject*, TQEvent* );
protected:
/**
- * Reimplemented from QObject to automatically insert an event filter
+ * Reimplemented from TQObject to automatically insert an event filter
* on child widgets.
*/
- virtual void childEvent( QChildEvent* );
+ virtual void childEvent( TQChildEvent* );
/**
- * Reimplemented from QFrame to draw a pageshadow like frame.
+ * Reimplemented from TQFrame to draw a pageshadow like frame.
*/
- virtual void drawFrame( QPainter* );
+ virtual void drawFrame( TQPainter* );
/**
* Draw the mask of both the frame and the contents in order to create a
* partially transparent frame.
*/
- virtual void drawMask( QPainter* );
+ virtual void drawMask( TQPainter* );
/**
- * Reimplemented from QWidget. It uses @ref drawMask() to draw the mask
+ * Reimplemented from TQWidget. It uses @ref drawMask() to draw the mask
* of the frame when transparency is required.
*/
virtual void updateMask();
@@ -63,7 +63,7 @@ protected:
private:
unsigned int _margin;
unsigned int _borderWidth;
- QPoint _shadowOffset;
+ TQPoint _shadowOffset;
};
inline unsigned int KGVPageDecorator::margin() const
diff --git a/kghostview/kgvpageview.cpp b/kghostview/kgvpageview.cpp
index 8a8af585..2cc5f7e6 100644
--- a/kghostview/kgvpageview.cpp
+++ b/kghostview/kgvpageview.cpp
@@ -16,22 +16,22 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kdebug.h>
#include "kgvpageview.h"
-KGVPageView::KGVPageView( QWidget* parent, const char* name )
- : QScrollView( parent, name )
+KGVPageView::KGVPageView( TQWidget* parent, const char* name )
+ : TQScrollView( parent, name )
{
_page = 0;
- setFocusPolicy( QWidget::StrongFocus );
- viewport()->setFocusPolicy( QWidget::WheelFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
+ viewport()->setFocusPolicy( TQWidget::WheelFocus );
}
-void KGVPageView::setPage( QWidget* page )
+void KGVPageView::setPage( TQWidget* page )
{
if( page != 0 ) {
addChild( page );
@@ -50,21 +50,21 @@ bool KGVPageView::atBottom() const
return verticalScrollBar()->value() == verticalScrollBar()->maxValue();
}
-bool KGVPageView::eventFilter( QObject* o, QEvent* e )
+bool KGVPageView::eventFilter( TQObject* o, TQEvent* e )
{
- if ( o == _page && e->type() == QEvent::Resize ) {
- // We need to call QScrollView::eventFilter before centerContents,
+ if ( o == _page && e->type() == TQEvent::Resize ) {
+ // We need to call TQScrollView::eventFilter before centerContents,
// otherwise a loop will be introduced.
- bool result = QScrollView::eventFilter( o, e );
+ bool result = TQScrollView::eventFilter( o, e );
centerContents();
emit pageSizeChanged( _page->size() );
return result;
}
- return QScrollView::eventFilter( o, e );
+ return TQScrollView::eventFilter( o, e );
}
-void KGVPageView::wheelEvent( QWheelEvent *e )
+void KGVPageView::wheelEvent( TQWheelEvent *e )
{
int delta = e->delta();
e->accept();
@@ -84,9 +84,9 @@ void KGVPageView::wheelEvent( QWheelEvent *e )
}
else
- QScrollView::wheelEvent( e );
+ TQScrollView::wheelEvent( e );
}
-void KGVPageView::mousePressEvent( QMouseEvent * e )
+void KGVPageView::mousePressEvent( TQMouseEvent * e )
{
if ( e->button() & LeftButton )
{
@@ -103,7 +103,7 @@ void KGVPageView::mousePressEvent( QMouseEvent * e )
}
}
-void KGVPageView::mouseReleaseEvent( QMouseEvent *e )
+void KGVPageView::mouseReleaseEvent( TQMouseEvent *e )
{
if ( e -> button() & LeftButton )
{
@@ -111,11 +111,11 @@ void KGVPageView::mouseReleaseEvent( QMouseEvent *e )
}
}
-void KGVPageView::mouseMoveEvent( QMouseEvent * e )
+void KGVPageView::mouseMoveEvent( TQMouseEvent * e )
{
if ( e->state() & LeftButton )
{
- QPoint delta = _dragGrabPos - e->globalPos();
+ TQPoint delta = _dragGrabPos - e->globalPos();
scrollBy( delta.x(), delta.y() );
_dragGrabPos = e->globalPos();
}
@@ -201,7 +201,7 @@ void KGVPageView::enableScrollBars( bool b )
setVScrollBarMode( b ? Auto : AlwaysOff );
}
-void KGVPageView::keyPressEvent( QKeyEvent* e )
+void KGVPageView::keyPressEvent( TQKeyEvent* e )
{
switch ( e->key() ) {
case Key_Up:
@@ -223,9 +223,9 @@ void KGVPageView::keyPressEvent( QKeyEvent* e )
e->accept();
}
-void KGVPageView::viewportResizeEvent( QResizeEvent* e )
+void KGVPageView::viewportResizeEvent( TQResizeEvent* e )
{
- QScrollView::viewportResizeEvent( e );
+ TQScrollView::viewportResizeEvent( e );
emit viewSizeChanged( viewport()->size() );
centerContents();
}
@@ -238,7 +238,7 @@ void KGVPageView::centerContents()
int newX = 0;
int newY = 0;
- QSize newViewportSize = viewportSize( _page->width(),
+ TQSize newViewportSize = viewportSize( _page->width(),
_page->height() );
if( newViewportSize.width() > _page->width() )
diff --git a/kghostview/kgvpageview.h b/kghostview/kgvpageview.h
index 9a1abac3..6f76f458 100644
--- a/kghostview/kgvpageview.h
+++ b/kghostview/kgvpageview.h
@@ -20,10 +20,10 @@
#ifndef KGVPAGEVIEW_H
#define KGVPAGEVIEW_H
-#include <qscrollview.h>
+#include <tqscrollview.h>
/**
- * KGVPageView is a customized QScrollView, which can hold one page. This page
+ * KGVPageView is a customized TQScrollView, which can hold one page. This page
* will be centered on the viewport. Furthermore it adds the ability to scroll
* the page by dragging it using the mouse.
*/
@@ -32,11 +32,11 @@ class KGVPageView : public QScrollView
Q_OBJECT
public:
- KGVPageView( QWidget* parent = 0, const char* name = 0 );
+ KGVPageView( TQWidget* parent = 0, const char* name = 0 );
~KGVPageView() { ; }
- void setPage( QWidget* );
- QWidget* page() const { return _page; }
+ void setPage( TQWidget* );
+ TQWidget* page() const { return _page; }
/**
* Return true if the top resp. bottom of the page is visible.
@@ -52,7 +52,7 @@ public:
/**
* @reimplemented
*/
- bool eventFilter( QObject*, QEvent* );
+ bool eventFilter( TQObject*, TQEvent* );
public slots:
bool readUp();
@@ -65,8 +65,8 @@ public slots:
void scrollTop();
signals:
- void viewSizeChanged( const QSize& );
- void pageSizeChanged( const QSize& );
+ void viewSizeChanged( const TQSize& );
+ void pageSizeChanged( const TQSize& );
void nextPage();
void zoomOut();
void zoomIn();
@@ -76,18 +76,18 @@ signals:
void ReadDown();
protected:
- virtual void keyPressEvent( QKeyEvent* );
+ virtual void keyPressEvent( TQKeyEvent* );
/**
- * Reimplemented to from QScrollView to make sure that the page is centered
+ * Reimplemented to from TQScrollView to make sure that the page is centered
* when it fits in the viewport.
*/
- virtual void viewportResizeEvent( QResizeEvent* );
+ virtual void viewportResizeEvent( TQResizeEvent* );
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseReleaseEvent( QMouseEvent *e );
- virtual void mouseMoveEvent( QMouseEvent *e );
- virtual void wheelEvent( QWheelEvent * );
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void mouseReleaseEvent( TQMouseEvent *e );
+ virtual void mouseMoveEvent( TQMouseEvent *e );
+ virtual void wheelEvent( TQWheelEvent * );
/**
* If the viewport is larger than the page, center the page on the
@@ -96,8 +96,8 @@ protected:
void centerContents();
private:
- QPoint _dragGrabPos;
- QWidget* _page;
+ TQPoint _dragGrabPos;
+ TQWidget* _page;
};
#endif
diff --git a/kghostview/kgvshell.cpp b/kghostview/kgvshell.cpp
index 1dc546d5..708921ab 100644
--- a/kghostview/kgvshell.cpp
+++ b/kghostview/kgvshell.cpp
@@ -42,7 +42,7 @@
#include <kwin.h>
-#include <qcursor.h>
+#include <tqcursor.h>
#include "kgv_miniwidget.h"
#include "kgv_view.h"
@@ -64,25 +64,25 @@ KGVShell::KGVShell() :
/*---- File -----------------------------------------------------------*/
openact =
- KStdAction::open( this, SLOT( slotFileOpen() ),
+ KStdAction::open( this, TQT_SLOT( slotFileOpen() ),
actionCollection() );
recent =
- KStdAction::openRecent( this, SLOT( openURL( const KURL& ) ),
+ KStdAction::openRecent( this, TQT_SLOT( openURL( const KURL& ) ),
actionCollection() );
- KStdAction::print( m_gvpart->document(), SLOT( print() ),
+ KStdAction::print( m_gvpart->document(), TQT_SLOT( print() ),
actionCollection() );
(void)
- KStdAction::quit( this, SLOT( slotQuit() ), actionCollection() );
+ KStdAction::quit( this, TQT_SLOT( slotQuit() ), actionCollection() );
/*---- View -----------------------------------------------------------*/
new KAction( i18n( "&Reload" ), "reload",
KStdAccel::shortcut( KStdAccel::Reload ),
- m_gvpart, SLOT( reloadFile() ),
+ m_gvpart, TQT_SLOT( reloadFile() ),
actionCollection(), "reload" );
new KAction( i18n( "&Maximize" ), Key_M, this,
- SLOT( slotMaximize() ), actionCollection(),
+ TQT_SLOT( slotMaximize() ), actionCollection(),
"maximize");
- _showMenuBarAction = KStdAction::showMenubar( this, SLOT( slotShowMenubar() ), actionCollection() );
+ _showMenuBarAction = KStdAction::showMenubar( this, TQT_SLOT( slotShowMenubar() ), actionCollection() );
/*---- Settings -------------------------------------------------------*/
#if KDE_VERSION >= KDE_MAKE_VERSION(3,1,90)
@@ -91,12 +91,12 @@ KGVShell::KGVShell() :
setAutoSaveSettings();
setStandardToolBarMenuEnabled(true);
#if KDE_VERSION >= KDE_MAKE_VERSION(3,1,90)
- m_fullScreenAction = KStdAction::fullScreen( this, SLOT( slotUpdateFullScreen() ), actionCollection(), this );
+ m_fullScreenAction = KStdAction::fullScreen( this, TQT_SLOT( slotUpdateFullScreen() ), actionCollection(), this );
#else
- m_fullScreenAction = new KToggleAction( this, SLOT( slotUpdateFullScreen() ) );
+ m_fullScreenAction = new KToggleAction( this, TQT_SLOT( slotUpdateFullScreen() ) );
#endif
- KStdAction::configureToolbars( this, SLOT( slotConfigureToolbars() ), actionCollection() );
- KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()),
+ KStdAction::configureToolbars( this, TQT_SLOT( slotConfigureToolbars() ), actionCollection() );
+ KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()),
actionCollection());
//_popup = new KPopupMenu( i18n( "Full Screen Options" ), this, "rmb popup" );
@@ -108,21 +108,21 @@ actionCollection());
m_fsFilter = new FullScreenFilter( *this );
// Just save them automatically is destructor. (TODO: of kgv_view!)
- //KStdAction::saveOptions ( this, SLOT (slotWriteSettings()), actionCollection());
+ //KStdAction::saveOptions ( this, TQT_SLOT (slotWriteSettings()), actionCollection());
setXMLFile( "kghostviewui.rc" );
// 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(), SIGNAL (sizeHintChanged()), this, SLOT (slotResize ()) );
+ // connect ( m_gvpart->widget(), TQT_SIGNAL (sizeHintChanged()), this, TQT_SLOT (slotResize ()) );
setCentralWidget( m_gvpart->widget() );
createGUI( m_gvpart );
- connect( m_gvpart->pageView(), SIGNAL( rightClick() ),SLOT( slotRMBClick() ) );
- connect( m_gvpart, SIGNAL( canceled(const QString&) ),SLOT( slotReset() ) );
- connect( m_gvpart, SIGNAL( completed() ), SLOT( slotDocumentState() ) );
+ connect( m_gvpart->pageView(), TQT_SIGNAL( rightClick() ),TQT_SLOT( slotRMBClick() ) );
+ connect( m_gvpart, TQT_SIGNAL( canceled(const TQString&) ),TQT_SLOT( slotReset() ) );
+ connect( m_gvpart, TQT_SIGNAL( completed() ), TQT_SLOT( slotDocumentState() ) );
if (!initialGeometrySet())
resize(640,400);
@@ -194,17 +194,17 @@ void
KGVShell::readSettings()
{
recent->loadEntries( KGlobal::config() );
- QStringList items = recent->items();
+ TQStringList items = recent->items();
// Code copied from kviewshell.cpp:
// Constant source of annoyance in KDVI < 1.0: the 'recent-files'
// menu contains lots of files which don't exist (any longer). Thus,
// we'll sort out the non-existent files here.
- for ( QStringList::Iterator it = items.begin(); it != items.end(); ++it ) {
+ for ( TQStringList::Iterator it = items.begin(); it != items.end(); ++it ) {
KURL url(*it);
if (url.isLocalFile()) {
- QFileInfo info(url.path());
+ TQFileInfo info(url.path());
if (!info.exists())
recent->removeURL(url);
}
@@ -256,7 +256,7 @@ KGVShell::openStdin()
return;
}
- QByteArray buf( BUFSIZ );
+ TQByteArray buf( BUFSIZ );
int read = 0, wrtn = 0;
while( ( read = fread( buf.data(), sizeof(char), buf.size(), stdin ) )
> 0 ) {
@@ -304,7 +304,7 @@ void KGVShell::slotMaximize()
KWin::setState( winId(), NET::MaxHoriz | NET::MaxVert );
// If we do it now, it comes to nothing since it would work
// on the current (non-maximized) size
- QTimer::singleShot( 800, m_gvpart, SLOT( slotFitToPage() ) );
+ TQTimer::singleShot( 800, m_gvpart, TQT_SLOT( slotFitToPage() ) );
}
void KGVShell::slotResize()
@@ -352,7 +352,7 @@ void KGVShell::slotConfigureToolbars()
{
saveMainWindowSettings( KGlobal::config(), "MainWindow" );
KEditToolbar dlg( factory() );
- connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(slotNewToolbarConfig()));
+ connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig()));
dlg.exec();
}
@@ -363,7 +363,7 @@ void KGVShell::slotNewToolbarConfig()
void KGVShell::slotRMBClick()
{
- _popup->exec( QCursor::pos() );
+ _popup->exec( TQCursor::pos() );
}
diff --git a/kghostview/kgvshell.h b/kghostview/kgvshell.h
index 872430c1..73b7f128 100644
--- a/kghostview/kgvshell.h
+++ b/kghostview/kgvshell.h
@@ -19,11 +19,11 @@
#ifndef __KGVSHELL_H__
#define __KGVSHELL_H__
-#include <qstring.h>
+#include <tqstring.h>
#include <kparts/mainwindow.h>
-class QTimer;
+class TQTimer;
class KRecentFilesAction;
class ScrollBox;
@@ -76,7 +76,7 @@ private:
friend class FullScreenFilter;
KGVPart* m_gvpart;
- QString cwd;
+ TQString cwd;
KAction* openact;
KToggleAction* _showMenuBarAction;
diff --git a/kghostview/kpswidget.cpp b/kghostview/kpswidget.cpp
index b51cda5e..85f22827 100644
--- a/kghostview/kpswidget.cpp
+++ b/kghostview/kpswidget.cpp
@@ -21,7 +21,7 @@
#include <stdlib.h>
#include <math.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -63,9 +63,9 @@ int orientation2angle( CDSC_ORIENTATION_ENUM orientation )
return angle;
}
-QCString palette2String( Configuration::EnumPalette::type palette )
+TQCString palette2String( Configuration::EnumPalette::type palette )
{
- QCString str;
+ TQCString str;
switch( palette )
{
@@ -80,8 +80,8 @@ QCString palette2String( Configuration::EnumPalette::type palette )
}
-KPSWidget::KPSWidget( QWidget* parent, const char* name ) :
- QWidget ( parent, name ),
+KPSWidget::KPSWidget( TQWidget* parent, const char* name ) :
+ TQWidget ( parent, name ),
_gsWindow ( None ),
_usePipe ( false ),
_doubleBuffer ( false ),
@@ -178,7 +178,7 @@ bool KPSWidget::sendPS( FILE* fp, unsigned int begin, unsigned int end )
return true;
}
-void KPSWidget::setGhostscriptPath( const QString& path )
+void KPSWidget::setGhostscriptPath( const TQString& path )
{
kdDebug() << "KPSWidget::setGhostscriptPath( " << path << " )" << endl;
if( _ghostscriptPath != path )
@@ -189,7 +189,7 @@ void KPSWidget::setGhostscriptPath( const QString& path )
}
}
-void KPSWidget::setGhostscriptArguments( const QStringList& arguments )
+void KPSWidget::setGhostscriptArguments( const TQStringList& arguments )
{
if( _ghostscriptArguments != arguments )
{
@@ -199,7 +199,7 @@ void KPSWidget::setGhostscriptArguments( const QStringList& arguments )
}
}
-void KPSWidget::setFileName( const QString& fileName, bool usePipe )
+void KPSWidget::setFileName( const TQString& fileName, bool usePipe )
{
if(( _fileName != fileName ) || (_usePipe != usePipe))
{
@@ -304,7 +304,7 @@ void KPSWidget::setupWidget()
_backgroundPixmap.fill( white );
// 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( QWidget::WidgetOrigin );
+ setBackgroundOrigin( TQWidget::WidgetOrigin );
setErasePixmap( _backgroundPixmap );
}
@@ -343,8 +343,8 @@ bool KPSWidget::startInterpreter()
setupWidget();
_process = new KProcess;
- if ( _doubleBuffer ) _process->setEnvironment( "GHOSTVIEW", QString( "%1 %2" ).arg( winId() ).arg( _backgroundPixmap.handle() ) );
- else _process->setEnvironment( "GHOSTVIEW", QString::number( winId() ) );
+ if ( _doubleBuffer ) _process->setEnvironment( "GHOSTVIEW", TQString( "%1 %2" ).arg( winId() ).arg( _backgroundPixmap.handle() ) );
+ else _process->setEnvironment( "GHOSTVIEW", TQString::number( winId() ) );
*_process << _ghostscriptPath.local8Bit();
*_process << _ghostscriptArguments;
@@ -358,14 +358,14 @@ bool KPSWidget::startInterpreter()
else
*_process << _fileName << "-c" << "quit";
- connect( _process, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( slotProcessExited( KProcess* ) ) );
- connect( _process, SIGNAL( receivedStdout( KProcess*, char*, int ) ),
- this, SLOT( gs_output( KProcess*, char*, int ) ) );
- connect( _process, SIGNAL( receivedStderr( KProcess*, char*, int ) ),
- this, SLOT( gs_output( KProcess*, char*, int ) ) );
- connect( _process, SIGNAL( wroteStdin( KProcess*) ),
- this, SLOT( gs_input( KProcess* ) ) );
+ connect( _process, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( slotProcessExited( KProcess* ) ) );
+ connect( _process, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
+ this, TQT_SLOT( gs_output( KProcess*, char*, int ) ) );
+ connect( _process, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ),
+ this, TQT_SLOT( gs_output( KProcess*, char*, int ) ) );
+ connect( _process, TQT_SIGNAL( wroteStdin( KProcess*) ),
+ this, TQT_SLOT( gs_input( KProcess* ) ) );
kapp->flushX();
@@ -420,9 +420,9 @@ void KPSWidget::slotProcessExited( KProcess* process )
{
kdDebug( 4500 ) << "KPSWidget::slotProcessExited(): looks like it was not a clean exit." << endl;
if ( process->normalExit() ) {
- emit ghostscriptError( QString( i18n( "Exited with error code %1." ).arg( process->exitStatus() ) ) );
+ emit ghostscriptError( TQString( i18n( "Exited with error code %1." ).arg( process->exitStatus() ) ) );
} else {
- emit ghostscriptError( QString( i18n( "Process killed or crashed." ) ) );
+ emit ghostscriptError( TQString( i18n( "Process killed or crashed." ) ) );
}
_process = 0;
stopInterpreter();
@@ -483,12 +483,12 @@ void KPSWidget::readSettings()
{
setGhostscriptPath( Configuration::interpreter() );
- QStringList arguments;
+ TQStringList arguments;
if( Configuration::antialiasing() )
- arguments = QStringList::split( " ", Configuration::antialiasingArguments() );
+ arguments = TQStringList::split( " ", Configuration::antialiasingArguments() );
else
- arguments = QStringList::split( " ", Configuration::nonAntialiasingArguments() );
+ arguments = TQStringList::split( " ", Configuration::nonAntialiasingArguments() );
if( !Configuration::platformFonts() )
arguments << "-dNOPLATFONTS";
@@ -522,7 +522,7 @@ bool KPSWidget::x11Event( XEvent* e )
return true;
}
}
- return QWidget::x11Event( e );
+ return TQWidget::x11Event( e );
}
#include "kpswidget.moc"
diff --git a/kghostview/kpswidget.h b/kghostview/kpswidget.h
index 66ef0b14..c2ca49cb 100644
--- a/kghostview/kpswidget.h
+++ b/kghostview/kpswidget.h
@@ -20,10 +20,10 @@
#define __KPSWIDGET_H__
#include <queue>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qwidget.h>
-#include <qpixmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
#include "dscparse_adapter.h"
#include "configuration.h"
@@ -48,7 +48,7 @@ class KPSWidget : public QWidget
Q_OBJECT
public:
- KPSWidget( QWidget* parent = 0, const char* name = 0 );
+ KPSWidget( TQWidget* parent = 0, const char* name = 0 );
~KPSWidget();
/**
@@ -100,7 +100,7 @@ public:
* @p usePipe indicates whether we use a pipe for
* communication or let ghoscript read the file itself.
*/
- void setFileName( const QString&, bool usePipe );
+ void setFileName( const TQString&, bool usePipe );
/**
* Set the bounding box of the drawable. See my comment in the source
@@ -154,7 +154,7 @@ signals:
*
* Don't change the pixmap or bad things will happen. This is the backing pixmap of the display.
*/
- void newPageImage( QPixmap image );
+ void newPageImage( TQPixmap image );
/**
* This signal is emitted whenever the ghostscript process has
@@ -167,7 +167,7 @@ signals:
*
* @param msg a <strong>translated</strong> error message to display the user which may be null if we cannot tell anything important
*/
- void ghostscriptError( const QString& mgs );
+ void ghostscriptError( const TQString& mgs );
protected:
struct Record
@@ -180,7 +180,7 @@ protected:
unsigned int len;
};
- // void resizeEvent( QResizeEvent* );
+ // void resizeEvent( TQResizeEvent* );
bool x11Event( XEvent* );
/**
@@ -195,8 +195,8 @@ protected:
*/
void setupWidget();
- void setGhostscriptPath( const QString& );
- void setGhostscriptArguments( const QStringList& );
+ void setGhostscriptPath( const TQString& );
+ void setGhostscriptArguments( const TQStringList& );
void setPalette( Configuration::EnumPalette::type );
protected slots:
@@ -211,15 +211,15 @@ private:
enum AtomName { GHOSTVIEW = 0, GHOSTVIEW_COLORS, NEXT, PAGE, DONE };
Atom _atoms[5];
- QPixmap _backgroundPixmap;
+ TQPixmap _backgroundPixmap;
/**
* The following properties determine how Ghostscript is started.
* If any of these is changed, Ghostscript needs to be restarted.
*/
- QString _ghostscriptPath;
- QStringList _ghostscriptArguments;
- QString _fileName;
+ TQString _ghostscriptPath;
+ TQStringList _ghostscriptArguments;
+ TQString _fileName;
bool _usePipe;
bool _doubleBuffer;
diff --git a/kghostview/logwindow.cpp b/kghostview/logwindow.cpp
index df2e5765..69c61ac3 100644
--- a/kghostview/logwindow.cpp
+++ b/kghostview/logwindow.cpp
@@ -16,9 +16,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qtextedit.h>
-#include <qlabel.h>
-#include <qvbox.h>
+#include <tqtextedit.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
#include <kglobalsettings.h>
#include <kurllabel.h>
@@ -26,35 +26,35 @@
#include "logwindow.h"
-LogWindow::LogWindow( const QString& caption,
- QWidget* parent, const char* name) :
+LogWindow::LogWindow( const TQString& caption,
+ TQWidget* parent, const char* name) :
KDialogBase( parent, name, false, caption, User1|Close, Close, false,
KStdGuiItem::clear() )
{
- QVBox * display = makeVBoxMainWidget();
+ TQVBox * display = makeVBoxMainWidget();
- _errorIndication = new QLabel( "", display, "logview-label" );
+ _errorIndication = new TQLabel( "", display, "logview-label" );
_errorIndication->hide();
- _configureGS = new KURLLabel( i18n( "Configure Ghostscript" ), QString::null, display );
+ _configureGS = new KURLLabel( i18n( "Configure Ghostscript" ), TQString::null, display );
_configureGS->hide();
- _logView = new QTextEdit( display, "logview" );
+ _logView = new TQTextEdit( display, "logview" );
_logView->setTextFormat( Qt::PlainText );
_logView->setReadOnly( true );
- _logView->setWordWrap( QTextEdit::NoWrap );
+ _logView->setWordWrap( TQTextEdit::NoWrap );
_logView->setFont( KGlobalSettings::fixedFont() );
_logView->setMinimumWidth( 80 * fontMetrics().width( " " ) );
- connect( this, SIGNAL( user1Clicked() ), SLOT( clear() ) );
- connect( _configureGS, SIGNAL( leftClickedURL() ), SLOT( emitConfigureGS() ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( clear() ) );
+ connect( _configureGS, TQT_SIGNAL( leftClickedURL() ), TQT_SLOT( emitConfigureGS() ) );
}
void LogWindow::emitConfigureGS() {
emit configureGS();
}
-void LogWindow::append( const QString& message )
+void LogWindow::append( const TQString& message )
{
_logView->append( message );
}
@@ -65,7 +65,7 @@ void LogWindow::clear()
_errorIndication->clear();
}
-void LogWindow::setLabel( const QString& text, bool showConfigureGS )
+void LogWindow::setLabel( const TQString& text, bool showConfigureGS )
{
_errorIndication->setText( text );
_errorIndication->show();
diff --git a/kghostview/logwindow.h b/kghostview/logwindow.h
index 4eb099e0..7be4bf98 100644
--- a/kghostview/logwindow.h
+++ b/kghostview/logwindow.h
@@ -21,8 +21,8 @@
#include <kdialogbase.h>
-class QLabel;
-class QTextEdit;
+class TQLabel;
+class TQTextEdit;
class KURLLabel;
class LogWindow : public KDialogBase
@@ -30,13 +30,13 @@ class LogWindow : public KDialogBase
Q_OBJECT
public:
- LogWindow( const QString& caption,
- QWidget* parent = 0, const char* name = 0 );
+ LogWindow( const TQString& caption,
+ TQWidget* parent = 0, const char* name = 0 );
public slots:
- void append( const QString& message );
+ void append( const TQString& message );
void clear();
- void setLabel( const QString&, bool showConfigureGSLink );
+ void setLabel( const TQString&, bool showConfigureGSLink );
private slots:
void emitConfigureGS();
@@ -45,8 +45,8 @@ signals:
void configureGS();
private:
- QLabel* _errorIndication;
- QTextEdit* _logView;
+ TQLabel* _errorIndication;
+ TQTextEdit* _logView;
KURLLabel* _configureGS;
};
diff --git a/kghostview/main.cpp b/kghostview/main.cpp
index 26574ddf..327a5be5 100644
--- a/kghostview/main.cpp
+++ b/kghostview/main.cpp
@@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
+#include <tqdir.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -55,7 +55,7 @@ int main( int argc, char** argv )
else {
KGVShell* shell = new KGVShell;
if( args->count() == 1 ) {
- if( QString( args->arg(0) ) == "-" ) {
+ if( TQString( args->arg(0) ) == "-" ) {
shell->openStdin();
} else {
shell->openURL( args->url(0) );
diff --git a/kghostview/marklist.cpp b/kghostview/marklist.cpp
index 674630ed..df06bd9d 100644
--- a/kghostview/marklist.cpp
+++ b/kghostview/marklist.cpp
@@ -20,11 +20,11 @@
#include <cassert>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
+#include <tqimage.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
#include <kglobalsettings.h>
#include <klocale.h>
@@ -32,23 +32,23 @@
#include "kgv_miniwidget.h"
-MarkListItem::MarkListItem(QWidget *parent, const QString &text, const QString &tip, const QColor &color, KGVMiniWidget* miniW, int pageNum)
- : QWidget( parent ),
+MarkListItem::MarkListItem(TQWidget *parent, const TQString &text, const TQString &tip, const TQColor &color, KGVMiniWidget* miniW, int pageNum)
+ : TQWidget( parent ),
_miniWidget( miniW ),
_pageNum( pageNum ),
_requested( false )
{
//kdDebug( 4500 ) << "MarkListItem::MarkListItem( _ , " << text <<" , " << tip << " , " << color << ", _ ," << pageNum << " )" << endl;
- QBoxLayout *l = new QVBoxLayout( this, 5, 0 );
- _thumbnailW = new QWidget( this );
- _checkBox = new QCheckBox( text, this );
+ TQBoxLayout *l = new TQVBoxLayout( this, 5, 0 );
+ _thumbnailW = new TQWidget( this );
+ _checkBox = new TQCheckBox( text, this );
l->addWidget( _thumbnailW, 1 );
l->addWidget( _checkBox, 0, Qt::AlignHCenter );
- QWhatsThis::add( _checkBox, i18n( "Using this checkbox you can select pages for printing." ) );
+ TQWhatsThis::add( _checkBox, i18n( "Using this checkbox you can select pages for printing." ) );
setFixedHeight( 100 );
_backgroundColor = color;
setPaletteBackgroundColor( _backgroundColor );
- QToolTip::add(this, tip);
+ TQToolTip::add(this, tip);
// TODO: Put a little page number or other place-holder when there is no thumbnail to display.
}
@@ -67,11 +67,11 @@ void MarkListItem::setChecked( bool checked )
_checkBox->setChecked(checked);
}
-void MarkListItem::setPixmap( QPixmap thumbnail )
+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( QWidget::WidgetOrigin );
+ _thumbnailW->setBackgroundOrigin( TQWidget::WidgetOrigin );
_thumbnailW->setPaletteBackgroundPixmap( thumbnail.convertToImage().smoothScale( _thumbnailW->size() ) );
_requested = false;
}
@@ -79,18 +79,18 @@ void MarkListItem::setPixmap( QPixmap thumbnail )
void MarkListItem::setSelected( bool selected )
{
if (selected)
- setPaletteBackgroundColor( QApplication::palette().active().highlight() );
+ setPaletteBackgroundColor( TQApplication::palette().active().highlight() );
else
setPaletteBackgroundColor( _backgroundColor );
}
-void MarkListItem::resizeEvent( QResizeEvent * )
+void MarkListItem::resizeEvent( TQResizeEvent * )
{
if ( _thumbnailW->paletteBackgroundPixmap() )
_thumbnailW->setPaletteBackgroundPixmap( _thumbnailW->paletteBackgroundPixmap()->convertToImage().smoothScale( _thumbnailW->size() ) );
}
-void MarkListItem::paintEvent( QPaintEvent* )
+void MarkListItem::paintEvent( TQPaintEvent* )
{
/* TODO:
* We should cancel things which flipped into view and then flipped out.
@@ -100,7 +100,7 @@ void MarkListItem::paintEvent( QPaintEvent* )
*/
if ( _requested ) return;
if ( !_thumbnailW->paletteBackgroundPixmap() || _thumbnailW->paletteBackgroundPixmap()->isNull() ) {
- _miniWidget->getThumbnailService()->delayedGetThumbnail( _pageNum, this, SLOT( setPixmap( QPixmap ) ) );
+ _miniWidget->getThumbnailService()->delayedGetThumbnail( _pageNum, this, TQT_SLOT( setPixmap( TQPixmap ) ) );
_requested = true;
}
}
@@ -108,8 +108,8 @@ void MarkListItem::paintEvent( QPaintEvent* )
/* MarkList */
-MarkList::MarkList( QWidget* parent, const char* name, KGVMiniWidget* mini)
- : QTable( parent, name ),
+MarkList::MarkList( TQWidget* parent, const char* name, KGVMiniWidget* mini)
+ : TQTable( parent, name ),
_selected ( -1 ),
_miniWidget( mini )
{
@@ -117,13 +117,13 @@ _miniWidget( mini )
setLeftMargin( 0 ); // we don't want the vertical header
horizontalHeader()->setLabel( 0, i18n("Page") );
- connect( this, SIGNAL( currentChanged( int, int ) ),
- this, SIGNAL( selected( int ) ) );
+ connect( this, TQT_SIGNAL( currentChanged( int, int ) ),
+ this, TQT_SIGNAL( selected( int ) ) );
}
-QValueList<int> MarkList::markList() const
+TQValueList<int> MarkList::markList() const
{
- QValueList<int> list;
+ TQValueList<int> list;
MarkListItem *_item;
for(int i = 0; i < numRows(); i++)
{
@@ -134,7 +134,7 @@ QValueList<int> MarkList::markList() const
return list;
}
-void MarkList::insertItem( const QString& text, int index, const QString& tip)
+void MarkList::insertItem( const TQString& text, int index, const TQString& tip)
{
MarkListItem *_item;
_item = new MarkListItem( this, text, tip, viewport()->paletteBackgroundColor(), _miniWidget, index );
@@ -224,7 +224,7 @@ void MarkList::removeMarks()
}
}
-void MarkList::viewportResizeEvent ( QResizeEvent * )
+void MarkList::viewportResizeEvent ( TQResizeEvent * )
{
MarkListItem *_item;
if( visibleWidth() != columnWidth( 0 ) )
diff --git a/kghostview/marklist.h b/kghostview/marklist.h
index 18589af3..4405f877 100644
--- a/kghostview/marklist.h
+++ b/kghostview/marklist.h
@@ -19,8 +19,8 @@
#ifndef MARKLIST_H
#define MARKLIST_H
-#include <qcheckbox.h>
-#include <qtable.h>
+#include <tqcheckbox.h>
+#include <tqtable.h>
class KGVMiniWidget;
@@ -28,24 +28,24 @@ class MarkListItem : public QWidget
{
Q_OBJECT
public:
- MarkListItem( QWidget *parent, const QString &text, const QString &tip, const QColor &color, KGVMiniWidget*, int );
+ MarkListItem( TQWidget *parent, const TQString &text, const TQString &tip, const TQColor &color, KGVMiniWidget*, int );
bool isChecked() const;
public slots:
void toggle();
void setChecked( bool checked );
- void setPixmap( QPixmap thumbnail );
+ void setPixmap( TQPixmap thumbnail );
void setSelected( bool selected );
private:
- void resizeEvent( QResizeEvent * );
- void paintEvent( QPaintEvent* );
+ void resizeEvent( TQResizeEvent * );
+ void paintEvent( TQPaintEvent* );
private:
- QWidget *_thumbnailW;
- QCheckBox *_checkBox;
- QColor _backgroundColor;
+ TQWidget *_thumbnailW;
+ TQCheckBox *_checkBox;
+ TQColor _backgroundColor;
KGVMiniWidget* _miniWidget;
const int _pageNum;
bool _requested;
@@ -56,11 +56,11 @@ class MarkList: public QTable
Q_OBJECT
public:
- MarkList( QWidget* parent = 0, const char* name = 0, KGVMiniWidget* = 0 );
+ MarkList( TQWidget* parent = 0, const char* name = 0, KGVMiniWidget* = 0 );
- QValueList<int> markList() const;
- void insertItem( const QString& text, int index = -1,
- const QString& tip = QString::null );
+ TQValueList<int> markList() const;
+ void insertItem( const TQString& text, int index = -1,
+ const TQString& tip = TQString::null );
public slots:
void select( int index );
@@ -73,7 +73,7 @@ public slots:
void clear();
protected:
- virtual void viewportResizeEvent ( QResizeEvent * );
+ virtual void viewportResizeEvent ( TQResizeEvent * );
signals:
void selected( int );
diff --git a/kghostview/scrollbox.cpp b/kghostview/scrollbox.cpp
index 8be3ab61..d318ec31 100644
--- a/kghostview/scrollbox.cpp
+++ b/kghostview/scrollbox.cpp
@@ -16,19 +16,19 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qdrawutil.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include "scrollbox.h"
-ScrollBox::ScrollBox( QWidget* parent, const char* name )
- : QFrame( parent, name )
+ScrollBox::ScrollBox( TQWidget* parent, const char* name )
+ : TQFrame( parent, name )
{
setFrameStyle( Panel | Sunken );
}
-void ScrollBox::mousePressEvent( QMouseEvent* e )
+void ScrollBox::mousePressEvent( TQMouseEvent* e )
{
mouse = e->pos();
if( e->button() == RightButton )
@@ -37,7 +37,7 @@ void ScrollBox::mousePressEvent( QMouseEvent* e )
emit button2Pressed();
}
-void ScrollBox::mouseMoveEvent( QMouseEvent* e )
+void ScrollBox::mouseMoveEvent( TQMouseEvent* e )
{
if( e->state() != LeftButton )
return;
@@ -47,21 +47,21 @@ void ScrollBox::mouseMoveEvent( QMouseEvent* e )
// Notify the word what the view position has changed
// The word in turn will notify as that view position has changed
- // Even if coordinates are out of range QScrollView handles
+ // Even if coordinates are out of range TQScrollView handles
// this properly
- emit valueChanged( QPoint( viewpos.x() + dx, viewpos.y() + dy ) );
+ emit valueChanged( TQPoint( viewpos.x() + dx, viewpos.y() + dy ) );
emit valueChangedRelative( dx, dy );
mouse = e->pos();
}
-void ScrollBox::resizeEvent( QResizeEvent * )
+void ScrollBox::resizeEvent( TQResizeEvent * )
{
if ( paletteBackgroundPixmap() )
setPaletteBackgroundPixmap( paletteBackgroundPixmap()->convertToImage().smoothScale( size() ) );
}
-void ScrollBox::drawContents( QPainter* paint )
+void ScrollBox::drawContents( TQPainter* paint )
{
if ( pagesize.isEmpty() )
return;
@@ -75,7 +75,7 @@ void ScrollBox::drawContents( QPainter* paint )
*
*/
- QRect c( contentsRect() );
+ TQRect c( contentsRect() );
paint -> setPen( Qt::red );
@@ -92,30 +92,30 @@ void ScrollBox::drawContents( QPainter* paint )
paint->drawRect( x, y, w, h );
}
-void ScrollBox::setPageSize( const QSize& s )
+void ScrollBox::setPageSize( const TQSize& s )
{
pagesize = s;
setFixedHeight( s.height() * width() / s.width() );
repaint();
}
-void ScrollBox::setViewSize( const QSize& s )
+void ScrollBox::setViewSize( const TQSize& s )
{
viewsize = s;
repaint();
}
-void ScrollBox::setViewPos( const QPoint& pos )
+void ScrollBox::setViewPos( const TQPoint& pos )
{
viewpos = pos;
repaint();
}
-void ScrollBox::setThumbnail( QPixmap img )
+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( QWidget::WidgetOrigin );
+ setBackgroundOrigin( TQWidget::WidgetOrigin );
setPaletteBackgroundPixmap( img.convertToImage().smoothScale( size() ) );
}
diff --git a/kghostview/scrollbox.h b/kghostview/scrollbox.h
index a815c655..487e2c7e 100644
--- a/kghostview/scrollbox.h
+++ b/kghostview/scrollbox.h
@@ -19,40 +19,40 @@
#ifndef __SCROLLBOX_H__
#define __SCROLLBOX_H__
-#include <qframe.h>
-#include <qimage.h>
+#include <tqframe.h>
+#include <tqimage.h>
class ScrollBox: public QFrame
{
Q_OBJECT
public:
- ScrollBox( QWidget* parent = 0, const char* name = 0 );
+ ScrollBox( TQWidget* parent = 0, const char* name = 0 );
public slots:
- void setPageSize( const QSize& );
- void setViewSize( const QSize& );
- void setViewPos( const QPoint& );
- void setViewPos( int x, int y ) { setViewPos( QPoint( x, y ) ); }
- void setThumbnail( QPixmap img );
+ void setPageSize( const TQSize& );
+ void setViewSize( const TQSize& );
+ void setViewPos( const TQPoint& );
+ void setViewPos( int x, int y ) { setViewPos( TQPoint( x, y ) ); }
+ void setThumbnail( TQPixmap img );
void clear();
signals:
- void valueChanged( const QPoint& );
+ void valueChanged( const TQPoint& );
void valueChangedRelative( int dx, int dy );
void button2Pressed();
void button3Pressed();
protected:
- void mousePressEvent( QMouseEvent *);
- void mouseMoveEvent( QMouseEvent *);
- void drawContents( QPainter *);
- void resizeEvent( QResizeEvent * );
+ void mousePressEvent( TQMouseEvent *);
+ void mouseMoveEvent( TQMouseEvent *);
+ void drawContents( TQPainter *);
+ void resizeEvent( TQResizeEvent * );
private:
- QPoint viewpos, mouse;
- QSize pagesize;
- QSize viewsize;
+ TQPoint viewpos, mouse;
+ TQSize pagesize;
+ TQSize viewsize;
};
#endif
diff --git a/kghostview/thumbnailservice.cpp b/kghostview/thumbnailservice.cpp
index 4d653cfa..817d1c03 100644
--- a/kghostview/thumbnailservice.cpp
+++ b/kghostview/thumbnailservice.cpp
@@ -23,22 +23,22 @@
#include "kgv_view.h"
#include <kdebug.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <algorithm>
#include <cassert>
#include <cstring>
ThumbnailService::ThumbnailService( KGVMiniWidget* parent, const char* name ) :
- QObject( parent, name ),
+ TQObject( parent, name ),
_mini( parent ),
- timer_( new QTimer( this ) ),
+ timer_( new TQTimer( this ) ),
_busy( false ),
_enabled( false )
{
_thumbnailDrawer = new KPSWidget( parent->_part->widget(), "thumbnail-drawer" );
_thumbnailDrawer->readSettings();
- connect( _thumbnailDrawer, SIGNAL( newPageImage( QPixmap ) ), SLOT( slotDone( QPixmap ) ) );
- connect( timer_, SIGNAL( timeout() ), SLOT( processOne() ) );
+ connect( _thumbnailDrawer, TQT_SIGNAL( newPageImage( TQPixmap ) ), TQT_SLOT( slotDone( TQPixmap ) ) );
+ connect( timer_, TQT_SIGNAL( timeout() ), TQT_SLOT( processOne() ) );
_thumbnailDrawer->hide();
}
@@ -51,12 +51,12 @@ bool ThumbnailService::Request::operator < ( ThumbnailService::Request b ) const
if ( urgent != b.urgent ) return urgent;
if ( page != b.page ) return page < b.page;
// below is just so that == can be in terms of "<"
- if ( receiver != b.receiver ) return std::less<QObject*>()( receiver, b.receiver );
+ if ( receiver != b.receiver ) return std::less<TQObject*>()( receiver, b.receiver );
if ( slot != b.slot ) return std::strcmp( slot, b.slot ) < 0;
return false;
}
-void ThumbnailService::delayedGetThumbnail( const int page, QObject* rec, const char* slot, bool urgent )
+void ThumbnailService::delayedGetThumbnail( const int page, TQObject* rec, const char* slot, bool urgent )
{
kdDebug( 4500 ) << "ThumbnailService::delayedGetThumbnail: request for page " << page << endl;
pending.insert( Request( page, rec, slot, urgent ) );
@@ -71,7 +71,7 @@ void ThumbnailService::delayedGetThumbnail( const int page, QObject* rec, const
}
}
-void ThumbnailService::cancelRequests( const int page, QObject* rec, const char* slot )
+void ThumbnailService::cancelRequests( const int page, TQObject* rec, const char* slot )
{
std::set<Request>::iterator first = pending.begin(), last = pending.end();
while ( first != last ) {
@@ -106,7 +106,7 @@ void ThumbnailService::setEnabled( const bool e )
if ( _enabled && _busy ) processOne();
}
-void ThumbnailService::slotDone( QPixmap pix )
+void ThumbnailService::slotDone( TQPixmap pix )
{
kdDebug( 4500 ) << "ThumbnailService::slotDone(): got page" << endl;
pix.detach();
@@ -133,10 +133,10 @@ void ThumbnailService::processOne()
FILE* file = _mini->psFile();
Request req = *pending.begin();
kdDebug( 4500 ) << "ThumbnailService::processOne(): processing " << req.page << "(of " << pending.size() << " requests)" << endl;
- disconnect( SIGNAL( relayPixmap( QPixmap ) ) );
+ disconnect( TQT_SIGNAL( relayPixmap( TQPixmap ) ) );
while ( !pending.empty() && req.page == pending.begin()->page ) {
req = *pending.begin();
- connect( this, SIGNAL( relayPixmap( QPixmap ) ), req.receiver, req.slot );
+ connect( this, TQT_SIGNAL( relayPixmap( TQPixmap ) ), req.receiver, req.slot );
pending.erase( pending.begin() );
}
_thumbnailDrawer->setOrientation( _mini->orientation( req.page ) );
diff --git a/kghostview/thumbnailservice.h b/kghostview/thumbnailservice.h
index d1981242..50bc2d6d 100644
--- a/kghostview/thumbnailservice.h
+++ b/kghostview/thumbnailservice.h
@@ -19,23 +19,23 @@
*/
#include <set>
-#include <qobject.h>
-#include <qpixmap.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqpixmap.h>
+#include <tqguardedptr.h>
#include <stdio.h>
class KPSWidget;
class KGVMiniWidget;
-class QTimer;
+class TQTimer;
-class ThumbnailService : public QObject {
+class ThumbnailService : public TQObject {
Q_OBJECT
public:
ThumbnailService( KGVMiniWidget* parent, const char* name = 0 );
~ThumbnailService();
public slots:
- void delayedGetThumbnail( int page, QObject* receiver, const char* slot, bool urgent = false );
+ void delayedGetThumbnail( int page, TQObject* receiver, const char* slot, bool urgent = false );
/**
* Cancels the request matching the signature below.
*
@@ -43,7 +43,7 @@ class ThumbnailService : public QObject {
* @param receiver the receiver. Use null for wildcard
* @param slot Use null for wildcard
*/
- void cancelRequests( int page, QObject* receiver, const char* slot);
+ void cancelRequests( int page, TQObject* receiver, const char* slot);
void reset();
/**
@@ -58,31 +58,31 @@ class ThumbnailService : public QObject {
/**
* Don't connect to this directly
*/
- void relayPixmap( QPixmap );
+ void relayPixmap( TQPixmap );
private slots:
- void slotDone( QPixmap );
+ void slotDone( TQPixmap );
void processOne();
private:
struct Request {
- Request( int p, QObject* r, const char* s ) :
+ Request( int p, TQObject* r, const char* s ) :
page( p ), receiver( r ), slot( s ), urgent( false ) { }
- Request( int p, QObject* r, const char* s, bool u ) :
+ Request( int p, TQObject* r, const char* s, bool u ) :
page( p ), receiver( r ), slot( s ), urgent( u ) { }
int page;
- QObject* receiver;
+ TQObject* receiver;
const char* slot;
bool urgent;
bool operator < ( Request ) const;
};
static bool pageCmp( Request, Request );
std::set<Request> pending;
- QGuardedPtr<KPSWidget> _thumbnailDrawer;
+ TQGuardedPtr<KPSWidget> _thumbnailDrawer;
KGVMiniWidget* _mini;
- QTimer* timer_;
+ TQTimer* timer_;
bool _busy;
bool _enabled;
};
diff --git a/kghostview/viewcontrol.cpp b/kghostview/viewcontrol.cpp
index cc66d598..1740bf4d 100644
--- a/kghostview/viewcontrol.cpp
+++ b/kghostview/viewcontrol.cpp
@@ -9,12 +9,12 @@
**
*****************************************************************************/
-#include <qcombobox.h>
-#include <qframe.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
+#include <tqcombobox.h>
+#include <tqframe.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
#include "viewcontrol.h"
@@ -25,22 +25,22 @@
#include <kbuttonbox.h>
#include <kseparator.h>
-ViewControl::ViewControl( QWidget *parent, const char *name )
- : QDialog( parent, name )
+ViewControl::ViewControl( TQWidget *parent, const char *name )
+ : TQDialog( parent, name )
{
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
- QBoxLayout *topLayout = new QVBoxLayout( this, 10 );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this, 10 );
- QGroupBox* vcGroupBox;
- vcGroupBox = new QGroupBox( this );
- vcGroupBox->setFrameStyle( QFrame::NoFrame );
+ TQGroupBox* vcGroupBox;
+ vcGroupBox = new TQGroupBox( this );
+ vcGroupBox->setFrameStyle( TQFrame::NoFrame );
//vcGroupBox->setTitle( i18n("Force Changes To") );
//vcGroupBox->setAlignment( 1 );
topLayout->addWidget( vcGroupBox, 10 );
- QGridLayout *grid = new QGridLayout( vcGroupBox, 3, 2, 10 );
+ TQGridLayout *grid = new TQGridLayout( vcGroupBox, 3, 2, 10 );
grid->setRowStretch(0,0);
grid->setRowStretch(1,10);
@@ -50,41 +50,41 @@ ViewControl::ViewControl( QWidget *parent, const char *name )
grid->setColStretch(1,10);
- magComboBox = new QComboBox( FALSE, vcGroupBox );
+ magComboBox = new TQComboBox( FALSE, vcGroupBox );
magComboBox->setFixedHeight( magComboBox->sizeHint().height() );
//magComboBox->hide();
- connect ( magComboBox, SIGNAL (activated (int)),
- this, SLOT (slotMagSelection (int)) );
+ connect ( magComboBox, TQT_SIGNAL (activated (int)),
+ this, TQT_SLOT (slotMagSelection (int)) );
grid->addWidget( magComboBox, 0, 1 );
- mediaComboBox = new QComboBox( FALSE, vcGroupBox );
+ mediaComboBox = new TQComboBox( FALSE, vcGroupBox );
mediaComboBox->setFixedHeight( magComboBox->sizeHint().height() );
- connect ( mediaComboBox, SIGNAL (activated (int)),
- this, SLOT (slotMediaSelection (int)) );
+ connect ( mediaComboBox, TQT_SIGNAL (activated (int)),
+ this, TQT_SLOT (slotMediaSelection (int)) );
grid->addWidget( mediaComboBox, 1, 1 );
- orientComboBox = new QComboBox( FALSE, vcGroupBox );
+ orientComboBox = new TQComboBox( FALSE, vcGroupBox );
orientComboBox->insertItem(i18n("Portrait"));
orientComboBox->insertItem(i18n("Landscape"));
orientComboBox->insertItem(i18n("Seascape"));
orientComboBox->insertItem(i18n("Upside Down"));
orientComboBox->setFixedHeight( magComboBox->sizeHint().height() );
- connect ( orientComboBox, SIGNAL (activated (int)),
- this, SLOT (slotOrientSelection (int)) );
+ connect ( orientComboBox, TQT_SIGNAL (activated (int)),
+ this, TQT_SLOT (slotOrientSelection (int)) );
grid->addWidget( orientComboBox, 2, 1 );
int labelWidth = 0;
- QLabel* vcLabel;
- vcLabel = new QLabel( magComboBox, i18n("&Magnification"), vcGroupBox );
+ TQLabel* vcLabel;
+ vcLabel = new TQLabel( magComboBox, i18n("&Magnification"), vcGroupBox );
vcLabel->setAlignment( AlignRight | AlignVCenter | ShowPrefix );
if ( vcLabel->sizeHint().width() > labelWidth )
labelWidth = vcLabel->sizeHint().width();
@@ -95,7 +95,7 @@ ViewControl::ViewControl( QWidget *parent, const char *name )
grid->addWidget( vcLabel, 0, 0 );
- vcLabel = new QLabel( mediaComboBox, i18n("M&edia"), vcGroupBox );
+ vcLabel = new TQLabel( mediaComboBox, i18n("M&edia"), vcGroupBox );
vcLabel->setAlignment( AlignRight | AlignVCenter | ShowPrefix );
if ( vcLabel->sizeHint().width() > labelWidth )
labelWidth = vcLabel->sizeHint().width();
@@ -103,7 +103,7 @@ ViewControl::ViewControl( QWidget *parent, const char *name )
grid->addWidget( vcLabel, 1, 0 );
- vcLabel = new QLabel( orientComboBox, i18n("&Orientation"), vcGroupBox );
+ vcLabel = new TQLabel( orientComboBox, i18n("&Orientation"), vcGroupBox );
vcLabel->setAlignment( AlignRight | AlignVCenter | ShowPrefix );
if ( vcLabel->sizeHint().width() > labelWidth )
labelWidth = vcLabel->sizeHint().width();
@@ -124,10 +124,10 @@ ViewControl::ViewControl( QWidget *parent, const char *name )
bbox->addStretch( 10 );
apply = bbox->addButton( KStdGuiItem::apply() );
- connect( apply, SIGNAL(clicked()), SLOT(slotApplyClicked()) );
+ connect( apply, TQT_SIGNAL(clicked()), TQT_SLOT(slotApplyClicked()) );
- QPushButton *closebtn = bbox->addButton( KStdGuiItem::close() );
- connect( closebtn, SIGNAL(clicked()), SLOT(reject()) );
+ TQPushButton *closebtn = bbox->addButton( KStdGuiItem::close() );
+ connect( closebtn, TQT_SIGNAL(clicked()), TQT_SLOT(reject()) );
bbox->layout();
diff --git a/kghostview/viewcontrol.h b/kghostview/viewcontrol.h
index 3e8bcd70..de766247 100644
--- a/kghostview/viewcontrol.h
+++ b/kghostview/viewcontrol.h
@@ -1,20 +1,20 @@
#ifndef VIEWCONTROL_H
#define VIEWCONTROL_H
-#include <qdialog.h>
-class QComboBox;
-class QPushButton;
+#include <tqdialog.h>
+class TQComboBox;
+class TQPushButton;
class ViewControl : public QDialog
{
Q_OBJECT
public:
- ViewControl( QWidget *parent, const char *name );
- QComboBox* magComboBox;
- QComboBox* mediaComboBox;
- QComboBox* orientComboBox;
- QPushButton *apply;
+ ViewControl( TQWidget *parent, const char *name );
+ TQComboBox* magComboBox;
+ TQComboBox* mediaComboBox;
+ TQComboBox* orientComboBox;
+ TQPushButton *apply;
/**
* Update the mag combo box.
diff --git a/kiconedit/kcolorgrid.cpp b/kiconedit/kcolorgrid.cpp
index a3793cb2..35b0dfaa 100644
--- a/kiconedit/kcolorgrid.cpp
+++ b/kiconedit/kcolorgrid.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
@@ -69,8 +69,8 @@ uint KColorArray::closestMatch(uint color)
return c|OPAQUE_MASK;
}
-KColorGrid::KColorGrid(QWidget *parent, const char *name, int space)
- : QWidget(parent, name, Qt::WResizeNoErase|Qt::WRepaintNoErase)
+KColorGrid::KColorGrid(TQWidget *parent, const char *name, int space)
+ : TQWidget(parent, name, Qt::WResizeNoErase|Qt::WRepaintNoErase)
{
//kdDebug(4640) << "KColorGrid - constructor" << endl;
s = space;
@@ -87,17 +87,17 @@ KColorGrid::KColorGrid(QWidget *parent, const char *name, int space)
void KColorGrid::show()
{
//updateScrollBars();
- QWidget::show();
+ TQWidget::show();
}
*/
-void KColorGrid::paintEvent(QPaintEvent *e)
+void KColorGrid::paintEvent(TQPaintEvent *e)
{
//kdDebug(4640) << "KColorGrid::paintEvent" << endl;
//updateScrollBars();
- //QWidget::paintEvent(e);
+ //TQWidget::paintEvent(e);
- const QRect urect = e->rect();
+ const TQRect urect = e->rect();
//kdDebug(4640) << "Update rect = ( " << //urect.left() << ", " << urect.top() << ", " << urect.width() << ", " << urect.height() << " )" << endl;
@@ -107,10 +107,10 @@ void KColorGrid::paintEvent(QPaintEvent *e)
int lastcol = getX(urect.right())+1;
int lastrow = getY(urect.bottom())+1;
- QWMatrix matrix;
- QPixmap pm(urect.width(),urect.height());
+ TQWMatrix matrix;
+ TQPixmap pm(urect.width(),urect.height());
pm.fill(paletteBackgroundColor());
- QPainter p;
+ TQPainter p;
p.begin( &pm );
firstrow = (firstrow < 0) ? 0 : firstrow;
@@ -147,25 +147,25 @@ void KColorGrid::paintEvent(QPaintEvent *e)
p.end();
- bitBlt(this,urect.topLeft(),&pm,QRect(0,0,pm.width(),pm.height()));
+ bitBlt(this,urect.topLeft(),&pm,TQRect(0,0,pm.width(),pm.height()));
}
-void KColorGrid::paintForeground(QPainter* , QPaintEvent* )
+void KColorGrid::paintForeground(TQPainter* , TQPaintEvent* )
{
}
/*
-void KColorGrid::resizeEvent(QResizeEvent *)
+void KColorGrid::resizeEvent(TQResizeEvent *)
{
//kdDebug(4640) << "resize: width: " << width() << " - total: " << totalwidth << endl;
//kdDebug(4640) << "resize: height: " << height() << " - total: " << totalheight << endl;
}
*/
-QSize KColorGrid::sizeHint() const
+TQSize KColorGrid::sizeHint() const
{
- return QSize(totalwidth, totalheight);
+ return TQSize(totalwidth, totalheight);
}
int KColorGrid::getY( int y )
@@ -186,10 +186,10 @@ int KColorGrid::getX( int x )
return (x/cellsize);
}
-const QRect KColorGrid::viewRect()
+const TQRect KColorGrid::viewRect()
{
//kdDebug(4640) << "viewRect" << endl;
- const QRect r(0, 0, width(), height());
+ const TQRect r(0, 0, width(), height());
//kdDebug(4640) << "viewRect - " << x << " x " << y << " - " << w << " x " << h << endl;
return r;
}
@@ -301,8 +301,8 @@ void KColorGrid::setColor( int colNum, uint col, bool update )
void KColorGrid::updateCell( int row, int col, bool )
{
//kdDebug(4640) << "updateCell - before repaint" << endl;
- QWMatrix matrix;
- QPainter p;
+ TQWMatrix matrix;
+ TQPainter p;
p.begin( this );
matrix.translate( (col*cellsize), (row*cellsize) );
p.setWorldMatrix( matrix );
diff --git a/kiconedit/kcolorgrid.h b/kiconedit/kcolorgrid.h
index 2bb7c856..76091b45 100644
--- a/kiconedit/kcolorgrid.h
+++ b/kiconedit/kcolorgrid.h
@@ -21,13 +21,13 @@
#ifndef __KCOLORGRID_H__
#define __KCOLORGRID_H__
-#include <qwidget.h>
-#include <qsize.h>
-#include <qrect.h>
+#include <tqwidget.h>
+#include <tqsize.h>
+#include <tqrect.h>
#include "utils.h"
-#define KArrayUint QMemArray<uint>
+#define KArrayUint TQMemArray<uint>
class KColorArray : public KArrayUint
{
@@ -42,7 +42,7 @@ class KColorGrid : public QWidget
private:
Q_OBJECT
public:
- KColorGrid( QWidget * parent = 0, const char *name = 0, int spacing = 0);
+ KColorGrid( TQWidget * parent = 0, const char *name = 0, int spacing = 0);
virtual ~KColorGrid() {};
enum GridState { Plain, Shaded };
@@ -64,9 +64,9 @@ public:
virtual void setCellSize( int s );
virtual int cellSize() { return cellsize; }
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
- void setSize(const QSize s) { setNumRows(s.height()); setNumCols(s.width()); }
+ void setSize(const TQSize s) { setNumRows(s.height()); setNumCols(s.width()); }
public slots:
//virtual void show();
@@ -77,10 +77,10 @@ signals:
protected:
void updateCell(int row, int col, bool f);
- virtual void paintForeground( QPainter* p, QPaintEvent* e);
- virtual void paintCell( QPainter *p, int row, int col) = 0;
- virtual void paintEvent(QPaintEvent *);
- //virtual void resizeEvent(QResizeEvent *);
+ virtual void paintForeground( TQPainter* p, TQPaintEvent* e);
+ virtual void paintCell( TQPainter *p, int row, int col) = 0;
+ virtual void paintEvent(TQPaintEvent *);
+ //virtual void resizeEvent(TQResizeEvent *);
void setColor(int colNum, uint, bool update = true );
void updateColors();
virtual void setNumRows(int);
@@ -91,7 +91,7 @@ protected:
int getY(int y);
int findCol(int x) { return getX(x); }
int getX(int x);
- const QRect viewRect();
+ const TQRect viewRect();
//private:
int s, cellsize, totalwidth, totalheight;
diff --git a/kiconedit/kicon.cpp b/kiconedit/kicon.cpp
index 92f1bc0b..9da72c9b 100644
--- a/kiconedit/kicon.cpp
+++ b/kiconedit/kicon.cpp
@@ -20,7 +20,7 @@
#include <stdlib.h>
-#include <qimage.h>
+#include <tqimage.h>
#include <kmessagebox.h>
#include <kfiledialog.h>
@@ -32,8 +32,8 @@
#include "kicon.h"
#include "utils.h"
-KIconEditIcon::KIconEditIcon(QObject *parent, const QImage *img, KURL url)
- : QObject(parent)
+KIconEditIcon::KIconEditIcon(TQObject *parent, const TQImage *img, KURL url)
+ : TQObject(parent)
{
f = 0;
_lastdir = "/";
@@ -51,9 +51,9 @@ KIconEditIcon::~KIconEditIcon()
}
-bool KIconEditIcon::open(const QImage *image, KURL url)
+bool KIconEditIcon::open(const TQImage *image, KURL url)
{
- QImage *img = (QImage*)image;
+ TQImage *img = (TQImage*)image;
if(url.isEmpty())
return false;
@@ -64,19 +64,19 @@ bool KIconEditIcon::open(const QImage *image, KURL url)
{
kdDebug(4640) << "KIconEditIcon::open (malformed) " << url.prettyURL() << endl;
- QFileInfo fi(url.url());
+ TQFileInfo fi(url.url());
if(fi.isRelative())
url = "file:" + fi.absFilePath();
if(!url.isValid()) // Giving up
{
- QString msg = i18n("The URL: %1 \nseems to be malformed.\n").arg(url.url());
- KMessageBox::sorry((QWidget*)parent(), msg);
+ TQString msg = i18n("The URL: %1 \nseems to be malformed.\n").arg(url.url());
+ KMessageBox::sorry((TQWidget*)parent(), msg);
return false;
}
}
- QString filename;
+ TQString filename;
if(url.isLocalFile())
{
@@ -84,10 +84,10 @@ bool KIconEditIcon::open(const QImage *image, KURL url)
}
else
{
- if(!KIO::NetAccess::download( url, filename, (QWidget*)parent() ))
+ if(!KIO::NetAccess::download( url, filename, (TQWidget*)parent() ))
{
- QString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL());
- KMessageBox::error((QWidget*)parent(), msg);
+ TQString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL());
+ KMessageBox::error((TQWidget*)parent(), msg);
return false;
}
}
@@ -101,8 +101,8 @@ bool KIconEditIcon::open(const QImage *image, KURL url)
if(!loadedOk)
{
- QString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL());
- KMessageBox::error((QWidget*)parent(), msg);
+ TQString msg = i18n("There was an error loading:\n%1\n").arg(url.prettyURL());
+ KMessageBox::error((TQWidget*)parent(), msg);
}
else
{
@@ -140,11 +140,11 @@ bool KIconEditIcon::open(const QImage *image, KURL url)
-bool KIconEditIcon::promptForFile(const QImage *img)
+bool KIconEditIcon::promptForFile(const TQImage *img)
{
- kdDebug(4640) << "KIconEditIcon::promptForFile(const QImage *img)" << endl;
+ kdDebug(4640) << "KIconEditIcon::promptForFile(const TQImage *img)" << endl;
/*
- QString filter = i18n("*|All Files (*)\n"
+ TQString filter = i18n("*|All Files (*)\n"
"*.xpm|XPM (*.xpm)\n"
"*.png|PNG (*.png)\n"
"*.gif|GIF files (*.gif)\n"
@@ -152,10 +152,10 @@ bool KIconEditIcon::promptForFile(const QImage *img)
"*.ico|Icon files (*.ico)\n");
- KURL url = KFileDialog::getOpenURL( QString::null, filter );
+ KURL url = KFileDialog::getOpenURL( TQString::null, filter );
*/
bool loaded = false;
- KURL url = KFileDialog::getImageOpenURL( QString::null, static_cast<QWidget *>(parent()) );
+ KURL url = KFileDialog::getImageOpenURL( TQString::null, static_cast<TQWidget *>(parent()) );
if( !url.isEmpty() )
{
@@ -167,20 +167,20 @@ bool KIconEditIcon::promptForFile(const QImage *img)
-bool KIconEditIcon::saveAs(const QImage *image)
+bool KIconEditIcon::saveAs(const TQImage *image)
{
kdDebug(4640) << "KIconEditIcon::saveAs" << endl;
- QString file;
+ TQString file;
//Get list of file types..
- KFileDialog *dialog=new KFileDialog(QString::null, QString::null, static_cast<QWidget *>(parent()), "file dialog", true);
+ KFileDialog *dialog=new KFileDialog(TQString::null, TQString::null, static_cast<TQWidget *>(parent()), "file dialog", true);
dialog->setCaption( i18n("Save Icon As") );
dialog->setKeepLocation( true );
dialog->setMimeFilter( KImageIO::mimeTypes(KImageIO::Writing), "image/png" );
dialog->setOperationMode( KFileDialog::Saving );
- if(dialog->exec()==QDialog::Accepted)
+ if(dialog->exec()==TQDialog::Accepted)
{
file = dialog->selectedFile();
if( file.isNull() )
@@ -204,9 +204,9 @@ bool KIconEditIcon::saveAs(const QImage *image)
delete dialog;
- if(QFile::exists(file))
+ if(TQFile::exists(file))
{
- int r=KMessageBox::warningContinueCancel(static_cast<QWidget *>(parent()),
+ int r=KMessageBox::warningContinueCancel(static_cast<TQWidget *>(parent()),
i18n( "A file named \"%1\" already exists. "
"Overwrite it?" ).arg(file),
i18n( "Overwrite File?" ),
@@ -223,10 +223,10 @@ bool KIconEditIcon::saveAs(const QImage *image)
-bool KIconEditIcon::save(const QImage *image, const QString &_filename)
+bool KIconEditIcon::save(const TQImage *image, const TQString &_filename)
{
kdDebug(4640) << "KIconEditIcon::save" << endl;
- QString filename = _filename;
+ TQString filename = _filename;
if(filename.isEmpty())
{
@@ -241,11 +241,11 @@ bool KIconEditIcon::save(const QImage *image, const QString &_filename)
}
}
- QImage *img = (QImage*)image;
+ TQImage *img = (TQImage*)image;
img->setAlphaBuffer(true);
KURL turl(filename);
- QString str = turl.path();
+ TQString str = turl.path();
bool savedOk = false;
/* base image type on file extension - let kimageio
@@ -265,8 +265,8 @@ bool KIconEditIcon::save(const QImage *image, const QString &_filename)
}
else
{
- QString msg = i18n("There was an error saving:\n%1\n").arg(str);
- KMessageBox::error((QWidget*)parent(), msg);
+ TQString msg = i18n("There was an error saving:\n%1\n").arg(str);
+ KMessageBox::error((TQWidget*)parent(), msg);
kdDebug(4640) << "KIconEditIcon::save - " << msg << endl;
}
diff --git a/kiconedit/kicon.h b/kiconedit/kicon.h
index 3af48c14..d808995e 100644
--- a/kiconedit/kicon.h
+++ b/kiconedit/kicon.h
@@ -41,37 +41,37 @@
#include <sys/stat.h>
#include <sys/file.h>
-class QImage;
+class TQImage;
class KIconEditIcon : public QObject
{
Q_OBJECT
public:
- KIconEditIcon(QObject*, const QImage*, KURL url = KURL() );
+ KIconEditIcon(TQObject*, const TQImage*, KURL url = KURL() );
~KIconEditIcon();
bool isLocal() { return local; }
- QString url() { return _url; }
- void setUrl( const QString & u ) { _url = u; };
+ TQString url() { return _url; }
+ void setUrl( const TQString & u ) { _url = u; };
public slots:
- bool open(const QImage*, KURL url = KURL());
- bool promptForFile(const QImage*);
- bool save(const QImage*, const QString &filename=QString::null);
- bool saveAs(const QImage*);
+ bool open(const TQImage*, KURL url = KURL());
+ bool promptForFile(const TQImage*);
+ bool save(const TQImage*, const TQString &filename=TQString::null);
+ bool saveAs(const TQImage*);
signals:
- void newmessage( const QString &);
- void newname(const QString &);
- void addrecent(const QString &);
- void opennewwin(const QString &);
- void loaded(QImage *);
+ void newmessage( const TQString &);
+ void newname(const TQString &);
+ void addrecent(const TQString &);
+ void opennewwin(const TQString &);
+ void loaded(TQImage *);
void saved();
protected:
bool local;
- QString _url;
- QString _lastdir;
+ TQString _url;
+ TQString _lastdir;
FILE *f;
};
diff --git a/kiconedit/kiconcolors.cpp b/kiconedit/kiconcolors.cpp
index 549f74d2..d3046ad4 100644
--- a/kiconedit/kiconcolors.cpp
+++ b/kiconedit/kiconcolors.cpp
@@ -18,14 +18,14 @@
Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
-#include <qdrawutil.h>
+#include <tqpainter.h>
+#include <tqdrawutil.h>
#include <kdebug.h>
#include "kiconcolors.h"
-KDrawColors::KDrawColors(QWidget *parent) : KColorGrid(parent, 0, 3)
+KDrawColors::KDrawColors(TQWidget *parent) : KColorGrid(parent, 0, 3)
{
kdDebug(4640) << "KDrawColors - constructor" << endl;
setCellSize(17);
@@ -35,11 +35,11 @@ KDrawColors::KDrawColors(QWidget *parent) : KColorGrid(parent, 0, 3)
kdDebug(4640) << "KDrawColors - constructor - done" << endl;
}
-void KDrawColors::paintCell( QPainter *painter, int row, int col )
+void KDrawColors::paintCell( TQPainter *painter, int row, int col )
{
//KColorGrid::paintCell(painter, row, col);
uint c = colorAt( row * numCols() + col );
- QBrush brush(c);
+ TQBrush brush(c);
int d = spacing();
qDrawShadePanel( painter, d, d, cellSize()-d, cellSize()-d,
@@ -48,7 +48,7 @@ void KDrawColors::paintCell( QPainter *painter, int row, int col )
painter->drawWinFocusRect( d+1, d+1, cellSize()-(2*d)+1, cellSize()-(2*d)+1 );
}
-void KDrawColors::mouseReleaseEvent( QMouseEvent *e )
+void KDrawColors::mouseReleaseEvent( TQMouseEvent *e )
{
int row = findRow( e->pos().y() );
int col = findCol( e->pos().x() );
@@ -65,7 +65,7 @@ void KDrawColors::mouseReleaseEvent( QMouseEvent *e )
emit newColor(colorAt(cell)|OPAQUE_MASK);
}
-KSysColors::KSysColors(QWidget *parent) : KDrawColors(parent)
+KSysColors::KSysColors(TQWidget *parent) : KDrawColors(parent)
{
kdDebug(4640) << "KSysColors - constructor" << endl;
@@ -85,7 +85,7 @@ KSysColors::KSysColors(QWidget *parent) : KDrawColors(parent)
kdDebug(4640) << "KSysColors - constructor - done" << endl;
}
-KCustomColors::KCustomColors(QWidget *parent) : KDrawColors(parent)
+KCustomColors::KCustomColors(TQWidget *parent) : KDrawColors(parent)
{
kdDebug(4640) << "KCustomColors - constructor" << endl;
setNumRows(3);
@@ -103,12 +103,12 @@ KCustomColors::~KCustomColors()
delete [] freecells;
}
-void KCustomColors::mouseDoubleClickEvent(QMouseEvent *e)
+void KCustomColors::mouseDoubleClickEvent(TQMouseEvent *e)
{
int row = findRow( e->pos().y() );
int col = findCol( e->pos().x() );
int cell = row * numCols() + col;
- QColor color=colorAt(cell);
+ TQColor color=colorAt(cell);
if(KColorDialog::getColor(color))
{
setColor(cell, color.rgb());
@@ -124,7 +124,7 @@ void KCustomColors::addColor(uint c)
int f = getFreeCell();
if(f != -1)
{
- QColor color(c);
+ TQColor color(c);
if(!color.isValid())
{
kdDebug(4640) << "KCustomColors::addColor: Not a valid color: " << c << endl;
diff --git a/kiconedit/kiconcolors.h b/kiconedit/kiconcolors.h
index a4293ff3..71d8b240 100644
--- a/kiconedit/kiconcolors.h
+++ b/kiconedit/kiconcolors.h
@@ -21,7 +21,7 @@
#ifndef __KDRAWCOLORS_H__
#define __KDRAWCOLORS_H__
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kcolordialog.h>
@@ -32,7 +32,7 @@ class KDrawColors : public KColorGrid
{
Q_OBJECT
public:
- KDrawColors(QWidget *parent);
+ KDrawColors(TQWidget *parent);
//bool hasColor(uint);
@@ -40,8 +40,8 @@ signals:
void newColor(uint);
protected:
- virtual void paintCell( QPainter*, int, int );
- virtual void mouseReleaseEvent(QMouseEvent*);
+ virtual void paintCell( TQPainter*, int, int );
+ virtual void mouseReleaseEvent(TQMouseEvent*);
int selected;
};
@@ -50,20 +50,20 @@ class KCustomColors : public KDrawColors
{
Q_OBJECT
public:
- KCustomColors(QWidget *parent);
+ KCustomColors(TQWidget *parent);
~KCustomColors();
void addColor(uint);
void clear();
protected:
- virtual void mouseDoubleClickEvent(QMouseEvent*);
+ virtual void mouseDoubleClickEvent(TQMouseEvent*);
int getFreeCell();
void freeAllCells();
protected:
bool *freecells;
- QPopupMenu *popup;
+ TQPopupMenu *popup;
};
class KSysColors : public KDrawColors
@@ -71,7 +71,7 @@ class KSysColors : public KDrawColors
Q_OBJECT
public:
- KSysColors(QWidget *parent);
+ KSysColors(TQWidget *parent);
};
diff --git a/kiconedit/kiconconfig.cpp b/kiconedit/kiconconfig.cpp
index e7677e30..d4621a0b 100644
--- a/kiconedit/kiconconfig.cpp
+++ b/kiconedit/kiconconfig.cpp
@@ -20,12 +20,12 @@
#include <stdlib.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qvbox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqvbox.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
#include <kaccel.h>
#include <kbuttonbox.h>
@@ -46,33 +46,33 @@
#endif
// little helper:
-static inline QPixmap loadIcon( const char * name )
+static inline TQPixmap loadIcon( const char * name )
{
return KGlobal::instance()->iconLoader()
- ->loadIcon( QString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium );
+ ->loadIcon( TQString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium );
}
-KTemplateEditDlg::KTemplateEditDlg(QWidget *parent)
+KTemplateEditDlg::KTemplateEditDlg(TQWidget *parent)
: KDialogBase(parent, "KTemplateEditDlg", true, i18n( "Icon Template" ),
Ok|Cancel )
{
- QFrame *frame = makeMainWidget();
- QVBoxLayout *ml = new QVBoxLayout(frame);
- QGroupBox *grp = new QGroupBox(i18n("Template"), frame);
+ 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());
- QGridLayout *l = new QGridLayout(grp->layout());
+ TQGridLayout *l = new TQGridLayout(grp->layout());
- ln_name = new QLineEdit( grp );
- connect( ln_name, SIGNAL( textChanged( const QString & ) ),
- SLOT( slotTextChanged() ) );
- QLabel* lb_name = new QLabel( ln_name, i18n( "Description:" ), grp );
+ ln_name = new TQLineEdit( grp );
+ connect( ln_name, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( slotTextChanged() ) );
+ TQLabel* lb_name = new TQLabel( ln_name, i18n( "Description:" ), grp );
ln_path = new KURLRequester(grp);
- connect( ln_path, SIGNAL( textChanged( const QString & ) ),
- SLOT( slotTextChanged() ) );
- QLabel* lb_path = new QLabel( ln_path, i18n( "Path:" ), grp );
+ connect( ln_path, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( slotTextChanged() ) );
+ TQLabel* lb_path = new TQLabel( ln_path, i18n( "Path:" ), grp );
l->addWidget(lb_name, 0, 0);
l->addWidget(ln_name, 0, 1);
@@ -88,49 +88,49 @@ KTemplateEditDlg::KTemplateEditDlg(QWidget *parent)
void KTemplateEditDlg::slotTextChanged()
{
- QString name = ln_name->text(), path = ln_path->url();
+ TQString name = ln_name->text(), path = ln_path->url();
enableButtonOK(name.length() && path.length());
}
-void KTemplateEditDlg::setName(const QString & name)
+void KTemplateEditDlg::setName(const TQString & name)
{
ln_name->setText(name);
}
-QString KTemplateEditDlg::name()
+TQString KTemplateEditDlg::name()
{
return ln_name->text();
}
-void KTemplateEditDlg::setPath(const QString & path)
+void KTemplateEditDlg::setPath(const TQString & path)
{
ln_path->setURL(path);
}
-QString KTemplateEditDlg::path()
+TQString KTemplateEditDlg::path()
{
return ln_path->url();
}
-KTemplateConfig::KTemplateConfig(QWidget *parent) : QWidget(parent)
+KTemplateConfig::KTemplateConfig(TQWidget *parent) : TQWidget(parent)
{
kdDebug(4640) << "KTemplateConfig constructor" << endl;
btadd = btremove = btedit = 0L;
- QGroupBox* grp = new QGroupBox( i18n( "Templates" ), this );
+ TQGroupBox* grp = new TQGroupBox( i18n( "Templates" ), this );
grp->setColumnLayout( 0, Qt::Horizontal );
templates = new KIconListBox( grp );
- connect( templates, SIGNAL( highlighted( int ) ),
- SLOT( checkSelection( int ) ) );
- connect( templates, SIGNAL(doubleClicked( QListBoxItem * ) ),
- SLOT( edit() ) );
+ connect( templates, TQT_SIGNAL( highlighted( int ) ),
+ TQT_SLOT( checkSelection( int ) ) );
+ connect( templates, TQT_SIGNAL(doubleClicked( TQListBoxItem * ) ),
+ TQT_SLOT( edit() ) );
- QVBoxLayout* ml = new QVBoxLayout( this );
+ TQVBoxLayout* ml = new TQVBoxLayout( this );
ml->addWidget( grp );
- QVBoxLayout* l = new QVBoxLayout( grp->layout(), KDialog::spacingHint() );
+ TQVBoxLayout* l = new TQVBoxLayout( grp->layout(), KDialog::spacingHint() );
l->addWidget( templates );
for( unsigned int i = 0; i < KIconTemplateContainer::self()->count(); i++ )
@@ -139,14 +139,14 @@ KTemplateConfig::KTemplateConfig(QWidget *parent) : QWidget(parent)
KButtonBox *bbox = new KButtonBox( grp );
btadd = bbox->addButton( i18n( "&Add..." ) );
- connect( btadd, SIGNAL( clicked() ), SLOT( add() ) );
+ connect( btadd, TQT_SIGNAL( clicked() ), TQT_SLOT( add() ) );
btedit = bbox->addButton( i18n( "&Edit..." ) );
- connect( btedit, SIGNAL( clicked() ), SLOT( edit() ) );
+ connect( btedit, TQT_SIGNAL( clicked() ), TQT_SLOT( edit() ) );
btedit->setEnabled( false );
btremove = bbox->addButton( i18n( "&Remove" ) );
- connect( btremove, SIGNAL( clicked() ), SLOT( remove() ) );
+ connect( btremove, TQT_SIGNAL( clicked() ), TQT_SLOT( remove() ) );
btremove->setEnabled( false );
bbox->addStretch( 1 );
@@ -224,8 +224,8 @@ void KTemplateConfig::edit()
}
}
-KBackgroundConfig::KBackgroundConfig( QWidget* parent )
- : QWidget( parent )
+KBackgroundConfig::KBackgroundConfig( TQWidget* parent )
+ : TQWidget( parent )
{
kdDebug(4640) << "KBackgroundConfig - constructor" << endl;
@@ -238,57 +238,57 @@ KBackgroundConfig::KBackgroundConfig( QWidget* parent )
if(pix.isNull())
{
kdDebug(4640) << "BGPIX: " << pixpath << " not valid!" << endl;
- QPixmap pmlogo((const char**)logo);
+ TQPixmap pmlogo((const char**)logo);
pix = pmlogo;
}
- QVBoxLayout *mainLayout = new QVBoxLayout( this );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this );
- QGroupBox *grp1 = new QGroupBox( i18n( "Select Background" ), this );
+ TQGroupBox *grp1 = new TQGroupBox( i18n( "Select Background" ), this );
grp1->setColumnLayout(0, Qt::Vertical );
grp1->layout()->setSpacing( KDialog::spacingHint() );
grp1->layout()->setMargin( KDialog::marginHint() );
mainLayout->addWidget( grp1 );
- QGridLayout *grp1Layout = new QGridLayout( grp1->layout(), 3, 2 );
+ TQGridLayout *grp1Layout = new TQGridLayout( grp1->layout(), 3, 2 );
- QButtonGroup* btngrp = new QButtonGroup( grp1 );
+ TQButtonGroup* btngrp = new TQButtonGroup( grp1 );
btngrp->setExclusive( true );
- btngrp->setFrameStyle( QFrame::NoFrame );
- connect( btngrp, SIGNAL( clicked( int ) ), SLOT( slotBackgroundMode( int ) ) );
+ btngrp->setFrameStyle( TQFrame::NoFrame );
+ connect( btngrp, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( slotBackgroundMode( int ) ) );
grp1Layout->addWidget( btngrp, 0, 0 );
- QVBoxLayout *bgl = new QVBoxLayout( btngrp, 5 );
+ TQVBoxLayout *bgl = new TQVBoxLayout( btngrp, 5 );
- QRadioButton *rbc = new QRadioButton( i18n( "Use co&lor" ), btngrp );
+ TQRadioButton *rbc = new TQRadioButton( i18n( "Use co&lor" ), btngrp );
btngrp->insert( rbc, 0 );
bgl->addWidget( rbc );
- QRadioButton *rbp = new QRadioButton( i18n( "Use pix&map" ), btngrp );
+ TQRadioButton *rbp = new TQRadioButton( i18n( "Use pix&map" ), btngrp );
btngrp->insert( rbp, 1 );
bgl->addWidget( rbp );
bgl->addStretch( 1 );
- QVBox *bbox = new QVBox( grp1 );
+ TQVBox *bbox = new TQVBox( grp1 );
grp1Layout->addWidget( bbox, 0, 1 );
btcolor = new KColorButton(props->bgColor(), bbox) ;
- connect(btcolor, SIGNAL(changed(const QColor &)),
- SLOT( selectColor(const QColor &)));
+ connect(btcolor, TQT_SIGNAL(changed(const TQColor &)),
+ TQT_SLOT( selectColor(const TQColor &)));
- btpix = new QPushButton(i18n( "Choose..." ), bbox);
- connect( btpix, SIGNAL( clicked() ), SLOT( selectPixmap() ) );
+ btpix = new TQPushButton(i18n( "Choose..." ), bbox);
+ connect( btpix, TQT_SIGNAL( clicked() ), TQT_SLOT( selectPixmap() ) );
- QGroupBox *grp2 = new QGroupBox( i18n( "Preview" ), this );
+ TQGroupBox *grp2 = new TQGroupBox( i18n( "Preview" ), this );
mainLayout->addWidget( grp2, 1 );
- QBoxLayout *l2 = new QVBoxLayout( grp2, 15 );
+ TQBoxLayout *l2 = new TQVBoxLayout( grp2, 15 );
l2->addSpacing( 10 );
- lb_ex = new QLabel( grp2 );
- lb_ex->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ lb_ex = new TQLabel( grp2 );
+ lb_ex->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
l2->addWidget( lb_ex );
/*
@@ -297,7 +297,7 @@ KBackgroundConfig::KBackgroundConfig( QWidget* parent )
*/
bgmode = props->bgMode();
- if( bgmode == QWidget::FixedPixmap )
+ if( bgmode == TQWidget::FixedPixmap )
{
btngrp->setButton( 1 );
btcolor->setEnabled( false );
@@ -319,7 +319,7 @@ void KBackgroundConfig::slotBackgroundMode(int id)
{
if(id == 0)
{
- bgmode = QWidget::FixedColor;
+ bgmode = TQWidget::FixedColor;
btpix->setEnabled(false);
btcolor->setEnabled(true);
if(lb_ex)
@@ -327,7 +327,7 @@ void KBackgroundConfig::slotBackgroundMode(int id)
}
else
{
- bgmode = QWidget::FixedPixmap;
+ bgmode = TQWidget::FixedPixmap;
btpix->setEnabled(true);
btcolor->setEnabled(false);
if(lb_ex)
@@ -345,7 +345,7 @@ void KBackgroundConfig::saveSettings()
kdDebug(4640) << "KBackgroundConfig::saveSettings - done" << endl;
}
-void KBackgroundConfig::selectColor(const QColor & newColor)
+void KBackgroundConfig::selectColor(const TQColor & newColor)
{
lb_ex->setBackgroundColor(newColor);
}
@@ -364,7 +364,7 @@ void KBackgroundConfig::selectPixmap()
return;
}
- QPixmap p(url.path());
+ TQPixmap p(url.path());
if( !p.isNull() )
{
@@ -373,70 +373,70 @@ void KBackgroundConfig::selectPixmap()
}
}
-KMiscConfig::KMiscConfig(QWidget *parent) : QWidget(parent)
+KMiscConfig::KMiscConfig(TQWidget *parent) : TQWidget(parent)
{
kdDebug(4640) << "KMiscConfig - constructor" << endl;
KIconEditProperties* props = KIconEditProperties::self();
- QBoxLayout *ml = new QVBoxLayout( this, 0, 5 );
+ TQBoxLayout *ml = new TQVBoxLayout( this, 0, 5 );
- QCheckBox *cbp = new QCheckBox( i18n( "Paste &transparent pixels" ), this );
- connect( cbp, SIGNAL( toggled( bool ) ), SLOT( pasteMode( bool ) ) );
+ TQCheckBox *cbp = new TQCheckBox( i18n( "Paste &transparent pixels" ), this );
+ connect( cbp, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( pasteMode( bool ) ) );
ml->addWidget(cbp);
- QCheckBox *cbr = new QCheckBox( i18n( "Show &rulers" ), this );
- connect( cbr, SIGNAL( toggled( bool ) ), SLOT( showRulers( bool ) ) );
+ TQCheckBox *cbr = new TQCheckBox( i18n( "Show &rulers" ), this );
+ connect( cbr, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( showRulers( bool ) ) );
ml->addWidget(cbr);
- QButtonGroup* btngrp = new QButtonGroup( i18n( "Transparency Display" ), this);
+ TQButtonGroup* btngrp = new TQButtonGroup( i18n( "Transparency Display" ), this);
btngrp->setExclusive( true );
- connect( btngrp, SIGNAL( clicked( int ) ), SLOT( slotTransparencyDisplayType( int ) ) );
+ connect( btngrp, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( slotTransparencyDisplayType( int ) ) );
ml->addWidget( btngrp );
- QVBoxLayout *tgl = new QVBoxLayout( btngrp, KDialog::marginHint(), KDialog::spacingHint() );
+ TQVBoxLayout *tgl = new TQVBoxLayout( btngrp, KDialog::marginHint(), KDialog::spacingHint() );
tgl->insertSpacing(0, 10);
- QHBoxLayout *hl = new QHBoxLayout(tgl);
+ TQHBoxLayout *hl = new TQHBoxLayout(tgl);
- QRadioButton *solidColorRButton = new QRadioButton( i18n( "&Solid color:" ), btngrp );
+ TQRadioButton *solidColorRButton = new TQRadioButton( i18n( "&Solid color:" ), btngrp );
btngrp->insert( solidColorRButton, 0 );
hl->addWidget( solidColorRButton );
m_solidColorButton = new KColorButton(props->transparencySolidColor(), btngrp);
btngrp->insert( m_solidColorButton, 2 );
hl->addWidget(m_solidColorButton);
- //connect(btcolor, SIGNAL(changed(const QColor &)),
- // SLOT( selectColor(const QColor &)));
+ //connect(btcolor, TQT_SIGNAL(changed(const TQColor &)),
+ // TQT_SLOT( selectColor(const TQColor &)));
- QRadioButton *checkerboardRButton = new QRadioButton( i18n( "Checker&board" ), btngrp );
+ TQRadioButton *checkerboardRButton = new TQRadioButton( i18n( "Checker&board" ), btngrp );
btngrp->insert( checkerboardRButton, 1 );
tgl->addWidget( checkerboardRButton );
- QGridLayout *grid = new QGridLayout(tgl, 3, 3);
+ TQGridLayout *grid = new TQGridLayout(tgl, 3, 3);
grid->addColSpacing(0, 40);
grid->setColStretch(1, 1);
grid->setColStretch(2, 1);
- m_checkerboardSizeCombo = new QComboBox(btngrp);
+ m_checkerboardSizeCombo = new TQComboBox(btngrp);
m_checkerboardSizeCombo->insertItem( i18n( "Small" ) );
m_checkerboardSizeCombo->insertItem( i18n( "Medium" ) );
m_checkerboardSizeCombo->insertItem( i18n( "Large" ) );
m_checkerboardSizeCombo->setCurrentItem(props->checkerboardSize());
- QLabel *label = new QLabel(m_checkerboardSizeCombo, i18n("Si&ze:"), btngrp);
+ TQLabel *label = new TQLabel(m_checkerboardSizeCombo, i18n("Si&ze:"), btngrp);
grid->addWidget(label, 0, 1);
grid->addWidget(m_checkerboardSizeCombo, 0, 2);
m_checkerboardColor1Button = new KColorButton(props->checkerboardColor1(), btngrp);
- label = new QLabel(m_checkerboardColor1Button, i18n("Color &1:"), btngrp);
+ label = new TQLabel(m_checkerboardColor1Button, i18n("Color &1:"), btngrp);
grid->addWidget(label, 1, 1);
grid->addWidget(m_checkerboardColor1Button, 1, 2);
m_checkerboardColor2Button = new KColorButton(props->checkerboardColor2(), btngrp);
- label = new QLabel(m_checkerboardColor2Button, i18n("Color &2:"), btngrp);
+ label = new TQLabel(m_checkerboardColor2Button, i18n("Color &2:"), btngrp);
grid->addWidget(label, 2, 1);
grid->addWidget(m_checkerboardColor2Button, 2, 2);
@@ -524,7 +524,7 @@ void KMiscConfig::slotTransparencyDisplayType(int id)
}
}
-KIconConfig::KIconConfig(QWidget *parent)
+KIconConfig::KIconConfig(TQWidget *parent)
: KDialogBase(KDialogBase::IconList, i18n("Configure"),
KDialogBase::Help |
KDialogBase::Ok |
@@ -533,20 +533,20 @@ KIconConfig::KIconConfig(QWidget *parent)
KDialogBase::Ok,
parent, "configDialog", true, true)
{
- setHelp(QString::null);
+ setHelp(TQString::null);
//KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
- connect(this, SIGNAL(finished()), this, SLOT(finis()));
+ connect(this, TQT_SIGNAL(finished()), this, TQT_SLOT(finis()));
- QVBox* page = addVBoxPage(i18n("Icon Templates"), QString::null, loadIcon("icons"));
+ TQVBox* page = addVBoxPage(i18n("Icon Templates"), TQString::null, loadIcon("icons"));
temps = new KTemplateConfig(page);
- page = addVBoxPage(i18n("Background"), QString::null, loadIcon("background"));
+ page = addVBoxPage(i18n("Background"), TQString::null, loadIcon("background"));
backs = new KBackgroundConfig(page);
- page = addVBoxPage(i18n("Icon Grid"), QString::null, loadIcon("kiconedit"));
+ page = addVBoxPage(i18n("Icon Grid"), TQString::null, loadIcon("kiconedit"));
misc = new KMiscConfig(page);
- QSize min(300, 400);
+ TQSize min(300, 400);
if (300 < sizeHint().width()) { min.setWidth(sizeHint().width()); }
if (400 < sizeHint().height()) { min.setHeight(sizeHint().height()); }
diff --git a/kiconedit/kiconconfig.h b/kiconedit/kiconconfig.h
index 04483732..be1450d3 100644
--- a/kiconedit/kiconconfig.h
+++ b/kiconedit/kiconconfig.h
@@ -21,7 +21,7 @@
#ifndef __KICONCONFIG_H__
#define __KICONCONFIG_H__
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kdialogbase.h>
#include "knew.h"
@@ -36,25 +36,25 @@ class KAccel;
class KKeyChooser;
class KColorButton;
class KURLRequester;
-class QComboBox;
+class TQComboBox;
class KTemplateEditDlg : public KDialogBase
{
Q_OBJECT
public:
- KTemplateEditDlg(QWidget *);
+ KTemplateEditDlg(TQWidget *);
~KTemplateEditDlg() {};
- QString name();
- QString path();
- void setName(const QString &);
- void setPath(const QString &);
+ TQString name();
+ TQString path();
+ void setName(const TQString &);
+ void setPath(const TQString &);
public slots:
void slotTextChanged();
protected:
- QLineEdit *ln_name;
+ TQLineEdit *ln_name;
KURLRequester *ln_path;
};
@@ -62,7 +62,7 @@ class KTemplateConfig : public QWidget
{
Q_OBJECT
public:
- KTemplateConfig(QWidget*);
+ KTemplateConfig(TQWidget*);
~KTemplateConfig();
void saveSettings();
@@ -75,19 +75,19 @@ protected slots:
protected:
KIconListBox *templates;
- QPushButton *btadd, *btedit, *btremove;
+ TQPushButton *btadd, *btedit, *btremove;
};
class KBackgroundConfig : public QWidget
{
Q_OBJECT
public:
- KBackgroundConfig(QWidget *parent);
+ KBackgroundConfig(TQWidget *parent);
~KBackgroundConfig();
public slots:
void saveSettings();
- void selectColor(const QColor & newColor);
+ void selectColor(const TQColor & newColor);
void selectPixmap();
signals:
@@ -97,18 +97,18 @@ protected slots:
protected:
KColorButton *btcolor;
- QPushButton *btpix;
- QPixmap pix;
- QString pixpath;
- QWidget::BackgroundMode bgmode;
- QLabel *lb_ex;
+ TQPushButton *btpix;
+ TQPixmap pix;
+ TQString pixpath;
+ TQWidget::BackgroundMode bgmode;
+ TQLabel *lb_ex;
};
class KMiscConfig : public QWidget
{
Q_OBJECT
public:
- KMiscConfig(QWidget *parent);
+ KMiscConfig(TQWidget *parent);
~KMiscConfig();
public slots:
@@ -123,11 +123,11 @@ signals:
protected:
bool pastemode, showrulers;
- QRadioButton *rbp;
+ TQRadioButton *rbp;
KColorButton *m_solidColorButton;
KColorButton *m_checkerboardColor1Button;
KColorButton *m_checkerboardColor2Button;
- QComboBox *m_checkerboardSizeCombo;
+ TQComboBox *m_checkerboardSizeCombo;
};
class KIconConfig : public KDialogBase
@@ -136,7 +136,7 @@ class KIconConfig : public KDialogBase
public:
- KIconConfig(QWidget *parent);
+ KIconConfig(TQWidget *parent);
~KIconConfig();
protected slots:
diff --git a/kiconedit/kiconedit.cpp b/kiconedit/kiconedit.cpp
index 13cd4b89..74325458 100644
--- a/kiconedit/kiconedit.cpp
+++ b/kiconedit/kiconedit.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qwhatsthis.h>
-#include <qtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
#include <kpopupmenu.h>
#include <kstdaction.h>
@@ -33,7 +33,7 @@
WindowList KIconEdit::windowList;
-KIconEdit::KIconEdit(const QImage image, const char *name)
+KIconEdit::KIconEdit(const TQImage image, const char *name)
: KMainWindow(0, name)
{
init();
@@ -74,53 +74,53 @@ void KIconEdit::init()
createGUI();
- connect(this, SIGNAL(newname(const QString &)),
- SLOT( slotUpdateStatusName(const QString &)));
-
- connect( icon, SIGNAL( saved()), SLOT(slotSaved()));
- connect( icon, SIGNAL( loaded(QImage *)), grid, SLOT(load(QImage *)));
- connect( icon, SIGNAL(opennewwin(const QString &)),
- SLOT(slotNewWin(const QString &)));
- connect(icon, SIGNAL(newname(const QString &)),
- SLOT( slotUpdateStatusName(const QString &)));
- connect(icon, SIGNAL(newmessage(const QString &)),
- SLOT( slotUpdateStatusMessage(const QString &)));
- connect(icon, SIGNAL(addrecent(const QString &)),
- SLOT( addRecent(const QString &)));
-
- connect( m_paletteToolBar, SIGNAL( newColor(uint)),
- grid, SLOT(setColorSelection(uint)));
-
- connect( grid, SIGNAL( changed(const QPixmap &) ),
- m_paletteToolBar, SLOT( previewChanged(const QPixmap &) ) );
- connect( grid, SIGNAL( addingcolor(uint) ),
- m_paletteToolBar, SLOT(addColor(uint)));
- connect( grid, SIGNAL( colorschanged(uint, uint*) ),
- m_paletteToolBar, SLOT(addColors(uint, uint*)));
-
- connect(grid, SIGNAL(sizechanged(int, int)),
- SLOT( slotUpdateStatusSize(int, int)));
- connect(grid, SIGNAL(poschanged(int, int)),
- SLOT( slotUpdateStatusPos(int, int)));
- connect(grid, SIGNAL(scalingchanged(int)),
- SLOT( slotUpdateStatusScaling(int)));
- connect(grid, SIGNAL(scalingchanged(int)),
- SLOT( slotUpdateZoom(int)));
- connect( grid, SIGNAL( addingcolor(uint) ),
- SLOT(slotUpdateStatusColors(uint)));
- connect(grid, SIGNAL(colorschanged(uint, uint*)),
- SLOT( slotUpdateStatusColors(uint, uint*)));
- connect(grid, SIGNAL(newmessage(const QString &)),
- SLOT( slotUpdateStatusMessage(const QString &)));
- connect(grid, SIGNAL(clipboarddata(bool)),
- SLOT( slotUpdatePaste(bool)));
- connect(grid, SIGNAL(colorSelected(uint)),
- m_paletteToolBar, SLOT(currentColorChanged(uint)));
- connect(grid, SIGNAL(modifiedchanged(bool)),
- SLOT( slotUpdateStatusModified(bool)));
+ connect(this, TQT_SIGNAL(newname(const TQString &)),
+ TQT_SLOT( slotUpdateStatusName(const TQString &)));
+
+ connect( icon, TQT_SIGNAL( saved()), TQT_SLOT(slotSaved()));
+ connect( icon, TQT_SIGNAL( loaded(TQImage *)), grid, TQT_SLOT(load(TQImage *)));
+ connect( icon, TQT_SIGNAL(opennewwin(const TQString &)),
+ TQT_SLOT(slotNewWin(const TQString &)));
+ connect(icon, TQT_SIGNAL(newname(const TQString &)),
+ TQT_SLOT( slotUpdateStatusName(const TQString &)));
+ connect(icon, TQT_SIGNAL(newmessage(const TQString &)),
+ TQT_SLOT( slotUpdateStatusMessage(const TQString &)));
+ connect(icon, TQT_SIGNAL(addrecent(const TQString &)),
+ TQT_SLOT( addRecent(const TQString &)));
+
+ connect( m_paletteToolBar, TQT_SIGNAL( newColor(uint)),
+ grid, TQT_SLOT(setColorSelection(uint)));
+
+ connect( grid, TQT_SIGNAL( changed(const TQPixmap &) ),
+ m_paletteToolBar, TQT_SLOT( previewChanged(const TQPixmap &) ) );
+ connect( grid, TQT_SIGNAL( addingcolor(uint) ),
+ m_paletteToolBar, TQT_SLOT(addColor(uint)));
+ connect( grid, TQT_SIGNAL( colorschanged(uint, uint*) ),
+ m_paletteToolBar, TQT_SLOT(addColors(uint, uint*)));
+
+ connect(grid, TQT_SIGNAL(sizechanged(int, int)),
+ TQT_SLOT( slotUpdateStatusSize(int, int)));
+ connect(grid, TQT_SIGNAL(poschanged(int, int)),
+ TQT_SLOT( slotUpdateStatusPos(int, int)));
+ connect(grid, TQT_SIGNAL(scalingchanged(int)),
+ TQT_SLOT( slotUpdateStatusScaling(int)));
+ connect(grid, TQT_SIGNAL(scalingchanged(int)),
+ TQT_SLOT( slotUpdateZoom(int)));
+ connect( grid, TQT_SIGNAL( addingcolor(uint) ),
+ TQT_SLOT(slotUpdateStatusColors(uint)));
+ connect(grid, TQT_SIGNAL(colorschanged(uint, uint*)),
+ TQT_SLOT( slotUpdateStatusColors(uint, uint*)));
+ connect(grid, TQT_SIGNAL(newmessage(const TQString &)),
+ TQT_SLOT( slotUpdateStatusMessage(const TQString &)));
+ connect(grid, TQT_SIGNAL(clipboarddata(bool)),
+ TQT_SLOT( slotUpdatePaste(bool)));
+ connect(grid, TQT_SIGNAL(colorSelected(uint)),
+ m_paletteToolBar, TQT_SLOT(currentColorChanged(uint)));
+ connect(grid, TQT_SIGNAL(modifiedchanged(bool)),
+ TQT_SLOT( slotUpdateStatusModified(bool)));
gridview->checkClipboard(); //Not very elegant, but fixes a buglet
- connect(grid, SIGNAL(selecteddata(bool)), SLOT( slotUpdateCopy(bool)));
+ connect(grid, TQT_SIGNAL(selecteddata(bool)), TQT_SLOT( slotUpdateCopy(bool)));
kdDebug(4640) << "Updating statusbar" << endl;
slotUpdateStatusSize(grid->cols(), grid->rows());
@@ -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?"), QString::null, KStdGuiItem::save(), KStdGuiItem::discard());
+ i18n("The current file has been modified.\nDo you want to save it?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard());
switch(r)
{
@@ -204,7 +204,7 @@ void KIconEdit::readProperties(KConfig *config)
{
kdDebug(4640) << "KIconEdit::readProperties" << endl;
- QString entry = config->readPathEntry("Name"); // no default
+ TQString entry = config->readPathEntry("Name"); // no default
if (entry.isEmpty()) return;
icon->open(&grid->image(), KURL::fromPathOrURL( entry ));
}
@@ -222,12 +222,12 @@ void KIconEdit::writeConfig()
saveMainWindowSettings( config, "MainWindowSettings" );
}
-QSize KIconEdit::sizeHint() const
+TQSize KIconEdit::sizeHint() const
{
if(gridview)
return gridview->sizeHint();
else
- return QSize(-1, -1);
+ return TQSize(-1, -1);
}
void KIconEdit::setupActions()
@@ -240,43 +240,43 @@ void KIconEdit::setupActions()
// File Menu
action = new KAction(i18n("New &Window"), "window_new", cut,
- this, SLOT(slotNewWin()), actionCollection(), "file_new_window");
+ this, TQT_SLOT(slotNewWin()), actionCollection(), "file_new_window");
action->setWhatsThis(i18n("New window\n\nOpens a new icon editor window."));
- action = KStdAction::openNew(this, SLOT(slotNew()), actionCollection());
+ action = KStdAction::openNew(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, SLOT(slotOpen()), actionCollection());
+ action = KStdAction::open(this, TQT_SLOT(slotOpen()), actionCollection());
action->setWhatsThis(i18n("Open\n\nOpen an existing icon"));
m_actRecent = KStdAction::openRecent(this,
- SLOT(slotOpenRecent(const KURL&)), actionCollection());
+ TQT_SLOT(slotOpenRecent(const KURL&)), actionCollection());
m_actRecent->setMaxItems(15); // FIXME should be configurable!
m_actRecent->loadEntries(kapp->config());
- action = KStdAction::save(this, SLOT(slotSave()), actionCollection());
+ action = KStdAction::save(this, TQT_SLOT(slotSave()), actionCollection());
action->setWhatsThis(i18n("Save\n\nSave the current icon"));
- KStdAction::saveAs(this, SLOT(slotSaveAs()), actionCollection());
+ KStdAction::saveAs(this, TQT_SLOT(slotSaveAs()), actionCollection());
- action = KStdAction::print(this, SLOT(slotPrint()), actionCollection());
+ action = KStdAction::print(this, TQT_SLOT(slotPrint()), actionCollection());
action->setWhatsThis(i18n("Print\n\nOpens a print dialog to let you print"
" the current icon."));
- KStdAction::close(this, SLOT(slotClose()), actionCollection());
+ KStdAction::close(this, TQT_SLOT(slotClose()), actionCollection());
// Edit Menu
- m_actCut = KStdAction::cut(this, SLOT(slotCut()), actionCollection());
+ m_actCut = KStdAction::cut(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, SLOT(slotCopy()), actionCollection());
+ m_actCopy = KStdAction::copy(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, SLOT(slotPaste()), actionCollection());
+ m_actPaste = KStdAction::paste(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"
@@ -285,28 +285,28 @@ void KIconEdit::setupActions()
" if you also want to paste transparency.)"));
m_actPasteNew = new KAction( i18n( "Paste as &New" ), cut, grid,
- SLOT( editPasteAsNew() ), actionCollection(), "edit_paste_as_new" );
+ TQT_SLOT( editPasteAsNew() ), actionCollection(), "edit_paste_as_new" );
- KStdAction::clear(this, SLOT(slotClear()), actionCollection());
- KStdAction::selectAll(this, SLOT(slotSelectAll()), actionCollection());
+ KStdAction::clear(this, TQT_SLOT(slotClear()), actionCollection());
+ KStdAction::selectAll(this, TQT_SLOT(slotSelectAll()), actionCollection());
action = new KAction(i18n("Resi&ze..."), "transform", cut,
- grid, SLOT(editResize()), actionCollection(), "edit_resize");
+ 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, SLOT(grayScale()), actionCollection(), "edit_grayscale");
+ 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, SLOT(slotZoomIn()),
+ m_actZoomIn = KStdAction::zoomIn(this, TQT_SLOT(slotZoomIn()),
actionCollection());
m_actZoomIn->setWhatsThis(i18n("Zoom in\n\nZoom in by one."));
- m_actZoomOut = KStdAction::zoomOut(this, SLOT(slotZoomOut()),
+ m_actZoomOut = KStdAction::zoomOut(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, SLOT( slotZoom1() ),
+ action = new KAction( i18n( "100%" ), cut, this, TQT_SLOT( slotZoom1() ),
actionCollection(), "view_zoom_1" );
actMenu->insert( action );
// xgettext:no-c-format
- action = new KAction( i18n( "200%" ), cut, this, SLOT( slotZoom2() ),
+ action = new KAction( i18n( "200%" ), cut, this, TQT_SLOT( slotZoom2() ),
actionCollection(), "view_zoom_2" );
actMenu->insert( action );
// xgettext:no-c-format
- action = new KAction( i18n( "500%" ), cut, this, SLOT( slotZoom5() ),
+ action = new KAction( i18n( "500%" ), cut, this, TQT_SLOT( slotZoom5() ),
actionCollection(), "view_zoom_5" );
actMenu->insert( action );
// xgettext:no-c-format
- action = new KAction( i18n( "1000%" ), cut, this, SLOT( slotZoom10() ),
+ action = new KAction( i18n( "1000%" ), cut, this, TQT_SLOT( slotZoom10() ),
actionCollection(), "view_zoom_10" );
actMenu->insert( action );
// Settings Menu
- KStdAction::keyBindings(this, SLOT(slotConfigureKeys()),
+ KStdAction::keyBindings(this, TQT_SLOT(slotConfigureKeys()),
actionCollection());
- KStdAction::preferences(this, SLOT(slotConfigureSettings()),
+ KStdAction::preferences(this, TQT_SLOT(slotConfigureSettings()),
actionCollection());
createStandardStatusBarAction();
@@ -341,7 +341,7 @@ void KIconEdit::setupActions()
KToggleAction *toggle;
toggle = new KToggleAction( i18n( "Show &Grid" ), "grid",
- cut, this, SLOT( slotShowGrid() ), actionCollection(),
+ cut, 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, SLOT(slotToolPointer()), actionCollection(),
+ cut, 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, SLOT(slotToolFreehand()), actionCollection(),
+ cut, 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, SLOT(slotToolRectangle()), actionCollection(),
+ cut, 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, SLOT(slotToolFilledRectangle()), actionCollection(),
+ cut, 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, SLOT(slotToolCircle()), actionCollection(),
+ cut, 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, SLOT(slotToolFilledCircle()), actionCollection(),
+ cut, 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, SLOT(slotToolEllipse()), actionCollection(),
+ cut, 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, SLOT(slotToolFilledEllipse()), actionCollection(),
+ cut, 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, SLOT(slotToolSpray()), actionCollection(),
+ cut, 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, SLOT(slotToolFlood()), actionCollection(),
+ cut, 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, SLOT(slotToolLine()), actionCollection(),
+ cut, 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, SLOT(slotToolEraser()), actionCollection(),
+ cut, 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, SLOT(slotToolSelectRect()),
+ "selectrect", cut, 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, SLOT(slotToolSelectCircle()),
+ "selectcircle", cut, this, TQT_SLOT(slotToolSelectCircle()),
actionCollection(), "edit_select_circle");
toolAction->setExclusiveGroup( "toolActions" );
toolAction->setWhatsThis(i18n("Select\n\nSelect a circular section of the"
@@ -451,8 +451,8 @@ void KIconEdit::updateAccels()
actionCollection()->readShortcutSettings();
}
-QWidget *KIconEdit::createContainer( QWidget *parent, int index,
- const QDomElement &element, int &id )
+TQWidget *KIconEdit::createContainer( TQWidget *parent, int index,
+ const TQDomElement &element, int &id )
{
if ( element.attribute( "name" ) == "paletteToolBar" )
{
@@ -468,11 +468,11 @@ bool KIconEdit::setupStatusBar()
{
statusbar = statusBar();
- QString str = i18n("Statusbar\n\nThe statusbar gives information on"
+ TQString str = i18n("Statusbar\n\nThe statusbar gives information on"
" the status of the current icon. The fields are:\n\n"
"\t- Application messages\n\t- Cursor position\n\t- Size\n\t- Zoom factor\n"
"\t- Number of colors");
- QWhatsThis::add(statusBar(), str);
+ TQWhatsThis::add(statusBar(), str);
statusbar->insertFixedItem("99999,99999", 0, true);
statusbar->insertFixedItem("99999 x 99999", 1, true);
@@ -489,7 +489,7 @@ bool KIconEdit::setupStatusBar()
return true;
}
-void KIconEdit::addRecent(const QString & path)
+void KIconEdit::addRecent(const TQString & path)
{
m_actRecent->addURL(KURL( path ));
}
diff --git a/kiconedit/kiconedit.h b/kiconedit/kiconedit.h
index 54227206..021223de 100644
--- a/kiconedit/kiconedit.h
+++ b/kiconedit/kiconedit.h
@@ -21,9 +21,9 @@
#ifndef __KICONEDIT_H__
#define __KICONEDIT_H__
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
#include <kmainwindow.h>
#include <kiconloader.h>
@@ -43,11 +43,11 @@
class KIconEdit;
class KCommandHistory;
-typedef QPtrList<KIconEdit> WindowList;
+typedef TQPtrList<KIconEdit> WindowList;
-class QWhatsThis;
-class QToolButton;
-class QLabel;
+class TQWhatsThis;
+class TQToolButton;
+class TQLabel;
class PaletteToolBar;
/**
@@ -61,14 +61,14 @@ class KIconEdit : public KMainWindow
Q_OBJECT
public:
KIconEdit( KURL url = KURL(), const char *name = "kiconedit");
- KIconEdit( const QImage image, const char *name = "kiconedit");
+ KIconEdit( const TQImage image, const char *name = "kiconedit");
~KIconEdit();
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
static WindowList windowList;
signals:
- void newname(const QString &);
+ void newname(const TQString &);
public slots:
virtual void saveProperties(KConfig*);
@@ -76,7 +76,7 @@ public slots:
void updateProperties();
protected slots:
- void slotNewWin(const QString & url = 0);
+ void slotNewWin(const TQString & url = 0);
void slotNew();
void slotOpen();
void slotClose();
@@ -118,17 +118,17 @@ protected slots:
void slotUpdateStatusColors(uint, uint*);
void slotUpdateStatusPos(int, int);
void slotUpdateStatusSize(int, int);
- void slotUpdateStatusMessage(const QString &);
- void slotUpdateStatusName(const QString &);
+ void slotUpdateStatusMessage(const TQString &);
+ void slotUpdateStatusName(const TQString &);
void slotUpdateStatusModified(bool);
void slotUpdateStatusScaling(int);
void slotUpdatePaste(bool);
void slotUpdateCopy(bool);
- void slotOpenBlank(const QSize);
- void addRecent(const QString &);
+ void slotOpenBlank(const TQSize);
+ void addRecent(const TQString &);
- virtual void dragEnterEvent(QDragEnterEvent* event);
- virtual void dropEvent(QDropEvent *e);
+ virtual void dragEnterEvent(TQDragEnterEvent* event);
+ virtual void dropEvent(TQDropEvent *e);
protected:
void init();
@@ -138,7 +138,7 @@ protected:
void updateAccels();
virtual bool queryClose();
- virtual QWidget *createContainer( QWidget*, int, const QDomElement&, int& );
+ virtual TQWidget *createContainer( TQWidget*, int, const TQDomElement&, int& );
KCommandHistory* history;
PaletteToolBar *m_paletteToolBar;
@@ -146,8 +146,8 @@ protected:
KIconEditGrid *grid;
KGridView *gridview;
KIconEditIcon *icon;
- QImage img;
- QString m_name;
+ TQImage img;
+ TQString m_name;
KAction *m_actCopy, *m_actPaste, *m_actCut, *m_actPasteNew;
KAction *m_actZoomIn, *m_actZoomOut;
diff --git a/kiconedit/kiconeditslots.cpp b/kiconedit/kiconeditslots.cpp
index 0d57d28e..ffcca476 100644
--- a/kiconedit/kiconeditslots.cpp
+++ b/kiconedit/kiconeditslots.cpp
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
#include <kkeydialog.h>
#include <klocale.h>
@@ -41,12 +41,12 @@ void KIconEdit::updateProperties()
{
KIconEditProperties *props = KIconEditProperties::self();
gridview->setShowRulers(props->showRulers());
- if(props->bgMode() == QWidget::FixedPixmap)
+ if(props->bgMode() == TQWidget::FixedPixmap)
{
- QPixmap pix(props->bgPixmap());
+ TQPixmap pix(props->bgPixmap());
if(pix.isNull())
{
- QPixmap pmlogo((const char**)logo);
+ TQPixmap pmlogo((const char**)logo);
pix = pmlogo;
}
gridview->viewPortWidget()->viewport()->setBackgroundPixmap(pix);
@@ -66,7 +66,7 @@ void KIconEdit::updateProperties()
grid->update();
}
-void KIconEdit::slotNewWin(const QString & url)
+void KIconEdit::slotNewWin(const TQString & url)
{
//kdDebug(4640) << "KIconEdit::openNewWin() - " << url << endl;
@@ -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?"), QString::null, KStdGuiItem::save(), KStdGuiItem::discard());
+ i18n("The current file has been modified.\nDo you want to save it?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard());
switch(r)
{
@@ -112,14 +112,14 @@ void KIconEdit::slotNew()
if(r == KNewIcon::Blank)
{
grid->editClear();
- const QSize s = newicon.templateSize();
+ const TQSize s = newicon.templateSize();
//kdDebug(4640) << "Size: " << s.width() << " x " << s.height() << endl;
grid->setSize(s);
grid->setModified(false);
}
else if(r == KNewIcon::Template)
{
- QString str = newicon.templatePath();
+ TQString str = newicon.templatePath();
icon->open(&grid->image(), KURL( str ));
}
icon->setUrl("");
@@ -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?"),QString::null, KStdGuiItem::save(), KStdGuiItem::discard());
+ i18n("The current file has been modified.\nDo you want to save it?"),TQString::null, KStdGuiItem::save(), KStdGuiItem::discard());
switch( r )
{
@@ -200,11 +200,11 @@ void KIconEdit::slotPrint()
int margin = 10, yPos = 0;
printer.setCreator("KDE Icon Editor");
- QPainter p;
+ TQPainter p;
p.begin( &printer );
- QFontMetrics fm = p.fontMetrics();
+ TQFontMetrics fm = p.fontMetrics();
// need width/height
- QPaintDeviceMetrics metrics( &printer );
+ TQPaintDeviceMetrics metrics( &printer );
p.drawText( margin, margin + yPos, metrics.width(), fm.lineSpacing(),
ExpandTabs | DontClip, icon->url() );
@@ -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?"),QString::null, KStdGuiItem::save(), KStdGuiItem::discard());
+ i18n("The current file has been modified.\nDo you want to save it?"),TQString::null, KStdGuiItem::save(), KStdGuiItem::discard());
switch( r )
{
@@ -422,20 +422,20 @@ void KIconEdit::slotUpdateZoom( int s )
void KIconEdit::slotUpdateStatusPos(int x, int y)
{
- QString str = i18n("Status Position", "%1, %2").arg(x).arg(y);
+ TQString str = i18n("Status Position", "%1, %2").arg(x).arg(y);
statusbar->changeItem( str, 0);
}
void KIconEdit::slotUpdateStatusSize(int x, int y)
{
- QString str = i18n("Status Size", "%1 x %2").arg(x).arg(y);
+ TQString str = i18n("Status Size", "%1 x %2").arg(x).arg(y);
statusbar->changeItem( str, 1);
}
void KIconEdit::slotUpdateStatusScaling(int s)
{
KIconEditProperties::self()->setGridScale( s );
- QString str;
+ TQString str;
str.sprintf("1:%d", s);
statusbar->changeItem( str, 2);
@@ -443,28 +443,28 @@ void KIconEdit::slotUpdateStatusScaling(int s)
void KIconEdit::slotUpdateStatusColors(uint)
{
- QString str = i18n("Colors: %1").arg(grid->numColors());
+ TQString str = i18n("Colors: %1").arg(grid->numColors());
statusbar->changeItem( str, 3);
}
void KIconEdit::slotUpdateStatusColors(uint n, uint *)
{
- QString str = i18n("Colors: %1").arg(n);
+ TQString str = i18n("Colors: %1").arg(n);
statusbar->changeItem( str, 3);
}
-void KIconEdit::slotUpdateStatusMessage(const QString & msg)
+void KIconEdit::slotUpdateStatusMessage(const TQString & msg)
{
statusbar->changeItem( msg, 4);
}
-void KIconEdit::slotUpdateStatusName(const QString & name)
+void KIconEdit::slotUpdateStatusName(const TQString & name)
{
m_name = name;
- QString text = m_name;
+ TQString text = m_name;
if(grid->isModified())
{
@@ -494,13 +494,13 @@ void KIconEdit::slotUpdateCopy(bool state)
}
-void KIconEdit::slotOpenBlank(const QSize s)
+void KIconEdit::slotOpenBlank(const TQSize s)
{
grid->loadBlank( s.width(), s.height());
}
-void KIconEdit::dragEnterEvent(QDragEnterEvent* e)
+void KIconEdit::dragEnterEvent(TQDragEnterEvent* e)
{
e->accept(KURLDrag::canDecode(e));
}
@@ -510,7 +510,7 @@ void KIconEdit::dragEnterEvent(QDragEnterEvent* e)
accept drop of a file - opens file in current window
old code to drop image, as image, should be removed
*/
-void KIconEdit::dropEvent( QDropEvent *e )
+void KIconEdit::dropEvent( TQDropEvent *e )
{
//kdDebug(4640) << "Got QDropEvent!" << endl;
diff --git a/kiconedit/kicongrid.cpp b/kiconedit/kicongrid.cpp
index abfb848e..2c9faeb7 100644
--- a/kiconedit/kicongrid.cpp
+++ b/kiconedit/kicongrid.cpp
@@ -23,12 +23,12 @@
#include <stdlib.h>
-#include <qpainter.h>
-#include <qwhatsthis.h>
-#include <qscrollview.h>
-#include <qbitmap.h>
-#include <qclipboard.h>
-#include <qdatetime.h>
+#include <tqpainter.h>
+#include <tqwhatsthis.h>
+#include <tqscrollview.h>
+#include <tqbitmap.h>
+#include <tqclipboard.h>
+#include <tqdatetime.h>
#include <kiconloader.h>
#include <kruler.h>
@@ -67,8 +67,8 @@ void RepaintCommand::execute()
grid->update( area);
}
-KGridView::KGridView(QImage *image, KCommandHistory* history, QWidget *parent, const char *name)
-: QFrame(parent, name)
+KGridView::KGridView(TQImage *image, KCommandHistory* history, TQWidget *parent, const char *name)
+: TQFrame(parent, name)
{
_corner = 0L;
_hruler = _vruler = 0L;
@@ -78,7 +78,7 @@ KGridView::KGridView(QImage *image, KCommandHistory* history, QWidget *parent, c
KIconEditProperties *props = KIconEditProperties::self();
- viewport = new QScrollView(this);
+ viewport = new TQScrollView(this);
Q_CHECK_PTR(viewport);
_grid = new KIconEditGrid(image, history, viewport->viewport());
@@ -87,18 +87,18 @@ KGridView::KGridView(QImage *image, KCommandHistory* history, QWidget *parent, c
_grid->setGrid(props->showGrid());
_grid->setCellSize(props->gridScale());
- QString str = i18n( "Icon draw grid\n\nThe icon grid is the area where"
+ TQString str = i18n( "Icon draw grid\n\nThe icon grid is the area where"
" you draw the icons.\nYou can zoom in and out using the magnifying"
" glasses on the toolbar.\n(Tip: Hold the magnify button down for a"
" few seconds to zoom to a predefined scale)" );
- QWhatsThis::add( _grid, str );
+ TQWhatsThis::add( _grid, str );
if(props->bgMode() == FixedPixmap)
{
- QPixmap pix(props->bgPixmap());
+ TQPixmap pix(props->bgPixmap());
if(pix.isNull())
{
- QPixmap pmlogo((const char **)logo);
+ TQPixmap pmlogo((const char **)logo);
pix = pmlogo;
}
viewport->viewport()->setBackgroundPixmap(pix);
@@ -109,8 +109,8 @@ KGridView::KGridView(QImage *image, KCommandHistory* history, QWidget *parent, c
viewport->viewport()->setBackgroundColor(props->bgColor());
}
- _corner = new QFrame(this);
- _corner->setFrameStyle(QFrame::WinPanel | QFrame::Raised);
+ _corner = new TQFrame(this);
+ _corner->setFrameStyle(TQFrame::WinPanel | TQFrame::Raised);
_hruler = new KRuler(Qt::Horizontal, this);
_hruler->setEndLabel(i18n("width"));
@@ -124,18 +124,18 @@ KGridView::KGridView(QImage *image, KCommandHistory* history, QWidget *parent, c
str = i18n( "Rulers\n\nThis is a visual representation of the current"
" cursor position" );
- QWhatsThis::add( _hruler, str );
- QWhatsThis::add( _vruler, str );
-
- connect(_grid, SIGNAL(scalingchanged(int)), SLOT(scalingChange(int)));
- connect(_grid, SIGNAL(sizechanged(int, int)), SLOT(sizeChange(int, int)));
- connect(_grid, SIGNAL(needPainting()), SLOT(paintGrid()));
- connect( _grid, SIGNAL(xposchanged(int)), _hruler, SLOT(slotNewValue(int)) );
- connect( _grid, SIGNAL(yposchanged(int)), _vruler, SLOT(slotNewValue(int)) );
- connect(viewport, SIGNAL(contentsMoving(int, int)), SLOT(moving(int, int)));
+ TQWhatsThis::add( _hruler, str );
+ TQWhatsThis::add( _vruler, str );
+
+ connect(_grid, TQT_SIGNAL(scalingchanged(int)), TQT_SLOT(scalingChange(int)));
+ connect(_grid, TQT_SIGNAL(sizechanged(int, int)), TQT_SLOT(sizeChange(int, int)));
+ connect(_grid, TQT_SIGNAL(needPainting()), TQT_SLOT(paintGrid()));
+ connect( _grid, TQT_SIGNAL(xposchanged(int)), _hruler, TQT_SLOT(slotNewValue(int)) );
+ connect( _grid, TQT_SIGNAL(yposchanged(int)), _vruler, TQT_SLOT(slotNewValue(int)) );
+ connect(viewport, TQT_SIGNAL(contentsMoving(int, int)), TQT_SLOT(moving(int, int)));
setSizes();
- QResizeEvent e(size(), size());
+ TQResizeEvent e(size(), size());
resizeEvent(&e);
}
@@ -210,7 +210,7 @@ void KGridView::setShowRulers(bool mode)
{
KIconEditProperties::self()->setShowRulers( mode );
setSizes();
- QResizeEvent e(size(), size());
+ TQResizeEvent e(size(), size());
resizeEvent(&e);
}
@@ -226,7 +226,7 @@ void KGridView::checkClipboard()
_grid->checkClipboard();
}
-const QRect KGridView::viewRect()
+const TQRect KGridView::viewRect()
{
int x, y, cx, cy;
if(viewport->horizontalScrollBar()->isVisible())
@@ -251,26 +251,26 @@ const QRect KGridView::viewRect()
cy = viewport->contentsHeight();
}
- return QRect(x, y, cx, cy);
+ return TQRect(x, y, cx, cy);
}
void KGridView::paintDropSite()
{
- QPainter p;
+ TQPainter p;
p.begin( _grid );
p.setRasterOp (NotROP);
p.drawRect(viewRect());
p.end();
}
-void KGridView::paintEvent(QPaintEvent *)
+void KGridView::paintEvent(TQPaintEvent *)
{
if(acceptdrop)
paintDropSite();
}
-void KGridView::resizeEvent(QResizeEvent*)
+void KGridView::resizeEvent(TQResizeEvent*)
{
kdDebug(4640) << "KGridView::resizeEvent" << endl;
@@ -290,7 +290,7 @@ void KGridView::resizeEvent(QResizeEvent*)
}
-KIconEditGrid::KIconEditGrid(QImage *image, KCommandHistory* h, QWidget *parent, const char *name)
+KIconEditGrid::KIconEditGrid(TQImage *image, KCommandHistory* h, TQWidget *parent, const char *name)
: KColorGrid(parent, name, 1)
{
img = image;
@@ -319,8 +319,8 @@ KIconEditGrid::KIconEditGrid(QImage *image, KCommandHistory* h, QWidget *parent,
setNumCols(32);
fill(TRANSPARENT);
- connect( kapp->clipboard(), SIGNAL(dataChanged()), SLOT(checkClipboard()));
- connect( h, SIGNAL(commandExecuted()), this, SLOT(updatePreviewPixmap() ));
+ connect( kapp->clipboard(), TQT_SIGNAL(dataChanged()), TQT_SLOT(checkClipboard()));
+ connect( h, TQT_SIGNAL(commandExecuted()), this, TQT_SLOT(updatePreviewPixmap() ));
createCursors();
KIconEditProperties *props = KIconEditProperties::self();
@@ -337,14 +337,14 @@ KIconEditGrid::~KIconEditGrid()
kdDebug(4640) << "KIconEditGrid - destructor: done" << endl;
}
-void KIconEditGrid::paintEvent(QPaintEvent *e)
+void KIconEditGrid::paintEvent(TQPaintEvent *e)
{
- const QRect cellsRect(0, 0, numCols() * cellSize(), numRows() * cellSize());
- const QRect paintCellsRect = cellsRect.intersect(e->rect());
+ const TQRect cellsRect(0, 0, numCols() * cellSize(), numRows() * cellSize());
+ const TQRect paintCellsRect = cellsRect.intersect(e->rect());
if(!paintCellsRect.isEmpty())
{
- //QTime time;
+ //TQTime time;
//time.start();
@@ -601,18 +601,18 @@ void KIconEditGrid::paintEvent(QPaintEvent *e)
delete [] color2ScanLine;
}
- QImage image((uchar *)(imageBuffer), paintCellsRect.width(), paintCellsRect.height(), 32, 0, 0,
+ TQImage image((uchar *)(imageBuffer), paintCellsRect.width(), paintCellsRect.height(), 32, 0, 0,
#if X_BYTE_ORDER == X_LITTLE_ENDIAN
- QImage::LittleEndian);
+ TQImage::LittleEndian);
#else
- QImage::BigEndian);
+ TQImage::BigEndian);
#endif
Q_ASSERT(!image.isNull());
- QPixmap _pixmap;
+ TQPixmap _pixmap;
_pixmap.convertFromImage(image);
- QPainter p;
+ TQPainter p;
p.begin(&_pixmap);
paintForeground(&p, e);
p.end();
@@ -625,15 +625,15 @@ void KIconEditGrid::paintEvent(QPaintEvent *e)
}
}
-void KIconEditGrid::paintForeground(QPainter* p, QPaintEvent* e)
+void KIconEditGrid::paintForeground(TQPainter* p, TQPaintEvent* e)
{
- QWMatrix matrix;
+ TQWMatrix matrix;
matrix.translate(-e->rect().x(), -e->rect().y());
p->setWorldMatrix( matrix );
- QRect cellsRect(0, 0, numCols() * cellSize(), numRows() * cellSize());
- QRect paintCellsRect = cellsRect.intersect(e->rect());
+ TQRect cellsRect(0, 0, numCols() * cellSize(), numRows() * cellSize());
+ TQRect paintCellsRect = cellsRect.intersect(e->rect());
if(!paintCellsRect.isEmpty())
{
@@ -643,8 +643,8 @@ void KIconEditGrid::paintForeground(QPainter* p, QPaintEvent* e)
int firstRow = paintCellsRect.top() / cellSize();
int lastRow = paintCellsRect.bottom() / cellSize();
- p->setPen(QColor(0, 0, 0));
- p->setBrush(QColor(0, 0, 0));
+ p->setPen(TQColor(0, 0, 0));
+ p->setBrush(TQColor(0, 0, 0));
for(int column = firstColumn; column <= lastColumn; column++)
{
@@ -691,7 +691,7 @@ void KIconEditGrid::paintForeground(QPainter* p, QPaintEvent* e)
if(hasGrid()&& !(cellSize()==1))
{
- p->setPen(QColor(0, 0, 0));
+ p->setPen(TQColor(0, 0, 0));
int x = e->rect().x() - ((e->rect().x() % cellSize()) + cellSize());
if(x < 0) x = 0;
int y = e->rect().y() - ((e->rect().y() % cellSize()) + cellSize());
@@ -708,7 +708,7 @@ void KIconEditGrid::paintForeground(QPainter* p, QPaintEvent* e)
}
}
-void KIconEditGrid::mousePressEvent( QMouseEvent *e )
+void KIconEditGrid::mousePressEvent( TQMouseEvent *e )
{
if(!e || (e->button() != LeftButton))
return;
@@ -732,7 +732,7 @@ void KIconEditGrid::mousePressEvent( QMouseEvent *e )
if(isselecting)
{
- QPointArray a(pntarray.copy());
+ TQPointArray a(pntarray.copy());
pntarray.resize(0);
drawPointArray(a, Mark);
emit selecteddata(false);
@@ -749,7 +749,7 @@ void KIconEditGrid::mousePressEvent( QMouseEvent *e )
}
}
-void KIconEditGrid::mouseMoveEvent( QMouseEvent *e )
+void KIconEditGrid::mouseMoveEvent( TQMouseEvent *e )
{
if(!e) return;
@@ -766,7 +766,7 @@ void KIconEditGrid::mouseMoveEvent( QMouseEvent *e )
emit yposchanged((row*scaling())+scaling()/2);
}
- QPoint tmpp(col, row);
+ TQPoint tmpp(col, row);
if(tmpp == end) return;
// need to use intersection of rectangles to allow pasting
@@ -825,8 +825,8 @@ void KIconEditGrid::mouseMoveEvent( QMouseEvent *e )
setModified( true );
int prevSel = selected;
selected = cell;
- QRect area = QRect( col*cellsize,row*cellsize, cellsize, cellsize ).unite(
- QRect ( (prevSel%numCols())*cellsize,(prevSel/numCols())*cellsize, cellsize, cellsize ) );
+ TQRect area = TQRect( col*cellsize,row*cellsize, cellsize, cellsize ).unite(
+ TQRect ( (prevSel%numCols())*cellsize,(prevSel/numCols())*cellsize, cellsize, cellsize ) );
m_command->addCommand( new RepaintCommand( area, this ) );
DrawCommand* dc = new DrawCommand( col, row, colorAt(cell), img, this );
@@ -872,7 +872,7 @@ void KIconEditGrid::mouseMoveEvent( QMouseEvent *e )
}
case Spray:
{
- drawSpray(QPoint(col, row));
+ drawSpray(TQPoint(col, row));
setModified(true);
break;
}
@@ -881,10 +881,10 @@ void KIconEditGrid::mouseMoveEvent( QMouseEvent *e )
}
p = *img;
- emit changed(QPixmap(p));
+ emit changed(TQPixmap(p));
}
-void KIconEditGrid::mouseReleaseEvent( QMouseEvent *e )
+void KIconEditGrid::mouseReleaseEvent( TQMouseEvent *e )
{
if(!e || (e->button() != LeftButton))
return;
@@ -950,14 +950,14 @@ void KIconEditGrid::mouseReleaseEvent( QMouseEvent *e )
}
case Spray:
{
- drawSpray(QPoint(col, row));
+ drawSpray(TQPoint(col, row));
break;
}
case FloodFill:
{
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
drawFlood(col, row, colorAt(cell));
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
updateColors();
emit needPainting();
p = *img;
@@ -983,11 +983,11 @@ void KIconEditGrid::mouseReleaseEvent( QMouseEvent *e )
break;
}
- emit changed(QPixmap(p));
+ emit changed(TQPixmap(p));
//emit colorschanged(numColors(), data());
}
-//void KIconEditGrid::setColorSelection( const QColor &color )
+//void KIconEditGrid::setColorSelection( const TQColor &color )
void KIconEditGrid::setColorSelection( uint c )
{
currentcolor = c;
@@ -1009,7 +1009,7 @@ void KIconEditGrid::loadBlank( int w, int h )
-void KIconEditGrid::load( QImage *image)
+void KIconEditGrid::load( TQImage *image)
{
kdDebug(4640) << "KIconEditGrid::load" << endl;
@@ -1017,7 +1017,7 @@ void KIconEditGrid::load( QImage *image)
if(image == 0L)
{
- QString msg = i18n("There was an error loading a blank image.\n");
+ TQString msg = i18n("There was an error loading a blank image.\n");
KMessageBox::error(this, msg);
return;
}
@@ -1048,7 +1048,7 @@ void KIconEditGrid::load( QImage *image)
history->clear();
}
-const QPixmap &KIconEditGrid::pixmap()
+const TQPixmap &KIconEditGrid::pixmap()
{
if(!img->isNull())
p = *img;
@@ -1056,7 +1056,7 @@ const QPixmap &KIconEditGrid::pixmap()
return(p);
}
-void KIconEditGrid::getImage(QImage *image)
+void KIconEditGrid::getImage(TQImage *image)
{
kdDebug(4640) << "KIconEditGrid::getImage" << endl;
*image = *img;
@@ -1064,12 +1064,12 @@ void KIconEditGrid::getImage(QImage *image)
bool KIconEditGrid::zoomTo(int scale)
{
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
setUpdatesEnabled(false);
setCellSize( scale );
setUpdatesEnabled(true);
emit needPainting();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
emit scalingchanged(cellSize());
if(scale == 1)
@@ -1080,12 +1080,12 @@ bool KIconEditGrid::zoomTo(int scale)
bool KIconEditGrid::zoom(Direction d)
{
int f = (d == DirIn) ? (cellSize()+1) : (cellSize()-1);
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
setUpdatesEnabled(false);
setCellSize( f );
setUpdatesEnabled(true);
//emit needPainting();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
emit scalingchanged(cellSize());
if(d == DirOut && cellSize() <= 1)
@@ -1096,7 +1096,7 @@ bool KIconEditGrid::zoom(Direction d)
void KIconEditGrid::checkClipboard()
{
bool ok = false;
- QImage tmp = clipboardImage(ok);
+ TQImage tmp = clipboardImage(ok);
if(ok)
emit clipboarddata(true);
else
@@ -1105,19 +1105,19 @@ void KIconEditGrid::checkClipboard()
}
}
-QImage KIconEditGrid::clipboardImage(bool &ok)
+TQImage KIconEditGrid::clipboardImage(bool &ok)
{
//###### Remove me later.
//Workaround Qt bug -- check whether format provided first.
- //Code below is from QDragObject, to match the mimetype list....
+ //Code below is from TQDragObject, to match the mimetype list....
- QStrList fileFormats = QImageIO::inputFormats();
+ TQStrList fileFormats = TQImageIO::inputFormats();
fileFormats.first();
bool oneIsSupported = false;
while ( fileFormats.current() )
{
- QCString format = fileFormats.current();
- QCString type = "image/" + format.lower();
+ TQCString format = fileFormats.current();
+ TQCString type = "image/" + format.lower();
if (kapp->clipboard()->data()->provides(type ) )
{
oneIsSupported = true;
@@ -1127,10 +1127,10 @@ QImage KIconEditGrid::clipboardImage(bool &ok)
if (!oneIsSupported)
{
ok = false;
- return QImage();
+ return TQImage();
}
- QImage image = kapp->clipboard()->image();
+ TQImage image = kapp->clipboard()->image();
ok = !image.isNull();
if ( ok )
{
@@ -1163,13 +1163,13 @@ void KIconEditGrid::editClear()
emit newmessage(i18n("Cleared"));
}
-QImage KIconEditGrid::getSelection(bool cut)
+TQImage KIconEditGrid::getSelection(bool cut)
{
- const QRect rect = pntarray.boundingRect();
+ const TQRect rect = pntarray.boundingRect();
int nx = 0, ny = 0, nw = 0, nh = 0;
rect.rect(&nx, &ny, &nw, &nh);
- QImage tmp(nw, nh, 32);
+ TQImage tmp(nw, nh, 32);
tmp.setAlphaBuffer(true);
clearImage(&tmp);
@@ -1179,7 +1179,7 @@ QImage KIconEditGrid::getSelection(bool cut)
{
int x = pntarray[i].x();
int y = pntarray[i].y();
- if(img->valid(x, y) && rect.contains(QPoint(x, y)))
+ if(img->valid(x, y) && rect.contains(TQPoint(x, y)))
{
*((uint*)tmp.scanLine(y-ny) + (x-nx)) = *((uint*)img->scanLine(y) + x);
if(cut)
@@ -1190,7 +1190,7 @@ QImage KIconEditGrid::getSelection(bool cut)
}
}
- QPointArray a(pntarray.copy());
+ TQPointArray a(pntarray.copy());
pntarray.resize(0);
drawPointArray(a, Mark);
emit selecteddata(false);
@@ -1221,7 +1221,7 @@ void KIconEditGrid::editCopy(bool cut)
void KIconEditGrid::editPaste(bool paste)
{
bool ok = false;
- QImage tmp = clipboardImage(ok);
+ TQImage tmp = clipboardImage(ok);
KIconEditProperties *props = KIconEditProperties::self();
@@ -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?"),QString::null,i18n("Paste"), i18n("Do Not Paste")) == 0)
+ " image!\nPaste as new image?"),TQString::null,i18n("Paste"), i18n("Do Not Paste")) == 0)
{
editPasteAsNew();
}
@@ -1248,7 +1248,7 @@ void KIconEditGrid::editPaste(bool paste)
else
{
//kdDebug(4640) << "KIconEditGrid: Pasting at: " << insrect.x() << " x " << insrect.y() << endl;
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
for(int y = insrect.y(), ny = 0; y < numRows() && ny < insrect.height(); y++, ny++)
{
@@ -1344,11 +1344,11 @@ void KIconEditGrid::editPaste(bool paste)
update(insrect.x()*cellSize(), insrect.y()*cellSize(),
insrect.width()*cellSize(), insrect.height()*cellSize());
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
setModified(true);
p = *img;
- emit changed(QPixmap(p));
+ emit changed(TQPixmap(p));
emit sizechanged(numCols(), numRows());
emit colorschanged(numColors(), data());
emit newmessage(i18n("Done pasting"));
@@ -1356,7 +1356,7 @@ void KIconEditGrid::editPaste(bool paste)
}
else
{
- QString msg = i18n("Invalid pixmap data in clipboard!\n");
+ TQString msg = i18n("Invalid pixmap data in clipboard!\n");
KMessageBox::sorry(this, msg);
}
}
@@ -1365,7 +1365,7 @@ void KIconEditGrid::editPaste(bool paste)
void KIconEditGrid::editPasteAsNew()
{
bool ok = false;
- QImage tmp = clipboardImage(ok);
+ TQImage tmp = clipboardImage(ok);
if(ok)
{
@@ -1382,7 +1382,7 @@ void KIconEditGrid::editPasteAsNew()
//repaint(viewRect(), false);
p = *img;
- emit changed(QPixmap(p));
+ emit changed(TQPixmap(p));
emit sizechanged(numCols(), numRows());
emit colorschanged(numColors(), data());
emit newmessage(i18n("Done pasting"));
@@ -1391,7 +1391,7 @@ void KIconEditGrid::editPasteAsNew()
}
else
{
- QString msg = i18n("Invalid pixmap data in clipboard!\n");
+ TQString msg = i18n("Invalid pixmap data in clipboard!\n");
KMessageBox::error(this, msg);
}
}
@@ -1400,10 +1400,10 @@ void KIconEditGrid::editPasteAsNew()
void KIconEditGrid::editResize()
{
kdDebug(4640) << "KIconGrid::editResize" << endl;
- KResizeDialog *rs = new KResizeDialog(this, 0, QSize(numCols(), numRows()));
+ KResizeDialog *rs = new KResizeDialog(this, 0, TQSize(numCols(), numRows()));
if(rs->exec())
{
- const QSize s = rs->getSize();
+ const TQSize s = rs->getSize();
*img = img->smoothScale(s.width(), s.height());
load(img);
@@ -1413,7 +1413,7 @@ void KIconEditGrid::editResize()
}
-void KIconEditGrid::setSize(const QSize s)
+void KIconEditGrid::setSize(const TQSize s)
{
kdDebug(4640) << "::setSize: " << s.width() << " x " << s.height() << endl;
@@ -1426,10 +1426,10 @@ void KIconEditGrid::setSize(const QSize s)
void KIconEditGrid::createCursors()
{
- QBitmap mask(22, 22);
- QPixmap pix;
+ TQBitmap mask(22, 22);
+ TQPixmap pix;
- cursor_normal = QCursor(arrowCursor);
+ cursor_normal = TQCursor(arrowCursor);
pix = BarIcon("colorpicker-cursor");
if(pix.isNull())
@@ -1441,7 +1441,7 @@ void KIconEditGrid::createCursors()
{
mask = pix.createHeuristicMask();
pix.setMask(mask);
- cursor_colorpicker = QCursor(pix, 1, 21);
+ cursor_colorpicker = TQCursor(pix, 1, 21);
}
pix = BarIcon("paintbrush-cursor");
@@ -1454,7 +1454,7 @@ void KIconEditGrid::createCursors()
{
mask = pix.createHeuristicMask();
pix.setMask(mask);
- cursor_paint = QCursor(pix, 0, 19);
+ cursor_paint = TQCursor(pix, 0, 19);
}
pix = BarIcon("fill-cursor");
@@ -1467,7 +1467,7 @@ void KIconEditGrid::createCursors()
{
mask = pix.createHeuristicMask();
pix.setMask(mask);
- cursor_flood = QCursor(pix, 3, 20);
+ cursor_flood = TQCursor(pix, 3, 20);
}
pix = BarIcon("aim-cursor");
@@ -1480,7 +1480,7 @@ void KIconEditGrid::createCursors()
{
mask = pix.createHeuristicMask();
pix.setMask(mask);
- cursor_aim = QCursor(pix, 10, 10);
+ cursor_aim = TQCursor(pix, 10, 10);
}
pix = BarIcon("airbrush-cursor");
@@ -1493,7 +1493,7 @@ void KIconEditGrid::createCursors()
{
mask = pix.createHeuristicMask(true);
pix.setMask(mask);
- cursor_spray = QCursor(pix, 0, 20);
+ cursor_spray = TQCursor(pix, 0, 20);
}
pix = BarIcon("eraser-cursor");
@@ -1506,7 +1506,7 @@ void KIconEditGrid::createCursors()
{
mask = pix.createHeuristicMask(true);
pix.setMask(mask);
- cursor_erase = QCursor(pix, 1, 16);
+ cursor_erase = TQCursor(pix, 1, 16);
}
}
@@ -1580,7 +1580,7 @@ void KIconEditGrid::drawFlood(int x, int y, uint oldcolor)
}
-void KIconEditGrid::drawSpray(QPoint point)
+void KIconEditGrid::drawSpray(TQPoint point)
{
int x = (point.x()-5);
int y = (point.y()-5);
@@ -1600,11 +1600,11 @@ void KIconEditGrid::drawSpray(QPoint point)
}
-//This routine is from Qt sources -- it's the branch of QPointArray::makeEllipse( int x, int y, int w, int h ) that's not normally compiled
+//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(QPointArray& ar, int x, int y, int w, int h )
+static void QPA_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 ) {
@@ -1687,7 +1687,7 @@ void KIconEditGrid::drawEllipse(bool drawit)
return;
}
- QPointArray a(pntarray.copy());
+ TQPointArray a(pntarray.copy());
int x = start.x(), y = start.y(), cx, cy;
if(x > end.x())
@@ -1754,7 +1754,7 @@ void KIconEditGrid::drawRect(bool drawit)
return;
}
- QPointArray a(pntarray.copy());
+ TQPointArray a(pntarray.copy());
int x = start.x(), y = start.y(), cx, cy;
if(x > end.x())
@@ -1816,7 +1816,7 @@ void KIconEditGrid::drawLine(bool drawit, bool drawStraight)
return;
}
- QPointArray a(pntarray.copy());
+ TQPointArray a(pntarray.copy());
pntarray.resize(0);
// remove previous marking
@@ -1886,9 +1886,9 @@ void KIconEditGrid::drawLine(bool drawit, bool drawStraight)
}
-void KIconEditGrid::drawPointArray(QPointArray a, DrawAction action)
+void KIconEditGrid::drawPointArray(TQPointArray a, DrawAction action)
{
- QRect area( a.boundingRect().x()*cellSize()-1, a.boundingRect().y()*cellSize()-1,
+ TQRect area( a.boundingRect().x()*cellSize()-1, a.boundingRect().y()*cellSize()-1,
a.boundingRect().width()*cellSize()+1, a.boundingRect().height()*cellSize()+1 );
KMacroCommand* macro = 0;
@@ -1955,11 +1955,11 @@ void KIconEditGrid::drawPointArray(QPointArray a, DrawAction action)
void KIconEditGrid::updatePreviewPixmap()
{
p = *img;
- emit changed(QPixmap(p));
+ emit changed(TQPixmap(p));
}
-bool KIconEditGrid::isMarked(QPoint point)
+bool KIconEditGrid::isMarked(TQPoint point)
{
return isMarked(point.x(), point.y());
}
@@ -1983,7 +1983,7 @@ bool KIconEditGrid::isMarked(int x, int y)
// Fast diffuse dither to 3x3x3 color cube
// Based on Qt's image conversion functions
-static bool kdither_32_to_8( const QImage *src, QImage *dst )
+static bool kdither_32_to_8( const TQImage *src, TQImage *dst )
{
register QRgb *p;
uchar *b;
@@ -2063,7 +2063,7 @@ static bool kdither_32_to_8( const QImage *src, QImage *dst )
{
p = (QRgb *)src->scanLine(y);
b = dst->scanLine(y);
- int endian = (QImage::systemByteOrder() == QImage::BigEndian);
+ int endian = (TQImage::systemByteOrder() == TQImage::BigEndian);
int x;
uchar* q = src->scanLine(y);
uchar* q2 = src->scanLine(y+1 < src->height() ? y + 1 : 0);
@@ -2159,7 +2159,7 @@ static bool kdither_32_to_8( const QImage *src, QImage *dst )
// this doesn't work the way it should but the way KPixmap does.
void KIconEditGrid::mapToKDEPalette()
{
- QImage dest;
+ TQImage dest;
kdither_32_to_8(img, &dest);
*img = dest.convertDepth(32);
@@ -2187,7 +2187,7 @@ void KIconEditGrid::mapToKDEPalette()
#endif
*/
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
for(int y = 0; y < numRows(); y++)
{
uint *l = (uint*)img->scanLine(y);
@@ -2203,7 +2203,7 @@ void KIconEditGrid::mapToKDEPalette()
load(img);
setModified(true);
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
@@ -2227,7 +2227,7 @@ void KIconEditGrid::grayScale()
}
-void KIconEditGrid::clearImage(QImage *image)
+void KIconEditGrid::clearImage(TQImage *image)
{
if(image->depth() != 32)
{
@@ -2235,7 +2235,7 @@ void KIconEditGrid::clearImage(QImage *image)
}
else
{
- // QImage::fill() does not set the alpha channel so do it
+ // TQImage::fill() does not set the alpha channel so do it
// manually.
for(int y = 0; y < image->height(); y++)
{
diff --git a/kiconedit/kicongrid.h b/kiconedit/kicongrid.h
index 24730735..da61f3a1 100644
--- a/kiconedit/kicongrid.h
+++ b/kiconedit/kicongrid.h
@@ -21,11 +21,11 @@
#ifndef __KICONEDITGRID_H__
#define __KICONEDITGRID_H__
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qcursor.h>
-#include <qpointarray.h>
-#include <qframe.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqcursor.h>
+#include <tqpointarray.h>
+#include <tqframe.h>
#include <kcommand.h>
#include <klocale.h>
@@ -34,7 +34,7 @@
class KCommandHistory;
class KRuler;
class KIconEditGrid;
-class QScrollView;
+class TQScrollView;
enum Direction {
DirIn = 0, DirOut = 1,
@@ -44,7 +44,7 @@ enum Direction {
class DrawCommand : public KCommand {
public:
- DrawCommand( int xx, int yy, uint newcol, QImage* img, KIconEditGrid* g ) {
+ DrawCommand( int xx, int yy, uint newcol, TQImage* img, KIconEditGrid* g ) {
x = xx;
y = yy;
newcolor = newcol;
@@ -54,7 +54,7 @@ class DrawCommand : public KCommand {
void execute();
void unexecute();
- QString name() const {
+ TQString name() const {
return i18n("Drawed Something");
}
@@ -63,13 +63,13 @@ class DrawCommand : public KCommand {
int y;
uint newcolor;
uint oldcolor;
- QImage* image;
+ TQImage* image;
KIconEditGrid* grid;
};
class RepaintCommand : public KCommand {
public:
- RepaintCommand( QRect a, KIconEditGrid* g ) {
+ RepaintCommand( TQRect a, KIconEditGrid* g ) {
area = a;
grid = g;
}
@@ -79,28 +79,28 @@ class RepaintCommand : public KCommand {
execute();
}
- QString name() const {
+ TQString name() const {
return "repainted";
}
protected:
KIconEditGrid* grid;
- QRect area;
+ TQRect area;
};
class KGridView : public QFrame
{
Q_OBJECT
public:
- KGridView( QImage *image, KCommandHistory* history, QWidget * parent = 0, const char *name = 0);
+ KGridView( TQImage *image, KCommandHistory* history, TQWidget * parent = 0, const char *name = 0);
KRuler *hruler() { return _hruler;}
KRuler *vruler() { return _vruler;}
- QFrame *corner() { return _corner;}
+ TQFrame *corner() { return _corner;}
KIconEditGrid *grid() { return _grid; }
void setShowRulers(bool mode);
void setAcceptDrop(bool a);
- const QRect viewRect();
- QScrollView *viewPortWidget() { return viewport;}
+ const TQRect viewRect();
+ TQScrollView *viewPortWidget() { return viewport;}
public slots:
void sizeChange(int, int);
@@ -110,15 +110,15 @@ public slots:
void checkClipboard();
protected:
- virtual void paintEvent(QPaintEvent*);
- virtual void resizeEvent(QResizeEvent*);
+ virtual void paintEvent(TQPaintEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
void paintDropSite();
void setSizes();
- QFrame *_corner;
+ TQFrame *_corner;
KIconEditGrid *_grid;
KRuler *_hruler, *_vruler;
- QScrollView *viewport;
+ TQScrollView *viewport;
bool acceptdrop;
};
@@ -132,7 +132,7 @@ class KIconEditGrid : public KColorGrid
{
Q_OBJECT
public:
- KIconEditGrid( QImage *image, KCommandHistory* h, QWidget * parent = 0, const char *name = 0);
+ KIconEditGrid( TQImage *image, KCommandHistory* h, TQWidget * parent = 0, const char *name = 0);
virtual ~KIconEditGrid();
enum DrawTool { Line, Freehand, FloodFill, Spray, Rect, FilledRect, Circle,
@@ -142,14 +142,14 @@ public:
void setGrid(bool g) { KColorGrid::setGrid(g); emit needPainting(); }
bool isModified() { return modified; };
void setModified(bool m);
- const QPixmap &pixmap();
- const QImage &image() { return *img; }
- QImage clipboardImage(bool &ok);
- QImage getSelection(bool);
+ const TQPixmap &pixmap();
+ const TQImage &image() { return *img; }
+ TQImage clipboardImage(bool &ok);
+ TQImage getSelection(bool);
int rows() { return numRows(); };
int cols() { return numCols(); };
uint getColors( uint *_colors) { return colors(_colors); }
- bool isMarked(QPoint p);
+ bool isMarked(TQPoint p);
bool isMarked(int x, int y);
int scaling() { return cellSize(); }
void loadBlank( int w = 0, int h = 0);
@@ -170,29 +170,29 @@ public:
};
TransparencyDisplayType transparencyDisplayType() const { return m_transparencyDisplayType; }
- QColor checkerboardColor1() const { return m_checkerboardColor1; }
- QColor checkerboardColor2() const { return m_checkerboardColor2; }
+ TQColor checkerboardColor1() const { return m_checkerboardColor1; }
+ TQColor checkerboardColor2() const { return m_checkerboardColor2; }
CheckerboardSize checkerboardSize() const { return m_checkerboardSize; }
- QColor transparencySolidColor() const { return m_transparencySolidColor; }
+ TQColor transparencySolidColor() const { return m_transparencySolidColor; }
void setTransparencyDisplayType(TransparencyDisplayType t) { m_transparencyDisplayType = t; }
- void setCheckerboardColor1(const QColor& c) { m_checkerboardColor1 = c; }
- void setCheckerboardColor2(const QColor& c) { m_checkerboardColor2 = c; }
+ void setCheckerboardColor1(const TQColor& c) { m_checkerboardColor1 = c; }
+ void setCheckerboardColor2(const TQColor& c) { m_checkerboardColor2 = c; }
void setCheckerboardSize(CheckerboardSize size) { m_checkerboardSize = size; }
- void setTransparencySolidColor(const QColor& c) { m_transparencySolidColor = c; }
+ void setTransparencySolidColor(const TQColor& c) { m_transparencySolidColor = c; }
public slots:
- void load( QImage *);
+ void load( TQImage *);
void editCopy(bool cut = false);
void editPaste(bool paste = false);
void editPasteAsNew();
void editSelectAll();
void editClear();
- void getImage(QImage *image);
+ void getImage(TQImage *image);
//#if QT_VERSION <= 140
void editResize();
//#endif
- void setSize(const QSize s);
+ void setSize(const TQSize s);
void grayScale();
void mapToKDEPalette();
void setTool(DrawTool tool);
@@ -203,12 +203,12 @@ public slots:
signals:
void scalingchanged(int);
- void changed( const QPixmap & );
+ void changed( const TQPixmap & );
void sizechanged( int, int );
void poschanged( int, int );
void xposchanged( int );
void yposchanged( int );
- void newmessage(const QString &);
+ void newmessage(const TQString &);
void clipboarddata(bool);
void selecteddata(bool);
void needPainting();
@@ -220,39 +220,39 @@ protected slots:
void updatePreviewPixmap();
protected:
- virtual void paintEvent(QPaintEvent*);
- virtual void paintCell( QPainter*, int, int ) {}
- virtual void paintForeground(QPainter* p, QPaintEvent* e);
- virtual void mousePressEvent(QMouseEvent*);
- virtual void mouseReleaseEvent(QMouseEvent*);
- virtual void mouseMoveEvent(QMouseEvent*);
+ virtual void paintEvent(TQPaintEvent*);
+ virtual void paintCell( TQPainter*, int, int ) {}
+ virtual void paintForeground(TQPainter* p, TQPaintEvent* e);
+ virtual void mousePressEvent(TQMouseEvent*);
+ virtual void mouseReleaseEvent(TQMouseEvent*);
+ virtual void mouseMoveEvent(TQMouseEvent*);
void createCursors();
- void drawPointArray(QPointArray, DrawAction);
+ void drawPointArray(TQPointArray, DrawAction);
void drawEllipse(bool);
void drawLine(bool drawIt, bool drawStraight);
void drawRect(bool);
- void drawSpray(QPoint);
+ void drawSpray(TQPoint);
void drawFlood(int x, int y, uint oldcolor);
- static void clearImage(QImage *image);
+ static void clearImage(TQImage *image);
uint currentcolor;
- QPoint start, end;
- QRect insrect;
- QSize cbsize;
- QImage *img;
- QPixmap p;
+ TQPoint start, end;
+ TQRect insrect;
+ TQSize cbsize;
+ TQImage *img;
+ TQPixmap p;
int selected, tool; //, numrows, numcols;
bool modified, btndown, ispasting, isselecting;
- QPointArray pntarray;
+ TQPointArray pntarray;
KColorArray iconcolors;
KCommandHistory* history;
KMacroCommand* m_command;
- QCursor cursor_normal, cursor_aim, cursor_flood, cursor_spray, cursor_erase, cursor_paint, cursor_colorpicker;
+ TQCursor cursor_normal, cursor_aim, cursor_flood, cursor_spray, cursor_erase, cursor_paint, cursor_colorpicker;
TransparencyDisplayType m_transparencyDisplayType;
- QColor m_checkerboardColor1;
- QColor m_checkerboardColor2;
+ TQColor m_checkerboardColor1;
+ TQColor m_checkerboardColor2;
CheckerboardSize m_checkerboardSize;
- QColor m_transparencySolidColor;
+ TQColor m_transparencySolidColor;
};
diff --git a/kiconedit/knew.cpp b/kiconedit/knew.cpp
index 214952b0..77f7ee99 100644
--- a/kiconedit/knew.cpp
+++ b/kiconedit/knew.cpp
@@ -18,11 +18,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
#include <kconfig.h>
#include <klocale.h>
@@ -74,8 +74,8 @@ void KIconTemplateContainer::save()
KConfig *k = kapp->config();
k->setGroup("Templates");
- QStringList names;
- for (QValueListIterator<KIconTemplate> iter = begin(); iter != end(); iter++)
+ TQStringList names;
+ for (TQValueListIterator<KIconTemplate> iter = begin(); iter != end(); iter++)
{
names.append((*iter).title);
}
@@ -88,9 +88,9 @@ void KIconTemplateContainer::save()
}
}
-KIconTemplateContainer::KIconTemplateContainer() : QValueList<KIconTemplate>()
+KIconTemplateContainer::KIconTemplateContainer() : TQValueList<KIconTemplate>()
{
- QStrList names;
+ TQStrList names;
KConfig *k = kapp->config();
k->setGroup("Templates");
k->readListEntry("Names", names);
@@ -115,7 +115,7 @@ KIconTemplateContainer::~KIconTemplateContainer()
}
KIconListBoxItem::KIconListBoxItem( KIconTemplate t )
- : QListBoxItem(), icontemplate(t)
+ : TQListBoxItem(), icontemplate(t)
{
//kdDebug(4640) << "KIconListBoxItem - " << t->path.data() << ", " << t->title.data() << endl;
@@ -131,10 +131,10 @@ void KIconListBoxItem::reloadIcon()
-void KIconListBoxItem::paint( QPainter *p )
+void KIconListBoxItem::paint( TQPainter *p )
{
p->drawPixmap( 3, 0, pm );
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
int yPos; // vertical text position
if ( pm.height() < fm.height() )
yPos = fm.ascent() + fm.leading()/2;
@@ -143,33 +143,33 @@ void KIconListBoxItem::paint( QPainter *p )
p->drawText( pm.width() + 5, yPos, text() );
}
-int KIconListBoxItem::height(const QListBox *lb ) const
+int KIconListBoxItem::height(const TQListBox *lb ) const
{
return QMAX( pm.height(), lb->fontMetrics().lineSpacing() + 1 );
}
-int KIconListBoxItem::width(const QListBox *lb ) const
+int KIconListBoxItem::width(const TQListBox *lb ) const
{
return pm.width() + lb->fontMetrics().width( text() ) + 6;
}
-NewSelect::NewSelect(QWidget *parent) : QWidget( parent )
+NewSelect::NewSelect(TQWidget *parent) : TQWidget( parent )
{
wiz = (KWizard*) parent;
- grp = new QButtonGroup( this );
- connect( grp, SIGNAL( clicked( int ) ), SLOT( buttonClicked( int ) ) );
+ grp = new TQButtonGroup( this );
+ connect( grp, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( buttonClicked( int ) ) );
grp->setExclusive( true );
- QVBoxLayout* ml = new QVBoxLayout( this );
+ TQVBoxLayout* ml = new TQVBoxLayout( this );
ml->addWidget( grp, 1 );
//ml->addWidget(grp, 10, AlignLeft);
- QVBoxLayout* l = new QVBoxLayout( grp, 10 );
+ TQVBoxLayout* l = new TQVBoxLayout( grp, 10 );
- rbscratch = new QRadioButton( i18n( "Create from scratch" ), grp );
+ rbscratch = new TQRadioButton( i18n( "Create from scratch" ), grp );
l->addWidget( rbscratch, 1 );
//l->addWidget(rbscratch, 5, AlignLeft);
- rbtempl = new QRadioButton( i18n( "Create from template" ), grp );
+ rbtempl = new TQRadioButton( i18n( "Create from template" ), grp );
l->addWidget( rbtempl, 1 );
//l->addWidget(rbtempl, 5, AlignLeft);
@@ -189,21 +189,21 @@ void NewSelect::buttonClicked(int id)
emit iconopenstyle(id);
}
-NewFromTemplate::NewFromTemplate( QWidget* parent )
- : QWidget( parent )
+NewFromTemplate::NewFromTemplate( TQWidget* parent )
+ : TQWidget( parent )
{
wiz = (KWizard*) parent;
- QVBoxLayout* ml = new QVBoxLayout(this);
+ TQVBoxLayout* ml = new TQVBoxLayout(this);
- grp = new QGroupBox( i18n( "Templates" ), this );
+ grp = new TQGroupBox( i18n( "Templates" ), this );
ml->addWidget( grp, 1 );
//ml->addWidget(grp, 10, AlignLeft);
- QHBoxLayout* l = new QHBoxLayout( grp, 15 );
+ TQHBoxLayout* l = new TQHBoxLayout( grp, 15 );
templates = new KIconListBox( grp );
- connect( templates, SIGNAL( highlighted( int ) ), SLOT( checkSelection( int ) ) );
+ connect( templates, TQT_SIGNAL( highlighted( int ) ), TQT_SLOT( checkSelection( int ) ) );
l->addWidget( templates );
for( int i = 0; i < (int) KIconTemplateContainer::self()->count(); i++ )
@@ -223,7 +223,7 @@ void NewFromTemplate::checkSelection( int )
wiz->finishButton()->setEnabled( false );
}
-KNewIcon::KNewIcon( QWidget* parent )
+KNewIcon::KNewIcon( TQWidget* parent )
: KWizard( parent, 0, true )
{
//kdDebug(4640) << "KNewIcon" << endl;
@@ -237,14 +237,14 @@ KNewIcon::KNewIcon( QWidget* parent )
nextButton()->setEnabled( false );
select = new NewSelect( this );
- connect( select, SIGNAL( iconopenstyle( int ) ), SLOT( iconOpenStyle( int ) ) );
+ connect( select, TQT_SIGNAL( iconopenstyle( int ) ), TQT_SLOT( iconOpenStyle( int ) ) );
- scratch = new KResizeWidget( this, 0, QSize( 32, 32 ) );
+ scratch = new KResizeWidget( this, 0, TQSize( 32, 32 ) );
// this doesn't accept default valid size, besides spin buttons won't allow
// an invalid size to be set by the user - forces user to change valid default
// size to create the new icon object -
- connect( scratch, SIGNAL( validSize( bool ) ), SLOT( checkPage( bool ) ) );
- connect(this, SIGNAL(selected(const QString &)), this, SLOT(checkPage(const QString &)));
+ connect( scratch, TQT_SIGNAL( validSize( bool ) ), TQT_SLOT( checkPage( bool ) ) );
+ connect(this, TQT_SIGNAL(selected(const TQString &)), this, TQT_SLOT(checkPage(const TQString &)));
templ = new NewFromTemplate(this);
templ->hide();
@@ -311,7 +311,7 @@ void KNewIcon::checkPage( bool b)
templ->checkSelection(0);
}
-void KNewIcon::checkPage(const QString &)
+void KNewIcon::checkPage(const TQString &)
{
if(currentPage() == select || openstyle == Blank)
finishButton()->setEnabled(true);
diff --git a/kiconedit/knew.h b/kiconedit/knew.h
index 8801faf7..a2d5dc7e 100644
--- a/kiconedit/knew.h
+++ b/kiconedit/knew.h
@@ -21,10 +21,10 @@
#ifndef __KNEWICON_H__
#define __KNEWICON_H__
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qlistbox.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqlistbox.h>
#include <kwizard.h>
@@ -32,46 +32,46 @@
class KIconListBox;
class KIconTemplateContainer;
-class QButtonGroup;
-class QRadioButton;
-class QGroupBox;
+class TQButtonGroup;
+class TQRadioButton;
+class TQGroupBox;
struct KIconTemplate
{
- QString path;
- QString title;
+ TQString path;
+ TQString title;
};
-class KIconListBoxItem : public QListBoxItem
+class KIconListBoxItem : public TQListBoxItem
{
public:
KIconListBoxItem( KIconTemplate );
- const QString path() { return icontemplate.path; }
+ const TQString path() { return icontemplate.path; }
KIconTemplate& iconTemplate() { return icontemplate; }
void reloadIcon();
protected:
- virtual void paint( QPainter * );
- virtual int height( const QListBox * ) const;
- virtual int width( const QListBox * ) const;
+ virtual void paint( TQPainter * );
+ virtual int height( const TQListBox * ) const;
+ virtual int width( const TQListBox * ) const;
private:
- QPixmap pm;
+ TQPixmap pm;
KIconTemplate icontemplate;
};
-class KIconListBox : public QListBox
+class KIconListBox : public TQListBox
{
Q_OBJECT
public:
- KIconListBox( QWidget *parent ) : QListBox(parent) {} ;
- const QString path(int idx) { return ((KIconListBoxItem*)item(idx))->path(); }
+ KIconListBox( TQWidget *parent ) : TQListBox(parent) {} ;
+ const TQString path(int idx) { return ((KIconListBoxItem*)item(idx))->path(); }
KIconTemplate& iconTemplate(int idx) { return ((KIconListBoxItem*)item(idx))->iconTemplate(); }
};
-class KIconTemplateContainer : public QValueList<KIconTemplate>
+class KIconTemplateContainer : public TQValueList<KIconTemplate>
{
public:
static KIconTemplateContainer* self()
@@ -97,7 +97,7 @@ class NewSelect : public QWidget
{
Q_OBJECT
public:
- NewSelect(QWidget *parent);
+ NewSelect(TQWidget *parent);
~NewSelect();
signals:
@@ -108,18 +108,18 @@ protected slots:
protected:
KWizard *wiz;
- QButtonGroup *grp;
- QRadioButton *rbscratch, *rbtempl;
+ TQButtonGroup *grp;
+ TQRadioButton *rbscratch, *rbtempl;
};
class NewFromTemplate : public QWidget
{
Q_OBJECT
public:
- NewFromTemplate(QWidget *parent);
+ NewFromTemplate(TQWidget *parent);
~NewFromTemplate();
- const QString path() { return QString(templates->path(templates->currentItem())); }
+ const TQString path() { return TQString(templates->path(templates->currentItem())); }
public slots:
void checkSelection(int);
@@ -127,37 +127,37 @@ public slots:
protected:
KIconListBox *templates;
KWizard *wiz;
- QGroupBox *grp;
+ TQGroupBox *grp;
};
class KNewIcon : public KWizard
{
Q_OBJECT
public:
- KNewIcon(QWidget *parent);
+ KNewIcon(TQWidget *parent);
~KNewIcon();
enum { Blank = 0, Template = 1};
int openStyle() { return openstyle; }
- const QString templatePath() { return QString(templ->path()); }
- const QSize templateSize() { return scratch->getSize(); }
+ const TQString templatePath() { return TQString(templ->path()); }
+ const TQSize templateSize() { return scratch->getSize(); }
protected slots:
void okClicked();
void cancelClicked();
void iconOpenStyle(int);
void checkPage(bool);
- void checkPage(const QString &);
+ void checkPage(const TQString &);
signals:
- void newicon(const QSize);
- void newicon(const QString);
+ void newicon(const TQSize);
+ void newicon(const TQString);
protected:
NewSelect *select;
KResizeWidget *scratch;
NewFromTemplate *templ;
- QWidget *act;
+ TQWidget *act;
int openstyle;
};
diff --git a/kiconedit/kresize.cpp b/kiconedit/kresize.cpp
index 82a86ee3..b2af86b6 100644
--- a/kiconedit/kresize.cpp
+++ b/kiconedit/kresize.cpp
@@ -19,31 +19,31 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
#include <klocale.h>
#include <knuminput.h>
#include "kresize.h"
-KResizeWidget::KResizeWidget( QWidget* parent, const char* name,
- const QSize& size ) : QWidget( parent, name )
+KResizeWidget::KResizeWidget( TQWidget* parent, const char* name,
+ const TQSize& size ) : TQWidget( parent, name )
{
- QHBoxLayout* genLayout = new QHBoxLayout( this );
+ TQHBoxLayout* genLayout = new TQHBoxLayout( this );
- QGroupBox* group = new QGroupBox( i18n( "Size" ), this );
+ TQGroupBox* group = new TQGroupBox( i18n( "Size" ), this );
group->setColumnLayout( 0, Qt::Horizontal );
genLayout->addWidget( group );
- QHBoxLayout* layout = new QHBoxLayout( group->layout(), 6 );
+ TQHBoxLayout* layout = new TQHBoxLayout( group->layout(), 6 );
m_width = new KIntSpinBox( 1, 200, 1, 1, 10, group );
m_width->setValue( size.width() );
layout->addWidget( m_width, 1 );
- QLabel* label = new QLabel( "X", group );
+ TQLabel* label = new TQLabel( "X", group );
layout->addWidget( label );
m_height = new KIntSpinBox( 1, 200, 1, 1, 10, group);
@@ -57,13 +57,13 @@ KResizeWidget::~KResizeWidget()
{
}
-const QSize KResizeWidget::getSize()
+const TQSize KResizeWidget::getSize()
{
- return QSize( m_width->value(), m_height->value() );
+ return TQSize( m_width->value(), m_height->value() );
}
-KResizeDialog::KResizeDialog( QWidget* parent, const char* name,
- const QSize size )
+KResizeDialog::KResizeDialog( TQWidget* parent, const char* name,
+ const TQSize size )
: KDialogBase( parent, name, true, i18n( "Select Size" ), Ok|Cancel )
{
m_resize = new KResizeWidget( this, "resize widget", size );
@@ -75,7 +75,7 @@ KResizeDialog::~KResizeDialog()
{
}
-const QSize KResizeDialog::getSize()
+const TQSize KResizeDialog::getSize()
{
return m_resize->getSize();
}
diff --git a/kiconedit/kresize.h b/kiconedit/kresize.h
index 691a4bd9..d3256232 100644
--- a/kiconedit/kresize.h
+++ b/kiconedit/kresize.h
@@ -32,10 +32,10 @@ class KResizeWidget : public QWidget
public:
- KResizeWidget( QWidget* parent, const char* name, const QSize& );
+ KResizeWidget( TQWidget* parent, const char* name, const TQSize& );
~KResizeWidget();
- const QSize getSize();
+ const TQSize getSize();
private:
@@ -49,10 +49,10 @@ class KResizeDialog : public KDialogBase
public:
- KResizeDialog( QWidget* parent, const char* name, const QSize s );
+ KResizeDialog( TQWidget* parent, const char* name, const TQSize s );
~KResizeDialog();
- const QSize getSize();
+ const TQSize getSize();
private:
diff --git a/kiconedit/palettetoolbar.cpp b/kiconedit/palettetoolbar.cpp
index 207442e1..07fa30b1 100644
--- a/kiconedit/palettetoolbar.cpp
+++ b/kiconedit/palettetoolbar.cpp
@@ -19,10 +19,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qpainter.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kdebug.h>
@@ -30,56 +30,56 @@
#include "kiconcolors.h"
#include "palettetoolbar.h"
-PaletteToolBar::PaletteToolBar( QWidget *parent, const char *name )
+PaletteToolBar::PaletteToolBar( TQWidget *parent, const char *name )
: KToolBar( parent, name )
{
- QWidget *base = new QWidget( this );
+ TQWidget *base = new TQWidget( this );
- QBoxLayout::Direction d = orientation() == Qt::Horizontal?
- QBoxLayout::LeftToRight : QBoxLayout::TopToBottom;
- m_layout = new QBoxLayout( base, d, 2, 6 );
+ TQBoxLayout::Direction d = orientation() == Qt::Horizontal?
+ TQBoxLayout::LeftToRight : TQBoxLayout::TopToBottom;
+ m_layout = new TQBoxLayout( base, d, 2, 6 );
- m_lblPreview = new QLabel( base );
- m_lblPreview->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ m_lblPreview = new TQLabel( base );
+ m_lblPreview->setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
m_lblPreview->setFixedHeight( 64 );
m_lblPreview->setAlignment( Qt::AlignHCenter|Qt::AlignVCenter );
- QWhatsThis::add(m_lblPreview, i18n( "Preview\n\nThis is a 1:1 preview"
+ TQWhatsThis::add(m_lblPreview, i18n( "Preview\n\nThis is a 1:1 preview"
" of the current icon" ) );
m_layout->addWidget( m_lblPreview );
- m_currentColorView = new QLabel( base );
- m_currentColorView->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ m_currentColorView = new TQLabel( base );
+ m_currentColorView->setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
m_currentColorView->setFixedHeight( 24 );
m_currentColorView->setAlignment( Qt::AlignHCenter|Qt::AlignVCenter );
- QWhatsThis::add(m_currentColorView, i18n( "Current color\n\nThis is the currently selected color" ) );
+ TQWhatsThis::add(m_currentColorView, i18n( "Current color\n\nThis is the currently selected color" ) );
m_layout->addWidget( m_currentColorView );
- QVBoxLayout *vlayout = new QVBoxLayout( m_layout, 0 );
- QLabel *l = new QLabel( i18n( "System colors:" ), base );
+ TQVBoxLayout *vlayout = new TQVBoxLayout( m_layout, 0 );
+ TQLabel *l = new TQLabel( i18n( "System colors:" ), base );
vlayout->addWidget( l );
m_sysColors = new KSysColors( base );
- QWhatsThis::add(m_sysColors, i18n( "System colors\n\nHere you can select"
+ TQWhatsThis::add(m_sysColors, i18n( "System colors\n\nHere you can select"
" colors from the KDE icon palette" ) );
vlayout->addWidget( m_sysColors );
- connect( m_sysColors, SIGNAL( newColor(uint) ),
- SIGNAL( newColor(uint) ) );
+ connect( m_sysColors, TQT_SIGNAL( newColor(uint) ),
+ TQT_SIGNAL( newColor(uint) ) );
- vlayout = new QVBoxLayout( m_layout, 0 );
- l = new QLabel( i18n( "Custom colors:" ), base );
+ vlayout = new TQVBoxLayout( m_layout, 0 );
+ l = new TQLabel( i18n( "Custom colors:" ), base );
vlayout->addWidget( l );
m_customColors = new KCustomColors( base );
- QWhatsThis::add(m_customColors, i18n( "Custom colors\n\nHere you can"
+ 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 );
- connect( m_customColors, SIGNAL( newColor(uint) ),
- SIGNAL( newColor(uint) ) );
- connect( this, SIGNAL( newColor(uint)),
- this, SLOT(currentColorChanged(uint)));
+ connect( m_customColors, TQT_SIGNAL( newColor(uint) ),
+ TQT_SIGNAL( newColor(uint) ) );
+ connect( this, TQT_SIGNAL( newColor(uint)),
+ this, TQT_SLOT(currentColorChanged(uint)));
currentColorChanged(OPAQUE_MASK|0);
setEnableContextMenu( false );
@@ -91,14 +91,14 @@ void PaletteToolBar::setOrientation( Orientation o )
if( barPos() == Floating )
o = o == Qt::Vertical ? Qt::Horizontal : Qt::Vertical;
- QBoxLayout::Direction d = o == Qt::Horizontal? QBoxLayout::LeftToRight
- : QBoxLayout::TopToBottom;
+ TQBoxLayout::Direction d = o == Qt::Horizontal? TQBoxLayout::LeftToRight
+ : TQBoxLayout::TopToBottom;
m_layout->setDirection( d );
- QDockWindow::setOrientation( o );
+ TQDockWindow::setOrientation( o );
}
-void PaletteToolBar::previewChanged( const QPixmap &p )
+void PaletteToolBar::previewChanged( const TQPixmap &p )
{
m_lblPreview->setPixmap( p );
}
@@ -116,12 +116,12 @@ void PaletteToolBar::addColor( uint color )
m_customColors->addColor( color );
}
-void PaletteToolBar::setPreviewBackground( QPixmap pixmap )
+void PaletteToolBar::setPreviewBackground( TQPixmap pixmap )
{
m_lblPreview->setBackgroundPixmap(pixmap);
}
-void PaletteToolBar::setPreviewBackground( const QColor& colour )
+void PaletteToolBar::setPreviewBackground( const TQColor& colour )
{
m_lblPreview->setBackgroundColor(colour);
}
@@ -139,8 +139,8 @@ void PaletteToolBar::currentColorChanged(uint color)
const uint lightColour = qRgb(255, 255, 255);
const uint darkColour = qRgb(127, 127, 127);
- QPixmap pm(2 * squareWidth, 2 * squareWidth);
- QPainter p(&pm);
+ TQPixmap pm(2 * squareWidth, 2 * squareWidth);
+ TQPainter p(&pm);
double alpha = qAlpha(color) / 255.0;
diff --git a/kiconedit/palettetoolbar.h b/kiconedit/palettetoolbar.h
index 83cb3960..1fede533 100644
--- a/kiconedit/palettetoolbar.h
+++ b/kiconedit/palettetoolbar.h
@@ -24,8 +24,8 @@
#include <ktoolbar.h>
-class QBoxLayout;
-class QLabel;
+class TQBoxLayout;
+class TQLabel;
class KSysColors;
class KCustomColors;
@@ -34,24 +34,24 @@ class PaletteToolBar : public KToolBar
Q_OBJECT
public:
- PaletteToolBar( QWidget *parent, const char *name = 0L );
+ PaletteToolBar( TQWidget *parent, const char *name = 0L );
signals:
void newColor( uint c );
public slots:
virtual void setOrientation( Orientation o );
- void previewChanged( const QPixmap &p );
+ void previewChanged( const TQPixmap &p );
void addColors( uint n, uint *c );
void addColor( uint color );
- void setPreviewBackground( QPixmap pixmap );
- void setPreviewBackground( const QColor& colour );
+ void setPreviewBackground( TQPixmap pixmap );
+ void setPreviewBackground( const TQColor& colour );
void currentColorChanged(uint color);
private:
- QBoxLayout *m_layout;
- QLabel *m_lblPreview;
- QLabel *m_currentColorView;
+ TQBoxLayout *m_layout;
+ TQLabel *m_lblPreview;
+ TQLabel *m_currentColorView;
KSysColors *m_sysColors;
KCustomColors *m_customColors;
};
diff --git a/kiconedit/properties.cpp b/kiconedit/properties.cpp
index 0f2c1f44..f2ff221a 100644
--- a/kiconedit/properties.cpp
+++ b/kiconedit/properties.cpp
@@ -33,13 +33,13 @@ KIconEditProperties* KIconEditProperties::self()
return m_self;
}
-KIconEditProperties::KIconEditProperties() : QObject()
+KIconEditProperties::KIconEditProperties() : TQObject()
{
KConfig *config = kapp->config();
config->setGroup( "Appearance" );
- m_bgMode = (QWidget::BackgroundMode)config->readNumEntry( "BackgroundMode", QWidget::FixedPixmap);
+ m_bgMode = (TQWidget::BackgroundMode)config->readNumEntry( "BackgroundMode", TQWidget::FixedPixmap);
m_bgColor = config->readColorEntry( "BackgroundColor", &gray);
m_bgPixmap = config->readPathEntry("BackgroundPixmap");
@@ -58,13 +58,13 @@ KIconEditProperties::KIconEditProperties() : QObject()
m_transparencyDisplayType = KIconEditGrid::TRD_SOLIDCOLOR;
}
- QColor checkColor1(255, 255, 255);
- QColor checkColor2(127, 127, 127);
+ TQColor checkColor1(255, 255, 255);
+ TQColor checkColor2(127, 127, 127);
m_checkerboardColor1 = config->readColorEntry( "CheckerboardColor1", &checkColor1);
m_checkerboardColor2 = config->readColorEntry( "CheckerboardColor2", &checkColor2);
- QString checkerboardSize = config->readEntry( "CheckerboardSize", "Medium" );
+ TQString checkerboardSize = config->readEntry( "CheckerboardSize", "Medium" );
if(checkerboardSize == "Small")
{
@@ -80,7 +80,7 @@ KIconEditProperties::KIconEditProperties() : QObject()
m_checkerboardSize = KIconEditGrid::CHK_LARGE;
}
- QColor solidColor(255, 255, 255);
+ TQColor solidColor(255, 255, 255);
m_transparencySolidColor = config->readColorEntry( "TransparencySolidColor", &solidColor);
}
@@ -106,7 +106,7 @@ void KIconEditProperties::save()
config->writeEntry("GridScaling", m_gridScale );
config->writeEntry("ShowRulers", m_showRulers );
- QString transparencyDisplayType;
+ TQString transparencyDisplayType;
switch(m_transparencyDisplayType)
{
@@ -123,7 +123,7 @@ void KIconEditProperties::save()
config->writeEntry( "CheckerboardColor1", m_checkerboardColor1 );
config->writeEntry( "CheckerboardColor2", m_checkerboardColor2 );
- QString checkerboardSize;
+ TQString checkerboardSize;
switch(m_checkerboardSize)
{
diff --git a/kiconedit/properties.h b/kiconedit/properties.h
index e94f6d2c..7e97b9b4 100644
--- a/kiconedit/properties.h
+++ b/kiconedit/properties.h
@@ -22,7 +22,7 @@
#ifndef __PROPS_H__
#define __PROPS_H__
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kicongrid.h"
@@ -32,49 +32,49 @@ public:
static KIconEditProperties* self();
~KIconEditProperties();
- QString bgPixmap() { return m_bgPixmap; }
- QColor bgColor() { return m_bgColor; }
- QWidget::BackgroundMode bgMode() { return m_bgMode; }
+ TQString bgPixmap() { return m_bgPixmap; }
+ TQColor bgColor() { return m_bgColor; }
+ TQWidget::BackgroundMode bgMode() { return m_bgMode; }
bool showGrid() { return m_showGrid; }
bool pasteTransparent() { return m_pasteTransparent; }
bool showRulers() { return m_showRulers; }
int gridScale() { return m_gridScale; }
KIconEditGrid::TransparencyDisplayType transparencyDisplayType() const { return m_transparencyDisplayType; }
- QColor checkerboardColor1() const { return m_checkerboardColor1; }
- QColor checkerboardColor2() const { return m_checkerboardColor2; }
+ TQColor checkerboardColor1() const { return m_checkerboardColor1; }
+ TQColor checkerboardColor2() const { return m_checkerboardColor2; }
KIconEditGrid::CheckerboardSize checkerboardSize() const { return m_checkerboardSize; }
- QColor transparencySolidColor() const { return m_transparencySolidColor; }
+ TQColor transparencySolidColor() const { return m_transparencySolidColor; }
- void setBgPixmap( const QString &p ) { m_bgPixmap = p; }
- void setBgColor( const QColor &c ) { m_bgColor = c; }
- void setBgMode( QWidget::BackgroundMode m ) { m_bgMode = m; }
+ void setBgPixmap( const TQString &p ) { m_bgPixmap = p; }
+ void setBgColor( const TQColor &c ) { m_bgColor = c; }
+ void setBgMode( TQWidget::BackgroundMode m ) { m_bgMode = m; }
void setShowGrid( bool b ) { m_showGrid = b; }
void setPasteTransparent( bool b ) { m_pasteTransparent = b; }
void setShowRulers( bool b ) { m_showRulers = b; }
void setGridScale( int s ) { m_gridScale = s; }
void setTransparencyDisplayType(KIconEditGrid::TransparencyDisplayType t) { m_transparencyDisplayType = t; }
- void setCheckerboardColor1(const QColor& c) { m_checkerboardColor1 = c; }
- void setCheckerboardColor2(const QColor& c) { m_checkerboardColor2 = c; }
+ void setCheckerboardColor1(const TQColor& c) { m_checkerboardColor1 = c; }
+ void setCheckerboardColor2(const TQColor& c) { m_checkerboardColor2 = c; }
void setCheckerboardSize(KIconEditGrid::CheckerboardSize size) { m_checkerboardSize = size; }
- void setTransparencySolidColor(const QColor& c) { m_transparencySolidColor = c; }
+ void setTransparencySolidColor(const TQColor& c) { m_transparencySolidColor = c; }
void save();
protected:
KIconEditProperties();
- QString m_bgPixmap;
- QColor m_bgColor;
- QWidget::BackgroundMode m_bgMode;
+ TQString m_bgPixmap;
+ TQColor m_bgColor;
+ TQWidget::BackgroundMode m_bgMode;
bool m_showGrid;
bool m_pasteTransparent;
bool m_showRulers;
int m_gridScale;
KIconEditGrid::TransparencyDisplayType m_transparencyDisplayType;
- QColor m_checkerboardColor1;
- QColor m_checkerboardColor2;
+ TQColor m_checkerboardColor1;
+ TQColor m_checkerboardColor2;
KIconEditGrid::CheckerboardSize m_checkerboardSize;
- QColor m_transparencySolidColor;
+ TQColor m_transparencySolidColor;
static KIconEditProperties* m_self;
};
diff --git a/kiconedit/utils.cpp b/kiconedit/utils.cpp
index 1af52803..e5748ffe 100644
--- a/kiconedit/utils.cpp
+++ b/kiconedit/utils.cpp
@@ -47,17 +47,17 @@ void setupImageHandlers()
formats->append(new imageFormat("ICO", "Windows Icon File", "ico"));
/*
#ifdef HAVE_LIBJPEG
- QImageIO::defineIOHandler("JFIF","^\377\330\377\340", 0, read_jpeg_jfif, NULL);
+ TQImageIO::defineIOHandler("JFIF","^\377\330\377\340", 0, read_jpeg_jfif, NULL);
#endif
*/
}
// Simple copy operation on local files (isn't there something like this in the libs?)
-bool copyFile(const QString &src, const QString &dest)
+bool copyFile(const TQString &src, const TQString &dest)
{
- QFile f_src(src);
- QFile f_dest(dest);
- QFileInfo fi(f_src);
+ TQFile f_src(src);
+ TQFile f_dest(dest);
+ TQFileInfo fi(f_src);
uint src_size = fi.size();
kdDebug(4640) << "Size: " << src_size << endl;
@@ -96,11 +96,11 @@ bool copyFile(const QString &src, const QString &dest)
return false;
}
-bool removeFile(const QString &file)
+bool removeFile(const TQString &file)
{
- if(file.length() > 0 && QFile::exists(file))
+ if(file.length() > 0 && TQFile::exists(file))
{
- QDir d;
+ TQDir d;
kdDebug(4640) << "Removing " << file << endl;
if(!d.remove(file))
{
@@ -112,7 +112,7 @@ bool removeFile(const QString &file)
return false;
}
-bool moveFile(const QString &src, const QString &dest)
+bool moveFile(const TQString &src, const TQString &dest)
{
if(copyFile(src, dest))
return removeFile(src);
diff --git a/kiconedit/utils.h b/kiconedit/utils.h
index c1e1a4c0..5c3f19c0 100644
--- a/kiconedit/utils.h
+++ b/kiconedit/utils.h
@@ -22,15 +22,15 @@
#ifndef __UTILS_H__
#define __UTILS_H__
-#include <qimage.h>
+#include <tqimage.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
#include <kapplication.h>
#define OPAQUE_MASK 0xff000000
@@ -57,14 +57,14 @@ struct imageFormat
const char *extension;
};
-typedef QPtrList<struct imageFormat> imageFormats;
+typedef TQPtrList<struct imageFormat> imageFormats;
extern imageFormats *formats;
void setupImageHandlers();
-bool copyFile(const QString &src, const QString &dest);
-bool removeFile(const QString &file);
-bool moveFile(const QString &src, const QString &dest);
+bool copyFile(const TQString &src, const TQString &dest);
+bool removeFile(const TQString &file);
+bool moveFile(const TQString &src, const TQString &dest);
uint kdeColor(uint c);
#endif //__UTILS_H__
diff --git a/kmrml/kmrml/algorithmcombo.cpp b/kmrml/kmrml/algorithmcombo.cpp
index b22556df..a2db81d4 100644
--- a/kmrml/kmrml/algorithmcombo.cpp
+++ b/kmrml/kmrml/algorithmcombo.cpp
@@ -25,12 +25,12 @@ using namespace KMrml;
// ### copycat of CollectionCombo... moc can't handle templates unfortunately..
// could use base-class MrmlElement....
-AlgorithmCombo::AlgorithmCombo( QWidget *parent, const char *name )
+AlgorithmCombo::AlgorithmCombo( TQWidget *parent, const char *name )
: KComboBox( false, parent, name ),
m_algorithms( 0L )
{
- connect( this, SIGNAL( activated( const QString& ) ),
- SLOT( slotActivated( const QString& ) ));
+ connect( this, TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( slotActivated( const TQString& ) ));
}
AlgorithmCombo::~AlgorithmCombo()
@@ -57,7 +57,7 @@ Algorithm AlgorithmCombo::current() const
return m_algorithms->findByName( currentText() );
}
-void AlgorithmCombo::slotActivated( const QString& name )
+void AlgorithmCombo::slotActivated( const TQString& name )
{
Algorithm coll = m_algorithms->findByName( name );
emit selected( coll );
diff --git a/kmrml/kmrml/algorithmcombo.h b/kmrml/kmrml/algorithmcombo.h
index 3e151933..8138b47a 100644
--- a/kmrml/kmrml/algorithmcombo.h
+++ b/kmrml/kmrml/algorithmcombo.h
@@ -31,7 +31,7 @@ namespace KMrml
Q_OBJECT
public:
- AlgorithmCombo( QWidget *parent, const char *name = 0 );
+ AlgorithmCombo( TQWidget *parent, const char *name = 0 );
~AlgorithmCombo();
void setAlgorithms( const AlgorithmList * algorithms );
@@ -43,7 +43,7 @@ namespace KMrml
void selected( const Algorithm& );
private slots:
- void slotActivated( const QString& );
+ void slotActivated( const TQString& );
private:
const AlgorithmList *m_algorithms;
diff --git a/kmrml/kmrml/algorithmdialog.cpp b/kmrml/kmrml/algorithmdialog.cpp
index cb62fd84..bf3ed895 100644
--- a/kmrml/kmrml/algorithmdialog.cpp
+++ b/kmrml/kmrml/algorithmdialog.cpp
@@ -20,12 +20,12 @@
#include "algorithmcombo.h"
#include "collectioncombo.h"
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qscrollview.h>
-#include <qvbox.h>
-#include <qvgroupbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqscrollview.h>
+#include <tqvbox.h>
+#include <tqvgroupbox.h>
#include <klocale.h>
@@ -34,45 +34,45 @@ using namespace KMrml;
class ScrollView : public QScrollView
{
public:
- ScrollView(QWidget* parent = 0, const char* name = 0)
- : QScrollView(parent, name)
+ ScrollView(TQWidget* parent = 0, const char* name = 0)
+ : TQScrollView(parent, name)
{
- setFrameStyle(QFrame::NoFrame);
- m_frame = new QFrame(viewport(), "ScrollView::m_frame");
- m_frame->setFrameStyle(QFrame::NoFrame);
+ setFrameStyle(TQFrame::NoFrame);
+ m_frame = new TQFrame(viewport(), "ScrollView::m_frame");
+ m_frame->setFrameStyle(TQFrame::NoFrame);
addChild(m_frame, 0, 0);
};
- QFrame* frame() {return m_frame;};
+ TQFrame* frame() {return m_frame;};
protected:
- virtual void viewportResizeEvent(QResizeEvent* ev)
+ virtual void viewportResizeEvent(TQResizeEvent* ev)
{
- QScrollView::viewportResizeEvent(ev);
+ TQScrollView::viewportResizeEvent(ev);
m_frame->resize( kMax(m_frame->sizeHint().width(), ev->size().width()),
kMax(m_frame->sizeHint().height(), ev->size().height()));
};
private:
- QFrame* m_frame;
+ TQFrame* m_frame;
};
AlgorithmDialog::AlgorithmDialog( const AlgorithmList& algorithms,
const CollectionList& collections,
const Collection& currentColl,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( parent, name, false, i18n("Configure Query Algorithms"),
Ok | Cancel, Ok, false ),
m_allAlgorithms( algorithms ),
m_collections( collections )
{
- QWidget *box = makeMainWidget();
+ TQWidget *box = makeMainWidget();
- QVBoxLayout *mainLayout = new QVBoxLayout( box, 0, KDialog::spacingHint(),
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( box, 0, KDialog::spacingHint(),
"mainLayout");
- QHBoxLayout *collectionLayout = new QHBoxLayout( 0L, 0, 0, "coll layout");
- collectionLayout->addWidget( new QLabel( i18n("Collection: "), box ));
+ TQHBoxLayout *collectionLayout = new TQHBoxLayout( 0L, 0, 0, "coll layout");
+ collectionLayout->addWidget( new TQLabel( i18n("Collection: "), box ));
m_collectionCombo = new CollectionCombo( box, "collection combo" );
m_collectionCombo->setCollections( &m_collections );
@@ -81,26 +81,26 @@ AlgorithmDialog::AlgorithmDialog( const AlgorithmList& algorithms,
mainLayout->addLayout( collectionLayout );
mainLayout->addSpacing( 14 );
- QHBox *algoHLayout = new QHBox( box );
- (void) new QLabel( i18n("Algorithm: "), algoHLayout);
+ TQHBox *algoHLayout = new TQHBox( box );
+ (void) new TQLabel( i18n("Algorithm: "), algoHLayout);
m_algoCombo = new AlgorithmCombo( algoHLayout, "algo combo" );
- QVGroupBox *groupBox = new QVGroupBox( box, "groupBox" );
+ TQVGroupBox *groupBox = new TQVGroupBox( box, "groupBox" );
mainLayout->addWidget( groupBox );
algoHLayout->raise();
ScrollView *scrollView = new ScrollView( groupBox, "scroll view" );
m_view = scrollView->frame();
- QVBoxLayout *viewLayout = new QVBoxLayout( scrollView );
+ TQVBoxLayout *viewLayout = new TQVBoxLayout( scrollView );
viewLayout->setSpacing( KDialog::spacingHint() );
collectionChanged( currentColl );
- connect( m_algoCombo, SIGNAL( selected( const Algorithm& ) ),
- SLOT( initGUI( const Algorithm& ) ));
- connect( m_collectionCombo, SIGNAL( selected( const Collection& ) ),
- SLOT( collectionChanged( const Collection& ) ));
+ connect( m_algoCombo, TQT_SIGNAL( selected( const Algorithm& ) ),
+ TQT_SLOT( initGUI( const Algorithm& ) ));
+ connect( m_collectionCombo, TQT_SIGNAL( selected( const Collection& ) ),
+ TQT_SLOT( collectionChanged( const Collection& ) ));
algoHLayout->adjustSize();
mainLayout->activate();
diff --git a/kmrml/kmrml/algorithmdialog.h b/kmrml/kmrml/algorithmdialog.h
index 740a95bf..be119dbd 100644
--- a/kmrml/kmrml/algorithmdialog.h
+++ b/kmrml/kmrml/algorithmdialog.h
@@ -36,7 +36,7 @@ namespace KMrml
public:
AlgorithmDialog( const AlgorithmList&, const CollectionList&,
const Collection& currentColl,
- QWidget *parent = 0, const char *name = 0 );
+ TQWidget *parent = 0, const char *name = 0 );
~AlgorithmDialog();
private slots:
@@ -52,7 +52,7 @@ namespace KMrml
CollectionCombo *m_collectionCombo;
AlgorithmCombo *m_algoCombo;
- QFrame *m_view;
+ TQFrame *m_view;
};
}
diff --git a/kmrml/kmrml/browser.cpp b/kmrml/kmrml/browser.cpp
index f2453243..57ac0085 100644
--- a/kmrml/kmrml/browser.cpp
+++ b/kmrml/kmrml/browser.cpp
@@ -19,7 +19,7 @@
#include "browser.h"
#include "mrml_part.h"
-#include <qscrollview.h>
+#include <tqscrollview.h>
using namespace KMrml;
@@ -35,14 +35,14 @@ Browser::~Browser()
}
-void Browser::saveState( QDataStream& stream )
+void Browser::saveState( TQDataStream& stream )
{
// BrowserExtension::saveState( stream );
m_part->saveState( stream );
}
-void Browser::restoreState( QDataStream& stream )
+void Browser::restoreState( TQDataStream& stream )
{
// BrowserExtension::restoreState( stream );
// ### BrowserExtension::restoreState() calls openURL() at the end (arghh).
@@ -52,12 +52,12 @@ void Browser::restoreState( QDataStream& stream )
int Browser::xOffset()
{
- return static_cast<QScrollView*>( m_part->widget())->contentsX();
+ return static_cast<TQScrollView*>( m_part->widget())->contentsX();
}
int Browser::yOffset()
{
- return static_cast<QScrollView*>( m_part->widget())->contentsY();
+ return static_cast<TQScrollView*>( m_part->widget())->contentsY();
}
#include "browser.moc"
diff --git a/kmrml/kmrml/browser.h b/kmrml/kmrml/browser.h
index 11661ed5..71466160 100644
--- a/kmrml/kmrml/browser.h
+++ b/kmrml/kmrml/browser.h
@@ -33,8 +33,8 @@ namespace KMrml
Browser( MrmlPart *parent, const char *name );
~Browser();
- virtual void saveState( QDataStream& stream );
- virtual void restoreState( QDataStream& stream );
+ virtual void saveState( TQDataStream& stream );
+ virtual void restoreState( TQDataStream& stream );
virtual int xOffset();
virtual int yOffset();
diff --git a/kmrml/kmrml/collectioncombo.cpp b/kmrml/kmrml/collectioncombo.cpp
index b45d7ebf..7238305e 100644
--- a/kmrml/kmrml/collectioncombo.cpp
+++ b/kmrml/kmrml/collectioncombo.cpp
@@ -22,12 +22,12 @@
using namespace KMrml;
-CollectionCombo::CollectionCombo( QWidget *parent, const char *name )
+CollectionCombo::CollectionCombo( TQWidget *parent, const char *name )
: KComboBox( false, parent, name ),
m_collections( 0L )
{
- connect( this, SIGNAL( activated( const QString& ) ),
- SLOT( slotActivated( const QString& ) ));
+ connect( this, TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( slotActivated( const TQString& ) ));
}
CollectionCombo::~CollectionCombo()
@@ -54,13 +54,13 @@ Collection CollectionCombo::current() const
return m_collections->findByName( currentText() );
}
-void CollectionCombo::slotActivated( const QString& name )
+void CollectionCombo::slotActivated( const TQString& name )
{
Collection coll = m_collections->findByName( name );
emit selected( coll );
}
-QDataStream& KMrml::operator<<( QDataStream& stream,
+TQDataStream& KMrml::operator<<( TQDataStream& stream,
const CollectionCombo& combo )
{
int count = combo.count();
@@ -72,13 +72,13 @@ QDataStream& KMrml::operator<<( QDataStream& stream,
return stream;
}
-QDataStream& KMrml::operator>>( QDataStream& stream, CollectionCombo& combo )
+TQDataStream& KMrml::operator>>( TQDataStream& stream, CollectionCombo& combo )
{
combo.clear();
int count;
stream >> count;
- QString text;
+ TQString text;
for ( int i = 0; i < count; i++ )
{
stream >> text;
diff --git a/kmrml/kmrml/collectioncombo.h b/kmrml/kmrml/collectioncombo.h
index 3ca67a64..c39686a4 100644
--- a/kmrml/kmrml/collectioncombo.h
+++ b/kmrml/kmrml/collectioncombo.h
@@ -31,7 +31,7 @@ namespace KMrml
Q_OBJECT
public:
- CollectionCombo( QWidget *parent, const char *name = 0 );
+ CollectionCombo( TQWidget *parent, const char *name = 0 );
~CollectionCombo();
void setCollections( const CollectionList * collections );
@@ -43,14 +43,14 @@ namespace KMrml
void selected( const Collection& );
private slots:
- void slotActivated( const QString& );
+ void slotActivated( const TQString& );
private:
const CollectionList *m_collections;
};
- QDataStream& operator<<( QDataStream& stream, const CollectionCombo& );
- QDataStream& operator>>( QDataStream& stream, CollectionCombo& );
+ TQDataStream& operator<<( TQDataStream& stream, const CollectionCombo& );
+ TQDataStream& operator>>( TQDataStream& stream, CollectionCombo& );
}
diff --git a/kmrml/kmrml/kcontrol/indexcleaner.cpp b/kmrml/kmrml/kcontrol/indexcleaner.cpp
index 5f5eea93..56e606aa 100644
--- a/kmrml/kmrml/kcontrol/indexcleaner.cpp
+++ b/kmrml/kmrml/kcontrol/indexcleaner.cpp
@@ -13,10 +13,10 @@
using namespace KMrmlConfig;
-IndexCleaner::IndexCleaner( const QStringList& dirs,
+IndexCleaner::IndexCleaner( const TQStringList& dirs,
const KMrml::Config *config,
- QObject *parent, const char *name )
- : QObject( parent, name ),
+ TQObject *parent, const char *name )
+ : TQObject( parent, name ),
m_dirs( dirs ),
m_config( config ),
m_process( 0L )
@@ -66,19 +66,19 @@ void IndexCleaner::startNext()
m_process = new KProcess();
m_process->setUseShell( true );
#endif
- connect( m_process, SIGNAL( processExited( KProcess * )),
- SLOT( slotExited( KProcess * ) ));
+ connect( m_process, TQT_SIGNAL( processExited( KProcess * )),
+ TQT_SLOT( slotExited( KProcess * ) ));
- QString cmd = m_config->removeCollectionCommandLine();
+ TQString cmd = m_config->removeCollectionCommandLine();
- QString dir = m_dirs.first();
+ TQString dir = m_dirs.first();
m_dirs.pop_front();
int index = cmd.find( "%d" );
if ( index != -1 )
cmd.replace( index, 2, QUOTE( dir ) );
else // no %d? What else can we do?
- cmd.append( QString::fromLatin1(" ") + QUOTE( dir ) );
+ cmd.append( TQString::fromLatin1(" ") + QUOTE( dir ) );
*m_process << cmd;
diff --git a/kmrml/kmrml/kcontrol/indexcleaner.h b/kmrml/kmrml/kcontrol/indexcleaner.h
index 0ddcaac4..92dcdc22 100644
--- a/kmrml/kmrml/kcontrol/indexcleaner.h
+++ b/kmrml/kmrml/kcontrol/indexcleaner.h
@@ -8,8 +8,8 @@
#ifndef INDEXCLEANER_H
#define INDEXCLEANER_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
class KProcess;
@@ -25,8 +25,8 @@ namespace KMrmlConfig
Q_OBJECT
public:
- IndexCleaner( const QStringList& dirs, const KMrml::Config *config,
- QObject *parent = 0, const char *name = 0 );
+ IndexCleaner( const TQStringList& dirs, const KMrml::Config *config,
+ TQObject *parent = 0, const char *name = 0 );
~IndexCleaner();
void start();
@@ -42,7 +42,7 @@ namespace KMrmlConfig
int m_stepSize;
void startNext();
- QStringList m_dirs;
+ TQStringList m_dirs;
const KMrml::Config *m_config;
KProcess *m_process;
};
diff --git a/kmrml/kmrml/kcontrol/indexer.cpp b/kmrml/kmrml/kcontrol/indexer.cpp
index a3bb6b7d..f4c4b108 100644
--- a/kmrml/kmrml/kcontrol/indexer.cpp
+++ b/kmrml/kmrml/kcontrol/indexer.cpp
@@ -16,8 +16,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
@@ -36,8 +36,8 @@
using namespace KMrmlConfig;
Indexer::Indexer( const KMrml::Config* config,
- QObject *parent, const char *name )
- : QObject( parent, name ),
+ TQObject *parent, const char *name )
+ : TQObject( parent, name ),
m_config( config ),
m_dirCount( 0 )
{
@@ -46,10 +46,10 @@ Indexer::Indexer( const KMrml::Config* config,
m_process->setUseShell( true );
#endif
m_process->setEnvironment( "LC_ALL", "C" );
- connect( m_process, SIGNAL( processExited( KProcess * )),
- SLOT( processFinished( KProcess * )));
- connect( m_process, SIGNAL( readReady( KProcIO * )),
- SLOT( slotCanRead( KProcIO * )) );
+ connect( m_process, TQT_SIGNAL( processExited( KProcess * )),
+ TQT_SLOT( processFinished( KProcess * )));
+ connect( m_process, TQT_SIGNAL( readReady( KProcIO * )),
+ TQT_SLOT( slotCanRead( KProcIO * )) );
}
Indexer::~Indexer()
@@ -57,7 +57,7 @@ Indexer::~Indexer()
delete m_process;
}
-void Indexer::startIndexing( const QStringList& dirs )
+void Indexer::startIndexing( const TQStringList& dirs )
{
if ( m_process->isRunning() )
return;
@@ -91,11 +91,11 @@ void Indexer::processNext()
m_process->resetAll();
- QString cmd = m_config->addCollectionCommandLine().simplifyWhiteSpace().stripWhiteSpace();
+ TQString cmd = m_config->addCollectionCommandLine().simplifyWhiteSpace().stripWhiteSpace();
// in the commandline, replace %d with the directory to process and
// %t with the thumbnail dir
- int index = cmd.find( "%d" ); // ### QFile::encodeName()?
+ int index = cmd.find( "%d" ); // ### TQFile::encodeName()?
if ( index != -1 )
cmd.replace( index, 2, QUOTE( m_currentDir ) );
index = cmd.find( "%t" );
@@ -106,8 +106,8 @@ void Indexer::processNext()
#if KDE_VERSION >= 306
*m_process << cmd;
#else
- QStringList params = QStringList::split( ' ', cmd );
- QStringList::Iterator it = params.begin();
+ TQStringList params = TQStringList::split( ' ', cmd );
+ TQStringList::Iterator it = params.begin();
for ( ; it != params.end(); ++it )
*m_process << *it;
#endif
@@ -118,11 +118,11 @@ void Indexer::processNext()
void Indexer::slotCanRead( KProcIO *proc )
{
- static const QString& sprogress = KGlobal::staticQString("PROGRESS: ");
- static const QString& r1 = /* PROGRESS: 1 of 6 done (15%) */
+ static const TQString& sprogress = KGlobal::staticQString("PROGRESS: ");
+ static const TQString& r1 = /* PROGRESS: 1 of 6 done (15%) */
KGlobal::staticQString( "(\\d+) of (\\d+) done \\((\\d+)%\\)" );
- QString line;
+ TQString line;
int bytes = -1;
while ( (bytes = proc->readln( line )) != -1 )
{
@@ -146,13 +146,13 @@ void Indexer::slotCanRead( KProcIO *proc )
// case 1: image processing, below 99%
if ( line.at( line.length() -1 ) == ')' )
{
- QRegExp regxp( r1 );
+ TQRegExp regxp( r1 );
int pos = regxp.search( line );
if ( pos > -1 )
{
- QString currentFile = regxp.cap( 1 );
- QString numFiles = regxp.cap( 2 );
- QString percent = regxp.cap( 3 );
+ TQString currentFile = regxp.cap( 1 );
+ TQString numFiles = regxp.cap( 2 );
+ TQString percent = regxp.cap( 3 );
// qDebug( "current: %s, number: %s, percent: %s", currentFile.latin1(), numFiles.latin1(), percent.latin1());
bool ok = false;
@@ -160,7 +160,7 @@ void Indexer::slotCanRead( KProcIO *proc )
if ( ok )
{
uint dirsLeft = m_dirs.count();
- QString message = i18n( "<qt>Processing folder %1 of %2: <br><b>%3</b><br>File %4 of %5.</qt>").arg( m_dirCount - dirsLeft ).arg( m_dirCount).arg( m_currentDir ).arg( currentFile ).arg( numFiles );
+ TQString message = i18n( "<qt>Processing folder %1 of %2: <br><b>%3</b><br>File %4 of %5.</qt>").arg( m_dirCount - dirsLeft ).arg( m_dirCount).arg( m_currentDir ).arg( currentFile ).arg( numFiles );
emit progress( perc, message );
}
}
@@ -170,13 +170,13 @@ void Indexer::slotCanRead( KProcIO *proc )
// case 2: file writing, 99% or done, 100%
else
{
- QString percent = line.left( line.length() - 1 );
+ TQString percent = line.left( line.length() - 1 );
bool ok = false;
int number = percent.toInt( &ok );
if ( ok )
{
- QString message = (number == 100) ?
+ TQString message = (number == 100) ?
i18n("Finished.") : i18n("Writing data...");
emit progress( number, message );
}
diff --git a/kmrml/kmrml/kcontrol/indexer.h b/kmrml/kmrml/kcontrol/indexer.h
index 97335a70..290c9937 100644
--- a/kmrml/kmrml/kcontrol/indexer.h
+++ b/kmrml/kmrml/kcontrol/indexer.h
@@ -19,7 +19,7 @@
#ifndef INDEXER_H
#define INDEXER_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kmrml_config.h>
@@ -34,14 +34,14 @@ namespace KMrmlConfig
public:
Indexer( const KMrml::Config *config,
- QObject *parent = 0L, const char *name = 0 );
+ TQObject *parent = 0L, const char *name = 0 );
~Indexer();
- void startIndexing( const QStringList& dirs );
+ void startIndexing( const TQStringList& dirs );
void stop();
signals:
- void progress( int percent, const QString& text );
+ void progress( int percent, const TQString& text );
void finished( int returnCode );
@@ -56,8 +56,8 @@ namespace KMrmlConfig
const KMrml::Config *m_config;
uint m_dirCount;
- QStringList m_dirs;
- QString m_currentDir;
+ TQStringList m_dirs;
+ TQString m_currentDir;
};
diff --git a/kmrml/kmrml/kcontrol/indextest.cpp b/kmrml/kmrml/kcontrol/indextest.cpp
index 161ca798..fdaffcde 100644
--- a/kmrml/kmrml/kcontrol/indextest.cpp
+++ b/kmrml/kmrml/kcontrol/indextest.cpp
@@ -12,9 +12,9 @@ IndexTest::IndexTest()
{
KMrml::Config *config = new KMrml::Config( KGlobal::config() );
Indexer *indexer = new Indexer( *config, this );
- connect( indexer, SIGNAL( finished( bool )), SLOT( slotFinished( bool )));
- connect( indexer, SIGNAL( progress( int, const QString& )),
- SLOT( slotProgress( int, const QString& )));
+ connect( indexer, TQT_SIGNAL( finished( bool )), TQT_SLOT( slotFinished( bool )));
+ connect( indexer, TQT_SIGNAL( progress( int, const TQString& )),
+ TQT_SLOT( slotProgress( int, const TQString& )));
indexer->startIndexing( "/home/gis/testcoll" );
}
@@ -29,7 +29,7 @@ void IndexTest::slotFinished( bool success )
qDebug("##### FINISHED: %i", success );
}
-void IndexTest::slotProgress( int percent, const QString& message )
+void IndexTest::slotProgress( int percent, const TQString& message )
{
qDebug("--- progress: %i: %s", percent, message.latin1());
}
diff --git a/kmrml/kmrml/kcontrol/indextest.h b/kmrml/kmrml/kcontrol/indextest.h
index 5f85f5f1..15cda2ce 100644
--- a/kmrml/kmrml/kcontrol/indextest.h
+++ b/kmrml/kmrml/kcontrol/indextest.h
@@ -18,7 +18,7 @@ public:
private slots:
void slotFinished( bool success );
- void slotProgress( int percent, const QString& message );
+ void slotProgress( int percent, const TQString& message );
};
diff --git a/kmrml/kmrml/kcontrol/kcmkmrml.cpp b/kmrml/kmrml/kcontrol/kcmkmrml.cpp
index 43e46b03..d2b60fc0 100644
--- a/kmrml/kmrml/kcontrol/kcmkmrml.cpp
+++ b/kmrml/kmrml/kcontrol/kcmkmrml.cpp
@@ -16,8 +16,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -40,10 +40,10 @@ using namespace KMrmlConfig;
static const int COL_FILENAME = 1;
-typedef KGenericFactory<KCMKMrml, QWidget> MrmlFactory;
+typedef KGenericFactory<KCMKMrml, TQWidget> MrmlFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kmrml, MrmlFactory("kmrml") )
-KCMKMrml::KCMKMrml(QWidget *parent, const char *name, const QStringList & ):
+KCMKMrml::KCMKMrml(TQWidget *parent, const char *name, const TQStringList & ):
KCModule(MrmlFactory::instance(), parent, name)
{
KAboutData* ab = new KAboutData(
@@ -58,13 +58,13 @@ KCMKMrml::KCMKMrml(QWidget *parent, const char *name, const QStringList & ):
ab->addAuthor( "Carsten Pfeiffer", 0, "pfeiffer@kde.org" );
setAboutData( ab );
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
layout->setSpacing( KDialog::spacingHint() );
m_mainPage = new MainPage( this, "main page" );
layout->addWidget( m_mainPage );
- connect( m_mainPage, SIGNAL( changed( bool ) ), SIGNAL( changed( bool )));
+ connect( m_mainPage, TQT_SIGNAL( changed( bool ) ), TQT_SIGNAL( changed( bool )));
checkGiftInstallation();
}
@@ -75,26 +75,26 @@ KCMKMrml::~KCMKMrml()
void KCMKMrml::checkGiftInstallation()
{
- QString giftExe = KGlobal::dirs()->findExe( "gift" );
- QString giftAddCollectionExe = KGlobal::dirs()->findExe( "gift-add-collection.pl" );
+ TQString giftExe = KGlobal::dirs()->findExe( "gift" );
+ TQString giftAddCollectionExe = KGlobal::dirs()->findExe( "gift-add-collection.pl" );
if ( giftExe.isEmpty() || giftAddCollectionExe.isEmpty() )
{
- QString errorMessage =
+ TQString errorMessage =
i18n("Cannot find executables \"gift\" and/or \"gift-add-collection.pl\" in the PATH.\n"
"Please install the \"GNU Image Finding Tool\".");
KMessageBox::error( this, errorMessage );
m_mainPage->hide();
- QLabel *errorLabel = new QLabel( errorMessage, this );
- errorLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) );
- KURLLabel *urlLabel = new KURLLabel( "http://www.gnu.org/software/gift", QString::null, this );
- urlLabel->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
- connect( urlLabel, SIGNAL( leftClickedURL( const QString& )), kapp, SLOT( invokeBrowser( const QString& )) );
- QLayout *l = layout();
- l->addItem( new QSpacerItem( 0, 10, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
+ 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 ) );
+ connect( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& )), kapp, TQT_SLOT( invokeBrowser( const TQString& )) );
+ TQLayout *l = layout();
+ l->addItem( new TQSpacerItem( 0, 10, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
l->add( errorLabel );
l->add( urlLabel );
- l->addItem( new QSpacerItem( 0, 10, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
+ l->addItem( new TQSpacerItem( 0, 10, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
errorLabel->show();
}
else
@@ -128,7 +128,7 @@ void KCMKMrml::save()
emit changed( false );
}
-QString KCMKMrml::quickHelp() const
+TQString KCMKMrml::quickHelp() const
{
return i18n("<h1>Image Index</h1>"
"KDE can make use of the GNU Image Finding Tool (GIFT) to "
diff --git a/kmrml/kmrml/kcontrol/kcmkmrml.h b/kmrml/kmrml/kcontrol/kcmkmrml.h
index b0bb2443..306e55f0 100644
--- a/kmrml/kmrml/kcontrol/kcmkmrml.h
+++ b/kmrml/kmrml/kcontrol/kcmkmrml.h
@@ -33,13 +33,13 @@ namespace KMrmlConfig
Q_OBJECT
public:
- KCMKMrml(QWidget *parent, const char *name, const QStringList &);
+ KCMKMrml(TQWidget *parent, const char *name, const TQStringList &);
virtual ~KCMKMrml();
virtual void defaults();
virtual void load();
virtual void save();
- virtual QString quickHelp() const;
+ virtual TQString quickHelp() const;
private:
void checkGiftInstallation();
diff --git a/kmrml/kmrml/kcontrol/mainpage.cpp b/kmrml/kmrml/kcontrol/mainpage.cpp
index 514b9cf6..c4e65ac3 100644
--- a/kmrml/kmrml/kcontrol/mainpage.cpp
+++ b/kmrml/kmrml/kcontrol/mainpage.cpp
@@ -16,12 +16,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qsizepolicy.h>
-#include <qtooltip.h>
-#include <qwidget.h>
-#include <qvgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqsizepolicy.h>
+#include <tqtooltip.h>
+#include <tqwidget.h>
+#include <tqvgroupbox.h>
#include <kcombobox.h>
#include <kdialog.h>
@@ -50,8 +50,8 @@
using namespace KMrmlConfig;
-MainPage::MainPage( QWidget *parent, const char *name )
- : QVBox( parent, name ),
+MainPage::MainPage( TQWidget *parent, const char *name )
+ : TQVBox( parent, name ),
m_indexer( 0L ),
m_indexCleaner( 0L ),
m_progressDialog( 0L ),
@@ -61,12 +61,12 @@ MainPage::MainPage( QWidget *parent, const char *name )
m_config = new KMrml::Config();
setSpacing( KDialog::spacingHint() );
- QVGroupBox *gBox = new QVGroupBox( i18n("Indexing Server Configuration"),
+ TQVGroupBox *gBox = new TQVGroupBox( i18n("Indexing Server Configuration"),
this );
m_serverWidget = new ServerConfigWidget( gBox, "server config widget" );
- QString tip = i18n("Hostname of the Indexing Server");
- QToolTip::add( m_serverWidget->m_hostLabel, tip );
- QToolTip::add( m_serverWidget->m_hostCombo, tip );
+ TQString tip = i18n("Hostname of the Indexing Server");
+ TQToolTip::add( m_serverWidget->m_hostLabel, tip );
+ TQToolTip::add( m_serverWidget->m_hostCombo, tip );
m_serverWidget->m_portInput->setRange( 0, MAX_PORT_VALUE );
@@ -74,8 +74,8 @@ MainPage::MainPage( QWidget *parent, const char *name )
KURLRequester *requester = new KURLRequester( this, "dir requester" );
requester->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly );
requester->setURL( KGlobalSettings::documentPath() );
- connect( requester, SIGNAL( openFileDialog( KURLRequester * )),
- SLOT( slotRequesterClicked( KURLRequester * )));
+ connect( requester, TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ TQT_SLOT( slotRequesterClicked( KURLRequester * )));
m_listBox = new KEditListBox( i18n("Folders to Be Indexed" ),
requester->customEditor(), this, "listbox",
@@ -87,30 +87,30 @@ MainPage::MainPage( QWidget *parent, const char *name )
KEditListBox::Add | KEditListBox::Remove );
#endif
- connect( m_listBox, SIGNAL( changed() ), SLOT( slotDirectoriesChanged() ));
- connect( m_serverWidget->m_hostCombo, SIGNAL( textChanged(const QString&)),
- SLOT( slotHostChanged() ));
- connect( m_serverWidget->m_portInput, SIGNAL( valueChanged( int )),
- SLOT( slotPortChanged( int ) ));
- connect ( m_serverWidget->m_useAuth, SIGNAL( toggled(bool) ),
- SLOT( slotUseAuthChanged( bool ) ));
- connect( m_serverWidget->m_userEdit, SIGNAL( textChanged( const QString&)),
- SLOT( slotUserChanged( const QString& ) ));
- connect( m_serverWidget->m_passEdit, SIGNAL( textChanged( const QString&)),
- SLOT( slotPassChanged( const QString& ) ));
-
- connect( m_serverWidget->m_addButton, SIGNAL( clicked() ),
- SLOT( slotAddClicked() ));
- connect( m_serverWidget->m_removeButton, SIGNAL( clicked() ),
- SLOT( slotRemoveClicked() ));
-
- connect( m_serverWidget->m_hostCombo, SIGNAL( activated( const QString& )),
- SLOT( slotHostActivated( const QString& )));
- connect( m_serverWidget->m_hostCombo, SIGNAL( returnPressed() ),
- SLOT( slotAddClicked() ));
-
- connect( m_serverWidget->m_autoPort, SIGNAL( toggled( bool ) ),
- SLOT( slotAutoPortChanged( bool ) ));
+ connect( m_listBox, TQT_SIGNAL( changed() ), TQT_SLOT( slotDirectoriesChanged() ));
+ connect( m_serverWidget->m_hostCombo, TQT_SIGNAL( textChanged(const TQString&)),
+ TQT_SLOT( slotHostChanged() ));
+ connect( m_serverWidget->m_portInput, TQT_SIGNAL( valueChanged( int )),
+ TQT_SLOT( slotPortChanged( int ) ));
+ connect ( m_serverWidget->m_useAuth, TQT_SIGNAL( toggled(bool) ),
+ TQT_SLOT( slotUseAuthChanged( bool ) ));
+ connect( m_serverWidget->m_userEdit, TQT_SIGNAL( textChanged( const TQString&)),
+ TQT_SLOT( slotUserChanged( const TQString& ) ));
+ connect( m_serverWidget->m_passEdit, TQT_SIGNAL( textChanged( const TQString&)),
+ TQT_SLOT( slotPassChanged( const TQString& ) ));
+
+ connect( m_serverWidget->m_addButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( slotAddClicked() ));
+ connect( m_serverWidget->m_removeButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( slotRemoveClicked() ));
+
+ connect( m_serverWidget->m_hostCombo, TQT_SIGNAL( activated( const TQString& )),
+ TQT_SLOT( slotHostActivated( const TQString& )));
+ connect( m_serverWidget->m_hostCombo, TQT_SIGNAL( returnPressed() ),
+ TQT_SLOT( slotAddClicked() ));
+
+ connect( m_serverWidget->m_autoPort, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotAutoPortChanged( bool ) ));
m_serverWidget->m_hostCombo->setTrapReturnKey( true );
m_serverWidget->m_hostCombo->setFocus();
@@ -162,9 +162,9 @@ void MainPage::save()
m_config->addSettings( m_settings );
m_config->setDefaultHost( m_settings.host );
- QStringList indexDirs = m_listBox->items();
- QStringList oldIndexDirs = m_config->indexableDirectories();
- QStringList removedDirs = difference( oldIndexDirs, indexDirs );
+ TQStringList indexDirs = m_listBox->items();
+ TQStringList oldIndexDirs = m_config->indexableDirectories();
+ TQStringList removedDirs = difference( oldIndexDirs, indexDirs );
m_config->setIndexableDirectories( indexDirs );
if ( indexDirs.isEmpty() )
@@ -181,14 +181,14 @@ void MainPage::save()
processIndexDirs( removedDirs );
}
-QStringList MainPage::difference( const QStringList& oldIndexDirs,
- const QStringList& newIndexDirs ) const
+TQStringList MainPage::difference( const TQStringList& oldIndexDirs,
+ const TQStringList& newIndexDirs ) const
{
- QStringList result;
+ TQStringList result;
- QString slash = QString::fromLatin1("/");
- QStringList::ConstIterator oldIt = oldIndexDirs.begin();
- QString oldDir, newDir;
+ TQString slash = TQString::fromLatin1("/");
+ TQStringList::ConstIterator oldIt = oldIndexDirs.begin();
+ TQString oldDir, newDir;
for ( ; oldIt != oldIndexDirs.end(); oldIt++ )
{
@@ -198,7 +198,7 @@ QStringList MainPage::difference( const QStringList& oldIndexDirs,
while ( oldDir.endsWith( slash ) ) // remove slashes
oldDir.remove( oldDir.length() - 1, 1 );
- QStringList::ConstIterator newIt = newIndexDirs.begin();
+ TQStringList::ConstIterator newIt = newIndexDirs.begin();
for ( ; newIt != newIndexDirs.end(); newIt++ )
{
newDir = *newIt;
@@ -234,7 +234,7 @@ void MainPage::initFromSettings( const KMrml::ServerSettings& settings )
m_locked = false;
}
-void MainPage::slotHostActivated( const QString& host )
+void MainPage::slotHostActivated( const TQString& host )
{
// implicitly save the current settings when another host was chosen
m_config->addSettings( m_settings );
@@ -244,7 +244,7 @@ void MainPage::slotHostActivated( const QString& host )
void MainPage::slotHostChanged()
{
- QString host = m_serverWidget->m_hostCombo->currentText();
+ TQString host = m_serverWidget->m_hostCombo->currentText();
m_listBox->setEnabled( (host == "localhost") );
KMrml::ServerSettings settings = m_config->settingsForHost( host );
@@ -264,7 +264,7 @@ void MainPage::slotUseAuthChanged( bool enable )
changed();
}
-void MainPage::slotUserChanged( const QString& user )
+void MainPage::slotUserChanged( const TQString& user )
{
if ( m_locked )
return;
@@ -273,7 +273,7 @@ void MainPage::slotUserChanged( const QString& user )
changed();
}
-void MainPage::slotPassChanged( const QString& pass )
+void MainPage::slotPassChanged( const TQString& pass )
{
if ( m_locked )
return;
@@ -314,7 +314,7 @@ void MainPage::slotRequesterClicked( KURLRequester *requester )
void MainPage::slotAddClicked()
{
- QString host = m_serverWidget->m_hostCombo->currentText();
+ TQString host = m_serverWidget->m_hostCombo->currentText();
m_settings.host = host;
m_config->addSettings( m_settings );
@@ -326,7 +326,7 @@ void MainPage::slotAddClicked()
void MainPage::slotRemoveClicked()
{
- QString host = m_serverWidget->m_hostCombo->currentText();
+ TQString host = m_serverWidget->m_hostCombo->currentText();
if ( host.isEmpty() ) // should never happen
return;
@@ -340,7 +340,7 @@ void MainPage::slotRemoveClicked()
void MainPage::enableWidgetsFor( const KMrml::ServerSettings& settings )
{
- QString host = settings.host;
+ TQString host = settings.host;
bool enableWidgets = (m_config->hosts().findIndex( host ) > -1);
m_serverWidget->m_addButton->setEnabled(!enableWidgets && !host.isEmpty());
m_serverWidget->m_removeButton->setEnabled( enableWidgets &&
@@ -370,7 +370,7 @@ void MainPage::slotDirectoriesChanged()
changed();
}
-void MainPage::processIndexDirs( const QStringList& removeDirs )
+void MainPage::processIndexDirs( const TQStringList& removeDirs )
{
// ### how to remove indexed directories?
if ( !m_performIndexing ||
@@ -389,8 +389,8 @@ void MainPage::processIndexDirs( const QStringList& removeDirs )
true );
m_progressDialog->setAutoClose( false );
m_progressDialog->setMinimumWidth( 300 );
- connect( m_progressDialog, SIGNAL( cancelClicked() ),
- SLOT( slotCancelIndexing() ));
+ connect( m_progressDialog, TQT_SIGNAL( cancelClicked() ),
+ TQT_SLOT( slotCancelIndexing() ));
// argh -- don't automatically show the dialog
m_progressDialog->setMinimumDuration( INT_MAX );
@@ -398,10 +398,10 @@ void MainPage::processIndexDirs( const QStringList& removeDirs )
if ( !removeDirs.isEmpty() )
{
m_indexCleaner = new IndexCleaner( removeDirs, m_config, this );
- connect( m_indexCleaner, SIGNAL( advance( int ) ),
- m_progressDialog->progressBar(), SLOT( advance( int ) ));
- connect( m_indexCleaner, SIGNAL( finished() ),
- SLOT( slotMaybeIndex() ) );
+ connect( m_indexCleaner, TQT_SIGNAL( advance( int ) ),
+ m_progressDialog->progressBar(), TQT_SLOT( advance( int ) ));
+ connect( m_indexCleaner, TQT_SIGNAL( finished() ),
+ TQT_SLOT( slotMaybeIndex() ) );
m_indexCleaner->start();
}
else
@@ -438,15 +438,15 @@ void MainPage::slotMaybeIndex()
// do the indexing
m_indexer = new Indexer( m_config, this, "Indexer" );
- connect( m_indexer, SIGNAL( progress( int, const QString& )),
- SLOT( slotIndexingProgress( int, const QString& ) ));
- connect( m_indexer, SIGNAL( finished( int )),
- SLOT( slotIndexingFinished( int ) ));
+ connect( m_indexer, TQT_SIGNAL( progress( int, const TQString& )),
+ TQT_SLOT( slotIndexingProgress( int, const TQString& ) ));
+ connect( m_indexer, TQT_SIGNAL( finished( int )),
+ TQT_SLOT( slotIndexingFinished( int ) ));
m_indexer->startIndexing( m_config->indexableDirectories() );
}
-void MainPage::slotIndexingProgress( int percent, const QString& message )
+void MainPage::slotIndexingProgress( int percent, const TQString& message )
{
m_progressDialog->progressBar()->setValue( percent );
m_progressDialog->setLabel( message );
@@ -456,14 +456,14 @@ void MainPage::slotIndexingFinished( int returnCode )
{
if ( returnCode != 0 )
{
- QString syserr;
+ TQString syserr;
if ( returnCode == 127 )
syserr = i18n("Is the \"GNU Image Finding Tool\" properly installed?");
else
{
char *err = strerror( returnCode );
if ( err )
- syserr = QString::fromLocal8Bit( err );
+ syserr = TQString::fromLocal8Bit( err );
else
syserr = i18n("Unknown error: %1").arg( returnCode );
}
diff --git a/kmrml/kmrml/kcontrol/mainpage.h b/kmrml/kmrml/kcontrol/mainpage.h
index e91b4168..8000aea9 100644
--- a/kmrml/kmrml/kcontrol/mainpage.h
+++ b/kmrml/kmrml/kcontrol/mainpage.h
@@ -19,11 +19,11 @@
#ifndef MAINPAGE_H
#define MAINPAGE_H
-#include <qvbox.h>
+#include <tqvbox.h>
#include <kmrml_config.h>
-class QCheckBox;
+class TQCheckBox;
class KComboBox;
class KEditListBox;
class KIntNumInput;
@@ -48,7 +48,7 @@ namespace KMrmlConfig
Q_OBJECT
public:
- MainPage( QWidget *parent, const char *name );
+ MainPage( TQWidget *parent, const char *name );
~MainPage();
void resetDefaults();
@@ -63,20 +63,20 @@ namespace KMrmlConfig
void slotRequesterClicked( KURLRequester * );
void slotHostChanged();
void slotUseAuthChanged( bool );
- void slotUserChanged( const QString& );
- void slotPassChanged( const QString& );
+ void slotUserChanged( const TQString& );
+ void slotPassChanged( const TQString& );
void slotPortChanged( int );
void slotAutoPortChanged( bool );
void slotAddClicked();
void slotRemoveClicked();
- void slotHostActivated( const QString& );
+ void slotHostActivated( const TQString& );
void slotDirectoriesChanged();
void slotMaybeIndex();
- void slotIndexingProgress( int percent, const QString& message );
+ void slotIndexingProgress( int percent, const TQString& message );
void slotIndexingFinished( int returnCode );
void slotCancelIndexing();
@@ -85,10 +85,10 @@ namespace KMrmlConfig
void enableWidgetsFor( const KMrml::ServerSettings& settings );
void initFromSettings( const KMrml::ServerSettings& settings );
- void processIndexDirs( const QStringList& removedDirs );
+ void processIndexDirs( const TQStringList& removedDirs );
- QStringList difference( const QStringList& oldIndexDirs,
- const QStringList& newIndexDirs ) const;
+ TQStringList difference( const TQStringList& oldIndexDirs,
+ const TQStringList& newIndexDirs ) const;
ServerConfigWidget *m_serverWidget;
KEditListBox *m_listBox;
diff --git a/kmrml/kmrml/lib/kmrml_config.cpp b/kmrml/kmrml/lib/kmrml_config.cpp
index a88e8404..6358971d 100644
--- a/kmrml/kmrml/lib/kmrml_config.cpp
+++ b/kmrml/kmrml/lib/kmrml_config.cpp
@@ -16,9 +16,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
-#include <qfile.h>
-#include <qtextcodec.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtextcodec.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -101,10 +101,10 @@ bool Config::sync()
// KIO::SlaveConfig::self()->reset();
}
-void Config::setDefaultHost( const QString& host )
+void Config::setDefaultHost( const TQString& host )
{
m_defaultHost = host.isEmpty() ?
- QString::fromLatin1(DEFAULT_HOST) : host;
+ TQString::fromLatin1(DEFAULT_HOST) : host;
m_config->setGroup( CONFIG_GROUP );
m_config->writeEntry( "Default Host", m_defaultHost );
@@ -115,7 +115,7 @@ ServerSettings Config::settingsForLocalHost() const
return settingsForHost( "localhost" );
}
-ServerSettings Config::settingsForHost( const QString& host ) const
+ServerSettings Config::settingsForHost( const TQString& host ) const
{
KConfigGroup config( m_config, settingsGroup( host ) );
ServerSettings settings;
@@ -136,7 +136,7 @@ ServerSettings Config::settingsForHost( const QString& host ) const
void Config::addSettings( const ServerSettings& settings )
{
- QString host = settings.host;
+ TQString host = settings.host;
if ( m_hostList.find( host ) == m_hostList.end() )
m_hostList.append( host );
@@ -152,7 +152,7 @@ void Config::addSettings( const ServerSettings& settings )
m_config->writeEntry( "Perform Authentication", settings.useAuth );
}
-bool Config::removeSettings( const QString& host )
+bool Config::removeSettings( const TQString& host )
{
bool success = m_config->deleteGroup( settingsGroup( host ) );
if ( success )
@@ -164,22 +164,22 @@ bool Config::removeSettings( const QString& host )
return success;
}
-QStringList Config::indexableDirectories() const
+TQStringList Config::indexableDirectories() const
{
m_config->setGroup( CONFIG_GROUP );
return m_config->readListEntry( "Indexable Directories" );
}
-void Config::setIndexableDirectories( const QStringList& dirs )
+void Config::setIndexableDirectories( const TQStringList& dirs )
{
m_config->setGroup( CONFIG_GROUP );
m_config->writeEntry( "Indexable Directories", dirs );
}
-QString Config::addCollectionCommandLine() const
+TQString Config::addCollectionCommandLine() const
{
m_config->setGroup( CONFIG_GROUP );
- QString cmd = m_config->readEntry( "AddCollection Commandline",
+ TQString cmd = m_config->readEntry( "AddCollection Commandline",
DEFAULT_ADDCOLLECTION_CMD );
int index = cmd.find( "%h" );
if ( index != -1 )
@@ -187,21 +187,21 @@ QString Config::addCollectionCommandLine() const
index = cmd.find( "%e" );
if ( index != -1 )
- cmd.replace( index, 2, QTextCodec::codecForLocale()->mimeName() );
+ cmd.replace( index, 2, TQTextCodec::codecForLocale()->mimeName() );
return cmd;
}
-void Config::setAddCollectionCommandLine( const QString& cmd )
+void Config::setAddCollectionCommandLine( const TQString& cmd )
{
m_config->setGroup( CONFIG_GROUP );
m_config->writeEntry( "AddCollection Commandline", cmd );
}
-QString Config::removeCollectionCommandLine() const
+TQString Config::removeCollectionCommandLine() const
{
m_config->setGroup( CONFIG_GROUP );
- QString cmd = m_config->readEntry( "RemoveCollection Commandline",
+ TQString cmd = m_config->readEntry( "RemoveCollection Commandline",
DEFAULT_REMOVECOLLECTION_CMD );
int index = cmd.find( "%h" );
if ( index != -1 )
@@ -209,23 +209,23 @@ QString Config::removeCollectionCommandLine() const
index = cmd.find( "%e" );
if ( index != -1 )
- cmd.replace( index, 2, QTextCodec::codecForLocale()->mimeName() );
+ cmd.replace( index, 2, TQTextCodec::codecForLocale()->mimeName() );
return cmd;
}
-void Config::setRemoveCollectionCommandLine( const QString& cmd )
+void Config::setRemoveCollectionCommandLine( const TQString& cmd )
{
m_config->setGroup( CONFIG_GROUP );
m_config->writeEntry( "RemoveCollection Commandline", cmd );
}
-QString Config::mrmldCommandline() const
+TQString Config::mrmldCommandline() const
{
ServerSettings settings = settingsForLocalHost();
m_config->setGroup( CONFIG_GROUP );
- QString cmd = m_config->readEntry( "MrmmlDaemon Commandline",
+ TQString cmd = m_config->readEntry( "MrmmlDaemon Commandline",
settings.autoPort ?
DEFAULT_MRMLD_CMD_AUTOPORT :
DEFAULT_MRMLD_CMD );
@@ -234,8 +234,8 @@ QString Config::mrmldCommandline() const
int index = cmd.find( "%p" );
if ( index != -1 )
{
- QString port = settings.autoPort ?
- QString::null : QString::number( settings.configuredPort );
+ TQString port = settings.autoPort ?
+ TQString::null : TQString::number( settings.configuredPort );
cmd.replace( index, 2, port );
}
index = cmd.find( "%d" );
@@ -249,17 +249,17 @@ QString Config::mrmldCommandline() const
return cmd;
}
-QString Config::mrmldDataDir()
+TQString Config::mrmldDataDir()
{
- QString dir = KGlobal::dirs()->saveLocation( "data",
+ TQString dir = KGlobal::dirs()->saveLocation( "data",
"kmrml/mrmld-data/" );
if ( dir.isEmpty() ) // fallback
- dir = QDir::homeDirPath() + "/";
+ dir = TQDir::homeDirPath() + "/";
return dir;
}
-void Config::setMrmldCommandLine( const QString& cmd )
+void Config::setMrmldCommandLine( const TQString& cmd )
{
m_config->setGroup( CONFIG_GROUP );
m_config->writeEntry( "MrmmlDaemon Commandline", cmd );
@@ -275,9 +275,9 @@ ServerSettings::ServerSettings()
{
}
-ServerSettings::ServerSettings( const QString& host, unsigned short int port,
+ServerSettings::ServerSettings( const TQString& host, unsigned short int port,
bool autoPort, bool useAuth,
- const QString& user, const QString& pass )
+ const TQString& user, const TQString& pass )
{
this->host = host;
this->configuredPort = port;
@@ -316,11 +316,11 @@ unsigned short int ServerSettings::port() const
{
if ( autoPort )
{
- QString portsFile = Config::mrmldDataDir() + "gift-port.txt";
- QFile file( portsFile );
+ TQString portsFile = Config::mrmldDataDir() + "gift-port.txt";
+ TQFile file( portsFile );
if ( file.open( IO_ReadOnly ) )
{
- QString line;
+ TQString line;
(void) file.readLine( line, 6 );
// qDebug("**** read: %s", line.latin1());
diff --git a/kmrml/kmrml/lib/kmrml_config.h b/kmrml/kmrml/lib/kmrml_config.h
index 3b6baa40..2208030a 100644
--- a/kmrml/kmrml/lib/kmrml_config.h
+++ b/kmrml/kmrml/lib/kmrml_config.h
@@ -21,7 +21,7 @@
class KConfig;
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kurl.h>
namespace KMrml
@@ -30,18 +30,18 @@ namespace KMrml
{
public:
ServerSettings();
- ServerSettings(const QString& host, unsigned short int port,
+ ServerSettings(const TQString& host, unsigned short int port,
bool autoPort, bool useAuth, const
- QString& user, const QString& pass);
+ TQString& user, const TQString& pass);
// does NOT set the port in the KURL object, if autoPort is selected
// kio_mrml is going to determine itself (via ServerSettings::port()).
// This deuglifies the mrml:/ url a bit (no port is shown)
KURL getUrl() const;
- QString host;
- QString user;
- QString pass;
+ TQString host;
+ TQString user;
+ TQString pass;
unsigned short int configuredPort;
bool autoPort :1; // only possible with host == localhost
bool useAuth :1;
@@ -68,52 +68,52 @@ namespace KMrml
}
ServerSettings settingsForLocalHost() const;
- ServerSettings settingsForHost( const QString& host ) const;
+ ServerSettings settingsForHost( const TQString& host ) const;
- void setDefaultHost( const QString& host );
+ void setDefaultHost( const TQString& host );
/**
* Indexed by the hostname -- ensures there are no dupes
*/
void addSettings( const ServerSettings& settings );
- bool removeSettings( const QString& host );
+ bool removeSettings( const TQString& host );
- QStringList hosts() const { return m_hostList; }
+ TQStringList hosts() const { return m_hostList; }
/**
* The list of indexable directories -- only applicable to "localhost"
*/
- QStringList indexableDirectories() const;
- void setIndexableDirectories( const QStringList& dirs );
+ TQStringList indexableDirectories() const;
+ void setIndexableDirectories( const TQStringList& dirs );
- QString addCollectionCommandLine() const;
- void setAddCollectionCommandLine( const QString& cmd );
+ TQString addCollectionCommandLine() const;
+ void setAddCollectionCommandLine( const TQString& cmd );
- QString removeCollectionCommandLine() const;
- void setRemoveCollectionCommandLine( const QString& cmd );
+ TQString removeCollectionCommandLine() const;
+ void setRemoveCollectionCommandLine( const TQString& cmd );
- void setMrmldCommandLine( const QString& cmd );
- QString mrmldCommandline() const;
+ void setMrmldCommandLine( const TQString& cmd );
+ TQString mrmldCommandline() const;
// e.g. Wolfgang needs this :)
bool serverStartedIndividually() const {
return m_serverStartedIndividually;
}
- static QString mrmldDataDir();
+ static TQString mrmldDataDir();
private:
void init();
- QString settingsGroup( const QString& host ) const
+ TQString settingsGroup( const TQString& host ) const
{
- return QString::fromLatin1( "SettingsFor: " ).append( host );
+ return TQString::fromLatin1( "SettingsFor: " ).append( host );
}
bool m_serverStartedIndividually;
- QString m_defaultHost;
- QStringList m_hostList;
+ TQString m_defaultHost;
+ TQStringList m_hostList;
KConfig *m_config;
KConfig *m_ownConfig;
diff --git a/kmrml/kmrml/lib/mrml_shared.cpp b/kmrml/kmrml/lib/mrml_shared.cpp
index 0c5b692b..3e7d6d95 100644
--- a/kmrml/kmrml/lib/mrml_shared.cpp
+++ b/kmrml/kmrml/lib/mrml_shared.cpp
@@ -20,65 +20,65 @@
#include "mrml_shared.h"
// mrml stuff
-const QString * MrmlShared::m_sessionId = 0L;
-const QString * MrmlShared::m_transactionId = 0L;
-const QString * MrmlShared::m_algorithm = 0L;
-const QString * MrmlShared::m_algorithmId = 0L;
-const QString * MrmlShared::m_algorithmName = 0L;
-const QString * MrmlShared::m_algorithmList = 0L;
-const QString * MrmlShared::m_algorithmType = 0L;
-const QString * MrmlShared::m_collectionId = 0L;
-const QString * MrmlShared::m_collectionList = 0L;
-const QString * MrmlShared::m_collection = 0L;
-const QString * MrmlShared::m_collectionName = 0L;
-const QString * MrmlShared::m_queryParadigm = 0L;
-const QString * MrmlShared::m_queryParadigmList = 0L;
-const QString * MrmlShared::m_configureSession = 0L;
-
-const QString * MrmlShared::m_propertySheet = 0L;
-const QString * MrmlShared::m_propertySheetId = 0L;
-const QString * MrmlShared::m_propertySheetType = 0L;
-const QString * MrmlShared::m_sendName = 0L;
-const QString * MrmlShared::m_sendType = 0L;
-const QString * MrmlShared::m_sendValue = 0L;
-const QString * MrmlShared::m_maxSubsetSize = 0L;
-const QString * MrmlShared::m_minSubsetSize = 0L;
-const QString * MrmlShared::m_caption = 0L;
-const QString * MrmlShared::m_from = 0L;
-const QString * MrmlShared::m_to = 0L;
-const QString * MrmlShared::m_step = 0L;
-const QString * MrmlShared::m_sendBooleanInverted = 0L;
-
-const QString * MrmlShared::m_element = 0L;
-const QString * MrmlShared::m_attribute = 0L;
-const QString * MrmlShared::m_attributeName = 0L;
-const QString * MrmlShared::m_attributeValue = 0L;
-const QString * MrmlShared::m_children = 0L;
-const QString * MrmlShared::m_none = 0L;
-
-const QString * MrmlShared::m_multiSet = 0L;
-const QString * MrmlShared::m_subset = 0L;
-const QString * MrmlShared::m_setElement = 0L;
-const QString * MrmlShared::m_boolean = 0L;
-const QString * MrmlShared::m_numeric = 0L;
-const QString * MrmlShared::m_textual = 0L;
-const QString * MrmlShared::m_panel = 0L;
-const QString * MrmlShared::m_clone = 0L;
-const QString * MrmlShared::m_reference = 0L;
-
-const QString * MrmlShared::m_visibility = 0L;
-const QString * MrmlShared::m_visible = 0L;
-const QString * MrmlShared::m_invisible = 0L;
-const QString * MrmlShared::m_popup = 0L;
-// const QString * MrmlShared::m_ = 0L;
+const TQString * MrmlShared::m_sessionId = 0L;
+const TQString * MrmlShared::m_transactionId = 0L;
+const TQString * MrmlShared::m_algorithm = 0L;
+const TQString * MrmlShared::m_algorithmId = 0L;
+const TQString * MrmlShared::m_algorithmName = 0L;
+const TQString * MrmlShared::m_algorithmList = 0L;
+const TQString * MrmlShared::m_algorithmType = 0L;
+const TQString * MrmlShared::m_collectionId = 0L;
+const TQString * MrmlShared::m_collectionList = 0L;
+const TQString * MrmlShared::m_collection = 0L;
+const TQString * MrmlShared::m_collectionName = 0L;
+const TQString * MrmlShared::m_queryParadigm = 0L;
+const TQString * MrmlShared::m_queryParadigmList = 0L;
+const TQString * MrmlShared::m_configureSession = 0L;
+
+const TQString * MrmlShared::m_propertySheet = 0L;
+const TQString * MrmlShared::m_propertySheetId = 0L;
+const TQString * MrmlShared::m_propertySheetType = 0L;
+const TQString * MrmlShared::m_sendName = 0L;
+const TQString * MrmlShared::m_sendType = 0L;
+const TQString * MrmlShared::m_sendValue = 0L;
+const TQString * MrmlShared::m_maxSubsetSize = 0L;
+const TQString * MrmlShared::m_minSubsetSize = 0L;
+const TQString * MrmlShared::m_caption = 0L;
+const TQString * MrmlShared::m_from = 0L;
+const TQString * MrmlShared::m_to = 0L;
+const TQString * MrmlShared::m_step = 0L;
+const TQString * MrmlShared::m_sendBooleanInverted = 0L;
+
+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_none = 0L;
+
+const TQString * MrmlShared::m_multiSet = 0L;
+const TQString * MrmlShared::m_subset = 0L;
+const TQString * MrmlShared::m_setElement = 0L;
+const TQString * MrmlShared::m_boolean = 0L;
+const TQString * MrmlShared::m_numeric = 0L;
+const TQString * MrmlShared::m_textual = 0L;
+const TQString * MrmlShared::m_panel = 0L;
+const TQString * MrmlShared::m_clone = 0L;
+const TQString * MrmlShared::m_reference = 0L;
+
+const TQString * MrmlShared::m_visibility = 0L;
+const TQString * MrmlShared::m_visible = 0L;
+const TQString * MrmlShared::m_invisible = 0L;
+const TQString * MrmlShared::m_popup = 0L;
+// const TQString * MrmlShared::m_ = 0L;
// meta-data
-const QString * MrmlShared::m_mrml_data = 0L;
+const TQString * MrmlShared::m_mrml_data = 0L;
// kio_mrml tasks
-const QString * MrmlShared::m_kio_task = 0L;
-const QString * MrmlShared::m_kio_initialize = 0L;
-const QString * MrmlShared::m_kio_startQuery = 0L;
+const TQString * MrmlShared::m_kio_task = 0L;
+const TQString * MrmlShared::m_kio_initialize = 0L;
+const TQString * MrmlShared::m_kio_startQuery = 0L;
int MrmlShared::s_references = 0;
@@ -108,65 +108,65 @@ bool MrmlShared::deref()
void MrmlShared::init()
{
- m_sessionId = new QString ( "session-id" ) ;
- m_transactionId = new QString ( "transaction-id" ) ;
- m_algorithm = new QString ( "algorithm" ) ;
- m_algorithmId = new QString ( "algorithm-id" ) ;
- m_algorithmName = new QString ( "algorithm-name" ) ;
- m_algorithmList = new QString ( "algorithm-list" ) ;
- m_algorithmType = new QString ( "algorithm-type" ) ;
- m_collectionId = new QString ( "collection-id" ) ;
- m_collectionList = new QString ( "collection-list" ) ;
- m_collection = new QString ( "collection" ) ;
- m_collectionName = new QString ( "collection-name" ) ;
- m_queryParadigm = new QString ( "query-paradigm" ) ;
- m_queryParadigmList = new QString ( "query-paradigm-list" ) ;
- m_configureSession = new QString ( "configure-session" ) ;
-
- m_propertySheet = new QString ( "property-sheet" ) ;
- m_propertySheetId = new QString ( "property-sheet-id" ) ;
- m_propertySheetType = new QString ( "property-sheet-type" ) ;
- m_sendName = new QString ( "send-name" ) ;
- m_sendType = new QString ( "send-type" ) ;
- m_sendValue = new QString ( "send-value" ) ;
- m_maxSubsetSize = new QString ( "maxsubsetsize" ) ;
- m_minSubsetSize = new QString ( "minsubsetsize" ) ;
- m_caption = new QString ( "caption" ) ;
- m_from = new QString ( "from" ) ;
- m_to = new QString ( "to" ) ;
- m_step = new QString ( "step" ) ;
- m_sendBooleanInverted = new QString ( "send-boolean-inverted" ) ;
-
- m_element = new QString ( "element" ) ;
- m_attribute = new QString ( "attribute" ) ;
- m_attributeName = new QString ( "attribute-name" ) ;
- m_attributeValue = new QString ( "attribute-value" ) ;
- m_children = new QString ( "children" ) ;
- m_none = new QString ( "none" ) ;
-
- m_multiSet = new QString ( "multi-set" ) ;
- m_subset = new QString ( "subset" ) ;
- m_setElement = new QString ( "set-element" ) ;
- m_boolean = new QString ( "boolean" ) ;
- m_numeric = new QString ( "numeric" ) ;
- m_textual = new QString ( "textual" ) ;
- m_panel = new QString ( "panel" ) ;
- m_clone = new QString ( "clone" ) ;
- m_reference = new QString ( "reference" ) ;
-
- m_visibility = new QString ( "visibility" ) ;
- m_visible = new QString ( "visible" ) ;
- m_invisible = new QString ( "invisible" ) ;
- m_popup = new QString ( "popup" ) ;
-// m_ = new QString ( "" ) ;
+ m_sessionId = new TQString ( "session-id" ) ;
+ m_transactionId = new TQString ( "transaction-id" ) ;
+ m_algorithm = new TQString ( "algorithm" ) ;
+ m_algorithmId = new TQString ( "algorithm-id" ) ;
+ m_algorithmName = new TQString ( "algorithm-name" ) ;
+ m_algorithmList = new TQString ( "algorithm-list" ) ;
+ m_algorithmType = new TQString ( "algorithm-type" ) ;
+ m_collectionId = new TQString ( "collection-id" ) ;
+ m_collectionList = new TQString ( "collection-list" ) ;
+ m_collection = new TQString ( "collection" ) ;
+ m_collectionName = new TQString ( "collection-name" ) ;
+ m_queryParadigm = new TQString ( "query-paradigm" ) ;
+ m_queryParadigmList = new TQString ( "query-paradigm-list" ) ;
+ m_configureSession = new TQString ( "configure-session" ) ;
+
+ m_propertySheet = new TQString ( "property-sheet" ) ;
+ m_propertySheetId = new TQString ( "property-sheet-id" ) ;
+ m_propertySheetType = new TQString ( "property-sheet-type" ) ;
+ m_sendName = new TQString ( "send-name" ) ;
+ m_sendType = new TQString ( "send-type" ) ;
+ m_sendValue = new TQString ( "send-value" ) ;
+ m_maxSubsetSize = new TQString ( "maxsubsetsize" ) ;
+ m_minSubsetSize = new TQString ( "minsubsetsize" ) ;
+ m_caption = new TQString ( "caption" ) ;
+ m_from = new TQString ( "from" ) ;
+ m_to = new TQString ( "to" ) ;
+ m_step = new TQString ( "step" ) ;
+ m_sendBooleanInverted = new TQString ( "send-boolean-inverted" ) ;
+
+ m_element = new TQString ( "element" ) ;
+ m_attribute = new TQString ( "attribute" ) ;
+ m_attributeName = new TQString ( "attribute-name" ) ;
+ m_attributeValue = new TQString ( "attribute-value" ) ;
+ m_children = new TQString ( "children" ) ;
+ m_none = new TQString ( "none" ) ;
+
+ m_multiSet = new TQString ( "multi-set" ) ;
+ m_subset = new TQString ( "subset" ) ;
+ m_setElement = new TQString ( "set-element" ) ;
+ m_boolean = new TQString ( "boolean" ) ;
+ m_numeric = new TQString ( "numeric" ) ;
+ m_textual = new TQString ( "textual" ) ;
+ m_panel = new TQString ( "panel" ) ;
+ m_clone = new TQString ( "clone" ) ;
+ m_reference = new TQString ( "reference" ) ;
+
+ m_visibility = new TQString ( "visibility" ) ;
+ m_visible = new TQString ( "visible" ) ;
+ m_invisible = new TQString ( "invisible" ) ;
+ m_popup = new TQString ( "popup" ) ;
+// m_ = new TQString ( "" ) ;
// meta-data
- m_mrml_data = new QString ( "mrml_data" ) ;
+ m_mrml_data = new TQString ( "mrml_data" ) ;
// kio_mrml tasks
- m_kio_task = new QString ( "kio_task" ) ;
- m_kio_initialize = new QString ( "kio_initialize" ) ;
- m_kio_startQuery = new QString ( "kio_startQuery" ) ;
+ m_kio_task = new TQString ( "kio_task" ) ;
+ m_kio_initialize = new TQString ( "kio_initialize" ) ;
+ m_kio_startQuery = new TQString ( "kio_startQuery" ) ;
}
void MrmlShared::cleanup()
diff --git a/kmrml/kmrml/lib/mrml_shared.h b/kmrml/kmrml/lib/mrml_shared.h
index aff2a98d..6ed2177a 100644
--- a/kmrml/kmrml/lib/mrml_shared.h
+++ b/kmrml/kmrml/lib/mrml_shared.h
@@ -22,8 +22,8 @@
// maybe use mrml_const.h from libMRML, unfortunately not installed
// by gift 0.1.6pre2
-#include <qshared.h>
-#include <qstring.h>
+#include <tqshared.h>
+#include <tqstring.h>
class MrmlShared
{
@@ -32,129 +32,129 @@ public:
static void ref();
static bool deref();
- static const QString& sessionId() { return *m_sessionId; }
- static const QString& transactionId() { return *m_transactionId; }
- static const QString& algorithm() { return *m_algorithm; }
- static const QString& algorithmId() { return *m_algorithmId; }
- static const QString& algorithmName() { return *m_algorithmName; }
- static const QString& algorithmList() { return *m_algorithmList; }
- static const QString& algorithmType() { return *m_algorithmType; }
- static const QString& collectionId() { return *m_collectionId; }
- static const QString& collectionList() { return *m_collectionList; }
- static const QString& collection() { return *m_collection; }
- static const QString& collectionName() { return *m_collectionName; }
- static const QString& queryParadigm() { return *m_queryParadigm; }
- static const QString& queryParadigmList() { return *m_queryParadigmList; }
- static const QString& configureSession() { return *m_configureSession; }
+ static const TQString& sessionId() { return *m_sessionId; }
+ static const TQString& transactionId() { return *m_transactionId; }
+ static const TQString& algorithm() { return *m_algorithm; }
+ static const TQString& algorithmId() { return *m_algorithmId; }
+ static const TQString& algorithmName() { return *m_algorithmName; }
+ static const TQString& algorithmList() { return *m_algorithmList; }
+ static const TQString& algorithmType() { return *m_algorithmType; }
+ static const TQString& collectionId() { return *m_collectionId; }
+ static const TQString& collectionList() { return *m_collectionList; }
+ static const TQString& collection() { return *m_collection; }
+ static const TQString& collectionName() { return *m_collectionName; }
+ static const TQString& queryParadigm() { return *m_queryParadigm; }
+ static const TQString& queryParadigmList() { return *m_queryParadigmList; }
+ static const TQString& configureSession() { return *m_configureSession; }
// property sheet stuff
- static const QString& propertySheet() { return *m_propertySheet; }
- static const QString& propertySheetId() { return *m_propertySheetId; }
- static const QString& propertySheetType() { return *m_propertySheetType; }
- static const QString& sendName() { return *m_sendName; }
- static const QString& sendType() { return *m_sendType; }
- static const QString& sendValue() { return *m_sendValue; }
- static const QString& maxSubsetSize() { return *m_maxSubsetSize; }
- static const QString& minSubsetSize() { return *m_minSubsetSize; }
- static const QString& caption() { return *m_caption; }
- static const QString& from() { return *m_from; }
- static const QString& to() { return *m_to; }
- static const QString& step() { return *m_step; }
- static const QString& sendBooleanInverted() { return *m_sendBooleanInverted; }
-
- static const QString& multiSet() { return *m_multiSet; }
- static const QString& subset() { return *m_subset; }
- static const QString& setElement() { return *m_setElement; }
- static const QString& boolean() { return *m_boolean; }
- static const QString& numeric() { return *m_numeric; }
- static const QString& textual() { return *m_textual; }
- static const QString& panel() { return *m_panel; }
- static const QString& clone() { return *m_clone; }
- static const QString& reference() { return *m_reference; }
-
- static const QString& element() { return *m_element; }
- static const QString& attribute() { return *m_attribute; }
- static const QString& attributeName() { return *m_attributeName; }
- static const QString& attributeValue() { return *m_attributeValue; }
- static const QString& children() { return *m_children; }
- static const QString& none() { return *m_none; }
-
- static const QString& visibility() { return *m_visibility; }
- static const QString& visible() { return *m_visible; }
- static const QString& invisible() { return *m_invisible; }
- static const QString& popup() { return *m_popup; }
-// static const QString& () { return *m_; }
+ static const TQString& propertySheet() { return *m_propertySheet; }
+ static const TQString& propertySheetId() { return *m_propertySheetId; }
+ static const TQString& propertySheetType() { return *m_propertySheetType; }
+ static const TQString& sendName() { return *m_sendName; }
+ static const TQString& sendType() { return *m_sendType; }
+ static const TQString& sendValue() { return *m_sendValue; }
+ static const TQString& maxSubsetSize() { return *m_maxSubsetSize; }
+ static const TQString& minSubsetSize() { return *m_minSubsetSize; }
+ static const TQString& caption() { return *m_caption; }
+ static const TQString& from() { return *m_from; }
+ static const TQString& to() { return *m_to; }
+ static const TQString& step() { return *m_step; }
+ static const TQString& sendBooleanInverted() { return *m_sendBooleanInverted; }
+
+ static const TQString& multiSet() { return *m_multiSet; }
+ static const TQString& subset() { return *m_subset; }
+ static const TQString& setElement() { return *m_setElement; }
+ static const TQString& boolean() { return *m_boolean; }
+ static const TQString& numeric() { return *m_numeric; }
+ static const TQString& textual() { return *m_textual; }
+ static const TQString& panel() { return *m_panel; }
+ static const TQString& clone() { return *m_clone; }
+ static const TQString& reference() { return *m_reference; }
+
+ static const TQString& element() { return *m_element; }
+ 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& none() { return *m_none; }
+
+ static const TQString& visibility() { return *m_visibility; }
+ static const TQString& visible() { return *m_visible; }
+ static const TQString& invisible() { return *m_invisible; }
+ static const TQString& popup() { return *m_popup; }
+// static const TQString& () { return *m_; }
// meta-data
- static const QString& mrml_data() { return *m_mrml_data; }
+ static const TQString& mrml_data() { return *m_mrml_data; }
// kio_mrml tasks
- static const QString& kio_task() { return *m_kio_task; }
- static const QString& kio_initialize() { return *m_kio_initialize; }
- static const QString& kio_startQuery() { return *m_kio_startQuery; }
+ static const TQString& kio_task() { return *m_kio_task; }
+ static const TQString& kio_initialize() { return *m_kio_initialize; }
+ static const TQString& kio_startQuery() { return *m_kio_startQuery; }
private:
- static const QString * m_sessionId;
- static const QString * m_transactionId;
- static const QString * m_algorithm;
- static const QString * m_algorithmId;
- static const QString * m_algorithmName;
- static const QString * m_algorithmList;
- static const QString * m_algorithmType;
- static const QString * m_collectionId;
- static const QString * m_collectionList;
- static const QString * m_collection;
- static const QString * m_collectionName;
- static const QString * m_queryParadigm;
- static const QString * m_queryParadigmList;
- static const QString * m_configureSession;
+ static const TQString * m_sessionId;
+ static const TQString * m_transactionId;
+ static const TQString * m_algorithm;
+ static const TQString * m_algorithmId;
+ static const TQString * m_algorithmName;
+ static const TQString * m_algorithmList;
+ static const TQString * m_algorithmType;
+ static const TQString * m_collectionId;
+ static const TQString * m_collectionList;
+ static const TQString * m_collection;
+ static const TQString * m_collectionName;
+ static const TQString * m_queryParadigm;
+ static const TQString * m_queryParadigmList;
+ static const TQString * m_configureSession;
// property sheet stuff
- static const QString * m_propertySheet;
- static const QString * m_propertySheetId;
- static const QString * m_propertySheetType;
- static const QString * m_sendName;
- static const QString * m_sendType;
- static const QString * m_sendValue;
- static const QString * m_maxSubsetSize;
- static const QString * m_minSubsetSize;
- static const QString * m_caption;
- static const QString * m_from;
- static const QString * m_to;
- static const QString * m_step;
- static const QString * m_sendBooleanInverted;
-
- static const QString * m_multiSet;
- static const QString * m_subset;
- static const QString * m_setElement;
- static const QString * m_boolean;
- static const QString * m_numeric;
- static const QString * m_textual;
- static const QString * m_panel;
- static const QString * m_clone;
- static const QString * m_reference;
-
- static const QString * m_element;
- static const QString * m_attribute;
- static const QString * m_attributeName;
- static const QString * m_attributeValue;
- static const QString * m_children;
- static const QString * m_none;
-
- static const QString * m_visibility;
- static const QString * m_visible;
- static const QString * m_invisible;
- static const QString * m_popup;
-// static const QString * m_;
+ static const TQString * m_propertySheet;
+ static const TQString * m_propertySheetId;
+ static const TQString * m_propertySheetType;
+ static const TQString * m_sendName;
+ static const TQString * m_sendType;
+ static const TQString * m_sendValue;
+ static const TQString * m_maxSubsetSize;
+ static const TQString * m_minSubsetSize;
+ static const TQString * m_caption;
+ static const TQString * m_from;
+ static const TQString * m_to;
+ static const TQString * m_step;
+ static const TQString * m_sendBooleanInverted;
+
+ static const TQString * m_multiSet;
+ static const TQString * m_subset;
+ static const TQString * m_setElement;
+ static const TQString * m_boolean;
+ static const TQString * m_numeric;
+ static const TQString * m_textual;
+ static const TQString * m_panel;
+ static const TQString * m_clone;
+ static const TQString * m_reference;
+
+ static const TQString * m_element;
+ static const TQString * m_attribute;
+ static const TQString * m_attributeName;
+ static const TQString * m_attributeValue;
+ static const TQString * m_children;
+ static const TQString * m_none;
+
+ static const TQString * m_visibility;
+ static const TQString * m_visible;
+ static const TQString * m_invisible;
+ static const TQString * m_popup;
+// static const TQString * m_;
// meta-data
- static const QString * m_mrml_data;
+ static const TQString * m_mrml_data;
// kio_mrml tasks
- static const QString * m_kio_task;
- static const QString * m_kio_initialize;
- static const QString * m_kio_startQuery;
+ static const TQString * m_kio_task;
+ static const TQString * m_kio_initialize;
+ static const TQString * m_kio_startQuery;
private:
static void cleanup();
diff --git a/kmrml/kmrml/lib/mrml_utils.h b/kmrml/kmrml/lib/mrml_utils.h
index 25f39d98..ee2fdb30 100644
--- a/kmrml/kmrml/lib/mrml_utils.h
+++ b/kmrml/kmrml/lib/mrml_utils.h
@@ -20,7 +20,7 @@
#ifndef MRML_UTILS_H
#define MRML_UTILS_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kurl.h>
diff --git a/kmrml/kmrml/lib/watcher_stub.cpp b/kmrml/kmrml/lib/watcher_stub.cpp
index cf84818b..ca9ca7b2 100644
--- a/kmrml/kmrml/lib/watcher_stub.cpp
+++ b/kmrml/kmrml/lib/watcher_stub.cpp
@@ -11,34 +11,34 @@
namespace KMrml {
-Watcher_stub::Watcher_stub( const QCString& app, const QCString& obj )
+Watcher_stub::Watcher_stub( const TQCString& app, const TQCString& obj )
: DCOPStub( app, obj )
{
}
-Watcher_stub::Watcher_stub( DCOPClient* client, const QCString& app, const QCString& obj )
+Watcher_stub::Watcher_stub( DCOPClient* client, const TQCString& app, const TQCString& obj )
: DCOPStub( client, app, obj )
{
}
-bool Watcher_stub::requireDaemon( const QCString& arg0, const QString& arg1, const QString& arg2, uint arg3, int arg4 )
+bool Watcher_stub::requireDaemon( const TQCString& arg0, const TQString& arg1, const TQString& arg2, uint arg3, int arg4 )
{
bool result;
if ( !dcopClient() ) {
setStatus( CallFailed );
return false;
}
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg( data, IO_WriteOnly );
arg << arg0;
arg << arg1;
arg << arg2;
arg << arg3;
arg << arg4;
- if ( dcopClient()->call( app(), obj(), "requireDaemon(QCString,QString,QString,uint,int)", data, replyType, replyData ) ) {
+ if ( dcopClient()->call( app(), obj(), "requireDaemon(TQCString,TQString,TQString,uint,int)", data, replyType, replyData ) ) {
if ( replyType == "bool" ) {
- QDataStream _reply_stream( replyData, IO_ReadOnly );
+ TQDataStream _reply_stream( replyData, IO_ReadOnly );
_reply_stream >> result;
setStatus( CallSucceeded );
} else {
@@ -50,36 +50,36 @@ bool Watcher_stub::requireDaemon( const QCString& arg0, const QString& arg1, con
return result;
}
-void Watcher_stub::unrequireDaemon( const QCString& arg0, const QString& arg1 )
+void Watcher_stub::unrequireDaemon( const TQCString& arg0, const TQString& arg1 )
{
if ( !dcopClient() ) {
setStatus( CallFailed );
return;
}
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg( data, IO_WriteOnly );
arg << arg0;
arg << arg1;
- if ( dcopClient()->call( app(), obj(), "unrequireDaemon(QCString,QString)", data, replyType, replyData ) ) {
+ if ( dcopClient()->call( app(), obj(), "unrequireDaemon(TQCString,TQString)", data, replyType, replyData ) ) {
setStatus( CallSucceeded );
} else {
callFailed();
}
}
-QStringList Watcher_stub::runningDaemons()
+TQStringList Watcher_stub::runningDaemons()
{
- QStringList result;
+ TQStringList result;
if ( !dcopClient() ) {
setStatus( CallFailed );
return result;
}
- QByteArray data, replyData;
- QCString replyType;
+ TQByteArray data, replyData;
+ TQCString replyType;
if ( dcopClient()->call( app(), obj(), "runningDaemons()", data, replyType, replyData ) ) {
- if ( replyType == "QStringList" ) {
- QDataStream _reply_stream( replyData, IO_ReadOnly );
+ if ( replyType == "TQStringList" ) {
+ TQDataStream _reply_stream( replyData, IO_ReadOnly );
_reply_stream >> result;
setStatus( CallSucceeded );
} else {
diff --git a/kmrml/kmrml/lib/watcher_stub.h b/kmrml/kmrml/lib/watcher_stub.h
index 04b1292e..ce570908 100644
--- a/kmrml/kmrml/lib/watcher_stub.h
+++ b/kmrml/kmrml/lib/watcher_stub.h
@@ -8,12 +8,12 @@
#define __WATCHER_STUB__
#include <dcopstub.h>
-#include <qdict.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qstrlist.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqstrlist.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kdedmodule.h>
#include <kprocess.h>
@@ -22,11 +22,11 @@ namespace KMrml {
class Watcher_stub : public DCOPStub
{
public:
- Watcher_stub( const QCString& app, const QCString& id );
- Watcher_stub( DCOPClient* client, const QCString& app, const QCString& id );
- virtual bool requireDaemon( const QCString& clientAppId, const QString& daemonKey, const QString& commandline, uint timeout, int numRestarts );
- virtual void unrequireDaemon( const QCString& clientAppId, const QString& daemonKey );
- virtual QStringList runningDaemons();
+ Watcher_stub( const TQCString& app, const TQCString& id );
+ Watcher_stub( DCOPClient* client, const TQCString& app, const TQCString& id );
+ virtual bool requireDaemon( const TQCString& clientAppId, const TQString& daemonKey, const TQString& commandline, uint timeout, int numRestarts );
+ virtual void unrequireDaemon( const TQCString& clientAppId, const TQString& daemonKey );
+ virtual TQStringList runningDaemons();
protected:
Watcher_stub() : DCOPStub( never_use ) {};
};
diff --git a/kmrml/kmrml/loader.cpp b/kmrml/kmrml/loader.cpp
index cc59c172..ea8803e2 100644
--- a/kmrml/kmrml/loader.cpp
+++ b/kmrml/kmrml/loader.cpp
@@ -33,13 +33,13 @@ Loader * Loader::self()
return s_self;
}
-Loader::Loader() : QObject()
+Loader::Loader() : TQObject()
{
}
Loader::~Loader()
{
- disconnect( this, SIGNAL( finished( const KURL&, const QByteArray& )));
+ disconnect( this, TQT_SIGNAL( finished( const KURL&, const TQByteArray& )));
DownloadIterator it = m_downloads.begin();
for ( ; it != m_downloads.end(); ++it ) {
@@ -61,20 +61,20 @@ void Loader::requestDownload( const KURL& url )
KIO::TransferJob *job = KIO::get( url, false, false );
KIO::Scheduler::scheduleJob(job);
- connect( job , SIGNAL( data( KIO::Job *, const QByteArray& )),
- SLOT( slotData( KIO::Job *, const QByteArray& )));
- connect( job , SIGNAL( result( KIO::Job * )),
- SLOT( slotResult( KIO::Job * )));
+ connect( job , TQT_SIGNAL( data( KIO::Job *, const TQByteArray& )),
+ TQT_SLOT( slotData( KIO::Job *, const TQByteArray& )));
+ connect( job , TQT_SIGNAL( result( KIO::Job * )),
+ TQT_SLOT( slotResult( KIO::Job * )));
Download *d = new Download();
m_downloads.insert( job, d );
}
-void Loader::slotData( KIO::Job *job, const QByteArray& data )
+void Loader::slotData( KIO::Job *job, const TQByteArray& data )
{
DownloadIterator it = m_downloads.find( static_cast<KIO::TransferJob*>(job) );
if ( it != m_downloads.end() ) {
- QBuffer& buffer = it.data()->m_buffer;
+ TQBuffer& buffer = it.data()->m_buffer;
if ( !buffer.isOpen() )
buffer.open( IO_ReadWrite );
if ( !buffer.isOpen() ) {
@@ -95,7 +95,7 @@ void Loader::slotResult( KIO::Job *job )
Download *d = it.data();
if ( job->error() != 0 )
- emit finished( tjob->url(), QByteArray() );
+ emit finished( tjob->url(), TQByteArray() );
else
emit finished( tjob->url(), d->m_buffer.buffer() );
diff --git a/kmrml/kmrml/loader.h b/kmrml/kmrml/loader.h
index 5e81a2e4..8e1090cf 100644
--- a/kmrml/kmrml/loader.h
+++ b/kmrml/kmrml/loader.h
@@ -19,10 +19,10 @@
#ifndef LOADER_H
#define LOADER_H
-#include <qbuffer.h>
-#include <qcstring.h>
-#include <qmap.h>
-#include <qobject.h>
+#include <tqbuffer.h>
+#include <tqcstring.h>
+#include <tqmap.h>
+#include <tqobject.h>
#include <kio/job.h>
#include <kurl.h>
@@ -34,7 +34,7 @@ public:
if ( m_buffer.isOpen() )
m_buffer.close();
}
- QBuffer m_buffer;
+ TQBuffer m_buffer;
// add context of MrmlPart for progress?
};
@@ -53,17 +53,17 @@ public:
void removeDownload( const KURL& url );
signals:
- void finished( const KURL& url, const QByteArray& );
+ void finished( const KURL& url, const TQByteArray& );
private slots:
- void slotData( KIO::Job *, const QByteArray& );
+ void slotData( KIO::Job *, const TQByteArray& );
void slotResult( KIO::Job * );
private:
Loader();
- QMap<KIO::TransferJob*,Download*> m_downloads;
- typedef QMapIterator<KIO::TransferJob*,Download*> DownloadIterator;
+ TQMap<KIO::TransferJob*,Download*> m_downloads;
+ typedef TQMapIterator<KIO::TransferJob*,Download*> DownloadIterator;
static Loader *s_self;
diff --git a/kmrml/kmrml/mrml.cpp b/kmrml/kmrml/mrml.cpp
index 082d037b..1d998476 100644
--- a/kmrml/kmrml/mrml.cpp
+++ b/kmrml/kmrml/mrml.cpp
@@ -60,7 +60,7 @@ extern "C" {
const int Mrml::bufsize = 8192;
-Mrml::Mrml( const QCString& pool_socket, const QCString& app_socket )
+Mrml::Mrml( const TQCString& pool_socket, const TQCString& app_socket )
: TCPSlaveBase( 12789, "mrml", pool_socket, app_socket ),
m_config( KGlobal::config() )
{
@@ -100,21 +100,21 @@ void Mrml::get( const KURL& url )
int retriesLeft = 5;
tryConnect:
- QCString utf8;
+ TQCString utf8;
bool sendError = (retriesLeft <= 0);
if ( connectToHost( url.host(), port(url), sendError ) )
{
// qDebug(" connected!");
- QString task = metaData( MrmlShared::kio_task() );
+ TQString task = metaData( MrmlShared::kio_task() );
if ( task == MrmlShared::kio_initialize() ) {
startSession( url );
}
else if ( task == MrmlShared::kio_startQuery() ) {
- QString meta = metaData( MrmlShared::mrml_data() );
+ TQString meta = metaData( MrmlShared::mrml_data() );
if ( meta.isEmpty() ) {
closeDescriptor();
error( KIO::ERR_SLAVE_DEFINED, i18n("No MRML data is available.") );
@@ -154,14 +154,14 @@ tryConnect:
}
closeDescriptor();
- //data( QByteArray() ); // send an empty QByteArray to signal end of data.
+ //data( TQByteArray() ); // send an empty TQByteArray to signal end of data.
finished();
}
// make sure we're connected when you call this!
-QCString Mrml::readAll()
+TQCString Mrml::readAll()
{
- QCString data;
+ TQCString data;
char buf[bufsize];
ssize_t bytes = 0;
@@ -175,21 +175,21 @@ QCString Mrml::readAll()
return data;
}
-QCString Mrml::loginString()
+TQCString Mrml::loginString()
{
return "<mrml><get-server-properties/></mrml>";
}
-QCString Mrml::getConfigurationString()
+TQCString Mrml::getConfigurationString()
{
return "<mrml><get-configuration/></mrml>";
}
// ### needed?
-QCString Mrml::getSessionsString( const QString& username,
- const QString& password )
+TQCString Mrml::getSessionsString( const TQString& username,
+ const TQString& password )
{
- QCString data = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><mrml><get-sessions ";
+ TQCString data = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><mrml><get-sessions ";
if ( !username.isEmpty() ) { // ### pop up auth-dialog???
data.append( "user-name=\"");
data.append( username.utf8() );
@@ -216,13 +216,13 @@ bool Mrml::startSession( const KURL& url )
// 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
// accept the server's session-id.
- QString msg = mrmlString( QString::null ).arg(
+ TQString msg = mrmlString( TQString::null ).arg(
"<open-session user-name=\"%1\" session-name=\"kio_mrml session\" /> \
<get-algorithms /> \
<get-collections /> \
</mrml>" ).arg( user( url ));
- QCString utf8 = msg.utf8();
+ TQCString utf8 = msg.utf8();
// qDebug(":::Writing: %s", utf8.data());
write( utf8, utf8.length() );
@@ -231,9 +231,9 @@ bool Mrml::startSession( const KURL& url )
return true;
}
-QString Mrml::mrmlString( const QString& sessionId, const QString& transactionId )
+TQString Mrml::mrmlString( const TQString& sessionId, const TQString& transactionId )
{
- QString msg =
+ TQString msg =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> \
<!DOCTYPE mrml SYSTEM \"http://isrpc85.epfl.ch/Charmer/code/mrml.dtd\"> \
%1 \
@@ -249,7 +249,7 @@ QString Mrml::mrmlString( const QString& sessionId, const QString& transactionId
.arg( sessionId ).arg( transactionId );
}
-void Mrml::emitData( const QCString& msg )
+void Mrml::emitData( const TQCString& msg )
{
mimeType( "text/mrml" );
data( msg );
diff --git a/kmrml/kmrml/mrml.h b/kmrml/kmrml/mrml.h
index f8088ef6..c6ee01b2 100644
--- a/kmrml/kmrml/mrml.h
+++ b/kmrml/kmrml/mrml.h
@@ -29,7 +29,7 @@
class Mrml : public KIO::TCPSlaveBase
{
public:
- Mrml( const QCString&, const QCString& );
+ Mrml( const TQCString&, const TQCString& );
~Mrml();
virtual void get( const KURL& url );
@@ -37,13 +37,13 @@ public:
virtual void mimetype( const KURL& url );
private:
- QCString readAll();
- void emitData( const QCString& );
+ TQCString readAll();
+ void emitData( const TQCString& );
bool startSession( const KURL& url );
// helpers
- inline QString sessionId() {
+ inline TQString sessionId() {
return metaData( MrmlShared::sessionId() );
}
@@ -55,18 +55,18 @@ private:
m_config.settingsForHost( url.host() ).port();
}
- static QString mrmlString( const QString& sessionId,
- const QString& transactionId = QString::null );
+ static TQString mrmlString( const TQString& sessionId,
+ const TQString& transactionId = TQString::null );
- static QCString loginString();
- static QCString getConfigurationString();
- static QCString getSessionsString( const QString& username,
- const QString& password );
- QString user( const KURL& url ) {
+ static TQCString loginString();
+ static TQCString getConfigurationString();
+ static TQCString getSessionsString( const TQString& username,
+ const TQString& password );
+ TQString user( const KURL& url ) {
return url.hasUser() ?
url.user() : m_config.defaultSettings().user;
}
- QString pass( const KURL& url ) {
+ TQString pass( const KURL& url ) {
return url.hasPass() ?
url.pass() : m_config.defaultSettings().pass;
}
@@ -74,8 +74,8 @@ private:
bool checkLocalServer( const KURL& url );
static const int bufsize;
- QString defaultUser;
- QString defaultPass;
+ TQString defaultUser;
+ TQString defaultPass;
KMrml::Config m_config;
diff --git a/kmrml/kmrml/mrml_creator.cpp b/kmrml/kmrml/mrml_creator.cpp
index fce84e36..fe4a14c6 100644
--- a/kmrml/kmrml/mrml_creator.cpp
+++ b/kmrml/kmrml/mrml_creator.cpp
@@ -18,11 +18,11 @@
#include "mrml_creator.h"
-QDomElement MrmlCreator::createMrml( QDomDocument& doc,
- const QString& sessionId,
- const QString& transactionId )
+TQDomElement MrmlCreator::createMrml( TQDomDocument& doc,
+ const TQString& sessionId,
+ const TQString& transactionId )
{
- QDomElement mrml = doc.createElement( "mrml" );
+ TQDomElement mrml = doc.createElement( "mrml" );
doc.appendChild( mrml );
mrml.setAttribute( MrmlShared::sessionId(), sessionId );
if ( !transactionId.isNull() )
@@ -31,12 +31,12 @@ QDomElement MrmlCreator::createMrml( QDomDocument& doc,
return mrml;
}
-QDomElement MrmlCreator::configureSession( QDomElement& mrml,
+TQDomElement MrmlCreator::configureSession( TQDomElement& mrml,
const KMrml::Algorithm& algo,
- const QString& sessionId )
+ const TQString& sessionId )
{
- QDomDocument doc = mrml.ownerDocument();
- QDomElement config = doc.createElement( MrmlShared::configureSession() );
+ TQDomDocument doc = mrml.ownerDocument();
+ TQDomElement config = doc.createElement( MrmlShared::configureSession() );
mrml.appendChild( config );
config.setAttribute( MrmlShared::sessionId(), sessionId );
algo.toElement( config );
@@ -44,18 +44,18 @@ QDomElement MrmlCreator::configureSession( QDomElement& mrml,
return config;
}
-QDomElement MrmlCreator::addQuery( QDomElement& mrml, int resultSize )
+TQDomElement MrmlCreator::addQuery( TQDomElement& mrml, int resultSize )
{
- QDomElement query = mrml.ownerDocument().createElement("query-step");
+ TQDomElement query = mrml.ownerDocument().createElement("query-step");
mrml.appendChild( query );
// query.setAttribute( "query-step-id", "5" ); // ###
- query.setAttribute( "result-size", QString::number( resultSize ));
+ query.setAttribute( "result-size", TQString::number( resultSize ));
return query;
}
-QDomElement MrmlCreator::addRelevanceList( QDomElement& query )
+TQDomElement MrmlCreator::addRelevanceList( TQDomElement& query )
{
- QDomElement elem =
+ TQDomElement elem =
query.ownerDocument().createElement("user-relevance-element-list");
query.appendChild( elem );
return elem;
@@ -64,13 +64,13 @@ QDomElement MrmlCreator::addRelevanceList( QDomElement& query )
/**
* Creates a <user-relevance-element> with the given attributes set.
*/
-void MrmlCreator::createRelevanceElement( QDomDocument& doc,
- QDomElement& parent,
- const QString& url,
+void MrmlCreator::createRelevanceElement( TQDomDocument& doc,
+ TQDomElement& parent,
+ const TQString& url,
Relevance relevance )
{
- QDomElement element = doc.createElement( "user-relevance-element" );
+ TQDomElement element = doc.createElement( "user-relevance-element" );
element.setAttribute( "image-location", url );
- element.setAttribute( "user-relevance", QString::number( relevance ) );
+ element.setAttribute( "user-relevance", TQString::number( relevance ) );
parent.appendChild( element );
}
diff --git a/kmrml/kmrml/mrml_creator.h b/kmrml/kmrml/mrml_creator.h
index 2cc59e7a..18e49551 100644
--- a/kmrml/kmrml/mrml_creator.h
+++ b/kmrml/kmrml/mrml_creator.h
@@ -19,7 +19,7 @@
#ifndef MRML_CREATOR_H
#define MRML_CREATOR_H
-#include <qdom.h>
+#include <tqdom.h>
#include <kurl.h>
@@ -30,19 +30,19 @@ namespace MrmlCreator
{
enum Relevance { Relevant = 1, Irrelevant = -1 };
- QDomElement createMrml( QDomDocument& doc,
- const QString& sessionId,
- const QString& transactionId = QString::null );
- QDomElement configureSession( QDomElement& mrml,
+ TQDomElement createMrml( TQDomDocument& doc,
+ const TQString& sessionId,
+ const TQString& transactionId = TQString::null );
+ TQDomElement configureSession( TQDomElement& mrml,
const KMrml::Algorithm& algo,
- const QString& sessionId );
- QDomElement addQuery( QDomElement& mrml, int resultSize );
- QDomElement addRelevanceList( QDomElement& query );
+ const TQString& sessionId );
+ TQDomElement addQuery( TQDomElement& mrml, int resultSize );
+ TQDomElement addRelevanceList( TQDomElement& query );
/**
* Creates a <user-relevance-element> with the given attributes set.
*/
- void createRelevanceElement( QDomDocument& doc, QDomElement& parent,
- const QString& url, Relevance relevance );
+ void createRelevanceElement( TQDomDocument& doc, TQDomElement& parent,
+ const TQString& url, Relevance relevance );
}
diff --git a/kmrml/kmrml/mrml_elements.cpp b/kmrml/kmrml/mrml_elements.cpp
index 20f3d04e..3fadcaba 100644
--- a/kmrml/kmrml/mrml_elements.cpp
+++ b/kmrml/kmrml/mrml_elements.cpp
@@ -21,7 +21,7 @@
#include <kdatastream.h>
-#include <qdom.h>
+#include <tqdom.h>
using namespace KMrml;
@@ -31,9 +31,9 @@ using namespace KMrml;
// <query-paradigm> elements as children.
//
-MrmlElement::MrmlElement( const QDomElement& elem )
+MrmlElement::MrmlElement( const TQDomElement& elem )
{
- QValueList<QDomElement> list =
+ TQValueList<TQDomElement> list =
KMrml::directChildElements( elem, MrmlShared::queryParadigmList() );
Q_ASSERT( list.count() < 2 ); // There can be only one.
@@ -43,9 +43,9 @@ MrmlElement::MrmlElement( const QDomElement& elem )
}
-void MrmlElement::setOtherAttributes( QDomElement& elem ) const
+void MrmlElement::setOtherAttributes( TQDomElement& elem ) const
{
- QMapConstIterator<QString,QString> it = m_attributes.begin();
+ TQMapConstIterator<TQString,TQString> it = m_attributes.begin();
for ( ; it != m_attributes.end(); ++it )
{
elem.setAttribute( it.key(), it.data() );
@@ -79,14 +79,14 @@ AlgorithmList AlgorithmList::algorithmsForCollection( const Collection& coll ) c
///////////////////////////////////////////////////////////////////
-Collection::Collection( const QDomElement& elem )
+Collection::Collection( const TQDomElement& elem )
: MrmlElement( elem )
{
- QDomNamedNodeMap attrs = elem.attributes();
+ TQDomNamedNodeMap attrs = elem.attributes();
for ( uint i = 0; i < attrs.length(); i++ )
{
- QDomAttr attribute = attrs.item( i ).toAttr();
- QString name = attribute.name();
+ TQDomAttr attribute = attrs.item( i ).toAttr();
+ TQString name = attribute.name();
if ( name == MrmlShared::collectionName() )
m_name = attribute.value();
@@ -103,15 +103,15 @@ Collection::Collection( const QDomElement& elem )
///////////////////////////////////////////////////////////////////
-Algorithm::Algorithm( const QDomElement& elem )
+Algorithm::Algorithm( const TQDomElement& elem )
: MrmlElement( elem )
{
- QDomNamedNodeMap attrs = elem.attributes();
+ TQDomNamedNodeMap attrs = elem.attributes();
for ( uint i = 0; i < attrs.length(); i++ )
{
- QDomAttr attribute = attrs.item( i ).toAttr();
- QString name = attribute.name();
+ TQDomAttr attribute = attrs.item( i ).toAttr();
+ TQString name = attribute.name();
if ( name == MrmlShared::algorithmName() )
m_name = attribute.value();
@@ -128,7 +128,7 @@ Algorithm::Algorithm( const QDomElement& elem )
m_attributes.insert( name, attribute.value() );
}
- QDomElement propsElem = firstChildElement(elem, MrmlShared::propertySheet());
+ TQDomElement propsElem = firstChildElement(elem, MrmlShared::propertySheet());
m_propertySheet.initFromDOM( propsElem );
qDebug("############# new algorithm: name: %s, id: %s, type: %s", m_name.latin1(), m_id.latin1(), m_type.latin1());
@@ -144,10 +144,10 @@ Algorithm Algorithm::defaultAlgorithm()
return algo;
}
-QDomElement Algorithm::toElement( QDomElement& parent ) const
+TQDomElement Algorithm::toElement( TQDomElement& parent ) const
{
- QDomDocument doc = parent.ownerDocument();
- QDomElement algorithm = doc.createElement( MrmlShared::algorithm() );
+ TQDomDocument doc = parent.ownerDocument();
+ TQDomElement algorithm = doc.createElement( MrmlShared::algorithm() );
parent.appendChild( algorithm );
setOtherAttributes( algorithm );
@@ -167,12 +167,12 @@ QDomElement Algorithm::toElement( QDomElement& parent ) const
///////////////////////////////////////////////////////////////////
-QueryParadigm::QueryParadigm( const QDomElement& elem )
+QueryParadigm::QueryParadigm( const TQDomElement& elem )
{
- QDomNamedNodeMap attrs = elem.attributes();
+ TQDomNamedNodeMap attrs = elem.attributes();
for ( uint i = 0; i < attrs.count(); i++ )
{
- QDomAttr attr = attrs.item( i ).toAttr();
+ TQDomAttr attr = attrs.item( i ).toAttr();
m_attributes.insert( attr.name(), attr.value() );
if ( attr.name() == "type" )
m_type = attr.value();
@@ -185,16 +185,16 @@ bool QueryParadigm::matches( const QueryParadigm& other ) const
equalMaps( m_attributes, other.m_attributes );
}
-bool QueryParadigm::equalMaps( const QMap<QString,QString> m1,
- const QMap<QString,QString> m2 )
+bool QueryParadigm::equalMaps( const TQMap<TQString,TQString> m1,
+ const TQMap<TQString,TQString> m2 )
{
if ( m1.count() != m2.count() )
return false;
- QMapConstIterator<QString,QString> it = m1.begin();
+ TQMapConstIterator<TQString,TQString> it = m1.begin();
for ( ; it != m1.end(); ++it )
{
- QMapConstIterator<QString,QString> it2 = m2.find( it.key() );
+ TQMapConstIterator<TQString,TQString> it2 = m2.find( it.key() );
if ( it2 == m2.end() || it.data() != it2.data() )
return false;
}
@@ -206,14 +206,14 @@ bool QueryParadigm::equalMaps( const QMap<QString,QString> m1,
///////////////////////////////////////////////////////////////////
-void QueryParadigmList::initFromDOM( const QDomElement& elem )
+void QueryParadigmList::initFromDOM( const TQDomElement& elem )
{
clear();
- QValueList<QDomElement> list =
+ TQValueList<TQDomElement> list =
KMrml::directChildElements( elem, MrmlShared::queryParadigm() );
- QValueListConstIterator<QDomElement> it = list.begin();
+ TQValueListConstIterator<TQDomElement> it = list.begin();
for ( ; it != list.end(); ++it )
{
append( QueryParadigm( *it ));
@@ -242,12 +242,12 @@ bool QueryParadigmList::matches( const QueryParadigmList& other ) const
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-QValueList<QDomElement> KMrml::directChildElements( const QDomElement& parent,
- const QString& tagName )
+TQValueList<TQDomElement> KMrml::directChildElements( const TQDomElement& parent,
+ const TQString& tagName )
{
- QValueList<QDomElement> list;
+ TQValueList<TQDomElement> list;
- QDomNode node = parent.firstChild();
+ TQDomNode node = parent.firstChild();
while ( !node.isNull() )
{
if ( node.isElement() && node.nodeName() == tagName )
@@ -259,10 +259,10 @@ QValueList<QDomElement> KMrml::directChildElements( const QDomElement& parent,
return list;
}
-QDomElement KMrml::firstChildElement( const QDomElement& parent,
- const QString& tagName )
+TQDomElement KMrml::firstChildElement( const TQDomElement& parent,
+ const TQString& tagName )
{
- QDomNode node = parent.firstChild();
+ TQDomNode node = parent.firstChild();
while ( !node.isNull() )
{
if ( node.isElement() && node.nodeName() == tagName )
@@ -271,86 +271,86 @@ QDomElement KMrml::firstChildElement( const QDomElement& parent,
node = node.nextSibling();
}
- return QDomElement();
+ return TQDomElement();
}
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-QDataStream& KMrml::operator<<( QDataStream& stream, const QueryParadigm& )
+TQDataStream& KMrml::operator<<( TQDataStream& stream, const QueryParadigm& )
{
return stream;
}
-QDataStream& KMrml::operator>>( QDataStream& stream, QueryParadigm& )
+TQDataStream& KMrml::operator>>( TQDataStream& stream, QueryParadigm& )
{
return stream;
}
-QDataStream& KMrml::operator<<( QDataStream& stream, const QueryParadigmList& )
+TQDataStream& KMrml::operator<<( TQDataStream& stream, const QueryParadigmList& )
{
return stream;
}
-QDataStream& KMrml::operator>>( QDataStream& stream, QueryParadigmList& )
+TQDataStream& KMrml::operator>>( TQDataStream& stream, QueryParadigmList& )
{
return stream;
}
-QDataStream& KMrml::operator<<( QDataStream& stream, const MrmlElement& )
+TQDataStream& KMrml::operator<<( TQDataStream& stream, const MrmlElement& )
{
return stream;
}
-QDataStream& KMrml::operator>>( QDataStream& stream, MrmlElement& )
+TQDataStream& KMrml::operator>>( TQDataStream& stream, MrmlElement& )
{
return stream;
}
-QDataStream& KMrml::operator<<( QDataStream& stream, const Algorithm& )
+TQDataStream& KMrml::operator<<( TQDataStream& stream, const Algorithm& )
{
return stream;
}
-QDataStream& KMrml::operator>>( QDataStream& stream, Algorithm& )
+TQDataStream& KMrml::operator>>( TQDataStream& stream, Algorithm& )
{
return stream;
}
-QDataStream& KMrml::operator<<( QDataStream& stream, const Collection& )
+TQDataStream& KMrml::operator<<( TQDataStream& stream, const Collection& )
{
return stream;
}
-QDataStream& KMrml::operator>>( QDataStream& stream, Collection& )
+TQDataStream& KMrml::operator>>( TQDataStream& stream, Collection& )
{
return stream;
}
-template <class t> QDataStream& KMrml::operator<<( QDataStream& stream,
+template <class t> TQDataStream& KMrml::operator<<( TQDataStream& stream,
const MrmlElementList<t>& )
{
return stream;
}
-template <class t> QDataStream& KMrml::operator>>( QDataStream& stream,
+template <class t> TQDataStream& KMrml::operator>>( TQDataStream& stream,
MrmlElementList<t>& )
{
return stream;
}
-QDataStream& KMrml::operator<<( QDataStream& stream, const AlgorithmList& )
+TQDataStream& KMrml::operator<<( TQDataStream& stream, const AlgorithmList& )
{
return stream;
}
-QDataStream& KMrml::operator>>( QDataStream& stream, AlgorithmList& )
+TQDataStream& KMrml::operator>>( TQDataStream& stream, AlgorithmList& )
{
return stream;
diff --git a/kmrml/kmrml/mrml_elements.h b/kmrml/kmrml/mrml_elements.h
index 09d2a4a8..6fe6767d 100644
--- a/kmrml/kmrml/mrml_elements.h
+++ b/kmrml/kmrml/mrml_elements.h
@@ -19,10 +19,10 @@
#ifndef MRML_ELEMENTS_H
#define MRML_ELEMENTS_H
-#include <qdom.h>
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqdom.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include "mrml_shared.h"
#include "propertysheet.h"
@@ -37,27 +37,27 @@ namespace KMrml
{
public:
QueryParadigm() {}
- QueryParadigm( const QDomElement& elem );
+ QueryParadigm( const TQDomElement& elem );
bool matches( const QueryParadigm& other ) const;
- QString type() const { return m_type; }
+ TQString type() const { return m_type; }
// bool operator== ( const QueryParadigm& p1, const QueryParadigm& p2 )
private:
- QString m_type;
- QMap<QString,QString> m_attributes;
+ TQString m_type;
+ TQMap<TQString,TQString> m_attributes;
- static bool equalMaps( const QMap<QString,QString>,
- const QMap<QString,QString> );
+ static bool equalMaps( const TQMap<TQString,TQString>,
+ const TQMap<TQString,TQString> );
};
- class QueryParadigmList : protected QValueList<QueryParadigm>
+ class QueryParadigmList : protected TQValueList<QueryParadigm>
{
public:
- typedef QValueListIterator<QueryParadigm> Iterator;
- typedef QValueListConstIterator<QueryParadigm> ConstIterator;
+ typedef TQValueListIterator<QueryParadigm> Iterator;
+ typedef TQValueListConstIterator<QueryParadigm> ConstIterator;
- void initFromDOM( const QDomElement& elem );
+ void initFromDOM( const TQDomElement& elem );
bool matches( const QueryParadigmList& other ) const;
};
@@ -65,106 +65,106 @@ namespace KMrml
{
public:
MrmlElement() {}
- MrmlElement( const QDomElement& elem );
+ MrmlElement( const TQDomElement& elem );
virtual ~MrmlElement() {}
- QString id() const { return m_id; }
- QString name() const { return m_name; }
- QString attribute( const QString& name ) const { return m_attributes[ name ]; }
+ TQString id() const { return m_id; }
+ TQString name() const { return m_name; }
+ TQString attribute( const TQString& name ) const { return m_attributes[ name ]; }
QueryParadigmList paradigms() const { return m_paradigms; }
- QMapConstIterator<QString,QString> attributeIterator() const {
+ TQMapConstIterator<TQString,TQString> attributeIterator() const {
return m_attributes.begin();
}
- QMapConstIterator<QString,QString> end() const { return m_attributes.end(); }
+ TQMapConstIterator<TQString,TQString> end() const { return m_attributes.end(); }
bool isValid() const { return !m_name.isNull() && !m_id.isNull(); }
protected:
- QString m_id;
- QString m_name;
+ TQString m_id;
+ TQString m_name;
QueryParadigmList m_paradigms;
- QMap<QString,QString> m_attributes;
+ TQMap<TQString,TQString> m_attributes;
- void setOtherAttributes( QDomElement& elem ) const;
+ void setOtherAttributes( TQDomElement& elem ) const;
};
class Algorithm : public MrmlElement
{
public:
Algorithm() { m_collectionId = "adefault"; }
- Algorithm( const QDomElement& elem );
- QString type() const { return m_type; }
+ Algorithm( const TQDomElement& elem );
+ TQString type() const { return m_type; }
- QString collectionId() const
+ TQString collectionId() const
{
return m_collectionId;
}
- void setCollectionId( const QString& id )
+ void setCollectionId( const TQString& id )
{
m_collectionId = id;
}
- QDomElement toElement( QDomElement& parent ) const;
+ TQDomElement toElement( TQDomElement& parent ) const;
const PropertySheet& propertySheet() const;
static Algorithm defaultAlgorithm();
private:
- QString m_type;
+ TQString m_type;
PropertySheet m_propertySheet;
- QString m_collectionId;
+ TQString m_collectionId;
};
class Collection : public MrmlElement
{
public:
Collection() {}
- Collection( const QDomElement& elem );
+ Collection( const TQDomElement& elem );
};
- template <class t> class MrmlElementList : public QValueList<t>
+ template <class t> class MrmlElementList : public TQValueList<t>
{
public:
- typedef QValueListIterator<t> Iterator;
- typedef QValueListConstIterator<t> ConstIterator;
+ typedef TQValueListIterator<t> Iterator;
+ typedef TQValueListConstIterator<t> ConstIterator;
/**
* Creates an invalid element.
*/
- MrmlElementList( const QString& tagName ) :
- QValueList<t>(),
+ MrmlElementList( const TQString& tagName ) :
+ TQValueList<t>(),
m_tagName( tagName ) {}
- MrmlElementList( const QDomElement& elem, const QString& tagName ) :
- QValueList<t>(),
+ MrmlElementList( const TQDomElement& elem, const TQString& tagName ) :
+ TQValueList<t>(),
m_tagName( tagName )
{
initFromDOM( elem );
}
virtual ~MrmlElementList() {};
- void initFromDOM( const QDomElement& elem )
+ void initFromDOM( const TQDomElement& elem )
{
assert( !m_tagName.isEmpty() );
- QValueList<t>::clear();
+ TQValueList<t>::clear();
- QDomNodeList list = elem.elementsByTagName( m_tagName );
+ TQDomNodeList list = elem.elementsByTagName( m_tagName );
for ( uint i = 0; i < list.length(); i++ )
{
- QDomElement elem = list.item( i ).toElement();
+ TQDomElement elem = list.item( i ).toElement();
t item( elem );
if ( item.isValid() )
append( item );
}
}
- t findByName( const QString& name ) const
+ t findByName( const TQString& name ) const
{
- QValueListConstIterator<t> it = QValueList<t>::begin();
- for ( ; it != QValueList<t>::end(); ++it )
+ TQValueListConstIterator<t> it = TQValueList<t>::begin();
+ for ( ; it != TQValueList<t>::end(); ++it )
{
if ( (*it).name() == name )
return *it;
@@ -173,10 +173,10 @@ namespace KMrml
return t();
}
- t findById( const QString& id ) const
+ t findById( const TQString& id ) const
{
- QValueListConstIterator<t> it = QValueList<t>::begin();
- for ( ; it != QValueList<t>::end(); ++it )
+ TQValueListConstIterator<t> it = TQValueList<t>::begin();
+ for ( ; it != TQValueList<t>::end(); ++it )
{
if ( (*it).id() == id )
return *it;
@@ -185,20 +185,20 @@ namespace KMrml
return MrmlElement();
}
- QStringList itemNames() const {
- QStringList list;
- QValueListConstIterator<t> it = QValueList<t>::begin();
- for ( ; it != QValueList<t>::end(); ++it )
+ TQStringList itemNames() const {
+ TQStringList list;
+ TQValueListConstIterator<t> it = TQValueList<t>::begin();
+ for ( ; it != TQValueList<t>::end(); ++it )
list.append( (*it).name() );
return list;
}
- void setItemName( const QString& tagName ) { m_tagName = tagName; }
- QString tagName() const { return m_tagName; }
+ void setItemName( const TQString& tagName ) { m_tagName = tagName; }
+ TQString tagName() const { return m_tagName; }
private:
- QString m_tagName;
+ TQString m_tagName;
MrmlElementList();
};
@@ -221,34 +221,34 @@ namespace KMrml
};
- QValueList<QDomElement> directChildElements( const QDomElement& parent,
- const QString& tagName);
- QDomElement firstChildElement( const QDomElement& parent,
- const QString& tagName );
+ TQValueList<TQDomElement> directChildElements( const TQDomElement& parent,
+ const TQString& tagName);
+ TQDomElement firstChildElement( const TQDomElement& parent,
+ const TQString& tagName );
- QDataStream& operator<<( QDataStream& stream, const QueryParadigm& );
- QDataStream& operator>>( QDataStream& stream, QueryParadigm& );
+ TQDataStream& operator<<( TQDataStream& stream, const QueryParadigm& );
+ TQDataStream& operator>>( TQDataStream& stream, QueryParadigm& );
- QDataStream& operator<<( QDataStream& stream, const QueryParadigmList& );
- QDataStream& operator>>( QDataStream& stream, QueryParadigmList& );
+ TQDataStream& operator<<( TQDataStream& stream, const QueryParadigmList& );
+ TQDataStream& operator>>( TQDataStream& stream, QueryParadigmList& );
- QDataStream& operator<<( QDataStream& stream, const MrmlElement& );
- QDataStream& operator>>( QDataStream& stream, MrmlElement& );
+ TQDataStream& operator<<( TQDataStream& stream, const MrmlElement& );
+ TQDataStream& operator>>( TQDataStream& stream, MrmlElement& );
- QDataStream& operator<<( QDataStream& stream, const Algorithm& );
- QDataStream& operator>>( QDataStream& stream, Algorithm& );
+ TQDataStream& operator<<( TQDataStream& stream, const Algorithm& );
+ TQDataStream& operator>>( TQDataStream& stream, Algorithm& );
- QDataStream& operator<<( QDataStream& stream, const Collection& );
- QDataStream& operator>>( QDataStream& stream, Collection& );
+ TQDataStream& operator<<( TQDataStream& stream, const Collection& );
+ TQDataStream& operator>>( TQDataStream& stream, Collection& );
- template <class t> QDataStream& operator<<( QDataStream&,
+ template <class t> TQDataStream& operator<<( TQDataStream&,
const MrmlElementList<t>& );
- template <class t> QDataStream& operator>>( QDataStream&,
+ template <class t> TQDataStream& operator>>( TQDataStream&,
MrmlElementList<t>& );
- QDataStream& operator<<( QDataStream&, const AlgorithmList& );
- QDataStream& operator>>( QDataStream&, AlgorithmList& );
+ TQDataStream& operator<<( TQDataStream&, const AlgorithmList& );
+ TQDataStream& operator>>( TQDataStream&, AlgorithmList& );
}
diff --git a/kmrml/kmrml/mrml_part.cpp b/kmrml/kmrml/mrml_part.cpp
index 4d3f65e6..ba0cad5e 100644
--- a/kmrml/kmrml/mrml_part.cpp
+++ b/kmrml/kmrml/mrml_part.cpp
@@ -16,16 +16,16 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
-#include <qcursor.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qgrid.h>
-#include <qhgroupbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqcursor.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqgrid.h>
+#include <tqhgroupbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -90,12 +90,12 @@ KInstance * PartFactory::instance()
return s_instance;
}
-KParts::Part * PartFactory::createPartObject( QWidget *parentWidget,
+KParts::Part * PartFactory::createPartObject( TQWidget *parentWidget,
const char *widgetName,
- QObject *parent,
+ TQObject *parent,
const char *name,
const char *,
- const QStringList& args )
+ const TQStringList& args )
{
return new MrmlPart( parentWidget, widgetName, parent, name, args );
}
@@ -111,14 +111,14 @@ KParts::Part * PartFactory::createPartObject( QWidget *parentWidget,
uint MrmlPart::s_sessionId = 0;
-MrmlPart::MrmlPart( QWidget *parentWidget, const char * /* widgetName */,
- QObject *parent, const char *name,
- const QStringList& /* args */ )
+MrmlPart::MrmlPart( TQWidget *parentWidget, const char * /* widgetName */,
+ TQObject *parent, const char *name,
+ const TQStringList& /* args */ )
: KParts::ReadOnlyPart( parent, name ),
m_job( 0L ),
m_status( NeedCollection )
{
- m_sessionId = QString::number( s_sessionId++ ).prepend("kmrml_");
+ m_sessionId = TQString::number( s_sessionId++ ).prepend("kmrml_");
setName( "MRML Part" );
m_browser = new Browser( this, "mrml browserextension");
@@ -126,59 +126,59 @@ MrmlPart::MrmlPart( QWidget *parentWidget, const char * /* widgetName */,
KConfig *config = PartFactory::instance()->config();
config->setGroup("MRML Settings");
- QVBox *box = new QVBox( parentWidget, "main mrml box" );
+ TQVBox *box = new TQVBox( parentWidget, "main mrml box" );
m_view = new MrmlView( box, "MrmlView" );
- connect( m_view, SIGNAL( activated( const KURL&, ButtonState )),
- this, SLOT( slotActivated( const KURL&, ButtonState )));
- connect( m_view, SIGNAL( onItem( const KURL& )),
- this, SLOT( slotSetStatusBar( const KURL& )));
+ connect( m_view, TQT_SIGNAL( activated( const KURL&, ButtonState )),
+ this, TQT_SLOT( slotActivated( const KURL&, ButtonState )));
+ connect( m_view, TQT_SIGNAL( onItem( const KURL& )),
+ this, TQT_SLOT( slotSetStatusBar( const KURL& )));
- m_panel = new QHGroupBox( box, "buttons box" );
+ m_panel = new TQHGroupBox( box, "buttons box" );
- QGrid *comboGrid = new QGrid( 2, m_panel, "combo grid" );
+ TQGrid *comboGrid = new TQGrid( 2, m_panel, "combo grid" );
comboGrid->setSpacing( KDialog::spacingHint() );
- (void) new QLabel( i18n("Server to query:"), comboGrid );
+ (void) new TQLabel( i18n("Server to query:"), comboGrid );
m_hostCombo = new KComboBox( false, comboGrid, "host combo" );
initHostCombo();
- connect( m_hostCombo, SIGNAL( activated( const QString& ) ),
- SLOT( slotHostComboActivated( const QString& )));
+ connect( m_hostCombo, TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( slotHostComboActivated( const TQString& )));
- (void) new QLabel( i18n("Search in collection:"), comboGrid );
+ (void) new TQLabel( i18n("Search in collection:"), comboGrid );
m_collectionCombo = new CollectionCombo( comboGrid, "collection-combo" );
// will be re-set in initCollections(), but we need to set it here to
// prevent crashes when the connection to the server fails
m_collectionCombo->setCollections( &m_collections );
- m_algoButton = new QPushButton( QString::null, m_panel );
+ m_algoButton = new TQPushButton( TQString::null, m_panel );
m_algoButton->setPixmap( SmallIcon("configure") );
m_algoButton->setFixedSize( m_algoButton->sizeHint() );
- connect( m_algoButton, SIGNAL( clicked() ),
- SLOT( slotConfigureAlgorithm() ));
- QToolTip::add( m_algoButton, i18n("Configure algorithm") );
+ connect( m_algoButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( slotConfigureAlgorithm() ));
+ TQToolTip::add( m_algoButton, i18n("Configure algorithm") );
- QWidget *spacer = new QWidget( m_panel );
- spacer->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding,
- QSizePolicy::Minimum ) );
+ TQWidget *spacer = new TQWidget( m_panel );
+ spacer->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::Minimum ) );
int resultSize = config->readNumEntry( "Result-size", 20 );
m_resultSizeInput = new KIntNumInput( resultSize, m_panel );
m_resultSizeInput->setRange( 1, 100 );
m_resultSizeInput->setLabel( i18n("Maximum result images:") );
- QVBox *tmp = new QVBox( m_panel );
- m_random = new QCheckBox( i18n("Random search"), tmp );
+ TQVBox *tmp = new TQVBox( m_panel );
+ m_random = new TQCheckBox( i18n("Random search"), tmp );
- m_startButton = new QPushButton( QString::null, tmp );
- connect( m_startButton, SIGNAL( clicked() ), SLOT( slotStartClicked() ));
+ m_startButton = new TQPushButton( TQString::null, tmp );
+ connect( m_startButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotStartClicked() ));
setStatus( NeedCollection );
setWidget( box );
// setXMLFile( "mrml_part.rc" );
- slotSetStatusBar( QString::null );
+ slotSetStatusBar( TQString::null );
enableServerDependentWidgets( false );
}
@@ -194,7 +194,7 @@ void MrmlPart::enableServerDependentWidgets( bool enable )
m_algoButton->setEnabled( enable && false ); // ### re-enable!!!
}
-void MrmlPart::initCollections( const QDomElement& elem )
+void MrmlPart::initCollections( const TQDomElement& elem )
{
m_collections.initFromDOM( elem );
@@ -212,7 +212,7 @@ void MrmlPart::initCollections( const QDomElement& elem )
m_collectionCombo->updateGeometry(); // adjust the entire grid
}
-void MrmlPart::initAlgorithms( const QDomElement& elem )
+void MrmlPart::initAlgorithms( const TQDomElement& elem )
{
m_algorithms.initFromDOM( elem );
}
@@ -228,8 +228,8 @@ bool MrmlPart::openURL( const KURL& url )
}
m_url = url;
- QString host = url.host().isEmpty() ?
- QString::fromLatin1("localhost") : url.host();
+ TQString host = url.host().isEmpty() ?
+ TQString::fromLatin1("localhost") : url.host();
m_hostCombo->setCurrentItem( host );
@@ -237,8 +237,8 @@ bool MrmlPart::openURL( const KURL& url )
KURL::List downloadList;
m_queryList.clear();
- QString param = url.queryItem( "relevant" );
- QStringList list = QStringList::split( ';', param );
+ TQString param = url.queryItem( "relevant" );
+ TQStringList list = TQStringList::split( ';', param );
// we can only search by example on localhost
if ( host != "localhost" )
@@ -252,7 +252,7 @@ bool MrmlPart::openURL( const KURL& url )
else // localhost query
{
- for( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
KURL u;
if ( (*it).at(0) == '/' )
@@ -272,7 +272,7 @@ bool MrmlPart::openURL( const KURL& url )
// ### we need a real solution for this!
// gift refuses to start when no config file is available.
- if ( !QFile::exists( m_config.mrmldDataDir() + "/gift-config.mrml" ) )
+ if ( !TQFile::exists( m_config.mrmldDataDir() + "/gift-config.mrml" ) )
{
if ( KMessageBox::questionYesNo(0L,
i18n("There are no indexable folders "
@@ -285,7 +285,7 @@ bool MrmlPart::openURL( const KURL& url )
== KMessageBox::Yes )
{
KApplication::kdeinitExec( "kcmshell",
- QString::fromLatin1("kcmkmrml"));
+ TQString::fromLatin1("kcmkmrml"));
setStatus( NeedCollection );
return false;
}
@@ -307,8 +307,8 @@ void MrmlPart::contactServer( const KURL& url )
m_job->addMetaData( MrmlShared::kio_task(), MrmlShared::kio_initialize() );
- QString host = url.host().isEmpty() ?
- QString::fromLatin1("localhost") : url.host();
+ TQString host = url.host().isEmpty() ?
+ TQString::fromLatin1("localhost") : url.host();
slotSetStatusBar( i18n("Connecting to indexing server at %1...").arg( host ));
}
@@ -324,12 +324,12 @@ void MrmlPart::downloadReferenceFiles( const KURL::List& downloadList )
KURL::List::ConstIterator it = downloadList.begin();
for ( ; it != downloadList.end(); it++ )
{
- QString extension;
+ TQString extension;
int index = (*it).fileName().findRev( '.' );
if ( index != -1 )
extension = (*it).fileName().mid( index );
- KTempFile tmpFile( QString::null, extension );
+ KTempFile tmpFile( TQString::null, extension );
if ( tmpFile.status() != 0 )
{
kdWarning() << "Can't create temporary file, skipping: " << *it << endl;
@@ -343,8 +343,8 @@ void MrmlPart::downloadReferenceFiles( const KURL::List& downloadList )
KIO::FileCopyJob *job = KIO::file_copy( *it, destURL, -1,
true /* overwrite tmpfile */ );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotDownloadResult( KIO::Job * ) ));
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotDownloadResult( KIO::Job * ) ));
m_downloadJobs.append( job );
// ### should this be only called for one job?
emit started( job );
@@ -361,14 +361,14 @@ bool MrmlPart::closeURL()
m_view->stopDownloads();
m_view->clear();
- QPtrListIterator<KIO::FileCopyJob> it( m_downloadJobs );
+ TQPtrListIterator<KIO::FileCopyJob> it( m_downloadJobs );
for ( ; it.current(); ++it )
it.current()->kill();
m_downloadJobs.clear();
- QStringList::Iterator tit = m_tempFiles.begin();
+ TQStringList::Iterator tit = m_tempFiles.begin();
for ( ; tit != m_tempFiles.end(); ++tit )
- QFile::remove( *tit );
+ TQFile::remove( *tit );
m_tempFiles.clear();
if ( m_job ) {
@@ -385,14 +385,14 @@ KIO::TransferJob * MrmlPart::transferJob( const KURL& url )
{
KIO::TransferJob *job = KIO::get( url, true, false ); // reload, no gui
job->setAutoErrorHandlingEnabled( true, m_view );
- connect( job, SIGNAL( result( KIO::Job * )),
- SLOT( slotResult( KIO::Job * )));
- connect( job, SIGNAL( data( KIO::Job *, const QByteArray& )),
- SLOT( slotData( KIO::Job *, const QByteArray& )));
+ connect( job, TQT_SIGNAL( result( KIO::Job * )),
+ TQT_SLOT( slotResult( KIO::Job * )));
+ connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray& )),
+ TQT_SLOT( slotData( KIO::Job *, const TQByteArray& )));
// ###
-// connect( job, SIGNAL( infoMessage( KIO::Job *, const QString& )),
-// SLOT( slotResult( KIO::Job *, const QString& )));
+// connect( job, TQT_SIGNAL( infoMessage( KIO::Job *, const TQString& )),
+// TQT_SLOT( slotResult( KIO::Job *, const TQString& )));
job->setWindow( widget() );
if ( !m_sessionId.isEmpty() )
@@ -410,7 +410,7 @@ void MrmlPart::slotResult( KIO::Job *job )
if ( job == m_job )
m_job = 0L;
- slotSetStatusBar( QString::null );
+ slotSetStatusBar( TQString::null );
if ( !job->error() )
emit completed();
@@ -457,29 +457,29 @@ void MrmlPart::slotDownloadResult( KIO::Job *job )
}
// mrml-document in the bytearray
-void MrmlPart::slotData( KIO::Job *, const QByteArray& data )
+void MrmlPart::slotData( KIO::Job *, const TQByteArray& data )
{
if ( data.isEmpty() )
return;
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( data );
if ( !doc.isNull() )
parseMrml( doc );
}
-void MrmlPart::parseMrml( QDomDocument& doc )
+void MrmlPart::parseMrml( TQDomDocument& doc )
{
- QDomNode mrml = doc.documentElement(); // root element
+ TQDomNode mrml = doc.documentElement(); // root element
if ( !mrml.isNull() ) {
- QDomNode child = mrml.firstChild();
+ TQDomNode child = mrml.firstChild();
for ( ; !child.isNull(); child = child.nextSibling() ) {
// qDebug("**** HERE %s", child.nodeName().latin1());
if ( child.isElement() ) {
- QDomElement elem = child.toElement();
+ TQDomElement elem = child.toElement();
- QString tagName = elem.tagName();
+ TQString tagName = elem.tagName();
if ( tagName == "acknowledge-session-op" )
m_sessionId = elem.attribute( MrmlShared::sessionId() );
@@ -510,22 +510,22 @@ void MrmlPart::parseMrml( QDomDocument& doc )
} // !mrml.isNull()
}
-void MrmlPart::parseQueryResult( QDomElement& queryResult )
+void MrmlPart::parseQueryResult( TQDomElement& queryResult )
{
- QDomNode child = queryResult.firstChild();
+ TQDomNode child = queryResult.firstChild();
for ( ; !child.isNull(); child = child.nextSibling() ) {
if ( child.isElement() ) {
- QDomElement elem = child.toElement();
- QString tagName = elem.tagName();
+ TQDomElement elem = child.toElement();
+ TQString tagName = elem.tagName();
if ( tagName == "query-result-element-list" ) {
- QValueList<QDomElement> list =
+ TQValueList<TQDomElement> list =
KMrml::directChildElements( elem, "query-result-element" );
- QValueListConstIterator<QDomElement> it = list.begin();
+ TQValueListConstIterator<TQDomElement> it = list.begin();
for ( ; it != list.end(); ++it )
{
- QDomNamedNodeMap a = (*it).attributes();
+ TQDomNamedNodeMap a = (*it).attributes();
m_view->addItem( KURL( (*it).attribute("image-location" ) ),
KURL( (*it).attribute("thumbnail-location" ) ),
(*it).attribute("calculated-similarity"));
@@ -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( QString::null );
- m_url.setQuery( QString::null );
+ m_url.setRef( TQString::null );
+ m_url.setQuery( TQString::null );
createQuery();
m_browser->openURLNotify();
@@ -576,8 +576,8 @@ void MrmlPart::createQuery( const KURL::List * relevantItems )
if ( relevantItems && relevantItems->isEmpty() )
return;
- QDomDocument doc( "mrml" );
- QDomElement mrml = MrmlCreator::createMrml( doc,
+ TQDomDocument doc( "mrml" );
+ TQDomElement mrml = MrmlCreator::createMrml( doc,
sessionId(),
transactionId() );
@@ -591,7 +591,7 @@ void MrmlPart::createQuery( const KURL::List * relevantItems )
MrmlCreator::configureSession( mrml, algo, sessionId() );
}
- QDomElement query = MrmlCreator::addQuery( mrml,
+ TQDomElement query = MrmlCreator::addQuery( mrml,
m_resultSizeInput->value() );
if ( algo.isValid() )
query.setAttribute( MrmlShared::algorithmId(), algo.id() );
@@ -601,7 +601,7 @@ void MrmlPart::createQuery( const KURL::List * relevantItems )
// start-up with/without urls on the commandline via mrmlsearch
if ( relevantItems )
{
- QDomElement elem = MrmlCreator::addRelevanceList( query );
+ TQDomElement elem = MrmlCreator::addRelevanceList( query );
KURL::List::ConstIterator it = relevantItems->begin();
for ( ; it != relevantItems->end(); ++it )
MrmlCreator::createRelevanceElement( doc, elem, (*it).url(),
@@ -611,7 +611,7 @@ void MrmlPart::createQuery( const KURL::List * relevantItems )
// get relevant items from the view? Only do this when relevantItems is 0L
else if ( !m_random->isChecked() )
{
- QDomElement relevants = MrmlCreator::addRelevanceList( query );
+ TQDomElement relevants = MrmlCreator::addRelevanceList( query );
m_view->addRelevanceToQuery( doc, relevants );
}
@@ -645,26 +645,26 @@ Algorithm MrmlPart::firstAlgorithmForCollection( const Collection& coll ) const
return algo;
}
-// emits the given QDomDocument for eventual plugins, checks after that
+// emits the given TQDomDocument for eventual plugins, checks after that
// if there are any relevance elements. If there are none, random search is
// implied and performed.
// finally, the search is actually started
-void MrmlPart::performQuery( QDomDocument& doc )
+void MrmlPart::performQuery( TQDomDocument& doc )
{
- QDomElement mrml = doc.documentElement();
+ TQDomElement mrml = doc.documentElement();
emit aboutToStartQuery( doc ); // let plugins play with it :)
// no items available? All "neutral"? -> random search
- QDomElement queryStep = KMrml::firstChildElement( mrml, "query-step" );
+ TQDomElement queryStep = KMrml::firstChildElement( mrml, "query-step" );
bool randomSearch = false;
if ( !queryStep.isNull() )
{
- QDomElement relevanceList =
+ TQDomElement relevanceList =
KMrml::firstChildElement(queryStep, "user-relevance-element-list");
- QValueList<QDomElement> relevanceElements =
+ TQValueList<TQDomElement> relevanceElements =
KMrml::directChildElements( relevanceList,
"user-relevance-element" );
@@ -695,7 +695,7 @@ void MrmlPart::performQuery( QDomDocument& doc )
m_job->addMetaData( MrmlShared::mrml_data(), doc.toString() );
}
-void MrmlPart::slotSetStatusBar( const QString& text )
+void MrmlPart::slotSetStatusBar( const TQString& text )
{
if ( text.isEmpty() )
emit setStatusBarText( i18n("Ready.") );
@@ -711,7 +711,7 @@ void MrmlPart::slotActivated( const KURL& url, ButtonState button )
emit m_browser->createNewWindow( url );
else if ( button == RightButton ) {
// enableExtensionActions( url, true ); // for now
- emit m_browser->popupMenu( QCursor::pos(), url, QString::null );
+ emit m_browser->popupMenu( TQCursor::pos(), url, TQString::null );
// enableExtensionActions( url, false );
}
}
@@ -741,10 +741,10 @@ void MrmlPart::slotConfigureAlgorithm()
m_algoConfig = new AlgorithmDialog( m_algorithms, m_collections,
currentCollection(),
m_view, "algorithm configuration" );
- connect( m_algoConfig, SIGNAL( applyClicked() ),
- SLOT( slotApplyAlgoConfig() ));
- connect( m_algoConfig, SIGNAL( finished() ),
- SLOT( slotAlgoConfigFinished() ));
+ connect( m_algoConfig, TQT_SIGNAL( applyClicked() ),
+ TQT_SLOT( slotApplyAlgoConfig() ));
+ connect( m_algoConfig, TQT_SIGNAL( finished() ),
+ TQT_SLOT( slotAlgoConfigFinished() ));
m_algoConfig->show();
}
@@ -756,7 +756,7 @@ void MrmlPart::slotApplyAlgoConfig()
void MrmlPart::slotAlgoConfigFinished()
{
- if ( m_algoConfig->result() == QDialog::Accepted )
+ if ( m_algoConfig->result() == TQDialog::Accepted )
slotApplyAlgoConfig();
m_algoButton->setEnabled( true );
@@ -770,7 +770,7 @@ void MrmlPart::initHostCombo()
m_hostCombo->insertStringList( m_config.hosts() );
}
-void MrmlPart::slotHostComboActivated( const QString& host )
+void MrmlPart::slotHostComboActivated( const TQString& host )
{
ServerSettings settings = m_config.settingsForHost( host );
openURL( settings.getUrl() );
@@ -795,7 +795,7 @@ void MrmlPart::setStatus( Status status )
}
-void MrmlPart::saveState( QDataStream& stream )
+void MrmlPart::saveState( TQDataStream& stream )
{
stream << url();
stream << m_sessionId;
@@ -809,7 +809,7 @@ void MrmlPart::saveState( QDataStream& stream )
m_view->saveState( stream );
}
-void MrmlPart::restoreState( QDataStream& stream )
+void MrmlPart::restoreState( TQDataStream& stream )
{
KURL url;
stream >> url;
diff --git a/kmrml/kmrml/mrml_part.h b/kmrml/kmrml/mrml_part.h
index 110d290a..84ce0529 100644
--- a/kmrml/kmrml/mrml_part.h
+++ b/kmrml/kmrml/mrml_part.h
@@ -19,8 +19,8 @@
#ifndef MRMLPART_H
#define MRMLPART_H
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
#include <kurl.h>
#include <kparts/factory.h>
@@ -30,9 +30,9 @@
#include "mrml_elements.h"
-class QCheckBox;
-class QHGroupBox;
-class QPushButton;
+class TQCheckBox;
+class TQHGroupBox;
+class TQPushButton;
class KAboutData;
class KComboBox;
@@ -58,15 +58,15 @@ class MrmlPart : public KParts::ReadOnlyPart
public:
enum Status { NeedCollection, CanSearch, InProgress };
- MrmlPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList& args );
+ MrmlPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList& args );
~MrmlPart();
- QString sessionId() const { return m_sessionId; }
- QString transactionId() const { return QString::null; } // ###
+ TQString sessionId() const { return m_sessionId; }
+ TQString transactionId() const { return TQString::null; } // ###
- void saveState( QDataStream& stream );
- void restoreState( QDataStream& stream );
+ void saveState( TQDataStream& stream );
+ void restoreState( TQDataStream& stream );
static KAboutData *createAboutData();
@@ -85,16 +85,16 @@ signals:
/**
* allow plugins to extend the query
*/
- void aboutToStartQuery( QDomDocument& );
+ void aboutToStartQuery( TQDomDocument& );
private slots:
void slotStartClicked();
- void slotSetStatusBar( const QString& );
+ void slotSetStatusBar( const TQString& );
void slotSetStatusBar( const KURL& url ) { slotSetStatusBar( url.prettyURL() ); }
- void slotHostComboActivated( const QString& );
+ void slotHostComboActivated( const TQString& );
void slotResult( KIO::Job * );
- void slotData( KIO::Job *, const QByteArray& );
+ void slotData( KIO::Job *, const TQByteArray& );
void slotDownloadResult( KIO::Job * );
@@ -104,11 +104,11 @@ private slots:
private:
void createQuery( const KURL::List * relevantItems = 0L );
- void initCollections( const QDomElement& );
- void initAlgorithms( const QDomElement& );
- void performQuery( QDomDocument& doc );
- void parseMrml( QDomDocument& doc );
- void parseQueryResult( QDomElement& );
+ void initCollections( const TQDomElement& );
+ void initAlgorithms( const TQDomElement& );
+ void performQuery( TQDomDocument& doc );
+ void parseMrml( TQDomDocument& doc );
+ void parseQueryResult( TQDomElement& );
void enableExtensionActions( const KURL& url, bool enable );
KIO::TransferJob * transferJob( const KURL& url );
@@ -125,18 +125,18 @@ private:
Config m_config;
KIntNumInput * m_resultSizeInput;
CollectionCombo * m_collectionCombo;
- QPushButton *m_algoButton;
- QHGroupBox *m_panel;
- QPushButton *m_startButton;
- QCheckBox *m_random;
+ TQPushButton *m_algoButton;
+ TQHGroupBox *m_panel;
+ TQPushButton *m_startButton;
+ TQCheckBox *m_random;
Browser *m_browser;
AlgorithmDialog *m_algoConfig;
KComboBox *m_hostCombo;
- QPtrList<KIO::FileCopyJob> m_downloadJobs;
- QStringList m_tempFiles;
+ TQPtrList<KIO::FileCopyJob> m_downloadJobs;
+ TQStringList m_tempFiles;
- QString m_sessionId;
+ TQString m_sessionId;
KURL::List m_queryList; // a list of valid LOCAL (!) urls to query for
CollectionList m_collections;
@@ -158,12 +158,12 @@ public:
static KInstance * instance();
protected:
- virtual KParts::Part * createPartObject( QWidget *parentWidget = 0,
+ virtual KParts::Part * createPartObject( TQWidget *parentWidget = 0,
const char *widgetName = 0,
- QObject *parent = 0,
+ TQObject *parent = 0,
const char *name = 0,
const char *classname = "KParts::Part",
- const QStringList& args = QStringList() );
+ const TQStringList& args = TQStringList() );
private:
static KInstance * s_instance;
diff --git a/kmrml/kmrml/mrml_view.cpp b/kmrml/kmrml/mrml_view.cpp
index 71f3c741..89c15061 100644
--- a/kmrml/kmrml/mrml_view.cpp
+++ b/kmrml/kmrml/mrml_view.cpp
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kcursor.h>
#include <kdatastream.h>
@@ -37,8 +37,8 @@
using namespace KMrml;
-MrmlView::MrmlView( QWidget *parent, const char *name )
- : QScrollView( parent, name )
+MrmlView::MrmlView( TQWidget *parent, const char *name )
+ : TQScrollView( parent, name )
{
setStaticBackground( true );
setResizePolicy( Manual );
@@ -47,22 +47,22 @@ MrmlView::MrmlView( QWidget *parent, const char *name )
m_items.setAutoDelete( true );
- connect( Loader::self(), SIGNAL( finished(const KURL&, const QByteArray&)),
- SLOT( slotDownloadFinished( const KURL&, const QByteArray& )));
+ connect( Loader::self(), TQT_SIGNAL( finished(const KURL&, const TQByteArray&)),
+ TQT_SLOT( slotDownloadFinished( const KURL&, const TQByteArray& )));
- m_timer = new QTimer( this );
- connect( m_timer, SIGNAL( timeout() ), SLOT( slotLayout() ));
+ m_timer = new TQTimer( this );
+ connect( m_timer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotLayout() ));
// we need a pixmap to be shown when no thumbnail is available for a
// query result image
- QLabel l( i18n( "No thumbnail available" ), 0L );
+ TQLabel l( i18n( "No thumbnail available" ), 0L );
l.setFixedSize( 80, 80 );
l.setAlignment( WordBreak | AlignCenter );
-// l.setFrameStyle( QLabel::Box | QLabel::Plain );
+// l.setFrameStyle( TQLabel::Box | TQLabel::Plain );
// l.setLineWidth( 1 );
l.setPaletteBackgroundColor( Qt::white );
l.setPaletteForegroundColor( Qt::black );
- m_unavailablePixmap = QPixmap::grabWidget( &l );
+ m_unavailablePixmap = TQPixmap::grabWidget( &l );
}
MrmlView::~MrmlView()
@@ -70,7 +70,7 @@ MrmlView::~MrmlView()
}
MrmlViewItem * MrmlView::addItem( const KURL& url, const KURL& thumbURL,
- const QString& similarity )
+ const TQString& similarity )
{
bool ok;
double value = similarity.toDouble( &ok );
@@ -92,7 +92,7 @@ MrmlViewItem * MrmlView::addItem( const KURL& url, const KURL& thumbURL,
// qDebug("** url: %s", thumbURL.url().latin1());
MrmlViewItem *item = new MrmlViewItem( url, thumbURL, similarity, this );
- QPixmap *pixmap = getPixmap( thumbURL );
+ TQPixmap *pixmap = getPixmap( thumbURL );
if ( pixmap )
item->setPixmap( *pixmap );
@@ -102,10 +102,10 @@ MrmlViewItem * MrmlView::addItem( const KURL& url, const KURL& thumbURL,
return item;
}
-void MrmlView::addRelevanceToQuery( QDomDocument& document,
- QDomElement& parent )
+void MrmlView::addRelevanceToQuery( TQDomDocument& document,
+ TQDomElement& parent )
{
- QPtrListIterator<MrmlViewItem> it( m_items );
+ TQPtrListIterator<MrmlViewItem> it( m_items );
for( ; it.current(); ++it ) {
it.current()->createRelevanceElement( document, parent );
}
@@ -117,15 +117,15 @@ void MrmlView::clear()
setContentsPos( 0, 0 );
}
-QPixmap * MrmlView::getPixmap( const KURL& url )
+TQPixmap * MrmlView::getPixmap( const KURL& url )
{
- QString u = url.url();
- QPixmap *pix = m_pixmapCache.find( u );
+ TQString u = url.url();
+ TQPixmap *pix = m_pixmapCache.find( u );
if ( pix )
return pix;
if ( url.isLocalFile() ) {
- QPixmap p;
+ TQPixmap p;
if ( !p.load( url.path() ) )
p = m_unavailablePixmap;
@@ -139,14 +139,14 @@ QPixmap * MrmlView::getPixmap( const KURL& url )
return 0L;
}
-void MrmlView::slotDownloadFinished( const KURL& url, const QByteArray& data )
+void MrmlView::slotDownloadFinished( const KURL& url, const TQByteArray& data )
{
- QPtrListIterator<MrmlViewItem> it( m_items );
+ TQPtrListIterator<MrmlViewItem> it( m_items );
for( ; it.current(); ++it ) {
MrmlViewItem *item = it.current();
if ( item->thumbURL() == url )
{
- QPixmap p;
+ TQPixmap p;
if ( data.isEmpty() || !p.loadFromData( data ) )
p = m_unavailablePixmap;
@@ -162,7 +162,7 @@ void MrmlView::slotDownloadFinished( const KURL& url, const QByteArray& data )
void MrmlView::stopDownloads()
{
Loader *loader = Loader::self();
- QPtrListIterator<MrmlViewItem> it( m_items );
+ TQPtrListIterator<MrmlViewItem> it( m_items );
for( ; it.current(); ++it ) {
MrmlViewItem *item = it.current();
if ( !item->hasRemotePixmap() )
@@ -173,7 +173,7 @@ void MrmlView::stopDownloads()
void MrmlView::slotLayout()
{
int itemWidth = 0;
- QPtrListIterator<MrmlViewItem> it( m_items );
+ TQPtrListIterator<MrmlViewItem> it( m_items );
for ( ; it.current(); ++it ) {
itemWidth = QMAX( itemWidth, it.current()->sizeHint().width() );
@@ -190,7 +190,7 @@ void MrmlView::slotLayout()
uint y = 5;
// pointing to the first item of a row
- QPtrListIterator<MrmlViewItem> rowIt( m_items );
+ TQPtrListIterator<MrmlViewItem> rowIt( m_items );
for ( it.toFirst(); it.current(); ++it ) {
if ( item >= itemsPerRow ) {
@@ -222,26 +222,26 @@ void MrmlView::slotLayout()
resizeContents( visibleWidth(), y + rowHeight );
}
-void MrmlView::resizeEvent( QResizeEvent *e )
+void MrmlView::resizeEvent( TQResizeEvent *e )
{
int oldW = visibleWidth();
- QScrollView::resizeEvent( e );
+ TQScrollView::resizeEvent( e );
if ( visibleWidth() != oldW )
slotLayout();
}
-void MrmlView::saveState( QDataStream& stream )
+void MrmlView::saveState( TQDataStream& stream )
{
stream << m_items.count();
- QPtrListIterator<MrmlViewItem> it( m_items );
+ TQPtrListIterator<MrmlViewItem> it( m_items );
for( ; it.current(); ++it ) {
stream << *it.current();
}
}
-void MrmlView::restoreState( QDataStream& stream )
+void MrmlView::restoreState( TQDataStream& stream )
{
stopDownloads();
clear();
@@ -268,7 +268,7 @@ void MrmlView::restoreState( QDataStream& stream )
}
}
-QDataStream& KMrml::operator<<( QDataStream& stream,
+TQDataStream& KMrml::operator<<( TQDataStream& stream,
const KMrml::MrmlViewItem& item )
{
return stream << item.url()
@@ -284,7 +284,7 @@ QDataStream& KMrml::operator<<( QDataStream& stream,
MrmlViewItem::MrmlViewItem( const KURL& url, const KURL& thumbURL,
double similarity, MrmlView *view,
const char *name )
- : QFrame( view->viewport() , name ),
+ : TQFrame( view->viewport() , name ),
m_view( view ),
m_url( url ),
m_thumbURL( thumbURL ),
@@ -297,7 +297,7 @@ MrmlViewItem::MrmlViewItem( const KURL& url, const KURL& thumbURL,
setMouseTracking( true );
m_combo = new KComboBox( this );
- QToolTip::add( m_combo, i18n("You can refine queries by giving feedback about the current result and pressing the Search button again.") );
+ TQToolTip::add( m_combo, i18n("You can refine queries by giving feedback about the current result and pressing the Search button again.") );
m_combo->insertItem( i18n("Relevant"), Relevant );
m_combo->insertItem( i18n("Neutral"), Neutral );
m_combo->insertItem( i18n("Irrelevant"), Irrelevant );
@@ -306,11 +306,11 @@ MrmlViewItem::MrmlViewItem( const KURL& url, const KURL& thumbURL,
/*
if ( similarity > -1 )
- QToolTip::add( this, QString::fromLatin1("<qt>%1<br>%1</qt>")
+ TQToolTip::add( this, TQString::fromLatin1("<qt>%1<br>%1</qt>")
.arg( url )
- .arg(i18n("Similarity: %1").arg( QString::number(similarity))));
+ .arg(i18n("Similarity: %1").arg( TQString::number(similarity))));
else
- QToolTip::add( this, QString::fromLatin1("<qt>%1</qt>").arg( url ) );
+ TQToolTip::add( this, TQString::fromLatin1("<qt>%1</qt>").arg( url ) );
*/
setMinimumSize( 130, 130 ); // ###
@@ -320,7 +320,7 @@ MrmlViewItem::~MrmlViewItem()
{
}
-void MrmlViewItem::setPixmap( const QPixmap& pix )
+void MrmlViewItem::setPixmap( const TQPixmap& pix )
{
if ( !m_url.isLocalFile() )
m_hasRemotePixmap = true;
@@ -330,9 +330,9 @@ void MrmlViewItem::setPixmap( const QPixmap& pix )
update();
}
-void MrmlViewItem::paintEvent( QPaintEvent *e )
+void MrmlViewItem::paintEvent( TQPaintEvent *e )
{
- QFrame::paintEvent( e );
+ TQFrame::paintEvent( e );
if ( !m_pixmap.isNull() ) {
bitBlt( this, pixmapX(), pixmapY(),
@@ -341,8 +341,8 @@ void MrmlViewItem::paintEvent( QPaintEvent *e )
}
if ( m_similarity >= 0 ) {
- QPainter p( this );
- QPen pen( colorGroup().highlight(), 1, QPen::SolidLine );
+ TQPainter p( this );
+ TQPen pen( colorGroup().highlight(), 1, TQPen::SolidLine );
p.setPen( pen );
int x = margin;
int y = m_combo->y() - similarityHeight - 2;
@@ -353,15 +353,15 @@ void MrmlViewItem::paintEvent( QPaintEvent *e )
}
}
-void MrmlViewItem::resizeEvent( QResizeEvent *e )
+void MrmlViewItem::resizeEvent( TQResizeEvent *e )
{
- QFrame::resizeEvent( e );
+ TQFrame::resizeEvent( e );
int y = height() - m_combo->height() - margin;
m_combo->move( width()/2 - m_combo->width()/2, y );
}
-QSize MrmlViewItem::sizeHint() const
+TQSize MrmlViewItem::sizeHint() const
{
int w = QMAX( QMAX(minimumHeight(), m_combo->width()), m_pixmap.width() );
w += 2 * margin;
@@ -370,12 +370,12 @@ QSize MrmlViewItem::sizeHint() const
h += (m_similarity > -1) ? similarityHeight + spacing : 0;
h += m_combo->height() + margin;
- return QSize( w, h );
+ return TQSize( w, h );
}
-void MrmlViewItem::mousePressEvent( QMouseEvent *e )
+void MrmlViewItem::mousePressEvent( TQMouseEvent *e )
{
- QFrame::mousePressEvent( e );
+ TQFrame::mousePressEvent( e );
pressedPos.setX( 0 );
pressedPos.setY( 0 );
@@ -388,7 +388,7 @@ void MrmlViewItem::mousePressEvent( QMouseEvent *e )
emit view()->activated( m_url, e->button() );
}
-void MrmlViewItem::mouseMoveEvent( QMouseEvent *e )
+void MrmlViewItem::mouseMoveEvent( TQMouseEvent *e )
{
if ( hitsPixmap( e->pos() ) ) {
if ( !ownCursor() ) { // nice hacklet :)
@@ -404,7 +404,7 @@ void MrmlViewItem::mouseMoveEvent( QMouseEvent *e )
}
if ( (e->state() & LeftButton) && !pressedPos.isNull() ) {
- QPoint dist = e->pos() - pressedPos;
+ TQPoint dist = e->pos() - pressedPos;
if ( dist.manhattanLength() > KGlobalSettings::dndEventDelay() ) {
// start drag here
KURL::List urls;
@@ -417,17 +417,17 @@ void MrmlViewItem::mouseMoveEvent( QMouseEvent *e )
}
}
-void MrmlViewItem::mouseReleaseEvent( QMouseEvent *e )
+void MrmlViewItem::mouseReleaseEvent( TQMouseEvent *e )
{
if ( hitsPixmap( e->pos() )) {
- QPoint dist = e->pos() - pressedPos;
+ TQPoint dist = e->pos() - pressedPos;
if ( dist.manhattanLength() < KGlobalSettings::dndEventDelay() ) {
emit view()->activated( m_url, e->button() );
}
}
}
-bool MrmlViewItem::hitsPixmap( const QPoint& pos ) const
+bool MrmlViewItem::hitsPixmap( const TQPoint& pos ) const
{
if ( m_pixmap.isNull() )
return false;
@@ -438,8 +438,8 @@ bool MrmlViewItem::hitsPixmap( const QPoint& pos ) const
return false;
}
-void MrmlViewItem::createRelevanceElement( QDomDocument& document,
- QDomElement& parent )
+void MrmlViewItem::createRelevanceElement( TQDomDocument& document,
+ TQDomElement& parent )
{
int rel = m_combo->currentItem();
if ( rel == Neutral )
@@ -463,8 +463,8 @@ void MrmlViewItem::setRelevance( Relevance relevance )
///////////////////////////////////////////////////////////////////
-int MrmlViewItemList::compareItems( QPtrCollection::Item item1,
- QPtrCollection::Item item2 )
+int MrmlViewItemList::compareItems( TQPtrCollection::Item item1,
+ TQPtrCollection::Item item2 )
{
double s1 = (static_cast<MrmlViewItem*>( item1 ))->similarity();
double s2 = (static_cast<MrmlViewItem*>( item2 ))->similarity();
diff --git a/kmrml/kmrml/mrml_view.h b/kmrml/kmrml/mrml_view.h
index f6c9f58c..f48c80be 100644
--- a/kmrml/kmrml/mrml_view.h
+++ b/kmrml/kmrml/mrml_view.h
@@ -19,16 +19,16 @@
#ifndef MRML_VIEW_H
#define MRML_VIEW_H
-#include <qevent.h>
-#include <qframe.h>
-#include <qptrlist.h>
-#include <qpixmap.h>
-#include <qpixmapcache.h>
-#include <qscrollview.h>
+#include <tqevent.h>
+#include <tqframe.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
+#include <tqpixmapcache.h>
+#include <tqscrollview.h>
-class QDomDocument;
-class QDomElement;
-class QTimer;
+class TQDomDocument;
+class TQDomElement;
+class TQTimer;
class KComboBox;
@@ -38,11 +38,11 @@ namespace KMrml
class MrmlViewItem;
-class MrmlViewItemList : public QPtrList<MrmlViewItem>
+class MrmlViewItemList : public TQPtrList<MrmlViewItem>
{
protected:
// sort by similarity
- virtual int compareItems( QPtrCollection::Item, QPtrCollection::Item );
+ virtual int compareItems( TQPtrCollection::Item, TQPtrCollection::Item );
};
@@ -54,16 +54,16 @@ class MrmlView : public QScrollView
Q_OBJECT
public:
- MrmlView( QWidget *parent = 0L, const char *name = 0L );
+ MrmlView( TQWidget *parent = 0L, const char *name = 0L );
~MrmlView();
MrmlViewItem * addItem( const KURL& url, const KURL& thumbURL,
- const QString& similarity );
+ const TQString& similarity );
MrmlViewItem * addItem( const KURL& url, const KURL& thumbURL,
double similarity );
- void addRelevanceToQuery( QDomDocument&, QDomElement& parent );
+ void addRelevanceToQuery( TQDomDocument&, TQDomElement& parent );
void clear();
@@ -71,30 +71,30 @@ public:
void stopDownloads();
- void saveState( QDataStream& stream );
- void restoreState( QDataStream& stream );
+ void saveState( TQDataStream& stream );
+ void restoreState( TQDataStream& stream );
signals:
void activated( const KURL& url, ButtonState button );
void onItem( const KURL& url );
protected:
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
private slots:
void slotLayout();
- void slotDownloadFinished( const KURL&, const QByteArray& );
+ void slotDownloadFinished( const KURL&, const TQByteArray& );
private:
/**
* @returns a _temporary_ pointer to a pixmap. Copy it!
*/
- QPixmap * getPixmap( const KURL& url );
+ TQPixmap * getPixmap( const KURL& url );
MrmlViewItemList m_items;
- QTimer *m_timer;
- QPixmapCache m_pixmapCache;
- QPixmap m_unavailablePixmap;
+ TQTimer *m_timer;
+ TQPixmapCache m_pixmapCache;
+ TQPixmap m_unavailablePixmap;
};
@@ -116,15 +116,15 @@ public:
MrmlView *view, const char *name=0L );
virtual ~MrmlViewItem();
- void setPixmap( const QPixmap& pixmap );
+ void setPixmap( const TQPixmap& pixmap );
- void createRelevanceElement( QDomDocument& document, QDomElement& parent );
+ void createRelevanceElement( TQDomDocument& document, TQDomElement& parent );
double similarity() const { return m_similarity; }
void setSimilarity( double value );
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
const KURL& url() const { return m_url; }
const KURL& thumbURL() const { return m_thumbURL; }
@@ -135,15 +135,15 @@ public:
void setRelevance( Relevance relevance );
protected:
- virtual void paintEvent( QPaintEvent * );
- virtual void resizeEvent( QResizeEvent * );
+ virtual void paintEvent( TQPaintEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
- virtual void mousePressEvent( QMouseEvent * );
- virtual void mouseMoveEvent( QMouseEvent * );
- virtual void mouseReleaseEvent( QMouseEvent * );
+ virtual void mousePressEvent( TQMouseEvent * );
+ virtual void mouseMoveEvent( TQMouseEvent * );
+ virtual void mouseReleaseEvent( TQMouseEvent * );
private:
- bool hitsPixmap( const QPoint& ) const;
+ bool hitsPixmap( const TQPoint& ) const;
MrmlView * view() const { return m_view; }
inline int pixmapX() const {
@@ -159,13 +159,13 @@ private:
KURL m_url;
KURL m_thumbURL;
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
double m_similarity;
const int similarityFullWidth;
bool m_hasRemotePixmap;
- QPoint pressedPos;
+ TQPoint pressedPos;
static const int spacing = 3;
static const int margin = 5;
@@ -173,7 +173,7 @@ private:
};
-QDataStream& operator <<( QDataStream& stream, const KMrml::MrmlViewItem& );
+TQDataStream& operator <<( TQDataStream& stream, const KMrml::MrmlViewItem& );
}
diff --git a/kmrml/kmrml/mrmlsearch.cpp b/kmrml/kmrml/mrmlsearch.cpp
index 6f411313..a2774fb9 100644
--- a/kmrml/kmrml/mrmlsearch.cpp
+++ b/kmrml/kmrml/mrmlsearch.cpp
@@ -30,8 +30,8 @@
#include <unistd.h>
-#include <qfile.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqstring.h>
#include <kconfig.h>
#include <kglobal.h>
#include <kinstance.h>
@@ -41,12 +41,12 @@
extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
{
- QString query;
+ TQString query;
for ( int i = 1; i < argc; i++ ) {
if ( i > 1 )
query += ';';
- QString path = QFile::decodeName( argv[i] );
+ TQString path = TQFile::decodeName( argv[i] );
if ( path.at( 0 ) == '/' ) {
KURL u;
u.setPath( path );
@@ -69,6 +69,6 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
qDebug("***** Query: %s ** URL: %s", query.latin1(), url.url().latin1());
return execlp( "kfmclient",
- "kfmclient", "openURL", QFile::encodeName(url.url()).data(),
+ "kfmclient", "openURL", TQFile::encodeName(url.url()).data(),
"text/mrml", (void *)0 );
}
diff --git a/kmrml/kmrml/propertysheet.cpp b/kmrml/kmrml/propertysheet.cpp
index ec46aac0..af913558 100644
--- a/kmrml/kmrml/propertysheet.cpp
+++ b/kmrml/kmrml/propertysheet.cpp
@@ -22,18 +22,18 @@
#include "mrml_shared.h"
#include <knuminput.h>
-#include <qwidget.h>
+#include <tqwidget.h>
using namespace KMrml;
-template class QValueList<QDomElement>;
+template class TQValueList<TQDomElement>;
PropertySheet::PropertySheet()
{
init();
}
-PropertySheet::PropertySheet( const QDomElement& elem )
+PropertySheet::PropertySheet( const TQDomElement& elem )
{
init();
@@ -67,7 +67,7 @@ PropertySheet& PropertySheet::operator= ( const PropertySheet& ps )
m_maxSubsetSize = ps.m_maxSubsetSize;
// deep copy of m_subSheets
- QPtrListIterator<PropertySheet> it( ps.m_subSheets );
+ TQPtrListIterator<PropertySheet> it( ps.m_subSheets );
for ( ; it.current(); ++it )
m_subSheets.append( new PropertySheet( *it.current() ) );
@@ -80,7 +80,7 @@ void PropertySheet::init()
m_visibility = Visible;
}
-void PropertySheet::initFromDOM( const QDomElement& elem )
+void PropertySheet::initFromDOM( const TQDomElement& elem )
{
m_subSheets.clear();
@@ -98,16 +98,16 @@ void PropertySheet::initFromDOM( const QDomElement& elem )
m_minSubsetSize = toInt( elem.attribute( MrmlShared::minSubsetSize() ));
m_maxSubsetSize = toInt( elem.attribute( MrmlShared::maxSubsetSize() ));
- QValueList<QDomElement> children =
+ TQValueList<TQDomElement> children =
KMrml::directChildElements( elem, MrmlShared::propertySheet() );
- QValueListConstIterator<QDomElement> it = children.begin();
+ TQValueListConstIterator<TQDomElement> it = children.begin();
for ( ; it != children.end(); ++it )
m_subSheets.append( new PropertySheet( *it ) );
}
-QWidget * PropertySheet::createWidget( QWidget */*parent*/, const char */*name*/ )
+TQWidget * PropertySheet::createWidget( TQWidget */*parent*/, const char */*name*/ )
{
- QWidget *w = 0L;
+ TQWidget *w = 0L;
switch ( m_type )
{
@@ -138,7 +138,7 @@ QWidget * PropertySheet::createWidget( QWidget */*parent*/, const char */*name*/
//
// static methods
//
-PropertySheet::Visibility PropertySheet::getVisibility( const QString& value )
+PropertySheet::Visibility PropertySheet::getVisibility( const TQString& value )
{
Visibility vis;
@@ -152,7 +152,7 @@ PropertySheet::Visibility PropertySheet::getVisibility( const QString& value )
return vis;
}
-PropertySheet::Type PropertySheet::getType( const QString& value )
+PropertySheet::Type PropertySheet::getType( const TQString& value )
{
Type type = (Type) 0;
@@ -178,7 +178,7 @@ PropertySheet::Type PropertySheet::getType( const QString& value )
return type;
}
-PropertySheet::SendType PropertySheet::getSendType( const QString& value )
+PropertySheet::SendType PropertySheet::getSendType( const TQString& value )
{
SendType type = (SendType) 0;
@@ -198,7 +198,7 @@ PropertySheet::SendType PropertySheet::getSendType( const QString& value )
return type;
}
-int PropertySheet::toInt( const QString& value, int defaultValue )
+int PropertySheet::toInt( const TQString& value, int defaultValue )
{
bool ok = false;
int res = value.toInt( &ok );
diff --git a/kmrml/kmrml/propertysheet.h b/kmrml/kmrml/propertysheet.h
index 029d0242..e4759282 100644
--- a/kmrml/kmrml/propertysheet.h
+++ b/kmrml/kmrml/propertysheet.h
@@ -19,11 +19,11 @@
#ifndef PROPERTYSHEET_H
#define PROPERTYSHEET_H
-#include <qdom.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqdom.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
-class QWidget;
+class TQWidget;
namespace KMrml
{
@@ -59,7 +59,7 @@ namespace KMrml
};
PropertySheet();
- PropertySheet( const QDomElement& elem );
+ PropertySheet( const TQDomElement& elem );
PropertySheet( const PropertySheet& ps );
~PropertySheet() {};
@@ -69,32 +69,32 @@ namespace KMrml
// required mrml attributes
return !m_id.isNull() && m_type != 0 && m_sendType != 0;
}
- void initFromDOM( const QDomElement& elem );
+ void initFromDOM( const TQDomElement& elem );
- void toElement( QDomElement& parent );
+ void toElement( TQDomElement& parent );
- QWidget * createWidget( QWidget *parent, const char *name = 0 );
+ TQWidget * createWidget( TQWidget *parent, const char *name = 0 );
private:
- static Visibility getVisibility( const QString& value );
- static Type getType( const QString& value );
- static SendType getSendType( const QString& value );
- static int toInt( const QString& value, int defaultValue = 0 );
+ static Visibility getVisibility( const TQString& value );
+ static Type getType( const TQString& value );
+ static SendType getSendType( const TQString& value );
+ static int toInt( const TQString& value, int defaultValue = 0 );
void init();
// update operator=() when adding data members!
- QPtrList<PropertySheet> m_subSheets;
+ TQPtrList<PropertySheet> m_subSheets;
Visibility m_visibility;
Type m_type;
- QString m_caption;
- QString m_id;
+ TQString m_caption;
+ TQString m_id;
SendType m_sendType;
- QString m_sendName;
- QString m_sendValue;
+ TQString m_sendName;
+ TQString m_sendValue;
int m_minRange;
int m_maxRange;
diff --git a/kmrml/kmrml/propertywidgets.cpp b/kmrml/kmrml/propertywidgets.cpp
index ef00b18f..18508f3a 100644
--- a/kmrml/kmrml/propertywidgets.cpp
+++ b/kmrml/kmrml/propertywidgets.cpp
@@ -19,8 +19,8 @@
#include "propertywidgets.h"
IntegerWidget::IntegerWidget( const PropertySheet& sheet,
- QWidget *parent, const char *name )
- : QHBox( parent, name )
+ TQWidget *parent, const char *name )
+ : TQHBox( parent, name )
{
}
@@ -39,8 +39,8 @@ int IntegerWidget::value() const
///////////////////////////////////////////////////////////////////
ComboWidget::ComboWidget( const PropertySheet& sheet,
- QWidget *parent, const char *name )
- : QHBox( parent, name )
+ TQWidget *parent, const char *name )
+ : TQHBox( parent, name )
{
}
@@ -50,7 +50,7 @@ ComboWidget::~ComboWidget()
}
-QString ComboWidget::value() const
+TQString ComboWidget::value() const
{
}
@@ -60,8 +60,8 @@ QString ComboWidget::value() const
///////////////////////////////////////////////////////////////////
CheckBoxWidget::CheckBoxWidget( const PropertySheet& sheet,
- QWidget *parent, const char *name )
- : QHBox( parent, name )
+ TQWidget *parent, const char *name )
+ : TQHBox( parent, name )
{
}
@@ -81,8 +81,8 @@ bool CheckBoxWidget::value() const
///////////////////////////////////////////////////////////////////
LineEditWidget::LineEditWidget( const PropertySheet& sheet,
- QWidget *parent, const char *name )
- : QHBox( parent, name )
+ TQWidget *parent, const char *name )
+ : TQHBox( parent, name )
{
}
@@ -92,7 +92,7 @@ LineEditWidget::~LineEditWidget()
}
-QString LineEditWidget::value() const
+TQString LineEditWidget::value() const
{
}
@@ -102,8 +102,8 @@ QString LineEditWidget::value() const
///////////////////////////////////////////////////////////////////
ListBoxWidget::ListBoxWidget( const PropertySheet& sheet,
- QWidget *parent, const char *name )
- : QHBox( parent, name )
+ TQWidget *parent, const char *name )
+ : TQHBox( parent, name )
{
}
@@ -113,7 +113,7 @@ ListBoxWidget::~ListBoxWidget()
}
-QStringList ListBoxWidget::value() const
+TQStringList ListBoxWidget::value() const
{
}
diff --git a/kmrml/kmrml/propertywidgets.h b/kmrml/kmrml/propertywidgets.h
index c738d03d..def1d2ca 100644
--- a/kmrml/kmrml/propertywidgets.h
+++ b/kmrml/kmrml/propertywidgets.h
@@ -19,7 +19,7 @@
#ifndef PROPERTYWIDGETS_H
#define PROPERTYWIDGETS_H
-#include <qhbox.h>
+#include <tqhbox.h>
#include "propertysheet.h"
@@ -31,7 +31,7 @@ namespace KMrml
public:
IntegerWidget( const PropertySheet& sheet,
- QWidget *parent = parent, const char *name = 0L );
+ TQWidget *parent = parent, const char *name = 0L );
~IntegerWidget();
int value() const;
@@ -46,10 +46,10 @@ namespace KMrml
public:
ComboWidget( const PropertySheet& sheet,
- QWidget *parent = parent, const char *name = 0L );
+ TQWidget *parent = parent, const char *name = 0L );
~ComboWidget();
- QString value() const;
+ TQString value() const;
private:
@@ -61,7 +61,7 @@ namespace KMrml
public:
CheckBoxWidget( const PropertySheet& sheet,
- QWidget *parent = parent, const char *name = 0L );
+ TQWidget *parent = parent, const char *name = 0L );
~CheckBoxWidget();
bool value();
@@ -78,10 +78,10 @@ namespace KMrml
public:
LineEditWidget( const PropertySheet& sheet,
- QWidget *parent = parent, const char *name = 0L );
+ TQWidget *parent = parent, const char *name = 0L );
~LineEditWidget();
- QString value();
+ TQString value();
private:
@@ -93,10 +93,10 @@ namespace KMrml
public:
ListBoxWidget( const PropertySheet& sheet,
- QWidget *parent = parent, const char *name = 0L );
+ TQWidget *parent = parent, const char *name = 0L );
~ListBoxWidget();
- QStringList values();
+ TQStringList values();
private:
diff --git a/kmrml/kmrml/server/watcher.cpp b/kmrml/kmrml/server/watcher.cpp
index e6137cc5..96314257 100644
--- a/kmrml/kmrml/server/watcher.cpp
+++ b/kmrml/kmrml/server/watcher.cpp
@@ -28,7 +28,7 @@
using namespace KMrml;
-Watcher::Watcher( const QCString& name )
+Watcher::Watcher( const TQCString& name )
: KDEDModule( name )
{
m_daemons.setAutoDelete( true );
@@ -36,8 +36,8 @@ Watcher::Watcher( const QCString& name )
// safety, for clients that die without unregistering
KApplication::dcopClient()->setNotifications( true );
connect( KApplication::dcopClient(),
- SIGNAL( applicationRemoved( const QCString& )),
- SLOT( slotAppUnregistered( const QCString& )));
+ TQT_SIGNAL( applicationRemoved( const TQCString& )),
+ TQT_SLOT( slotAppUnregistered( const TQCString& )));
}
Watcher::~Watcher()
@@ -45,9 +45,9 @@ Watcher::~Watcher()
KApplication::dcopClient()->setNotifications( false );
}
-bool Watcher::requireDaemon( const QCString& clientAppId,
- const QString& daemonKey,
- const QString& commandline,
+bool Watcher::requireDaemon( const TQCString& clientAppId,
+ const TQString& daemonKey,
+ const TQString& commandline,
uint timeout /* seconds */,
int restartOnFailure )
{
@@ -84,20 +84,20 @@ bool Watcher::requireDaemon( const QCString& clientAppId,
daemon->process->setEnvironment( "LANG", "C" );
daemon->process->setEnvironment( "LANGUAGE", "C" );
*daemon->process << commandline;
- connect( daemon->process, SIGNAL( processExited( KProcess * ) ),
- SLOT( slotProcExited( KProcess * )));
+ connect( daemon->process, TQT_SIGNAL( processExited( KProcess * ) ),
+ TQT_SLOT( slotProcExited( KProcess * )));
return startDaemon( daemon );
}
}
-void Watcher::unrequireDaemon( const QCString& clientAppId,
- const QString& daemonKey )
+void Watcher::unrequireDaemon( const TQCString& clientAppId,
+ const TQString& daemonKey )
{
unrequireDaemon( m_daemons.find( daemonKey ), clientAppId );
}
void Watcher::unrequireDaemon( DaemonData *daemon,
- const QCString& clientAppId )
+ const TQCString& clientAppId )
{
if ( daemon )
{
@@ -106,9 +106,9 @@ void Watcher::unrequireDaemon( DaemonData *daemon,
{
if ( !daemon->timer )
{
- daemon->timer = new QTimer();
- connect( daemon->timer, SIGNAL( timeout() ),
- SLOT( slotTimeout() ));
+ daemon->timer = new TQTimer();
+ connect( daemon->timer, TQT_SIGNAL( timeout() ),
+ TQT_SLOT( slotTimeout() ));
}
daemon->timer->start( daemon->timeout * 1000, true );
}
@@ -118,10 +118,10 @@ void Watcher::unrequireDaemon( DaemonData *daemon,
<< clientAppId << endl;
}
-QStringList Watcher::runningDaemons() const
+TQStringList Watcher::runningDaemons() const
{
- QStringList result;
- QDictIterator<DaemonData> it( m_daemons );
+ TQStringList result;
+ TQDictIterator<DaemonData> it( m_daemons );
for ( ; it.current(); ++it )
result.append( it.current()->commandline );
@@ -188,7 +188,7 @@ bool Watcher::startDaemon( DaemonData *daemon )
void Watcher::slotTimeout()
{
- QTimer *timer = static_cast<QTimer*>( const_cast<QObject *>( sender() ) );
+ TQTimer *timer = static_cast<TQTimer*>( const_cast<TQObject *>( sender() ) );
DaemonData *daemon = findDaemonFromTimer( timer );
if ( daemon )
{
@@ -197,7 +197,7 @@ void Watcher::slotTimeout()
// the daemon and KProcess might get deleted by killing the
// KProcess (through slotProcExited()), so don't dereference
// daemon after proc->kill()
- QString key = daemon->daemonKey;
+ TQString key = daemon->daemonKey;
// noone registered during the timeout, so kill the daemon
if ( !daemon->process->kill() )
@@ -211,7 +211,7 @@ void Watcher::slotTimeout()
DaemonData * Watcher::findDaemonFromProcess( KProcess *proc )
{
DaemonData *daemon;
- QDictIterator<DaemonData> it( m_daemons );
+ TQDictIterator<DaemonData> it( m_daemons );
for ( ; (daemon = it.current()); ++it )
{
if ( daemon->process == proc )
@@ -221,10 +221,10 @@ DaemonData * Watcher::findDaemonFromProcess( KProcess *proc )
return 0L;
}
-DaemonData * Watcher::findDaemonFromTimer( QTimer *timer )
+DaemonData * Watcher::findDaemonFromTimer( TQTimer *timer )
{
DaemonData *daemon;
- QDictIterator<DaemonData> it( m_daemons );
+ TQDictIterator<DaemonData> it( m_daemons );
for ( ; (daemon = it.current()); ++it )
{
if ( daemon->timer == timer )
@@ -234,13 +234,13 @@ DaemonData * Watcher::findDaemonFromTimer( QTimer *timer )
return 0L;
}
-void Watcher::slotAppUnregistered( const QCString& appId )
+void Watcher::slotAppUnregistered( const TQCString& appId )
{
if ( m_daemons.isEmpty() )
return;
DaemonData *daemon;
- QDictIterator<DaemonData> it( m_daemons );
+ TQDictIterator<DaemonData> it( m_daemons );
for ( ; (daemon = it.current()); ++it )
{
if ( daemon->apps.find( appId ) != -1 )
@@ -270,7 +270,7 @@ void Watcher::emitFailure( DaemonData *daemon )
}
extern "C" {
- KDE_EXPORT KDEDModule *create_daemonwatcher(const QCString & obj )
+ KDE_EXPORT KDEDModule *create_daemonwatcher(const TQCString & obj )
{
return new Watcher( obj );
}
diff --git a/kmrml/kmrml/server/watcher.h b/kmrml/kmrml/server/watcher.h
index 67d9b5e1..ef7ae9eb 100644
--- a/kmrml/kmrml/server/watcher.h
+++ b/kmrml/kmrml/server/watcher.h
@@ -19,11 +19,11 @@
#ifndef LAUNCHER_H
#define LAUNCHER_H
-#include <qdict.h>
-#include <qmap.h>
-#include <qstrlist.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqdict.h>
+#include <tqmap.h>
+#include <tqstrlist.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kdedmodule.h>
#include <kprocess.h>
@@ -33,7 +33,7 @@ namespace KMrml
class DaemonData
{
public:
- DaemonData( const QString& key, const QString& cmd,
+ DaemonData( const TQString& key, const TQString& cmd,
uint time, int numRestarts )
: daemonKey( key ),
commandline( cmd ),
@@ -49,13 +49,13 @@ namespace KMrml
delete process;
delete timer;
}
- QString daemonKey;
- QString commandline;
+ TQString daemonKey;
+ TQString commandline;
uint timeout;
- QStrList apps;
+ TQStrList apps;
int restartOnFailure;
KProcess *process;
- QTimer *timer;
+ TQTimer *timer;
};
class Watcher : public KDEDModule
@@ -64,22 +64,22 @@ namespace KMrml
K_DCOP
public:
- Watcher( const QCString& name = "daemonwatcher" );
+ Watcher( const TQCString& name = "daemonwatcher" );
~Watcher();
k_dcop:
- virtual bool requireDaemon( const QCString& clientAppId,
- const QString& daemonKey,
- const QString& commandline,
+ virtual bool requireDaemon( const TQCString& clientAppId,
+ const TQString& daemonKey,
+ const TQString& commandline,
uint timeout = 60 /* seconds */,
int numRestarts = 5 );
- virtual void unrequireDaemon( const QCString& clientAppId,
- const QString& daemonKey );
- virtual QStringList runningDaemons() const;
+ virtual void unrequireDaemon( const TQCString& clientAppId,
+ const TQString& daemonKey );
+ virtual TQStringList runningDaemons() const;
k_dcop_signals:
- void daemonExited(const QString& daemonKey, pid_t pid, int exitStatus);
- void daemonDied( const QString& daemonKey, pid_t pid );
+ void daemonExited(const TQString& daemonKey, pid_t pid, int exitStatus);
+ void daemonDied( const TQString& daemonKey, pid_t pid );
protected:
bool startDaemon( DaemonData *daemon );
@@ -88,18 +88,18 @@ namespace KMrml
virtual void slotTimeout();
private:
- void unrequireDaemon( DaemonData *daemon, const QCString& clientAppId);
+ void unrequireDaemon( DaemonData *daemon, const TQCString& clientAppId);
DaemonData *findDaemonFromProcess( KProcess *proc );
- DaemonData *findDaemonFromTimer( QTimer *timer );
+ DaemonData *findDaemonFromTimer( TQTimer *timer );
void emitExited( DaemonData *daemon );
void emitFailure( DaemonData *daemon );
private slots:
void slotProcExited( KProcess *proc );
- void slotAppUnregistered( const QCString& appId );
+ void slotAppUnregistered( const TQCString& appId );
- QDict<DaemonData> m_daemons;
+ TQDict<DaemonData> m_daemons;
};
}
diff --git a/kolourpaint/cursors/kpcursorlightcross.cpp b/kolourpaint/cursors/kpcursorlightcross.cpp
index 0595d320..34051dbf 100644
--- a/kolourpaint/cursors/kpcursorlightcross.cpp
+++ b/kolourpaint/cursors/kpcursorlightcross.cpp
@@ -30,8 +30,8 @@
#include <kpcursorlightcross.h>
-#include <qbitmap.h>
-#include <qcursor.h>
+#include <tqbitmap.h>
+#include <tqcursor.h>
#include <kdebug.h>
@@ -81,7 +81,7 @@ static void setPixel (unsigned char *colorBitmap,
}
-const QCursor *kpMakeCursorLightCross ()
+const TQCursor *kpMakeCursorLightCross ()
{
#if DEBUG_KP_CURSOR_LIGHT_CROSS
kdDebug () << "kpMakeCursorLightCross() " << endl;
@@ -117,8 +117,8 @@ const QCursor *kpMakeCursorLightCross ()
#undef X_
}
- QCursor *cursor = new QCursor (QBitmap (side, side, colorBitmap, true/*little endian bit order*/),
- QBitmap (side, side, maskBitmap, true/*little endian bit order*/));
+ TQCursor *cursor = new TQCursor (TQBitmap (side, side, colorBitmap, true/*little endian bit order*/),
+ TQBitmap (side, side, maskBitmap, true/*little endian bit order*/));
delete [] maskBitmap;
delete [] colorBitmap;
diff --git a/kolourpaint/cursors/kpcursorlightcross.h b/kolourpaint/cursors/kpcursorlightcross.h
index d2bf83e1..131d94c3 100644
--- a/kolourpaint/cursors/kpcursorlightcross.h
+++ b/kolourpaint/cursors/kpcursorlightcross.h
@@ -30,9 +30,9 @@
#define __kp_cursor_light_cross_h__
-class QCursor;
+class TQCursor;
-const QCursor *kpMakeCursorLightCross ();
+const TQCursor *kpMakeCursorLightCross ();
#endif // __kp_cursor_light_cross_h__
diff --git a/kolourpaint/cursors/kpcursorprovider.cpp b/kolourpaint/cursors/kpcursorprovider.cpp
index 45d43801..32cc3dd8 100644
--- a/kolourpaint/cursors/kpcursorprovider.cpp
+++ b/kolourpaint/cursors/kpcursorprovider.cpp
@@ -28,18 +28,18 @@
#include <kpcursorprovider.h>
-#include <qcursor.h>
+#include <tqcursor.h>
#include <kstaticdeleter.h>
#include <kpcursorlightcross.h>
-static const QCursor *theLightCursor = 0;
+static const TQCursor *theLightCursor = 0;
// public static
-QCursor kpCursorProvider::lightCross ()
+TQCursor kpCursorProvider::lightCross ()
{
// TODO: don't leak (although it's cleaned up on exit by OS anyway)
if (!theLightCursor)
diff --git a/kolourpaint/cursors/kpcursorprovider.h b/kolourpaint/cursors/kpcursorprovider.h
index 191b4f78..ab9b4218 100644
--- a/kolourpaint/cursors/kpcursorprovider.h
+++ b/kolourpaint/cursors/kpcursorprovider.h
@@ -30,13 +30,13 @@
#define __kp_cursor_provider_h__
-class QCursor;
+class TQCursor;
class kpCursorProvider
{
public:
- static QCursor lightCross ();
+ static TQCursor lightCross ();
};
diff --git a/kolourpaint/kolourpaint.cpp b/kolourpaint/kolourpaint.cpp
index b9ba0f0c..e1b41fc5 100644
--- a/kolourpaint/kolourpaint.cpp
+++ b/kolourpaint/kolourpaint.cpp
@@ -26,7 +26,7 @@
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <dcopclient.h>
#include <kaboutdata.h>
@@ -192,8 +192,8 @@ int main (int argc, char *argv [])
// Qt says this is necessary but I don't think it is...
- QObject::connect (&app, SIGNAL (lastWindowClosed ()),
- &app, SLOT (quit ()));
+ TQObject::connect (&app, TQT_SIGNAL (lastWindowClosed ()),
+ &app, TQT_SLOT (quit ()));
if (app.isRestored ())
diff --git a/kolourpaint/kpcolor.cpp b/kolourpaint/kpcolor.cpp
index a9dc000b..1c325d39 100644
--- a/kolourpaint/kpcolor.cpp
+++ b/kolourpaint/kpcolor.cpp
@@ -31,7 +31,7 @@
#include <kpcolor.h>
-#include <qdatastream.h>
+#include <tqdatastream.h>
#include <kdebug.h>
@@ -100,7 +100,7 @@ kpColor::kpColor (const kpColor &rhs)
}
// friend
-QDataStream &operator<< (QDataStream &stream, const kpColor &color)
+TQDataStream &operator<< (TQDataStream &stream, const kpColor &color)
{
stream << int (color.m_rgbaIsValid) << int (color.m_rgba);
@@ -108,7 +108,7 @@ QDataStream &operator<< (QDataStream &stream, const kpColor &color)
}
// friend
-QDataStream &operator>> (QDataStream &stream, kpColor &color)
+TQDataStream &operator>> (TQDataStream &stream, kpColor &color)
{
int a, b;
stream >> a >> b;
@@ -321,7 +321,7 @@ QRgb kpColor::toQRgb () const
}
// public
-const QColor &kpColor::toQColor () const
+const TQColor &kpColor::toQColor () const
{
if (!m_rgbaIsValid)
{
@@ -340,10 +340,10 @@ const QColor &kpColor::toQColor () const
return Qt::black;
}
- m_colorCache = QColor (m_rgba);
+ m_colorCache = TQColor (m_rgba);
if (!m_colorCache.isValid ())
{
- kdError () << "kpColor::toQColor () internal error - could not return valid QColor"
+ kdError () << "kpColor::toQColor () internal error - could not return valid TQColor"
<< endl;
return Qt::black;
}
@@ -354,7 +354,7 @@ const QColor &kpColor::toQColor () const
}
// public
-QColor kpColor::maskColor () const
+TQColor kpColor::maskColor () const
{
return isTransparent () ? Qt::color0 : Qt::color1;
}
diff --git a/kolourpaint/kpcolor.h b/kolourpaint/kpcolor.h
index 131d4b61..255d645f 100644
--- a/kolourpaint/kpcolor.h
+++ b/kolourpaint/kpcolor.h
@@ -30,9 +30,9 @@
#define __kp_color_h__
-#include <qcolor.h>
+#include <tqcolor.h>
-class QDataStream;
+class TQDataStream;
//
@@ -42,10 +42,10 @@ class QDataStream;
// error handling, reporting (noisy kdError()'s) and recovery.
//
// In general, you should pass around kpColor objects instead of QRgb
-// and QColor. Only convert an opaque kpColor to a QColor (using toQColor())
+// and TQColor. Only convert an opaque kpColor to a TQColor (using toQColor())
// if you need to draw something onscreen. Constructing a kpColor object
-// from QColor is probably wrong since onscreen representations of color
-// are not guaranteed to be faithful (due to QColor color allocation).
+// from TQColor is probably wrong since onscreen representations of color
+// are not guaranteed to be faithful (due to TQColor color allocation).
//
class kpColor
{
@@ -54,8 +54,8 @@ public:
kpColor (int red, int green, int blue, bool isTransparent = false);
kpColor (const QRgb &rgba);
kpColor (const kpColor &rhs);
- friend QDataStream &operator<< (QDataStream &stream, const kpColor &color);
- friend QDataStream &operator>> (QDataStream &stream, kpColor &color);
+ friend TQDataStream &operator<< (TQDataStream &stream, const kpColor &color);
+ friend TQDataStream &operator>> (TQDataStream &stream, kpColor &color);
kpColor &operator= (const kpColor &rhs);
bool operator== (const kpColor &rhs) const;
bool operator!= (const kpColor &rhs) const;
@@ -84,17 +84,17 @@ public:
QRgb toQRgb () const;
// (only valid if isOpaque())
- // (const QColor & return results in fewer color reallocations)
- const QColor &toQColor () const;
+ // (const TQColor & return results in fewer color reallocations)
+ const TQColor &toQColor () const;
- QColor maskColor () const;
+ TQColor maskColor () const;
private:
bool m_rgbaIsValid;
QRgb m_rgba;
mutable bool m_colorCacheIsValid;
- mutable QColor m_colorCache;
+ mutable TQColor m_colorCache;
};
diff --git a/kolourpaint/kpcommandhistory.cpp b/kolourpaint/kpcommandhistory.cpp
index 33010918..6849ebf4 100644
--- a/kolourpaint/kpcommandhistory.cpp
+++ b/kolourpaint/kpcommandhistory.cpp
@@ -33,7 +33,7 @@
#include <limits.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kactionclasses.h>
#include <kapplication.h>
@@ -51,12 +51,12 @@
//template <typename T>
-static void clearPointerList (QValueList <kpCommand *> *listPtr)
+static void clearPointerList (TQValueList <kpCommand *> *listPtr)
{
if (!listPtr)
return;
- for (QValueList <kpCommand *>::iterator it = listPtr->begin ();
+ for (TQValueList <kpCommand *>::iterator it = listPtr->begin ();
it != listPtr->end ();
it++)
{
@@ -118,7 +118,7 @@ kpViewManager *kpCommand::viewManager () const
// kpNamedCommand
//
-kpNamedCommand::kpNamedCommand (const QString &name, kpMainWindow *mainWindow)
+kpNamedCommand::kpNamedCommand (const TQString &name, kpMainWindow *mainWindow)
: kpCommand (mainWindow),
m_name (name)
{
@@ -130,7 +130,7 @@ kpNamedCommand::~kpNamedCommand ()
// public virtual [base kpCommand]
-QString kpNamedCommand::name () const
+TQString kpNamedCommand::name () const
{
return m_name;
}
@@ -144,7 +144,7 @@ struct kpMacroCommandPrivate
{
};
-kpMacroCommand::kpMacroCommand (const QString &name, kpMainWindow *mainWindow)
+kpMacroCommand::kpMacroCommand (const TQString &name, kpMainWindow *mainWindow)
: kpNamedCommand (name, mainWindow),
d (new kpMacroCommandPrivate ())
{
@@ -168,7 +168,7 @@ int kpMacroCommand::size () const
#if DEBUG_KP_COMMAND_HISTORY && 0
kdDebug () << "\tcalculating:" << endl;
#endif
- for (QValueList <kpCommand *>::const_iterator it = m_commandList.begin ();
+ for (TQValueList <kpCommand *>::const_iterator it = m_commandList.begin ();
it != m_commandList.end ();
it++)
{
@@ -204,7 +204,7 @@ void kpMacroCommand::execute ()
#if DEBUG_KP_COMMAND_HISTORY
kdDebug () << "kpMacroCommand::execute()" << endl;
#endif
- for (QValueList <kpCommand *>::const_iterator it = m_commandList.begin ();
+ for (TQValueList <kpCommand *>::const_iterator it = m_commandList.begin ();
it != m_commandList.end ();
it++)
{
@@ -221,7 +221,7 @@ void kpMacroCommand::unexecute ()
#if DEBUG_KP_COMMAND_HISTORY
kdDebug () << "kpMacroCommand::unexecute()" << endl;
#endif
- QValueList <kpCommand *>::const_iterator it = m_commandList.end ();
+ TQValueList <kpCommand *>::const_iterator it = m_commandList.end ();
it--;
while (it != m_commandList.end ())
@@ -257,15 +257,15 @@ kpCommandHistoryBase::kpCommandHistoryBase (bool doReadConfig,
: d (new kpCommandHistoryBasePrivate ())
{
m_actionUndo = new KToolBarPopupAction (undoActionText (),
- QString::fromLatin1 ("undo"),
+ TQString::fromLatin1 ("undo"),
KStdAccel::shortcut (KStdAccel::Undo),
- this, SLOT (undo ()),
+ this, TQT_SLOT (undo ()),
ac, KStdAction::name (KStdAction::Undo));
m_actionRedo = new KToolBarPopupAction (redoActionText (),
- QString::fromLatin1 ("redo"),
+ TQString::fromLatin1 ("redo"),
KStdAccel::shortcut (KStdAccel::Redo),
- this, SLOT (redo ()),
+ this, TQT_SLOT (redo ()),
ac, KStdAction::name (KStdAction::Redo));
@@ -273,10 +273,10 @@ kpCommandHistoryBase::kpCommandHistoryBase (bool doReadConfig,
m_actionRedo->setEnabled (false);
- connect (m_actionUndo->popupMenu (), SIGNAL (activated (int)),
- this, SLOT (undoUpToNumber (int)));
- connect (m_actionRedo->popupMenu (), SIGNAL (activated (int)),
- this, SLOT (redoUpToNumber (int)));
+ connect (m_actionUndo->popupMenu (), TQT_SIGNAL (activated (int)),
+ this, TQT_SLOT (undoUpToNumber (int)));
+ connect (m_actionRedo->popupMenu (), TQT_SIGNAL (activated (int)),
+ this, TQT_SLOT (redoUpToNumber (int)));
m_undoMinLimit = 10;
@@ -620,7 +620,7 @@ void kpCommandHistoryBase::redoUpToNumber (int which)
// protected
-QString kpCommandHistoryBase::undoActionText () const
+TQString kpCommandHistoryBase::undoActionText () const
{
kpCommand *undoCommand = nextUndoCommand ();
@@ -631,7 +631,7 @@ QString kpCommandHistoryBase::undoActionText () const
}
// protected
-QString kpCommandHistoryBase::redoActionText () const
+TQString kpCommandHistoryBase::redoActionText () const
{
kpCommand *redoCommand = nextRedoCommand ();
@@ -654,11 +654,11 @@ void kpCommandHistoryBase::trimCommandListsUpdateActions ()
}
// protected
-void kpCommandHistoryBase::trimCommandList (QValueList <kpCommand *> *commandList)
+void kpCommandHistoryBase::trimCommandList (TQValueList <kpCommand *> *commandList)
{
#if DEBUG_KP_COMMAND_HISTORY
kdDebug () << "kpCommandHistoryBase::trimCommandList()" << endl;
- QTime timer; timer.start ();
+ TQTime timer; timer.start ();
#endif
if (!commandList)
@@ -689,7 +689,7 @@ void kpCommandHistoryBase::trimCommandList (QValueList <kpCommand *> *commandLis
kdDebug () << "\tsize over undoMinLimit - iterating thru cmds:" << endl;
#endif
- QValueList <kpCommand *>::iterator it = commandList->begin ();
+ TQValueList <kpCommand *>::iterator it = commandList->begin ();
int upto = 0;
int sizeSoFar = 0;
@@ -772,15 +772,15 @@ void kpCommandHistoryBase::trimCommandLists ()
static void populatePopupMenu (KPopupMenu *popupMenu,
- const QString &undoOrRedo,
- const QValueList <kpCommand *> &commandList)
+ const TQString &undoOrRedo,
+ const TQValueList <kpCommand *> &commandList)
{
if (!popupMenu)
return;
popupMenu->clear ();
- QValueList <kpCommand *>::const_iterator it = commandList.begin ();
+ TQValueList <kpCommand *>::const_iterator it = commandList.begin ();
int i = 0;
while (i < 10 && it != commandList.end ())
{
@@ -810,7 +810,7 @@ void kpCommandHistoryBase::updateActions ()
m_actionUndo->setEnabled ((bool) nextUndoCommand ());
m_actionUndo->setText (undoActionText ());
#if DEBUG_KP_COMMAND_HISTORY
- QTime timer; timer.start ();
+ TQTime timer; timer.start ();
#endif
populatePopupMenu (m_actionUndo->popupMenu (),
i18n ("Undo"),
diff --git a/kolourpaint/kpcommandhistory.h b/kolourpaint/kpcommandhistory.h
index a1541512..c29d68fc 100644
--- a/kolourpaint/kpcommandhistory.h
+++ b/kolourpaint/kpcommandhistory.h
@@ -29,9 +29,9 @@
#ifndef KP_COMMAND_HISTORY_H
#define KP_COMMAND_HISTORY_H
-#include <qobject.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
class KActionCollection;
@@ -50,7 +50,7 @@ public:
virtual ~kpCommand ();
public:
- virtual QString name () const = 0;
+ virtual TQString name () const = 0;
// Returns the estimated size in bytes.
//
@@ -82,20 +82,20 @@ protected:
class kpNamedCommand : public kpCommand
{
public:
- kpNamedCommand (const QString &name, kpMainWindow *mainWindow);
+ kpNamedCommand (const TQString &name, kpMainWindow *mainWindow);
virtual ~kpNamedCommand ();
- virtual QString name () const;
+ virtual TQString name () const;
protected:
- QString m_name;
+ TQString m_name;
};
class kpMacroCommand : public kpNamedCommand
{
public:
- kpMacroCommand (const QString &name, kpMainWindow *mainWindow);
+ kpMacroCommand (const TQString &name, kpMainWindow *mainWindow);
virtual ~kpMacroCommand ();
@@ -116,7 +116,7 @@ public:
void addCommand (kpCommand *command);
protected:
- QValueList <kpCommand *> m_commandList;
+ TQValueList <kpCommand *> m_commandList;
private:
class kpMacroCommandPrivate *d;
@@ -176,11 +176,11 @@ public slots:
virtual void redoUpToNumber (int which);
protected:
- QString undoActionText () const;
- QString redoActionText () const;
+ TQString undoActionText () const;
+ TQString redoActionText () const;
void trimCommandListsUpdateActions ();
- void trimCommandList (QValueList <kpCommand *> *commandList);
+ void trimCommandList (TQValueList <kpCommand *> *commandList);
void trimCommandLists ();
void updateActions ();
@@ -200,8 +200,8 @@ protected:
KToolBarPopupAction *m_actionUndo, *m_actionRedo;
// (Front element is the next one)
- QValueList <kpCommand *> m_undoCommandList;
- QValueList <kpCommand *> m_redoCommandList;
+ TQValueList <kpCommand *> m_undoCommandList;
+ TQValueList <kpCommand *> m_redoCommandList;
int m_undoMinLimit, m_undoMaxLimit, m_undoMaxLimitSizeLimit;
diff --git a/kolourpaint/kpdefs.h b/kolourpaint/kpdefs.h
index 15faaee0..a437c2d5 100644
--- a/kolourpaint/kpdefs.h
+++ b/kolourpaint/kpdefs.h
@@ -32,10 +32,10 @@
#include <limits.h>
-#include <qglobal.h>
-#include <qpoint.h>
-#include <qsize.h>
-#include <qstring.h>
+#include <tqglobal.h>
+#include <tqpoint.h>
+#include <tqsize.h>
+#include <tqstring.h>
#include <kdeversion.h>
@@ -55,81 +55,81 @@
#define KP_RADIANS_TO_DEGREES(rad) ((rad) * 180.0 / KP_PI)
-#define KP_INVALID_POINT QPoint (INT_MIN / 8, INT_MIN / 8)
+#define KP_INVALID_POINT TQPoint (INT_MIN / 8, INT_MIN / 8)
#define KP_INVALID_WIDTH (INT_MIN / 8)
#define KP_INVALID_HEIGHT (INT_MIN / 8)
-#define KP_INVALID_SIZE QSize (INT_MIN / 8, INT_MIN / 8)
+#define KP_INVALID_SIZE TQSize (INT_MIN / 8, INT_MIN / 8)
//
// Settings
//
-#define kpSettingsGroupGeneral QString::fromLatin1 ("General Settings")
-#define kpSettingFirstTime QString::fromLatin1 ("First Time")
-#define kpSettingShowGrid QString::fromLatin1 ("Show Grid")
-#define kpSettingShowPath QString::fromLatin1 ("Show Path")
-#define kpSettingColorSimilarity QString::fromLatin1 ("Color Similarity")
-#define kpSettingDitherOnOpen QString::fromLatin1 ("Dither on Open if Screen is 15/16bpp and Image Num Colors More Than")
-#define kpSettingPrintImageCenteredOnPage QString::fromLatin1 ("Print Image Centered On Page")
+#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 kpSettingsGroupFileSaveAs QString::fromLatin1 ("File/Save As")
-#define kpSettingsGroupFileExport QString::fromLatin1 ("File/Export")
-#define kpSettingsGroupEditCopyTo QString::fromLatin1 ("Edit/Copy To")
+#define kpSettingsGroupFileSaveAs TQString::fromLatin1 ("File/Save As")
+#define kpSettingsGroupFileExport TQString::fromLatin1 ("File/Export")
+#define kpSettingsGroupEditCopyTo TQString::fromLatin1 ("Edit/Copy To")
-#define kpSettingForcedMimeType QString::fromLatin1 ("Forced MimeType")
-#define kpSettingForcedColorDepth QString::fromLatin1 ("Forced Color Depth")
-#define kpSettingForcedDither QString::fromLatin1 ("Forced Dither")
-#define kpSettingForcedQuality QString::fromLatin1 ("Forced Quality")
+#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 kpSettingLastDocSize QString::fromLatin1 ("Last Document Size")
+#define kpSettingLastDocSize TQString::fromLatin1 ("Last Document Size")
-#define kpSettingMoreEffectsLastEffect QString::fromLatin1 ("More Effects - Last Effect")
+#define kpSettingMoreEffectsLastEffect TQString::fromLatin1 ("More Effects - Last Effect")
-#define kpSettingResizeScaleLastKeepAspect QString::fromLatin1 ("Resize Scale - Last Keep Aspect")
+#define kpSettingResizeScaleLastKeepAspect TQString::fromLatin1 ("Resize Scale - Last Keep Aspect")
-#define kpSettingsGroupMimeTypeProperties QString::fromLatin1 ("MimeType Properties Version 1.2-2")
-#define kpSettingMimeTypeMaximumColorDepth QString::fromLatin1 ("Maximum Color Depth")
-#define kpSettingMimeTypeHasConfigurableColorDepth QString::fromLatin1 ("Configurable Color Depth")
-#define kpSettingMimeTypeHasConfigurableQuality QString::fromLatin1 ("Configurable Quality Setting")
+#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 kpSettingsGroupUndoRedo QString::fromLatin1 ("Undo/Redo Settings")
-#define kpSettingUndoMinLimit QString::fromLatin1 ("Min Limit")
-#define kpSettingUndoMaxLimit QString::fromLatin1 ("Max Limit")
-#define kpSettingUndoMaxLimitSizeLimit QString::fromLatin1 ("Max Limit Size Limit")
+#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 kpSettingsGroupThumbnail QString::fromLatin1 ("Thumbnail Settings")
-#define kpSettingThumbnailShown QString::fromLatin1 ("Shown")
-#define kpSettingThumbnailGeometry QString::fromLatin1 ("Geometry")
-#define kpSettingThumbnailZoomed QString::fromLatin1 ("Zoomed")
-#define kpSettingThumbnailShowRectangle QString::fromLatin1 ("ShowRectangle")
+#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 kpSettingsGroupPreviewSave QString::fromLatin1 ("Save Preview Settings")
-#define kpSettingPreviewSaveGeometry QString::fromLatin1 ("Geometry")
-#define kpSettingPreviewSaveUpdateDelay QString::fromLatin1 ("Update Delay")
+#define kpSettingsGroupPreviewSave TQString::fromLatin1 ("Save Preview Settings")
+#define kpSettingPreviewSaveGeometry TQString::fromLatin1 ("Geometry")
+#define kpSettingPreviewSaveUpdateDelay TQString::fromLatin1 ("Update Delay")
-#define kpSettingsGroupTools QString::fromLatin1 ("Tool Settings")
-#define kpSettingLastTool QString::fromLatin1 ("Last Used Tool")
-#define kpSettingToolBoxIconSize QString::fromLatin1 ("Tool Box Icon Size")
+#define kpSettingsGroupTools TQString::fromLatin1 ("Tool Settings")
+#define kpSettingLastTool TQString::fromLatin1 ("Last Used Tool")
+#define kpSettingToolBoxIconSize TQString::fromLatin1 ("Tool Box Icon Size")
-#define kpSettingsGroupText QString::fromLatin1 ("Text Settings")
-#define kpSettingFontFamily QString::fromLatin1 ("Font Family")
-#define kpSettingFontSize QString::fromLatin1 ("Font Size")
-#define kpSettingBold QString::fromLatin1 ("Bold")
-#define kpSettingItalic QString::fromLatin1 ("Italic")
-#define kpSettingUnderline QString::fromLatin1 ("Underline")
-#define kpSettingStrikeThru QString::fromLatin1 ("Strike Thru")
+#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 kpSettingsGroupFlattenEffect QString::fromLatin1 ("Flatten Effect Settings")
-#define kpSettingFlattenEffectColor1 QString::fromLatin1 ("Color1")
-#define kpSettingFlattenEffectColor2 QString::fromLatin1 ("Color2")
+#define kpSettingsGroupFlattenEffect TQString::fromLatin1 ("Flatten Effect Settings")
+#define kpSettingFlattenEffectColor1 TQString::fromLatin1 ("Color1")
+#define kpSettingFlattenEffectColor2 TQString::fromLatin1 ("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 QString::fromLatin1 ("Session Document Url")
+#define kpSessionSettingDocumentUrl TQString::fromLatin1 ("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 QString::fromLatin1 ("Session Not-From-Url Document Size")
+#define kpSessionSettingNotFromUrlDocumentSize TQString::fromLatin1 ("Session Not-From-Url Document Size")
#endif // __kp_defs_h__
diff --git a/kolourpaint/kpdocument.cpp b/kolourpaint/kpdocument.cpp
index 801b922e..aa078c85 100644
--- a/kolourpaint/kpdocument.cpp
+++ b/kolourpaint/kpdocument.cpp
@@ -33,17 +33,17 @@
#include <math.h>
-#include <qcolor.h>
-#include <qbitmap.h>
-#include <qbrush.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qrect.h>
-#include <qsize.h>
-#include <qvaluelist.h>
-#include <qwmatrix.h>
+#include <tqcolor.h>
+#include <tqbitmap.h>
+#include <tqbrush.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqrect.h>
+#include <tqsize.h>
+#include <tqvaluelist.h>
+#include <tqwmatrix.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -93,7 +93,7 @@ kpDocument::kpDocument (int w, int h, kpMainWindow *mainWindow)
kdDebug () << "kpDocument::kpDocument (" << w << "," << h << ")" << endl;
#endif
- m_pixmap = new QPixmap (w, h);
+ m_pixmap = new TQPixmap (w, h);
m_pixmap->fill (Qt::white);
}
@@ -126,20 +126,20 @@ void kpDocument::setMainWindow (kpMainWindow *mainWindow)
*/
// public static
-QPixmap kpDocument::convertToPixmapAsLosslessAsPossible (
- const QImage &image,
+TQPixmap kpDocument::convertToPixmapAsLosslessAsPossible (
+ const TQImage &image,
const kpPixmapFX::WarnAboutLossInfo &wali,
kpDocumentSaveOptions *saveOptions,
kpDocumentMetaInfo *metaInfo)
{
if (image.isNull ())
- return QPixmap ();
+ return TQPixmap ();
#if DEBUG_KP_DOCUMENT
kdDebug () << "\timage: depth=" << image.depth ()
- << " (X display=" << QColor::numBitPlanes () << ")"
+ << " (X display=" << TQColor::numBitPlanes () << ")"
<< " hasAlphaBuffer=" << image.hasAlphaBuffer ()
<< endl;
#endif
@@ -156,8 +156,8 @@ QPixmap kpDocument::convertToPixmapAsLosslessAsPossible (
metaInfo->setDotsPerMeterY (image.dotsPerMeterY ());
metaInfo->setOffset (image.offset ());
- QValueList <QImageTextKeyLang> keyList = image.textList ();
- for (QValueList <QImageTextKeyLang>::const_iterator it = keyList.begin ();
+ TQValueList <TQImageTextKeyLang> keyList = image.textList ();
+ for (TQValueList <TQImageTextKeyLang>::const_iterator it = keyList.begin ();
it != keyList.end ();
it++)
{
@@ -189,12 +189,12 @@ QPixmap kpDocument::convertToPixmapAsLosslessAsPossible (
#endif
- QPixmap newPixmap = kpPixmapFX::convertToPixmapAsLosslessAsPossible (image, wali);
+ TQPixmap newPixmap = kpPixmapFX::convertToPixmapAsLosslessAsPossible (image, wali);
#if DEBUG_KP_DOCUMENT && 1
{
- const QImage image2 = kpPixmapFX::convertToImage (newPixmap);
+ const TQImage image2 = kpPixmapFX::convertToImage (newPixmap);
kdDebug () << "(Converted to pixmap) Image dump:" << endl;
bool differsFromOrgImage = false;
@@ -230,8 +230,8 @@ QPixmap kpDocument::convertToPixmapAsLosslessAsPossible (
}
// public static
-QPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExistDialog,
- QWidget *parent,
+TQPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExistDialog,
+ TQWidget *parent,
kpDocumentSaveOptions *saveOptions,
kpDocumentMetaInfo *metaInfo)
{
@@ -246,7 +246,7 @@ QPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExist
*metaInfo = kpDocumentMetaInfo ();
- QString tempFile;
+ TQString tempFile;
if (url.isEmpty () || !KIO::NetAccess::download (url, tempFile, parent))
{
if (!suppressDoesntExistDialog)
@@ -256,15 +256,15 @@ QPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExist
.arg (kpDocument::prettyFilenameForURL (url)));
}
- return QPixmap ();
+ return TQPixmap ();
}
- QImage image;
+ TQImage image;
// sync: remember to "KIO::NetAccess::removeTempFile (tempFile)" in all exit paths
{
- QString detectedMimeType = KImageIO::mimeType (tempFile);
+ TQString detectedMimeType = KImageIO::mimeType (tempFile);
if (saveOptions)
saveOptions->setMimeType (detectedMimeType);
@@ -281,11 +281,11 @@ QPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExist
i18n ("Could not open \"%1\" - unknown mimetype.")
.arg (kpDocument::prettyFilenameForURL (url)));
KIO::NetAccess::removeTempFile (tempFile);
- return QPixmap ();
+ return TQPixmap ();
}
- image = QImage (tempFile);
+ image = TQImage (tempFile);
KIO::NetAccess::removeTempFile (tempFile);
}
@@ -296,10 +296,10 @@ QPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExist
i18n ("Could not open \"%1\" - unsupported image format.\n"
"The file may be corrupt.")
.arg (kpDocument::prettyFilenameForURL (url)));
- return QPixmap ();
+ return TQPixmap ();
}
- const QPixmap newPixmap = kpDocument::convertToPixmapAsLosslessAsPossible (image,
+ const TQPixmap newPixmap = kpDocument::convertToPixmapAsLosslessAsPossible (image,
kpPixmapFX::WarnAboutLossInfo (
i18n ("The image \"%1\""
" may have more colors than the current screen mode."
@@ -332,7 +332,7 @@ QPixmap kpDocument::getPixmapFromFile (const KURL &url, bool suppressDoesntExist
KMessageBox::sorry (parent,
i18n ("Could not open \"%1\" - out of graphics memory.")
.arg (kpDocument::prettyFilenameForURL (url)));
- return QPixmap ();
+ return TQPixmap ();
}
#if DEBUG_KP_DOCUMENT
@@ -370,7 +370,7 @@ bool kpDocument::open (const KURL &url, bool newDocSameNameIfNotExist)
kpDocumentSaveOptions newSaveOptions;
kpDocumentMetaInfo newMetaInfo;
- QPixmap newPixmap = kpDocument::getPixmapFromFile (url,
+ TQPixmap newPixmap = kpDocument::getPixmapFromFile (url,
newDocSameNameIfNotExist/*suppress "doesn't exist" dialog*/,
m_mainWindow,
&newSaveOptions,
@@ -379,7 +379,7 @@ bool kpDocument::open (const KURL &url, bool newDocSameNameIfNotExist)
if (!newPixmap.isNull ())
{
delete m_pixmap;
- m_pixmap = new QPixmap (newPixmap);
+ m_pixmap = new TQPixmap (newPixmap);
setURL (url, true/*is from url*/);
*m_saveOptions = newSaveOptions;
@@ -444,9 +444,9 @@ bool kpDocument::save (bool overwritePrompt, bool lossyPrompt)
// public static
-bool kpDocument::lossyPromptContinue (const QPixmap &pixmap,
+bool kpDocument::lossyPromptContinue (const TQPixmap &pixmap,
const kpDocumentSaveOptions &saveOptions,
- QWidget *parent)
+ TQWidget *parent)
{
#if DEBUG_KP_DOCUMENT
kdDebug () << "kpDocument::lossyPromptContinue()" << endl;
@@ -475,7 +475,7 @@ bool kpDocument::lossyPromptContinue (const QPixmap &pixmap,
// low maximum colour depth
i18n ("Lossy File Format"),
KStdGuiItem::save (),
- QString::fromLatin1 ("SaveInLossyMimeTypeDontAskAgain")));
+ TQString::fromLatin1 ("SaveInLossyMimeTypeDontAskAgain")));
}
else if (lossyType & kpDocumentSaveOptions::ColorDepthLow)
{
@@ -490,7 +490,7 @@ bool kpDocument::lossyPromptContinue (const QPixmap &pixmap,
.arg (saveOptions.colorDepth ()),
i18n ("Low Color Depth"),
KStdGuiItem::save (),
- QString::fromLatin1 ("SaveAtLowColorDepthDontAskAgain")));
+ TQString::fromLatin1 ("SaveAtLowColorDepthDontAskAgain")));
}
#undef QUIT_IF_CANCEL
@@ -498,18 +498,18 @@ bool kpDocument::lossyPromptContinue (const QPixmap &pixmap,
}
// public static
-bool kpDocument::savePixmapToDevice (const QPixmap &pixmap,
- QIODevice *device,
+bool kpDocument::savePixmapToDevice (const TQPixmap &pixmap,
+ TQIODevice *device,
const kpDocumentSaveOptions &saveOptions,
const kpDocumentMetaInfo &metaInfo,
bool lossyPrompt,
- QWidget *parent,
+ TQWidget *parent,
bool *userCancelled)
{
if (userCancelled)
*userCancelled = false;
- QString type = KImageIO::typeForMime (saveOptions.mimeType ());
+ TQString type = KImageIO::typeForMime (saveOptions.mimeType ());
#if DEBUG_KP_DOCUMENT
kdDebug () << "\tmimeType=" << saveOptions.mimeType ()
<< " type=" << type << endl;
@@ -527,10 +527,10 @@ bool kpDocument::savePixmapToDevice (const QPixmap &pixmap,
}
- QPixmap pixmapToSave =
+ TQPixmap pixmapToSave =
kpPixmapFX::pixmapWithDefinedTransparentPixels (pixmap,
Qt::white); // CONFIG
- QImage imageToSave = kpPixmapFX::convertToImage (pixmapToSave);
+ TQImage imageToSave = kpPixmapFX::convertToImage (pixmapToSave);
// TODO: fix dup with kpDocumentSaveOptions::isLossyForSaving()
@@ -563,8 +563,8 @@ bool kpDocument::savePixmapToDevice (const QPixmap &pixmap,
imageToSave.setDotsPerMeterY (metaInfo.dotsPerMeterY ());
imageToSave.setOffset (metaInfo.offset ());
- QValueList <QImageTextKeyLang> keyList = metaInfo.textList ();
- for (QValueList <QImageTextKeyLang>::const_iterator it = keyList.begin ();
+ TQValueList <TQImageTextKeyLang> keyList = metaInfo.textList ();
+ for (TQValueList <TQImageTextKeyLang>::const_iterator it = keyList.begin ();
it != keyList.end ();
it++)
{
@@ -596,13 +596,13 @@ bool kpDocument::savePixmapToDevice (const QPixmap &pixmap,
return true;
}
-static void CouldNotCreateTemporaryFileDialog (QWidget *parent)
+static void CouldNotCreateTemporaryFileDialog (TQWidget *parent)
{
KMessageBox::error (parent,
i18n ("Could not save image - unable to create temporary file."));
}
-static void CouldNotSaveDialog (const KURL &url, QWidget *parent)
+static void CouldNotSaveDialog (const KURL &url, TQWidget *parent)
{
// TODO: use file.errorString()
KMessageBox::error (parent,
@@ -611,13 +611,13 @@ static void CouldNotSaveDialog (const KURL &url, QWidget *parent)
}
// public static
-bool kpDocument::savePixmapToFile (const QPixmap &pixmap,
+bool kpDocument::savePixmapToFile (const TQPixmap &pixmap,
const KURL &url,
const kpDocumentSaveOptions &saveOptions,
const kpDocumentMetaInfo &metaInfo,
bool overwritePrompt,
bool lossyPrompt,
- QWidget *parent)
+ TQWidget *parent)
{
// TODO: Use KIO::NetAccess:mostLocalURL() for accessing home:/ (and other
// such local URLs) for efficiency and because only local writes
@@ -628,8 +628,8 @@ bool kpDocument::savePixmapToFile (const QPixmap &pixmap,
<< ",overwritePrompt=" << overwritePrompt
<< ",lossyPrompt=" << lossyPrompt
<< ")" << endl;
- saveOptions.printDebug (QString::fromLatin1 ("\tsaveOptions"));
- metaInfo.printDebug (QString::fromLatin1 ("\tmetaInfo"));
+ saveOptions.printDebug (TQString::fromLatin1 ("\tsaveOptions"));
+ metaInfo.printDebug (TQString::fromLatin1 ("\tmetaInfo"));
#endif
if (overwritePrompt && KIO::NetAccess::exists (url, false/*write*/, parent))
@@ -638,7 +638,7 @@ bool kpDocument::savePixmapToFile (const QPixmap &pixmap,
i18n ("A document called \"%1\" already exists.\n"
"Do you want to overwrite it?")
.arg (prettyFilenameForURL (url)),
- QString::null,
+ TQString::null,
i18n ("Overwrite"));
if (result != KMessageBox::Continue)
@@ -664,7 +664,7 @@ bool kpDocument::savePixmapToFile (const QPixmap &pixmap,
// Local file?
if (url.isLocalFile ())
{
- const QString filename = url.path ();
+ const TQString filename = url.path ();
// sync: All failure exit paths _must_ call KSaveFile::abort() or
// else, the KSaveFile destructor will overwrite the file,
@@ -723,7 +723,7 @@ bool kpDocument::savePixmapToFile (const QPixmap &pixmap,
KTempFile tempFile;
tempFile.setAutoDelete (true);
- QString filename = tempFile.name ();
+ TQString filename = tempFile.name ();
if (filename.isEmpty ())
{
#if DEBUG_KP_DOCUMENT
@@ -734,7 +734,7 @@ bool kpDocument::savePixmapToFile (const QPixmap &pixmap,
}
// Write to local temporary file.
- QFile file (filename);
+ TQFile file (filename);
{
if (!file.open (IO_WriteOnly))
{
@@ -854,7 +854,7 @@ bool kpDocument::isFromURL (bool checkURLStillExists) const
// static
-QString kpDocument::prettyURLForURL (const KURL &url)
+TQString kpDocument::prettyURLForURL (const KURL &url)
{
if (url.isEmpty ())
return i18n ("Untitled");
@@ -862,14 +862,14 @@ QString kpDocument::prettyURLForURL (const KURL &url)
return url.prettyURL (0, KURL::StripFileProtocol);
}
-QString kpDocument::prettyURL () const
+TQString kpDocument::prettyURL () const
{
return prettyURLForURL (m_url);
}
// static
-QString kpDocument::prettyFilenameForURL (const KURL &url)
+TQString kpDocument::prettyFilenameForURL (const KURL &url)
{
if (url.isEmpty ())
return i18n ("Untitled");
@@ -879,7 +879,7 @@ QString kpDocument::prettyFilenameForURL (const KURL &url)
return url.fileName ();
}
-QString kpDocument::prettyFilename () const
+TQString kpDocument::prettyFilename () const
{
return prettyFilenameForURL (m_url);
}
@@ -984,7 +984,7 @@ void kpDocument::setHeight (int h, const kpColor &backgroundColor)
resize (width (), h, backgroundColor);
}
-QRect kpDocument::rect (bool ofSelection) const
+TQRect kpDocument::rect (bool ofSelection) const
{
if (ofSelection && m_selection)
return m_selection->boundingRect ();
@@ -998,13 +998,13 @@ QRect kpDocument::rect (bool ofSelection) const
*/
// public
-QPixmap kpDocument::getPixmapAt (const QRect &rect) const
+TQPixmap kpDocument::getPixmapAt (const TQRect &rect) const
{
return kpPixmapFX::getPixmapAt (*m_pixmap, rect);
}
// public
-void kpDocument::setPixmapAt (const QPixmap &pixmap, const QPoint &at)
+void kpDocument::setPixmapAt (const TQPixmap &pixmap, const TQPoint &at)
{
#if DEBUG_KP_DOCUMENT && 0
kdDebug () << "kpDocument::setPixmapAt (pixmap (w="
@@ -1016,19 +1016,19 @@ void kpDocument::setPixmapAt (const QPixmap &pixmap, const QPoint &at)
#endif
kpPixmapFX::setPixmapAt (m_pixmap, at, pixmap);
- slotContentsChanged (QRect (at.x (), at.y (), pixmap.width (), pixmap.height ()));
+ slotContentsChanged (TQRect (at.x (), at.y (), pixmap.width (), pixmap.height ()));
}
// public
-void kpDocument::paintPixmapAt (const QPixmap &pixmap, const QPoint &at)
+void kpDocument::paintPixmapAt (const TQPixmap &pixmap, const TQPoint &at)
{
kpPixmapFX::paintPixmapAt (m_pixmap, at, pixmap);
- slotContentsChanged (QRect (at.x (), at.y (), pixmap.width (), pixmap.height ()));
+ slotContentsChanged (TQRect (at.x (), at.y (), pixmap.width (), pixmap.height ()));
}
// public
-QPixmap *kpDocument::pixmap (bool ofSelection) const
+TQPixmap *kpDocument::pixmap (bool ofSelection) const
{
if (ofSelection)
{
@@ -1042,7 +1042,7 @@ QPixmap *kpDocument::pixmap (bool ofSelection) const
}
// public
-void kpDocument::setPixmap (const QPixmap &pixmap)
+void kpDocument::setPixmap (const TQPixmap &pixmap)
{
m_oldWidth = width (), m_oldHeight = height ();
@@ -1055,7 +1055,7 @@ void kpDocument::setPixmap (const QPixmap &pixmap)
}
// public
-void kpDocument::setPixmap (bool ofSelection, const QPixmap &pixmap)
+void kpDocument::setPixmap (bool ofSelection, const TQPixmap &pixmap)
{
if (ofSelection)
{
@@ -1220,8 +1220,8 @@ void kpDocument::setSelection (const kpSelection &selection)
// 2. We delete our copy when setSelection() is called again.
//
// See code above for both.
- connect (m_selection, SIGNAL (changed (const QRect &)),
- this, SLOT (slotContentsChanged (const QRect &)));
+ connect (m_selection, TQT_SIGNAL (changed (const TQRect &)),
+ this, TQT_SLOT (slotContentsChanged (const TQRect &)));
if (!hadSelection)
@@ -1235,7 +1235,7 @@ void kpDocument::setSelection (const kpSelection &selection)
}
// public
-QPixmap kpDocument::getSelectedPixmap (const QBitmap &maskBitmap_) const
+TQPixmap kpDocument::getSelectedPixmap (const TQBitmap &maskBitmap_) const
{
kpSelection *sel = selection ();
@@ -1243,7 +1243,7 @@ QPixmap kpDocument::getSelectedPixmap (const QBitmap &maskBitmap_) const
if (!sel)
{
kdError () << "kpDocument::getSelectedPixmap() no sel region" << endl;
- return QPixmap ();
+ return TQPixmap ();
}
// easy if we already have it :)
@@ -1251,15 +1251,15 @@ QPixmap kpDocument::getSelectedPixmap (const QBitmap &maskBitmap_) const
return *sel->pixmap ();
- const QRect boundingRect = sel->boundingRect ();
+ const TQRect boundingRect = sel->boundingRect ();
if (!boundingRect.isValid ())
{
kdError () << "kpDocument::getSelectedPixmap() boundingRect invalid" << endl;
- return QPixmap ();
+ return TQPixmap ();
}
- QBitmap maskBitmap = maskBitmap_;
+ TQBitmap maskBitmap = maskBitmap_;
if (maskBitmap.isNull () &&
!sel->isRectangular ())
{
@@ -1268,12 +1268,12 @@ QPixmap kpDocument::getSelectedPixmap (const QBitmap &maskBitmap_) const
if (maskBitmap.isNull ())
{
kdError () << "kpDocument::getSelectedPixmap() could not get mask" << endl;
- return QPixmap ();
+ return TQPixmap ();
}
}
- QPixmap selPixmap = getPixmapAt (boundingRect);
+ TQPixmap selPixmap = getPixmapAt (boundingRect);
if (!maskBitmap.isNull ())
{
@@ -1283,11 +1283,11 @@ QPixmap kpDocument::getSelectedPixmap (const QBitmap &maskBitmap_) const
// 0 1 0
// 1 0 0
// 1 1 1
- QBitmap selMaskBitmap = kpPixmapFX::getNonNullMask (selPixmap);
+ TQBitmap selMaskBitmap = kpPixmapFX::getNonNullMask (selPixmap);
bitBlt (&selMaskBitmap,
- QPoint (0, 0),
+ TQPoint (0, 0),
&maskBitmap,
- QRect (0, 0, maskBitmap.width (), maskBitmap.height ()),
+ TQRect (0, 0, maskBitmap.width (), maskBitmap.height ()),
Qt::AndROP);
selPixmap.setMask (selMaskBitmap);
}
@@ -1316,7 +1316,7 @@ bool kpDocument::selectionPullFromDocument (const kpColor &backgroundColor)
return false;
}
- const QRect boundingRect = sel->boundingRect ();
+ const TQRect boundingRect = sel->boundingRect ();
if (!boundingRect.isValid ())
{
kdError () << "kpDocument::selectionPullFromDocument() boundingRect invalid" << endl;
@@ -1328,14 +1328,14 @@ bool kpDocument::selectionPullFromDocument (const kpColor &backgroundColor)
// Figure out mask for non-rectangular selections
//
- QBitmap maskBitmap = sel->maskForOwnType (true/*return null bitmap for rectangular*/);
+ TQBitmap maskBitmap = sel->maskForOwnType (true/*return null bitmap for rectangular*/);
//
// Get selection pixmap from document
//
- QPixmap selPixmap = getSelectedPixmap (maskBitmap);
+ TQPixmap selPixmap = getSelectedPixmap (maskBitmap);
if (vm)
vm->setQueueUpdates ();
@@ -1348,11 +1348,11 @@ bool kpDocument::selectionPullFromDocument (const kpColor &backgroundColor)
//
// TODO: this assumes backgroundColor == sel->transparency ().transparentColor()
- const QPixmap selTransparentPixmap = sel->transparentPixmap ();
+ const TQPixmap selTransparentPixmap = sel->transparentPixmap ();
if (backgroundColor.isOpaque ())
{
- QPixmap erasePixmap (boundingRect.width (), boundingRect.height ());
+ TQPixmap erasePixmap (boundingRect.width (), boundingRect.height ());
erasePixmap.fill (backgroundColor.toQColor ());
if (selTransparentPixmap.mask ())
@@ -1382,7 +1382,7 @@ bool kpDocument::selectionDelete ()
if (!sel)
return false;
- const QRect boundingRect = sel->boundingRect ();
+ const TQRect boundingRect = sel->boundingRect ();
if (!boundingRect.isValid ())
return false;
@@ -1420,7 +1420,7 @@ bool kpDocument::selectionCopyOntoDocument (bool useTransparentPixmap)
if (!sel->pixmap ())
return true;
- const QRect boundingRect = sel->boundingRect ();
+ const TQRect boundingRect = sel->boundingRect ();
if (!boundingRect.isValid ())
return false;
@@ -1449,7 +1449,7 @@ bool kpDocument::selectionPushOntoDocument (bool useTransparentPixmap)
}
// public
-QPixmap kpDocument::pixmapWithSelection () const
+TQPixmap kpDocument::pixmapWithSelection () const
{
#if DEBUG_KP_DOCUMENT && 1
kdDebug () << "kpDocument::pixmapWithSelection()" << endl;
@@ -1461,7 +1461,7 @@ QPixmap kpDocument::pixmapWithSelection () const
#if DEBUG_KP_DOCUMENT && 1
kdDebug () << "\tselection @ " << m_selection->boundingRect () << endl;
#endif
- QPixmap output = *m_pixmap;
+ TQPixmap output = *m_pixmap;
m_selection->paint (&output, rect ());
@@ -1518,7 +1518,7 @@ void kpDocument::resize (int w, int h, const kpColor &backgroundColor, bool fill
* Slots
*/
-void kpDocument::slotContentsChanged (const QRect &rect)
+void kpDocument::slotContentsChanged (const TQRect &rect)
{
setModified ();
emit contentsChanged (rect);
@@ -1528,10 +1528,10 @@ void kpDocument::slotSizeChanged (int newWidth, int newHeight)
{
setModified ();
emit sizeChanged (newWidth, newHeight);
- emit sizeChanged (QSize (newWidth, newHeight));
+ emit sizeChanged (TQSize (newWidth, newHeight));
}
-void kpDocument::slotSizeChanged (const QSize &newSize)
+void kpDocument::slotSizeChanged (const TQSize &newSize)
{
slotSizeChanged (newSize.width (), newSize.height ());
}
diff --git a/kolourpaint/kpdocument.h b/kolourpaint/kpdocument.h
index d75e36ff..a0369566 100644
--- a/kolourpaint/kpdocument.h
+++ b/kolourpaint/kpdocument.h
@@ -29,21 +29,21 @@
#ifndef KP_DOCUMENT_H
#define KP_DOCUMENT_H
-#include <qbitmap.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqbitmap.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kurl.h>
#include <kppixmapfx.h>
-class QImage;
-class QIODevice;
-class QPixmap;
-class QPoint;
-class QRect;
-class QSize;
+class TQImage;
+class TQIODevice;
+class TQPixmap;
+class TQPoint;
+class TQRect;
+class TQSize;
class kpColor;
class kpDocumentSaveOptions;
@@ -70,14 +70,14 @@ public:
// Wraps kpPixmapFX::convertToPixmapAsLosslessAsPossible() but also
// returns document meta information.
- static QPixmap convertToPixmapAsLosslessAsPossible (
- const QImage &image,
+ static TQPixmap convertToPixmapAsLosslessAsPossible (
+ const TQImage &image,
const kpPixmapFX::WarnAboutLossInfo &wali = kpPixmapFX::WarnAboutLossInfo (),
kpDocumentSaveOptions *saveOptions = 0,
kpDocumentMetaInfo *metaInfo = 0);
- static QPixmap getPixmapFromFile (const KURL &url, bool suppressDoesntExistDialog,
- QWidget *parent,
+ static TQPixmap getPixmapFromFile (const KURL &url, bool suppressDoesntExistDialog,
+ TQWidget *parent,
kpDocumentSaveOptions *saveOptions = 0,
kpDocumentMetaInfo *metaInfo = 0);
// TODO: fix: open*() should only be called once.
@@ -85,23 +85,23 @@ public:
void openNew (const KURL &url);
bool open (const KURL &url, bool newDocSameNameIfNotExist = false);
- static bool lossyPromptContinue (const QPixmap &pixmap,
+ static bool lossyPromptContinue (const TQPixmap &pixmap,
const kpDocumentSaveOptions &saveOptions,
- QWidget *parent);
- static bool savePixmapToDevice (const QPixmap &pixmap,
- QIODevice *device,
+ TQWidget *parent);
+ static bool savePixmapToDevice (const TQPixmap &pixmap,
+ TQIODevice *device,
const kpDocumentSaveOptions &saveOptions,
const kpDocumentMetaInfo &metaInfo,
bool lossyPrompt,
- QWidget *parent,
+ TQWidget *parent,
bool *userCancelled = 0);
- static bool savePixmapToFile (const QPixmap &pixmap,
+ static bool savePixmapToFile (const TQPixmap &pixmap,
const KURL &url,
const kpDocumentSaveOptions &saveOptions,
const kpDocumentMetaInfo &metaInfo,
bool overwritePrompt,
bool lossyPrompt,
- QWidget *parent);
+ TQWidget *parent);
bool save (bool overwritePrompt = false, bool lossyPrompt = false);
bool saveAs (const KURL &url,
const kpDocumentSaveOptions &saveOptions,
@@ -126,12 +126,12 @@ public:
bool isFromURL (bool checkURLStillExists = true) const;
// (will convert: empty URL --> "Untitled")
- static QString prettyURLForURL (const KURL &url);
- QString prettyURL () const;
+ static TQString prettyURLForURL (const KURL &url);
+ TQString prettyURL () const;
// (will convert: empty URL --> "Untitled")
- static QString prettyFilenameForURL (const KURL &url);
- QString prettyFilename () const;
+ static TQString prettyFilenameForURL (const KURL &url);
+ TQString prettyFilename () const;
// (guaranteed to return valid pointer)
@@ -160,7 +160,7 @@ public:
int oldHeight () const; // only valid in a slot connected to sizeChanged()
void setHeight (int h, const kpColor &backgroundColor);
- QRect rect (bool ofSelection = false) const;
+ TQRect rect (bool ofSelection = false) const;
/*
@@ -169,16 +169,16 @@ public:
// get a copy of a bit of the doc's pixmap
// (not including the selection)
- QPixmap getPixmapAt (const QRect &rect) const;
+ TQPixmap getPixmapAt (const TQRect &rect) const;
- void setPixmapAt (const QPixmap &pixmap, const QPoint &at);
+ void setPixmapAt (const TQPixmap &pixmap, const TQPoint &at);
- void paintPixmapAt (const QPixmap &pixmap, const QPoint &at);
+ void paintPixmapAt (const TQPixmap &pixmap, const TQPoint &at);
// (not including the selection)
- QPixmap *pixmap (bool ofSelection = false) const;
- void setPixmap (const QPixmap &pixmap);
- void setPixmap (bool ofSelection, const QPixmap &pixmap);
+ TQPixmap *pixmap (bool ofSelection = false) const;
+ void setPixmap (const TQPixmap &pixmap);
+ void setPixmap (bool ofSelection, const TQPixmap &pixmap);
private:
void updateToolsSingleKeyTriggersEnabled ();
@@ -188,7 +188,7 @@ public:
void setSelection (const kpSelection &selection);
// TODO: this always returns opaque pixmap - need transparent ver
- QPixmap getSelectedPixmap (const QBitmap &maskBitmap = QBitmap ()) const;
+ TQPixmap getSelectedPixmap (const TQBitmap &maskBitmap = TQBitmap ()) const;
bool selectionPullFromDocument (const kpColor &backgroundColor);
bool selectionDelete ();
@@ -197,7 +197,7 @@ public:
// same as pixmap() but returns a _copy_ of the current pixmap
// + any selection pasted on top
- QPixmap pixmapWithSelection () const;
+ TQPixmap pixmapWithSelection () const;
/*
@@ -212,9 +212,9 @@ public:
public slots:
// these will emit signals!
- void slotContentsChanged (const QRect &rect);
+ void slotContentsChanged (const TQRect &rect);
void slotSizeChanged (int newWidth, int newHeight);
- void slotSizeChanged (const QSize &newSize);
+ void slotSizeChanged (const TQSize &newSize);
signals:
void documentOpened ();
@@ -224,9 +224,9 @@ signals:
// This is the _only_ signal that may be emitted in addition to the others.
void documentModified ();
- void contentsChanged (const QRect &rect);
+ void contentsChanged (const TQRect &rect);
void sizeChanged (int newWidth, int newHeight); // see oldWidth(), oldHeight()
- void sizeChanged (const QSize &newSize);
+ void sizeChanged (const TQSize &newSize);
void selectionEnabled (bool on);
@@ -236,7 +236,7 @@ signals:
private:
int m_constructorWidth, m_constructorHeight;
kpMainWindow *m_mainWindow;
- QPixmap *m_pixmap;
+ TQPixmap *m_pixmap;
KURL m_url;
bool m_isFromURL;
diff --git a/kolourpaint/kpdocumentmetainfo.cpp b/kolourpaint/kpdocumentmetainfo.cpp
index 5e5fc6ae..36c1dde6 100644
--- a/kolourpaint/kpdocumentmetainfo.cpp
+++ b/kolourpaint/kpdocumentmetainfo.cpp
@@ -27,7 +27,7 @@
#include <kpdocumentmetainfo.h>
-#include <qpoint.h>
+#include <tqpoint.h>
#include <kdebug.h>
@@ -35,9 +35,9 @@
struct kpDocumentMetaInfoPrivate
{
int m_dotsPerMeterX, m_dotsPerMeterY;
- QPoint m_offset;
+ TQPoint m_offset;
- QMap <QImageTextKeyLang, QString> m_textMap;
+ TQMap <TQImageTextKeyLang, TQString> m_textMap;
};
@@ -47,7 +47,7 @@ kpDocumentMetaInfo::kpDocumentMetaInfo ()
{
d->m_dotsPerMeterX = 0;
d->m_dotsPerMeterY = 0;
- d->m_offset = QPoint (0, 0);
+ d->m_offset = TQPoint (0, 0);
}
kpDocumentMetaInfo::kpDocumentMetaInfo (const kpDocumentMetaInfo &rhs)
@@ -79,11 +79,11 @@ kpDocumentMetaInfo &kpDocumentMetaInfo::operator= (const kpDocumentMetaInfo &rhs
// public
-void kpDocumentMetaInfo::printDebug (const QString &prefix) const
+void kpDocumentMetaInfo::printDebug (const TQString &prefix) const
{
- const QString usedPrefix = !prefix.isEmpty () ?
- prefix + QString::fromLatin1 (":") :
- QString::null;
+ const TQString usedPrefix = !prefix.isEmpty () ?
+ prefix + TQString::fromLatin1 (":") :
+ TQString::null;
kdDebug () << usedPrefix << endl;
@@ -91,8 +91,8 @@ void kpDocumentMetaInfo::printDebug (const QString &prefix) const
<< " Y=" << dotsPerMeterY ()
<< " offset=" << offset () << endl;
- QValueList <QImageTextKeyLang> keyList = textList ();
- for (QValueList <QImageTextKeyLang>::const_iterator it = keyList.begin ();
+ TQValueList <TQImageTextKeyLang> keyList = textList ();
+ for (TQValueList <TQImageTextKeyLang>::const_iterator it = keyList.begin ();
it != keyList.end ();
it++)
{
@@ -133,54 +133,54 @@ void kpDocumentMetaInfo::setDotsPerMeterY (int val)
// public
-QPoint kpDocumentMetaInfo::offset () const
+TQPoint kpDocumentMetaInfo::offset () const
{
return d->m_offset;
}
// public
-void kpDocumentMetaInfo::setOffset (const QPoint &point)
+void kpDocumentMetaInfo::setOffset (const TQPoint &point)
{
d->m_offset = point;
}
// public
-QMap <QImageTextKeyLang, QString> kpDocumentMetaInfo::textMap () const
+TQMap <TQImageTextKeyLang, TQString> kpDocumentMetaInfo::textMap () const
{
return d->m_textMap;
}
// public
-QValueList <QImageTextKeyLang> kpDocumentMetaInfo::textList () const
+TQValueList <TQImageTextKeyLang> kpDocumentMetaInfo::textList () const
{
return d->m_textMap.keys ();
}
// public
-QString kpDocumentMetaInfo::text (const QImageTextKeyLang &itkl) const
+TQString kpDocumentMetaInfo::text (const TQImageTextKeyLang &itkl) const
{
return d->m_textMap [itkl];
}
// public
-QString kpDocumentMetaInfo::text (const char *key, const char *lang) const
+TQString kpDocumentMetaInfo::text (const char *key, const char *lang) const
{
- return text (QImageTextKeyLang (key, lang));
+ return text (TQImageTextKeyLang (key, lang));
}
// public
-void kpDocumentMetaInfo::setText (const QImageTextKeyLang &itkl,
- const QString &string)
+void kpDocumentMetaInfo::setText (const TQImageTextKeyLang &itkl,
+ const TQString &string)
{
d->m_textMap [itkl] = string;
}
// public
void kpDocumentMetaInfo::setText (const char *key, const char *lang,
- const QString &string)
+ const TQString &string)
{
- setText (QImageTextKeyLang (key, lang), string);
+ setText (TQImageTextKeyLang (key, lang), string);
}
diff --git a/kolourpaint/kpdocumentmetainfo.h b/kolourpaint/kpdocumentmetainfo.h
index 15e1408f..c2dc67e8 100644
--- a/kolourpaint/kpdocumentmetainfo.h
+++ b/kolourpaint/kpdocumentmetainfo.h
@@ -30,13 +30,13 @@
#define KP_DOCUMENT_META_INFO
-#include <qimage.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqimage.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
-class QPoint;
+class TQPoint;
class kpDocumentMetaInfo
@@ -54,10 +54,10 @@ public:
kpDocumentMetaInfo &operator= (const kpDocumentMetaInfo &rhs);
- void printDebug (const QString &prefix) const;
+ void printDebug (const TQString &prefix) const;
- // See QImage documentation
+ // See TQImage documentation
int dotsPerMeterX () const;
void setDotsPerMeterX (int val);
@@ -66,17 +66,17 @@ public:
void setDotsPerMeterY (int val);
- QPoint offset () const;
- void setOffset (const QPoint &point);
+ TQPoint offset () const;
+ void setOffset (const TQPoint &point);
- QMap <QImageTextKeyLang, QString> textMap () const;
- QValueList <QImageTextKeyLang> textList () const;
+ TQMap <TQImageTextKeyLang, TQString> textMap () const;
+ TQValueList <TQImageTextKeyLang> textList () const;
- QString text (const QImageTextKeyLang &itkl) const;
- QString text (const char *key, const char *lang) const;
- void setText (const QImageTextKeyLang &itkl, const QString &string);
- void setText (const char *key, const char *lang, const QString &string);
+ TQString text (const TQImageTextKeyLang &itkl) const;
+ TQString text (const char *key, const char *lang) const;
+ void setText (const TQImageTextKeyLang &itkl, const TQString &string);
+ void setText (const char *key, const char *lang, const TQString &string);
private:
diff --git a/kolourpaint/kpdocumentsaveoptions.cpp b/kolourpaint/kpdocumentsaveoptions.cpp
index 701b6b51..5151e739 100644
--- a/kolourpaint/kpdocumentsaveoptions.cpp
+++ b/kolourpaint/kpdocumentsaveoptions.cpp
@@ -30,8 +30,8 @@
#include <kpdocumentsaveoptions.h>
-#include <qpixmap.h>
-#include <qstring.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -42,7 +42,7 @@
struct kpDocumentSaveOptionsPrivate
{
- QString m_mimeType;
+ TQString m_mimeType;
int m_colorDepth;
bool m_dither;
int m_quality;
@@ -67,7 +67,7 @@ kpDocumentSaveOptions::kpDocumentSaveOptions (const kpDocumentSaveOptions &rhs)
d->m_quality = rhs.quality ();
}
-kpDocumentSaveOptions::kpDocumentSaveOptions (QString mimeType, int colorDepth, bool dither, int quality)
+kpDocumentSaveOptions::kpDocumentSaveOptions (TQString mimeType, int colorDepth, bool dither, int quality)
: d (new kpDocumentSaveOptionsPrivate ())
{
d->m_mimeType = mimeType;
@@ -111,11 +111,11 @@ kpDocumentSaveOptions &kpDocumentSaveOptions::operator= (const kpDocumentSaveOpt
// public
-void kpDocumentSaveOptions::printDebug (const QString &prefix) const
+void kpDocumentSaveOptions::printDebug (const TQString &prefix) const
{
- const QString usedPrefix = !prefix.isEmpty () ?
- prefix + QString::fromLatin1 (": ") :
- QString::null;
+ const TQString usedPrefix = !prefix.isEmpty () ?
+ prefix + TQString::fromLatin1 (": ") :
+ TQString::null;
kdDebug () << usedPrefix
<< "mimeType=" << mimeType ()
@@ -127,26 +127,26 @@ void kpDocumentSaveOptions::printDebug (const QString &prefix) const
// public
-QString kpDocumentSaveOptions::mimeType () const
+TQString kpDocumentSaveOptions::mimeType () const
{
return d->m_mimeType;
}
// public
-void kpDocumentSaveOptions::setMimeType (const QString &mimeType)
+void kpDocumentSaveOptions::setMimeType (const TQString &mimeType)
{
d->m_mimeType = mimeType;
}
// public static
-QString kpDocumentSaveOptions::invalidMimeType ()
+TQString kpDocumentSaveOptions::invalidMimeType ()
{
- return QString::null;
+ return TQString::null;
}
// public static
-bool kpDocumentSaveOptions::mimeTypeIsInvalid (const QString &mimeType)
+bool kpDocumentSaveOptions::mimeTypeIsInvalid (const TQString &mimeType)
{
return (mimeType == invalidMimeType ());
}
@@ -243,15 +243,15 @@ bool kpDocumentSaveOptions::qualityIsInvalid () const
// public static
-QString kpDocumentSaveOptions::defaultMimeType (KConfigBase *config)
+TQString kpDocumentSaveOptions::defaultMimeType (KConfigBase *config)
{
return config->readEntry (kpSettingForcedMimeType,
- QString::fromLatin1 ("image/png"));
+ TQString::fromLatin1 ("image/png"));
}
// public static
void kpDocumentSaveOptions::saveDefaultMimeType (KConfigBase *config,
- const QString &mimeType)
+ const TQString &mimeType)
{
config->writeEntry (kpSettingForcedMimeType, mimeType);
}
@@ -366,10 +366,10 @@ bool kpDocumentSaveOptions::saveDefaultDifferences (KConfigBase *config,
}
-static QStringList mimeTypesSupportingProperty (const QString &property,
- const QStringList &defaultMimeTypesWithPropertyList)
+static TQStringList mimeTypesSupportingProperty (const TQString &property,
+ const TQStringList &defaultMimeTypesWithPropertyList)
{
- QStringList mimeTypeList;
+ TQStringList mimeTypeList;
KConfigGroupSaver cfgGroupSaver (KGlobal::config (),
kpSettingsGroupMimeTypeProperties);
@@ -390,10 +390,10 @@ static QStringList mimeTypesSupportingProperty (const QString &property,
return mimeTypeList;
}
-static bool mimeTypeSupportsProperty (const QString &mimeType,
- const QString &property, const QStringList &defaultMimeTypesWithPropertyList)
+static bool mimeTypeSupportsProperty (const TQString &mimeType,
+ const TQString &property, const TQStringList &defaultMimeTypesWithPropertyList)
{
- const QStringList mimeTypeList = mimeTypesSupportingProperty (
+ const TQStringList mimeTypeList = mimeTypesSupportingProperty (
property, defaultMimeTypesWithPropertyList);
return mimeTypeList.contains (mimeType);
@@ -434,31 +434,31 @@ static bool mimeTypeSupportsProperty (const QString &mimeType,
//
// To test whether depth is configurable, write an image in the new
// mimetype with all depths and read each one back. See what
-// kpDocument thinks the depth is when it gets QImage to read it.
+// kpDocument thinks the depth is when it gets TQImage to read it.
// public static
-int kpDocumentSaveOptions::mimeTypeMaximumColorDepth (const QString &mimeType)
+int kpDocumentSaveOptions::mimeTypeMaximumColorDepth (const TQString &mimeType)
{
- QStringList defaultList;
+ TQStringList defaultList;
// SYNC: update mime info here
// Greyscale actually (unenforced since depth not set to configurable)
- defaultList << QString::fromLatin1 ("image/x-eps:32");
+ defaultList << TQString::fromLatin1 ("image/x-eps:32");
- defaultList << QString::fromLatin1 ("image/x-portable-bitmap:1");
+ defaultList << TQString::fromLatin1 ("image/x-portable-bitmap:1");
// Greyscale actually (unenforced since depth not set to configurable)
- defaultList << QString::fromLatin1 ("image/x-portable-greymap:8");
+ defaultList << TQString::fromLatin1 ("image/x-portable-greymap:8");
- defaultList << QString::fromLatin1 ("image/x-xbm:1");
+ defaultList << TQString::fromLatin1 ("image/x-xbm:1");
- const QStringList mimeTypeList = mimeTypesSupportingProperty (
+ const TQStringList mimeTypeList = mimeTypesSupportingProperty (
kpSettingMimeTypeMaximumColorDepth, defaultList);
- const QString mimeTypeColon = mimeType + QString::fromLatin1 (":");
- for (QStringList::const_iterator it = mimeTypeList.begin ();
+ const TQString mimeTypeColon = mimeType + TQString::fromLatin1 (":");
+ for (TQStringList::const_iterator it = mimeTypeList.begin ();
it != mimeTypeList.end ();
it++)
{
@@ -483,21 +483,21 @@ int kpDocumentSaveOptions::mimeTypeMaximumColorDepth () const
// public static
-bool kpDocumentSaveOptions::mimeTypeHasConfigurableColorDepth (const QString &mimeType)
+bool kpDocumentSaveOptions::mimeTypeHasConfigurableColorDepth (const TQString &mimeType)
{
- QStringList defaultMimeTypes;
+ TQStringList defaultMimeTypes;
// SYNC: update mime info here
- defaultMimeTypes << QString::fromLatin1 ("image/png");
- defaultMimeTypes << QString::fromLatin1 ("image/x-bmp");
- defaultMimeTypes << QString::fromLatin1 ("image/x-pcx");
+ defaultMimeTypes << TQString::fromLatin1 ("image/png");
+ defaultMimeTypes << TQString::fromLatin1 ("image/x-bmp");
+ defaultMimeTypes << TQString::fromLatin1 ("image/x-pcx");
// TODO: Only 1, 24 not 8; Qt only sees 32 but "file" cmd realises
// it's either 1 or 24.
- defaultMimeTypes << QString::fromLatin1 ("image/x-rgb");
+ defaultMimeTypes << TQString::fromLatin1 ("image/x-rgb");
// TODO: Only 8 and 24 - no 1.
- defaultMimeTypes << QString::fromLatin1 ("image/x-xpm");
+ defaultMimeTypes << TQString::fromLatin1 ("image/x-xpm");
return mimeTypeSupportsProperty (mimeType,
kpSettingMimeTypeHasConfigurableColorDepth,
@@ -512,13 +512,13 @@ bool kpDocumentSaveOptions::mimeTypeHasConfigurableColorDepth () const
// public static
-bool kpDocumentSaveOptions::mimeTypeHasConfigurableQuality (const QString &mimeType)
+bool kpDocumentSaveOptions::mimeTypeHasConfigurableQuality (const TQString &mimeType)
{
- QStringList defaultMimeTypes;
+ TQStringList defaultMimeTypes;
// SYNC: update mime info here
- defaultMimeTypes << QString::fromLatin1 ("image/jp2");
- defaultMimeTypes << QString::fromLatin1 ("image/jpeg");
+ defaultMimeTypes << TQString::fromLatin1 ("image/jp2");
+ defaultMimeTypes << TQString::fromLatin1 ("image/jpeg");
return mimeTypeSupportsProperty (mimeType,
kpSettingMimeTypeHasConfigurableQuality,
@@ -533,7 +533,7 @@ bool kpDocumentSaveOptions::mimeTypeHasConfigurableQuality () const
// public
-int kpDocumentSaveOptions::isLossyForSaving (const QPixmap &pixmap) const
+int kpDocumentSaveOptions::isLossyForSaving (const TQPixmap &pixmap) const
{
int ret = 0;
diff --git a/kolourpaint/kpdocumentsaveoptions.h b/kolourpaint/kpdocumentsaveoptions.h
index 0d77ec2c..d6279885 100644
--- a/kolourpaint/kpdocumentsaveoptions.h
+++ b/kolourpaint/kpdocumentsaveoptions.h
@@ -30,8 +30,8 @@
#define KP_DOCUMENT_SAVE_OPTIONS_H
-class QPixmap;
-class QString;
+class TQPixmap;
+class TQString;
class KConfigBase;
@@ -41,7 +41,7 @@ class kpDocumentSaveOptions
public:
kpDocumentSaveOptions ();
kpDocumentSaveOptions (const kpDocumentSaveOptions &rhs);
- kpDocumentSaveOptions (QString mimeType, int colorDepth, bool dither, int quality);
+ kpDocumentSaveOptions (TQString mimeType, int colorDepth, bool dither, int quality);
virtual ~kpDocumentSaveOptions ();
bool operator== (const kpDocumentSaveOptions &rhs) const;
@@ -50,14 +50,14 @@ public:
kpDocumentSaveOptions &operator= (const kpDocumentSaveOptions &rhs);
- void printDebug (const QString &prefix) const;
+ void printDebug (const TQString &prefix) const;
- QString mimeType () const;
- void setMimeType (const QString &mimeType);
+ TQString mimeType () const;
+ void setMimeType (const TQString &mimeType);
- static QString invalidMimeType ();
- static bool mimeTypeIsInvalid (const QString &mimeType);
+ static TQString invalidMimeType ();
+ static bool mimeTypeIsInvalid (const TQString &mimeType);
bool mimeTypeIsInvalid () const;
@@ -86,8 +86,8 @@ public:
// (All assume that <config>'s group has been set)
// (None of them call KConfigBase::reparseConfig() nor KConfigBase::sync())
- static QString defaultMimeType (KConfigBase *config);
- static void saveDefaultMimeType (KConfigBase *config, const QString &mimeType);
+ static TQString defaultMimeType (KConfigBase *config);
+ static void saveDefaultMimeType (KConfigBase *config, const TQString &mimeType);
static int defaultColorDepth (KConfigBase *config);
static void saveDefaultColorDepth (KConfigBase *config, int colorDepth);
@@ -108,14 +108,14 @@ public:
public:
// (purely for informational purposes - not enforced by this class)
- static int mimeTypeMaximumColorDepth (const QString &mimeType);
+ static int mimeTypeMaximumColorDepth (const TQString &mimeType);
int mimeTypeMaximumColorDepth () const;
- static bool mimeTypeHasConfigurableColorDepth (const QString &mimeType);
+ static bool mimeTypeHasConfigurableColorDepth (const TQString &mimeType);
bool mimeTypeHasConfigurableColorDepth () const;
- static bool mimeTypeHasConfigurableQuality (const QString &mimeType);
+ static bool mimeTypeHasConfigurableQuality (const TQString &mimeType);
bool mimeTypeHasConfigurableQuality () const;
@@ -136,7 +136,7 @@ public:
// Returns whether saving <pixmap> with these options will result in
// loss of information. Returned value is the bitwise OR of
// LossType enum possiblities.
- int isLossyForSaving (const QPixmap &pixmap) const;
+ int isLossyForSaving (const TQPixmap &pixmap) const;
private:
diff --git a/kolourpaint/kpdocumentsaveoptionswidget.cpp b/kolourpaint/kpdocumentsaveoptionswidget.cpp
index 39edf5b8..4847c72d 100644
--- a/kolourpaint/kpdocumentsaveoptionswidget.cpp
+++ b/kolourpaint/kpdocumentsaveoptionswidget.cpp
@@ -30,12 +30,12 @@
#include <kpdocumentsaveoptionswidget.h>
-#include <qapplication.h>
-#include <qbuffer.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqbuffer.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
#include <kcombobox.h>
#include <kconfig.h>
@@ -58,13 +58,13 @@
// protected static
-const QSize kpDocumentSaveOptionsPreviewDialog::s_pixmapLabelMinimumSize (25, 25);
+const TQSize kpDocumentSaveOptionsPreviewDialog::s_pixmapLabelMinimumSize (25, 25);
kpDocumentSaveOptionsPreviewDialog::kpDocumentSaveOptionsPreviewDialog (
- QWidget *parent,
+ TQWidget *parent,
const char *name)
- : QWidget (parent, name,
+ : TQWidget (parent, name,
Qt::WType_TopLevel |
Qt::WStyle_Customize |
Qt::WStyle_DialogBorder |
@@ -79,15 +79,15 @@ KDialogBase (parent, name, false/*non-modal*/,
{
setCaption (i18n ("Save Preview"));
- QWidget *baseWidget = this;//new QWidget (this);
+ TQWidget *baseWidget = this;//new TQWidget (this);
//setMainWidget (baseWidget);
- QGridLayout *lay = new QGridLayout (baseWidget, 2, 1,
+ TQGridLayout *lay = new TQGridLayout (baseWidget, 2, 1,
KDialog::marginHint (), KDialog::spacingHint ());
m_filePixmapLabel = new kpResizeSignallingLabel (baseWidget);
- m_fileSizeLabel = new QLabel (baseWidget);
+ m_fileSizeLabel = new TQLabel (baseWidget);
m_filePixmapLabel->setMinimumSize (s_pixmapLabelMinimumSize);
@@ -100,8 +100,8 @@ KDialogBase (parent, name, false/*non-modal*/,
lay->setRowStretch (0, 1);
- connect (m_filePixmapLabel, SIGNAL (resized ()),
- this, SLOT (updatePixmapPreview ()));
+ connect (m_filePixmapLabel, TQT_SIGNAL (resized ()),
+ this, TQT_SLOT (updatePixmapPreview ()));
}
kpDocumentSaveOptionsPreviewDialog::~kpDocumentSaveOptionsPreviewDialog ()
@@ -111,22 +111,22 @@ kpDocumentSaveOptionsPreviewDialog::~kpDocumentSaveOptionsPreviewDialog ()
// public
-QSize kpDocumentSaveOptionsPreviewDialog::preferredMinimumSize () const
+TQSize kpDocumentSaveOptionsPreviewDialog::preferredMinimumSize () const
{
const int contentsWidth = 180;
const int totalMarginsWidth = 2 * KDialog::marginHint ();
- return QSize (contentsWidth + totalMarginsWidth,
+ return TQSize (contentsWidth + totalMarginsWidth,
contentsWidth * 3 / 4 + totalMarginsWidth);
}
// public slot
-void kpDocumentSaveOptionsPreviewDialog::setFilePixmapAndSize (const QPixmap &pixmap,
+void kpDocumentSaveOptionsPreviewDialog::setFilePixmapAndSize (const TQPixmap &pixmap,
int fileSize)
{
delete m_filePixmap;
- m_filePixmap = new QPixmap (pixmap);
+ m_filePixmap = new TQPixmap (pixmap);
updatePixmapPreview ();
@@ -148,14 +148,14 @@ void kpDocumentSaveOptionsPreviewDialog::setFilePixmapAndSize (const QPixmap &pi
// HACK: I don't know if the percentage thing will work well and we're
// really close to the message freeze so provide alt. texts to choose
// from during the message freeze :)
- const QString alternateText0 = i18n ("%1 bytes");
- const QString alternateText1 = i18n ("%1 bytes (%2%)");
- const QString alternateText2 = i18n ("%1 B");
- const QString alternateText3 = i18n ("%1 B (%2%)");
- const QString alternateText4 = i18n ("%1 B (approx. %2%)");
- const QString alternateText5 = i18n ("%1B");
- const QString alternateText6 = i18n ("%1B (%2%)");
- const QString alternateText7 = i18n ("%1B (approx. %2%)");
+ const TQString alternateText0 = i18n ("%1 bytes");
+ const TQString alternateText1 = i18n ("%1 bytes (%2%)");
+ const TQString alternateText2 = i18n ("%1 B");
+ const TQString alternateText3 = i18n ("%1 B (%2%)");
+ const TQString alternateText4 = i18n ("%1 B (approx. %2%)");
+ const TQString alternateText5 = i18n ("%1B");
+ const TQString alternateText6 = i18n ("%1B (%2%)");
+ const TQString alternateText7 = i18n ("%1B (approx. %2%)");
m_fileSizeLabel->setText (i18n ("%1 bytes (approx. %2%)")
.arg (KGlobal::locale ()->formatLong (m_fileSize))
.arg (percent));
@@ -206,12 +206,12 @@ void kpDocumentSaveOptionsPreviewDialog::updatePixmapPreview ()
#endif
- QPixmap transformedPixmap =
+ TQPixmap transformedPixmap =
kpPixmapFX::scale (*m_filePixmap,
newWidth, newHeight);
- QPixmap labelPixmap (m_filePixmapLabel->width (),
+ TQPixmap labelPixmap (m_filePixmapLabel->width (),
m_filePixmapLabel->height ());
kpPixmapFX::fill (&labelPixmap, kpColor::transparent);
kpPixmapFX::setPixmapAt (&labelPixmap,
@@ -224,54 +224,54 @@ void kpDocumentSaveOptionsPreviewDialog::updatePixmapPreview ()
}
else
{
- m_filePixmapLabel->setPixmap (QPixmap ());
+ m_filePixmapLabel->setPixmap (TQPixmap ());
}
}
// protected virtual [base QWidget]
-void kpDocumentSaveOptionsPreviewDialog::closeEvent (QCloseEvent *e)
+void kpDocumentSaveOptionsPreviewDialog::closeEvent (TQCloseEvent *e)
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
kdDebug () << "kpDocumentSaveOptionsPreviewDialog::closeEvent()" << endl;
#endif
- QWidget::closeEvent (e);
+ TQWidget::closeEvent (e);
emit finished ();
}
// protected virtual [base QWidget]
-void kpDocumentSaveOptionsPreviewDialog::moveEvent (QMoveEvent *e)
+void kpDocumentSaveOptionsPreviewDialog::moveEvent (TQMoveEvent *e)
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
kdDebug () << "kpDocumentSaveOptionsPreviewDialog::moveEvent()" << endl;
#endif
- QWidget::moveEvent (e);
+ TQWidget::moveEvent (e);
emit moved ();
}
// protected virtual [base QWidget]
-void kpDocumentSaveOptionsPreviewDialog::resizeEvent (QResizeEvent *e)
+void kpDocumentSaveOptionsPreviewDialog::resizeEvent (TQResizeEvent *e)
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
kdDebug () << "kpDocumentSaveOptionsPreviewDialog::resizeEvent()" << endl;
#endif
- QWidget::resizeEvent (e);
+ TQWidget::resizeEvent (e);
emit resized ();
}
kpDocumentSaveOptionsWidget::kpDocumentSaveOptionsWidget (
- const QPixmap &docPixmap,
+ const TQPixmap &docPixmap,
const kpDocumentSaveOptions &saveOptions,
const kpDocumentMetaInfo &metaInfo,
- QWidget *parent, const char *name)
- : QWidget (parent, name),
+ TQWidget *parent, const char *name)
+ : TQWidget (parent, name),
m_visualParent (parent)
{
init ();
@@ -281,8 +281,8 @@ kpDocumentSaveOptionsWidget::kpDocumentSaveOptionsWidget (
}
kpDocumentSaveOptionsWidget::kpDocumentSaveOptionsWidget (
- QWidget *parent, const char *name)
- : QWidget (parent, name),
+ TQWidget *parent, const char *name)
+ : TQWidget (parent, name),
m_visualParent (parent)
{
init ();
@@ -296,16 +296,16 @@ void kpDocumentSaveOptionsWidget::init ()
m_visualParent = 0;
- m_colorDepthLabel = new QLabel (i18n ("Convert &to:"), this);
+ m_colorDepthLabel = new TQLabel (i18n ("Convert &to:"), this);
m_colorDepthCombo = new KComboBox (this);
- m_colorDepthSpaceWidget = new QWidget (this);
+ m_colorDepthSpaceWidget = new TQWidget (this);
- m_qualityLabel = new QLabel (i18n ("Quali&ty:"), this);
+ m_qualityLabel = new TQLabel (i18n ("Quali&ty:"), this);
m_qualityInput = new KIntNumInput (this);
// Note that we set min to 1 not 0 since "0 Quality" is a bit misleading
// and 101 quality settings would be weird. So we lose 1 quality setting
- // according to QImage::save().
+ // according to TQImage::save().
// TODO: 100 quality is also misleading since that implies perfect quality.
m_qualityInput->setRange (1, 100, 1/*step*/, true/*slider*/);
@@ -318,7 +318,7 @@ void kpDocumentSaveOptionsWidget::init ()
m_qualityLabel->setBuddy (m_qualityInput);
- QHBoxLayout *lay = new QHBoxLayout (this, 0/*margin*/, KDialog::spacingHint ());
+ TQHBoxLayout *lay = new TQHBoxLayout (this, 0/*margin*/, KDialog::spacingHint ());
lay->addWidget (m_colorDepthLabel, 0/*stretch*/, Qt::AlignLeft);
lay->addWidget (m_colorDepthCombo, 0/*stretch*/);
@@ -331,27 +331,27 @@ void kpDocumentSaveOptionsWidget::init ()
lay->addWidget (m_previewButton, 0/*stretch*/, Qt::AlignRight);
- connect (m_colorDepthCombo, SIGNAL (activated (int)),
- this, SLOT (slotColorDepthSelected ()));
- connect (m_colorDepthCombo, SIGNAL (activated (int)),
- this, SLOT (updatePreview ()));
+ connect (m_colorDepthCombo, TQT_SIGNAL (activated (int)),
+ this, TQT_SLOT (slotColorDepthSelected ()));
+ connect (m_colorDepthCombo, TQT_SIGNAL (activated (int)),
+ this, TQT_SLOT (updatePreview ()));
- connect (m_qualityInput, SIGNAL (valueChanged (int)),
- this, SLOT (updatePreviewDelayed ()));
+ connect (m_qualityInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SLOT (updatePreviewDelayed ()));
- connect (m_previewButton, SIGNAL (toggled (bool)),
- this, SLOT (showPreview (bool)));
+ connect (m_previewButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (showPreview (bool)));
m_updatePreviewDelay = 200/*ms*/;
- m_updatePreviewTimer = new QTimer (this);
- connect (m_updatePreviewTimer, SIGNAL (timeout ()),
- this, SLOT (updatePreview ()));
+ m_updatePreviewTimer = new TQTimer (this);
+ connect (m_updatePreviewTimer, TQT_SIGNAL (timeout ()),
+ this, TQT_SLOT (updatePreview ()));
- m_updatePreviewDialogLastRelativeGeometryTimer = new QTimer (this);
- connect (m_updatePreviewDialogLastRelativeGeometryTimer, SIGNAL (timeout ()),
- this, SLOT (updatePreviewDialogLastRelativeGeometry ()));
+ m_updatePreviewDialogLastRelativeGeometryTimer = new TQTimer (this);
+ connect (m_updatePreviewDialogLastRelativeGeometryTimer, TQT_SIGNAL (timeout ()),
+ this, TQT_SLOT (updatePreviewDialogLastRelativeGeometry ()));
setMode (None);
@@ -371,7 +371,7 @@ kpDocumentSaveOptionsWidget::~kpDocumentSaveOptionsWidget ()
// public
-void kpDocumentSaveOptionsWidget::setVisualParent (QWidget *visualParent)
+void kpDocumentSaveOptionsWidget::setVisualParent (TQWidget *visualParent)
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
kdDebug () << "kpDocumentSaveOptionsWidget::setVisualParent("
@@ -396,13 +396,13 @@ bool kpDocumentSaveOptionsWidget::mimeTypeHasConfigurableQuality () const
// public
-QString kpDocumentSaveOptionsWidget::mimeType () const
+TQString kpDocumentSaveOptionsWidget::mimeType () const
{
return m_baseDocumentSaveOptions.mimeType ();
}
// public slots
-void kpDocumentSaveOptionsWidget::setMimeType (const QString &string)
+void kpDocumentSaveOptionsWidget::setMimeType (const TQString &string)
{
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
kdDebug () << "kpDocumentSaveOptionsWidget::setMimeType(" << string
@@ -575,7 +575,7 @@ void kpDocumentSaveOptionsWidget::setColorDepthDither (int newDepth, bool newDit
newDepth, newDither);
// TODO: Ignoring when comboItem >= m_colorDepthCombo->count() is wrong.
// This happens if this mimeType has configurable colour depth
- // and an incorrect maximum colour depth (less than a QImage of
+ // and an incorrect maximum colour depth (less than a TQImage of
// this mimeType, opened by kpDocument).
if (comboItem >= 0 && comboItem < m_colorDepthCombo->count ())
m_colorDepthCombo->setCurrentItem (comboItem);
@@ -632,7 +632,7 @@ void kpDocumentSaveOptionsWidget::setQuality (int newQuality)
#endif
m_baseDocumentSaveOptions.setQuality (newQuality);
- m_qualityInput->setValue (newQuality == -1/*QImage::save() default*/ ?
+ m_qualityInput->setValue (newQuality == -1/*TQImage::save() default*/ ?
75 :
newQuality);
}
@@ -655,10 +655,10 @@ void kpDocumentSaveOptionsWidget::setDocumentSaveOptions (
// public
-void kpDocumentSaveOptionsWidget::setDocumentPixmap (const QPixmap &documentPixmap)
+void kpDocumentSaveOptionsWidget::setDocumentPixmap (const TQPixmap &documentPixmap)
{
delete m_documentPixmap;
- m_documentPixmap = new QPixmap (documentPixmap);
+ m_documentPixmap = new TQPixmap (documentPixmap);
updatePreview ();
}
@@ -705,7 +705,7 @@ void kpDocumentSaveOptionsWidget::setMode (Mode mode)
// 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.
- QTimer::singleShot (0, this, SLOT (repaintLabels ()));
+ TQTimer::singleShot (0, this, TQT_SLOT (repaintLabels ()));
}
// protected slot
@@ -738,8 +738,8 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
m_previewDialog = new kpDocumentSaveOptionsPreviewDialog (m_visualParent, "previewSaveDialog");
updatePreview ();
- connect (m_previewDialog, SIGNAL (finished ()),
- this, SLOT (hidePreview ()));
+ connect (m_previewDialog, TQT_SIGNAL (finished ()),
+ this, TQT_SLOT (hidePreview ()));
KConfigGroupSaver cfgGroupSaver (KGlobal::config (), kpSettingsGroupPreviewSave);
@@ -783,7 +783,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
<< endl;
#endif
- QRect relativeGeometry;
+ TQRect relativeGeometry;
if (!m_previewDialogLastRelativeGeometry.isEmpty () &&
m_visualParent->rect ().intersects (m_previewDialogLastRelativeGeometry))
{
@@ -800,7 +800,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
const int margin = 20;
relativeGeometry =
- QRect (m_visualParent->width () -
+ TQRect (m_visualParent->width () -
m_previewDialog->preferredMinimumSize ().width () -
margin,
margin * 2, // Avoid folder combo
@@ -809,7 +809,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
}
- const QRect globalGeometry =
+ const TQRect globalGeometry =
kpWidgetMapper::toGlobal (m_visualParent,
relativeGeometry);
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
@@ -827,17 +827,17 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
kdDebug () << "\tgeometry after show="
- << QRect (m_previewDialog->x (), m_previewDialog->y (),
+ << TQRect (m_previewDialog->x (), m_previewDialog->y (),
m_previewDialog->width (), m_previewDialog->height ())
<< endl;
#endif
updatePreviewDialogLastRelativeGeometry ();
- connect (m_previewDialog, SIGNAL (moved ()),
- this, SLOT (updatePreviewDialogLastRelativeGeometry ()));
- connect (m_previewDialog, SIGNAL (resized ()),
- this, SLOT (updatePreviewDialogLastRelativeGeometry ()));
+ connect (m_previewDialog, TQT_SIGNAL (moved ()),
+ this, TQT_SLOT (updatePreviewDialogLastRelativeGeometry ()));
+ connect (m_previewDialog, TQT_SIGNAL (resized ()),
+ this, TQT_SLOT (updatePreviewDialogLastRelativeGeometry ()));
m_updatePreviewDialogLastRelativeGeometryTimer->start (200/*ms*/);
}
@@ -856,7 +856,7 @@ void kpDocumentSaveOptionsWidget::showPreview (bool yes)
<< m_previewDialogLastRelativeGeometry
<< " (Qt would have us believe "
<< kpWidgetMapper::fromGlobal (m_visualParent,
- QRect (m_previewDialog->x (), m_previewDialog->y (),
+ TQRect (m_previewDialog->x (), m_previewDialog->y (),
m_previewDialog->width (), m_previewDialog->height ()))
<< ")"
<< endl;
@@ -891,11 +891,11 @@ void kpDocumentSaveOptionsWidget::updatePreview ()
m_updatePreviewTimer->stop ();
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
- QByteArray data;
+ TQByteArray data;
- QBuffer buffer (data);
+ TQBuffer buffer (data);
buffer.open (IO_WriteOnly);
kpDocument::savePixmapToDevice (*m_documentPixmap,
&buffer,
@@ -906,7 +906,7 @@ void kpDocumentSaveOptionsWidget::updatePreview ()
buffer.close ();
- QImage image;
+ TQImage image;
image.loadFromData (data,
KImageIO::typeForMime (mimeType ()).latin1 ());
@@ -915,7 +915,7 @@ void kpDocumentSaveOptionsWidget::updatePreview ()
kpPixmapFX::convertToPixmapAsLosslessAsPossible (image),
data.size ());
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
// protected slot
@@ -931,7 +931,7 @@ void kpDocumentSaveOptionsWidget::updatePreviewDialogLastRelativeGeometry ()
{
m_previewDialogLastRelativeGeometry =
kpWidgetMapper::fromGlobal (m_visualParent,
- QRect (m_previewDialog->x (), m_previewDialog->y (),
+ TQRect (m_previewDialog->x (), m_previewDialog->y (),
m_previewDialog->width (), m_previewDialog->height ()));
#if DEBUG_KP_DOCUMENT_SAVE_OPTIONS_WIDGET
kdDebug () << "\tcaching pos = "
diff --git a/kolourpaint/kpdocumentsaveoptionswidget.h b/kolourpaint/kpdocumentsaveoptionswidget.h
index 50bd35aa..1aeb8cb1 100644
--- a/kolourpaint/kpdocumentsaveoptionswidget.h
+++ b/kolourpaint/kpdocumentsaveoptionswidget.h
@@ -30,13 +30,13 @@
#define KP_DOCUMENT_SAVE_OPTIONS_WIDGET_H
-#include <qsize.h>
+#include <tqsize.h>
-#include <qwidget.h>
+#include <tqwidget.h>
-class QPixmap;
-class QLabel;
+class TQPixmap;
+class TQLabel;
class kpResizeSignallingLabel;
@@ -46,13 +46,13 @@ class kpDocumentSaveOptionsPreviewDialog : public QWidget
Q_OBJECT
public:
- kpDocumentSaveOptionsPreviewDialog (QWidget *parent, const char *name = 0);
+ kpDocumentSaveOptionsPreviewDialog (TQWidget *parent, const char *name = 0);
virtual ~kpDocumentSaveOptionsPreviewDialog ();
- QSize preferredMinimumSize () const;
+ TQSize preferredMinimumSize () const;
protected:
- static const QSize s_pixmapLabelMinimumSize;
+ static const TQSize s_pixmapLabelMinimumSize;
signals:
void moved ();
@@ -60,32 +60,32 @@ signals:
void finished ();
public slots:
- void setFilePixmapAndSize (const QPixmap &filePixmap, int fileSize);
+ void setFilePixmapAndSize (const TQPixmap &filePixmap, int fileSize);
void updatePixmapPreview ();
protected:
- virtual void closeEvent (QCloseEvent *e);
- virtual void moveEvent (QMoveEvent *e);
- virtual void resizeEvent (QResizeEvent *e);
+ virtual void closeEvent (TQCloseEvent *e);
+ virtual void moveEvent (TQMoveEvent *e);
+ virtual void resizeEvent (TQResizeEvent *e);
protected:
- QPixmap *m_filePixmap;
+ TQPixmap *m_filePixmap;
int m_fileSize;
kpResizeSignallingLabel *m_filePixmapLabel;
- QLabel *m_fileSizeLabel;
+ TQLabel *m_fileSizeLabel;
};
-#include <qrect.h>
-#include <qwidget.h>
+#include <tqrect.h>
+#include <tqwidget.h>
#include <kpdocumentmetainfo.h>
#include <kpdocumentsaveoptions.h>
-class QLabel;
-class QTimer;
+class TQLabel;
+class TQTimer;
class KComboBox;
class KIntNumInput;
@@ -97,11 +97,11 @@ class kpDocumentSaveOptionsWidget : public QWidget
Q_OBJECT
public:
- kpDocumentSaveOptionsWidget (const QPixmap &docPixmap,
+ kpDocumentSaveOptionsWidget (const TQPixmap &docPixmap,
const kpDocumentSaveOptions &saveOptions,
const kpDocumentMetaInfo &metaInfo,
- QWidget *parent, const char *name = 0);
- kpDocumentSaveOptionsWidget (QWidget *parent, const char *name = 0);
+ TQWidget *parent, const char *name = 0);
+ kpDocumentSaveOptionsWidget (TQWidget *parent, const char *name = 0);
private:
void init ();
public:
@@ -109,7 +109,7 @@ public:
// <visualParent> is usually the filedialog
- void setVisualParent (QWidget *visualParent);
+ void setVisualParent (TQWidget *visualParent);
protected:
@@ -117,9 +117,9 @@ protected:
bool mimeTypeHasConfigurableQuality () const;
public:
- QString mimeType () const;
+ TQString mimeType () const;
public slots:
- void setMimeType (const QString &string);
+ void setMimeType (const TQString &string);
public:
int colorDepth () const;
@@ -144,7 +144,7 @@ public slots:
public:
- void setDocumentPixmap (const QPixmap &documentPixmap);
+ void setDocumentPixmap (const TQPixmap &documentPixmap);
void setDocumentMetaInfo (const kpDocumentMetaInfo &metaInfo);
@@ -171,29 +171,29 @@ protected slots:
protected:
- QWidget *m_visualParent;
+ TQWidget *m_visualParent;
Mode m_mode;
- QPixmap *m_documentPixmap;
+ TQPixmap *m_documentPixmap;
kpDocumentSaveOptions m_baseDocumentSaveOptions;
kpDocumentMetaInfo m_documentMetaInfo;
- QLabel *m_colorDepthLabel;
+ TQLabel *m_colorDepthLabel;
KComboBox *m_colorDepthCombo;
int m_colorDepthComboLastSelectedItem;
- QWidget *m_colorDepthSpaceWidget;
+ TQWidget *m_colorDepthSpaceWidget;
- QLabel *m_qualityLabel;
+ TQLabel *m_qualityLabel;
KIntNumInput *m_qualityInput;
KPushButton *m_previewButton;
kpDocumentSaveOptionsPreviewDialog *m_previewDialog;
- QRect m_previewDialogLastRelativeGeometry;
- QTimer *m_updatePreviewTimer;
+ TQRect m_previewDialogLastRelativeGeometry;
+ TQTimer *m_updatePreviewTimer;
int m_updatePreviewDelay;
- QTimer *m_updatePreviewDialogLastRelativeGeometryTimer;
+ TQTimer *m_updatePreviewDialogLastRelativeGeometryTimer;
};
diff --git a/kolourpaint/kpmainwindow.cpp b/kolourpaint/kpmainwindow.cpp
index 9af3177b..9e760c2c 100644
--- a/kolourpaint/kpmainwindow.cpp
+++ b/kolourpaint/kpmainwindow.cpp
@@ -29,9 +29,9 @@
#include <kpmainwindow.h>
#include <kpmainwindow_p.h>
-#include <qdragobject.h>
-#include <qpainter.h>
-#include <qtimer.h>
+#include <tqdragobject.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
#include <kactionclasses.h>
#include <kapplication.h>
@@ -59,7 +59,7 @@
#include <kpzoomedview.h>
#if DEBUG_KP_MAIN_WINDOW
- #include <qdatetime.h>
+ #include <tqdatetime.h>
#endif
@@ -169,8 +169,8 @@ void kpMainWindow::init ()
{
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "kpMainWindow(" << name () << ")::init()" << endl;
- QTime totalTime; totalTime.start ();
- QTime time; time.start ();
+ TQTime totalTime; totalTime.start ();
+ TQTime time; time.start ();
#endif
d = new kpMainWindowPrivate;
@@ -259,20 +259,20 @@ void kpMainWindow::init ()
#endif
m_scrollView = new kpViewScrollableContainer (this, "scrollView");
- connect (m_scrollView, SIGNAL (beganDocResize ()),
- this, SLOT (slotBeganDocResize ()));
- connect (m_scrollView, SIGNAL (continuedDocResize (const QSize &)),
- this, SLOT (slotContinuedDocResize (const QSize &)));
- connect (m_scrollView, SIGNAL (cancelledDocResize ()),
- this, SLOT (slotCancelledDocResize ()));
- connect (m_scrollView, SIGNAL (endedDocResize (const QSize &)),
- this, SLOT (slotEndedDocResize (const QSize &)));
-
- connect (m_scrollView, SIGNAL (statusMessageChanged (const QString &)),
- this, SLOT (slotDocResizeMessageChanged (const QString &)));
-
- connect (m_scrollView, SIGNAL (contentsMoving (int, int)),
- this, SLOT (slotScrollViewAboutToScroll ()));
+ connect (m_scrollView, TQT_SIGNAL (beganDocResize ()),
+ this, TQT_SLOT (slotBeganDocResize ()));
+ connect (m_scrollView, TQT_SIGNAL (continuedDocResize (const TQSize &)),
+ this, TQT_SLOT (slotContinuedDocResize (const TQSize &)));
+ connect (m_scrollView, TQT_SIGNAL (cancelledDocResize ()),
+ this, TQT_SLOT (slotCancelledDocResize ()));
+ connect (m_scrollView, TQT_SIGNAL (endedDocResize (const TQSize &)),
+ this, TQT_SLOT (slotEndedDocResize (const TQSize &)));
+
+ connect (m_scrollView, TQT_SIGNAL (statusMessageChanged (const TQString &)),
+ this, TQT_SLOT (slotDocResizeMessageChanged (const TQString &)));
+
+ connect (m_scrollView, TQT_SIGNAL (contentsMoving (int, int)),
+ this, TQT_SLOT (slotScrollViewAboutToScroll ()));
setCentralWidget (m_scrollView);
m_scrollView->show ();
#if DEBUG_KP_MAIN_WINDOW
@@ -334,7 +334,7 @@ void kpMainWindow::readProperties (KConfig *cfg)
kdDebug () << "\turl=" << url << endl;
#endif
- const QSize notFromURLDocSize =
+ const TQSize notFromURLDocSize =
cfg->readSizeEntry (kpSessionSettingNotFromUrlDocumentSize);
// Is from URL?
@@ -413,7 +413,7 @@ void kpMainWindow::saveProperties (KConfig *cfg)
// constructorWidth().
//
// Similarly for height() and constructorHeight().
- const QSize docSize (m_document->constructorWidth (),
+ const TQSize docSize (m_document->constructorWidth (),
m_document->constructorHeight ());
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\tnot from url; doc size=" << docSize << endl;
@@ -423,7 +423,7 @@ void kpMainWindow::saveProperties (KConfig *cfg)
// Local session save i.e. queryClose() was not called beforehand
- // (see QApplication::saveState())?
+ // (see TQApplication::saveState())?
#if 0
if (m_document->isModified ())
{
@@ -550,7 +550,7 @@ bool kpMainWindow::actionsSingleKeyTriggersEnabled () const
{
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "kpMainWindow::actionsSingleKeyTriggersEnabled()" << endl;
- QTime timer; timer.start ();
+ TQTime timer; timer.start ();
#endif
if (m_toolToolBar)
@@ -573,7 +573,7 @@ void kpMainWindow::enableActionsSingleKeyTriggers (bool enable)
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "kpMainWindow::enableActionsSingleKeyTriggers("
<< enable << ")" << endl;
- QTime timer; timer.start ();
+ TQTime timer; timer.start ();
#endif
if (m_toolToolBar)
@@ -658,11 +658,11 @@ void kpMainWindow::setDocument (kpDocument *newDoc)
if (!m_lastCopyToURL.isEmpty ())
- m_lastCopyToURL.setFileName (QString::null);
+ m_lastCopyToURL.setFileName (TQString::null);
m_copyToFirstTime = true;
if (!m_lastExportURL.isEmpty ())
- m_lastExportURL.setFileName (QString::null);
+ m_lastExportURL.setFileName (TQString::null);
m_exportFirstTime = true;
@@ -707,16 +707,16 @@ void kpMainWindow::setDocument (kpDocument *newDoc)
#endif
// Copy/Cut/Deselect/Delete
- connect (m_document, SIGNAL (selectionEnabled (bool)),
- m_actionCut, SLOT (setEnabled (bool)));
- connect (m_document, SIGNAL (selectionEnabled (bool)),
- m_actionCopy, SLOT (setEnabled (bool)));
- connect (m_document, SIGNAL (selectionEnabled (bool)),
- m_actionDelete, SLOT (setEnabled (bool)));
- connect (m_document, SIGNAL (selectionEnabled (bool)),
- m_actionDeselect, SLOT (setEnabled (bool)));
- connect (m_document, SIGNAL (selectionEnabled (bool)),
- m_actionCopyToFile, SLOT (setEnabled (bool)));
+ connect (m_document, TQT_SIGNAL (selectionEnabled (bool)),
+ m_actionCut, TQT_SLOT (setEnabled (bool)));
+ connect (m_document, TQT_SIGNAL (selectionEnabled (bool)),
+ m_actionCopy, TQT_SLOT (setEnabled (bool)));
+ connect (m_document, TQT_SIGNAL (selectionEnabled (bool)),
+ m_actionDelete, TQT_SLOT (setEnabled (bool)));
+ connect (m_document, TQT_SIGNAL (selectionEnabled (bool)),
+ m_actionDeselect, TQT_SLOT (setEnabled (bool)));
+ connect (m_document, TQT_SIGNAL (selectionEnabled (bool)),
+ m_actionCopyToFile, TQT_SLOT (setEnabled (bool)));
// this code won't actually enable any actions at this stage
// (fresh document) but better safe than sorry
@@ -726,40 +726,40 @@ void kpMainWindow::setDocument (kpDocument *newDoc)
m_actionDelete->setEnabled (m_document->selection ());
m_actionCopyToFile->setEnabled (m_document->selection ());
- connect (m_document, SIGNAL (selectionEnabled (bool)),
- this, SLOT (slotImageMenuUpdateDueToSelection ()));
- connect (m_document, SIGNAL (selectionIsTextChanged (bool)),
- this, SLOT (slotImageMenuUpdateDueToSelection ()));
+ connect (m_document, TQT_SIGNAL (selectionEnabled (bool)),
+ this, TQT_SLOT (slotImageMenuUpdateDueToSelection ()));
+ connect (m_document, TQT_SIGNAL (selectionIsTextChanged (bool)),
+ this, TQT_SLOT (slotImageMenuUpdateDueToSelection ()));
// Status bar
- connect (m_document, SIGNAL (documentOpened ()),
- this, SLOT (recalculateStatusBar ()));
+ connect (m_document, TQT_SIGNAL (documentOpened ()),
+ this, TQT_SLOT (recalculateStatusBar ()));
- connect (m_document, SIGNAL (sizeChanged (const QSize &)),
- this, SLOT (setStatusBarDocSize (const QSize &)));
+ connect (m_document, TQT_SIGNAL (sizeChanged (const TQSize &)),
+ this, TQT_SLOT (setStatusBarDocSize (const TQSize &)));
// Caption (url, modified)
- connect (m_document, SIGNAL (documentModified ()),
- this, SLOT (slotUpdateCaption ()));
- connect (m_document, SIGNAL (documentOpened ()),
- this, SLOT (slotUpdateCaption ()));
- connect (m_document, SIGNAL (documentSaved ()),
- this, SLOT (slotUpdateCaption ()));
+ connect (m_document, TQT_SIGNAL (documentModified ()),
+ this, TQT_SLOT (slotUpdateCaption ()));
+ connect (m_document, TQT_SIGNAL (documentOpened ()),
+ this, TQT_SLOT (slotUpdateCaption ()));
+ connect (m_document, TQT_SIGNAL (documentSaved ()),
+ this, TQT_SLOT (slotUpdateCaption ()));
// File/Reload action only available with non-empty URL
- connect (m_document, SIGNAL (documentSaved ()),
- this, SLOT (slotEnableReload ()));
+ connect (m_document, TQT_SIGNAL (documentSaved ()),
+ this, TQT_SLOT (slotEnableReload ()));
- connect (m_document, SIGNAL (documentSaved ()),
- this, SLOT (slotEnableSettingsShowPath ()));
+ connect (m_document, TQT_SIGNAL (documentSaved ()),
+ this, TQT_SLOT (slotEnableSettingsShowPath ()));
// Command history
if (m_commandHistory)
{
- connect (m_commandHistory, SIGNAL (documentRestored ()),
- this, SLOT (slotDocumentRestored ())); // caption "!modified"
- connect (m_document, SIGNAL (documentSaved ()),
- m_commandHistory, SLOT (documentSaved ()));
+ connect (m_commandHistory, TQT_SIGNAL (documentRestored ()),
+ this, TQT_SLOT (slotDocumentRestored ())); // caption "!modified"
+ connect (m_document, TQT_SIGNAL (documentSaved ()),
+ m_commandHistory, TQT_SLOT (documentSaved ()));
}
else
{
@@ -768,10 +768,10 @@ void kpMainWindow::setDocument (kpDocument *newDoc)
}
// Sync document -> views
- connect (m_document, SIGNAL (contentsChanged (const QRect &)),
- m_viewManager, SLOT (updateViews (const QRect &)));
- connect (m_document, SIGNAL (sizeChanged (int, int)),
- m_viewManager, SLOT (adjustViewsToEnvironment ()));
+ connect (m_document, TQT_SIGNAL (contentsChanged (const TQRect &)),
+ m_viewManager, TQT_SLOT (updateViews (const TQRect &)));
+ connect (m_document, TQT_SIGNAL (sizeChanged (int, int)),
+ m_viewManager, TQT_SLOT (adjustViewsToEnvironment ()));
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\tenabling actions" << endl;
@@ -814,7 +814,7 @@ void kpMainWindow::setDocument (kpDocument *newDoc)
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\tcreating thumbnail LATER" << endl;
#endif
- QTimer::singleShot (0, this, SLOT (slotCreateThumbnail ()));
+ TQTimer::singleShot (0, this, TQT_SLOT (slotCreateThumbnail ()));
}
}
#endif
@@ -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 ()),
- QString::null/*caption*/,
+ TQString::null/*caption*/,
KStdGuiItem::save (), KStdGuiItem::discard ());
switch (result)
@@ -871,15 +871,15 @@ bool kpMainWindow::queryClose ()
// private virtual [base QWidget]
-void kpMainWindow::dragEnterEvent (QDragEnterEvent *e)
+void kpMainWindow::dragEnterEvent (TQDragEnterEvent *e)
{
e->accept (kpSelectionDrag::canDecode (e) ||
KURLDrag::canDecode (e) ||
- QTextDrag::canDecode (e));
+ TQTextDrag::canDecode (e));
}
// private virtual [base QWidget]
-void kpMainWindow::dropEvent (QDropEvent *e)
+void kpMainWindow::dropEvent (TQDropEvent *e)
{
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "kpMainWindow::dropEvent" << e->pos () << endl;
@@ -887,12 +887,12 @@ void kpMainWindow::dropEvent (QDropEvent *e)
kpSelection sel;
KURL::List urls;
- QString text;
+ TQString text;
if (kpSelectionDrag::decode (e, sel/*ref*/, pasteWarnAboutLossInfo ()))
{
sel.setTransparency (selectionTransparency ());
- // TODO: drop at point like with QTextDrag below?
+ // TODO: drop at point like with TQTextDrag below?
paste (sel);
}
else if (KURLDrag::decode (e, urls/*ref*/))
@@ -902,10 +902,10 @@ void kpMainWindow::dropEvent (QDropEvent *e)
open (*it);
}
}
- else if (QTextDrag::decode (e, text/*ref*/))
+ else if (TQTextDrag::decode (e, text/*ref*/))
{
- QPoint selTopLeft = KP_INVALID_POINT;
- const QPoint globalPos = QWidget::mapToGlobal (e->pos ());
+ TQPoint selTopLeft = KP_INVALID_POINT;
+ const TQPoint globalPos = TQWidget::mapToGlobal (e->pos ());
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\tpos toGlobal=" << globalPos << endl;
#endif
@@ -931,7 +931,7 @@ void kpMainWindow::dropEvent (QDropEvent *e)
<< kpWidgetMapper::toGlobal (m_mainView, m_mainView->rect ())
<< " scrollView->globalRect="
<< kpWidgetMapper::toGlobal (m_scrollView,
- QRect (0, 0,
+ TQRect (0, 0,
m_scrollView->visibleWidth (),
m_scrollView->visibleHeight ()))
<< endl;
@@ -950,7 +950,7 @@ void kpMainWindow::dropEvent (QDropEvent *e)
.contains (globalPos) &&
m_scrollView &&
kpWidgetMapper::toGlobal (m_scrollView,
- QRect (0, 0,
+ TQRect (0, 0,
m_scrollView->visibleWidth (),
m_scrollView->visibleHeight ()))
.contains (globalPos))
@@ -962,8 +962,8 @@ void kpMainWindow::dropEvent (QDropEvent *e)
if (view)
{
- const QPoint viewPos = view->mapFromGlobal (globalPos);
- const QPoint docPoint = view->transformViewToDoc (viewPos);
+ const TQPoint viewPos = view->mapFromGlobal (globalPos);
+ const TQPoint docPoint = view->transformViewToDoc (viewPos);
// viewUnderCursor() is hacky and can return a view when we aren't
// over one thanks to drags.
@@ -973,7 +973,7 @@ void kpMainWindow::dropEvent (QDropEvent *e)
// TODO: In terms of doc pixels, would be inconsistent behaviour
// based on zoomLevel of view.
- // selTopLeft -= QPoint (-view->selectionResizeHandleAtomicSize (),
+ // selTopLeft -= TQPoint (-view->selectionResizeHandleAtomicSize (),
// -view->selectionResizeHandleAtomicSize ());
}
}
@@ -998,12 +998,12 @@ void kpMainWindow::slotScrollViewAboutToScroll ()
else
{
// We're getting a late signal from the scrollview (thanks to
- // a timer inside the QScrollView). By now, setDocument() has
+ // a timer inside the TQScrollView). By now, setDocument() has
// already killed the document(), tool() and viewManager().
}
#endif
- QTimer::singleShot (0, this, SLOT (slotScrollViewAfterScroll ()));
+ TQTimer::singleShot (0, this, TQT_SLOT (slotScrollViewAfterScroll ()));
}
// private slot
@@ -1022,7 +1022,7 @@ void kpMainWindow::slotScrollViewAfterScroll ()
// private virtual [base QWidget]
-void kpMainWindow::moveEvent (QMoveEvent * /*e*/)
+void kpMainWindow::moveEvent (TQMoveEvent * /*e*/)
{
if (m_thumbnail)
{
@@ -1045,7 +1045,7 @@ void kpMainWindow::slotUpdateCaption ()
}
else
{
- setCaption (QString::null, false);
+ setCaption (TQString::null, false);
}
}
diff --git a/kolourpaint/kpmainwindow.h b/kolourpaint/kpmainwindow.h
index f5514848..abc5434b 100644
--- a/kolourpaint/kpmainwindow.h
+++ b/kolourpaint/kpmainwindow.h
@@ -32,10 +32,10 @@
#define DEBUG_KP_MAIN_WINDOW 0
-#include <qpoint.h>
-#include <qptrlist.h>
-#include <qsize.h>
-#include <qvaluevector.h>
+#include <tqpoint.h>
+#include <tqptrlist.h>
+#include <tqsize.h>
+#include <tqvaluevector.h>
#include <kmainwindow.h>
#include <kurl.h>
@@ -45,12 +45,12 @@
#include <kppixmapfx.h>
-class QPainter;
-class QPoint;
-class QPopupMenu;
-class QRect;
-class QSize;
-class QStringList;
+class TQPainter;
+class TQPoint;
+class TQPopupMenu;
+class TQRect;
+class TQSize;
+class TQStringList;
class KAction;
class KFontAction;
@@ -113,7 +113,7 @@ private:
double m_configColorSimilarity;
bool m_configThumbnailShown;
- QRect m_configThumbnailGeometry;
+ TQRect m_configThumbnailGeometry;
bool m_configZoomedThumbnail;
void readGeneralSettings ();
@@ -166,15 +166,15 @@ private:
virtual bool queryClose ();
- virtual void dragEnterEvent (QDragEnterEvent *e);
- virtual void dropEvent (QDropEvent *e);
+ virtual void dragEnterEvent (TQDragEnterEvent *e);
+ virtual void dropEvent (TQDropEvent *e);
private slots:
void slotScrollViewAboutToScroll ();
void slotScrollViewAfterScroll ();
private:
- virtual void moveEvent (QMoveEvent *e);
+ virtual void moveEvent (TQMoveEvent *e);
private slots:
void slotUpdateCaption ();
@@ -203,7 +203,7 @@ private:
*m_toolRoundedRectangle;
kpToolText *m_toolText;
- QPtrList <kpTool> m_tools;
+ TQPtrList <kpTool> m_tools;
int m_lastToolNumber;
bool m_toolActionsEnabled;
@@ -263,19 +263,19 @@ private:
private:
bool maybeDragScrollingMainView () const;
private slots:
- bool slotDragScroll (const QPoint &docPoint,
- const QPoint &docLastPoint,
+ bool slotDragScroll (const TQPoint &docPoint,
+ const TQPoint &docLastPoint,
int zoomLevel,
bool *didSomething);
bool slotEndDragScroll ();
private slots:
void slotBeganDocResize ();
- void slotContinuedDocResize (const QSize &size);
+ void slotContinuedDocResize (const TQSize &size);
void slotCancelledDocResize ();
- void slotEndedDocResize (const QSize &size);
+ void slotEndedDocResize (const TQSize &size);
- void slotDocResizeMessageChanged (const QString &string);
+ void slotDocResizeMessageChanged (const TQString &string);
private slots:
void slotActionPrevToolOptionGroup1 ();
@@ -334,8 +334,8 @@ private slots:
void slotNew ();
private:
- QSize defaultDocSize () const;
- void saveDefaultDocSize (const QSize &size);
+ TQSize defaultDocSize () const;
+ void saveDefaultDocSize (const TQSize &size);
private:
bool shouldOpenInNewWindow () const;
@@ -343,7 +343,7 @@ private:
private:
kpDocument *openInternal (const KURL &url,
- const QSize &fallbackDocSize,
+ const TQSize &fallbackDocSize,
bool newDocSameNameIfNotExist);
// Same as above except that it:
//
@@ -358,8 +358,8 @@ private:
// make sense to bubble the Recent Files list.
bool open (const KURL &url, bool newDocSameNameIfNotExist = false);
- KURL::List askForOpenURLs (const QString &caption,
- const QString &startURL,
+ KURL::List askForOpenURLs (const TQString &caption,
+ const TQString &startURL,
bool allowMultipleURLs = true);
private slots:
@@ -367,18 +367,18 @@ private slots:
void slotOpenRecent (const KURL &url);
void slotScan ();
- void slotScanned (const QImage &image, int);
+ void slotScanned (const TQImage &image, int);
bool save (bool localOnly = false);
bool slotSave ();
private:
- KURL askForSaveURL (const QString &caption,
- const QString &startURL,
- const QPixmap &pixmapToBeSaved,
+ KURL askForSaveURL (const TQString &caption,
+ const TQString &startURL,
+ const TQPixmap &pixmapToBeSaved,
const kpDocumentSaveOptions &startSaveOptions,
const kpDocumentMetaInfo &docMetaInfo,
- const QString &forcedSaveOptionsGroup,
+ const TQString &forcedSaveOptionsGroup,
bool localOnly,
kpDocumentSaveOptions *chosenSaveOptions,
bool isSavingForFirstTime,
@@ -439,22 +439,22 @@ private:
bool m_copyToFirstTime;
public:
- QPopupMenu *selectionToolRMBMenu ();
+ TQPopupMenu *selectionToolRMBMenu ();
private slots:
void slotCut ();
void slotCopy ();
void slotEnablePaste ();
private:
- QRect calcUsefulPasteRect (int pixmapWidth, int pixmapHeight);
+ TQRect calcUsefulPasteRect (int pixmapWidth, int pixmapHeight);
void paste (const kpSelection &sel,
bool forceTopLeft = false);
public:
// (<forceNewTextSelection> is ignored if <text> is empty)
- void pasteText (const QString &text,
+ void pasteText (const TQString &text,
bool forceNewTextSelection = false,
- const QPoint &newTextSelectionTopLeft = KP_INVALID_POINT);
- void pasteTextAt (const QString &text, const QPoint &point,
+ const TQPoint &newTextSelectionTopLeft = KP_INVALID_POINT);
+ void pasteTextAt (const TQString &text, const TQPoint &point,
// Allow tiny adjustment of <point> so that mouse
// pointer is not exactly on top of the topLeft of
// any new text selection (so that it doesn't look
@@ -498,12 +498,12 @@ private:
KToggleAction *m_actionShowGrid,
*m_actionShowThumbnail, *m_actionZoomedThumbnail;
- QValueVector <int> m_zoomList;
+ TQValueVector <int> m_zoomList;
private:
void sendZoomListToActionZoom ();
- int zoomLevelFromString (const QString &string);
- QString zoomLevelToString (int zoomLevel);
+ int zoomLevelFromString (const TQString &string);
+ TQString zoomLevelToString (int zoomLevel);
void zoomTo (int zoomLevel, bool centerUnderCursor = false);
private slots:
@@ -534,8 +534,8 @@ private:
void updateMainViewGrid ();
private:
- QRect mapToGlobal (const QRect &rect) const;
- QRect mapFromGlobal (const QRect &rect) const;
+ TQRect mapToGlobal (const TQRect &rect) const;
+ TQRect mapFromGlobal (const TQRect &rect) const;
private slots:
void slotDestroyThumbnailIfNotVisible (bool tnIsVisible);
@@ -544,7 +544,7 @@ private slots:
void slotCreateThumbnail ();
private:
- QTimer *m_thumbnailSaveConfigTimer;
+ TQTimer *m_thumbnailSaveConfigTimer;
public:
void notifyThumbnailGeometryChanged ();
@@ -573,7 +573,7 @@ private:
bool isSelectionActive () const;
bool isTextSelection () const;
- QString autoCropText () const;
+ TQString autoCropText () const;
void setupImageMenuActions ();
void enableImageMenuDocumentActions (bool enable = true);
@@ -647,9 +647,9 @@ private:
kpSqueezedTextLabel *m_statusBarMessageLabel;
bool m_statusBarShapeLastPointsInitialised;
- QPoint m_statusBarShapeLastStartPoint, m_statusBarShapeLastEndPoint;
+ TQPoint m_statusBarShapeLastStartPoint, m_statusBarShapeLastEndPoint;
bool m_statusBarShapeLastSizeInitialised;
- QSize m_statusBarShapeLastSize;
+ TQSize m_statusBarShapeLastSize;
enum
{
@@ -665,11 +665,11 @@ private:
void createStatusBar ();
private slots:
- void setStatusBarMessage (const QString &message = QString::null);
- void setStatusBarShapePoints (const QPoint &startPoint = KP_INVALID_POINT,
- const QPoint &endPoint = KP_INVALID_POINT);
- void setStatusBarShapeSize (const QSize &size = KP_INVALID_SIZE);
- void setStatusBarDocSize (const QSize &size = KP_INVALID_SIZE);
+ void setStatusBarMessage (const TQString &message = TQString::null);
+ void setStatusBarShapePoints (const TQPoint &startPoint = KP_INVALID_POINT,
+ const TQPoint &endPoint = KP_INVALID_POINT);
+ void setStatusBarShapeSize (const TQSize &size = KP_INVALID_SIZE);
+ void setStatusBarDocSize (const TQSize &size = KP_INVALID_SIZE);
void setStatusBarDocDepth (int depth = 0);
void setStatusBarZoom (int zoom = 0);
@@ -712,7 +712,7 @@ private:
*m_actionTextUnderline, *m_actionTextStrikeThru;
int m_settingTextStyle;
- QString m_textOldFontFamily;
+ TQString m_textOldFontFamily;
int m_textOldFontSize;
@@ -725,7 +725,7 @@ private:
private slots:
void slotHelpTakingScreenshots ();
- void slotHelpTakingScreenshotsFollowLink (const QString &link);
+ void slotHelpTakingScreenshotsFollowLink (const TQString &link);
private:
diff --git a/kolourpaint/kpmainwindow_edit.cpp b/kolourpaint/kpmainwindow_edit.cpp
index 3cf9b4f6..1dfdb3fd 100644
--- a/kolourpaint/kpmainwindow_edit.cpp
+++ b/kolourpaint/kpmainwindow_edit.cpp
@@ -27,13 +27,13 @@
#include <kpmainwindow.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qdatetime.h>
-#include <qfontmetrics.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qvaluevector.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqdatetime.h>
+#include <tqfontmetrics.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqvaluevector.h>
#include <kaction.h>
#include <kdebug.h>
@@ -103,25 +103,25 @@ void kpMainWindow::setupEditMenuActions ()
}
- m_actionCut = KStdAction::cut (this, SLOT (slotCut ()), ac);
- m_actionCopy = KStdAction::copy (this, SLOT (slotCopy ()), ac);
- m_actionPaste = KStdAction::paste (this, SLOT (slotPaste ()), ac);
+ 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_actionPasteInNewWindow = new KAction (i18n ("Paste in &New Window"),
Qt::CTRL + Qt::SHIFT + Qt::Key_V,
- this, SLOT (slotPasteInNewWindow ()), ac, "edit_paste_in_new_window");
+ this, TQT_SLOT (slotPasteInNewWindow ()), ac, "edit_paste_in_new_window");
- //m_actionDelete = KStdAction::clear (this, SLOT (slotDelete ()), ac);
+ //m_actionDelete = KStdAction::clear (this, TQT_SLOT (slotDelete ()), ac);
m_actionDelete = new KAction (i18n ("&Delete Selection"), 0,
- this, SLOT (slotDelete ()), ac, "edit_clear");
+ this, TQT_SLOT (slotDelete ()), ac, "edit_clear");
- m_actionSelectAll = KStdAction::selectAll (this, SLOT (slotSelectAll ()), ac);
- m_actionDeselect = KStdAction::deselect (this, SLOT (slotDeselect ()), ac);
+ m_actionSelectAll = KStdAction::selectAll (this, TQT_SLOT (slotSelectAll ()), ac);
+ m_actionDeselect = KStdAction::deselect (this, TQT_SLOT (slotDeselect ()), ac);
m_actionCopyToFile = new KAction (i18n ("C&opy to File..."), 0,
- this, SLOT (slotCopyToFile ()), ac, "edit_copy_to_file");
+ this, TQT_SLOT (slotCopyToFile ()), ac, "edit_copy_to_file");
m_actionPasteFromFile = new KAction (i18n ("Paste &From File..."), 0,
- this, SLOT (slotPasteFromFile ()), ac, "edit_paste_from_file");
+ 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 (QApplication::clipboard (), SIGNAL (dataChanged ()),
- this, SLOT (slotEnablePaste ()));
+ connect (TQApplication::clipboard (), TQT_SIGNAL (dataChanged ()),
+ this, TQT_SLOT (slotEnablePaste ()));
slotEnablePaste ();
}
@@ -158,9 +158,9 @@ void kpMainWindow::enableEditMenuDocumentActions (bool enable)
// public
-QPopupMenu *kpMainWindow::selectionToolRMBMenu ()
+TQPopupMenu *kpMainWindow::selectionToolRMBMenu ()
{
- return (QPopupMenu *) guiFactory ()->container ("selectionToolRMBMenu", this);
+ return (TQPopupMenu *) guiFactory ()->container ("selectionToolRMBMenu", this);
}
@@ -180,7 +180,7 @@ void kpMainWindow::slotCut ()
}
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
if (toolHasBegunShape ())
tool ()->endShapeInternal ();
@@ -188,7 +188,7 @@ void kpMainWindow::slotCut ()
slotCopy ();
slotDelete ();
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
@@ -208,7 +208,7 @@ void kpMainWindow::slotCopy ()
}
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
if (toolHasBegunShape ())
tool ()->endShapeInternal ();
@@ -223,7 +223,7 @@ void kpMainWindow::slotCopy ()
{
if (!sel.text ().isEmpty ())
{
- QApplication::clipboard ()->setData (new QTextDrag (sel.text ()),
+ TQApplication::clipboard ()->setData (new TQTextDrag (sel.text ()),
QClipboard::Clipboard);
// SYNC: Normally, users highlight text and press CTRL+C.
@@ -237,19 +237,19 @@ void kpMainWindow::slotCopy ()
// mouse button" clipboard. We don't do this for images
// as no one ever middle-mouse-pastes images.
//
- // Note that we don't share the QTextDrag pointer with
+ // Note that we don't share the TQTextDrag pointer with
// the above in case Qt doesn't expect it.
//
// Once we change KolourPaint to support highlighted text
// and CTRL+C to copy only the highlighted text, delete
// this code.
- QApplication::clipboard ()->setData (new QTextDrag (sel.text ()),
+ TQApplication::clipboard ()->setData (new TQTextDrag (sel.text ()),
QClipboard::Selection);
}
}
else
{
- QPixmap rawPixmap;
+ TQPixmap rawPixmap;
if (sel.pixmap ())
rawPixmap = *sel.pixmap ();
@@ -268,11 +268,11 @@ void kpMainWindow::slotCopy ()
rawPixmap,
Qt::white)); // CONFIG
- QApplication::clipboard ()->setData (new kpSelectionDrag (sel),
+ TQApplication::clipboard ()->setData (new kpSelectionDrag (sel),
QClipboard::Clipboard);
}
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
@@ -280,7 +280,7 @@ static bool HasSomethingToPaste (kpMainWindow *mw)
{
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "kpMainWindow(" << mw->name () << "):HasSomethingToPaste()" << endl;
- QTime timer;
+ TQTime timer;
timer.start ();
#else
(void) mw;
@@ -288,12 +288,12 @@ static bool HasSomethingToPaste (kpMainWindow *mw)
bool hasSomething = false;
- QMimeSource *ms = QApplication::clipboard ()->data (QClipboard::Clipboard);
+ TQMimeSource *ms = TQApplication::clipboard ()->data (QClipboard::Clipboard);
if (ms)
{
- // It's faster to test for QTextDrag::canDecode() first due to the
+ // It's faster to test for TQTextDrag::canDecode() first due to the
// lazy evaluation of the '||' operator.
- hasSomething = (QTextDrag::canDecode (ms) ||
+ hasSomething = (TQTextDrag::canDecode (ms) ||
kpSelectionDrag::canDecode (ms));
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\t" << mw->name () << "***canDecode=" << timer.restart () << endl;
@@ -311,7 +311,7 @@ static bool HasSomethingToPaste (kpMainWindow *mw)
return hasSomething;
}
-// HACK: SYNC: Non-Qt apps do not cause QApplication::clipboard() to
+// HACK: SYNC: Non-Qt apps do not cause TQApplication::clipboard() to
// emit dataChanged(). We don't want to have our paste
// action disabled when we can actually paste something.
//
@@ -332,13 +332,13 @@ static bool HasSomethingToPasteWithDialogIfNot (kpMainWindow *mw)
#if 1
(void) mw;
#else
- QApplication::setOverrideCursor (Qt::arrowCursor);
+ TQApplication::setOverrideCursor (Qt::arrowCursor);
KMessageBox::sorry (mw,
STRING_FREEZE_i18n ("<qt><p>There is nothing in the clipboard to paste.</p></qt>"),
STRING_FREEZE_i18n ("Cannot Paste"));
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
#endif
return false;
@@ -378,7 +378,7 @@ void kpMainWindow::slotEnablePaste ()
// private
-QRect kpMainWindow::calcUsefulPasteRect (int pixmapWidth, int pixmapHeight)
+TQRect kpMainWindow::calcUsefulPasteRect (int pixmapWidth, int pixmapHeight)
{
#if DEBUG_KP_MAIN_WINDOW && 1
kdDebug () << "kpMainWindow::calcUsefulPasteRect("
@@ -389,29 +389,29 @@ QRect kpMainWindow::calcUsefulPasteRect (int pixmapWidth, int pixmapHeight)
if (!m_document)
{
kdError () << "kpMainWindow::calcUsefulPasteRect() without doc" << endl;
- return QRect ();
+ return TQRect ();
}
// TODO: 1st choice is to paste sel near but not overlapping last deselect point
if (m_mainView && m_scrollView)
{
- const QPoint viewTopLeft (m_scrollView->contentsX (),
+ const TQPoint viewTopLeft (m_scrollView->contentsX (),
m_scrollView->contentsY ());
- const QPoint docTopLeft = m_mainView->transformViewToDoc (viewTopLeft);
+ const TQPoint docTopLeft = m_mainView->transformViewToDoc (viewTopLeft);
if ((docTopLeft.x () + pixmapWidth <= m_document->width () &&
docTopLeft.y () + pixmapHeight <= m_document->height ()) ||
pixmapWidth <= docTopLeft.x () ||
pixmapHeight <= docTopLeft.y ())
{
- return QRect (docTopLeft.x (), docTopLeft.y (),
+ return TQRect (docTopLeft.x (), docTopLeft.y (),
pixmapWidth, pixmapHeight);
}
}
- return QRect (0, 0, pixmapWidth, pixmapHeight);
+ return TQRect (0, 0, pixmapWidth, pixmapHeight);
}
// private
@@ -428,7 +428,7 @@ void kpMainWindow::paste (const kpSelection &sel, bool forceTopLeft)
return;
}
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
if (toolHasBegunShape ())
tool ()->endShapeInternal ();
@@ -464,9 +464,9 @@ void kpMainWindow::paste (const kpSelection &sel, bool forceTopLeft)
#if DEBUG_KP_MAIN_WINDOW && 1
- kdDebug () << "sel.size=" << QSize (sel.width (), sel.height ())
+ kdDebug () << "sel.size=" << TQSize (sel.width (), sel.height ())
<< " document.size="
- << QSize (m_document->width (), m_document->height ())
+ << TQSize (m_document->width (), m_document->height ())
<< endl;
#endif
@@ -489,13 +489,13 @@ void kpMainWindow::paste (const kpSelection &sel, bool forceTopLeft)
}
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
// public
-void kpMainWindow::pasteText (const QString &text,
+void kpMainWindow::pasteText (const TQString &text,
bool forceNewTextSelection,
- const QPoint &newTextSelectionTopLeft)
+ const TQPoint &newTextSelectionTopLeft)
{
#if DEBUG_KP_MAIN_WINDOW && 1
kdDebug () << "kpMainWindow::pasteText(" << text
@@ -509,18 +509,18 @@ void kpMainWindow::pasteText (const QString &text,
// sync: restoreOverrideCursor() in all exit paths
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
if (toolHasBegunShape ())
tool ()->endShapeInternal ();
- QValueVector <QString> textLines (1, QString::null);
+ TQValueVector <TQString> textLines (1, TQString::null);
for (int i = 0; i < (int) text.length (); i++)
{
if (text [i] == '\n')
- textLines.push_back (QString::null);
+ textLines.push_back (TQString::null);
else
textLines [textLines.size () - 1].append (text [i]);
}
@@ -544,7 +544,7 @@ void kpMainWindow::pasteText (const QString &text,
{
macroCmd->addCommand (
new kpToolTextEnterCommand (
- QString::null/*uninteresting child of macroCmd*/,
+ TQString::null/*uninteresting child of macroCmd*/,
m_viewManager->textCursorRow (),
m_viewManager->textCursorCol (),
this));
@@ -552,7 +552,7 @@ void kpMainWindow::pasteText (const QString &text,
macroCmd->addCommand (
new kpToolTextInsertCommand (
- QString::null/*uninteresting child of macroCmd*/,
+ TQString::null/*uninteresting child of macroCmd*/,
m_viewManager->textCursorRow (),
m_viewManager->textCursorCol (),
textLines [i],
@@ -568,14 +568,14 @@ void kpMainWindow::pasteText (const QString &text,
#endif
const kpTextStyle ts = textStyle ();
- const QFontMetrics fontMetrics = ts.fontMetrics ();
+ const TQFontMetrics fontMetrics = ts.fontMetrics ();
int height = textLines.size () * fontMetrics.height ();
if (textLines.size () >= 1)
height += (textLines.size () - 1) * fontMetrics.leading ();
int width = 0;
- for (QValueVector <QString>::const_iterator it = textLines.begin ();
+ for (TQValueVector <TQString>::const_iterator it = textLines.begin ();
it != textLines.end ();
it++)
{
@@ -589,7 +589,7 @@ void kpMainWindow::pasteText (const QString &text,
width + kpSelection::textBorderSize () * 2);
const int selHeight = QMAX (kpSelection::minimumHeightForTextStyle (ts),
height + kpSelection::textBorderSize () * 2);
- kpSelection sel (QRect (0, 0, selWidth, selHeight),
+ kpSelection sel (TQRect (0, 0, selWidth, selHeight),
textLines,
ts);
@@ -605,11 +605,11 @@ void kpMainWindow::pasteText (const QString &text,
}
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
// public
-void kpMainWindow::pasteTextAt (const QString &text, const QPoint &point,
+void kpMainWindow::pasteTextAt (const TQString &text, const TQPoint &point,
bool allowNewTextSelectionPointShift)
{
#if DEBUG_KP_MAIN_WINDOW && 1
@@ -620,7 +620,7 @@ void kpMainWindow::pasteTextAt (const QString &text, const QPoint &point,
<< ")" << endl;
#endif
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
if (toolHasBegunShape ())
tool ()->endShapeInternal ();
@@ -642,20 +642,20 @@ void kpMainWindow::pasteTextAt (const QString &text, const QPoint &point,
}
else
{
- QPoint pointToUse = point;
+ TQPoint pointToUse = point;
if (allowNewTextSelectionPointShift)
{
// TODO: In terms of doc pixels, would be inconsistent behaviour
// based on zoomLevel of view.
- // pointToUse -= QPoint (-view->selectionResizeHandleAtomicSize (),
+ // pointToUse -= TQPoint (-view->selectionResizeHandleAtomicSize (),
// -view->selectionResizeHandleAtomicSize ());
}
pasteText (text, true/*force new text selection*/, pointToUse);
}
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
// public slot
@@ -666,7 +666,7 @@ void kpMainWindow::slotPaste ()
#endif
// sync: restoreOverrideCursor() in all exit paths
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
if (toolHasBegunShape ())
tool ()->endShapeInternal ();
@@ -674,7 +674,7 @@ void kpMainWindow::slotPaste ()
if (!::HasSomethingToPasteWithDialogIfNot (this))
{
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
return;
}
@@ -683,28 +683,28 @@ void kpMainWindow::slotPaste ()
// Acquire the pixmap
//
- QMimeSource *ms = QApplication::clipboard ()->data (QClipboard::Clipboard);
+ TQMimeSource *ms = TQApplication::clipboard ()->data (QClipboard::Clipboard);
if (!ms)
{
kdError () << "kpMainWindow::slotPaste() without mimeSource" << endl;
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
return;
}
kpSelection sel;
- QString text;
+ TQString text;
if (kpSelectionDrag::decode (ms, sel/*ref*/, pasteWarnAboutLossInfo ()))
{
sel.setTransparency (selectionTransparency ());
paste (sel);
}
- else if (QTextDrag::decode (ms, text/*ref*/))
+ else if (TQTextDrag::decode (ms, text/*ref*/))
{
pasteText (text);
}
else
{
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
kdDebug () << "kpMainWindow::slotPaste() could not decode selection" << endl;
kdDebug () << "\tFormats supported:" << endl;
@@ -730,7 +730,7 @@ void kpMainWindow::slotPaste ()
kdDebug () << "\thave memberList" << endl;
#endif
- for (QPtrList <KMainWindow>::const_iterator it = KMainWindow::memberList->begin ();
+ for (TQPtrList <KMainWindow>::const_iterator it = KMainWindow::memberList->begin ();
it != KMainWindow::memberList->end ();
it++)
{
@@ -752,7 +752,7 @@ void kpMainWindow::slotPaste ()
return;
}
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
// private slot
@@ -763,7 +763,7 @@ void kpMainWindow::slotPasteInNewWindow ()
#endif
// sync: restoreOverrideCursor() in all exit paths
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
if (toolHasBegunShape ())
tool ()->endShapeInternal ();
@@ -771,7 +771,7 @@ void kpMainWindow::slotPasteInNewWindow ()
if (!::HasSomethingToPasteWithDialogIfNot (this))
{
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
return;
}
@@ -812,7 +812,7 @@ void kpMainWindow::slotPasteInNewWindow ()
win->slotCrop ();
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
// public slot
@@ -976,7 +976,7 @@ void kpMainWindow::slotCopyToFile ()
kpSelection sel = *m_document->selection ();
- QPixmap pixmapToSave;
+ TQPixmap pixmapToSave;
if (!sel.pixmap ())
{
@@ -1050,7 +1050,7 @@ void kpMainWindow::slotPasteFromFile ()
m_lastPasteFromURL = url;
- QPixmap pixmap = kpDocument::getPixmapFromFile (url,
+ TQPixmap pixmap = kpDocument::getPixmapFromFile (url,
false/*show error message if doesn't exist*/,
this);
@@ -1062,7 +1062,7 @@ void kpMainWindow::slotPasteFromFile ()
addRecentURL (url);
paste (kpSelection (kpSelection::Rectangle,
- QRect (0, 0, pixmap.width (), pixmap.height ()),
+ TQRect (0, 0, pixmap.width (), pixmap.height ()),
pixmap,
selectionTransparency ()));
}
diff --git a/kolourpaint/kpmainwindow_file.cpp b/kolourpaint/kpmainwindow_file.cpp
index b30b323e..a3a10433 100644
--- a/kolourpaint/kpmainwindow_file.cpp
+++ b/kolourpaint/kpmainwindow_file.cpp
@@ -28,11 +28,11 @@
#include <kpmainwindow.h>
-#include <qcstring.h>
-#include <qdatastream.h>
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
-#include <qsize.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqsize.h>
#include <dcopclient.h>
#include <kapplication.h>
@@ -67,41 +67,41 @@ void kpMainWindow::setupFileMenuActions ()
#endif
KActionCollection *ac = actionCollection ();
- m_actionNew = KStdAction::openNew (this, SLOT (slotNew ()), ac);
- m_actionOpen = KStdAction::open (this, SLOT (slotOpen ()), ac);
+ m_actionNew = KStdAction::openNew (this, TQT_SLOT (slotNew ()), ac);
+ m_actionOpen = KStdAction::open (this, TQT_SLOT (slotOpen ()), ac);
- m_actionOpenRecent = KStdAction::openRecent (this, SLOT (slotOpenRecent (const KURL &)), ac);
+ m_actionOpenRecent = KStdAction::openRecent (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, SLOT (slotSave ()), ac);
- m_actionSaveAs = KStdAction::saveAs (this, SLOT (slotSaveAs ()), ac);
+ m_actionSave = KStdAction::save (this, TQT_SLOT (slotSave ()), ac);
+ m_actionSaveAs = KStdAction::saveAs (this, TQT_SLOT (slotSaveAs ()), ac);
m_actionExport = new KAction (i18n ("E&xport..."), 0,
- this, SLOT (slotExport ()), ac, "file_export");
+ this, TQT_SLOT (slotExport ()), ac, "file_export");
m_actionScan = new KAction (i18n ("Scan..."), SmallIcon ("scanner"), 0,
- this, SLOT (slotScan ()), ac, "file_scan");
+ this, TQT_SLOT (slotScan ()), ac, "file_scan");
- //m_actionRevert = KStdAction::revert (this, SLOT (slotRevert ()), ac);
+ //m_actionRevert = KStdAction::revert (this, TQT_SLOT (slotRevert ()), ac);
m_actionReload = new KAction (i18n ("Reloa&d"), KStdAccel::reload (),
- this, SLOT (slotReload ()), ac, "file_revert");
+ this, TQT_SLOT (slotReload ()), ac, "file_revert");
slotEnableReload ();
- m_actionPrint = KStdAction::print (this, SLOT (slotPrint ()), ac);
- m_actionPrintPreview = KStdAction::printPreview (this, SLOT (slotPrintPreview ()), ac);
+ m_actionPrint = KStdAction::print (this, TQT_SLOT (slotPrint ()), ac);
+ m_actionPrintPreview = KStdAction::printPreview (this, TQT_SLOT (slotPrintPreview ()), ac);
- m_actionMail = KStdAction::mail (this, SLOT (slotMail ()), ac);
+ m_actionMail = KStdAction::mail (this, TQT_SLOT (slotMail ()), ac);
m_actionSetAsWallpaperCentered = new KAction (i18n ("Set as Wa&llpaper (Centered)"), 0,
- this, SLOT (slotSetAsWallpaperCentered ()), ac, "file_set_as_wallpaper_centered");
+ this, TQT_SLOT (slotSetAsWallpaperCentered ()), ac, "file_set_as_wallpaper_centered");
m_actionSetAsWallpaperTiled = new KAction (i18n ("Set as Wallpaper (&Tiled)"), 0,
- this, SLOT (slotSetAsWallpaperTiled ()), ac, "file_set_as_wallpaper_tiled");
+ this, TQT_SLOT (slotSetAsWallpaperTiled ()), ac, "file_set_as_wallpaper_tiled");
- m_actionClose = KStdAction::close (this, SLOT (slotClose ()), ac);
- m_actionQuit = KStdAction::quit (this, SLOT (slotQuit ()), ac);
+ m_actionClose = KStdAction::close (this, TQT_SLOT (slotClose ()), ac);
+ m_actionQuit = KStdAction::quit (this, TQT_SLOT (slotQuit ()), ac);
m_scanDialog = 0;
@@ -173,7 +173,7 @@ void kpMainWindow::addRecentURL (const KURL &url)
kdDebug () << "\thave memberList" << endl;
#endif
- for (QPtrList <KMainWindow>::const_iterator it = KMainWindow::memberList->begin ();
+ for (TQPtrList <KMainWindow>::const_iterator it = KMainWindow::memberList->begin ();
it != KMainWindow::memberList->end ();
it++)
{
@@ -228,7 +228,7 @@ void kpMainWindow::slotNew ()
// private
-QSize kpMainWindow::defaultDocSize () const
+TQSize kpMainWindow::defaultDocSize () const
{
// KConfig::readEntry() does not actually reread from disk, hence doesn't
// realise what other processes have done e.g. Settings / Show Path
@@ -237,17 +237,17 @@ QSize kpMainWindow::defaultDocSize () const
KConfigGroupSaver cfgGroupSaver (kapp->config (), kpSettingsGroupGeneral);
KConfigBase *cfg = cfgGroupSaver.config ();
- QSize docSize = cfg->readSizeEntry (kpSettingLastDocSize);
+ TQSize docSize = cfg->readSizeEntry (kpSettingLastDocSize);
if (docSize.isEmpty ())
{
- docSize = QSize (400, 300);
+ docSize = TQSize (400, 300);
}
else
{
// Don't get too big or you'll thrash (or even lock up) the computer
// just by opening a window
- docSize = QSize (QMIN (2048, docSize.width ()),
+ docSize = TQSize (QMIN (2048, docSize.width ()),
QMIN (2048, docSize.height ()));
}
@@ -255,7 +255,7 @@ QSize kpMainWindow::defaultDocSize () const
}
// private
-void kpMainWindow::saveDefaultDocSize (const QSize &size)
+void kpMainWindow::saveDefaultDocSize (const TQSize &size)
{
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\tCONFIG: saving Last Doc Size = " << size << endl;
@@ -295,7 +295,7 @@ void kpMainWindow::setDocumentChoosingWindow (kpDocument *doc)
// private
kpDocument *kpMainWindow::openInternal (const KURL &url,
- const QSize &fallbackDocSize,
+ const TQSize &fallbackDocSize,
bool newDocSameNameIfNotExist)
{
// create doc
@@ -334,12 +334,12 @@ bool kpMainWindow::open (const KURL &url, bool newDocSameNameIfNotExist)
// private
-KURL::List kpMainWindow::askForOpenURLs (const QString &caption, const QString &startURL,
+KURL::List kpMainWindow::askForOpenURLs (const TQString &caption, const TQString &startURL,
bool allowMultipleURLs)
{
- QStringList mimeTypes = KImageIO::mimeTypes (KImageIO::Reading);
+ TQStringList mimeTypes = KImageIO::mimeTypes (KImageIO::Reading);
#if DEBUG_KP_MAIN_WINDOW
- QStringList sortedMimeTypes = mimeTypes;
+ TQStringList sortedMimeTypes = mimeTypes;
sortedMimeTypes.sort ();
kdDebug () << "kpMainWindow::askForURLs(allowMultiple="
<< allowMultipleURLs
@@ -347,7 +347,7 @@ KURL::List kpMainWindow::askForOpenURLs (const QString &caption, const QString &
<< "\tmimeTypes=" << mimeTypes << endl
<< "\tsortedMimeTypes=" << sortedMimeTypes << endl;
#endif
- QString filter = mimeTypes.join (" ");
+ TQString filter = mimeTypes.join (" ");
KFileDialog fd (startURL, filter, this, "fd", true/*modal*/);
fd.setCaption (caption);
@@ -370,7 +370,7 @@ void kpMainWindow::slotOpen ()
const KURL::List urls = askForOpenURLs (i18n ("Open Image"),
- m_document ? m_document->url ().url () : QString::null);
+ m_document ? m_document->url ().url () : TQString::null);
for (KURL::List::const_iterator it = urls.begin ();
it != urls.end ();
@@ -451,8 +451,8 @@ void kpMainWindow::slotScan ()
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\tcreated scanDialog=" << m_scanDialog << endl;
#endif
- connect (m_scanDialog, SIGNAL (finalImage (const QImage &, int)),
- SLOT (slotScanned (const QImage &, int)));
+ connect (m_scanDialog, TQT_SIGNAL (finalImage (const TQImage &, int)),
+ TQT_SLOT (slotScanned (const TQImage &, int)));
}
@@ -481,7 +481,7 @@ void kpMainWindow::slotScan ()
}
// private slot
-void kpMainWindow::slotScanned (const QImage &image, int)
+void kpMainWindow::slotScanned (const TQImage &image, int)
{
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "kpMainWindow::slotScanned() image.rect=" << image.rect () << endl;
@@ -509,11 +509,11 @@ void kpMainWindow::slotScanned (const QImage &image, int)
// TODO: Maybe this code should be moved into kpdocument.cpp -
// since it resembles the responsibilities of kpDocument::open().
- // Convert QImage to kpDocument's image format, gathering meta info
- // from QImage.
+ // Convert TQImage to kpDocument's image format, gathering meta info
+ // from TQImage.
kpDocumentSaveOptions saveOptions;
kpDocumentMetaInfo metaInfo;
- const QPixmap pixmap = kpDocument::convertToPixmapAsLosslessAsPossible (
+ const TQPixmap pixmap = kpDocument::convertToPixmapAsLosslessAsPossible (
image,
kpMainWindow::pasteWarnAboutLossInfo (),
&saveOptions,
@@ -580,12 +580,12 @@ bool kpMainWindow::slotSave ()
}
// private
-KURL kpMainWindow::askForSaveURL (const QString &caption,
- const QString &startURL,
- const QPixmap &pixmapToBeSaved,
+KURL kpMainWindow::askForSaveURL (const TQString &caption,
+ const TQString &startURL,
+ const TQPixmap &pixmapToBeSaved,
const kpDocumentSaveOptions &startSaveOptions,
const kpDocumentMetaInfo &docMetaInfo,
- const QString &forcedSaveOptionsGroup,
+ const TQString &forcedSaveOptionsGroup,
bool localOnly,
kpDocumentSaveOptions *chosenSaveOptions,
bool isSavingForFirstTime,
@@ -625,9 +625,9 @@ KURL kpMainWindow::askForSaveURL (const QString &caption,
kpDocumentSaveOptions fdSaveOptions = startSaveOptions;
- QStringList mimeTypes = KImageIO::mimeTypes (KImageIO::Writing);
+ TQStringList mimeTypes = KImageIO::mimeTypes (KImageIO::Writing);
#if DEBUG_KP_MAIN_WINDOW
- QStringList sortedMimeTypes = mimeTypes;
+ TQStringList sortedMimeTypes = mimeTypes;
sortedMimeTypes.sort ();
kdDebug () << "\tmimeTypes=" << mimeTypes << endl
<< "\tsortedMimeTypes=" << sortedMimeTypes << endl;
@@ -692,7 +692,7 @@ KURL kpMainWindow::askForSaveURL (const QString &caption,
docMetaInfo,
this);
- KFileDialog fd (startURL, QString::null, this, "fd", true/*modal*/,
+ KFileDialog fd (startURL, TQString::null, this, "fd", true/*modal*/,
saveOptionsWidget);
saveOptionsWidget->setVisualParent (&fd);
fd.setCaption (caption);
@@ -704,8 +704,8 @@ KURL kpMainWindow::askForSaveURL (const QString &caption,
if (localOnly)
fd.setMode (KFile::File | KFile::LocalOnly);
- connect (&fd, SIGNAL (filterChanged (const QString &)),
- saveOptionsWidget, SLOT (setMimeType (const QString &)));
+ connect (&fd, TQT_SIGNAL (filterChanged (const TQString &)),
+ saveOptionsWidget, TQT_SLOT (setMimeType (const TQString &)));
if (fd.exec ())
@@ -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 ()),
- QString::null/*caption*/,
+ TQString::null/*caption*/,
i18n ("&Reload"));
}
else
@@ -908,7 +908,7 @@ bool kpMainWindow::slotReload ()
"Reloading will lose all changes.\n"
"Are you sure?")
.arg (m_document->prettyFilename ()),
- QString::null/*caption*/,
+ TQString::null/*caption*/,
i18n ("&Reload"));
}
@@ -963,7 +963,7 @@ void kpMainWindow::sendFilenameToPrinter (KPrinter *printer)
{
int dot;
- QString fileName = url.fileName ();
+ TQString fileName = url.fileName ();
dot = fileName.findRev ('.');
// file.ext but not .hidden-file?
@@ -1027,7 +1027,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer,
bool showPrinterSetupDialog)
{
// Get image to be printed.
- QPixmap pixmap = m_document->pixmapWithSelection ();
+ TQPixmap pixmap = m_document->pixmapWithSelection ();
// Get image DPI.
@@ -1069,7 +1069,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer,
// what if you have multiple screens connected to the same computer
// with different DPIs?
// TODO: mysteriously, someone else is setting this to 96dpi always.
- QPaintDeviceMetrics screenMetrics (&pixmap/*screen element*/);
+ TQPaintDeviceMetrics screenMetrics (&pixmap/*screen element*/);
const int dpiX = screenMetrics.logicalDpiX (),
dpiY = screenMetrics.logicalDpiY ();
#if DEBUG_KP_MAIN_WINDOW
@@ -1088,7 +1088,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer,
// m m m = margin
// m m
// mmmmm
- QPaintDeviceMetrics printerMetrics (printer);
+ TQPaintDeviceMetrics printerMetrics (printer);
const int printerWidthMM = printerMetrics.widthMM ();
const int printerHeightMM = printerMetrics.heightMM ();
#if DEBUG_KP_MAIN_WINDOW
@@ -1132,7 +1132,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer,
}
- // Make sure DPIs are equal as that's all QPrinter::setResolution()
+ // Make sure DPIs are equal as that's all TQPrinter::setResolution()
// supports. We do this in such a way that we only ever stretch an
// image, to avoid losing information. Don't antialias as the printer
// will do that to translate our DPI to its physical resolution and
@@ -1166,7 +1166,7 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer,
// ASSERT: dpiX == dpiY
- // QPrinter::setResolution() has to be called before QPrinter::setup().
+ // TQPrinter::setResolution() has to be called before TQPrinter::setup().
printer->setResolution (QMAX (1, qRound (dpiX)));
@@ -1190,14 +1190,14 @@ void kpMainWindow::sendPixmapToPrinter (KPrinter *printer,
{
// The user can mutate margins at their own risk in this dialog.
// It doesn't seem to affect the size of the page as reported
- // by QPaintDeviceMetrics::{width,height}MM().
+ // by TQPaintDeviceMetrics::{width,height}MM().
if (!printer->setup (this))
return;
}
// Send pixmap to printer.
- QPainter painter;
+ TQPainter painter;
painter.begin (printer);
painter.drawPixmap (qRound (originX), qRound (originY), pixmap);
painter.end ();
@@ -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?"),
- QString::null,
+ TQString::null,
KStdGuiItem::save (), KStdGuiItem::cancel ());
if (result == KMessageBox::Yes)
@@ -1263,13 +1263,13 @@ void kpMainWindow::slotMail ()
}
kapp->invokeMailer (
- QString::null/*to*/,
- QString::null/*cc*/,
- QString::null/*bcc*/,
+ TQString::null/*to*/,
+ TQString::null/*cc*/,
+ TQString::null/*bcc*/,
m_document->prettyFilename()/*subject*/,
- QString::null/*body*/,
- QString::null/*messageFile*/,
- QStringList (m_document->url ().url ())/*attachments*/);
+ TQString::null/*body*/,
+ TQString::null/*messageFile*/,
+ TQStringList (m_document->url ().url ())/*attachments*/);
}
@@ -1281,7 +1281,7 @@ void kpMainWindow::setAsWallpaper (bool centered)
!m_document->isFromURL () ||
m_document->isModified ()/*needs to be saved*/)
{
- QString question;
+ TQString question;
if (!m_document->url ().isLocalFile ())
{
@@ -1297,7 +1297,7 @@ void kpMainWindow::setAsWallpaper (bool centered)
}
int result = KMessageBox::questionYesNo (this,
- question, QString::null,
+ question, TQString::null,
KStdGuiItem::save (), KStdGuiItem::cancel ());
if (result == KMessageBox::Yes)
@@ -1318,15 +1318,15 @@ void kpMainWindow::setAsWallpaper (bool centered)
}
- QByteArray data;
- QDataStream dataStream (data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream dataStream (data, IO_WriteOnly);
// write path
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "kpMainWindow::setAsWallpaper() path="
<< m_document->url ().path () << endl;
#endif
- dataStream << QString (m_document->url ().path ());
+ dataStream << TQString (m_document->url ().path ());
// write position:
//
@@ -1353,7 +1353,7 @@ void kpMainWindow::setAsWallpaper (bool centered)
// installed so kdebase/kdesktop/KBackgroundIface.h might not be around
// to be compiled in (where user == developer :))
if (!KApplication::dcopClient ()->send ("kdesktop", "KBackgroundIface",
- "setWallpaper(QString,int)", data))
+ "setWallpaper(TQString,int)", data))
{
KMessageBox::sorry (this, i18n ("Could not change wallpaper."));
}
diff --git a/kolourpaint/kpmainwindow_help.cpp b/kolourpaint/kpmainwindow_help.cpp
index fb1fc790..9d69143c 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, SLOT (slotHelpTakingScreenshots ()),
+ this, TQT_SLOT (slotHelpTakingScreenshots ()),
ac, "help_taking_screenshots");
@@ -71,18 +71,18 @@ void kpMainWindow::enableHelpMenuDocumentActions (bool /*enable*/)
// SYNC: kdebase/kwin/kwinbindings.cpp
-static QString printScreenShortcutString ()
+static TQString printScreenShortcutString ()
{
KConfigGroupSaver cfgGroupSaver (KGlobal::config (), "Global Shortcuts");
KConfigBase *cfg = cfgGroupSaver.config ();
// TODO: i18n() entry name? kwinbindings.cpp seems to but it doesn't
// make sense.
- const QString cfgEntryString = cfg->readEntry ("Desktop Screenshot");
+ const TQString cfgEntryString = cfg->readEntry ("Desktop Screenshot");
// (only use 1st key sequence, if it exists)
- const QString humanReadableShortcut =
+ const TQString humanReadableShortcut =
KShortcut (cfgEntryString).seq (0).toString ();
if (!humanReadableShortcut.isEmpty ())
@@ -125,7 +125,7 @@ void kpMainWindow::slotHelpTakingScreenshots ()
}
#endif
- QString message;
+ TQString message;
if (isRunningKDE)
{
message = i18n
@@ -185,10 +185,10 @@ void kpMainWindow::slotHelpTakingScreenshots ()
true/*separator line*/);
KActiveLabel *messageLabel = new KActiveLabel (message, &dlg);
- disconnect (messageLabel, SIGNAL (linkClicked (const QString &)),
- messageLabel, SLOT (openLink (const QString &)));
- connect (messageLabel, SIGNAL (linkClicked (const QString &)),
- this, SLOT (slotHelpTakingScreenshotsFollowLink (const QString &)));
+ 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 &)));
dlg.setMainWidget (messageLabel);
@@ -196,7 +196,7 @@ void kpMainWindow::slotHelpTakingScreenshots ()
}
// private
-void kpMainWindow::slotHelpTakingScreenshotsFollowLink (const QString &link)
+void kpMainWindow::slotHelpTakingScreenshotsFollowLink (const TQString &link)
{
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "kpMainWindow::slotHelpTakingScreenshotsFollowLink("
diff --git a/kolourpaint/kpmainwindow_image.cpp b/kolourpaint/kpmainwindow_image.cpp
index 7f662af7..a00f0fd3 100644
--- a/kolourpaint/kpmainwindow_image.cpp
+++ b/kolourpaint/kpmainwindow_image.cpp
@@ -29,8 +29,8 @@
#include <kpmainwindow.h>
#include <kpmainwindow_p.h>
-#include <qcolor.h>
-#include <qsize.h>
+#include <tqcolor.h>
+#include <tqsize.h>
#include <kaction.h>
#include <kapplication.h>
@@ -77,7 +77,7 @@ bool kpMainWindow::isTextSelection () const
// private
-QString kpMainWindow::autoCropText () const
+TQString kpMainWindow::autoCropText () const
{
return kpToolAutoCropCommand::name (isSelectionActive (),
kpToolAutoCropCommand::ShowAccel);
@@ -90,37 +90,37 @@ void kpMainWindow::setupImageMenuActions ()
KActionCollection *ac = actionCollection ();
m_actionResizeScale = new KAction (i18n ("R&esize / Scale..."), Qt::CTRL + Qt::Key_E,
- this, SLOT (slotResizeScale ()), ac, "image_resize_scale");
+ this, TQT_SLOT (slotResizeScale ()), ac, "image_resize_scale");
m_actionCrop = new KAction (i18n ("Se&t as Image (Crop)"), Qt::CTRL + Qt::Key_T,
- this, SLOT (slotCrop ()), ac, "image_crop");
+ this, TQT_SLOT (slotCrop ()), ac, "image_crop");
m_actionAutoCrop = new KAction (autoCropText (), Qt::CTRL + Qt::Key_U,
- this, SLOT (slotAutoCrop ()), ac, "image_auto_crop");
+ this, TQT_SLOT (slotAutoCrop ()), ac, "image_auto_crop");
m_actionFlip = new KAction (i18n ("&Flip..."), Qt::CTRL + Qt::Key_F,
- this, SLOT (slotFlip ()), ac, "image_flip");
+ this, TQT_SLOT (slotFlip ()), ac, "image_flip");
m_actionRotate = new KAction (i18n ("&Rotate..."), Qt::CTRL + Qt::Key_R,
- this, SLOT (slotRotate ()), ac, "image_rotate");
+ this, TQT_SLOT (slotRotate ()), ac, "image_rotate");
m_actionSkew = new KAction (i18n ("S&kew..."), Qt::CTRL + Qt::Key_K,
- this, SLOT (slotSkew ()), ac, "image_skew");
+ this, TQT_SLOT (slotSkew ()), ac, "image_skew");
m_actionConvertToBlackAndWhite = new KAction (i18n ("Reduce to Mo&nochrome (Dithered)"), 0,
- this, SLOT (slotConvertToBlackAndWhite ()), ac, "image_convert_to_black_and_white");
+ this, TQT_SLOT (slotConvertToBlackAndWhite ()), ac, "image_convert_to_black_and_white");
m_actionConvertToGrayscale = new KAction (i18n ("Reduce to &Grayscale"), 0,
- this, SLOT (slotConvertToGrayscale ()), ac, "image_convert_to_grayscale");
+ this, TQT_SLOT (slotConvertToGrayscale ()), ac, "image_convert_to_grayscale");
m_actionInvertColors = new KAction (i18n ("&Invert Colors"), Qt::CTRL + Qt::Key_I,
- this, SLOT (slotInvertColors ()), ac, "image_invert_colors");
+ this, TQT_SLOT (slotInvertColors ()), ac, "image_invert_colors");
m_actionClear = new KAction (i18n ("C&lear"), Qt::CTRL + Qt::SHIFT + Qt::Key_N,
- this, SLOT (slotClear ()), ac, "image_clear");
+ this, TQT_SLOT (slotClear ()), ac, "image_clear");
m_actionMoreEffects = new KAction (i18n ("&More Effects..."), Qt::CTRL + Qt::Key_M,
- this, SLOT (slotMoreEffects ()), ac, "image_more_effects");
+ this, TQT_SLOT (slotMoreEffects ()), ac, "image_more_effects");
enableImageMenuDocumentActions (false);
}
@@ -157,10 +157,10 @@ void kpMainWindow::slotImageMenuUpdateDueToSelection ()
int id = mBar->idAt (index);
// SYNC: kolourpaintui.rc
- QString menuBarItemTextImage = i18n ("&Image");
- QString menuBarItemTextSelection = i18n ("Select&ion");
+ TQString menuBarItemTextImage = i18n ("&Image");
+ TQString menuBarItemTextSelection = i18n ("Select&ion");
- const QString menuBarItemText = mBar->text (id);
+ const TQString menuBarItemText = mBar->text (id);
if (menuBarItemText == menuBarItemTextImage ||
menuBarItemText == menuBarItemTextSelection)
{
@@ -260,7 +260,7 @@ void kpMainWindow::addImageOrSelectionCommand (kpCommand *cmd,
kpMacroCommand *macroCmd = new kpMacroCommand (cmd->name (), this);
macroCmd->addCommand (new kpToolSelectionPullFromDocumentCommand (
- QString::null/*uninteresting child of macro cmd*/,
+ TQString::null/*uninteresting child of macro cmd*/,
this));
macroCmd->addCommand (cmd);
@@ -308,7 +308,7 @@ void kpMainWindow::slotResizeScale ()
dialog.type () == kpToolResizeScaleCommand::Resize)
{
// TODO: this should be the responsibility of kpDocument
- saveDefaultDocSize (QSize (dialog.imageWidth (), dialog.imageHeight ()));
+ saveDefaultDocSize (TQSize (dialog.imageWidth (), dialog.imageHeight ()));
}
}
diff --git a/kolourpaint/kpmainwindow_settings.cpp b/kolourpaint/kpmainwindow_settings.cpp
index 609f7dfe..9e3914e8 100644
--- a/kolourpaint/kpmainwindow_settings.cpp
+++ b/kolourpaint/kpmainwindow_settings.cpp
@@ -57,19 +57,19 @@ void kpMainWindow::setupSettingsMenuActions ()
createStandardStatusBarAction ();
- m_actionFullScreen = KStdAction::fullScreen (this, SLOT (slotFullScreen ()), ac,
+ m_actionFullScreen = KStdAction::fullScreen (this, TQT_SLOT (slotFullScreen ()), ac,
this/*window*/);
m_actionShowPath = new KToggleAction (i18n ("Show &Path"), 0,
- this, SLOT (slotShowPathToggled ()), ac, "settings_show_path");
+ this, TQT_SLOT (slotShowPathToggled ()), ac, "settings_show_path");
m_actionShowPath->setCheckedState (i18n ("Hide &Path"));
slotEnableSettingsShowPath ();
- m_actionKeyBindings = KStdAction::keyBindings (this, SLOT (slotKeyBindings ()), ac);
- m_actionConfigureToolbars = KStdAction::configureToolbars (this, SLOT (slotConfigureToolBars ()), ac);
- // m_actionConfigure = KStdAction::preferences (this, SLOT (slotConfigure ()), ac);
+ 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);
enableSettingsMenuDocumentActions (false);
@@ -168,14 +168,14 @@ void kpMainWindow::slotConfigureToolBars ()
//saveMainWindowSettings (kapp->config (), autoSaveGroup ());
KEditToolbar dialog (actionCollection (),
- QString::null/*default ui.rc file*/,
+ TQString::null/*default ui.rc file*/,
true/*global resource*/,
this/*parent*/);
// Clicking on OK after Apply brings up the dialog (below) again.
// Bug with KEditToolBar.
dialog.showButtonApply (false);
- connect (&dialog, SIGNAL (newToolbarConfig ()),
- this, SLOT (slotNewToolBarConfig ()));
+ connect (&dialog, TQT_SIGNAL (newToolbarConfig ()),
+ this, TQT_SLOT (slotNewToolBarConfig ()));
dialog.exec ();
}
@@ -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"),
- QString::fromLatin1 ("ToolBarSettingsChanged"));
+ TQString::fromLatin1 ("ToolBarSettingsChanged"));
//createGUI();
//applyMainWindowSettings (kapp->config (), autoSaveGroup ());
diff --git a/kolourpaint/kpmainwindow_statusbar.cpp b/kolourpaint/kpmainwindow_statusbar.cpp
index ed854604..ba3b8702 100644
--- a/kolourpaint/kpmainwindow_statusbar.cpp
+++ b/kolourpaint/kpmainwindow_statusbar.cpp
@@ -30,8 +30,8 @@
#include <kpmainwindow.h>
-#include <qlabel.h>
-#include <qstring.h>
+#include <tqlabel.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <klocale.h>
@@ -51,12 +51,12 @@ void kpMainWindow::addPermanentStatusBarItem (int id, int maxTextLen)
{
KStatusBar *sb = statusBar ();
- QString textWithMaxLen;
- textWithMaxLen.fill (QString::number (8/*big fat*/).at (0),
+ TQString textWithMaxLen;
+ textWithMaxLen.fill (TQString::number (8/*big fat*/).at (0),
maxTextLen); //+ 2/*spaces on either side*/);
sb->insertFixedItem (textWithMaxLen, id, true/*permanent, place on the right*/);
- sb->changeItem (QString::null, id);
+ sb->changeItem (TQString::null, id);
}
// private
@@ -67,7 +67,7 @@ void kpMainWindow::createStatusBar ()
// 9999 pixels "ought to be enough for anybody"
const int maxDimenLength = 4;
- //sb->insertItem (QString::null, StatusBarItemMessage, 1/*stretch*/);
+ //sb->insertItem (TQString::null, StatusBarItemMessage, 1/*stretch*/);
//sb->setItemAlignment (StatusBarItemMessage, Qt::AlignLeft | Qt::AlignVCenter);
m_statusBarMessageLabel = new kpSqueezedTextLabel (sb);
@@ -95,7 +95,7 @@ void kpMainWindow::createStatusBar ()
// private slot
-void kpMainWindow::setStatusBarMessage (const QString &message)
+void kpMainWindow::setStatusBarMessage (const TQString &message)
{
#if DEBUG_STATUS_BAR && 1
kdDebug () << "kpMainWindow::setStatusBarMessage("
@@ -112,8 +112,8 @@ void kpMainWindow::setStatusBarMessage (const QString &message)
}
// private slot
-void kpMainWindow::setStatusBarShapePoints (const QPoint &startPoint,
- const QPoint &endPoint)
+void kpMainWindow::setStatusBarShapePoints (const TQPoint &startPoint,
+ const TQPoint &endPoint)
{
#if DEBUG_STATUS_BAR && 0
kdDebug () << "kpMainWindow::setStatusBarShapePoints("
@@ -137,7 +137,7 @@ void kpMainWindow::setStatusBarShapePoints (const QPoint &startPoint,
if (startPoint == KP_INVALID_POINT)
{
- statusBar ()->changeItem (QString::null, StatusBarItemShapePoints);
+ statusBar ()->changeItem (TQString::null, StatusBarItemShapePoints);
}
else if (endPoint == KP_INVALID_POINT)
{
@@ -162,7 +162,7 @@ void kpMainWindow::setStatusBarShapePoints (const QPoint &startPoint,
}
// private slot
-void kpMainWindow::setStatusBarShapeSize (const QSize &size)
+void kpMainWindow::setStatusBarShapeSize (const TQSize &size)
{
#if DEBUG_STATUS_BAR && 0
kdDebug () << "kpMainWindow::setStatusBarShapeSize("
@@ -185,7 +185,7 @@ void kpMainWindow::setStatusBarShapeSize (const QSize &size)
if (size == KP_INVALID_SIZE)
{
- statusBar ()->changeItem (QString::null, StatusBarItemShapeSize);
+ statusBar ()->changeItem (TQString::null, StatusBarItemShapeSize);
}
else
{
@@ -200,7 +200,7 @@ void kpMainWindow::setStatusBarShapeSize (const QSize &size)
}
// private slot
-void kpMainWindow::setStatusBarDocSize (const QSize &size)
+void kpMainWindow::setStatusBarDocSize (const TQSize &size)
{
#if DEBUG_STATUS_BAR && 0
kdDebug () << "kpMainWindow::setStatusBarDocSize("
@@ -214,7 +214,7 @@ void kpMainWindow::setStatusBarDocSize (const QSize &size)
if (size == KP_INVALID_SIZE)
{
- statusBar ()->changeItem (QString::null, StatusBarItemDocSize);
+ statusBar ()->changeItem (TQString::null, StatusBarItemDocSize);
}
else
{
@@ -240,7 +240,7 @@ void kpMainWindow::setStatusBarDocDepth (int depth)
if (depth <= 0)
{
- statusBar ()->changeItem (QString::null, StatusBarItemDocDepth);
+ statusBar ()->changeItem (TQString::null, StatusBarItemDocDepth);
}
else
{
@@ -264,7 +264,7 @@ void kpMainWindow::setStatusBarZoom (int zoom)
if (zoom <= 0)
{
- statusBar ()->changeItem (QString::null, StatusBarItemZoom);
+ statusBar ()->changeItem (TQString::null, StatusBarItemZoom);
}
else
{
@@ -278,7 +278,7 @@ void kpMainWindow::recalculateStatusBarMessage ()
#if DEBUG_STATUS_BAR && 1
kdDebug () << "kpMainWindow::recalculateStatusBarMessage()" << endl;
#endif
- QString scrollViewMessage = m_scrollView->statusMessage ();
+ TQString scrollViewMessage = m_scrollView->statusMessage ();
#if DEBUG_STATUS_BAR && 1
kdDebug () << "\tscrollViewMessage=" << scrollViewMessage << endl;
kdDebug () << "\tresizing doc? " << !m_scrollView->newDocSize ().isEmpty ()
@@ -290,7 +290,7 @@ void kpMainWindow::recalculateStatusBarMessage ()
// HACK: To work around kpViewScrollableContainer's unreliable
// status messages (which in turn is due to Qt not updating
- // QWidget::hasMouse() on drags and we needing to hack around it)
+ // TQWidget::hasMouse() on drags and we needing to hack around it)
if (!scrollViewMessage.isEmpty () &&
m_scrollView->newDocSize ().isEmpty () &&
m_viewManager && m_viewManager->viewUnderCursor ())
@@ -303,7 +303,7 @@ void kpMainWindow::recalculateStatusBarMessage ()
m_scrollView->clearStatusMessage ();
m_scrollView->blockSignals (false);
- scrollViewMessage = QString::null;
+ scrollViewMessage = TQString::null;
#if DEBUG_STATUS_BAR && 1
kdDebug () << "\t\t\tdone" << endl;
#endif
@@ -334,13 +334,13 @@ void kpMainWindow::recalculateStatusBarShape ()
kdDebug () << "kpMainWindow::recalculateStatusBarShape()" << endl;
#endif
- QSize docResizeTo = m_scrollView->newDocSize ();
+ TQSize docResizeTo = m_scrollView->newDocSize ();
#if DEBUG_STATUS_BAR && 0
kdDebug () << "\tdocResizeTo=" << docResizeTo << endl;
#endif
if (docResizeTo.isValid ())
{
- const QPoint startPoint (m_document->width (), m_document->height ());
+ const TQPoint startPoint (m_document->width (), m_document->height ());
#if DEBUG_STATUS_BAR && 0
kdDebug () << "\thavedMovedFromOrgSize="
<< m_scrollView->haveMovedFromOriginalDocSize () << endl;
@@ -355,9 +355,9 @@ void kpMainWindow::recalculateStatusBarShape ()
const int newWidth = docResizeTo.width ();
const int newHeight = docResizeTo.height ();
- setStatusBarShapePoints (startPoint, QPoint (newWidth, newHeight));
- const QPoint sizeAsPoint (QPoint (newWidth, newHeight) - startPoint);
- setStatusBarShapeSize (QSize (sizeAsPoint.x (), sizeAsPoint.y ()));
+ setStatusBarShapePoints (startPoint, TQPoint (newWidth, newHeight));
+ const TQPoint sizeAsPoint (TQPoint (newWidth, newHeight) - startPoint);
+ setStatusBarShapeSize (TQSize (sizeAsPoint.x (), sizeAsPoint.y ()));
}
}
else
@@ -397,7 +397,7 @@ void kpMainWindow::recalculateStatusBar ()
if (m_document)
{
- setStatusBarDocSize (QSize (m_document->width (), m_document->height ()));
+ setStatusBarDocSize (TQSize (m_document->width (), m_document->height ()));
setStatusBarDocDepth (m_document->pixmap ()->depth ());
}
else
diff --git a/kolourpaint/kpmainwindow_text.cpp b/kolourpaint/kpmainwindow_text.cpp
index d5694dea..233ba5b5 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, SLOT (slotTextFontFamilyChanged ()), ac, "text_font_family");
+ this, TQT_SLOT (slotTextFontFamilyChanged ()), ac, "text_font_family");
m_actionTextFontSize = new KFontSizeAction (i18n ("Font Size"), 0/*shortcut*/,
- this, SLOT (slotTextFontSizeChanged ()), ac, "text_font_size");
+ this, TQT_SLOT (slotTextFontSizeChanged ()), ac, "text_font_size");
m_actionTextBold = new KToggleAction (i18n ("Bold"),
"text_bold"/*icon*/, 0/*shortcut*/,
- this, SLOT (slotTextBoldChanged ()), ac, "text_bold");
+ this, TQT_SLOT (slotTextBoldChanged ()), ac, "text_bold");
m_actionTextItalic = new KToggleAction (i18n ("Italic"),
"text_italic"/*icon*/, 0/*shortcut*/,
- this, SLOT (slotTextItalicChanged ()), ac, "text_italic");
+ this, TQT_SLOT (slotTextItalicChanged ()), ac, "text_italic");
m_actionTextUnderline = new KToggleAction (i18n ("Underline"),
"text_under"/*icon*/, 0/*shortcut*/,
- this, SLOT (slotTextUnderlineChanged ()), ac, "text_underline");
+ this, TQT_SLOT (slotTextUnderlineChanged ()), ac, "text_underline");
m_actionTextStrikeThru = new KToggleAction (i18n ("Strike Through"),
"text_strike"/*icon*/, 0/*shortcut*/,
- this, SLOT (slotTextStrikeThruChanged ()), ac, "text_strike_thru");
+ 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, QString::fromLatin1 ("Times")));
+ m_actionTextFontFamily->setFont (cfg->readEntry (kpSettingFontFamily, TQString::fromLatin1 ("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 fb86f91f..de48e1df 100644
--- a/kolourpaint/kpmainwindow_tools.cpp
+++ b/kolourpaint/kpmainwindow_tools.cpp
@@ -103,23 +103,23 @@ void kpMainWindow::setupToolActions ()
m_actionPrevToolOptionGroup1 = new kpSingleKeyTriggersAction (
i18n ("Previous Tool Option (Group #1)"),
kpTool::shortcutForKey (Qt::Key_1),
- this, SLOT (slotActionPrevToolOptionGroup1 ()),
+ 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, SLOT (slotActionNextToolOptionGroup1 ()),
+ 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, SLOT (slotActionPrevToolOptionGroup2 ()),
+ 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, SLOT (slotActionNextToolOptionGroup2 ()),
+ this, TQT_SLOT (slotActionNextToolOptionGroup2 ()),
ac, "next_tool_option_group_2");
}
@@ -127,12 +127,12 @@ void kpMainWindow::setupToolActions ()
void kpMainWindow::createToolBox ()
{
m_toolToolBar = new kpToolToolBar (i18n ("Tool Box"), this, 2/*columns/rows*/, "Tool Box");
- connect (m_toolToolBar, SIGNAL (sigToolSelected (kpTool *)),
- this, SLOT (slotToolSelected (kpTool *)));
- connect (m_toolToolBar, SIGNAL (toolWidgetOptionSelected ()),
- this, SLOT (updateToolOptionPrevNextActionsEnabled ()));
+ connect (m_toolToolBar, TQT_SIGNAL (sigToolSelected (kpTool *)),
+ this, TQT_SLOT (slotToolSelected (kpTool *)));
+ connect (m_toolToolBar, TQT_SIGNAL (toolWidgetOptionSelected ()),
+ this, TQT_SLOT (updateToolOptionPrevNextActionsEnabled ()));
- for (QPtrList <kpTool>::const_iterator it = m_tools.begin ();
+ for (TQPtrList <kpTool>::const_iterator it = m_tools.begin ();
it != m_tools.end ();
it++)
{
@@ -183,7 +183,7 @@ void kpMainWindow::enableToolsDocumentActions (bool enable)
m_toolToolBar->setEnabled (enable);
- for (QPtrList <kpTool>::const_iterator it = m_tools.begin ();
+ for (TQPtrList <kpTool>::const_iterator it = m_tools.begin ();
it != m_tools.end ();
it++)
{
@@ -331,55 +331,55 @@ void kpMainWindow::slotToolSelected (kpTool *tool)
if (previousTool)
{
- disconnect (previousTool, SIGNAL (movedAndAboutToDraw (const QPoint &, const QPoint &, int, bool *)),
- this, SLOT (slotDragScroll (const QPoint &, const QPoint &, int, bool *)));
- disconnect (previousTool, SIGNAL (endedDraw (const QPoint &)),
- this, SLOT (slotEndDragScroll ()));
- disconnect (previousTool, SIGNAL (cancelledShape (const QPoint &)),
- this, SLOT (slotEndDragScroll ()));
-
- disconnect (previousTool, SIGNAL (userMessageChanged (const QString &)),
- this, SLOT (recalculateStatusBarMessage ()));
- disconnect (previousTool, SIGNAL (userShapePointsChanged (const QPoint &, const QPoint &)),
- this, SLOT (recalculateStatusBarShape ()));
- disconnect (previousTool, SIGNAL (userShapeSizeChanged (const QSize &)),
- this, SLOT (recalculateStatusBarShape ()));
-
- disconnect (m_colorToolBar, SIGNAL (colorsSwapped (const kpColor &, const kpColor &)),
- previousTool, SLOT (slotColorsSwappedInternal (const kpColor &, const kpColor &)));
- disconnect (m_colorToolBar, SIGNAL (foregroundColorChanged (const kpColor &)),
- previousTool, SLOT (slotForegroundColorChangedInternal (const kpColor &)));
- disconnect (m_colorToolBar, SIGNAL (backgroundColorChanged (const kpColor &)),
- previousTool, SLOT (slotBackgroundColorChangedInternal (const kpColor &)));
- disconnect (m_colorToolBar, SIGNAL (colorSimilarityChanged (double, int)),
- previousTool, SLOT (slotColorSimilarityChangedInternal (double, int)));
+ disconnect (previousTool, TQT_SIGNAL (movedAndAboutToDraw (const TQPoint &, const TQPoint &, int, bool *)),
+ this, TQT_SLOT (slotDragScroll (const TQPoint &, const TQPoint &, int, bool *)));
+ disconnect (previousTool, TQT_SIGNAL (endedDraw (const TQPoint &)),
+ this, TQT_SLOT (slotEndDragScroll ()));
+ disconnect (previousTool, TQT_SIGNAL (cancelledShape (const TQPoint &)),
+ this, TQT_SLOT (slotEndDragScroll ()));
+
+ disconnect (previousTool, TQT_SIGNAL (userMessageChanged (const TQString &)),
+ this, TQT_SLOT (recalculateStatusBarMessage ()));
+ disconnect (previousTool, TQT_SIGNAL (userShapePointsChanged (const TQPoint &, const TQPoint &)),
+ this, TQT_SLOT (recalculateStatusBarShape ()));
+ disconnect (previousTool, TQT_SIGNAL (userShapeSizeChanged (const TQSize &)),
+ this, TQT_SLOT (recalculateStatusBarShape ()));
+
+ disconnect (m_colorToolBar, TQT_SIGNAL (colorsSwapped (const kpColor &, const kpColor &)),
+ previousTool, TQT_SLOT (slotColorsSwappedInternal (const kpColor &, const kpColor &)));
+ disconnect (m_colorToolBar, TQT_SIGNAL (foregroundColorChanged (const kpColor &)),
+ previousTool, TQT_SLOT (slotForegroundColorChangedInternal (const kpColor &)));
+ disconnect (m_colorToolBar, TQT_SIGNAL (backgroundColorChanged (const kpColor &)),
+ previousTool, TQT_SLOT (slotBackgroundColorChangedInternal (const kpColor &)));
+ disconnect (m_colorToolBar, TQT_SIGNAL (colorSimilarityChanged (double, int)),
+ previousTool, TQT_SLOT (slotColorSimilarityChangedInternal (double, int)));
}
if (tool)
{
- connect (tool, SIGNAL (movedAndAboutToDraw (const QPoint &, const QPoint &, int, bool *)),
- this, SLOT (slotDragScroll (const QPoint &, const QPoint &, int, bool *)));
- connect (tool, SIGNAL (endedDraw (const QPoint &)),
- this, SLOT (slotEndDragScroll ()));
- connect (tool, SIGNAL (cancelledShape (const QPoint &)),
- this, SLOT (slotEndDragScroll ()));
-
- connect (tool, SIGNAL (userMessageChanged (const QString &)),
- this, SLOT (recalculateStatusBarMessage ()));
- connect (tool, SIGNAL (userShapePointsChanged (const QPoint &, const QPoint &)),
- this, SLOT (recalculateStatusBarShape ()));
- connect (tool, SIGNAL (userShapeSizeChanged (const QSize &)),
- this, SLOT (recalculateStatusBarShape ()));
+ connect (tool, TQT_SIGNAL (movedAndAboutToDraw (const TQPoint &, const TQPoint &, int, bool *)),
+ this, TQT_SLOT (slotDragScroll (const TQPoint &, const TQPoint &, int, bool *)));
+ connect (tool, TQT_SIGNAL (endedDraw (const TQPoint &)),
+ this, TQT_SLOT (slotEndDragScroll ()));
+ connect (tool, TQT_SIGNAL (cancelledShape (const TQPoint &)),
+ this, TQT_SLOT (slotEndDragScroll ()));
+
+ connect (tool, TQT_SIGNAL (userMessageChanged (const TQString &)),
+ this, TQT_SLOT (recalculateStatusBarMessage ()));
+ connect (tool, TQT_SIGNAL (userShapePointsChanged (const TQPoint &, const TQPoint &)),
+ this, TQT_SLOT (recalculateStatusBarShape ()));
+ connect (tool, TQT_SIGNAL (userShapeSizeChanged (const TQSize &)),
+ this, TQT_SLOT (recalculateStatusBarShape ()));
recalculateStatusBar ();
- connect (m_colorToolBar, SIGNAL (colorsSwapped (const kpColor &, const kpColor &)),
- tool, SLOT (slotColorsSwappedInternal (const kpColor &, const kpColor &)));
- connect (m_colorToolBar, SIGNAL (foregroundColorChanged (const kpColor &)),
- tool, SLOT (slotForegroundColorChangedInternal (const kpColor &)));
- connect (m_colorToolBar, SIGNAL (backgroundColorChanged (const kpColor &)),
- tool, SLOT (slotBackgroundColorChangedInternal (const kpColor &)));
- connect (m_colorToolBar, SIGNAL (colorSimilarityChanged (double, int)),
- tool, SLOT (slotColorSimilarityChangedInternal (double, int)));
+ connect (m_colorToolBar, TQT_SIGNAL (colorsSwapped (const kpColor &, const kpColor &)),
+ tool, TQT_SLOT (slotColorsSwappedInternal (const kpColor &, const kpColor &)));
+ connect (m_colorToolBar, TQT_SIGNAL (foregroundColorChanged (const kpColor &)),
+ tool, TQT_SLOT (slotForegroundColorChangedInternal (const kpColor &)));
+ connect (m_colorToolBar, TQT_SIGNAL (backgroundColorChanged (const kpColor &)),
+ tool, TQT_SLOT (slotBackgroundColorChangedInternal (const kpColor &)));
+ connect (m_colorToolBar, TQT_SIGNAL (colorSimilarityChanged (double, int)),
+ tool, TQT_SLOT (slotColorSimilarityChangedInternal (double, int)));
saveLastTool ();
@@ -403,7 +403,7 @@ void kpMainWindow::readLastTool ()
int kpMainWindow::toolNumber () const
{
int number = 0;
- for (QPtrList <kpTool>::const_iterator it = m_tools.begin ();
+ for (TQPtrList <kpTool>::const_iterator it = m_tools.begin ();
it != m_tools.end ();
it++)
{
@@ -440,8 +440,8 @@ bool kpMainWindow::maybeDragScrollingMainView () const
}
// private slot
-bool kpMainWindow::slotDragScroll (const QPoint &docPoint,
- const QPoint &docLastPoint,
+bool kpMainWindow::slotDragScroll (const TQPoint &docPoint,
+ const TQPoint &docLastPoint,
int zoomLevel,
bool *scrolled)
{
@@ -479,7 +479,7 @@ void kpMainWindow::slotBeganDocResize ()
}
// private slot
-void kpMainWindow::slotContinuedDocResize (const QSize &)
+void kpMainWindow::slotContinuedDocResize (const TQSize &)
{
recalculateStatusBarShape ();
}
@@ -491,7 +491,7 @@ void kpMainWindow::slotCancelledDocResize ()
}
// private slot
-void kpMainWindow::slotEndedDocResize (const QSize &size)
+void kpMainWindow::slotEndedDocResize (const TQSize &size)
{
#define DOC_RESIZE_COMPLETED() \
{ \
@@ -543,7 +543,7 @@ void kpMainWindow::slotEndedDocResize (const QSize &size)
kpToolResizeScaleCommand::Resize,
this));
- saveDefaultDocSize (QSize (m_docResizeWidth, m_docResizeHeight));
+ saveDefaultDocSize (TQSize (m_docResizeWidth, m_docResizeHeight));
}
@@ -553,7 +553,7 @@ void kpMainWindow::slotEndedDocResize (const QSize &size)
}
// private slot
-void kpMainWindow::slotDocResizeMessageChanged (const QString &string)
+void kpMainWindow::slotDocResizeMessageChanged (const TQString &string)
{
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "kpMainWindow::slotDocResizeMessageChanged(" << string
diff --git a/kolourpaint/kpmainwindow_view.cpp b/kolourpaint/kpmainwindow_view.cpp
index 1aa9b5dc..5459f1a7 100644
--- a/kolourpaint/kpmainwindow_view.cpp
+++ b/kolourpaint/kpmainwindow_view.cpp
@@ -30,9 +30,9 @@
#include <kpmainwindow.h>
#include <kpmainwindow_p.h>
-#include <qdatetime.h>
-#include <qpainter.h>
-#include <qtimer.h>
+#include <tqdatetime.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
#include <kactionclasses.h>
#include <kapplication.h>
@@ -67,18 +67,18 @@ void kpMainWindow::setupViewMenuActions ()
m_actionFullScreen->setEnabled (false);*/
- m_actionActualSize = KStdAction::actualSize (this, SLOT (slotActualSize ()), ac);
- /*m_actionFitToPage = KStdAction::fitToPage (this, SLOT (slotFitToPage ()), ac);
- m_actionFitToWidth = KStdAction::fitToWidth (this, SLOT (slotFitToWidth ()), ac);
- m_actionFitToHeight = KStdAction::fitToHeight (this, SLOT (slotFitToHeight ()), ac);*/
+ 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_actionZoomIn = KStdAction::zoomIn (this, SLOT (slotZoomIn ()), ac);
- m_actionZoomOut = KStdAction::zoomOut (this, SLOT (slotZoomOut ()), ac);
+ m_actionZoomIn = KStdAction::zoomIn (this, TQT_SLOT (slotZoomIn ()), ac);
+ m_actionZoomOut = KStdAction::zoomOut (this, TQT_SLOT (slotZoomOut ()), ac);
m_actionZoom = new KSelectAction (i18n ("&Zoom"), 0,
- this, SLOT (slotZoom ()), actionCollection (), "view_zoom_to");
+ 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, SLOT (slotShowGridToggled ()), actionCollection (), "view_show_grid");
+ 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, SLOT (slotShowThumbnailToggled ()), actionCollection (), "view_show_thumbnail");
+ 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, SLOT (slotZoomedThumbnailToggled ()), actionCollection (), "view_zoomed_thumbnail");
+ 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, SLOT (slotThumbnailShowRectangleToggled ()),
+ this, TQT_SLOT (slotThumbnailShowRectangleToggled ()),
actionCollection (), "view_show_thumbnail_rectangle");
@@ -176,10 +176,10 @@ void kpMainWindow::actionShowGridUpdate ()
// private
void kpMainWindow::sendZoomListToActionZoom ()
{
- QStringList items;
+ TQStringList items;
- const QValueVector <int>::ConstIterator zoomListEnd (m_zoomList.end ());
- for (QValueVector <int>::ConstIterator it = m_zoomList.begin ();
+ const TQValueVector <int>::ConstIterator zoomListEnd (m_zoomList.end ());
+ for (TQValueVector <int>::ConstIterator it = m_zoomList.begin ();
it != zoomListEnd;
it++)
{
@@ -196,7 +196,7 @@ void kpMainWindow::sendZoomListToActionZoom ()
}
// private
-int kpMainWindow::zoomLevelFromString (const QString &string)
+int kpMainWindow::zoomLevelFromString (const TQString &string)
{
// loop until not digit
int i;
@@ -214,7 +214,7 @@ int kpMainWindow::zoomLevelFromString (const QString &string)
}
// private
-QString kpMainWindow::zoomLevelToString (int zoomLevel)
+TQString kpMainWindow::zoomLevelToString (int zoomLevel)
{
return i18n ("%1%").arg (zoomLevel);
}
@@ -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),
- QString::null/*caption*/,
+ TQString::null/*caption*/,
i18n ("Set Zoom Level to %1%").arg (zoomLevel),
"DoNotAskAgain_ZoomLevelNotMultipleOf100") != KMessageBox::Continue)
{
@@ -248,7 +248,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
#endif
int index = 0;
- QValueVector <int>::Iterator it = m_zoomList.begin ();
+ TQValueVector <int>::Iterator it = m_zoomList.begin ();
while (index < (int) m_zoomList.count () && zoomLevel > *it)
it++, index++;
@@ -287,7 +287,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
if (m_scrollView && m_scrollView->viewport ())
{
// Ordinary flicker is better than the whole view moving
- QPainter p (m_mainView);
+ TQPainter p (m_mainView);
p.fillRect (m_mainView->rect (),
m_scrollView->viewport ()->colorGroup ().background ());
}
@@ -327,9 +327,9 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
m_viewManager && m_viewManager->viewUnderCursor ())
{
kpView *const vuc = m_viewManager->viewUnderCursor ();
- QPoint viewPoint = vuc->mouseViewPoint ();
+ TQPoint viewPoint = vuc->mouseViewPoint ();
- // vuc->transformViewToDoc() returns QPoint which only has int
+ // vuc->transformViewToDoc() returns TQPoint which only has int
// accuracy so we do X and Y manually.
targetDocX = vuc->transformViewToDocX (viewPoint.x ());
targetDocY = vuc->transformViewToDocY (viewPoint.y ());
@@ -358,7 +358,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
#if DEBUG_ZOOM_FLICKER
{
kdDebug () << "FLICKER: just setZoomLevel" << endl;
- QTime timer; timer.start ();
+ TQTime timer; timer.start ();
while (timer.elapsed () < 1000)
;
}
@@ -376,7 +376,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
#if DEBUG_ZOOM_FLICKER
{
kdDebug () << "FLICKER: just centred" << endl;
- QTime timer; timer.start ();
+ TQTime timer; timer.start ();
while (timer.elapsed () < 2000)
;
}
@@ -397,7 +397,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
const double viewY = vuc->transformDocToViewY (targetDocY);
// Rounding error from zooming in and out :(
// TODO: do everything in terms of tool doc points in type "double".
- const QPoint viewPoint ((int) viewX, (int) viewY);
+ const TQPoint viewPoint ((int) viewX, (int) viewY);
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\t\tdoc: (" << targetDocX << "," << targetDocY << ")"
<< " viewUnderCursor: (" << viewX << "," << viewY << ")"
@@ -406,7 +406,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
if (vuc->clipRegion ().contains (viewPoint))
{
- const QPoint globalPoint =
+ const TQPoint globalPoint =
kpWidgetMapper::toGlobal (vuc, viewPoint);
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\t\tglobalPoint=" << globalPoint << endl;
@@ -415,11 +415,11 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
// TODO: Determine some sane cursor flashing indication -
// cursor movement is convenient but not conventional.
//
- // Major problem: if using QApplication::setOverrideCursor()
+ // Major problem: if using TQApplication::setOverrideCursor()
// and in some stage of flash and window quits.
//
// Or if using kpView::setCursor() and change tool.
- QCursor::setPos (globalPoint);
+ TQCursor::setPos (globalPoint);
}
// e.g. Zoom to 200%, scroll mainView to bottom-right.
// Unzoomed Thumbnail shows top-left portion of bottom-right of
@@ -459,7 +459,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
#if DEBUG_ZOOM_FLICKER
{
kdDebug () << "FLICKER: updated grid action" << endl;
- QTime timer; timer.start ();
+ TQTime timer; timer.start ();
while (timer.elapsed () < 1000)
;
}
@@ -470,7 +470,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
#if DEBUG_ZOOM_FLICKER
{
kdDebug () << "FLICKER: just updated grid" << endl;
- QTime timer; timer.start ();
+ TQTime timer; timer.start ();
while (timer.elapsed () < 1000)
;
}
@@ -484,7 +484,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
#if DEBUG_ZOOM_FLICKER
{
kdDebug () << "FLICKER: just set focus to mainview" << endl;
- QTime timer; timer.start ();
+ TQTime timer; timer.start ();
while (timer.elapsed () < 1000)
;
}
@@ -498,7 +498,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
#if DEBUG_ZOOM_FLICKER
{
kdDebug () << "FLICKER: signalled something below cursor" << endl;
- QTime timer; timer.start ();
+ TQTime timer; timer.start ();
while (timer.elapsed () < 1000)
;
}
@@ -511,7 +511,7 @@ void kpMainWindow::zoomTo (int zoomLevel, bool centerUnderCursor)
// caused mainly by m_scrollView->center()
//
// TODO: remove flicker completely
- //QTimer::singleShot (0, this, SLOT (finishZoomTo ()));
+ //TQTimer::singleShot (0, this, TQT_SLOT (finishZoomTo ()));
// Later: I don't think there is an update() that needs to be queued
// - let's reduce latency instead.
@@ -528,7 +528,7 @@ void kpMainWindow::finishZoomTo ()
#if DEBUG_ZOOM_FLICKER
{
kdDebug () << "FLICKER: inside finishZoomTo" << endl;
- QTime timer; timer.start ();
+ TQTime timer; timer.start ();
while (timer.elapsed () < 2000)
;
}
@@ -546,7 +546,7 @@ void kpMainWindow::finishZoomTo ()
#if DEBUG_ZOOM_FLICKER
{
kdDebug () << "FLICKER: just updated mainView" << endl;
- QTime timer; timer.start ();
+ TQTime timer; timer.start ();
while (timer.elapsed () < 1000)
;
}
@@ -562,7 +562,7 @@ void kpMainWindow::finishZoomTo ()
#if DEBUG_ZOOM_FLICKER
{
kdDebug () << "FLICKER: just updated scrollView::viewport()" << endl;
- QTime timer; timer.start ();
+ TQTime timer; timer.start ();
while (timer.elapsed () < 1000)
;
}
@@ -573,7 +573,7 @@ void kpMainWindow::finishZoomTo ()
#if DEBUG_ZOOM_FLICKER
{
kdDebug () << "FLICKER: just updated scrollView" << endl;
- QTime timer; timer.start ();
+ TQTime timer; timer.start ();
while (timer.elapsed () < 1000)
;
}
@@ -587,7 +587,7 @@ void kpMainWindow::finishZoomTo ()
#if DEBUG_ZOOM_FLICKER
{
kdDebug () << "FLICKER: restored vm queued updates" << endl;
- QTime timer; timer.start ();
+ TQTime timer; timer.start ();
while (timer.elapsed () < 1000)
;
}
@@ -602,7 +602,7 @@ void kpMainWindow::finishZoomTo ()
#if DEBUG_ZOOM_FLICKER
{
kdDebug () << "FLICKER: finishZoomTo done" << endl;
- QTime timer; timer.start ();
+ TQTime timer; timer.start ();
while (timer.elapsed () < 1000)
;
}
@@ -749,13 +749,13 @@ void kpMainWindow::updateMainViewGrid ()
// private
-QRect kpMainWindow::mapToGlobal (const QRect &rect) const
+TQRect kpMainWindow::mapToGlobal (const TQRect &rect) const
{
return kpWidgetMapper::toGlobal (this, rect);
}
// private
-QRect kpMainWindow::mapFromGlobal (const QRect &rect) const
+TQRect kpMainWindow::mapFromGlobal (const TQRect &rect) const
{
return kpWidgetMapper::fromGlobal (this, rect);
}
@@ -821,9 +821,9 @@ void kpMainWindow::notifyThumbnailGeometryChanged ()
if (!m_thumbnailSaveConfigTimer)
{
- m_thumbnailSaveConfigTimer = new QTimer (this);
- connect (m_thumbnailSaveConfigTimer, SIGNAL (timeout ()),
- this, SLOT (slotSaveThumbnailGeometry ()));
+ m_thumbnailSaveConfigTimer = new TQTimer (this);
+ connect (m_thumbnailSaveConfigTimer, TQT_SIGNAL (timeout ()),
+ this, TQT_SLOT (slotSaveThumbnailGeometry ()));
}
m_thumbnailSaveConfigTimer->start (500/*msec*/, true/*single shot*/);
@@ -839,7 +839,7 @@ void kpMainWindow::slotSaveThumbnailGeometry ()
if (!m_thumbnail)
return;
- QRect rect (m_thumbnail->x (), m_thumbnail->y (),
+ 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;
@@ -1069,7 +1069,7 @@ void kpMainWindow::updateThumbnail ()
// Read last saved geometry before creating thumbnail & friends
// in case they call notifyThumbnailGeometryChanged()
- QRect thumbnailGeometry = m_configThumbnailGeometry;
+ TQRect thumbnailGeometry = m_configThumbnailGeometry;
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\t\tlast used geometry=" << thumbnailGeometry << endl;
#endif
@@ -1082,9 +1082,9 @@ void kpMainWindow::updateThumbnail ()
kdDebug () << "\t\tmoving thumbnail to right place" << endl;
#endif
if (!thumbnailGeometry.isEmpty () &&
- QRect (0, 0, width (), height ()).intersects (thumbnailGeometry))
+ TQRect (0, 0, width (), height ()).intersects (thumbnailGeometry))
{
- const QRect geometry = mapToGlobal (thumbnailGeometry);
+ const TQRect geometry = mapToGlobal (thumbnailGeometry);
m_thumbnail->resize (geometry.size ());
m_thumbnail->move (geometry.topLeft ());
}
@@ -1095,7 +1095,7 @@ void kpMainWindow::updateThumbnail ()
const int margin = 20;
const int initialWidth = 160, initialHeight = 120;
- QRect geometryRect (width () - initialWidth - margin * 2,
+ TQRect geometryRect (width () - initialWidth - margin * 2,
m_scrollView->y () + margin,
initialWidth,
initialHeight);
@@ -1121,8 +1121,8 @@ void kpMainWindow::updateThumbnail ()
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\t\tconnecting thumbnail::visibilityChange to destroy slot" << endl;
#endif
- connect (m_thumbnail, SIGNAL (visibilityChanged (bool)),
- this, SLOT (slotDestroyThumbnailIfNotVisible (bool)));
+ connect (m_thumbnail, TQT_SIGNAL (visibilityChanged (bool)),
+ this, TQT_SLOT (slotDestroyThumbnailIfNotVisible (bool)));
#if DEBUG_KP_MAIN_WINDOW
kdDebug () << "\t\tDONE" << endl;
#endif
@@ -1143,8 +1143,8 @@ void kpMainWindow::updateThumbnail ()
destroyThumbnailView ();
- disconnect (m_thumbnail, SIGNAL (visibilityChanged (bool)),
- this, SLOT (slotDestroyThumbnailIfNotVisible (bool)));
+ disconnect (m_thumbnail, TQT_SIGNAL (visibilityChanged (bool)),
+ this, TQT_SLOT (slotDestroyThumbnailIfNotVisible (bool)));
m_thumbnail->deleteLater (); m_thumbnail = 0;
}
diff --git a/kolourpaint/kpselection.cpp b/kolourpaint/kpselection.cpp
index eb5924cf..728fbad9 100644
--- a/kolourpaint/kpselection.cpp
+++ b/kolourpaint/kpselection.cpp
@@ -31,10 +31,10 @@
#include <kpselection.h>
-#include <qfont.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qwmatrix.h>
+#include <tqfont.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqwmatrix.h>
#include <kdebug.h>
#include <klocale.h>
@@ -46,27 +46,27 @@
kpSelection::kpSelection (const kpSelectionTransparency &transparency)
- : QObject (),
+ : TQObject (),
m_type (kpSelection::Rectangle),
m_pixmap (0)
{
setTransparency (transparency);
}
-kpSelection::kpSelection (Type type, const QRect &rect, const QPixmap &pixmap,
+kpSelection::kpSelection (Type type, const TQRect &rect, const TQPixmap &pixmap,
const kpSelectionTransparency &transparency)
- : QObject (),
+ : TQObject (),
m_type (type),
m_rect (rect)
{
calculatePoints ();
- m_pixmap = pixmap.isNull () ? 0 : new QPixmap (pixmap);
+ m_pixmap = pixmap.isNull () ? 0 : new TQPixmap (pixmap);
setTransparency (transparency);
}
-kpSelection::kpSelection (Type type, const QRect &rect, const kpSelectionTransparency &transparency)
- : QObject (),
+kpSelection::kpSelection (Type type, const TQRect &rect, const kpSelectionTransparency &transparency)
+ : TQObject (),
m_type (type),
m_rect (rect),
m_pixmap (0)
@@ -76,10 +76,10 @@ kpSelection::kpSelection (Type type, const QRect &rect, const kpSelectionTranspa
setTransparency (transparency);
}
-kpSelection::kpSelection (const QRect &rect,
- const QValueVector <QString> &textLines_,
+kpSelection::kpSelection (const TQRect &rect,
+ const TQValueVector <TQString> &textLines_,
const kpTextStyle &textStyle_)
- : QObject (),
+ : TQObject (),
m_type (Text),
m_rect (rect),
m_pixmap (0),
@@ -90,21 +90,21 @@ kpSelection::kpSelection (const QRect &rect,
setTextLines (textLines_);
}
-kpSelection::kpSelection (const QPointArray &points, const QPixmap &pixmap,
+kpSelection::kpSelection (const TQPointArray &points, const TQPixmap &pixmap,
const kpSelectionTransparency &transparency)
- : QObject (),
+ : TQObject (),
m_type (Points),
m_rect (points.boundingRect ()),
m_points (points)
{
- m_pixmap = pixmap.isNull () ? 0 : new QPixmap (pixmap);
+ m_pixmap = pixmap.isNull () ? 0 : new TQPixmap (pixmap);
m_points.detach ();
setTransparency (transparency);
}
-kpSelection::kpSelection (const QPointArray &points, const kpSelectionTransparency &transparency)
- : QObject (),
+kpSelection::kpSelection (const TQPointArray &points, const kpSelectionTransparency &transparency)
+ : TQObject (),
m_type (Points),
m_rect (points.boundingRect ()),
m_points (points),
@@ -116,11 +116,11 @@ kpSelection::kpSelection (const QPointArray &points, const kpSelectionTransparen
}
kpSelection::kpSelection (const kpSelection &rhs)
- : QObject (),
+ : TQObject (),
m_type (rhs.m_type),
m_rect (rhs.m_rect),
m_points (rhs.m_points),
- m_pixmap (rhs.m_pixmap ? new QPixmap (*rhs.m_pixmap) : 0),
+ m_pixmap (rhs.m_pixmap ? new TQPixmap (*rhs.m_pixmap) : 0),
m_textLines (rhs.m_textLines),
m_textStyle (rhs.m_textStyle),
m_transparency (rhs.m_transparency),
@@ -140,7 +140,7 @@ kpSelection &kpSelection::operator= (const kpSelection &rhs)
m_points.detach ();
delete m_pixmap;
- m_pixmap = rhs.m_pixmap ? new QPixmap (*rhs.m_pixmap) : 0;
+ m_pixmap = rhs.m_pixmap ? new TQPixmap (*rhs.m_pixmap) : 0;
m_textLines = rhs.m_textLines;
m_textStyle = rhs.m_textStyle;
@@ -153,11 +153,11 @@ kpSelection &kpSelection::operator= (const kpSelection &rhs)
// friend
-QDataStream &operator<< (QDataStream &stream, const kpSelection &selection)
+TQDataStream &operator<< (TQDataStream &stream, const kpSelection &selection)
{
#if DEBUG_KP_SELECTION && 1
kdDebug () << "kpSelection::operator<<(sel: rect=" << selection.boundingRect ()
- << " pixmap rect=" << (selection.pixmap () ? selection.pixmap ()->rect () : QRect ())
+ << " pixmap rect=" << (selection.pixmap () ? selection.pixmap ()->rect () : TQRect ())
<< endl;
#endif
stream << int (selection.m_type);
@@ -169,10 +169,10 @@ QDataStream &operator<< (QDataStream &stream, const kpSelection &selection)
#endif
// TODO: need for text?
- // For now we just use QTextDrag for Text Selections so this point is mute.
+ // For now we just use TQTextDrag for Text Selections so this point is mute.
if (selection.m_pixmap)
{
- const QImage image = kpPixmapFX::convertToImage (*selection.m_pixmap);
+ const TQImage image = kpPixmapFX::convertToImage (*selection.m_pixmap);
#if DEBUG_KP_SELECTION && 1
kdDebug () << "\twrote image rect=" << image.rect () << endl;
#endif
@@ -183,7 +183,7 @@ QDataStream &operator<< (QDataStream &stream, const kpSelection &selection)
#if DEBUG_KP_SELECTION && 1
kdDebug () << "\twrote no image because no pixmap" << endl;
#endif
- stream << QImage ();
+ stream << TQImage ();
}
//stream << selection.m_textLines;
@@ -193,7 +193,7 @@ QDataStream &operator<< (QDataStream &stream, const kpSelection &selection)
}
// friend
-QDataStream &operator>> (QDataStream &stream, kpSelection &selection)
+TQDataStream &operator>> (TQDataStream &stream, kpSelection &selection)
{
selection.readFromStream (stream);
return stream;
@@ -202,7 +202,7 @@ QDataStream &operator>> (QDataStream &stream, kpSelection &selection)
// public
// TODO: KolourPaint has not been tested against invalid or malicious
// clipboard data [Bug #28].
-void kpSelection::readFromStream (QDataStream &stream,
+void kpSelection::readFromStream (TQDataStream &stream,
const kpPixmapFX::WarnAboutLossInfo &wali)
{
#if DEBUG_KP_SELECTION && 1
@@ -223,11 +223,11 @@ void kpSelection::readFromStream (QDataStream &stream,
//kdDebug () << "\tpoints=" << m_points << endl;
#endif
- QImage image;
+ TQImage image;
stream >> image;
delete m_pixmap;
if (!image.isNull ())
- m_pixmap = new QPixmap (kpPixmapFX::convertToPixmap (image, false/*no dither*/, wali));
+ m_pixmap = new TQPixmap (kpPixmapFX::convertToPixmap (image, false/*no dither*/, wali));
else
m_pixmap = 0;
#if DEBUG_KP_SELECTION && 1
@@ -276,19 +276,19 @@ void kpSelection::calculatePoints ()
// top
for (int x = 0; x < m_rect.width (); x++)
- m_points [pointsUpto++] = QPoint (m_rect.x () + x, m_rect.top ());
+ m_points [pointsUpto++] = TQPoint (m_rect.x () + x, m_rect.top ());
// right
for (int y = 0; y < m_rect.height (); y++)
- m_points [pointsUpto++] = QPoint (m_rect.right (), m_rect.y () + y);
+ m_points [pointsUpto++] = TQPoint (m_rect.right (), m_rect.y () + y);
// bottom
for (int x = m_rect.width () - 1; x >= 0; x--)
- m_points [pointsUpto++] = QPoint (m_rect.x () + x, m_rect.bottom ());
+ m_points [pointsUpto++] = TQPoint (m_rect.x () + x, m_rect.bottom ());
// left
for (int y = m_rect.height () - 1; y >= 0; y--)
- m_points [pointsUpto++] = QPoint (m_rect.left (), m_rect.y () + y);
+ m_points [pointsUpto++] = TQPoint (m_rect.left (), m_rect.y () + y);
return;
}
@@ -317,7 +317,7 @@ bool kpSelection::isText () const
}
// public
-QString kpSelection::name () const
+TQString kpSelection::name () const
{
if (m_type == Text)
return i18n ("Text");
@@ -337,30 +337,30 @@ int kpSelection::size () const
// public
-QBitmap kpSelection::maskForOwnType (bool nullForRectangular) const
+TQBitmap kpSelection::maskForOwnType (bool nullForRectangular) const
{
if (!m_rect.isValid ())
{
kdError () << "kpSelection::maskForOwnType() boundingRect invalid" << endl;
- return QBitmap ();
+ return TQBitmap ();
}
if (isRectangular ())
{
if (nullForRectangular)
- return QBitmap ();
+ return TQBitmap ();
- QBitmap maskBitmap (m_rect.width (), m_rect.height ());
+ TQBitmap maskBitmap (m_rect.width (), m_rect.height ());
maskBitmap.fill (Qt::color1/*opaque*/);
return maskBitmap;
}
- QBitmap maskBitmap (m_rect.width (), m_rect.height ());
+ TQBitmap maskBitmap (m_rect.width (), m_rect.height ());
maskBitmap.fill (Qt::color0/*transparent*/);
- QPainter painter;
+ TQPainter painter;
painter.begin (&maskBitmap);
painter.setPen (Qt::color1)/*opaque*/;
painter.setBrush (Qt::color1/*opaque*/);
@@ -369,7 +369,7 @@ QBitmap kpSelection::maskForOwnType (bool nullForRectangular) const
painter.drawEllipse (0, 0, m_rect.width (), m_rect.height ());
else if (m_type == kpSelection::Points)
{
- QPointArray points = m_points;
+ TQPointArray points = m_points;
points.detach ();
points.translate (-m_rect.x (), -m_rect.y ());
@@ -384,13 +384,13 @@ QBitmap kpSelection::maskForOwnType (bool nullForRectangular) const
// public
-QPoint kpSelection::topLeft () const
+TQPoint kpSelection::topLeft () const
{
return m_rect.topLeft ();
}
// public
-QPoint kpSelection::point () const
+TQPoint kpSelection::point () const
{
return m_rect.topLeft ();
}
@@ -419,7 +419,7 @@ void kpSelection::moveBy (int dx, int dy)
if (dx == 0 && dy == 0)
return;
- QRect oldRect = boundingRect ();
+ TQRect oldRect = boundingRect ();
#if DEBUG_KP_SELECTION && 1
kdDebug () << "\toldRect=" << oldRect << endl;
@@ -438,41 +438,41 @@ void kpSelection::moveBy (int dx, int dy)
// public
void kpSelection::moveTo (int dx, int dy)
{
- moveTo (QPoint (dx, dy));
+ moveTo (TQPoint (dx, dy));
}
// public
-void kpSelection::moveTo (const QPoint &topLeftPoint)
+void kpSelection::moveTo (const TQPoint &topLeftPoint)
{
#if DEBUG_KP_SELECTION && 1
kdDebug () << "kpSelection::moveTo(" << topLeftPoint << ")" << endl;
#endif
- QRect oldBoundingRect = boundingRect ();
+ TQRect oldBoundingRect = boundingRect ();
#if DEBUG_KP_SELECTION && 1
kdDebug () << "\toldBoundingRect=" << oldBoundingRect << endl;
#endif
if (topLeftPoint == oldBoundingRect.topLeft ())
return;
- QPoint delta (topLeftPoint - oldBoundingRect.topLeft ());
+ TQPoint delta (topLeftPoint - oldBoundingRect.topLeft ());
moveBy (delta.x (), delta.y ());
}
// public
-QPointArray kpSelection::points () const
+TQPointArray kpSelection::points () const
{
return m_points;
}
// public
-QPointArray kpSelection::pointArray () const
+TQPointArray kpSelection::pointArray () const
{
return m_points;
}
// public
-QRect kpSelection::boundingRect () const
+TQRect kpSelection::boundingRect () const
{
return m_rect;
}
@@ -490,9 +490,9 @@ int kpSelection::height () const
}
// public
-bool kpSelection::contains (const QPoint &point) const
+bool kpSelection::contains (const TQPoint &point) const
{
- QRect rect = boundingRect ();
+ TQRect rect = boundingRect ();
#if DEBUG_KP_SELECTION && 1
kdDebug () << "kpSelection::contains(" << point
@@ -504,7 +504,7 @@ bool kpSelection::contains (const QPoint &point) const
if (!rect.contains (point))
return false;
- // OPT: QRegion is probably incredibly slow - cache
+ // OPT: TQRegion is probably incredibly slow - cache
// We can't use the m_pixmap (if avail) and get the transparency of
// the pixel at that point as it may be transparent but still within the
// border
@@ -514,11 +514,11 @@ bool kpSelection::contains (const QPoint &point) const
case kpSelection::Text:
return true;
case kpSelection::Ellipse:
- return QRegion (m_rect, QRegion::Ellipse).contains (point);
+ return TQRegion (m_rect, TQRegion::Ellipse).contains (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 QRegion (m_points, false/*even-odd algo*/).contains (point);
+ return TQRegion (m_points, false/*even-odd algo*/).contains (point);
default:
return false;
}
@@ -527,25 +527,25 @@ bool kpSelection::contains (const QPoint &point) const
// public
bool kpSelection::contains (int x, int y)
{
- return contains (QPoint (x, y));
+ return contains (TQPoint (x, y));
}
// public
-QPixmap *kpSelection::pixmap () const
+TQPixmap *kpSelection::pixmap () const
{
return m_pixmap;
}
// public
-void kpSelection::setPixmap (const QPixmap &pixmap)
+void kpSelection::setPixmap (const TQPixmap &pixmap)
{
delete m_pixmap;
// TODO: If isText(), setting pixmap() to 0 is unexpected (implies
// it's a border, not a text box) but saves memory when using
- // that kpSelection::setPixmap (QPixmap ()) hack.
- m_pixmap = pixmap.isNull () ? 0 : new QPixmap (pixmap);
- QRect changedRect = boundingRect ();
+ // that kpSelection::setPixmap (TQPixmap ()) hack.
+ m_pixmap = pixmap.isNull () ? 0 : new TQPixmap (pixmap);
+ TQRect changedRect = boundingRect ();
if (m_pixmap)
{
@@ -572,11 +572,11 @@ void kpSelection::setPixmap (const QPixmap &pixmap)
}
m_type = kpSelection::Rectangle;
- m_rect = QRect (m_rect.x (), m_rect.y (),
+ m_rect = TQRect (m_rect.x (), m_rect.y (),
m_pixmap->width (), m_pixmap->height ());
calculatePoints ();
- m_textLines = QValueVector <QString> ();
+ m_textLines = TQValueVector <TQString> ();
changedRect = changedRect.unite (boundingRect ());
}
@@ -615,9 +615,9 @@ static QRgb mostContrastingRGB (QRgb val)
}
// private
-static void drawTextLines (QPainter *painter, QPainter *maskPainter,
- const QRect &rect,
- const QValueVector <QString> &textLines)
+static void drawTextLines (TQPainter *painter, TQPainter *maskPainter,
+ const TQRect &rect,
+ const TQValueVector <TQString> &textLines)
{
if (!painter->clipRegion ().isEmpty () || !maskPainter->clipRegion ().isEmpty ())
{
@@ -638,13 +638,13 @@ static void drawTextLines (QPainter *painter, QPainter *maskPainter,
// Can't do this because the line heights become
- // >QFontMetrics::height() if you type Chinese characters (!) and then
+ // >TQFontMetrics::height() if you type Chinese characters (!) and then
// the cursor gets out of sync.
// PAINTER_CALL (drawText (rect, 0/*flags*/, text ()));
#if 0
- const QFontMetrics fontMetrics (painter->fontMetrics ());
+ const TQFontMetrics fontMetrics (painter->fontMetrics ());
kdDebug () << "height=" << fontMetrics.height ()
<< " leading=" << fontMetrics.leading ()
@@ -655,10 +655,10 @@ static void drawTextLines (QPainter *painter, QPainter *maskPainter,
#endif
- PAINTER_CALL (setClipRect (rect, QPainter::CoordPainter/*transform*/));
+ PAINTER_CALL (setClipRect (rect, TQPainter::CoordPainter/*transform*/));
int baseLine = rect.y () + painter->fontMetrics ().ascent ();
- for (QValueVector <QString>::const_iterator it = textLines.begin ();
+ for (TQValueVector <TQString>::const_iterator it = textLines.begin ();
it != textLines.end ();
it++)
{
@@ -671,25 +671,25 @@ static void drawTextLines (QPainter *painter, QPainter *maskPainter,
}
// private
-void kpSelection::paintOpaqueText (QPixmap *destPixmap, const QRect &docRect) const
+void kpSelection::paintOpaqueText (TQPixmap *destPixmap, const TQRect &docRect) const
{
if (!isText () || !m_textStyle.foregroundColor ().isOpaque ())
return;
- const QRect modifyingRect = docRect.intersect (boundingRect ());
+ const TQRect modifyingRect = docRect.intersect (boundingRect ());
if (modifyingRect.isEmpty ())
return;
- QBitmap destPixmapMask;
- QPainter destPixmapPainter, destPixmapMaskPainter;
+ TQBitmap destPixmapMask;
+ TQPainter destPixmapPainter, destPixmapMaskPainter;
if (destPixmap->mask ())
{
if (m_textStyle.effectiveBackgroundColor ().isTransparent ())
{
- QRect modifyingRectRelPixmap = modifyingRect;
+ TQRect modifyingRectRelPixmap = modifyingRect;
modifyingRectRelPixmap.moveBy (-docRect.x (), -docRect.y ());
// Set the RGB of transparent pixels to foreground colour to avoid
@@ -746,14 +746,14 @@ void kpSelection::paintOpaqueText (QPixmap *destPixmap, const QRect &docRect) co
}
// private
-QPixmap kpSelection::transparentForegroundTextPixmap () const
+TQPixmap kpSelection::transparentForegroundTextPixmap () const
{
if (!isText () || !m_textStyle.foregroundColor ().isTransparent ())
- return QPixmap ();
+ return TQPixmap ();
- QPixmap pixmap (m_rect.width (), m_rect.height ());
- QBitmap pixmapMask (m_rect.width (), m_rect.height ());
+ TQPixmap pixmap (m_rect.width (), m_rect.height ());
+ TQBitmap pixmapMask (m_rect.width (), m_rect.height ());
// Iron out stupid case first
@@ -768,12 +768,12 @@ QPixmap kpSelection::transparentForegroundTextPixmap () const
// -- Foreground transparent, background opaque --
- QFont font = m_textStyle.font ();
- // TODO: why doesn't "font.setStyleStrategy (QFont::NoAntialias);"
+ TQFont font = m_textStyle.font ();
+ // TODO: why doesn't "font.setStyleStrategy (TQFont::NoAntialias);"
// let us avoid the hack below?
- QPainter pixmapPainter, pixmapMaskPainter;
+ TQPainter pixmapPainter, pixmapMaskPainter;
pixmap.fill (m_textStyle.effectiveBackgroundColor ().toQColor ());
pixmapPainter.begin (&pixmap);
@@ -784,7 +784,7 @@ QPixmap kpSelection::transparentForegroundTextPixmap () const
// we can identify the transparent pixels for manually creating
// the mask.
pixmapPainter.setPen (
- QColor (mostContrastingRGB (m_textStyle.effectiveBackgroundColor ().toQRgb () & RGB_MASK)));
+ TQColor (mostContrastingRGB (m_textStyle.effectiveBackgroundColor ().toQRgb () & RGB_MASK)));
pixmapPainter.setFont (font);
@@ -794,7 +794,7 @@ QPixmap kpSelection::transparentForegroundTextPixmap () const
pixmapMaskPainter.setFont (font);
- QRect rect (textAreaRect ());
+ TQRect rect (textAreaRect ());
rect.moveBy (-m_rect.x (), -m_rect.y ());
::drawTextLines (&pixmapPainter, &pixmapMaskPainter,
rect,
@@ -811,7 +811,7 @@ QPixmap kpSelection::transparentForegroundTextPixmap () const
#if DEBUG_KP_SELECTION
kdDebug () << "\tinvoking foreground transparency hack" << endl;
#endif
- QImage image = kpPixmapFX::convertToImage (pixmap);
+ TQImage image = kpPixmapFX::convertToImage (pixmap);
QRgb backgroundRGB = image.pixel (0, 0); // on textBorderSize()
pixmapMaskPainter.begin (&pixmapMask);
@@ -838,7 +838,7 @@ QPixmap kpSelection::transparentForegroundTextPixmap () const
}
// public
-void kpSelection::paint (QPixmap *destPixmap, const QRect &docRect) const
+void kpSelection::paint (TQPixmap *destPixmap, const TQRect &docRect) const
{
if (!isText ())
{
@@ -895,7 +895,7 @@ void kpSelection::calculateTextPixmap ()
if (m_textStyle.foregroundColor().isOpaque ())
{
- m_pixmap = new QPixmap (m_rect.width (), m_rect.height ());
+ m_pixmap = new TQPixmap (m_rect.width (), m_rect.height ());
if (usesBackgroundPixmapToPaint ())
kpPixmapFX::fill (m_pixmap, kpColor::transparent);
@@ -904,24 +904,24 @@ void kpSelection::calculateTextPixmap ()
}
else
{
- m_pixmap = new QPixmap (transparentForegroundTextPixmap ());
+ m_pixmap = new TQPixmap (transparentForegroundTextPixmap ());
}
}
// public static
-QString kpSelection::textForTextLines (const QValueVector <QString> &textLines_)
+TQString kpSelection::textForTextLines (const TQValueVector <TQString> &textLines_)
{
if (textLines_.isEmpty ())
- return QString::null;
+ return TQString::null;
- QString bigString = textLines_ [0];
+ TQString bigString = textLines_ [0];
- for (QValueVector <QString>::const_iterator it = textLines_.begin () + 1;
+ for (TQValueVector <TQString>::const_iterator it = textLines_.begin () + 1;
it != textLines_.end ();
it++)
{
- bigString += QString::fromLatin1 ("\n");
+ bigString += TQString::fromLatin1 ("\n");
bigString += (*it);
}
@@ -929,30 +929,30 @@ QString kpSelection::textForTextLines (const QValueVector <QString> &textLines_)
}
// public
-QString kpSelection::text () const
+TQString kpSelection::text () const
{
if (!isText ())
{
- return QString::null;
+ return TQString::null;
}
return textForTextLines (m_textLines);
}
// public
-QValueVector <QString> kpSelection::textLines () const
+TQValueVector <TQString> kpSelection::textLines () const
{
if (!isText ())
{
kdError () << "kpSelection::textLines() not a text selection" << endl;
- return QValueVector <QString> ();
+ return TQValueVector <TQString> ();
}
return m_textLines;
}
// public
-void kpSelection::setTextLines (const QValueVector <QString> &textLines_)
+void kpSelection::setTextLines (const TQValueVector <TQString> &textLines_)
{
if (!isText ())
{
@@ -964,7 +964,7 @@ void kpSelection::setTextLines (const QValueVector <QString> &textLines_)
if (m_textLines.isEmpty ())
{
kdError () << "kpSelection::setTextLines() passed no lines" << endl;
- m_textLines.push_back (QString::null);
+ m_textLines.push_back (TQString::null);
}
calculateTextPixmap ();
emit changed (boundingRect ());
@@ -977,22 +977,22 @@ int kpSelection::textBorderSize ()
}
// public
-QRect kpSelection::textAreaRect () const
+TQRect kpSelection::textAreaRect () const
{
if (!isText ())
{
kdError () << "kpSelection::textAreaRect() not a text selection" << endl;
- return QRect ();
+ return TQRect ();
}
- return QRect (m_rect.x () + textBorderSize (),
+ return TQRect (m_rect.x () + textBorderSize (),
m_rect.y () + textBorderSize (),
m_rect.width () - textBorderSize () * 2,
m_rect.height () - textBorderSize () * 2);
}
// public
-bool kpSelection::pointIsInTextBorderArea (const QPoint &globalPoint) const
+bool kpSelection::pointIsInTextBorderArea (const TQPoint &globalPoint) const
{
if (!isText ())
{
@@ -1004,7 +1004,7 @@ bool kpSelection::pointIsInTextBorderArea (const QPoint &globalPoint) const
}
// public
-bool kpSelection::pointIsInTextArea (const QPoint &globalPoint) const
+bool kpSelection::pointIsInTextArea (const TQPoint &globalPoint) const
{
if (!isText ())
{
@@ -1025,9 +1025,9 @@ void kpSelection::textResize (int width, int height)
return;
}
- QRect oldRect = m_rect;
+ TQRect oldRect = m_rect;
- m_rect = QRect (oldRect.x (), oldRect.y (), width, height);
+ m_rect = TQRect (oldRect.x (), oldRect.y (), width, height);
calculatePoints ();
calculateTextPixmap ();
@@ -1049,9 +1049,9 @@ int kpSelection::minimumHeightForTextStyle (const kpTextStyle &)
}
// public static
-QSize kpSelection::minimumSizeForTextStyle (const kpTextStyle &textStyle)
+TQSize kpSelection::minimumSizeForTextStyle (const kpTextStyle &textStyle)
{
- return QSize (minimumWidthForTextStyle (textStyle),
+ return TQSize (minimumWidthForTextStyle (textStyle),
minimumHeightForTextStyle (textStyle));
}
@@ -1061,7 +1061,7 @@ int kpSelection::preferredMinimumWidthForTextStyle (const kpTextStyle &textStyle
{
const int about15CharsWidth =
textStyle.fontMetrics ().width (
- QString::fromLatin1 ("1234567890abcde"));
+ TQString::fromLatin1 ("1234567890abcde"));
const int preferredMinWidth =
QMAX (150,
@@ -1082,9 +1082,9 @@ int kpSelection::preferredMinimumHeightForTextStyle (const kpTextStyle &textStyl
}
// public static
-QSize kpSelection::preferredMinimumSizeForTextStyle (const kpTextStyle &textStyle)
+TQSize kpSelection::preferredMinimumSizeForTextStyle (const kpTextStyle &textStyle)
{
- return QSize (preferredMinimumWidthForTextStyle (textStyle),
+ return TQSize (preferredMinimumWidthForTextStyle (textStyle),
preferredMinimumHeightForTextStyle (textStyle));
}
@@ -1108,14 +1108,14 @@ int kpSelection::minimumHeight () const
}
// public
-QSize kpSelection::minimumSize () const
+TQSize kpSelection::minimumSize () const
{
- return QSize (minimumWidth (), minimumHeight ());
+ return TQSize (minimumWidth (), minimumHeight ());
}
// public
-int kpSelection::textRowForPoint (const QPoint &globalPoint) const
+int kpSelection::textRowForPoint (const TQPoint &globalPoint) const
{
if (!isText ())
{
@@ -1126,7 +1126,7 @@ int kpSelection::textRowForPoint (const QPoint &globalPoint) const
if (!pointIsInTextArea (globalPoint))
return -1;
- const QFontMetrics fontMetrics (m_textStyle.fontMetrics ());
+ const TQFontMetrics fontMetrics (m_textStyle.fontMetrics ());
int row = (globalPoint.y () - textAreaRect ().y ()) /
fontMetrics.lineSpacing ();
@@ -1137,7 +1137,7 @@ int kpSelection::textRowForPoint (const QPoint &globalPoint) const
}
// public
-int kpSelection::textColForPoint (const QPoint &globalPoint) const
+int kpSelection::textColForPoint (const TQPoint &globalPoint) const
{
if (!isText ())
{
@@ -1151,7 +1151,7 @@ int kpSelection::textColForPoint (const QPoint &globalPoint) const
const int localX = globalPoint.x () - textAreaRect ().x ();
- const QFontMetrics fontMetrics (m_textStyle.fontMetrics ());
+ const TQFontMetrics fontMetrics (m_textStyle.fontMetrics ());
// (should be 0 but call just in case)
int charLocalLeft = fontMetrics.width (m_textLines [row], 0);
@@ -1171,7 +1171,7 @@ int kpSelection::textColForPoint (const QPoint &globalPoint) const
}
// public
-QPoint kpSelection::pointForTextRowCol (int row, int col)
+TQPoint kpSelection::pointForTextRowCol (int row, int col)
{
if (!isText ())
{
@@ -1194,13 +1194,13 @@ QPoint kpSelection::pointForTextRowCol (int row, int col)
return KP_INVALID_POINT;
}
- const QFontMetrics fontMetrics (m_textStyle.fontMetrics ());
+ const TQFontMetrics fontMetrics (m_textStyle.fontMetrics ());
const int x = fontMetrics.width (m_textLines [row], col);
const int y = row * fontMetrics.height () +
(row >= 1 ? row * fontMetrics.leading () : 0);
- return textAreaRect ().topLeft () + QPoint (x, y);
+ return textAreaRect ().topLeft () + TQPoint (x, y);
}
// public
@@ -1229,16 +1229,16 @@ void kpSelection::setTextStyle (const kpTextStyle &textStyle_)
}
// public
-QPixmap kpSelection::opaquePixmap () const
+TQPixmap kpSelection::opaquePixmap () const
{
- QPixmap *p = pixmap ();
+ TQPixmap *p = pixmap ();
if (p)
{
return *p;
}
else
{
- return QPixmap ();
+ return TQPixmap ();
}
}
@@ -1278,8 +1278,8 @@ void kpSelection::calculateTransparencyMask ()
m_transparencyMask.resize (m_pixmap->width (), m_pixmap->height ());
- QImage image = kpPixmapFX::convertToImage (*m_pixmap);
- QPainter transparencyMaskPainter (&m_transparencyMask);
+ TQImage image = kpPixmapFX::convertToImage (*m_pixmap);
+ TQPainter transparencyMaskPainter (&m_transparencyMask);
bool hasTransparent = false;
for (int y = 0; y < m_pixmap->height (); y++)
@@ -1314,13 +1314,13 @@ void kpSelection::calculateTransparencyMask ()
}
// public
-QPixmap kpSelection::transparentPixmap () const
+TQPixmap kpSelection::transparentPixmap () const
{
- QPixmap pixmap = opaquePixmap ();
+ TQPixmap pixmap = opaquePixmap ();
if (!m_transparencyMask.isNull ())
{
- kpPixmapFX::paintMaskTransparentWithBrush (&pixmap, QPoint (0, 0),
+ kpPixmapFX::paintMaskTransparentWithBrush (&pixmap, TQPoint (0, 0),
m_transparencyMask);
}
@@ -1344,7 +1344,7 @@ bool kpSelection::setTransparency (const kpSelectionTransparency &transparency,
bool haveChanged = true;
- QBitmap oldTransparencyMask = m_transparencyMask;
+ TQBitmap oldTransparencyMask = m_transparencyMask;
calculateTransparencyMask ();
@@ -1360,8 +1360,8 @@ bool kpSelection::setTransparency (const kpSelectionTransparency &transparency,
}
else if (checkTransparentPixmapChanged)
{
- QImage oldTransparencyMaskImage = kpPixmapFX::convertToImage (oldTransparencyMask);
- QImage newTransparencyMaskImage = kpPixmapFX::convertToImage (m_transparencyMask);
+ TQImage oldTransparencyMaskImage = kpPixmapFX::convertToImage (oldTransparencyMask);
+ TQImage newTransparencyMaskImage = kpPixmapFX::convertToImage (m_transparencyMask);
bool changed = false;
for (int y = 0; y < oldTransparencyMaskImage.height () && !changed; y++)
@@ -1372,7 +1372,7 @@ bool kpSelection::setTransparency (const kpSelectionTransparency &transparency,
kpPixmapFX::getColorAtPixel (newTransparencyMaskImage, x, y))
{
#if DEBUG_KP_SELECTION
- kdDebug () << "\tdiffer at " << QPoint (x, y)
+ kdDebug () << "\tdiffer at " << TQPoint (x, y)
<< " old=" << (int *) kpPixmapFX::getColorAtPixel (oldTransparencyMaskImage, x, y).toQRgb ()
<< " new=" << (int *) kpPixmapFX::getColorAtPixel (newTransparencyMaskImage, x, y).toQRgb ()
<< endl;
@@ -1399,11 +1399,11 @@ bool kpSelection::setTransparency (const kpSelectionTransparency &transparency,
// private
void kpSelection::flipPoints (bool horiz, bool vert)
{
- QRect oldRect = boundingRect ();
+ TQRect oldRect = boundingRect ();
m_points.translate (-oldRect.x (), -oldRect.y ());
- const QWMatrix matrix = kpPixmapFX::flipMatrix (oldRect.width (), oldRect.height (),
+ const TQWMatrix matrix = kpPixmapFX::flipMatrix (oldRect.width (), oldRect.height (),
horiz, vert);
m_points = matrix.map (m_points);
diff --git a/kolourpaint/kpselection.h b/kolourpaint/kpselection.h
index 69b836b9..b99f5cb9 100644
--- a/kolourpaint/kpselection.h
+++ b/kolourpaint/kpselection.h
@@ -29,15 +29,15 @@
#ifndef __kpselection_h__
#define __kpselection_h__
-#include <qbitmap.h>
-#include <qdatastream.h>
-#include <qobject.h>
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qpointarray.h>
-#include <qvaluevector.h>
-#include <qrect.h>
-#include <qstring.h>
+#include <tqbitmap.h>
+#include <tqdatastream.h>
+#include <tqobject.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqpointarray.h>
+#include <tqvaluevector.h>
+#include <tqrect.h>
+#include <tqstring.h>
#include <kpcolor.h>
#include <kppixmapfx.h>
@@ -45,7 +45,7 @@
#include <kptextstyle.h>
-class QSize;
+class TQSize;
/*
@@ -69,23 +69,23 @@ public:
kpSelection (const kpSelectionTransparency &transparency = kpSelectionTransparency ());
// (for Rectangle & Ellipse)
- kpSelection (Type type, const QRect &rect, const QPixmap &pixmap = QPixmap (),
+ kpSelection (Type type, const TQRect &rect, const TQPixmap &pixmap = TQPixmap (),
const kpSelectionTransparency &transparency = kpSelectionTransparency ());
- kpSelection (Type type, const QRect &rect, const kpSelectionTransparency &transparency);
+ kpSelection (Type type, const TQRect &rect, const kpSelectionTransparency &transparency);
// (for Text)
- kpSelection (const QRect &rect, const QValueVector <QString> &textLines_, const kpTextStyle &textStyle_);
+ kpSelection (const TQRect &rect, const TQValueVector <TQString> &textLines_, const kpTextStyle &textStyle_);
// (for Points)
- kpSelection (const QPointArray &points, const QPixmap &pixmap = QPixmap (),
+ kpSelection (const TQPointArray &points, const TQPixmap &pixmap = TQPixmap (),
const kpSelectionTransparency &transparency = kpSelectionTransparency ());
- kpSelection (const QPointArray &points, const kpSelectionTransparency &transparency);
+ kpSelection (const TQPointArray &points, const kpSelectionTransparency &transparency);
kpSelection (const kpSelection &rhs);
kpSelection &operator= (const kpSelection &rhs);
- friend QDataStream &operator<< (QDataStream &stream, const kpSelection &selection);
- friend QDataStream &operator>> (QDataStream &stream, kpSelection &selection);
- void readFromStream (QDataStream &stream,
+ friend TQDataStream &operator<< (TQDataStream &stream, const kpSelection &selection);
+ friend TQDataStream &operator>> (TQDataStream &stream, kpSelection &selection);
+ void readFromStream (TQDataStream &stream,
const kpPixmapFX::WarnAboutLossInfo &wali =
kpPixmapFX::WarnAboutLossInfo ());
~kpSelection ();
@@ -98,67 +98,67 @@ public:
bool isRectangular () const;
bool isText () const;
// returns either i18n ("Selection") or i18n ("Text")
- QString name () const;
+ TQString name () const;
int size () const;
- QBitmap maskForOwnType (bool nullForRectangular = false) const;
+ TQBitmap maskForOwnType (bool nullForRectangular = false) const;
// synonyms
- QPoint topLeft () const;
- QPoint point () const;
+ TQPoint topLeft () const;
+ TQPoint point () const;
int x () const;
int y () const;
void moveBy (int dx, int dy);
void moveTo (int dx, int dy);
- void moveTo (const QPoint &topLeftPoint);
+ void moveTo (const TQPoint &topLeftPoint);
// synonyms
- QPointArray points () const;
- QPointArray pointArray () const;
+ TQPointArray points () const;
+ TQPointArray pointArray () const;
- QRect boundingRect () const;
+ TQRect boundingRect () const;
int width () const;
int height () const;
// (for non-rectangular selections, may return false even if
// kpView::onSelectionResizeHandle())
- bool contains (const QPoint &point) const;
+ bool contains (const TQPoint &point) const;
bool contains (int x, int y);
// (Avoid using for text selections since text selection may
// require a background for antialiasing purposes - use paint()
// instead, else no antialising)
- QPixmap *pixmap () const;
- void setPixmap (const QPixmap &pixmap);
+ TQPixmap *pixmap () const;
+ void setPixmap (const TQPixmap &pixmap);
bool usesBackgroundPixmapToPaint () const;
private:
- void paintOpaqueText (QPixmap *destPixmap, const QRect &docRect) const;
- QPixmap transparentForegroundTextPixmap () const;
+ void paintOpaqueText (TQPixmap *destPixmap, const TQRect &docRect) const;
+ TQPixmap transparentForegroundTextPixmap () const;
public:
// (<docRect> is the document rectangle that <*destPixmap> represents)
- void paint (QPixmap *destPixmap, const QRect &docRect) const;
+ void paint (TQPixmap *destPixmap, const TQRect &docRect) const;
private:
void calculateTextPixmap ();
public:
- static QString textForTextLines (const QValueVector <QString> &textLines_);
- QString text () const; // textLines() as one long string
- QValueVector <QString> textLines () const;
- void setTextLines (const QValueVector <QString> &textLines_);
+ static TQString textForTextLines (const TQValueVector <TQString> &textLines_);
+ TQString text () const; // textLines() as one long string
+ TQValueVector <TQString> textLines () const;
+ void setTextLines (const TQValueVector <TQString> &textLines_);
static int textBorderSize ();
- QRect textAreaRect () const;
- bool pointIsInTextBorderArea (const QPoint &globalPoint) const;
- bool pointIsInTextArea (const QPoint &globalPoint) const;
+ TQRect textAreaRect () const;
+ bool pointIsInTextBorderArea (const TQPoint &globalPoint) const;
+ bool pointIsInTextArea (const TQPoint &globalPoint) const;
void textResize (int width, int height);
@@ -168,33 +168,33 @@ public:
// Be more robust when external enforcement fails.
static int minimumWidthForTextStyle (const kpTextStyle &);
static int minimumHeightForTextStyle (const kpTextStyle &);
- static QSize minimumSizeForTextStyle (const kpTextStyle &);
+ static TQSize minimumSizeForTextStyle (const kpTextStyle &);
static int preferredMinimumWidthForTextStyle (const kpTextStyle &textStyle);
static int preferredMinimumHeightForTextStyle (const kpTextStyle &textStyle);
- static QSize preferredMinimumSizeForTextStyle (const kpTextStyle &textStyle);
+ static TQSize preferredMinimumSizeForTextStyle (const kpTextStyle &textStyle);
int minimumWidth () const;
int minimumHeight () const;
- QSize minimumSize () const;
+ TQSize minimumSize () const;
- int textRowForPoint (const QPoint &globalPoint) const;
- int textColForPoint (const QPoint &globalPoint) const;
- QPoint pointForTextRowCol (int row, int col);
+ int textRowForPoint (const TQPoint &globalPoint) const;
+ int textColForPoint (const TQPoint &globalPoint) const;
+ TQPoint pointForTextRowCol (int row, int col);
kpTextStyle textStyle () const;
void setTextStyle (const kpTextStyle &textStyle);
// TODO: ret val inconstent with pixmap()
// - fix when merge with kpTempPixmap
- QPixmap opaquePixmap () const; // same as pixmap()
+ TQPixmap opaquePixmap () const; // same as pixmap()
private:
void calculateTransparencyMask ();
public:
// Returns opaquePixmap() after applying kpSelectionTransparency
- QPixmap transparentPixmap () const;
+ TQPixmap transparentPixmap () const;
kpSelectionTransparency transparency () const;
// Returns whether or not the selection changed due to setting the
@@ -211,21 +211,21 @@ public:
void flip (bool horiz, bool vert);
signals:
- void changed (const QRect &docRect);
+ void changed (const TQRect &docRect);
private:
// OPT: use implicit sharing
Type m_type;
- QRect m_rect;
- QPointArray m_points;
- QPixmap *m_pixmap;
+ TQRect m_rect;
+ TQPointArray m_points;
+ TQPixmap *m_pixmap;
- QValueVector <QString> m_textLines;
+ TQValueVector <TQString> m_textLines;
kpTextStyle m_textStyle;
kpSelectionTransparency m_transparency;
- QBitmap m_transparencyMask;
+ TQBitmap m_transparencyMask;
private:
// There is no need to maintain binary compatibility at this stage.
diff --git a/kolourpaint/kpselectiondrag.cpp b/kolourpaint/kpselectiondrag.cpp
index 23ab9a4e..91ecf35c 100644
--- a/kolourpaint/kpselectiondrag.cpp
+++ b/kolourpaint/kpselectiondrag.cpp
@@ -30,7 +30,7 @@
#include <kpselectiondrag.h>
-#include <qdatastream.h>
+#include <tqdatastream.h>
#include <kdebug.h>
@@ -42,18 +42,18 @@
const char * const kpSelectionDrag::selectionMimeType = "application/x-kolourpaint-selection";
-kpSelectionDrag::kpSelectionDrag (QWidget *dragSource, const char *name)
- : QImageDrag (dragSource, name)
+kpSelectionDrag::kpSelectionDrag (TQWidget *dragSource, const char *name)
+ : TQImageDrag (dragSource, name)
{
}
-kpSelectionDrag::kpSelectionDrag (const QImage &image, QWidget *dragSource, const char *name)
- : QImageDrag (image, dragSource, name)
+kpSelectionDrag::kpSelectionDrag (const TQImage &image, TQWidget *dragSource, const char *name)
+ : TQImageDrag (image, dragSource, name)
{
}
-kpSelectionDrag::kpSelectionDrag (const kpSelection &sel, QWidget *dragSource, const char *name)
- : QImageDrag (dragSource, name)
+kpSelectionDrag::kpSelectionDrag (const kpSelection &sel, TQWidget *dragSource, const char *name)
+ : TQImageDrag (dragSource, name)
{
setSelection (sel);
}
@@ -76,7 +76,7 @@ void kpSelectionDrag::setSelection (const kpSelection &sel)
// OPT: an awful waste of memory storing image in both selection and QImage
- // HACK: need to set image else QImageDrag::format() lies
+ // HACK: need to set image else TQImageDrag::format() lies
setImage (kpPixmapFX::convertToImage (*m_selection.pixmap ()));
}
@@ -93,7 +93,7 @@ const char *kpSelectionDrag::format (int which) const
#if DEBUG_KP_SELECTION_DRAG && 0
kdDebug () << "kpSelectionDrag::format(" << which << ")" << endl;
#endif
- const char *ret = QImageDrag::format (which);
+ const char *ret = TQImageDrag::format (which);
if (ret)
{
#if DEBUG_KP_SELECTION_DRAG && 0
@@ -103,11 +103,11 @@ const char *kpSelectionDrag::format (int which) const
}
int i;
- for (i = 0; QImageDrag::format (i); i++)
+ for (i = 0; TQImageDrag::format (i); i++)
;
#if DEBUG_KP_SELECTION_DRAG && 0
- kdDebug () << "\tend of QImageDrag format list at " << i << endl;
+ kdDebug () << "\tend of TQImageDrag format list at " << i << endl;
#endif
if (i == which)
@@ -127,8 +127,8 @@ const char *kpSelectionDrag::format (int which) const
}
// public virtual [base QMimeSource]
-// Don't need to override in Qt 3.2 (the QMimeSource base will work)
-// but we do so just in case QImageDrag later decides to override it.
+// Don't need to override in Qt 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
{
#if DEBUG_KP_SELECTION_DRAG
@@ -139,26 +139,26 @@ bool kpSelectionDrag::provides (const char *mimeType) const
return false;
return (!strcmp (mimeType, kpSelectionDrag::selectionMimeType) ||
- QImageDrag::provides (mimeType));
+ TQImageDrag::provides (mimeType));
}
// public virtual [base QMimeSource]
-QByteArray kpSelectionDrag::encodedData (const char *mimeType) const
+TQByteArray kpSelectionDrag::encodedData (const char *mimeType) const
{
#if DEBUG_KP_SELECTION_DRAG
kdDebug () << "kpSelectionDrag::encodedData(" << mimeType << ")" << endl;
#endif
if (!mimeType)
- return QByteArray ();
+ return TQByteArray ();
if (!strcmp (mimeType, kpSelectionDrag::selectionMimeType))
{
- QByteArray ba;
- QDataStream stream (ba, IO_WriteOnly);
+ TQByteArray ba;
+ TQDataStream stream (ba, IO_WriteOnly);
#if DEBUG_KP_SELECTION_DRAG
- kdDebug () << "\twant it as kpSelection in QByteArray" << endl;
+ kdDebug () << "\twant it as kpSelection in TQByteArray" << endl;
#endif
if (holdsSelection ())
@@ -171,9 +171,9 @@ QByteArray kpSelectionDrag::encodedData (const char *mimeType) const
else
{
#if DEBUG_KP_SELECTION_DRAG
- kdDebug () << "\t\thave image - call kpSelectionDrag::decode(QImage)" << endl;
+ kdDebug () << "\t\thave image - call kpSelectionDrag::decode(TQImage)" << endl;
#endif
- QImage image;
+ TQImage image;
if (kpSelectionDrag::decode (this, image/*ref*/))
{
#if DEBUG_KP_SELECTION_DRAG
@@ -184,16 +184,16 @@ QByteArray kpSelectionDrag::encodedData (const char *mimeType) const
<< endl;
#endif
- QPixmap pixmap = kpPixmapFX::convertToPixmapAsLosslessAsPossible (image);
+ TQPixmap pixmap = kpPixmapFX::convertToPixmapAsLosslessAsPossible (image);
stream << kpSelection (kpSelection::Rectangle,
- QRect (0, 0, pixmap.width (), pixmap.height ()),
+ TQRect (0, 0, pixmap.width (), pixmap.height ()),
pixmap);
}
else
{
kdError () << "kpSelectionDrag::encodedData(" << mimeType << ")"
- << " kpSelectionDrag(QImage) could not decode data into QImage"
+ << " kpSelectionDrag(TQImage) could not decode data into TQImage"
<< endl;
stream << kpSelection ();
}
@@ -204,16 +204,16 @@ QByteArray kpSelectionDrag::encodedData (const char *mimeType) const
else
{
#if DEBUG_KP_SELECTION_DRAG
- kdDebug () << "\twant it as QImage in QByteArray" << endl;
+ kdDebug () << "\twant it as TQImage in TQByteArray" << endl;
#endif
- return QImageDrag::encodedData (mimeType);
+ return TQImageDrag::encodedData (mimeType);
}
}
// public static
-bool kpSelectionDrag::canDecode (const QMimeSource *e)
+bool kpSelectionDrag::canDecode (const TQMimeSource *e)
{
#if DEBUG_KP_SELECTION_DRAG
kdDebug () << "kpSelectionDrag::canDecode()" << endl;
@@ -223,25 +223,25 @@ bool kpSelectionDrag::canDecode (const QMimeSource *e)
return false;
return (e->provides (kpSelectionDrag::selectionMimeType) ||
- QImageDrag::canDecode (e));
+ TQImageDrag::canDecode (e));
}
// public static
-bool kpSelectionDrag::decode (const QMimeSource *e, QImage &img)
+bool kpSelectionDrag::decode (const TQMimeSource *e, TQImage &img)
{
#if DEBUG_KP_SELECTION_DRAG
- kdDebug () << "kpSelectionDrag::decode(QImage)" << endl;
+ kdDebug () << "kpSelectionDrag::decode(TQImage)" << endl;
#endif
if (!e)
return false;
- return (QImageDrag::canDecode (e) && // prevents X errors, jumps based on unitialised values...
- QImageDrag::decode (e, img/*ref*/));
+ return (TQImageDrag::canDecode (e) && // prevents X errors, jumps based on unitialised values...
+ TQImageDrag::decode (e, img/*ref*/));
}
// public static
-bool kpSelectionDrag::decode (const QMimeSource *e, kpSelection &sel,
+bool kpSelectionDrag::decode (const TQMimeSource *e, kpSelection &sel,
const kpPixmapFX::WarnAboutLossInfo &wali)
{
#if DEBUG_KP_SELECTION_DRAG
@@ -253,10 +253,10 @@ bool kpSelectionDrag::decode (const QMimeSource *e, kpSelection &sel,
if (e->provides (kpSelectionDrag::selectionMimeType))
{
#if DEBUG_KP_SELECTION_DRAG
- kdDebug () << "\tmimeSource provides selection - just return it in QByteArray" << endl;
+ kdDebug () << "\tmimeSource provides selection - just return it in TQByteArray" << endl;
#endif
- QByteArray data = e->encodedData (kpSelectionDrag::selectionMimeType);
- QDataStream stream (data, IO_ReadOnly);
+ TQByteArray data = e->encodedData (kpSelectionDrag::selectionMimeType);
+ TQDataStream stream (data, IO_ReadOnly);
// (no need for wali as kpSelection's by definition only support QPixmap's)
stream >> sel;
@@ -267,7 +267,7 @@ bool kpSelectionDrag::decode (const QMimeSource *e, kpSelection &sel,
kdDebug () << "\tmimeSource doesn't provide selection - try image" << endl;
#endif
- QImage image;
+ TQImage image;
if (kpSelectionDrag::decode (e, image/*ref*/))
{
#if DEBUG_KP_SELECTION_DRAG
@@ -275,7 +275,7 @@ bool kpSelectionDrag::decode (const QMimeSource *e, kpSelection &sel,
#endif
sel = kpSelection (kpSelection::Rectangle,
- QRect (0, 0, image.width (), image.height ()),
+ TQRect (0, 0, image.width (), image.height ()),
kpPixmapFX::convertToPixmapAsLosslessAsPossible (image, wali));
}
else
diff --git a/kolourpaint/kpselectiondrag.h b/kolourpaint/kpselectiondrag.h
index 5aae82d9..e2b81e62 100644
--- a/kolourpaint/kpselectiondrag.h
+++ b/kolourpaint/kpselectiondrag.h
@@ -29,7 +29,7 @@
#ifndef __kp_selection_drag_h__
#define __kp_selection_drag_h__
-#include <qdragobject.h>
+#include <tqdragobject.h>
#include <kppixmapfx.h>
#include <kpselection.h>
@@ -40,9 +40,9 @@ class kpSelectionDrag : public QImageDrag
Q_OBJECT
public:
- kpSelectionDrag (QWidget *dragSource = 0, const char *name = 0);
- kpSelectionDrag (const QImage &image, QWidget *dragSource = 0, const char *name = 0);
- kpSelectionDrag (const kpSelection &sel, QWidget *dragSource = 0, const char *name = 0);
+ kpSelectionDrag (TQWidget *dragSource = 0, const char *name = 0);
+ kpSelectionDrag (const TQImage &image, TQWidget *dragSource = 0, const char *name = 0);
+ kpSelectionDrag (const kpSelection &sel, TQWidget *dragSource = 0, const char *name = 0);
virtual ~kpSelectionDrag ();
static const char * const selectionMimeType;
@@ -55,11 +55,11 @@ protected:
public:
virtual const char *format (int which = 0) const;
virtual bool provides (const char *mimeType) const;
- virtual QByteArray encodedData (const char *mimeType) const;
+ virtual TQByteArray encodedData (const char *mimeType) const;
- static bool canDecode (const QMimeSource *e);
- static bool decode (const QMimeSource *e, QImage &img);
- static bool decode (const QMimeSource *e, kpSelection &sel,
+ static bool canDecode (const TQMimeSource *e);
+ static bool decode (const TQMimeSource *e, TQImage &img);
+ static bool decode (const TQMimeSource *e, kpSelection &sel,
const kpPixmapFX::WarnAboutLossInfo &wali =
kpPixmapFX::WarnAboutLossInfo ());
diff --git a/kolourpaint/kpsinglekeytriggersaction.cpp b/kolourpaint/kpsinglekeytriggersaction.cpp
index d3b64002..07573bf4 100644
--- a/kolourpaint/kpsinglekeytriggersaction.cpp
+++ b/kolourpaint/kpsinglekeytriggersaction.cpp
@@ -116,9 +116,9 @@ void kpSingleKeyTriggersActionInterface::enableSingleKeyTriggers (bool enable)
//
-kpSingleKeyTriggersAction::kpSingleKeyTriggersAction (const QString &text,
+kpSingleKeyTriggersAction::kpSingleKeyTriggersAction (const TQString &text,
const KShortcut &shortcut,
- const QObject *receiver, const char *slot,
+ const TQObject *receiver, const char *slot,
KActionCollection *parent, const char *name)
: KAction (text, shortcut, receiver, slot, parent, name)
{
diff --git a/kolourpaint/kpsinglekeytriggersaction.h b/kolourpaint/kpsinglekeytriggersaction.h
index fc404bd5..2c1ddf3f 100644
--- a/kolourpaint/kpsinglekeytriggersaction.h
+++ b/kolourpaint/kpsinglekeytriggersaction.h
@@ -62,9 +62,9 @@ class kpSingleKeyTriggersAction : public KAction,
Q_OBJECT
public:
- kpSingleKeyTriggersAction (const QString &text,
+ kpSingleKeyTriggersAction (const TQString &text,
const KShortcut &shortcut,
- const QObject *receiver, const char *slot,
+ const TQObject *receiver, const char *slot,
KActionCollection *parent, const char *name);
virtual ~kpSingleKeyTriggersAction ();
diff --git a/kolourpaint/kptemppixmap.cpp b/kolourpaint/kptemppixmap.cpp
index 55f669ee..186f0ed9 100644
--- a/kolourpaint/kptemppixmap.cpp
+++ b/kolourpaint/kptemppixmap.cpp
@@ -36,7 +36,7 @@
kpTempPixmap::kpTempPixmap (bool isBrush, RenderMode renderMode,
- const QPoint &topLeft, const QPixmap &pixmap)
+ const TQPoint &topLeft, const TQPixmap &pixmap)
: m_isBrush (isBrush),
m_renderMode (renderMode),
m_topLeft (topLeft),
@@ -83,13 +83,13 @@ kpTempPixmap::RenderMode kpTempPixmap::renderMode () const
}
// public
-QPoint kpTempPixmap::topLeft () const
+TQPoint kpTempPixmap::topLeft () const
{
return m_topLeft;
}
// public
-QPixmap kpTempPixmap::pixmap () const
+TQPixmap kpTempPixmap::pixmap () const
{
return m_pixmap;
}
@@ -102,9 +102,9 @@ bool kpTempPixmap::isVisible (const kpViewManager *vm) const
}
// public
-QRect kpTempPixmap::rect () const
+TQRect kpTempPixmap::rect () const
{
- return QRect (m_topLeft.x (), m_topLeft.y (),
+ return TQRect (m_topLeft.x (), m_topLeft.y (),
m_pixmap.width (), m_pixmap.height ());
}
@@ -129,7 +129,7 @@ bool kpTempPixmap::mayChangeDocumentMask () const
}
// public
-void kpTempPixmap::paint (QPixmap *destPixmap, const QRect &docRect) const
+void kpTempPixmap::paint (TQPixmap *destPixmap, const TQRect &docRect) const
{
#define PARAMS destPixmap, m_topLeft - docRect.topLeft (), m_pixmap
switch (m_renderMode)
diff --git a/kolourpaint/kptemppixmap.h b/kolourpaint/kptemppixmap.h
index 6ddb9413..2bd9d7bc 100644
--- a/kolourpaint/kptemppixmap.h
+++ b/kolourpaint/kptemppixmap.h
@@ -32,8 +32,8 @@
#define __kp_temp_pixmap_h__
-#include <qpoint.h>
-#include <qpixmap.h>
+#include <tqpoint.h>
+#include <tqpixmap.h>
class kpViewManager;
@@ -53,18 +53,18 @@ public:
* not the mouse cursor is inside a view. If false, the
* pixmap is always displayed.
*/
- kpTempPixmap (bool isBrush, RenderMode renderMode, const QPoint &topLeft, const QPixmap &pixmap);
+ kpTempPixmap (bool isBrush, RenderMode renderMode, const TQPoint &topLeft, const TQPixmap &pixmap);
kpTempPixmap (const kpTempPixmap &rhs);
kpTempPixmap &operator= (const kpTempPixmap &rhs);
~kpTempPixmap ();
bool isBrush () const;
RenderMode renderMode () const;
- QPoint topLeft () const;
- QPixmap pixmap () const;
+ TQPoint topLeft () const;
+ TQPixmap pixmap () const;
bool isVisible (const kpViewManager *vm) const;
- QRect rect () const;
+ TQRect rect () const;
int width () const;
int height () const;
@@ -77,13 +77,13 @@ public:
* the unzoomed <docRect> of the kpDocument. You should check for
* visibility before calling this function.
*/
- void paint (QPixmap *destPixmap, const QRect &docRect) const;
+ void paint (TQPixmap *destPixmap, const TQRect &docRect) const;
private:
bool m_isBrush;
RenderMode m_renderMode;
- QPoint m_topLeft;
- QPixmap m_pixmap;
+ TQPoint m_topLeft;
+ TQPixmap m_pixmap;
};
diff --git a/kolourpaint/kptextstyle.cpp b/kolourpaint/kptextstyle.cpp
index 9f4d8fce..61f58dab 100644
--- a/kolourpaint/kptextstyle.cpp
+++ b/kolourpaint/kptextstyle.cpp
@@ -28,9 +28,9 @@
#include <kptextstyle.h>
-#include <qdatastream.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
+#include <tqdatastream.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
kpTextStyle::kpTextStyle ()
@@ -41,7 +41,7 @@ kpTextStyle::kpTextStyle ()
{
}
-kpTextStyle::kpTextStyle (const QString &fontFamily,
+kpTextStyle::kpTextStyle (const TQString &fontFamily,
int fontSize,
bool isBold, bool isItalic,
bool isUnderline, bool isStrikeThru,
@@ -62,7 +62,7 @@ kpTextStyle::~kpTextStyle ()
// friend
-QDataStream &operator<< (QDataStream &stream, const kpTextStyle &textStyle)
+TQDataStream &operator<< (TQDataStream &stream, const kpTextStyle &textStyle)
{
stream << textStyle.m_fontFamily;
stream << textStyle.m_fontSize;
@@ -78,7 +78,7 @@ QDataStream &operator<< (QDataStream &stream, const kpTextStyle &textStyle)
}
// friend
-QDataStream &operator>> (QDataStream &stream, kpTextStyle &textStyle)
+TQDataStream &operator>> (TQDataStream &stream, kpTextStyle &textStyle)
{
stream >> textStyle.m_fontFamily;
stream >> textStyle.m_fontSize;
@@ -121,13 +121,13 @@ bool kpTextStyle::operator!= (const kpTextStyle &rhs) const
// public
-QString kpTextStyle::fontFamily () const
+TQString kpTextStyle::fontFamily () const
{
return m_fontFamily;
}
// public
-void kpTextStyle::setFontFamily (const QString &f)
+void kpTextStyle::setFontFamily (const TQString &f)
{
m_fontFamily = f;
}
@@ -261,9 +261,9 @@ kpColor kpTextStyle::effectiveBackgroundColor () const
// public
-QFont kpTextStyle::font () const
+TQFont kpTextStyle::font () const
{
- QFont fnt (m_fontFamily, m_fontSize);
+ TQFont fnt (m_fontFamily, m_fontSize);
fnt.setBold (m_isBold);
fnt.setItalic (m_isItalic);
fnt.setUnderline (m_isUnderline);
@@ -273,7 +273,7 @@ QFont kpTextStyle::font () const
}
// public
-QFontMetrics kpTextStyle::fontMetrics () const
+TQFontMetrics kpTextStyle::fontMetrics () const
{
- return QFontMetrics (font ());
+ return TQFontMetrics (font ());
}
diff --git a/kolourpaint/kptextstyle.h b/kolourpaint/kptextstyle.h
index 9356ce2c..c55fc97d 100644
--- a/kolourpaint/kptextstyle.h
+++ b/kolourpaint/kptextstyle.h
@@ -28,19 +28,19 @@
#ifndef __kp_text_style_h__
#define __kp_text_style_h__
-#include <qstring.h>
+#include <tqstring.h>
#include <kpcolor.h>
-class QDataStream;
-class QFont;
-class QFontMetrics;
+class TQDataStream;
+class TQFont;
+class TQFontMetrics;
class kpTextStyle
{
public:
kpTextStyle ();
- kpTextStyle (const QString &fontFamily,
+ kpTextStyle (const TQString &fontFamily,
int fontSize,
bool isBold, bool isItalic,
bool isUnderline, bool isStrikeThru,
@@ -50,14 +50,14 @@ public:
~kpTextStyle ();
- friend QDataStream &operator<< (QDataStream &stream, const kpTextStyle &textStyle);
- friend QDataStream &operator>> (QDataStream &stream, kpTextStyle &textStyle);
+ friend TQDataStream &operator<< (TQDataStream &stream, const kpTextStyle &textStyle);
+ friend TQDataStream &operator>> (TQDataStream &stream, kpTextStyle &textStyle);
bool operator== (const kpTextStyle &rhs) const;
bool operator!= (const kpTextStyle &rhs) const;
- QString fontFamily () const;
- void setFontFamily (const QString &f);
+ TQString fontFamily () const;
+ void setFontFamily (const TQString &f);
int fontSize () const;
void setFontSize (int s);
@@ -94,11 +94,11 @@ public:
// Else, returns kpColor::transparent.
kpColor effectiveBackgroundColor () const;
- QFont font () const;
- QFontMetrics fontMetrics () const;
+ TQFont font () const;
+ TQFontMetrics fontMetrics () const;
private:
- QString m_fontFamily;
+ TQString m_fontFamily;
int m_fontSize;
bool m_isBold, m_isItalic, m_isUnderline, m_isStrikeThru;
kpColor m_foregroundColor, m_backgroundColor;
diff --git a/kolourpaint/kpthumbnail.cpp b/kolourpaint/kpthumbnail.cpp
index a45164ac..5c57b12d 100644
--- a/kolourpaint/kpthumbnail.cpp
+++ b/kolourpaint/kpthumbnail.cpp
@@ -30,9 +30,9 @@
#include <kpthumbnail.h>
-#include <qdockarea.h>
-#include <qdockwindow.h>
-#include <qtimer.h>
+#include <tqdockarea.h>
+#include <tqdockwindow.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <klocale.h>
@@ -47,10 +47,10 @@
// TODO: get out of the Alt+Tab list
kpThumbnail::kpThumbnail (kpMainWindow *parent, const char *name)
#if KP_IS_QT_3_3
- : QDockWindow (QDockWindow::OutsideDock, parent, name),
+ : TQDockWindow (TQDockWindow::OutsideDock, parent, name),
#else // With Qt <3.3, OutsideDock requires parent = 0,
// sync: make sure outside of dock
- : QDockWindow (QDockWindow::InDock, parent, name),
+ : TQDockWindow (TQDockWindow::InDock, parent, name),
#warning "Using Qt <3.3: the thumbnail will flicker more when appearing"
#endif
m_mainWindow (parent),
@@ -81,22 +81,22 @@ kpThumbnail::kpThumbnail (kpMainWindow *parent, const char *name)
}
- QSize layoutMinimumSize = layout () ? layout ()->minimumSize () : QSize ();
+ TQSize layoutMinimumSize = layout () ? layout ()->minimumSize () : TQSize ();
#if DEBUG_KP_THUMBNAIL
kdDebug () << "\tlayout=" << layout ()
- << " minSize=" << (layout () ? layout ()->minimumSize () : QSize ()) << endl;
+ << " minSize=" << (layout () ? layout ()->minimumSize () : TQSize ()) << endl;
kdDebug () << "\tboxLayout=" << boxLayout ()
- << " minSize=" << (boxLayout () ? boxLayout ()->minimumSize () : QSize ())
+ << " minSize=" << (boxLayout () ? boxLayout ()->minimumSize () : TQSize ())
<< endl;
#endif
if (layout ())
- layout ()->setResizeMode (QLayout::FreeResize);
+ layout ()->setResizeMode (TQLayout::FreeResize);
setMinimumSize (QMAX (layoutMinimumSize.width (), 64),
QMAX (layoutMinimumSize.height (), 64));
// Enable "X" Close Button
- setCloseMode (QDockWindow::Always);
+ setCloseMode (TQDockWindow::Always);
setResizeEnabled (true);
@@ -127,10 +127,10 @@ void kpThumbnail::setView (kpThumbnailView *view)
if (m_view)
{
- disconnect (m_view, SIGNAL (destroyed ()),
- this, SLOT (slotViewDestroyed ()));
- disconnect (m_view, SIGNAL (zoomLevelChanged (int, int)),
- this, SLOT (updateCaption ()));
+ disconnect (m_view, TQT_SIGNAL (destroyed ()),
+ this, TQT_SLOT (slotViewDestroyed ()));
+ disconnect (m_view, TQT_SIGNAL (zoomLevelChanged (int, int)),
+ this, TQT_SLOT (updateCaption ()));
boxLayout ()->remove (m_view);
}
@@ -139,10 +139,10 @@ void kpThumbnail::setView (kpThumbnailView *view)
if (m_view)
{
- connect (m_view, SIGNAL (destroyed ()),
- this, SLOT (slotViewDestroyed ()));
- connect (m_view, SIGNAL (zoomLevelChanged (int, int)),
- this, SLOT (updateCaption ()));
+ connect (m_view, TQT_SIGNAL (destroyed ()),
+ this, TQT_SLOT (slotViewDestroyed ()));
+ connect (m_view, TQT_SIGNAL (zoomLevelChanged (int, int)),
+ this, TQT_SLOT (updateCaption ()));
updateCaption ();
boxLayout ()->addWidget (m_view);
@@ -182,14 +182,14 @@ void kpThumbnail::slotViewDestroyed ()
// protected virtual [base QWidget]
-void kpThumbnail::resizeEvent (QResizeEvent *e)
+void kpThumbnail::resizeEvent (TQResizeEvent *e)
{
#if DEBUG_KP_THUMBNAIL
kdDebug () << "kpThumbnail::resizeEvent(" << width ()
<< "," << height () << ")" << endl;
#endif
- QDockWindow::resizeEvent (e);
+ TQDockWindow::resizeEvent (e);
// updateVariableZoom (); TODO: is below a good idea since this commented out
@@ -203,7 +203,7 @@ void kpThumbnail::resizeEvent (QResizeEvent *e)
}
// protected virtual [base QWidget]
-void kpThumbnail::moveEvent (QMoveEvent * /*e*/)
+void kpThumbnail::moveEvent (TQMoveEvent * /*e*/)
{
if (m_mainWindow)
m_mainWindow->notifyThumbnailGeometryChanged ();
diff --git a/kolourpaint/kpthumbnail.h b/kolourpaint/kpthumbnail.h
index 183dc2f1..9ed738dc 100644
--- a/kolourpaint/kpthumbnail.h
+++ b/kolourpaint/kpthumbnail.h
@@ -29,7 +29,7 @@
#ifndef __kp_thumbnail_h__
#define __kp_thumbnail_h__
-#include <qdockwindow.h>
+#include <tqdockwindow.h>
class kpMainWindow;
class kpThumbnailView;
@@ -56,8 +56,8 @@ protected slots:
void slotViewDestroyed ();
protected:
- virtual void resizeEvent (QResizeEvent *e);
- virtual void moveEvent (QMoveEvent *e);
+ virtual void resizeEvent (TQResizeEvent *e);
+ virtual void moveEvent (TQMoveEvent *e);
private:
kpMainWindow *m_mainWindow;
diff --git a/kolourpaint/kptool.cpp b/kolourpaint/kptool.cpp
index 8d337c5b..3d016fdb 100644
--- a/kolourpaint/kptool.cpp
+++ b/kolourpaint/kptool.cpp
@@ -33,13 +33,13 @@
#include <limits.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qcursor.h>
-#include <qevent.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqcursor.h>
+#include <tqevent.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -68,7 +68,7 @@ struct kpToolPrivate
};
-kpTool::kpTool (const QString &text, const QString &description,
+kpTool::kpTool (const TQString &text, const TQString &description,
int key,
kpMainWindow *mainWindow, const char *name)
{
@@ -94,7 +94,7 @@ kpTool::~kpTool ()
// private
-void kpTool::init (const QString &text, const QString &description,
+void kpTool::init (const TQString &text, const TQString &description,
int key,
kpMainWindow *mainWindow, const char *name)
{
@@ -151,31 +151,31 @@ void kpTool::createAction ()
m_action = new kpToolAction (text (), iconName (), shortcutForKey (m_key),
- this, SLOT (slotActionActivated ()),
+ this, TQT_SLOT (slotActionActivated ()),
m_mainWindow->actionCollection (), name ());
- m_action->setExclusiveGroup (QString::fromLatin1 ("Tool Box Actions"));
+ m_action->setExclusiveGroup (TQString::fromLatin1 ("Tool Box Actions"));
m_action->setWhatsThis (description ());
- connect (m_action, SIGNAL (toolTipChanged (const QString &)),
- this, SLOT (slotActionToolTipChanged (const QString &)));
+ connect (m_action, TQT_SIGNAL (toolTipChanged (const TQString &)),
+ this, TQT_SLOT (slotActionToolTipChanged (const TQString &)));
}
// protected slot
-void kpTool::slotActionToolTipChanged (const QString &string)
+void kpTool::slotActionToolTipChanged (const TQString &string)
{
emit actionToolTipChanged (string);
}
// public
-QString kpTool::text () const
+TQString kpTool::text () const
{
return m_text;
}
// public
-void kpTool::setText (const QString &text)
+void kpTool::setText (const TQString &text)
{
m_text = text;
@@ -187,7 +187,7 @@ void kpTool::setText (const QString &text)
// public static
-QString kpTool::toolTipForTextAndShortcut (const QString &text,
+TQString kpTool::toolTipForTextAndShortcut (const TQString &text,
const KShortcut &shortcut)
{
for (int i = 0; i < (int) shortcut.count (); i++)
@@ -205,7 +205,7 @@ QString kpTool::toolTipForTextAndShortcut (const QString &text,
}
// public static
-QString kpTool::toolTip () const
+TQString kpTool::toolTip () const
{
return toolTipForTextAndShortcut (text (), shortcut ());
}
@@ -255,7 +255,7 @@ KShortcut kpTool::shortcut () const
// public static
bool kpTool::keyIsText (int key)
{
- // TODO: should work like !QKeyEvent::text().isEmpty()
+ // TODO: should work like !TQKeyEvent::text().isEmpty()
return !(key & (Qt::MODIFIER_MASK ^ Qt::SHIFT));
}
@@ -332,13 +332,13 @@ void kpTool::enableSingleKeyTriggers (bool enable)
// public
-QString kpTool::description () const
+TQString kpTool::description () const
{
return m_description;
}
// public
-void kpTool::setDescription (const QString &description)
+void kpTool::setDescription (const TQString &description)
{
m_description = description;
@@ -357,7 +357,7 @@ const char *kpTool::name () const
// static
-QRect kpTool::neededRect (const QRect &rect, int lineWidth)
+TQRect kpTool::neededRect (const TQRect &rect, int lineWidth)
{
int x1, y1, x2, y2;
rect.coords (&x1, &y1, &x2, &y2);
@@ -365,12 +365,12 @@ QRect kpTool::neededRect (const QRect &rect, int lineWidth)
if (lineWidth < 1)
lineWidth = 1;
- return QRect (QPoint (x1 - lineWidth + 1, y1 - lineWidth + 1),
- QPoint (x2 + lineWidth - 1, y2 + lineWidth - 1));
+ return TQRect (TQPoint (x1 - lineWidth + 1, y1 - lineWidth + 1),
+ TQPoint (x2 + lineWidth - 1, y2 + lineWidth - 1));
}
// static
-QPixmap kpTool::neededPixmap (const QPixmap &pixmap, const QRect &boundingRect)
+TQPixmap kpTool::neededPixmap (const TQPixmap &pixmap, const TQRect &boundingRect)
{
return kpPixmapFX::getPixmapAt (pixmap, boundingRect);
}
@@ -383,7 +383,7 @@ bool kpTool::hasCurrentPoint () const
}
// public
-QPoint kpTool::currentPoint (bool zoomToDoc) const
+TQPoint kpTool::currentPoint (bool zoomToDoc) const
{
#if DEBUG_KP_TOOL && 0
kdDebug () << "kpTool::currentPoint(zoomToDoc=" << zoomToDoc << ")" << endl;
@@ -408,8 +408,8 @@ QPoint kpTool::currentPoint (bool zoomToDoc) const
}
- const QPoint globalPos = QCursor::pos ();
- const QPoint viewPos = v->mapFromGlobal (globalPos);
+ const TQPoint globalPos = TQCursor::pos ();
+ const TQPoint viewPos = v->mapFromGlobal (globalPos);
#if DEBUG_KP_TOOL && 0
kdDebug () << "\tglobalPos=" << globalPos
<< " viewPos=" << viewPos
@@ -419,7 +419,7 @@ QPoint kpTool::currentPoint (bool zoomToDoc) const
return viewPos;
- const QPoint docPos = v->transformViewToDoc (viewPos);
+ const TQPoint docPos = v->transformViewToDoc (viewPos);
#if DEBUG_KP_TOOL && 0
kdDebug () << "\tdocPos=" << docPos << endl;
#endif
@@ -436,8 +436,8 @@ void kpTool::somethingBelowTheCursorChanged ()
// private
// TODO: don't dup code from mouseMoveEvent()
-void kpTool::somethingBelowTheCursorChanged (const QPoint &currentPoint_,
- const QPoint &currentViewPoint_)
+void kpTool::somethingBelowTheCursorChanged (const TQPoint &currentPoint_,
+ const TQPoint &currentViewPoint_)
{
#if DEBUG_KP_TOOL && 0
kdDebug () << "kpTool::somethingBelowTheCursorChanged(docPoint="
@@ -460,7 +460,7 @@ void kpTool::somethingBelowTheCursorChanged (const QPoint &currentPoint_,
{
if (m_currentPoint != KP_INVALID_POINT)
{
- draw (m_currentPoint, m_lastPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ draw (m_currentPoint, m_lastPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
m_lastPoint = m_currentPoint;
}
}
@@ -516,7 +516,7 @@ void kpTool::endInternal ()
{
// before we can stop using the tool, we must stop the current drawing operation (if any)
if (hasBegunShape ())
- endShapeInternal (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ endShapeInternal (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
// call user virtual func
end ();
@@ -576,7 +576,7 @@ void kpTool::beginDraw ()
}
// virtual
-void kpTool::hover (const QPoint &point)
+void kpTool::hover (const TQPoint &point)
{
#if DEBUG_KP_TOOL
kdDebug () << "kpTool::hover" << point
@@ -602,7 +602,7 @@ void kpTool::reselect ()
// public
-QIconSet kpTool::iconSet (int forceSize) const
+TQIconSet kpTool::iconSet (int forceSize) const
{
#if DEBUG_KP_TOOL && 0
kdDebug () << "kpTool(" << name () << ")::iconSet(forceSize=" << forceSize << ")" << endl;
@@ -615,7 +615,7 @@ QIconSet kpTool::iconSet (int forceSize) const
}
// public
-QString kpTool::iconName () const
+TQString kpTool::iconName () const
{
return name ();
}
@@ -638,7 +638,7 @@ void kpTool::slotActionActivated ()
// virtual
-void kpTool::draw (const QPoint &, const QPoint &, const QRect &)
+void kpTool::draw (const TQPoint &, const TQPoint &, const TQRect &)
{
}
@@ -687,7 +687,7 @@ void kpTool::releasedAllButtons ()
{
}
-void kpTool::endDrawInternal (const QPoint &thisPoint, const QRect &normalizedRect,
+void kpTool::endDrawInternal (const TQPoint &thisPoint, const TQRect &normalizedRect,
bool wantEndShape)
{
#if DEBUG_KP_TOOL && 1
@@ -742,13 +742,13 @@ void kpTool::endDrawInternal (const QPoint &thisPoint, const QRect &normalizedRe
}
// private
-void kpTool::endShapeInternal (const QPoint &thisPoint, const QRect &normalizedRect)
+void kpTool::endShapeInternal (const TQPoint &thisPoint, const TQRect &normalizedRect)
{
endDrawInternal (thisPoint, normalizedRect, true/*end shape*/);
}
// virtual
-void kpTool::endDraw (const QPoint &, const QRect &)
+void kpTool::endDraw (const TQPoint &, const TQRect &)
{
}
@@ -904,7 +904,7 @@ void kpTool::slotColorSimilarityChangedInternal (double similarity, int processe
bool kpTool::currentPointNextToLast () const
{
- if (m_lastPoint == QPoint (-1, -1))
+ if (m_lastPoint == TQPoint (-1, -1))
return true;
int dx = kAbs (m_currentPoint.x () - m_lastPoint.x ());
@@ -915,7 +915,7 @@ bool kpTool::currentPointNextToLast () const
bool kpTool::currentPointCardinallyNextToLast () const
{
- if (m_lastPoint == QPoint (-1, -1))
+ if (m_lastPoint == TQPoint (-1, -1))
return true;
int dx = kAbs (m_currentPoint.x () - m_lastPoint.x ());
@@ -929,7 +929,7 @@ kpCommandHistory *kpTool::commandHistory () const
return m_mainWindow ? m_mainWindow->commandHistory () : 0;
}
-void kpTool::mousePressEvent (QMouseEvent *e)
+void kpTool::mousePressEvent (TQMouseEvent *e)
{
#if DEBUG_KP_TOOL && 1
kdDebug () << "kpTool::mousePressEvent pos=" << e->pos ()
@@ -944,7 +944,7 @@ void kpTool::mousePressEvent (QMouseEvent *e)
if (m_mainWindow && e->button () == Qt::MidButton)
{
- const QString text = QApplication::clipboard ()->text (QClipboard::Selection);
+ const TQString text = TQApplication::clipboard ()->text (QClipboard::Selection);
#if DEBUG_KP_TOOL && 1
kdDebug () << "\tMMB pasteText='" << text << "'" << endl;
#endif
@@ -956,7 +956,7 @@ void kpTool::mousePressEvent (QMouseEvent *e)
kdDebug () << "\t\thasBegunShape - end" << endl;
#endif
endShapeInternal (m_currentPoint,
- QRect (m_startPoint, m_currentPoint).normalize ());
+ TQRect (m_startPoint, m_currentPoint).normalize ());
}
if (viewUnderCursor ())
@@ -994,8 +994,8 @@ void kpTool::mousePressEvent (QMouseEvent *e)
// if we get a mousePressEvent when we're drawing, then the other
// mouse button must have been pressed
- m_currentPoint = view ? view->transformViewToDoc (e->pos ()) : QPoint (-1, -1);
- m_currentViewPoint = view ? e->pos () : QPoint (-1, -1);
+ m_currentPoint = view ? view->transformViewToDoc (e->pos ()) : TQPoint (-1, -1);
+ m_currentViewPoint = view ? e->pos () : TQPoint (-1, -1);
cancelShapeInternal ();
}
@@ -1019,10 +1019,10 @@ void kpTool::mousePressEvent (QMouseEvent *e)
m_shiftPressed = (buttonState & Qt::ShiftButton);
m_controlPressed = (buttonState & Qt::ControlButton);
m_altPressed = (buttonState & Qt::AltButton);
- m_startPoint = m_currentPoint = view ? view->transformViewToDoc (e->pos ()) : QPoint (-1, -1);
- m_currentViewPoint = view ? e->pos () : QPoint (-1, -1);
+ m_startPoint = m_currentPoint = view ? view->transformViewToDoc (e->pos ()) : TQPoint (-1, -1);
+ m_currentViewPoint = view ? e->pos () : TQPoint (-1, -1);
m_viewUnderStartPoint = view;
- m_lastPoint = QPoint (-1, -1);
+ m_lastPoint = TQPoint (-1, -1);
#if DEBUG_KP_TOOL && 1
kdDebug () << "\tBeginning draw @ " << m_currentPoint << endl;
@@ -1030,11 +1030,11 @@ void kpTool::mousePressEvent (QMouseEvent *e)
beginDrawInternal ();
- draw (m_currentPoint, m_lastPoint, QRect (m_currentPoint, m_currentPoint));
+ draw (m_currentPoint, m_lastPoint, TQRect (m_currentPoint, m_currentPoint));
m_lastPoint = m_currentPoint;
}
-void kpTool::mouseMoveEvent (QMouseEvent *e)
+void kpTool::mouseMoveEvent (TQMouseEvent *e)
{
#if DEBUG_KP_TOOL && 0
kdDebug () << "kpTool::mouseMoveEvent pos=" << e->pos ()
@@ -1087,7 +1087,7 @@ void kpTool::mouseMoveEvent (QMouseEvent *e)
viewManager ()->setFastUpdates ();
}
- draw (m_currentPoint, m_lastPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ draw (m_currentPoint, m_lastPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
if (dragScrolled)
viewManager ()->restoreFastUpdates ();
@@ -1110,7 +1110,7 @@ void kpTool::mouseMoveEvent (QMouseEvent *e)
}
}
-void kpTool::mouseReleaseEvent (QMouseEvent *e)
+void kpTool::mouseReleaseEvent (TQMouseEvent *e)
{
#if DEBUG_KP_TOOL && 1
kdDebug () << "kpTool::mouseReleaseEvent pos=" << e->pos ()
@@ -1128,9 +1128,9 @@ void kpTool::mouseReleaseEvent (QMouseEvent *e)
return;
}
- m_currentPoint = view ? view->transformViewToDoc (e->pos ()) : QPoint (-1, -1);
- m_currentViewPoint = view ? e->pos () : QPoint (-1, -1);
- endDrawInternal (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ m_currentPoint = view ? view->transformViewToDoc (e->pos ()) : TQPoint (-1, -1);
+ m_currentViewPoint = view ? e->pos () : TQPoint (-1, -1);
+ endDrawInternal (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
}
if ((e->stateAfter () & Qt::MouseButtonMask) == 0)
@@ -1139,7 +1139,7 @@ void kpTool::mouseReleaseEvent (QMouseEvent *e)
}
}
-void kpTool::wheelEvent (QWheelEvent *e)
+void kpTool::wheelEvent (TQWheelEvent *e)
{
#if DEBUG_KP_TOOL
kdDebug () << "kpTool::wheelEvent() state=" << e->state ()
@@ -1183,7 +1183,7 @@ void kpTool::wheelEvent (QWheelEvent *e)
}
-void kpTool::keyPressEvent (QKeyEvent *e)
+void kpTool::keyPressEvent (TQKeyEvent *e)
{
#if DEBUG_KP_TOOL && 0
kdDebug () << "kpTool::keyPressEvent() e->key=" << e->key () << endl;
@@ -1214,7 +1214,7 @@ void kpTool::keyPressEvent (QKeyEvent *e)
break;
/*
- * QCursor::setPos conveniently causes mouseMoveEvents :)
+ * TQCursor::setPos conveniently causes mouseMoveEvents :)
*/
case Qt::Key_Home: dx = -1, dy = -1; break;
@@ -1237,8 +1237,8 @@ void kpTool::keyPressEvent (QKeyEvent *e)
if (view)
{
// TODO: what about the modifiers
- QMouseEvent me (QEvent::MouseButtonPress,
- view->mapFromGlobal (QCursor::pos ()),
+ TQMouseEvent me (TQEvent::MouseButtonPress,
+ view->mapFromGlobal (TQCursor::pos ()),
Qt::LeftButton,
0);
mousePressEvent (&me);
@@ -1251,7 +1251,7 @@ void kpTool::keyPressEvent (QKeyEvent *e)
kpView *view = viewUnderCursor ();
if (view && (dx || dy))
{
- QPoint oldPoint = view->mapFromGlobal (QCursor::pos ());
+ TQPoint oldPoint = view->mapFromGlobal (TQCursor::pos ());
#if DEBUG_KP_TOOL && 0
kdDebug () << "\toldPoint=" << oldPoint
<< " dx=" << dx << " dy=" << dy << endl;
@@ -1266,17 +1266,17 @@ void kpTool::keyPressEvent (QKeyEvent *e)
#if DEBUG_KP_TOOL && 0
- kdDebug () << "\tnewPoint=" << QPoint (newViewX, newViewY) << endl;
+ kdDebug () << "\tnewPoint=" << TQPoint (newViewX, newViewY) << endl;
#endif
- if (view->transformViewToDoc (QPoint (newViewX, newViewY)) ==
+ if (view->transformViewToDoc (TQPoint (newViewX, newViewY)) ==
view->transformViewToDoc (oldPoint))
{
newViewX += viewIncX, newViewY += viewIncY;
#if DEBUG_KP_TOOL && 0
kdDebug () << "\tneed adjust for doc - newPoint="
- << QPoint (newViewX, newViewY) << endl;
+ << TQPoint (newViewX, newViewY) << endl;
#endif
}
@@ -1285,12 +1285,12 @@ void kpTool::keyPressEvent (QKeyEvent *e)
int x = QMIN (QMAX (newViewX, 0), view->width () - 1);
int y = QMIN (QMAX (newViewY, 0), view->height () - 1);
- QCursor::setPos (view->mapToGlobal (QPoint (x, y)));
+ TQCursor::setPos (view->mapToGlobal (TQPoint (x, y)));
e->accept ();
}
}
-void kpTool::keyReleaseEvent (QKeyEvent *e)
+void kpTool::keyReleaseEvent (TQKeyEvent *e)
{
#if DEBUG_KP_TOOL && 0
kdDebug () << "kpTool::keyReleaseEvent() e->key=" << e->key () << endl;
@@ -1334,8 +1334,8 @@ void kpTool::keyReleaseEvent (QKeyEvent *e)
kpView *view = viewUnderCursor ();
if (view)
{
- QMouseEvent me (QEvent::MouseButtonRelease,
- view->mapFromGlobal (QCursor::pos ()),
+ TQMouseEvent me (TQEvent::MouseButtonRelease,
+ view->mapFromGlobal (TQCursor::pos ()),
Qt::LeftButton,
Qt::LeftButton);
mouseReleaseEvent (&me);
@@ -1346,7 +1346,7 @@ void kpTool::keyReleaseEvent (QKeyEvent *e)
}
// private
-void kpTool::keyUpdateModifierState (QKeyEvent *e)
+void kpTool::keyUpdateModifierState (TQKeyEvent *e)
{
#if DEBUG_KP_TOOL && 0
kdDebug () << "kpTool::updateModifierState() e->key=" << e->key () << endl;
@@ -1389,7 +1389,7 @@ void kpTool::notifyModifierStateChanged ()
if (careAboutModifierState ())
{
if (m_beganDraw)
- draw (m_currentPoint, m_lastPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ draw (m_currentPoint, m_lastPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
else
{
m_currentPoint = currentPoint ();
@@ -1429,28 +1429,28 @@ void kpTool::setAltPressed (bool pressed)
notifyModifierStateChanged ();
}
-void kpTool::focusInEvent (QFocusEvent *)
+void kpTool::focusInEvent (TQFocusEvent *)
{
}
-void kpTool::focusOutEvent (QFocusEvent *)
+void kpTool::focusOutEvent (TQFocusEvent *)
{
#if DEBUG_KP_TOOL && 0
kdDebug () << "kpTool::focusOutEvent() beganDraw=" << m_beganDraw << endl;
#endif
if (m_beganDraw)
- endDrawInternal (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ endDrawInternal (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
}
-void kpTool::enterEvent (QEvent *)
+void kpTool::enterEvent (TQEvent *)
{
#if DEBUG_KP_TOOL && 1
kdDebug () << "kpTool::enterEvent() beganDraw=" << m_beganDraw << endl;
#endif
}
-void kpTool::leaveEvent (QEvent *)
+void kpTool::leaveEvent (TQEvent *)
{
#if DEBUG_KP_TOOL && 1
kdDebug () << "kpTool::leaveEvent() beganDraw=" << m_beganDraw << endl;
@@ -1492,7 +1492,7 @@ int kpTool::mouseButton (const Qt::ButtonState &buttonState)
// public static
-QString kpTool::cancelUserMessage (int mouseButton)
+TQString kpTool::cancelUserMessage (int mouseButton)
{
if (mouseButton == 0)
return i18n ("Right click to cancel.");
@@ -1501,20 +1501,20 @@ QString kpTool::cancelUserMessage (int mouseButton)
}
// public
-QString kpTool::cancelUserMessage () const
+TQString kpTool::cancelUserMessage () const
{
return cancelUserMessage (m_mouseButton);
}
// public
-QString kpTool::userMessage () const
+TQString kpTool::userMessage () const
{
return m_userMessage;
}
// public
-void kpTool::setUserMessage (const QString &userMessage)
+void kpTool::setUserMessage (const TQString &userMessage)
{
m_userMessage = userMessage;
@@ -1528,13 +1528,13 @@ void kpTool::setUserMessage (const QString &userMessage)
// public
-QPoint kpTool::userShapeStartPoint () const
+TQPoint kpTool::userShapeStartPoint () const
{
return m_userShapeStartPoint;
}
// public
-QPoint kpTool::userShapeEndPoint () const
+TQPoint kpTool::userShapeEndPoint () const
{
return m_userShapeEndPoint;
}
@@ -1553,8 +1553,8 @@ int kpTool::calculateLength (int start, int end)
}
// public
-void kpTool::setUserShapePoints (const QPoint &startPoint,
- const QPoint &endPoint,
+void kpTool::setUserShapePoints (const TQPoint &startPoint,
+ const TQPoint &endPoint,
bool setSize)
{
m_userShapeStartPoint = startPoint;
@@ -1578,7 +1578,7 @@ void kpTool::setUserShapePoints (const QPoint &startPoint,
// public
-QSize kpTool::userShapeSize () const
+TQSize kpTool::userShapeSize () const
{
return m_userShapeSize;
}
@@ -1596,7 +1596,7 @@ int kpTool::userShapeHeight () const
}
// public
-void kpTool::setUserShapeSize (const QSize &size)
+void kpTool::setUserShapeSize (const TQSize &size)
{
m_userShapeSize = size;
@@ -1608,17 +1608,17 @@ void kpTool::setUserShapeSize (const QSize &size)
// public
void kpTool::setUserShapeSize (int width, int height)
{
- setUserShapeSize (QSize (width, height));
+ setUserShapeSize (TQSize (width, height));
}
// public static
bool kpTool::warnIfBigImageSize (int oldWidth, int oldHeight,
int newWidth, int newHeight,
- const QString &text,
- const QString &caption,
- const QString &continueButtonText,
- QWidget *parent)
+ const TQString &text,
+ const TQString &caption,
+ const TQString &continueButtonText,
+ TQWidget *parent)
{
#if DEBUG_KP_TOOL
kdDebug () << "kpTool::warnIfBigImageSize()"
@@ -1627,7 +1627,7 @@ bool kpTool::warnIfBigImageSize (int oldWidth, int oldHeight,
<< " pixmapSize="
<< kpPixmapFX::pixmapSize (newWidth,
newHeight,
- QPixmap::defaultDepth ())
+ TQPixmap::defaultDepth ())
<< " vs BigImageSize=" << KP_BIG_IMAGE_SIZE
<< endl;
#endif
@@ -1639,20 +1639,20 @@ bool kpTool::warnIfBigImageSize (int oldWidth, int oldHeight,
}
// Was already large - user was warned before, don't annoy him/her again
- if (kpPixmapFX::pixmapSize (oldWidth, oldHeight, QPixmap::defaultDepth ()) >=
+ if (kpPixmapFX::pixmapSize (oldWidth, oldHeight, TQPixmap::defaultDepth ()) >=
KP_BIG_IMAGE_SIZE)
{
return true;
}
- if (kpPixmapFX::pixmapSize (newWidth, newHeight, QPixmap::defaultDepth ()) >=
+ if (kpPixmapFX::pixmapSize (newWidth, newHeight, TQPixmap::defaultDepth ()) >=
KP_BIG_IMAGE_SIZE)
{
int accept = KMessageBox::warningContinueCancel (parent,
text,
caption,
continueButtonText,
- QString::fromLatin1 ("BigImageDontAskAgain"));
+ TQString::fromLatin1 ("BigImageDontAskAgain"));
return (accept == KMessageBox::Continue);
}
diff --git a/kolourpaint/kptool.h b/kolourpaint/kptool.h
index ba7ee75e..a0309463 100644
--- a/kolourpaint/kptool.h
+++ b/kolourpaint/kptool.h
@@ -28,17 +28,17 @@
#ifndef __kp_tool_h__
#define __kp_tool_h__
-#include <qobject.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qsize.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqsize.h>
+#include <tqstring.h>
#include <kpdefs.h>
-class QIconSet;
-class QPixmap;
+class TQIconSet;
+class TQPixmap;
class KKeySequence;
class KShortcut;
@@ -60,13 +60,13 @@ class kpTool : public QObject
Q_OBJECT
public:
- kpTool (const QString &text, const QString &description,
+ kpTool (const TQString &text, const TQString &description,
int key,
kpMainWindow *mainWindow, const char *name);
virtual ~kpTool ();
private:
- void init (const QString &text, const QString &description,
+ void init (const TQString &text, const TQString &description,
int key,
kpMainWindow *mainWindow, const char *name);
@@ -78,21 +78,21 @@ protected:
kpToolAction *m_action;
signals:
- void actionToolTipChanged (const QString &string);
+ void actionToolTipChanged (const TQString &string);
protected slots:
- void slotActionToolTipChanged (const QString &string);
+ void slotActionToolTipChanged (const TQString &string);
public:
- QString text () const;
- void setText (const QString &text);
+ TQString text () const;
+ void setText (const TQString &text);
- static QString toolTipForTextAndShortcut (const QString &text,
+ static TQString toolTipForTextAndShortcut (const TQString &text,
const KShortcut &shortcut);
- QString toolTip () const;
+ TQString toolTip () const;
- QString description () const;
- void setDescription (const QString &description);
+ TQString description () const;
+ void setDescription (const TQString &description);
int key () const;
void setKey (int key);
@@ -114,8 +114,8 @@ public:
const char *name () const;
- static QRect neededRect (const QRect &rect, int lineWidth);
- static QPixmap neededPixmap (const QPixmap &pixmap, const QRect &boundingRect);
+ static TQRect neededRect (const TQRect &rect, int lineWidth);
+ static TQPixmap neededPixmap (const TQPixmap &pixmap, const TQRect &boundingRect);
bool hasCurrentPoint () const;
// Returns the position of the cursor relative to the topleft point of
@@ -134,7 +134,7 @@ public:
//
// Keep in mind that if viewUnderStartPoint(), this can return coordinates
// outside of the document/view.
- QPoint currentPoint (bool zoomToDoc = true) const;
+ TQPoint currentPoint (bool zoomToDoc = true) const;
public slots:
// Call this when something below the mouse cursor may have changed
@@ -151,8 +151,8 @@ public slots:
private:
// Same as above except that you claim you know better than currentPoint()
- void somethingBelowTheCursorChanged (const QPoint &currentPoint_,
- const QPoint &currentViewPoint_);
+ void somethingBelowTheCursorChanged (const TQPoint &currentPoint_,
+ const TQPoint &currentViewPoint_);
public:
// called when the tool is selected
@@ -177,25 +177,25 @@ public:
signals:
// emitted after beginDraw() has been called
- void beganDraw (const QPoint &point);
+ void beganDraw (const TQPoint &point);
// Emitted just before draw() is called in mouseMoveEvent(). Slots
// connected to this signal should return in <scrolled> whether the
// mouse pos may have changed. Used by drag scrolling.
- void movedAndAboutToDraw (const QPoint &currentPoint, const QPoint &lastPoint,
+ void movedAndAboutToDraw (const TQPoint &currentPoint, const TQPoint &lastPoint,
int zoomLevel,
bool *scrolled);
// emitted after endDraw() has been called
- void endedDraw (const QPoint &point);
+ void endedDraw (const TQPoint &point);
// emitted after cancelShape() has been called
- void cancelledShape (const QPoint &point);
+ void cancelledShape (const TQPoint &point);
public:
- QIconSet iconSet (int forceSize = 0) const;
- QString iconName () const;
+ TQIconSet iconSet (int forceSize = 0) const;
+ TQString iconName () const;
kpToolAction *action ();
signals:
@@ -215,20 +215,20 @@ protected:
// mouse move without button pressed
// (only m_currentPoint & m_currentViewPoint is defined)
- virtual void hover (const QPoint &point);
+ virtual void hover (const TQPoint &point);
// this is useful for "instant" tools like the Pen & Eraser
- virtual void draw (const QPoint &thisPoint, const QPoint &lastPoint,
- const QRect &normalizedRect);
+ virtual void draw (const TQPoint &thisPoint, const TQPoint &lastPoint,
+ const TQRect &normalizedRect);
// (m_mouseButton will not change from beginDraw())
virtual void cancelShape ();
virtual void releasedAllButtons ();
- virtual void endDraw (const QPoint &thisPoint, const QRect &normalizedRect);
+ virtual void endDraw (const TQPoint &thisPoint, const TQRect &normalizedRect);
- virtual void endShape (const QPoint &thisPoint = QPoint (),
- const QRect &normalizedRect = QRect ())
+ virtual void endShape (const TQPoint &thisPoint = TQPoint (),
+ const TQRect &normalizedRect = TQRect ())
{
endDraw (thisPoint, normalizedRect);
}
@@ -280,7 +280,7 @@ protected:
int m_mouseButton; /* 0 = left, 1 = right */
bool m_shiftPressed, m_controlPressed, m_altPressed; // m_altPressed is unreliable
bool m_beganDraw; // set after beginDraw() is called, unset before endDraw() is called
- QPoint m_startPoint,
+ TQPoint m_startPoint,
m_currentPoint, m_currentViewPoint,
m_lastPoint;
@@ -292,45 +292,45 @@ protected:
void endInternal ();
void beginDrawInternal ();
- void endDrawInternal (const QPoint &thisPoint, const QRect &normalizedRect,
+ void endDrawInternal (const TQPoint &thisPoint, const TQRect &normalizedRect,
bool wantEndShape = false);
void cancelShapeInternal ();
- void endShapeInternal (const QPoint &thisPoint = QPoint (),
- const QRect &normalizedRect = QRect ());
+ void endShapeInternal (const TQPoint &thisPoint = TQPoint (),
+ const TQRect &normalizedRect = TQRect ());
friend class kpView;
// If you're reimplementing any of these, you probably don't know what
// you're doing - reimplement begin(),beginDraw(),draw(),cancelShape(),
// endDraw() etc. instead.
- virtual void mousePressEvent (QMouseEvent *e);
- virtual void mouseMoveEvent (QMouseEvent *e);
- virtual void mouseReleaseEvent (QMouseEvent *e);
- virtual void wheelEvent (QWheelEvent *e);
+ virtual void mousePressEvent (TQMouseEvent *e);
+ virtual void mouseMoveEvent (TQMouseEvent *e);
+ virtual void mouseReleaseEvent (TQMouseEvent *e);
+ virtual void wheelEvent (TQWheelEvent *e);
- virtual void keyPressEvent (QKeyEvent *e);
- virtual void keyReleaseEvent (QKeyEvent *e);
+ virtual void keyPressEvent (TQKeyEvent *e);
+ virtual void keyReleaseEvent (TQKeyEvent *e);
- virtual void imStartEvent(QIMEvent *){}
- virtual void imComposeEvent(QIMEvent *){}
- virtual void imEndEvent(QIMEvent *){}
+ virtual void imStartEvent(TQIMEvent *){}
+ virtual void imComposeEvent(TQIMEvent *){}
+ virtual void imEndEvent(TQIMEvent *){}
private:
- void keyUpdateModifierState (QKeyEvent *e);
+ void keyUpdateModifierState (TQKeyEvent *e);
void notifyModifierStateChanged ();
protected:
virtual void setShiftPressed (bool pressed);
virtual void setControlPressed (bool pressed);
virtual void setAltPressed (bool pressed);
- virtual void focusInEvent (QFocusEvent *e);
- virtual void focusOutEvent (QFocusEvent *e);
- virtual void enterEvent (QEvent *e);
- virtual void leaveEvent (QEvent *e);
+ virtual void focusInEvent (TQFocusEvent *e);
+ virtual void focusOutEvent (TQFocusEvent *e);
+ virtual void enterEvent (TQEvent *e);
+ virtual void leaveEvent (TQEvent *e);
// 0 = left, 1 = right, -1 = other (none, left+right, mid)
static int mouseButton (const Qt::ButtonState &buttonState);
- QString m_text, m_description;
+ TQString m_text, m_description;
const char *m_name;
kpMainWindow *m_mainWindow;
@@ -346,36 +346,36 @@ protected:
public:
// Returns "(Left|Right) click to cancel." where Left or Right is chosen
// depending on which one is the _opposite_ of <mouseButton>
- static QString cancelUserMessage (int mouseButton);
- QString cancelUserMessage () const;
+ static TQString cancelUserMessage (int mouseButton);
+ TQString cancelUserMessage () const;
- QString userMessage () const;
- void setUserMessage (const QString &userMessage = QString::null);
+ TQString userMessage () const;
+ void setUserMessage (const TQString &userMessage = TQString::null);
- QPoint userShapeStartPoint () const;
- QPoint userShapeEndPoint () const;
+ TQPoint userShapeStartPoint () const;
+ TQPoint userShapeEndPoint () const;
static int calculateLength (int start, int end);
- void setUserShapePoints (const QPoint &startPoint = KP_INVALID_POINT,
- const QPoint &endPoint = KP_INVALID_POINT,
+ void setUserShapePoints (const TQPoint &startPoint = KP_INVALID_POINT,
+ const TQPoint &endPoint = KP_INVALID_POINT,
bool setSize = true);
- QSize userShapeSize () const;
+ TQSize userShapeSize () const;
int userShapeWidth () const;
int userShapeHeight () const;
- void setUserShapeSize (const QSize &size = KP_INVALID_SIZE);
+ void setUserShapeSize (const TQSize &size = KP_INVALID_SIZE);
void setUserShapeSize (int width, int height);
signals:
- void userMessageChanged (const QString &userMessage);
- void userShapePointsChanged (const QPoint &startPoint = KP_INVALID_POINT,
- const QPoint &endPoint = KP_INVALID_POINT);
- void userShapeSizeChanged (const QSize &size);
+ void userMessageChanged (const TQString &userMessage);
+ void userShapePointsChanged (const TQPoint &startPoint = KP_INVALID_POINT,
+ const TQPoint &endPoint = KP_INVALID_POINT);
+ void userShapeSizeChanged (const TQSize &size);
void userShapeSizeChanged (int width, int height);
protected:
- QString m_userMessage;
- QPoint m_userShapeStartPoint, m_userShapeEndPoint;
- QSize m_userShapeSize;
+ TQString m_userMessage;
+ TQPoint m_userShapeStartPoint, m_userShapeEndPoint;
+ TQSize m_userShapeSize;
public:
@@ -406,10 +406,10 @@ public:
// continueButtonText = i18n ("Rotat&e (Image|Selection)");
static bool warnIfBigImageSize (int oldWidth, int oldHeight,
int newWidth, int newHeight,
- const QString &text,
- const QString &caption,
- const QString &continueButtonText,
- QWidget *parent);
+ const TQString &text,
+ const TQString &caption,
+ const TQString &continueButtonText,
+ TQWidget *parent);
protected:
diff --git a/kolourpaint/kpview.cpp b/kolourpaint/kpview.cpp
index 1f18c659..8e0020f6 100644
--- a/kolourpaint/kpview.cpp
+++ b/kolourpaint/kpview.cpp
@@ -35,20 +35,20 @@
#include <math.h>
#include <stdlib.h>
-#include <qbitmap.h>
-#include <qcursor.h>
-#include <qdragobject.h>
-#include <qguardedptr.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qregion.h>
-#include <qmemarray.h>
+#include <tqbitmap.h>
+#include <tqcursor.h>
+#include <tqdragobject.h>
+#include <tqguardedptr.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqregion.h>
+#include <tqmemarray.h>
#if DEBUG_KP_VIEW || DEBUG_KP_VIEW_RENDERER
- #include <qdatetime.h>
+ #include <tqdatetime.h>
#endif
#include <kdebug.h>
@@ -80,20 +80,20 @@ struct kpViewPrivate
//
// For more details, see SVN commit:
// "r385274 | dang | 2005-02-02 22:08:27 +1100 (Wed, 02 Feb 2005) | 21 lines".
- QGuardedPtr <kpDocument> m_document;
- QGuardedPtr <kpToolToolBar> m_toolToolBar;
- QGuardedPtr <kpViewManager> m_viewManager;
- QGuardedPtr <kpView> m_buddyView;
- QGuardedPtr <kpViewScrollableContainer> m_scrollableContainer;
+ TQGuardedPtr <kpDocument> m_document;
+ TQGuardedPtr <kpToolToolBar> m_toolToolBar;
+ TQGuardedPtr <kpViewManager> m_viewManager;
+ TQGuardedPtr <kpView> m_buddyView;
+ TQGuardedPtr <kpViewScrollableContainer> m_scrollableContainer;
int m_hzoom, m_vzoom;
- QPoint m_origin;
+ TQPoint m_origin;
bool m_showGrid;
bool m_isBuddyViewScrollableContainerRectangleShown;
- QRect m_buddyViewScrollableContainerRectangle;
+ TQRect m_buddyViewScrollableContainerRectangle;
- QRegion m_queuedUpdateArea;
- QPixmap *m_backBuffer;
+ TQRegion m_queuedUpdateArea;
+ TQPixmap *m_backBuffer;
};
@@ -102,9 +102,9 @@ kpView::kpView (kpDocument *document,
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
- : QWidget (parent, name, Qt::WNoAutoErase/*no flicker*/),
+ : TQWidget (parent, name, Qt::WNoAutoErase/*no flicker*/),
d (new kpViewPrivate ())
{
d->m_document = document;
@@ -114,7 +114,7 @@ kpView::kpView (kpDocument *document,
d->m_scrollableContainer = scrollableContainer;
d->m_hzoom = 100, d->m_vzoom = 100;
- d->m_origin = QPoint (0, 0);
+ d->m_origin = TQPoint (0, 0);
d->m_showGrid = false;
d->m_isBuddyViewScrollableContainerRectangleShown = false;
@@ -122,7 +122,7 @@ kpView::kpView (kpDocument *document,
setBackgroundMode (Qt::NoBackground); // no flicker
- setFocusPolicy (QWidget::WheelFocus);
+ setFocusPolicy (TQWidget::WheelFocus);
setMouseTracking (true); // mouseMoveEvent's even when no mousebtn down
setKeyCompression (true);
setInputMethodEnabled (true); // ensure using InputMethod
@@ -218,13 +218,13 @@ void kpView::setZoomLevel (int hzoom, int vzoom)
// public
-QPoint kpView::origin () const
+TQPoint kpView::origin () const
{
return d->m_origin;
}
// public virtual
-void kpView::setOrigin (const QPoint &origin)
+void kpView::setOrigin (const TQPoint &origin)
{
#if DEBUG_KP_VIEW
kdDebug () << "kpView(" << name () << ")::setOrigin" << origin << endl;
@@ -297,55 +297,55 @@ void kpView::showBuddyViewScrollableContainerRectangle (bool yes)
// Got these connect statements by analysing deps of
// updateBuddyViewScrollableContainerRectangle() rect update code.
- connect (this, SIGNAL (zoomLevelChanged (int, int)),
- this, SLOT (updateBuddyViewScrollableContainerRectangle ()));
- connect (this, SIGNAL (originChanged (const QPoint &)),
- this, SLOT (updateBuddyViewScrollableContainerRectangle ()));
+ connect (this, TQT_SIGNAL (zoomLevelChanged (int, int)),
+ this, TQT_SLOT (updateBuddyViewScrollableContainerRectangle ()));
+ connect (this, TQT_SIGNAL (originChanged (const TQPoint &)),
+ this, TQT_SLOT (updateBuddyViewScrollableContainerRectangle ()));
if (buddyViewScrollableContainer ())
{
- connect (buddyViewScrollableContainer (), SIGNAL (contentsMovingSoon (int, int)),
- this, SLOT (updateBuddyViewScrollableContainerRectangle ()));
- connect (buddyViewScrollableContainer (), SIGNAL (resized ()),
- this, SLOT (updateBuddyViewScrollableContainerRectangle ()));
+ connect (buddyViewScrollableContainer (), TQT_SIGNAL (contentsMovingSoon (int, int)),
+ this, TQT_SLOT (updateBuddyViewScrollableContainerRectangle ()));
+ connect (buddyViewScrollableContainer (), TQT_SIGNAL (resized ()),
+ this, TQT_SLOT (updateBuddyViewScrollableContainerRectangle ()));
}
if (buddyView ())
{
- connect (buddyView (), SIGNAL (zoomLevelChanged (int, int)),
- this, SLOT (updateBuddyViewScrollableContainerRectangle ()));
- connect (buddyView (), SIGNAL (originChanged (const QPoint &)),
- this, SLOT (updateBuddyViewScrollableContainerRectangle ()));
+ connect (buddyView (), TQT_SIGNAL (zoomLevelChanged (int, int)),
+ this, TQT_SLOT (updateBuddyViewScrollableContainerRectangle ()));
+ connect (buddyView (), TQT_SIGNAL (originChanged (const TQPoint &)),
+ this, TQT_SLOT (updateBuddyViewScrollableContainerRectangle ()));
- connect (buddyView (), SIGNAL (sizeChanged (int, int)),
- this, SLOT (updateBuddyViewScrollableContainerRectangle ()));
+ connect (buddyView (), TQT_SIGNAL (sizeChanged (int, int)),
+ this, TQT_SLOT (updateBuddyViewScrollableContainerRectangle ()));
}
}
else
{
- disconnect (this, SIGNAL (zoomLevelChanged (int, int)),
- this, SLOT (updateBuddyViewScrollableContainerRectangle ()));
- disconnect (this, SIGNAL (originChanged (const QPoint &)),
- this, SLOT (updateBuddyViewScrollableContainerRectangle ()));
+ disconnect (this, TQT_SIGNAL (zoomLevelChanged (int, int)),
+ this, TQT_SLOT (updateBuddyViewScrollableContainerRectangle ()));
+ disconnect (this, TQT_SIGNAL (originChanged (const TQPoint &)),
+ this, TQT_SLOT (updateBuddyViewScrollableContainerRectangle ()));
if (buddyViewScrollableContainer ())
{
- disconnect (buddyViewScrollableContainer (), SIGNAL (contentsMovingSoon (int, int)),
- this, SLOT (updateBuddyViewScrollableContainerRectangle ()));
- disconnect (buddyViewScrollableContainer (), SIGNAL (resized ()),
- this, SLOT (updateBuddyViewScrollableContainerRectangle ()));
+ disconnect (buddyViewScrollableContainer (), TQT_SIGNAL (contentsMovingSoon (int, int)),
+ this, TQT_SLOT (updateBuddyViewScrollableContainerRectangle ()));
+ disconnect (buddyViewScrollableContainer (), TQT_SIGNAL (resized ()),
+ this, TQT_SLOT (updateBuddyViewScrollableContainerRectangle ()));
}
if (buddyView ())
{
- disconnect (buddyView (), SIGNAL (zoomLevelChanged (int, int)),
- this, SLOT (updateBuddyViewScrollableContainerRectangle ()));
- disconnect (buddyView (), SIGNAL (originChanged (const QPoint &)),
- this, SLOT (updateBuddyViewScrollableContainerRectangle ()));
+ disconnect (buddyView (), TQT_SIGNAL (zoomLevelChanged (int, int)),
+ this, TQT_SLOT (updateBuddyViewScrollableContainerRectangle ()));
+ disconnect (buddyView (), TQT_SIGNAL (originChanged (const TQPoint &)),
+ this, TQT_SLOT (updateBuddyViewScrollableContainerRectangle ()));
- disconnect (buddyView (), SIGNAL (sizeChanged (int, int)),
- this, SLOT (updateBuddyViewScrollableContainerRectangle ()));
+ disconnect (buddyView (), TQT_SIGNAL (sizeChanged (int, int)),
+ this, TQT_SLOT (updateBuddyViewScrollableContainerRectangle ()));
}
}
@@ -355,7 +355,7 @@ void kpView::showBuddyViewScrollableContainerRectangle (bool yes)
// protected
-QRect kpView::buddyViewScrollableContainerRectangle () const
+TQRect kpView::buddyViewScrollableContainerRectangle () const
{
return d->m_buddyViewScrollableContainerRectangle;
}
@@ -378,12 +378,12 @@ void kpView::updateBuddyViewScrollableContainerRectangle ()
}
- QRect newRect;
+ TQRect newRect;
if (isBuddyViewScrollableContainerRectangleShown () &&
buddyViewScrollableContainer () && buddyView ())
{
- QRect docRect = buddyView ()->transformViewToDoc (
- QRect (buddyViewScrollableContainer ()->contentsXSoon (),
+ TQRect docRect = buddyView ()->transformViewToDoc (
+ TQRect (buddyViewScrollableContainer ()->contentsXSoon (),
buddyViewScrollableContainer ()->contentsYSoon (),
QMIN (buddyView ()->width (),
buddyViewScrollableContainer ()->visibleWidth ()),
@@ -391,19 +391,19 @@ void kpView::updateBuddyViewScrollableContainerRectangle ()
buddyViewScrollableContainer ()->visibleHeight ())));
- QRect viewRect = this->transformDocToView (docRect);
+ TQRect viewRect = this->transformDocToView (docRect);
// (Surround the area of interest by moving outwards by 1 pixel in each
// direction - don't overlap area)
- newRect = QRect (viewRect.x () - 1,
+ newRect = TQRect (viewRect.x () - 1,
viewRect.y () - 1,
viewRect.width () + 2,
viewRect.height () + 2);
}
else
{
- newRect = QRect ();
+ newRect = TQRect ();
}
if (newRect != d->m_buddyViewScrollableContainerRectangle)
@@ -441,32 +441,32 @@ double kpView::transformViewToDocY (double viewY) const
}
// public
-QPoint kpView::transformViewToDoc (const QPoint &viewPoint) const
+TQPoint kpView::transformViewToDoc (const TQPoint &viewPoint) const
{
- return QPoint ((int) transformViewToDocX (viewPoint.x ()),
+ return TQPoint ((int) transformViewToDocX (viewPoint.x ()),
(int) transformViewToDocY (viewPoint.y ()));
}
// public
-QRect kpView::transformViewToDoc (const QRect &viewRect) const
+TQRect kpView::transformViewToDoc (const TQRect &viewRect) const
{
if (zoomLevelX () == 100 && zoomLevelY () == 100)
{
- return QRect (viewRect.x () - origin ().x (),
+ return TQRect (viewRect.x () - origin ().x (),
viewRect.y () - origin ().y (),
viewRect.width (),
viewRect.height ());
}
else
{
- const QPoint docTopLeft = transformViewToDoc (viewRect.topLeft ());
+ 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 ()));
- // (like QWMatrix::Areas)
- return QRect (docTopLeft.x (), docTopLeft.y (), docWidth, docHeight);
+ // (like TQWMatrix::Areas)
+ return TQRect (docTopLeft.x (), docTopLeft.y (), docWidth, docHeight);
}
}
@@ -484,38 +484,38 @@ double kpView::transformDocToViewY (double docY) const
}
// public
-QPoint kpView::transformDocToView (const QPoint &docPoint) const
+TQPoint kpView::transformDocToView (const TQPoint &docPoint) const
{
- return QPoint ((int) transformDocToViewX (docPoint.x ()),
+ return TQPoint ((int) transformDocToViewX (docPoint.x ()),
(int) transformDocToViewY (docPoint.y ()));
}
// public
-QRect kpView::transformDocToView (const QRect &docRect) const
+TQRect kpView::transformDocToView (const TQRect &docRect) const
{
if (zoomLevelX () == 100 && zoomLevelY () == 100)
{
- return QRect (docRect.x () + origin ().x (),
+ return TQRect (docRect.x () + origin ().x (),
docRect.y () + origin ().y (),
docRect.width (),
docRect.height ());
}
else
{
- const QPoint viewTopLeft = transformDocToView (docRect.topLeft ());
+ 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);
- // (like QWMatrix::Areas)
- return QRect (viewTopLeft.x (), viewTopLeft.y (), viewWidth, viewHeight);
+ // (like TQWMatrix::Areas)
+ return TQRect (viewTopLeft.x (), viewTopLeft.y (), viewWidth, viewHeight);
}
}
// public
-QPoint kpView::transformViewToOtherView (const QPoint &viewPoint,
+TQPoint kpView::transformViewToOtherView (const TQPoint &viewPoint,
const kpView *otherView)
{
if (this == otherView)
@@ -527,7 +527,7 @@ QPoint kpView::transformViewToOtherView (const QPoint &viewPoint,
const double otherViewX = otherView->transformDocToViewX (docX);
const double otherViewY = otherView->transformDocToViewY (docY);
- return QPoint ((int) otherViewX, (int) otherViewY);
+ return TQPoint ((int) otherViewX, (int) otherViewY);
}
@@ -566,7 +566,7 @@ void kpView::setHasMouse (bool yes)
// public
-void kpView::addToQueuedArea (const QRegion &region)
+void kpView::addToQueuedArea (const TQRegion &region)
{
#if DEBUG_KP_VIEW && 0
kdDebug () << "kpView(" << name ()
@@ -578,7 +578,7 @@ void kpView::addToQueuedArea (const QRegion &region)
}
// public
-void kpView::addToQueuedArea (const QRect &rect)
+void kpView::addToQueuedArea (const TQRect &rect)
{
#if DEBUG_KP_VIEW && 0
kdDebug () << "kpView(" << name ()
@@ -596,7 +596,7 @@ void kpView::invalidateQueuedArea ()
kdDebug () << "kpView::invalidateQueuedArea()" << endl;
#endif
- d->m_queuedUpdateArea = QRegion ();
+ d->m_queuedUpdateArea = TQRegion ();
}
// public
@@ -625,7 +625,7 @@ void kpView::updateQueuedArea ()
}
// public
-void kpView::updateMicroFocusHint (const QRect &microFocusHint)
+void kpView::updateMicroFocusHint (const TQRect &microFocusHint)
{
int x = microFocusHint.topLeft().x();
int y = microFocusHint.topLeft().y();
@@ -635,25 +635,25 @@ void kpView::updateMicroFocusHint (const QRect &microFocusHint)
}
// public
-QRect kpView::selectionViewRect () const
+TQRect kpView::selectionViewRect () const
{
return selection () ?
transformDocToView (selection ()->boundingRect ()) :
- QRect ();
+ TQRect ();
}
// public
-QPoint kpView::mouseViewPoint (const QPoint &returnViewPoint) const
+TQPoint kpView::mouseViewPoint (const TQPoint &returnViewPoint) const
{
if (returnViewPoint != KP_INVALID_POINT)
return returnViewPoint;
else
- return mapFromGlobal (QCursor::pos ());
+ return mapFromGlobal (TQCursor::pos ());
}
// public
-QPoint kpView::mouseViewPointRelativeToSelection (const QPoint &viewPoint) const
+TQPoint kpView::mouseViewPointRelativeToSelection (const TQPoint &viewPoint) const
{
if (!selection ())
return KP_INVALID_POINT;
@@ -662,9 +662,9 @@ QPoint kpView::mouseViewPointRelativeToSelection (const QPoint &viewPoint) const
}
// public
-bool kpView::mouseOnSelection (const QPoint &viewPoint) const
+bool kpView::mouseOnSelection (const TQPoint &viewPoint) const
{
- const QRect selViewRect = selectionViewRect ();
+ const TQRect selViewRect = selectionViewRect ();
if (!selViewRect.isValid ())
return false;
@@ -682,7 +682,7 @@ int kpView::textSelectionMoveBorderAtomicSize () const
}
// public
-bool kpView::mouseOnSelectionToMove (const QPoint &viewPoint) const
+bool kpView::mouseOnSelectionToMove (const TQPoint &viewPoint) const
{
if (!mouseOnSelection (viewPoint))
return false;
@@ -694,10 +694,10 @@ bool kpView::mouseOnSelectionToMove (const QPoint &viewPoint) const
return false;
- const QPoint viewPointRelSel = mouseViewPointRelativeToSelection (viewPoint);
+ const TQPoint viewPointRelSel = mouseViewPointRelativeToSelection (viewPoint);
// Middle point should always be selectable
- const QPoint selCenterDocPoint = selection ()->boundingRect ().center ();
+ const TQPoint selCenterDocPoint = selection ()->boundingRect ().center ();
if (tool () &&
tool ()->currentPoint () == selCenterDocPoint)
{
@@ -706,7 +706,7 @@ bool kpView::mouseOnSelectionToMove (const QPoint &viewPoint) const
const int atomicSize = textSelectionMoveBorderAtomicSize ();
- const QRect selViewRect = selectionViewRect ();
+ const TQRect selViewRect = selectionViewRect ();
return (viewPointRelSel.x () < atomicSize ||
viewPointRelSel.x () >= selViewRect.width () - atomicSize ||
@@ -721,7 +721,7 @@ bool kpView::selectionLargeEnoughToHaveResizeHandlesIfAtomicSize (int atomicSize
if (!selection ())
return false;
- const QRect selViewRect = selectionViewRect ();
+ const TQRect selViewRect = selectionViewRect ();
return (selViewRect.width () >= atomicSize * 5 ||
selViewRect.height () >= atomicSize * 5);
@@ -747,13 +747,13 @@ bool kpView::selectionLargeEnoughToHaveResizeHandles () const
}
// public
-QRegion kpView::selectionResizeHandlesViewRegion (bool forRenderer) const
+TQRegion kpView::selectionResizeHandlesViewRegion (bool forRenderer) const
{
- QRegion ret;
+ TQRegion ret;
const int atomicLength = selectionResizeHandleAtomicSize ();
if (atomicLength <= 0)
- return QRegion ();
+ return TQRegion ();
// HACK: At low zoom (e.g. 100%), resize handles will probably be too
@@ -790,10 +790,10 @@ QRegion kpView::selectionResizeHandlesViewRegion (bool forRenderer) const
}
- const QRect selViewRect = selectionViewRect ();
+ const TQRect selViewRect = selectionViewRect ();
#define ADD_BOX_RELATIVE_TO_SELECTION(type,x,y) \
- ret += QRect ((x), (y), type##AtomicLength, type##AtomicLength)
+ ret += TQRect ((x), (y), type##AtomicLength, type##AtomicLength)
ADD_BOX_RELATIVE_TO_SELECTION (normal,
selViewRect.width () - normalAtomicLength,
@@ -830,7 +830,7 @@ QRegion kpView::selectionResizeHandlesViewRegion (bool forRenderer) const
}
// public
-int kpView::mouseOnSelectionResizeHandle (const QPoint &viewPoint) const
+int kpView::mouseOnSelectionResizeHandle (const TQPoint &viewPoint) const
{
#if DEBUG_KP_VIEW
kdDebug () << "kpView::mouseOnSelectionResizeHandle(viewPoint="
@@ -846,7 +846,7 @@ int kpView::mouseOnSelectionResizeHandle (const QPoint &viewPoint) const
}
- const QRect selViewRect = selectionViewRect ();
+ const TQRect selViewRect = selectionViewRect ();
#if DEBUG_KP_VIEW
kdDebug () << "\tselViewRect=" << selViewRect << endl;
#endif
@@ -867,14 +867,14 @@ int kpView::mouseOnSelectionResizeHandle (const QPoint &viewPoint) const
}
- const QPoint viewPointRelSel = mouseViewPointRelativeToSelection (viewPoint);
+ const TQPoint viewPointRelSel = mouseViewPointRelativeToSelection (viewPoint);
#if DEBUG_KP_VIEW
kdDebug () << "\tviewPointRelSel=" << viewPointRelSel << endl;
#endif
#define LOCAL_POINT_IN_BOX_AT(x,y) \
- QRect ((x), (y), atomicLength, atomicLength).contains (viewPointRelSel)
+ TQRect ((x), (y), atomicLength, atomicLength).contains (viewPointRelSel)
// Favour the bottom & right and the corners.
if (LOCAL_POINT_IN_BOX_AT (selViewRect.width () - atomicLength,
@@ -923,7 +923,7 @@ int kpView::mouseOnSelectionResizeHandle (const QPoint &viewPoint) const
}
// public
-bool kpView::mouseOnSelectionToSelectText (const QPoint &viewPoint) const
+bool kpView::mouseOnSelectionToSelectText (const TQPoint &viewPoint) const
{
#if DEBUG_KP_VIEW
kdDebug () << "kpView::mouseOnSelectionToSelectText(viewPoint="
@@ -958,7 +958,7 @@ bool kpView::mouseOnSelectionToSelectText (const QPoint &viewPoint) const
// protected virtual [base QWidget]
-void kpView::mouseMoveEvent (QMouseEvent *e)
+void kpView::mouseMoveEvent (TQMouseEvent *e)
{
#if DEBUG_KP_VIEW && 0
kdDebug () << "kpView(" << name () << ")::mouseMoveEvent ("
@@ -978,7 +978,7 @@ void kpView::mouseMoveEvent (QMouseEvent *e)
}
// protected virtual [base QWidget]
-void kpView::mousePressEvent (QMouseEvent *e)
+void kpView::mousePressEvent (TQMouseEvent *e)
{
#if DEBUG_KP_VIEW && 0
kdDebug () << "kpView(" << name () << ")::mousePressEvent ("
@@ -995,7 +995,7 @@ void kpView::mousePressEvent (QMouseEvent *e)
}
// protected virtual [base QWidget]
-void kpView::mouseReleaseEvent (QMouseEvent *e)
+void kpView::mouseReleaseEvent (TQMouseEvent *e)
{
#if DEBUG_KP_VIEW && 0
kdDebug () << "kpView(" << name () << ")::mouseReleaseEvent ("
@@ -1012,7 +1012,7 @@ void kpView::mouseReleaseEvent (QMouseEvent *e)
}
// public virtual [base QWidget]
-void kpView::wheelEvent (QWheelEvent *e)
+void kpView::wheelEvent (TQWheelEvent *e)
{
if (tool ())
tool ()->wheelEvent (e);
@@ -1020,7 +1020,7 @@ void kpView::wheelEvent (QWheelEvent *e)
// protected virtual [base QWidget]
-void kpView::keyPressEvent (QKeyEvent *e)
+void kpView::keyPressEvent (TQKeyEvent *e)
{
#if DEBUG_KP_VIEW && 0
kdDebug () << "kpView(" << name () << ")::keyPressEvent()" << endl;
@@ -1033,7 +1033,7 @@ void kpView::keyPressEvent (QKeyEvent *e)
}
// protected virtual [base QWidget]
-void kpView::keyReleaseEvent (QKeyEvent *e)
+void kpView::keyReleaseEvent (TQKeyEvent *e)
{
#if DEBUG_KP_VIEW && 0
kdDebug () << "kpView(" << name () << ")::keyReleaseEvent()" << endl;
@@ -1047,7 +1047,7 @@ void kpView::keyReleaseEvent (QKeyEvent *e)
// protected virtual [base QWidget]
-void kpView::focusInEvent (QFocusEvent *e)
+void kpView::focusInEvent (TQFocusEvent *e)
{
#if DEBUG_KP_VIEW && 0
kdDebug () << "kpView(" << name () << ")::focusInEvent()" << endl;
@@ -1057,7 +1057,7 @@ void kpView::focusInEvent (QFocusEvent *e)
}
// protected virtual [base QWidget]
-void kpView::focusOutEvent (QFocusEvent *e)
+void kpView::focusOutEvent (TQFocusEvent *e)
{
#if DEBUG_KP_VIEW && 0
kdDebug () << "kpView(" << name () << ")::focusOutEvent()" << endl;
@@ -1068,7 +1068,7 @@ void kpView::focusOutEvent (QFocusEvent *e)
// protected virtual [base QWidget]
-void kpView::enterEvent (QEvent *e)
+void kpView::enterEvent (TQEvent *e)
{
#if DEBUG_KP_VIEW && 0
kdDebug () << "kpView(" << name () << ")::enterEvent()" << endl;
@@ -1090,7 +1090,7 @@ void kpView::enterEvent (QEvent *e)
}
// protected virtual [base QWidget]
-void kpView::leaveEvent (QEvent *e)
+void kpView::leaveEvent (TQEvent *e)
{
#if DEBUG_KP_VIEW && 0
kdDebug () << "kpView(" << name () << ")::leaveEvent()" << endl;
@@ -1103,7 +1103,7 @@ void kpView::leaveEvent (QEvent *e)
// protected virtual [base QWidget]
-void kpView::dragEnterEvent (QDragEnterEvent *)
+void kpView::dragEnterEvent (TQDragEnterEvent *)
{
#if DEBUG_KP_VIEW && 1
kdDebug () << "kpView(" << name () << ")::dragEnterEvent()" << endl;
@@ -1113,7 +1113,7 @@ void kpView::dragEnterEvent (QDragEnterEvent *)
}
// protected virtual [base QWidget]
-void kpView::dragLeaveEvent (QDragLeaveEvent *)
+void kpView::dragLeaveEvent (TQDragLeaveEvent *)
{
#if DEBUG_KP_VIEW && 1
kdDebug () << "kpView(" << name () << ")::dragLeaveEvent" << endl;
@@ -1132,11 +1132,11 @@ void kpView::resize (int w, int h)
<< endl;
#endif
- QWidget::resize (w, h);
+ TQWidget::resize (w, h);
}
// protected virtual [base QWidget]
-void kpView::resizeEvent (QResizeEvent *e)
+void kpView::resizeEvent (TQResizeEvent *e)
{
#if DEBUG_KP_VIEW && 1
kdDebug () << "kpView(" << name () << ")::resizeEvent("
@@ -1145,7 +1145,7 @@ void kpView::resizeEvent (QResizeEvent *e)
<< ") old=" << e->oldSize () << endl;
#endif
- QWidget::resizeEvent (e);
+ TQWidget::resizeEvent (e);
emit sizeChanged (width (), height ());
emit sizeChanged (size ());
@@ -1153,7 +1153,7 @@ void kpView::resizeEvent (QResizeEvent *e)
// private virtual
-void kpView::imStartEvent (QIMEvent *e)
+void kpView::imStartEvent (TQIMEvent *e)
{
#if DEBUG_KP_VIEW && 1
kdDebug () << "kpView(" << name () << ")::imStartEvent" << endl;
@@ -1165,7 +1165,7 @@ void kpView::imStartEvent (QIMEvent *e)
}
// private virtual
-void kpView::imComposeEvent (QIMEvent *e)
+void kpView::imComposeEvent (TQIMEvent *e)
{
#if DEBUG_KP_VIEW && 1
kdDebug () << "kpView(" << name () << ")::imComposeEvent" << endl;
@@ -1177,7 +1177,7 @@ void kpView::imComposeEvent (QIMEvent *e)
}
// private virtual
-void kpView::imEndEvent (QIMEvent *e)
+void kpView::imEndEvent (TQIMEvent *e)
{
#if DEBUG_KP_VIEW && 1
kdDebug () << "kpView(" << name () << ")::imEndEvent" << endl;
@@ -1194,13 +1194,13 @@ void kpView::imEndEvent (QIMEvent *e)
//
// protected
-QRect kpView::paintEventGetDocRect (const QRect &viewRect) const
+TQRect kpView::paintEventGetDocRect (const TQRect &viewRect) const
{
#if DEBUG_KP_VIEW_RENDERER && 1
kdDebug () << "kpView::paintEventGetDocRect(" << viewRect << ")" << endl;
#endif
- QRect docRect;
+ TQRect docRect;
// From the "we aren't sure whether to round up or round down" department:
@@ -1210,7 +1210,7 @@ QRect kpView::paintEventGetDocRect (const QRect &viewRect) const
{
// think of a grid - you need to fully cover the zoomed-in pixels
// when docRect is zoomed back to the view later
- docRect = QRect (transformViewToDoc (viewRect.topLeft ()), // round down
+ docRect = TQRect (transformViewToDoc (viewRect.topLeft ()), // round down
transformViewToDoc (viewRect.bottomRight ())); // round down
}
@@ -1220,7 +1220,7 @@ QRect kpView::paintEventGetDocRect (const QRect &viewRect) const
// - helpful because it ensures we at least cover the required area
// at e.g. 67% or 573%
// - harmless since paintEventDrawRect() clips for us anyway
- docRect.setBottomRight (docRect.bottomRight () + QPoint (2, 2));
+ docRect.setBottomRight (docRect.bottomRight () + TQPoint (2, 2));
}
#if DEBUG_KP_VIEW_RENDERER && 1
@@ -1239,9 +1239,9 @@ QRect kpView::paintEventGetDocRect (const QRect &viewRect) const
}
// public
-void kpView::drawTransparentBackground (QPainter *painter,
+void kpView::drawTransparentBackground (TQPainter *painter,
int /*viewWidth*/, int /*viewHeight*/,
- const QRect &rect,
+ const TQRect &rect,
bool isPreview)
{
const int cellSize = !isPreview ? 16 : 10;
@@ -1260,14 +1260,14 @@ void kpView::drawTransparentBackground (QPainter *painter,
for (int x = startx; x <= rect.right (); x += cellSize)
{
bool parity = (x / cellSize + y / cellSize) % 2;
- QColor col;
+ TQColor col;
if (parity)
{
if (!isPreview)
- col = QColor (213, 213, 213);
+ col = TQColor (213, 213, 213);
else
- col = QColor (224, 224, 224);
+ col = TQColor (224, 224, 224);
}
else
col = Qt::white;
@@ -1280,7 +1280,7 @@ void kpView::drawTransparentBackground (QPainter *painter,
}
// protected
-void kpView::paintEventDrawCheckerBoard (QPainter *painter, const QRect &viewRect)
+void kpView::paintEventDrawCheckerBoard (TQPainter *painter, const TQRect &viewRect)
{
kpDocument *doc = document ();
if (!doc)
@@ -1293,7 +1293,7 @@ void kpView::paintEventDrawCheckerBoard (QPainter *painter, const QRect &viewRec
}
// protected
-void kpView::paintEventDrawSelection (QPixmap *destPixmap, const QRect &docRect)
+void kpView::paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRect)
{
#if DEBUG_KP_VIEW_RENDERER && 1
kdDebug () << "kpView::paintEventDrawSelection() docRect=" << docRect << endl;
@@ -1339,15 +1339,15 @@ void kpView::paintEventDrawSelection (QPixmap *destPixmap, const QRect &docRect)
#endif
if (vm->selectionBorderVisible ())
{
- QPainter destPixmapPainter (destPixmap);
+ TQPainter destPixmapPainter (destPixmap);
destPixmapPainter.setRasterOp (Qt::XorROP);
- destPixmapPainter.setPen (QPen (Qt::white, 1, Qt::DotLine));
+ destPixmapPainter.setPen (TQPen (Qt::white, 1, Qt::DotLine));
- destPixmapPainter.setBackgroundMode (QPainter::OpaqueMode);
+ destPixmapPainter.setBackgroundMode (TQPainter::OpaqueMode);
destPixmapPainter.setBackgroundColor (Qt::blue);
- QBitmap maskBitmap;
- QPainter maskBitmapPainter;
+ TQBitmap maskBitmap;
+ TQPainter maskBitmapPainter;
if (destPixmap->mask ())
{
maskBitmap = *destPixmap->mask ();
@@ -1363,7 +1363,7 @@ void kpView::paintEventDrawSelection (QPixmap *destPixmap, const QRect &docRect)
maskBitmapPainter . cmd; \
}
- QRect boundingRect = sel->boundingRect ();
+ TQRect boundingRect = sel->boundingRect ();
#if DEBUG_KP_VIEW_RENDERER && 1
kdDebug () << "\tsel boundingRect="
<< boundingRect
@@ -1405,7 +1405,7 @@ void kpView::paintEventDrawSelection (QPixmap *destPixmap, const QRect &docRect)
#if DEBUG_KP_VIEW_RENDERER
kdDebug () << "\tselection border = freeForm" << endl;
#endif
- QPointArray points = sel->points ();
+ TQPointArray points = sel->points ();
points.detach ();
points.translate (-docRect.x (), -docRect.y ());
if (vm->selectionBorderFinished ())
@@ -1470,18 +1470,18 @@ void kpView::paintEventDrawSelection (QPixmap *destPixmap, const QRect &docRect)
!vm->activeView ())) // sync: call will break when vm is not held by 1 mainWindow
{
// TODO: Fix code duplication: kpViewManager::{setTextCursorPosition,updateTextCursor}() & kpView::paintEventDrawSelection()
- QPoint topLeft = sel->pointForTextRowCol (vm->textCursorRow (), vm->textCursorCol ());
+ TQPoint topLeft = sel->pointForTextRowCol (vm->textCursorRow (), vm->textCursorCol ());
if (topLeft != KP_INVALID_POINT)
{
- QRect rect = QRect (topLeft.x (), topLeft.y (),
+ TQRect rect = TQRect (topLeft.x (), topLeft.y (),
1, sel->textStyle ().fontMetrics ().height ());
rect = rect.intersect (sel->textAreaRect ());
if (!rect.isEmpty ())
{
rect.moveBy (-docRect.x (), -docRect.y ());
- QBitmap maskBitmap;
- QPainter destPixmapPainter, maskBitmapPainter;
+ TQBitmap maskBitmap;
+ TQPainter destPixmapPainter, maskBitmapPainter;
if (destPixmap->mask ())
{
@@ -1510,7 +1510,7 @@ bool kpView::selectionResizeHandleAtomicSizeCloseToZoomLevel () const
}
// protected
-void kpView::paintEventDrawSelectionResizeHandles (QPainter *painter, const QRect &viewRect)
+void kpView::paintEventDrawSelectionResizeHandles (TQPainter *painter, const TQRect &viewRect)
{
#if DEBUG_KP_VIEW_RENDERER && 1
kdDebug () << "kpView::paintEventDrawSelectionResizeHandles("
@@ -1535,7 +1535,7 @@ void kpView::paintEventDrawSelectionResizeHandles (QPainter *painter, const QRec
return;
}
- const QRect selViewRect = selectionViewRect ();
+ const TQRect selViewRect = selectionViewRect ();
#if DEBUG_KP_VIEW_RENDERER && 1
kdDebug () << "\tselViewRect=" << selViewRect << endl;
#endif
@@ -1547,7 +1547,7 @@ void kpView::paintEventDrawSelectionResizeHandles (QPainter *painter, const QRec
return;
}
- QRegion selResizeHandlesRegion = selectionResizeHandlesViewRegion (true/*for renderer*/);
+ TQRegion selResizeHandlesRegion = selectionResizeHandlesViewRegion (true/*for renderer*/);
#if DEBUG_KP_VIEW_RENDERER && 1
kdDebug () << "\tsel resize handles view region="
<< selResizeHandlesRegion << endl;
@@ -1556,7 +1556,7 @@ void kpView::paintEventDrawSelectionResizeHandles (QPainter *painter, const QRec
painter->save ();
- QColor fillColor;
+ TQColor fillColor;
if (selectionResizeHandleAtomicSizeCloseToZoomLevel ())
{
fillColor = Qt::blue;
@@ -1568,8 +1568,8 @@ void kpView::paintEventDrawSelectionResizeHandles (QPainter *painter, const QRec
painter->setRasterOp (Qt::XorROP);
}
- QMemArray <QRect> rects = selResizeHandlesRegion.rects ();
- for (QMemArray <QRect>::ConstIterator it = rects.begin ();
+ TQMemArray <TQRect> rects = selResizeHandlesRegion.rects ();
+ for (TQMemArray <TQRect>::ConstIterator it = rects.begin ();
it != rects.end ();
it++)
{
@@ -1580,7 +1580,7 @@ void kpView::paintEventDrawSelectionResizeHandles (QPainter *painter, const QRec
}
// protected
-void kpView::paintEventDrawTempPixmap (QPixmap *destPixmap, const QRect &docRect)
+void kpView::paintEventDrawTempPixmap (TQPixmap *destPixmap, const TQRect &docRect)
{
kpViewManager *vm = viewManager ();
if (!vm)
@@ -1602,13 +1602,13 @@ void kpView::paintEventDrawTempPixmap (QPixmap *destPixmap, const QRect &docRect
}
// protected
-void kpView::paintEventDrawGridLines (QPainter *painter, const QRect &viewRect)
+void kpView::paintEventDrawGridLines (TQPainter *painter, const TQRect &viewRect)
{
int hzoomMultiple = zoomLevelX () / 100;
int vzoomMultiple = zoomLevelY () / 100;
- QPen ordinaryPen (Qt::gray);
- QPen tileBoundaryPen (Qt::lightGray);
+ TQPen ordinaryPen (Qt::gray);
+ TQPen tileBoundaryPen (Qt::lightGray);
painter->setPen (ordinaryPen);
@@ -1658,7 +1658,7 @@ void kpView::paintEventDrawGridLines (QPainter *painter, const QRect &viewRect)
}
-void kpView::paintEventDrawRect (const QRect &viewRect)
+void kpView::paintEventDrawRect (const TQRect &viewRect)
{
#if DEBUG_KP_VIEW_RENDERER
kdDebug () << "\tkpView::paintEventDrawRect(viewRect=" << viewRect
@@ -1676,7 +1676,7 @@ void kpView::paintEventDrawRect (const QRect &viewRect)
return;
- QRect docRect = paintEventGetDocRect (viewRect);
+ TQRect docRect = paintEventGetDocRect (viewRect);
#if DEBUG_KP_VIEW_RENDERER && 1
kdDebug () << "\tdocRect=" << docRect << endl;
@@ -1684,7 +1684,7 @@ void kpView::paintEventDrawRect (const QRect &viewRect)
// uncomment to cause deliberate flicker (identifies needless updates)
#if DEBUG_KP_VIEW_RENDERER && 0
- QPainter flickerPainter (this);
+ TQPainter flickerPainter (this);
flickerPainter.fillRect (viewRect, Qt::red);
flickerPainter.end ();
#endif
@@ -1700,13 +1700,13 @@ void kpView::paintEventDrawRect (const QRect &viewRect)
d->m_backBuffer->width () > width () ||
d->m_backBuffer->height () > height ())
{
- // don't use QPixmap::resize() as that wastes time copying pixels
+ // don't use TQPixmap::resize() as that wastes time copying pixels
// that will be overwritten anyway
//
// OPT: Should use doubling trick or at least go up in multiples
// to reduce X server pressure.
delete d->m_backBuffer;
- d->m_backBuffer = new QPixmap (viewRect.width (), viewRect.height ());
+ d->m_backBuffer = new TQPixmap (viewRect.width (), viewRect.height ());
}
// uncomment to catch bits of the view that the renderer forgot to update
@@ -1714,7 +1714,7 @@ void kpView::paintEventDrawRect (const QRect &viewRect)
d->m_backBuffer->fill (Qt::green);
#endif
- QPainter backBufferPainter;
+ TQPainter backBufferPainter;
backBufferPainter.begin (d->m_backBuffer);
@@ -1722,7 +1722,7 @@ void kpView::paintEventDrawRect (const QRect &viewRect)
// Draw checkboard for transparent images and/or views with borders
//
- QPixmap docPixmap;
+ TQPixmap docPixmap;
bool tempPixmapWillBeRendered = false;
@@ -1784,7 +1784,7 @@ void kpView::paintEventDrawRect (const QRect &viewRect)
#endif
// blit scaled version of docPixmap + tempPixmap onto Back Buffer
#if DEBUG_KP_VIEW_RENDERER && 1
- QTime scaleTimer; scaleTimer.start ();
+ TQTime scaleTimer; scaleTimer.start ();
#endif
backBufferPainter.translate (origin ().x () - viewRect.x (),
origin ().y () - viewRect.y ());
@@ -1806,7 +1806,7 @@ void kpView::paintEventDrawRect (const QRect &viewRect)
if (isGridShown ())
{
#if DEBUG_KP_VIEW_RENDERER && 1
- QTime gridTimer; gridTimer.start ();
+ TQTime gridTimer; gridTimer.start ();
#endif
paintEventDrawGridLines (&backBufferPainter, viewRect);
#if DEBUG_KP_VIEW_RENDERER && 1
@@ -1815,7 +1815,7 @@ void kpView::paintEventDrawRect (const QRect &viewRect)
}
- const QRect bvsvRect = buddyViewScrollableContainerRectangle ();
+ const TQRect bvsvRect = buddyViewScrollableContainerRectangle ();
if (!bvsvRect.isEmpty ())
{
backBufferPainter.save ();
@@ -1846,19 +1846,19 @@ void kpView::paintEventDrawRect (const QRect &viewRect)
backBufferPainter.end ();
bitBlt (this, viewRect.topLeft (),
- d->m_backBuffer, QRect (0, 0, viewRect.width (), viewRect.height ()));
+ d->m_backBuffer, TQRect (0, 0, viewRect.width (), viewRect.height ()));
}
// protected virtual [base QWidget]
-void kpView::paintEvent (QPaintEvent *e)
+void kpView::paintEvent (TQPaintEvent *e)
{
// sync: kpViewPrivate
// WARNING: document(), viewManager() and friends might be 0 in this method.
// TODO: I'm not 100% convinced that we always check if their friends are 0.
#if DEBUG_KP_VIEW_RENDERER && 1
- QTime timer;
+ TQTime timer;
timer.start ();
#endif
@@ -1870,7 +1870,7 @@ void kpView::paintEvent (QPaintEvent *e)
<< " fastUpdates=" << (vm && vm->fastUpdates ())
<< " viewRect=" << e->rect ()
<< " erased=" << e->erased ()
- << " topLeft=" << QPoint (x (), y ())
+ << " topLeft=" << TQPoint (x (), y ())
<< endl;
#endif
@@ -1887,13 +1887,13 @@ void kpView::paintEvent (QPaintEvent *e)
}
- QRegion viewRegion = clipRegion ().intersect (e->region ());
- QMemArray <QRect> rects = viewRegion.rects ();
+ TQRegion viewRegion = clipRegion ().intersect (e->region ());
+ TQMemArray <TQRect> rects = viewRegion.rects ();
#if DEBUG_KP_VIEW_RENDERER && 1
kdDebug () << "\t#rects = " << rects.count () << endl;
#endif
- for (QMemArray <QRect>::ConstIterator it = rects.begin ();
+ for (TQMemArray <TQRect>::ConstIterator it = rects.begin ();
it != rects.end ();
it++)
{
diff --git a/kolourpaint/kpview.h b/kolourpaint/kpview.h
index 0bf8c495..6464d869 100644
--- a/kolourpaint/kpview.h
+++ b/kolourpaint/kpview.h
@@ -30,7 +30,7 @@
#define KP_VIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kpdefs.h>
@@ -80,7 +80,7 @@ public:
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- QWidget *parent, const char *name);
+ TQWidget *parent, const char *name);
/**
* Destructs this view. Informs the viewManager() that the mouse
@@ -159,7 +159,7 @@ public:
* @returns in views coordinates, where the top-left document() pixel
* will be rendered (default: (0,0)).
*/
- QPoint origin () const;
+ TQPoint origin () const;
/**
* Sets the origin.
@@ -168,7 +168,7 @@ public:
*
* If reimplementing, you must call this base implementation.
*/
- virtual void setOrigin (const QPoint &origin);
+ virtual void setOrigin (const TQPoint &origin);
/**
@@ -210,7 +210,7 @@ protected:
* visible through buddyViewScrollableContainer(), that is being
* rendered by this view.
*/
- QRect buddyViewScrollableContainerRectangle () const;
+ TQRect buddyViewScrollableContainerRectangle () const;
protected slots:
/**
@@ -248,7 +248,7 @@ public:
* @returns viewPoint transformed to document coordinates, based on the
* origin(), zoomLevelX() and zoomLevelY().
*/
- QPoint transformViewToDoc (const QPoint &viewPoint) const;
+ TQPoint transformViewToDoc (const TQPoint &viewPoint) const;
/**
* @param viewRect Rectangle in view coordinates.
@@ -258,9 +258,9 @@ public:
*
* For bounding rectangles, you should use this function instead of
* transformViewToDocX(), transformViewToDocY() or
- * transformViewToDoc(const QPoint &) which act on coordinates only.
+ * transformViewToDoc(const TQPoint &) which act on coordinates only.
*/
- QRect transformViewToDoc (const QRect &viewRect) const;
+ TQRect transformViewToDoc (const TQRect &viewRect) const;
/**
@@ -285,7 +285,7 @@ public:
* @returns docPoint transformed to view coordinates, based on the
* origin(), zoomLevelX(), zoomLevelY().
*/
- QPoint transformDocToView (const QPoint &docPoint) const;
+ TQPoint transformDocToView (const TQPoint &docPoint) const;
/**
* @param docRect Rectangle in document coordinates.
@@ -295,9 +295,9 @@ public:
*
* For bounding rectangles, you should use this function instead of
* transformDocToViewX(), transformDocToViewY() or
- * transformDocToView(const QPoint &) which act on coordinates only.
+ * transformDocToView(const TQPoint &) which act on coordinates only.
*/
- QRect transformDocToView (const QRect &docRect) const;
+ TQRect transformDocToView (const TQRect &docRect) const;
/**
@@ -310,7 +310,7 @@ public:
* zoomLevelX() and zoomLevelY(). This has less rounding
* error than otherView->transformDocToView (transformViewToDoc (viewPoint)).
*/
- QPoint transformViewToOtherView (const QPoint &viewPoint,
+ TQPoint transformViewToOtherView (const TQPoint &viewPoint,
const kpView *otherView);
@@ -348,7 +348,7 @@ public:
*
* @param region Region (in view coordinates) that needs repainting.
*/
- void addToQueuedArea (const QRegion &region);
+ void addToQueuedArea (const TQRegion &region);
/**
* Convenience function. Same as above.
@@ -359,7 +359,7 @@ public:
*
* @param rect Rectangle (in view coordinates) that needs repainting.
*/
- void addToQueuedArea (const QRect &rect);
+ void addToQueuedArea (const TQRect &rect);
/**
* Removes the dirty region that has been queued for updating.
@@ -374,7 +374,7 @@ public:
*/
void updateQueuedArea ();
- void updateMicroFocusHint (const QRect &microFocusHint);
+ void updateMicroFocusHint (const TQRect &microFocusHint);
public slots:
@@ -395,16 +395,16 @@ public slots:
public:
- QRect selectionViewRect () const;
+ TQRect selectionViewRect () const;
- // (if <viewPoint> is KP_INVALID_POINT, it uses QCursor::pos())
+ // (if <viewPoint> is KP_INVALID_POINT, it uses TQCursor::pos())
- QPoint mouseViewPoint (const QPoint &returnViewPoint = KP_INVALID_POINT) const;
- QPoint mouseViewPointRelativeToSelection (const QPoint &viewPoint = KP_INVALID_POINT) const;
- bool mouseOnSelection (const QPoint &viewPoint = KP_INVALID_POINT) const;
+ TQPoint mouseViewPoint (const TQPoint &returnViewPoint = KP_INVALID_POINT) const;
+ TQPoint mouseViewPointRelativeToSelection (const TQPoint &viewPoint = KP_INVALID_POINT) const;
+ bool mouseOnSelection (const TQPoint &viewPoint = KP_INVALID_POINT) const;
int textSelectionMoveBorderAtomicSize () const;
- bool mouseOnSelectionToMove (const QPoint &viewPoint = KP_INVALID_POINT) const;
+ bool mouseOnSelectionToMove (const TQPoint &viewPoint = KP_INVALID_POINT) const;
protected:
bool selectionLargeEnoughToHaveResizeHandlesIfAtomicSize (int atomicSize) const;
@@ -412,7 +412,7 @@ public:
int selectionResizeHandleAtomicSize () const;
bool selectionLargeEnoughToHaveResizeHandles () const;
- QRegion selectionResizeHandlesViewRegion (bool forRenderer = false) const;
+ TQRegion selectionResizeHandlesViewRegion (bool forRenderer = false) const;
enum SelectionResizeType
{
@@ -424,9 +424,9 @@ public:
};
// Returns a bitwise OR of the SelectionResizeType's
- int mouseOnSelectionResizeHandle (const QPoint &viewPoint = KP_INVALID_POINT) const;
+ int mouseOnSelectionResizeHandle (const TQPoint &viewPoint = KP_INVALID_POINT) const;
- bool mouseOnSelectionToSelectText (const QPoint &viewPoint = KP_INVALID_POINT) const;
+ bool mouseOnSelectionToSelectText (const TQPoint &viewPoint = KP_INVALID_POINT) const;
signals:
@@ -443,7 +443,7 @@ signals:
*
* @param size New view size.
*/
- void sizeChanged (const QSize &size);
+ void sizeChanged (const TQSize &size);
/**
* Convenience signal - same as above.
@@ -460,42 +460,42 @@ signals:
*
* @param origin The new origin.
*/
- void originChanged (const QPoint &origin);
+ void originChanged (const TQPoint &origin);
protected:
- virtual void mouseMoveEvent (QMouseEvent *e);
- virtual void mousePressEvent (QMouseEvent *e);
- virtual void mouseReleaseEvent (QMouseEvent *e);
+ virtual void mouseMoveEvent (TQMouseEvent *e);
+ virtual void mousePressEvent (TQMouseEvent *e);
+ virtual void mouseReleaseEvent (TQMouseEvent *e);
public:
// (needs to be public as it may also get event from
- // QScrollView::contentsWheelEvent())
- virtual void wheelEvent (QWheelEvent *e);
+ // TQScrollView::contentsWheelEvent())
+ virtual void wheelEvent (TQWheelEvent *e);
protected:
- virtual void keyPressEvent (QKeyEvent *e);
- virtual void keyReleaseEvent (QKeyEvent *e);
+ virtual void keyPressEvent (TQKeyEvent *e);
+ virtual void keyReleaseEvent (TQKeyEvent *e);
- virtual void focusInEvent (QFocusEvent *e);
- virtual void focusOutEvent (QFocusEvent *e);
+ virtual void focusInEvent (TQFocusEvent *e);
+ virtual void focusOutEvent (TQFocusEvent *e);
- virtual void enterEvent (QEvent *e);
- virtual void leaveEvent (QEvent *e);
+ virtual void enterEvent (TQEvent *e);
+ virtual void leaveEvent (TQEvent *e);
- virtual void dragEnterEvent (QDragEnterEvent *);
- virtual void dragLeaveEvent (QDragLeaveEvent *);
+ virtual void dragEnterEvent (TQDragEnterEvent *);
+ virtual void dragLeaveEvent (TQDragLeaveEvent *);
- virtual void imStartEvent (QIMEvent *e);
- virtual void imComposeEvent (QIMEvent *e);
- virtual void imEndEvent (QIMEvent *e);
+ virtual void imStartEvent (TQIMEvent *e);
+ virtual void imComposeEvent (TQIMEvent *e);
+ virtual void imEndEvent (TQIMEvent *e);
public:
virtual void resize (int w, int h);
protected:
- virtual void resizeEvent (QResizeEvent *e);
+ virtual void resizeEvent (TQResizeEvent *e);
protected:
- QRect paintEventGetDocRect (const QRect &viewRect) const;
+ TQRect paintEventGetDocRect (const TQRect &viewRect) const;
public:
/**
* Draws an opaque background representing transparency. Currently,
@@ -511,20 +511,20 @@ public:
* e.g. editing. If set, this function may render
* slightly differently.
*/
- static void drawTransparentBackground (QPainter *painter,
+ static void drawTransparentBackground (TQPainter *painter,
int viewWidth, int viewHeight,
- const QRect &rect,
+ const TQRect &rect,
bool isPreview = false);
protected:
- void paintEventDrawCheckerBoard (QPainter *painter, const QRect &viewRect);
- void paintEventDrawSelection (QPixmap *destPixmap, const QRect &docRect);
+ void paintEventDrawCheckerBoard (TQPainter *painter, const TQRect &viewRect);
+ void paintEventDrawSelection (TQPixmap *destPixmap, const TQRect &docRect);
bool selectionResizeHandleAtomicSizeCloseToZoomLevel () const;
- void paintEventDrawSelectionResizeHandles (QPainter *painter, const QRect &viewRect);
- void paintEventDrawTempPixmap (QPixmap *destPixmap, const QRect &docRect);
- void paintEventDrawGridLines (QPainter *painter, const QRect &viewRect);
+ void paintEventDrawSelectionResizeHandles (TQPainter *painter, const TQRect &viewRect);
+ void paintEventDrawTempPixmap (TQPixmap *destPixmap, const TQRect &docRect);
+ void paintEventDrawGridLines (TQPainter *painter, const TQRect &viewRect);
- void paintEventDrawRect (const QRect &viewRect);
- virtual void paintEvent (QPaintEvent *e);
+ void paintEventDrawRect (const TQRect &viewRect);
+ virtual void paintEvent (TQPaintEvent *e);
private:
diff --git a/kolourpaint/kpviewmanager.cpp b/kolourpaint/kpviewmanager.cpp
index d649f359..acff3413 100644
--- a/kolourpaint/kpviewmanager.cpp
+++ b/kolourpaint/kpviewmanager.cpp
@@ -31,8 +31,8 @@
#include <kpviewmanager.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#include <kdebug.h>
@@ -130,7 +130,7 @@ void kpViewManager::setTempPixmap (const kpTempPixmap &tempPixmap)
<< ")" << endl;
#endif
- QRect oldRect;
+ TQRect oldRect;
if (m_tempPixmap)
{
@@ -157,7 +157,7 @@ void kpViewManager::invalidateTempPixmap ()
if (!m_tempPixmap)
return;
- QRect oldRect = m_tempPixmap->rect ();
+ TQRect oldRect = m_tempPixmap->rect ();
delete m_tempPixmap;
m_tempPixmap = 0;
@@ -228,9 +228,9 @@ void kpViewManager::setTextCursorEnabled (bool yes)
if (yes)
{
- m_textCursorBlinkTimer = new QTimer (this);
- connect (m_textCursorBlinkTimer, SIGNAL (timeout ()),
- this, SLOT (slotTextCursorBlink ()));
+ m_textCursorBlinkTimer = new TQTimer (this);
+ connect (m_textCursorBlinkTimer, TQT_SIGNAL (timeout ()),
+ this, TQT_SLOT (slotTextCursorBlink ()));
slotTextCursorBlink ();
}
// TODO: What if !yes - shouldn't it clear the cursor?
@@ -353,7 +353,7 @@ void kpViewManager::setTextCursorPosition (int row, int col, bool isUpdateMicroF
if (m_viewUnderCursor)
{
// TODO: Fix code duplication: kpViewManager::{setTextCursorPosition,updateTextCursor}() & kpView::paintEventDrawSelection()
- QPoint topLeft = sel->pointForTextRowCol (m_textCursorRow, m_textCursorCol);
+ TQPoint topLeft = sel->pointForTextRowCol (m_textCursorRow, m_textCursorCol);
if (topLeft != KP_INVALID_POINT)
{
// TODO: I think you need to consider zooming e.g. try editing
@@ -363,12 +363,12 @@ void kpViewManager::setTextCursorPosition (int row, int col, bool isUpdateMicroF
// change size).
//
// To fix it here, I think you should call
- // m_viewUnderCursor->transformDocToView(QRect). However,
+ // m_viewUnderCursor->transformDocToView(TQRect). However,
// the rest of the InputMethod support still needs to
// audited for this.
//
// [Bug #27]
- m_viewUnderCursor->updateMicroFocusHint(QRect (topLeft.x (), topLeft.y (), 1, sel->textStyle ().fontMetrics ().height ()));
+ m_viewUnderCursor->updateMicroFocusHint(TQRect (topLeft.x (), topLeft.y (), 1, sel->textStyle ().fontMetrics ().height ()));
}
}
}
@@ -410,11 +410,11 @@ void kpViewManager::updateTextCursor ()
return;
// TODO: Fix code duplication: kpViewManager::{setTextCursorPosition,updateTextCursor}() & kpView::paintEventDrawSelection()
- QPoint topLeft = sel->pointForTextRowCol (m_textCursorRow, m_textCursorCol);
+ TQPoint topLeft = sel->pointForTextRowCol (m_textCursorRow, m_textCursorCol);
if (topLeft != KP_INVALID_POINT)
{
setFastUpdates ();
- updateViews (QRect (topLeft.x (), topLeft.y (), 1, sel->textStyle ().fontMetrics ().height ()));
+ updateViews (TQRect (topLeft.x (), topLeft.y (), 1, sel->textStyle ().fontMetrics ().height ()));
restoreFastUpdates ();
}
}
@@ -429,7 +429,7 @@ void kpViewManager::slotTextCursorBlink ()
if (m_textCursorBlinkTimer)
{
- m_textCursorBlinkTimer->start (QApplication::cursorFlashTime () / 2,
+ m_textCursorBlinkTimer->start (TQApplication::cursorFlashTime () / 2,
true/*single shot*/);
}
@@ -438,9 +438,9 @@ void kpViewManager::slotTextCursorBlink ()
}
-void kpViewManager::setCursor (const QCursor &cursor)
+void kpViewManager::setCursor (const TQCursor &cursor)
{
- for (QPtrList <kpView>::const_iterator it = m_views.begin ();
+ for (TQPtrList <kpView>::const_iterator it = m_views.begin ();
it != m_views.end ();
it++)
{
@@ -452,14 +452,14 @@ void kpViewManager::setCursor (const QCursor &cursor)
void kpViewManager::unsetCursor ()
{
- for (QPtrList <kpView>::const_iterator it = m_views.begin ();
+ for (TQPtrList <kpView>::const_iterator it = m_views.begin ();
it != m_views.end ();
it++)
{
(*it)->unsetCursor ();
}
- m_cursor = QCursor ();
+ m_cursor = TQCursor ();
}
@@ -480,7 +480,7 @@ kpView *kpViewManager::viewUnderCursor (bool usingQt) const
}
else
{
- for (QPtrList <kpView>::const_iterator it = m_views.begin ();
+ for (TQPtrList <kpView>::const_iterator it = m_views.begin ();
it != m_views.end ();
it++)
{
@@ -532,7 +532,7 @@ void kpViewManager::setViewUnderCursor (kpView *view)
// public
kpView *kpViewManager::activeView () const
{
- for (QPtrList <kpView>::const_iterator it = m_views.begin ();
+ for (TQPtrList <kpView>::const_iterator it = m_views.begin ();
it != m_views.end ();
it++)
{
@@ -576,7 +576,7 @@ void kpViewManager::restoreQueueUpdates ()
if (m_queueUpdatesCounter <= 0)
{
- for (QPtrList <kpView>::const_iterator it = m_views.begin ();
+ for (TQPtrList <kpView>::const_iterator it = m_views.begin ();
it != m_views.end ();
it++)
{
@@ -620,10 +620,10 @@ void kpViewManager::restoreFastUpdates ()
void kpViewManager::updateView (kpView *v)
{
- updateView (v, QRect (0, 0, v->width (), v->height ()));
+ updateView (v, TQRect (0, 0, v->width (), v->height ()));
}
-void kpViewManager::updateView (kpView *v, const QRect &viewRect)
+void kpViewManager::updateView (kpView *v, const TQRect &viewRect)
{
if (!queueUpdates ())
{
@@ -638,10 +638,10 @@ void kpViewManager::updateView (kpView *v, const QRect &viewRect)
void kpViewManager::updateView (kpView *v, int x, int y, int w, int h)
{
- updateView (v, QRect (x, y, w, h));
+ updateView (v, TQRect (x, y, w, h));
}
-void kpViewManager::updateView (kpView *v, const QRegion &viewRegion)
+void kpViewManager::updateView (kpView *v, const TQRegion &viewRegion)
{
if (!queueUpdates ())
{
@@ -654,31 +654,31 @@ void kpViewManager::updateView (kpView *v, const QRegion &viewRegion)
v->addToQueuedArea (viewRegion);
}
-void kpViewManager::updateViewRectangleEdges (kpView *v, const QRect &viewRect)
+void kpViewManager::updateViewRectangleEdges (kpView *v, const TQRect &viewRect)
{
if (viewRect.height () <= 0 || viewRect.width () <= 0)
return;
// Top line
- updateView (v, QRect (viewRect.x (), viewRect.y (),
+ updateView (v, TQRect (viewRect.x (), viewRect.y (),
viewRect.width (), 1));
if (viewRect.height () >= 2)
{
// Bottom line
- updateView (v, QRect (viewRect.x (), viewRect.bottom (),
+ updateView (v, TQRect (viewRect.x (), viewRect.bottom (),
viewRect.width (), 1));
if (viewRect.height () > 2)
{
// Left line
- updateView (v, QRect (viewRect.x (), viewRect.y () + 1,
+ updateView (v, TQRect (viewRect.x (), viewRect.y () + 1,
1, viewRect.height () - 2));
if (viewRect.width () >= 2)
{
// Right line
- updateView (v, QRect (viewRect.right (), viewRect.y () + 1,
+ updateView (v, TQRect (viewRect.right (), viewRect.y () + 1,
1, viewRect.height () - 2));
}
}
@@ -690,16 +690,16 @@ void kpViewManager::updateViews ()
{
kpDocument *doc = document ();
if (doc)
- updateViews (QRect (0, 0, doc->width (), doc->height ()));
+ updateViews (TQRect (0, 0, doc->width (), doc->height ()));
}
-void kpViewManager::updateViews (const QRect &docRect)
+void kpViewManager::updateViews (const TQRect &docRect)
{
#if DEBUG_KP_VIEW_MANAGER && 0
kdDebug () << "kpViewManager::updateViews (" << docRect << ")" << endl;
#endif
- for (QPtrList <kpView>::const_iterator it = m_views.begin ();
+ for (TQPtrList <kpView>::const_iterator it = m_views.begin ();
it != m_views.end ();
it++)
{
@@ -717,15 +717,15 @@ void kpViewManager::updateViews (const QRect &docRect)
}
else
{
- QRect viewRect = view->transformDocToView (docRect);
+ TQRect viewRect = view->transformDocToView (docRect);
int diff = qRound (double (QMAX (view->zoomLevelX (), view->zoomLevelY ())) / 100.0) + 1;
- QRect newRect = QRect (viewRect.x () - diff,
+ TQRect newRect = TQRect (viewRect.x () - diff,
viewRect.y () - diff,
viewRect.width () + 2 * diff,
viewRect.height () + 2 * diff)
- .intersect (QRect (0, 0, view->width (), view->height ()));
+ .intersect (TQRect (0, 0, view->width (), view->height ()));
#if DEBUG_KP_VIEW_MANAGER && 0
kdDebug () << "\t\tviewRect (+compensate)=" << newRect << endl;
@@ -737,7 +737,7 @@ void kpViewManager::updateViews (const QRect &docRect)
void kpViewManager::updateViews (int x, int y, int w, int h)
{
- updateViews (QRect (x, y, w, h));
+ updateViews (TQRect (x, y, w, h));
}
@@ -748,7 +748,7 @@ void kpViewManager::adjustViewsToEnvironment ()
<< " numViews=" << m_views.count ()
<< endl;
#endif
- for (QPtrList <kpView>::const_iterator it = m_views.begin ();
+ for (TQPtrList <kpView>::const_iterator it = m_views.begin ();
it != m_views.end ();
it++)
{
diff --git a/kolourpaint/kpviewmanager.h b/kolourpaint/kpviewmanager.h
index c6ea1ef0..9bb6e8b6 100644
--- a/kolourpaint/kpviewmanager.h
+++ b/kolourpaint/kpviewmanager.h
@@ -29,15 +29,15 @@
#ifndef __kpviewmanager_h__
#define __kpviewmanager_h__
-#include <qcursor.h>
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qrect.h>
+#include <tqcursor.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqrect.h>
-class QPixmap;
-class QRect;
-class QTimer;
+class TQPixmap;
+class TQRect;
+class TQTimer;
class kpDocument;
class kpView;
@@ -99,7 +99,7 @@ public:
protected:
void updateTextCursor ();
- QTimer *m_textCursorBlinkTimer;
+ TQTimer *m_textCursorBlinkTimer;
int m_textCursorRow, m_textCursorCol;
bool m_textCursorBlinkState;
@@ -112,7 +112,7 @@ public:
// Cursors
//
- void setCursor (const QCursor &cursor);
+ void setCursor (const TQCursor &cursor);
void unsetCursor ();
@@ -123,9 +123,9 @@ public:
kpView *viewUnderCursor (bool usingQt = false) const;
//
- // QWidget::hasMouse() is unreliable:
+ // TQWidget::hasMouse() is unreliable:
//
- // "bool QWidget::hasMouse () const
+ // "bool TQWidget::hasMouse () const
// ... See the "underMouse" property for details.
// .
// .
@@ -154,7 +154,7 @@ public:
// before multiple, big, non-interactive changes to the
// document to eliminate virtually all flicker.
//
- // This is better than QWidget::setUpdatesEnabled() because
+ // This is better than TQWidget::setUpdatesEnabled() because
// restoreQueueUpdates() automatically restores only the regions
// of the views that need to be repainted, per view.
bool queueUpdates () const;
@@ -163,7 +163,7 @@ public:
// Controls behaviour of updateViews():
//
- // Slow: Let Qt buffer paint events via QWidget::update().
+ // Slow: Let Qt 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).
@@ -183,13 +183,13 @@ private:
public slots:
// updating views
void updateView (kpView *v);
- void updateView (kpView *v, const QRect &viewRect);
+ void updateView (kpView *v, const TQRect &viewRect);
void updateView (kpView *v, int x, int y, int w, int h);
- void updateView (kpView *v, const QRegion &viewRegion);
- void updateViewRectangleEdges (kpView *v, const QRect &viewRect);
+ void updateView (kpView *v, const TQRegion &viewRegion);
+ void updateViewRectangleEdges (kpView *v, const TQRect &viewRect);
void updateViews ();
- void updateViews (const QRect &docRect);
+ void updateViews (const TQRect &docRect);
void updateViews (int x, int y, int w, int h);
void adjustViewsToEnvironment ();
@@ -202,8 +202,8 @@ private:
kpDocument *document () const;
kpMainWindow *m_mainWindow;
- QPtrList <kpView> m_views;
- QCursor m_cursor;
+ TQPtrList <kpView> m_views;
+ TQCursor m_cursor;
kpTempPixmap *m_tempPixmap;
kpView *m_viewUnderCursor;
diff --git a/kolourpaint/kpviewscrollablecontainer.cpp b/kolourpaint/kpviewscrollablecontainer.cpp
index 637f71b7..c3942806 100644
--- a/kolourpaint/kpviewscrollablecontainer.cpp
+++ b/kolourpaint/kpviewscrollablecontainer.cpp
@@ -29,11 +29,11 @@
#include <kpviewscrollablecontainer.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qpixmap.h>
-#include <qtimer.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <klocale.h>
@@ -58,8 +58,8 @@ static const int GripHandleSize = 7;
kpGrip::kpGrip (GripType type,
- QWidget *parent, const char *name)
- : QWidget (parent, name),
+ TQWidget *parent, const char *name)
+ : TQWidget (parent, name),
m_type (type),
m_startPoint (KP_INVALID_POINT),
m_currentPoint (KP_INVALID_POINT),
@@ -85,7 +85,7 @@ kpGrip::GripType kpGrip::type () const
// public static
-const QCursor &kpGrip::cursorForType (GripType type)
+const TQCursor &kpGrip::cursorForType (GripType type)
{
switch (type)
{
@@ -107,23 +107,23 @@ const QCursor &kpGrip::cursorForType (GripType type)
// public
-QRect kpGrip::hotRect (bool toGlobal) const
+TQRect kpGrip::hotRect (bool toGlobal) const
{
- QRect ret;
+ TQRect ret;
switch (m_type)
{
case Bottom:
{
const int handleX = (width () - GripHandleSize) / 2;
- ret = QRect (handleX, 0,
+ ret = TQRect (handleX, 0,
GripHandleSize, height ());
break;
}
case Right:
{
const int handleY = (height () - GripHandleSize) / 2;
- ret = QRect (0, handleY,
+ ret = TQRect (0, handleY,
width (), GripHandleSize);
break;
}
@@ -133,10 +133,10 @@ QRect kpGrip::hotRect (bool toGlobal) const
break;
default:
- return QRect ();
+ return TQRect ();
}
- return (toGlobal ? QRect (mapToGlobal (ret.topLeft ()),
+ return (toGlobal ? TQRect (mapToGlobal (ret.topLeft ()),
mapToGlobal (ret.bottomRight ()))
: ret);
}
@@ -150,20 +150,20 @@ bool kpGrip::isDrawing () const
// public
-QString kpGrip::haventBegunDrawUserMessage () const
+TQString kpGrip::haventBegunDrawUserMessage () const
{
return i18n ("Left drag the handle to resize the image.");
}
// public
-QString kpGrip::userMessage () const
+TQString kpGrip::userMessage () const
{
return m_userMessage;
}
// public
-void kpGrip::setUserMessage (const QString &message)
+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
@@ -183,10 +183,10 @@ void kpGrip::updatePixmap ()
if (width () <= 0 || height () <= 0)
return;
- QPixmap pixmap (width (), height ());
+ TQPixmap pixmap (width (), height ());
pixmap.fill (colorGroup ().highlight ());
kpPixmapFX::ensureTransparentAt (&pixmap, pixmap.rect ());
- const QRect hr = hotRect ();
+ const TQRect hr = hotRect ();
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
kdDebug () << "\thotRect=" << hr << endl;
#endif
@@ -221,7 +221,7 @@ void kpGrip::cancel ()
// protected virtual [base QWidget]
-void kpGrip::keyReleaseEvent (QKeyEvent *e)
+void kpGrip::keyReleaseEvent (TQKeyEvent *e)
{
if (m_startPoint != KP_INVALID_POINT &&
e->key () == Qt::Key_Escape)
@@ -231,7 +231,7 @@ void kpGrip::keyReleaseEvent (QKeyEvent *e)
}
// protected virtual [base QWidget]
-void kpGrip::mousePressEvent (QMouseEvent *e)
+void kpGrip::mousePressEvent (TQMouseEvent *e)
{
if (m_startPoint == KP_INVALID_POINT &&
(e->stateAfter () & Qt::MouseButtonMask) == Qt::LeftButton)
@@ -252,22 +252,22 @@ void kpGrip::mousePressEvent (QMouseEvent *e)
}
// public
-QPoint kpGrip::viewDeltaPoint () const
+TQPoint kpGrip::viewDeltaPoint () const
{
if (m_startPoint == KP_INVALID_POINT)
return KP_INVALID_POINT;
- const QPoint point = mapFromGlobal (QCursor::pos ());
+ const TQPoint point = mapFromGlobal (TQCursor::pos ());
// TODO: this is getting out of sync with m_currentPoint
- return QPoint (((m_type & Right) ? point.x () - m_startPoint.x () : 0),
+ return TQPoint (((m_type & Right) ? point.x () - m_startPoint.x () : 0),
((m_type & Bottom) ? point.y () - m_startPoint.y () : 0));
}
// public
-void kpGrip::mouseMovedTo (const QPoint &point, bool dueToDragScroll)
+void kpGrip::mouseMovedTo (const TQPoint &point, bool dueToDragScroll)
{
if (m_startPoint == KP_INVALID_POINT)
return;
@@ -280,7 +280,7 @@ void kpGrip::mouseMovedTo (const QPoint &point, bool dueToDragScroll)
}
// protected virtual [base QWidget]
-void kpGrip::mouseMoveEvent (QMouseEvent *e)
+void kpGrip::mouseMoveEvent (TQMouseEvent *e)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
kdDebug () << "kpGrip::mouseMoveEvent() m_startPoint=" << m_startPoint
@@ -299,7 +299,7 @@ void kpGrip::mouseMoveEvent (QMouseEvent *e)
}
// protected virtual [base QWidget]
-void kpGrip::mouseReleaseEvent (QMouseEvent *e)
+void kpGrip::mouseReleaseEvent (TQMouseEvent *e)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
kdDebug () << "kpGrip::mouseReleaseEvent() m_startPoint=" << m_startPoint
@@ -323,7 +323,7 @@ void kpGrip::mouseReleaseEvent (QMouseEvent *e)
if ((e->stateAfter () & Qt::MouseButtonMask) == 0)
{
m_shouldReleaseMouseButtons = false;
- setUserMessage (QString::null);
+ setUserMessage (TQString::null);
setCursor (cursorForType (m_type));
releaseKeyboard ();
@@ -333,7 +333,7 @@ void kpGrip::mouseReleaseEvent (QMouseEvent *e)
// protected virtual [base QWidget]
-void kpGrip::resizeEvent (QResizeEvent *)
+void kpGrip::resizeEvent (TQResizeEvent *)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
kdDebug () << "kpGrip::resizeEvent()" << endl;
@@ -343,7 +343,7 @@ void kpGrip::resizeEvent (QResizeEvent *)
// protected virtual [base QWidget]
-void kpGrip::enterEvent (QEvent * /*e*/)
+void kpGrip::enterEvent (TQEvent * /*e*/)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
kdDebug () << "kpGrip::enterEvent()"
@@ -363,7 +363,7 @@ void kpGrip::enterEvent (QEvent * /*e*/)
}
// protected virtual [base QWidget]
-void kpGrip::leaveEvent (QEvent * /*e*/)
+void kpGrip::leaveEvent (TQEvent * /*e*/)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
kdDebug () << "kpGrip::leaveEvent()"
@@ -374,25 +374,25 @@ void kpGrip::leaveEvent (QEvent * /*e*/)
if (m_startPoint == KP_INVALID_POINT &&
!m_shouldReleaseMouseButtons)
{
- setUserMessage (QString::null);
+ setUserMessage (TQString::null);
}
}
// protected virtual [base QWidget]
-void kpGrip::paintEvent (QPaintEvent *e)
+void kpGrip::paintEvent (TQPaintEvent *e)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER && 0
kdDebug () << "kpGrip::paintEvent(" << e->rect () << ")" << endl;
#endif
- QWidget::paintEvent (e);
+ TQWidget::paintEvent (e);
}
// TODO: Are we checking for m_view == 0 often enough?
kpViewScrollableContainer::kpViewScrollableContainer (kpMainWindow *parent,
const char *name)
- : QScrollView ((QWidget *) parent, name, Qt::WStaticContents | Qt::WNoAutoErase),
+ : TQScrollView ((TQWidget *) parent, name, Qt::WStaticContents | Qt::WNoAutoErase),
m_mainWindow (parent),
m_contentsXSoon (-1), m_contentsYSoon (-1),
m_view (0),
@@ -400,7 +400,7 @@ kpViewScrollableContainer::kpViewScrollableContainer (kpMainWindow *parent,
m_rightGrip (new kpGrip (kpGrip::Right, viewport (), "Right Grip")),
m_bottomRightGrip (new kpGrip (kpGrip::BottomRight, viewport (), "BottomRight Grip")),
m_docResizingGrip (0),
- m_dragScrollTimer (new QTimer (this)),
+ m_dragScrollTimer (new TQTimer (this)),
m_zoomLevel (100),
m_scrollTimerRunOnce (false),
m_resizeRoundedLastViewX (-1), m_resizeRoundedLastViewY (-1),
@@ -424,11 +424,11 @@ kpViewScrollableContainer::kpViewScrollableContainer (kpMainWindow *parent,
connectGripSignals (m_bottomRightGrip);
- connect (this, SIGNAL (contentsMoving (int, int)),
- this, SLOT (slotContentsMoving (int, int)));
+ connect (this, TQT_SIGNAL (contentsMoving (int, int)),
+ this, TQT_SLOT (slotContentsMoving (int, int)));
- connect (m_dragScrollTimer, SIGNAL (timeout ()),
- this, SLOT (slotDragScroll ()));
+ connect (m_dragScrollTimer, TQT_SIGNAL (timeout ()),
+ this, TQT_SLOT (slotDragScroll ()));
}
kpViewScrollableContainer::~kpViewScrollableContainer ()
@@ -458,25 +458,25 @@ int kpViewScrollableContainer::contentsYSoon ()
// protected
void kpViewScrollableContainer::connectGripSignals (kpGrip *grip)
{
- connect (grip, SIGNAL (beganDraw ()),
- this, SLOT (slotGripBeganDraw ()));
- connect (grip, SIGNAL (continuedDraw (int, int, bool)),
- this, SLOT (slotGripContinuedDraw (int, int, bool)));
- connect (grip, SIGNAL (cancelledDraw ()),
- this, SLOT (slotGripCancelledDraw ()));
- connect (grip, SIGNAL (endedDraw (int, int)),
- this, SLOT (slotGripEndedDraw (int, int)));
+ connect (grip, TQT_SIGNAL (beganDraw ()),
+ this, TQT_SLOT (slotGripBeganDraw ()));
+ connect (grip, TQT_SIGNAL (continuedDraw (int, int, bool)),
+ this, TQT_SLOT (slotGripContinuedDraw (int, int, bool)));
+ connect (grip, TQT_SIGNAL (cancelledDraw ()),
+ this, TQT_SLOT (slotGripCancelledDraw ()));
+ connect (grip, TQT_SIGNAL (endedDraw (int, int)),
+ this, TQT_SLOT (slotGripEndedDraw (int, int)));
- connect (grip, SIGNAL (statusMessageChanged (const QString &)),
- this, SLOT (slotGripStatusMessageChanged (const QString &)));
+ connect (grip, TQT_SIGNAL (statusMessageChanged (const TQString &)),
+ this, TQT_SLOT (slotGripStatusMessageChanged (const TQString &)));
- connect (grip, SIGNAL (releasedAllButtons ()),
- this, SLOT (recalculateStatusMessage ()));
+ connect (grip, TQT_SIGNAL (releasedAllButtons ()),
+ this, TQT_SLOT (recalculateStatusMessage ()));
}
// public
-QSize kpViewScrollableContainer::newDocSize () const
+TQSize kpViewScrollableContainer::newDocSize () const
{
return newDocSize (m_resizeRoundedLastViewDX,
m_resizeRoundedLastViewDY);
@@ -489,7 +489,7 @@ bool kpViewScrollableContainer::haveMovedFromOriginalDocSize () const
}
// public
-QString kpViewScrollableContainer::statusMessage () const
+TQString kpViewScrollableContainer::statusMessage () const
{
return m_gripStatusMessage;
}
@@ -500,25 +500,25 @@ void kpViewScrollableContainer::clearStatusMessage ()
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER && 1
kdDebug () << "kpViewScrollableContainer::clearStatusMessage()" << endl;
#endif
- m_bottomRightGrip->setUserMessage (QString::null);
- m_bottomGrip->setUserMessage (QString::null);
- m_rightGrip->setUserMessage (QString::null);
+ m_bottomRightGrip->setUserMessage (TQString::null);
+ m_bottomGrip->setUserMessage (TQString::null);
+ m_rightGrip->setUserMessage (TQString::null);
}
// protected
-QSize kpViewScrollableContainer::newDocSize (int viewDX, int viewDY) const
+TQSize kpViewScrollableContainer::newDocSize (int viewDX, int viewDY) const
{
if (!m_view)
- return QSize ();
+ return TQSize ();
if (!docResizingGrip ())
- return QSize ();
+ return TQSize ();
const int docX = (int) m_view->transformViewToDocX (m_view->width () + viewDX);
const int docY = (int) m_view->transformViewToDocY (m_view->height () + viewDY);
- return QSize (QMAX (1, docX), QMAX (1, docY));
+ return TQSize (QMAX (1, docX), QMAX (1, docY));
}
@@ -574,38 +574,38 @@ int kpViewScrollableContainer::rightResizeLineWidth () const
// protected
-QRect kpViewScrollableContainer::bottomResizeLineRect () const
+TQRect kpViewScrollableContainer::bottomResizeLineRect () const
{
if (m_resizeRoundedLastViewX < 0 || m_resizeRoundedLastViewY < 0)
- return QRect ();
+ return TQRect ();
- return QRect (QPoint (0,
+ return TQRect (TQPoint (0,
m_resizeRoundedLastViewY),
- QPoint (m_resizeRoundedLastViewX - 1,
+ TQPoint (m_resizeRoundedLastViewX - 1,
m_resizeRoundedLastViewY + bottomResizeLineWidth () - 1));
}
// protected
-QRect kpViewScrollableContainer::rightResizeLineRect () const
+TQRect kpViewScrollableContainer::rightResizeLineRect () const
{
if (m_resizeRoundedLastViewX < 0 || m_resizeRoundedLastViewY < 0)
- return QRect ();
+ return TQRect ();
- return QRect (QPoint (m_resizeRoundedLastViewX,
+ return TQRect (TQPoint (m_resizeRoundedLastViewX,
0),
- QPoint (m_resizeRoundedLastViewX + rightResizeLineWidth () - 1,
+ TQPoint (m_resizeRoundedLastViewX + rightResizeLineWidth () - 1,
m_resizeRoundedLastViewY - 1));
}
// protected
-QRect kpViewScrollableContainer::bottomRightResizeLineRect () const
+TQRect kpViewScrollableContainer::bottomRightResizeLineRect () const
{
if (m_resizeRoundedLastViewX < 0 || m_resizeRoundedLastViewY < 0)
- return QRect ();
+ return TQRect ();
- return QRect (QPoint (m_resizeRoundedLastViewX,
+ return TQRect (TQPoint (m_resizeRoundedLastViewX,
m_resizeRoundedLastViewY),
- QPoint (m_resizeRoundedLastViewX + rightResizeLineWidth () - 1,
+ TQPoint (m_resizeRoundedLastViewX + rightResizeLineWidth () - 1,
m_resizeRoundedLastViewY + bottomResizeLineWidth () - 1));
}
@@ -613,31 +613,31 @@ QRect kpViewScrollableContainer::bottomRightResizeLineRect () const
// TODO: are these 2 correct? Remember that viewport()->x() == 1, viewport()->y() == 1
// protected
-QPoint kpViewScrollableContainer::mapViewToViewport (const QPoint &viewPoint)
+TQPoint kpViewScrollableContainer::mapViewToViewport (const TQPoint &viewPoint)
{
- return viewPoint - QPoint (contentsX (), contentsY ());
+ return viewPoint - TQPoint (contentsX (), contentsY ());
}
// protected
-QRect kpViewScrollableContainer::mapViewToViewport (const QRect &viewRect)
+TQRect kpViewScrollableContainer::mapViewToViewport (const TQRect &viewRect)
{
if (!viewRect.isValid ())
- return QRect ();
+ return TQRect ();
- QRect ret = viewRect;
+ TQRect ret = viewRect;
ret.moveBy (-contentsX (), -contentsY ());
return ret;
}
// protected
-QRect kpViewScrollableContainer::mapViewportToGlobal (const QRect &viewportRect)
+TQRect kpViewScrollableContainer::mapViewportToGlobal (const TQRect &viewportRect)
{
return kpWidgetMapper::toGlobal (viewport (), viewportRect);
}
// protected
-QRect kpViewScrollableContainer::mapViewToGlobal (const QRect &viewRect)
+TQRect kpViewScrollableContainer::mapViewToGlobal (const TQRect &viewRect)
{
return mapViewportToGlobal (mapViewToViewport (viewRect));
}
@@ -645,16 +645,16 @@ QRect kpViewScrollableContainer::mapViewToGlobal (const QRect &viewRect)
// protected
void kpViewScrollableContainer::repaintWidgetAtResizeLineViewRect (
- QWidget *widget, const QRect &resizeLineViewRect)
+ TQWidget *widget, const TQRect &resizeLineViewRect)
{
- const QRect resizeLineGlobalRect = mapViewToGlobal (resizeLineViewRect);
- const QRect widgetGlobalRect = kpWidgetMapper::toGlobal (widget,
+ const TQRect resizeLineGlobalRect = mapViewToGlobal (resizeLineViewRect);
+ const TQRect widgetGlobalRect = kpWidgetMapper::toGlobal (widget,
widget->rect ());
- const QRect redrawGlobalRect =
+ const TQRect redrawGlobalRect =
resizeLineGlobalRect.intersect (widgetGlobalRect);
- const QRect redrawWidgetRect =
+ const TQRect redrawWidgetRect =
kpWidgetMapper::fromGlobal (widget, redrawGlobalRect);
@@ -668,7 +668,7 @@ void kpViewScrollableContainer::repaintWidgetAtResizeLineViewRect (
}
// protected
-void kpViewScrollableContainer::repaintWidgetAtResizeLines (QWidget *widget)
+void kpViewScrollableContainer::repaintWidgetAtResizeLines (TQWidget *widget)
{
repaintWidgetAtResizeLineViewRect (widget, rightResizeLineRect ());
repaintWidgetAtResizeLineViewRect (widget, bottomResizeLineRect ());
@@ -701,18 +701,18 @@ void kpViewScrollableContainer::drawResizeLines ()
#endif
- QPainter p (viewport (), true/*unclipped*/);
+ TQPainter p (viewport (), true/*unclipped*/);
p.setRasterOp (Qt::NotROP);
- const QRect rightRect = rightResizeLineRect ();
+ const TQRect rightRect = rightResizeLineRect ();
if (rightRect.isValid ())
p.fillRect (mapViewToViewport (rightRect), Qt::white);
- const QRect bottomRect = bottomResizeLineRect ();
+ const TQRect bottomRect = bottomResizeLineRect ();
if (bottomRect.isValid ())
p.fillRect (mapViewToViewport (bottomRect), Qt::white);
- const QRect bottomRightRect = bottomRightResizeLineRect ();
+ const TQRect bottomRightRect = bottomRightResizeLineRect ();
if (bottomRightRect.isValid ())
p.fillRect (mapViewToViewport (bottomRightRect), Qt::white);
@@ -802,9 +802,9 @@ void kpViewScrollableContainer::slotGripContinuedDraw (int inViewDX, int inViewD
return;
if (!dueToDragScroll &&
- beginDragScroll (QPoint (), QPoint (), m_view->zoomLevelX ()))
+ beginDragScroll (TQPoint (), TQPoint (), m_view->zoomLevelX ()))
{
- const QPoint newViewDeltaPoint = docResizingGrip ()->viewDeltaPoint ();
+ const TQPoint newViewDeltaPoint = docResizingGrip ()->viewDeltaPoint ();
viewDX = newViewDeltaPoint.x ();
viewDY = newViewDeltaPoint.y ();
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
@@ -850,7 +850,7 @@ void kpViewScrollableContainer::slotGripEndedDraw (int viewDX, int viewDY)
if (!m_view)
return;
- const QSize newSize = newDocSize (viewDX, viewDY);
+ const TQSize newSize = newDocSize (viewDX, viewDY);
m_haveMovedFromOriginalDocSize = false;
@@ -866,7 +866,7 @@ void kpViewScrollableContainer::slotGripEndedDraw (int viewDX, int viewDY)
// protected slot
-void kpViewScrollableContainer::slotGripStatusMessageChanged (const QString &string)
+void kpViewScrollableContainer::slotGripStatusMessageChanged (const TQString &string)
{
if (string == m_gripStatusMessage)
return;
@@ -881,10 +881,10 @@ void kpViewScrollableContainer::recalculateStatusMessage ()
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
kdDebug () << "kpViewScrollabelContainer::recalculateStatusMessage()" << endl;
- kdDebug () << "\tQCursor::pos=" << QCursor::pos ()
+ kdDebug () << "\tQCursor::pos=" << TQCursor::pos ()
<< " global visibleRect="
<< kpWidgetMapper::toGlobal (this,
- QRect (0, 0, visibleWidth (), visibleHeight ()))
+ TQRect (0, 0, visibleWidth (), visibleHeight ()))
<< " brGrip.hotRect=" << m_bottomRightGrip->hotRect (true)
<< " bGrip.hotRect=" << m_bottomGrip->hotRect (true)
<< " rGrip.hotRect=" << m_rightGrip->hotRect (true)
@@ -897,24 +897,24 @@ void kpViewScrollableContainer::recalculateStatusMessage ()
// grip.
//
if (kpWidgetMapper::toGlobal (this,
- QRect (0, 0, visibleWidth (), visibleHeight ()))
- .contains (QCursor::pos ()))
+ TQRect (0, 0, visibleWidth (), visibleHeight ()))
+ .contains (TQCursor::pos ()))
{
if (m_bottomRightGrip->isShown () &&
m_bottomRightGrip->hotRect (true/*to global*/)
- .contains (QCursor::pos ()))
+ .contains (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 (QCursor::pos ()))
+ .contains (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 (QCursor::pos ()))
+ .contains (TQCursor::pos ()))
{
m_rightGrip->setUserMessage (i18n ("Left drag the handle to resize the image."));
}
@@ -943,10 +943,10 @@ void kpViewScrollableContainer::slotContentsMoving (int x, int y)
m_contentsXSoon = x, m_contentsYSoon = y;
emit contentsMovingSoon (m_contentsXSoon, m_contentsYSoon);
- // Reduce flicker - don't let QScrollView scroll to-be-erased lines
+ // Reduce flicker - don't let TQScrollView scroll to-be-erased lines
eraseResizeLines ();
- QTimer::singleShot (0, this, SLOT (slotContentsMoved ()));
+ TQTimer::singleShot (0, this, TQT_SLOT (slotContentsMoved ()));
}
// protected slot
@@ -964,7 +964,7 @@ void kpViewScrollableContainer::slotContentsMoved ()
if (!grip)
return;
- grip->mouseMovedTo (grip->mapFromGlobal (QCursor::pos ()),
+ grip->mouseMovedTo (grip->mapFromGlobal (TQCursor::pos ()),
true/*moved due to drag scroll*/);
}
@@ -972,31 +972,31 @@ void kpViewScrollableContainer::slotContentsMoved ()
// protected
void kpViewScrollableContainer::disconnectViewSignals ()
{
- disconnect (m_view, SIGNAL (sizeChanged (const QSize &)),
- this, SLOT (updateGrips ()));
- disconnect (m_view, SIGNAL (destroyed ()),
- this, SLOT (slotViewDestroyed ()));
+ disconnect (m_view, TQT_SIGNAL (sizeChanged (const TQSize &)),
+ this, TQT_SLOT (updateGrips ()));
+ disconnect (m_view, TQT_SIGNAL (destroyed ()),
+ this, TQT_SLOT (slotViewDestroyed ()));
}
// protected
void kpViewScrollableContainer::connectViewSignals ()
{
- connect (m_view, SIGNAL (sizeChanged (const QSize &)),
- this, SLOT (updateGrips ()));
- connect (m_view, SIGNAL (destroyed ()),
- this, SLOT (slotViewDestroyed ()));
+ connect (m_view, TQT_SIGNAL (sizeChanged (const TQSize &)),
+ this, TQT_SLOT (updateGrips ()));
+ connect (m_view, TQT_SIGNAL (destroyed ()),
+ this, TQT_SLOT (slotViewDestroyed ()));
}
// public virtual [base QScrollView]
-void kpViewScrollableContainer::addChild (QWidget *widget, int x, int y)
+void kpViewScrollableContainer::addChild (TQWidget *widget, int x, int y)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
kdDebug () << "kpViewScrollableContainer::addChild(" << widget
<< "," << x << "," << y << endl;
#endif
- QScrollView::addChild (widget, x, y);
+ TQScrollView::addChild (widget, x, y);
kpView *view = dynamic_cast <kpView *> (widget);
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
@@ -1098,8 +1098,8 @@ void kpViewScrollableContainer::slotViewDestroyed ()
// public slot
-bool kpViewScrollableContainer::beginDragScroll (const QPoint &/*docPoint*/,
- const QPoint &/*lastDocPoint*/,
+bool kpViewScrollableContainer::beginDragScroll (const TQPoint &/*docPoint*/,
+ const TQPoint &/*lastDocPoint*/,
int zoomLevel,
bool *didSomething)
{
@@ -1108,7 +1108,7 @@ bool kpViewScrollableContainer::beginDragScroll (const QPoint &/*docPoint*/,
m_zoomLevel = zoomLevel;
- const QPoint p = mapFromGlobal (QCursor::pos ());
+ const TQPoint p = mapFromGlobal (TQCursor::pos ());
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
kdDebug () << "kpViewScrollableContainer::beginDragScroll() p=" << p
@@ -1147,8 +1147,8 @@ bool kpViewScrollableContainer::beginDragScroll (const QPoint &/*docPoint*/,
}
// public slot
-bool kpViewScrollableContainer::beginDragScroll (const QPoint &docPoint,
- const QPoint &lastDocPoint,
+bool kpViewScrollableContainer::beginDragScroll (const TQPoint &docPoint,
+ const TQPoint &lastDocPoint,
int zoomLevel)
{
return beginDragScroll (docPoint, lastDocPoint, zoomLevel,
@@ -1197,8 +1197,8 @@ bool kpViewScrollableContainer::slotDragScroll (bool *didSomething)
*didSomething = false;
- const QRect rect = noDragScrollRect ();
- const QPoint pos = mapFromGlobal (QCursor::pos ());
+ const TQRect rect = noDragScrollRect ();
+ const TQPoint pos = mapFromGlobal (TQCursor::pos ());
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
kdDebug () << "kpViewScrollableContainer::slotDragScroll()"
@@ -1262,9 +1262,9 @@ bool kpViewScrollableContainer::slotDragScroll (bool *didSomething)
if (scrolled)
{
- QRegion region = QRect (contentsX (), contentsY (),
+ TQRegion region = TQRect (contentsX (), contentsY (),
visibleWidth (), visibleHeight ());
- region -= QRect (oldContentsX, oldContentsY,
+ region -= TQRect (oldContentsX, oldContentsY,
visibleWidth (), visibleHeight ());
// Repaint newly exposed region immediately to reduce tearing
@@ -1285,7 +1285,7 @@ bool kpViewScrollableContainer::slotDragScroll (bool *didSomething)
}
// protected virtual [base QScrollView]
-void kpViewScrollableContainer::contentsDragMoveEvent (QDragMoveEvent *e)
+void kpViewScrollableContainer::contentsDragMoveEvent (TQDragMoveEvent *e)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
kdDebug () << "kpViewScrollableContainer::contentsDragMoveEvent"
@@ -1293,7 +1293,7 @@ void kpViewScrollableContainer::contentsDragMoveEvent (QDragMoveEvent *e)
<< endl;
#endif
- QScrollView::contentsDragMoveEvent (e);
+ TQScrollView::contentsDragMoveEvent (e);
}
// protected slot
@@ -1304,7 +1304,7 @@ bool kpViewScrollableContainer::slotDragScroll ()
// protected virtual [base QScrollView]
-void kpViewScrollableContainer::contentsMouseMoveEvent (QMouseEvent *e)
+void kpViewScrollableContainer::contentsMouseMoveEvent (TQMouseEvent *e)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
kdDebug () << "kpViewScrollableContainer::contentsMouseMoveEvent"
@@ -1312,11 +1312,11 @@ void kpViewScrollableContainer::contentsMouseMoveEvent (QMouseEvent *e)
<< endl;
#endif
- QScrollView::contentsMouseMoveEvent (e);
+ TQScrollView::contentsMouseMoveEvent (e);
}
// protected virtual [base QScrollView]
-void kpViewScrollableContainer::mouseMoveEvent (QMouseEvent *e)
+void kpViewScrollableContainer::mouseMoveEvent (TQMouseEvent *e)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
kdDebug () << "kpViewScrollableContainer::mouseMoveEvent"
@@ -1324,12 +1324,12 @@ void kpViewScrollableContainer::mouseMoveEvent (QMouseEvent *e)
<< endl;
#endif
- QScrollView::mouseMoveEvent (e);
+ TQScrollView::mouseMoveEvent (e);
}
// protected virtual [base QScrollView]
-void kpViewScrollableContainer::contentsWheelEvent (QWheelEvent *e)
+void kpViewScrollableContainer::contentsWheelEvent (TQWheelEvent *e)
{
e->ignore ();
@@ -1337,25 +1337,25 @@ void kpViewScrollableContainer::contentsWheelEvent (QWheelEvent *e)
m_view->wheelEvent (e);
if (!e->isAccepted ())
- QScrollView::contentsWheelEvent (e);
+ TQScrollView::contentsWheelEvent (e);
}
-QRect kpViewScrollableContainer::noDragScrollRect () const
+TQRect kpViewScrollableContainer::noDragScrollRect () const
{
- return QRect (DragScrollLeftTopMargin, DragScrollLeftTopMargin,
+ return TQRect (DragScrollLeftTopMargin, DragScrollLeftTopMargin,
width () - DragScrollLeftTopMargin - DragScrollRightBottomMargin,
height () - DragScrollLeftTopMargin - DragScrollRightBottomMargin);
}
// protected virtual [base QScrollView]
-bool kpViewScrollableContainer::eventFilter (QObject *watchedObject, QEvent *event)
+bool kpViewScrollableContainer::eventFilter (TQObject *watchedObject, TQEvent *event)
{
- return QScrollView::eventFilter (watchedObject, event);
+ return TQScrollView::eventFilter (watchedObject, event);
}
// protected virtual [base QScrollView]
-void kpViewScrollableContainer::viewportPaintEvent (QPaintEvent *e)
+void kpViewScrollableContainer::viewportPaintEvent (TQPaintEvent *e)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER
kdDebug () << "kpViewScrollableContainer::viewportPaintEvent("
@@ -1363,11 +1363,11 @@ void kpViewScrollableContainer::viewportPaintEvent (QPaintEvent *e)
<< ")" << endl;
#endif
- QScrollView::viewportPaintEvent (e);
+ TQScrollView::viewportPaintEvent (e);
}
// protected virtual [base QFrame]
-void kpViewScrollableContainer::paintEvent (QPaintEvent *e)
+void kpViewScrollableContainer::paintEvent (TQPaintEvent *e)
{
#if DEBUG_KP_VIEW_SCROLLABLE_CONTAINER && 0
kdDebug () << "kpViewScrollableContainer::paintEvent("
@@ -1375,13 +1375,13 @@ void kpViewScrollableContainer::paintEvent (QPaintEvent *e)
<< ")" << endl;
#endif
- QScrollView::paintEvent (e);
+ TQScrollView::paintEvent (e);
}
// protected virtual [base QScrollView]
-void kpViewScrollableContainer::resizeEvent (QResizeEvent *e)
+void kpViewScrollableContainer::resizeEvent (TQResizeEvent *e)
{
- QScrollView::resizeEvent (e);
+ TQScrollView::resizeEvent (e);
emit resized ();
}
diff --git a/kolourpaint/kpviewscrollablecontainer.h b/kolourpaint/kpviewscrollablecontainer.h
index 203bbd1f..ad948e9a 100644
--- a/kolourpaint/kpviewscrollablecontainer.h
+++ b/kolourpaint/kpviewscrollablecontainer.h
@@ -30,14 +30,14 @@
#define KP_VIEW_SCROLLABLE_CONTAINER_H
-#include <qpoint.h>
-#include <qscrollview.h>
-#include <qsize.h>
+#include <tqpoint.h>
+#include <tqscrollview.h>
+#include <tqsize.h>
-class QCursor;
-class QRect;
-class QTimer;
+class TQCursor;
+class TQRect;
+class TQTimer;
class kpGrip;
class kpView;
@@ -57,14 +57,14 @@ public:
};
kpGrip (GripType type,
- QWidget *parent, const char *name = 0);
+ TQWidget *parent, const char *name = 0);
virtual ~kpGrip ();
GripType type () const;
- static const QCursor &cursorForType (GripType type);
+ static const TQCursor &cursorForType (GripType type);
- QRect hotRect (bool toGlobal = false) const;
+ TQRect hotRect (bool toGlobal = false) const;
bool isDrawing () const;
@@ -74,40 +74,40 @@ signals:
void cancelledDraw ();
void endedDraw (int viewDX, int viewDY);
- void statusMessageChanged (const QString &string);
+ void statusMessageChanged (const TQString &string);
void releasedAllButtons ();
public:
- QString haventBegunDrawUserMessage () const;
+ TQString haventBegunDrawUserMessage () const;
- QString userMessage () const;
- void setUserMessage (const QString &message);
+ TQString userMessage () const;
+ void setUserMessage (const TQString &message);
protected:
void updatePixmap ();
void cancel ();
protected:
- virtual void keyReleaseEvent (QKeyEvent *e);
- virtual void mousePressEvent (QMouseEvent *e);
+ virtual void keyReleaseEvent (TQKeyEvent *e);
+ virtual void mousePressEvent (TQMouseEvent *e);
public:
- QPoint viewDeltaPoint () const;
- void mouseMovedTo (const QPoint &point, bool dueToDragScroll);
+ TQPoint viewDeltaPoint () const;
+ void mouseMovedTo (const TQPoint &point, bool dueToDragScroll);
protected:
- virtual void mouseMoveEvent (QMouseEvent *e);
- virtual void mouseReleaseEvent (QMouseEvent *e);
- virtual void resizeEvent (QResizeEvent *e);
+ virtual void mouseMoveEvent (TQMouseEvent *e);
+ virtual void mouseReleaseEvent (TQMouseEvent *e);
+ virtual void resizeEvent (TQResizeEvent *e);
- virtual void enterEvent (QEvent *e);
- virtual void leaveEvent (QEvent *e);
+ virtual void enterEvent (TQEvent *e);
+ virtual void leaveEvent (TQEvent *e);
- virtual void paintEvent (QPaintEvent *e);
+ virtual void paintEvent (TQPaintEvent *e);
protected:
GripType m_type;
- QPoint m_startPoint, m_currentPoint;
- QString m_userMessage;
+ TQPoint m_startPoint, m_currentPoint;
+ TQString m_userMessage;
bool m_shouldReleaseMouseButtons;
};
@@ -133,25 +133,25 @@ signals:
void contentsMovingSoon (int contentsX, int contentsY);
void beganDocResize ();
- void continuedDocResize (const QSize &size);
+ void continuedDocResize (const TQSize &size);
void cancelledDocResize ();
- void endedDocResize (const QSize &size);
+ void endedDocResize (const TQSize &size);
// (string.isEmpty() if kpViewScrollableContainer has nothing to say)
- void statusMessageChanged (const QString &string);
+ void statusMessageChanged (const TQString &string);
void resized ();
public:
- QSize newDocSize () const;
+ TQSize newDocSize () const;
bool haveMovedFromOriginalDocSize () const;
- QString statusMessage () const;
+ TQString statusMessage () const;
void clearStatusMessage ();
protected:
void connectGripSignals (kpGrip *grip);
- QSize newDocSize (int viewDX, int viewDY) const;
+ TQSize newDocSize (int viewDX, int viewDY) const;
void calculateDocResizingGrip ();
kpGrip *docResizingGrip () const;
@@ -159,19 +159,19 @@ protected:
int bottomResizeLineWidth () const;
int rightResizeLineWidth () const;
- QRect bottomResizeLineRect () const;
- QRect rightResizeLineRect () const;
- QRect bottomRightResizeLineRect () const;
+ TQRect bottomResizeLineRect () const;
+ TQRect rightResizeLineRect () const;
+ TQRect bottomRightResizeLineRect () const;
- QPoint mapViewToViewport (const QPoint &viewPoint);
- QRect mapViewToViewport (const QRect &viewRect);
+ TQPoint mapViewToViewport (const TQPoint &viewPoint);
+ TQRect mapViewToViewport (const TQRect &viewRect);
- QRect mapViewportToGlobal (const QRect &viewportRect);
- QRect mapViewToGlobal (const QRect &viewRect);
+ TQRect mapViewportToGlobal (const TQRect &viewportRect);
+ TQRect mapViewToGlobal (const TQRect &viewRect);
- void repaintWidgetAtResizeLineViewRect (QWidget *widget,
- const QRect &resizeLineViewRect);
- void repaintWidgetAtResizeLines (QWidget *widget);
+ void repaintWidgetAtResizeLineViewRect (TQWidget *widget,
+ const TQRect &resizeLineViewRect);
+ void repaintWidgetAtResizeLines (TQWidget *widget);
void eraseResizeLines ();
void drawResizeLines ();
@@ -185,7 +185,7 @@ protected slots:
void slotGripCancelledDraw ();
void slotGripEndedDraw (int viewDX, int viewDY);
- void slotGripStatusMessageChanged (const QString &string);
+ void slotGripStatusMessageChanged (const TQString &string);
public slots:
void recalculateStatusMessage ();
@@ -200,7 +200,7 @@ protected:
public:
// Calls setView(<widget>) after adding <widget> if it's a kpView.
- virtual void addChild (QWidget *widget, int x = 0, int y = 0);
+ virtual void addChild (TQWidget *widget, int x = 0, int y = 0);
kpView *view () const;
void setView (kpView *view);
@@ -213,10 +213,10 @@ protected slots:
public slots:
// TODO: Why the QPoint's?
// Why the need for view's zoomLevel? We have the view() anyway.
- bool beginDragScroll (const QPoint &, const QPoint &,
+ bool beginDragScroll (const TQPoint &, const TQPoint &,
int zoomLevel,
bool *didSomething);
- bool beginDragScroll (const QPoint &, const QPoint &,
+ bool beginDragScroll (const TQPoint &, const TQPoint &,
int zoomLevel);
bool endDragScroll ();
@@ -225,16 +225,16 @@ protected slots:
bool slotDragScroll ();
protected:
- QRect noDragScrollRect () const;
+ TQRect noDragScrollRect () const;
- virtual void contentsDragMoveEvent (QDragMoveEvent *e);
- virtual void contentsMouseMoveEvent (QMouseEvent *e);
- virtual void contentsWheelEvent (QWheelEvent *e);
- virtual void mouseMoveEvent (QMouseEvent *e);
- virtual bool eventFilter (QObject *watchedObject, QEvent *e);
- virtual void viewportPaintEvent (QPaintEvent *e);
- virtual void paintEvent (QPaintEvent *e);
- virtual void resizeEvent (QResizeEvent *e);
+ virtual void contentsDragMoveEvent (TQDragMoveEvent *e);
+ virtual void contentsMouseMoveEvent (TQMouseEvent *e);
+ virtual void contentsWheelEvent (TQWheelEvent *e);
+ virtual void mouseMoveEvent (TQMouseEvent *e);
+ virtual bool eventFilter (TQObject *watchedObject, TQEvent *e);
+ virtual void viewportPaintEvent (TQPaintEvent *e);
+ virtual void paintEvent (TQPaintEvent *e);
+ virtual void resizeEvent (TQResizeEvent *e);
protected:
kpMainWindow *m_mainWindow;
@@ -242,13 +242,13 @@ protected:
kpView *m_view;
kpGrip *m_bottomGrip, *m_rightGrip, *m_bottomRightGrip;
kpGrip *m_docResizingGrip;
- QTimer *m_dragScrollTimer;
+ TQTimer *m_dragScrollTimer;
int m_zoomLevel;
bool m_scrollTimerRunOnce;
int m_resizeRoundedLastViewX, m_resizeRoundedLastViewY;
int m_resizeRoundedLastViewDX, m_resizeRoundedLastViewDY;
bool m_haveMovedFromOriginalDocSize;
- QString m_gripStatusMessage;
+ TQString m_gripStatusMessage;
};
diff --git a/kolourpaint/kpwidgetmapper.cpp b/kolourpaint/kpwidgetmapper.cpp
index beb2624c..8c91556b 100644
--- a/kolourpaint/kpwidgetmapper.cpp
+++ b/kolourpaint/kpwidgetmapper.cpp
@@ -28,16 +28,16 @@
#include <kpwidgetmapper.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qwidget.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqwidget.h>
namespace kpWidgetMapper
{
-QPoint fromGlobal (const QWidget *widget, const QPoint &point)
+TQPoint fromGlobal (const TQWidget *widget, const TQPoint &point)
{
if (!widget)
return point;
@@ -45,17 +45,17 @@ QPoint fromGlobal (const QWidget *widget, const QPoint &point)
return widget->mapFromGlobal (point);
}
-QRect fromGlobal (const QWidget *widget, const QRect &rect)
+TQRect fromGlobal (const TQWidget *widget, const TQRect &rect)
{
if (!widget || !rect.isValid ())
return rect;
- QPoint topLeft = fromGlobal (widget, rect.topLeft ());
- return QRect (topLeft.x (), topLeft.y (), rect.width (), rect.height ());
+ TQPoint topLeft = fromGlobal (widget, rect.topLeft ());
+ return TQRect (topLeft.x (), topLeft.y (), rect.width (), rect.height ());
}
-QPoint toGlobal (const QWidget *widget, const QPoint &point)
+TQPoint toGlobal (const TQWidget *widget, const TQPoint &point)
{
if (!widget)
return point;
@@ -63,13 +63,13 @@ QPoint toGlobal (const QWidget *widget, const QPoint &point)
return widget->mapToGlobal (point);
}
-QRect toGlobal (const QWidget *widget, const QRect &rect)
+TQRect toGlobal (const TQWidget *widget, const TQRect &rect)
{
if (!widget || !rect.isValid ())
return rect;
- QPoint topLeft = toGlobal (widget, rect.topLeft ());
- return QRect (topLeft.x (), topLeft.y (), rect.width (), rect.height ());
+ TQPoint topLeft = toGlobal (widget, rect.topLeft ());
+ return TQRect (topLeft.x (), topLeft.y (), rect.width (), rect.height ());
}
diff --git a/kolourpaint/kpwidgetmapper.h b/kolourpaint/kpwidgetmapper.h
index b5c4c412..7fad2ec6 100644
--- a/kolourpaint/kpwidgetmapper.h
+++ b/kolourpaint/kpwidgetmapper.h
@@ -29,18 +29,18 @@
#define KP_WIDGET_MAPPER
-class QWidget;
-class QPoint;
-class QRect;
+class TQWidget;
+class TQPoint;
+class TQRect;
namespace kpWidgetMapper
{
- QPoint fromGlobal (const QWidget *widget, const QPoint &point);
- QRect fromGlobal (const QWidget *widget, const QRect &rect);
+ TQPoint fromGlobal (const TQWidget *widget, const TQPoint &point);
+ TQRect fromGlobal (const TQWidget *widget, const TQRect &rect);
- QPoint toGlobal (const QWidget *widget, const QPoint &point);
- QRect toGlobal (const QWidget *widget, const QRect &rect);
+ TQPoint toGlobal (const TQWidget *widget, const TQPoint &point);
+ TQRect toGlobal (const TQWidget *widget, const TQRect &rect);
}
diff --git a/kolourpaint/pixmapfx/kpcoloreffect.cpp b/kolourpaint/pixmapfx/kpcoloreffect.cpp
index 1660c1fa..b0e04496 100644
--- a/kolourpaint/pixmapfx/kpcoloreffect.cpp
+++ b/kolourpaint/pixmapfx/kpcoloreffect.cpp
@@ -28,8 +28,8 @@
#include <kpcoloreffect.h>
-#include <qapplication.h>
-#include <qpixmap.h>
+#include <tqapplication.h>
+#include <tqpixmap.h>
#include <kdialog.h>
#include <klocale.h>
@@ -40,7 +40,7 @@
#include <kpselection.h>
-kpColorEffectCommand::kpColorEffectCommand (const QString &name,
+kpColorEffectCommand::kpColorEffectCommand (const TQString &name,
bool actOnSelection,
kpMainWindow *mainWindow)
: kpCommand (mainWindow),
@@ -57,7 +57,7 @@ kpColorEffectCommand::~kpColorEffectCommand ()
// public virtual [base kpCommand]
-QString kpColorEffectCommand::name () const
+TQString kpColorEffectCommand::name () const
{
if (m_actOnSelection)
return i18n ("Selection: %1").arg (m_name);
@@ -80,24 +80,24 @@ void kpColorEffectCommand::execute ()
if (!doc)
return;
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
- const QPixmap oldPixmap = *doc->pixmap (m_actOnSelection);
+ const TQPixmap oldPixmap = *doc->pixmap (m_actOnSelection);
if (!isInvertible ())
{
- m_oldPixmapPtr = new QPixmap ();
+ m_oldPixmapPtr = new TQPixmap ();
*m_oldPixmapPtr = oldPixmap;
}
- QPixmap newPixmap = /*pure virtual*/applyColorEffect (oldPixmap);
+ TQPixmap newPixmap = /*pure virtual*/applyColorEffect (oldPixmap);
doc->setPixmap (m_actOnSelection, newPixmap);
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
// public virtual [base kpCommand]
@@ -107,10 +107,10 @@ void kpColorEffectCommand::unexecute ()
if (!doc)
return;
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
- QPixmap newPixmap;
+ TQPixmap newPixmap;
if (!isInvertible ())
{
@@ -127,14 +127,14 @@ void kpColorEffectCommand::unexecute ()
delete m_oldPixmapPtr; m_oldPixmapPtr = 0;
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
kpColorEffectWidget::kpColorEffectWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name)
- : QWidget (parent, name),
+ TQWidget *parent, const char *name)
+ : TQWidget (parent, name),
m_actOnSelection (actOnSelection),
m_mainWindow (mainWindow)
{
@@ -146,9 +146,9 @@ kpColorEffectWidget::~kpColorEffectWidget ()
// public
-QString kpColorEffectWidget::caption () const
+TQString kpColorEffectWidget::caption () const
{
- return QString::null;
+ return TQString::null;
}
diff --git a/kolourpaint/pixmapfx/kpcoloreffect.h b/kolourpaint/pixmapfx/kpcoloreffect.h
index 8b3dfd09..afd60a5e 100644
--- a/kolourpaint/pixmapfx/kpcoloreffect.h
+++ b/kolourpaint/pixmapfx/kpcoloreffect.h
@@ -29,12 +29,12 @@
#ifndef KP_COLOR_EFFECT_H
#define KP_COLOR_EFFECT_H
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqstring.h>
+#include <tqwidget.h>
#include <kpcommandhistory.h>
-class QPixmap;
+class TQPixmap;
class kpDocument;
class kpMainWindow;
@@ -43,12 +43,12 @@ class kpMainWindow;
class kpColorEffectCommand : public kpCommand
{
public:
- kpColorEffectCommand (const QString &name,
+ kpColorEffectCommand (const TQString &name,
bool actOnSelection,
kpMainWindow *mainWindow);
virtual ~kpColorEffectCommand ();
- virtual QString name () const;
+ virtual TQString name () const;
virtual int size () const;
public:
@@ -61,13 +61,13 @@ public:
virtual bool isInvertible () const { return false; }
protected:
- virtual QPixmap applyColorEffect (const QPixmap &pixmap) = 0;
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap) = 0;
private:
- QString m_name;
+ TQString m_name;
bool m_actOnSelection;
- QPixmap *m_oldPixmapPtr;
+ TQPixmap *m_oldPixmapPtr;
};
@@ -78,7 +78,7 @@ Q_OBJECT
public:
kpColorEffectWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name = 0);
+ TQWidget *parent, const char *name = 0);
virtual ~kpColorEffectWidget ();
signals:
@@ -91,10 +91,10 @@ signals:
void settingsChangedDelayed ();
public:
- virtual QString caption () const;
+ virtual TQString caption () const;
virtual bool isNoOp () const = 0;
- virtual QPixmap applyColorEffect (const QPixmap &pixmap) = 0;
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap) = 0;
virtual kpColorEffectCommand *createCommand () const = 0;
diff --git a/kolourpaint/pixmapfx/kpeffectbalance.cpp b/kolourpaint/pixmapfx/kpeffectbalance.cpp
index f4494d29..d4e26a9c 100644
--- a/kolourpaint/pixmapfx/kpeffectbalance.cpp
+++ b/kolourpaint/pixmapfx/kpeffectbalance.cpp
@@ -32,12 +32,12 @@
#include <math.h>
-#include <qfontmetrics.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
+#include <tqfontmetrics.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
#include <kcombobox.h>
#include <kdebug.h>
@@ -49,7 +49,7 @@
#if DEBUG_KP_EFFECT_BALANCE
- #include <qdatetime.h>
+ #include <tqdatetime.h>
#endif
@@ -127,7 +127,7 @@ static inline QRgb brightnessContrastGammaForRGB (QRgb rgb,
// public static
-QPixmap kpEffectBalanceCommand::applyColorEffect (const QPixmap &pixmap,
+TQPixmap kpEffectBalanceCommand::applyColorEffect (const TQPixmap &pixmap,
int channels,
int brightness, int contrast, int gamma)
{
@@ -138,10 +138,10 @@ QPixmap kpEffectBalanceCommand::applyColorEffect (const QPixmap &pixmap,
<< ",contrast=" << contrast
<< ",gamma=" << gamma
<< ")" << endl;
- QTime timer; timer.start ();
+ TQTime timer; timer.start ();
#endif
- QImage image = kpPixmapFX::convertToImage (pixmap);
+ TQImage image = kpPixmapFX::convertToImage (pixmap);
#if DEBUG_KP_EFFECT_BALANCE
kdDebug () << "\tconvertToImage=" << timer.restart () << endl;
#endif
@@ -234,7 +234,7 @@ QPixmap kpEffectBalanceCommand::applyColorEffect (const QPixmap &pixmap,
kdDebug () << "\teffect=" << timer.restart () << endl;
#endif
- const QPixmap retPixmap = kpPixmapFX::convertToPixmap (image);
+ const TQPixmap retPixmap = kpPixmapFX::convertToPixmap (image);
#if DEBUG_KP_EFFECT_BALANCE
kdDebug () << "\tconvertToPixmap=" << timer.restart () << endl;
#endif
@@ -243,7 +243,7 @@ QPixmap kpEffectBalanceCommand::applyColorEffect (const QPixmap &pixmap,
}
// protected virtual [base kpColorEffectCommand]
-QPixmap kpEffectBalanceCommand::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectBalanceCommand::applyColorEffect (const TQPixmap &pixmap)
{
return applyColorEffect (pixmap, m_channels,
m_brightness, m_contrast, m_gamma);
@@ -253,39 +253,39 @@ QPixmap kpEffectBalanceCommand::applyColorEffect (const QPixmap &pixmap)
kpEffectBalanceWidget::kpEffectBalanceWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: kpColorEffectWidget (actOnSelection, mainWindow, parent, name)
{
- QGridLayout *lay = new QGridLayout (this, 5, 5, marginHint (), spacingHint ());
+ TQGridLayout *lay = new TQGridLayout (this, 5, 5, marginHint (), spacingHint ());
- QLabel *brightnessLabel = new QLabel (i18n ("&Brightness:"), this);
+ TQLabel *brightnessLabel = new TQLabel (i18n ("&Brightness:"), this);
m_brightnessInput = new KIntNumInput (0/*value*/, this);
m_brightnessInput->setRange (-50, 50, 1/*step*/, true/*slider*/);
- QPushButton *brightnessResetPushButton = new QPushButton (i18n ("Re&set"), this);
+ TQPushButton *brightnessResetPushButton = new TQPushButton (i18n ("Re&set"), this);
- QLabel *contrastLabel = new QLabel (i18n ("Co&ntrast:"), this);
+ TQLabel *contrastLabel = new TQLabel (i18n ("Co&ntrast:"), this);
m_contrastInput = new KIntNumInput (0/*value*/, this);
m_contrastInput->setRange (-50, 50, 1/*step*/, true/*slider*/);
- QPushButton *contrastResetPushButton = new QPushButton (i18n ("&Reset"), this);
+ TQPushButton *contrastResetPushButton = new TQPushButton (i18n ("&Reset"), this);
- QLabel *gammaLabel = new QLabel (i18n ("&Gamma:"), this);
+ TQLabel *gammaLabel = new TQLabel (i18n ("&Gamma:"), this);
m_gammaInput = new KIntNumInput (0/*value*/, this);
m_gammaInput->setRange (-50, 50, 1/*step*/, true/*slider*/);
// TODO: This is what should be shown in the m_gammaInput spinbox
- m_gammaLabel = new QLabel (this);
+ 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.
m_gammaLabel->setMinimumWidth (m_gammaLabel->fontMetrics ().width (" 10.00 "));
m_gammaLabel->setAlignment (m_gammaLabel->alignment () | Qt::AlignRight);
- QPushButton *gammaResetPushButton = new QPushButton (i18n ("Rese&t"), this);
+ TQPushButton *gammaResetPushButton = new TQPushButton (i18n ("Rese&t"), this);
- QWidget *spaceWidget = new QLabel (this);
+ TQWidget *spaceWidget = new TQLabel (this);
spaceWidget->setFixedSize (1, spacingHint ());
- QLabel *channelLabel = new QLabel (i18n ("C&hannels:"), this);
+ TQLabel *channelLabel = new TQLabel (i18n ("C&hannels:"), this);
m_channelsComboBox = new KComboBox (this);
m_channelsComboBox->insertItem (i18n ("All"));
m_channelsComboBox->insertItem (i18n ("Red"));
@@ -293,7 +293,7 @@ kpEffectBalanceWidget::kpEffectBalanceWidget (bool actOnSelection,
m_channelsComboBox->insertItem (i18n ("Blue"));
- QPushButton *resetPushButton = new QPushButton (i18n ("Reset &All Values"), this);
+ TQPushButton *resetPushButton = new TQPushButton (i18n ("Reset &All Values"), this);
brightnessLabel->setBuddy (m_brightnessInput);
@@ -327,28 +327,28 @@ kpEffectBalanceWidget::kpEffectBalanceWidget (bool actOnSelection,
// (no need for settingsChangedDelayed() since BCG effect is so fast :))
- connect (m_brightnessInput, SIGNAL (valueChanged (int)),
- this, SIGNAL (settingsChangedNoWaitCursor ()));
- connect (m_contrastInput, SIGNAL (valueChanged (int)),
- this, SIGNAL (settingsChangedNoWaitCursor ()));
+ connect (m_brightnessInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SIGNAL (settingsChangedNoWaitCursor ()));
+ connect (m_contrastInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SIGNAL (settingsChangedNoWaitCursor ()));
- connect (m_gammaInput, SIGNAL (valueChanged (int)),
- this, SLOT (recalculateGammaLabel ()));
- connect (m_gammaInput, SIGNAL (valueChanged (int)),
- this, SIGNAL (settingsChangedNoWaitCursor ()));
+ connect (m_gammaInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SLOT (recalculateGammaLabel ()));
+ connect (m_gammaInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SIGNAL (settingsChangedNoWaitCursor ()));
- connect (m_channelsComboBox, SIGNAL (activated (int)),
- this, SIGNAL (settingsChanged ()));
+ connect (m_channelsComboBox, TQT_SIGNAL (activated (int)),
+ this, TQT_SIGNAL (settingsChanged ()));
- connect (brightnessResetPushButton, SIGNAL (clicked ()),
- this, SLOT (resetBrightness ()));
- connect (contrastResetPushButton, SIGNAL (clicked ()),
- this, SLOT (resetContrast ()));
- connect (gammaResetPushButton, SIGNAL (clicked ()),
- this, SLOT (resetGamma ()));
+ connect (brightnessResetPushButton, TQT_SIGNAL (clicked ()),
+ this, TQT_SLOT (resetBrightness ()));
+ connect (contrastResetPushButton, TQT_SIGNAL (clicked ()),
+ this, TQT_SLOT (resetContrast ()));
+ connect (gammaResetPushButton, TQT_SIGNAL (clicked ()),
+ this, TQT_SLOT (resetGamma ()));
- connect (resetPushButton, SIGNAL (clicked ()),
- this, SLOT (resetAll ()));
+ connect (resetPushButton, TQT_SIGNAL (clicked ()),
+ this, TQT_SLOT (resetAll ()));
recalculateGammaLabel ();
@@ -360,7 +360,7 @@ kpEffectBalanceWidget::~kpEffectBalanceWidget ()
// public virtual [base kpColorEffectWidget]
-QString kpEffectBalanceWidget::caption () const
+TQString kpEffectBalanceWidget::caption () const
{
return i18n ("Settings");
}
@@ -373,7 +373,7 @@ bool kpEffectBalanceWidget::isNoOp () const
}
// public virtual [base kpColorEffectWidget]
-QPixmap kpEffectBalanceWidget::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectBalanceWidget::applyColorEffect (const TQPixmap &pixmap)
{
return kpEffectBalanceCommand::applyColorEffect (pixmap,
channels (), brightness (), contrast (), gamma ());
@@ -434,7 +434,7 @@ void kpEffectBalanceWidget::recalculateGammaLabel ()
{
m_gammaLabel->setText (
" " +
- QString::number (pow (10, gamma () / 50.0),
+ TQString::number (pow (10, gamma () / 50.0),
'f'/*[-]9.9*/,
2/*precision*/) +
" ");
diff --git a/kolourpaint/pixmapfx/kpeffectbalance.h b/kolourpaint/pixmapfx/kpeffectbalance.h
index b045159f..e80bb7a6 100644
--- a/kolourpaint/pixmapfx/kpeffectbalance.h
+++ b/kolourpaint/pixmapfx/kpeffectbalance.h
@@ -32,7 +32,7 @@
#include <kpcoloreffect.h>
-class QLabel;
+class TQLabel;
class KComboBox;
class KIntNumInput;
@@ -58,12 +58,12 @@ public:
kpMainWindow *mainWindow);
virtual ~kpEffectBalanceCommand ();
- static QPixmap applyColorEffect (const QPixmap &pixmap,
+ static TQPixmap applyColorEffect (const TQPixmap &pixmap,
int channels,
int brightness, int contrast, int gamma);
protected:
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
protected:
int m_channels;
@@ -78,13 +78,13 @@ Q_OBJECT
public:
kpEffectBalanceWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name = 0);
+ TQWidget *parent, const char *name = 0);
virtual ~kpEffectBalanceWidget ();
- virtual QString caption () const;
+ virtual TQString caption () const;
virtual bool isNoOp () const;
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
virtual kpColorEffectCommand *createCommand () const;
@@ -108,7 +108,7 @@ protected:
KIntNumInput *m_brightnessInput,
*m_contrastInput,
*m_gammaInput;
- QLabel *m_gammaLabel;
+ TQLabel *m_gammaLabel;
KComboBox *m_channelsComboBox;
};
diff --git a/kolourpaint/pixmapfx/kpeffectblursharpen.cpp b/kolourpaint/pixmapfx/kpeffectblursharpen.cpp
index 50c0b27d..9986df4f 100644
--- a/kolourpaint/pixmapfx/kpeffectblursharpen.cpp
+++ b/kolourpaint/pixmapfx/kpeffectblursharpen.cpp
@@ -30,11 +30,11 @@
#include <kpeffectblursharpen.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
#include <kdebug.h>
#include <kimageeffect.h>
@@ -45,14 +45,14 @@
#include <kppixmapfx.h>
-static QString nameForType (kpEffectBlurSharpenCommand::Type type)
+static TQString nameForType (kpEffectBlurSharpenCommand::Type type)
{
if (type == kpEffectBlurSharpenCommand::Blur)
return i18n ("Soften");
else if (type == kpEffectBlurSharpenCommand::Sharpen)
return i18n ("Sharpen");
else
- return QString::null;
+ return TQString::null;
}
@@ -74,7 +74,7 @@ kpEffectBlurSharpenCommand::~kpEffectBlurSharpenCommand ()
// public static
-QPixmap kpEffectBlurSharpenCommand::apply (const QPixmap &pixmap,
+TQPixmap kpEffectBlurSharpenCommand::apply (const TQPixmap &pixmap,
Type type, double radius, double sigma,
int repeat)
{
@@ -89,12 +89,12 @@ QPixmap kpEffectBlurSharpenCommand::apply (const QPixmap &pixmap,
#endif
// (KImageEffect::(blur|sharpen)() ignores mask)
- QPixmap usePixmap = kpPixmapFX::pixmapWithDefinedTransparentPixels (
+ TQPixmap usePixmap = kpPixmapFX::pixmapWithDefinedTransparentPixels (
pixmap,
Qt::white/*arbitrarily chosen*/);
- QImage image = kpPixmapFX::convertToImage (usePixmap);
+ TQImage image = kpPixmapFX::convertToImage (usePixmap);
for (int i = 0; i < repeat; i++)
{
@@ -104,7 +104,7 @@ QPixmap kpEffectBlurSharpenCommand::apply (const QPixmap &pixmap,
image = KImageEffect::sharpen (image, radius, sigma);
}
- QPixmap retPixmap = kpPixmapFX::convertToPixmap (image);
+ TQPixmap retPixmap = kpPixmapFX::convertToPixmap (image);
// KImageEffect::(blur|sharpen)() nukes mask - restore it
@@ -116,7 +116,7 @@ QPixmap kpEffectBlurSharpenCommand::apply (const QPixmap &pixmap,
}
// protected virtual [base kpColorEffectCommand]
-QPixmap kpEffectBlurSharpenCommand::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectBlurSharpenCommand::applyColorEffect (const TQPixmap &pixmap)
{
return apply (pixmap, m_type, m_radius, m_sigma, m_repeat);
}
@@ -125,17 +125,17 @@ QPixmap kpEffectBlurSharpenCommand::applyColorEffect (const QPixmap &pixmap)
kpEffectBlurSharpenWidget::kpEffectBlurSharpenWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: kpColorEffectWidget (actOnSelection, mainWindow, parent, name)
{
- QGridLayout *lay = new QGridLayout (this, 4, 2, marginHint (), spacingHint ());
+ TQGridLayout *lay = new TQGridLayout (this, 4, 2, marginHint (), spacingHint ());
- QLabel *amountLabel = new QLabel (i18n ("&Amount:"), this);
+ TQLabel *amountLabel = new TQLabel (i18n ("&Amount:"), this);
m_amountInput = new KIntNumInput (this);
m_amountInput->setRange (-10, 10, 1/*step*/, true/*slider*/);
- m_typeLabel = new QLabel (this);
+ m_typeLabel = new TQLabel (this);
amountLabel->setBuddy (m_amountInput);
@@ -149,11 +149,11 @@ kpEffectBlurSharpenWidget::kpEffectBlurSharpenWidget (bool actOnSelection,
lay->setColStretch (1, 1);
- connect (m_amountInput, SIGNAL (valueChanged (int)),
- this, SIGNAL (settingsChangedDelayed ()));
+ connect (m_amountInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SIGNAL (settingsChangedDelayed ()));
- connect (m_amountInput, SIGNAL (valueChanged (int)),
- this, SLOT (slotUpdateTypeLabel ()));
+ connect (m_amountInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SLOT (slotUpdateTypeLabel ()));
}
kpEffectBlurSharpenWidget::~kpEffectBlurSharpenWidget ()
@@ -162,9 +162,9 @@ kpEffectBlurSharpenWidget::~kpEffectBlurSharpenWidget ()
// public virtual [base kpColorEffectWidget]
-QString kpEffectBlurSharpenWidget::caption () const
+TQString kpEffectBlurSharpenWidget::caption () const
{
- return QString::null;
+ return TQString::null;
}
@@ -175,7 +175,7 @@ bool kpEffectBlurSharpenWidget::isNoOp () const
}
// public virtual [base kpColorEffectWidget]
-QPixmap kpEffectBlurSharpenWidget::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectBlurSharpenWidget::applyColorEffect (const TQPixmap &pixmap)
{
return kpEffectBlurSharpenCommand::apply (pixmap,
type (), radius (), sigma (), repeat ());
@@ -193,7 +193,7 @@ kpColorEffectCommand *kpEffectBlurSharpenWidget::createCommand () const
// protected slot
void kpEffectBlurSharpenWidget::slotUpdateTypeLabel ()
{
- QString text = ::nameForType (type ());
+ TQString text = ::nameForType (type ());
#if DEBUG_KP_EFFECT_BLUR_SHARPEN
kdDebug () << "kpEffectBlurSharpenWidget::slotUpdateTypeLabel() text="
diff --git a/kolourpaint/pixmapfx/kpeffectblursharpen.h b/kolourpaint/pixmapfx/kpeffectblursharpen.h
index 3b12def1..54b9c993 100644
--- a/kolourpaint/pixmapfx/kpeffectblursharpen.h
+++ b/kolourpaint/pixmapfx/kpeffectblursharpen.h
@@ -35,7 +35,7 @@
#include <kpcoloreffect.h>
-class QLabel;
+class TQLabel;
class KIntNumInput;
@@ -57,12 +57,12 @@ public:
kpMainWindow *mainWindow);
virtual ~kpEffectBlurSharpenCommand ();
- static QPixmap apply (const QPixmap &pixmap,
+ static TQPixmap apply (const TQPixmap &pixmap,
Type type, double radius, double sigma,
int repeat);
protected:
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
protected:
Type m_type;
@@ -78,13 +78,13 @@ Q_OBJECT
public:
kpEffectBlurSharpenWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name = 0);
+ TQWidget *parent, const char *name = 0);
virtual ~kpEffectBlurSharpenWidget ();
- virtual QString caption () const;
+ virtual TQString caption () const;
virtual bool isNoOp () const;
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
virtual kpColorEffectCommand *createCommand () const;
@@ -98,7 +98,7 @@ protected:
int repeat () const;
KIntNumInput *m_amountInput;
- QLabel *m_typeLabel;
+ TQLabel *m_typeLabel;
};
diff --git a/kolourpaint/pixmapfx/kpeffectemboss.cpp b/kolourpaint/pixmapfx/kpeffectemboss.cpp
index e33f3a42..f58f248a 100644
--- a/kolourpaint/pixmapfx/kpeffectemboss.cpp
+++ b/kolourpaint/pixmapfx/kpeffectemboss.cpp
@@ -30,12 +30,12 @@
#include <kpeffectemboss.h>
-#include <qcheckbox.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
#include <kdebug.h>
#include <kimageeffect.h>
@@ -62,7 +62,7 @@ kpEffectEmbossCommand::~kpEffectEmbossCommand ()
// public static
-QPixmap kpEffectEmbossCommand::apply (const QPixmap &pixmap,
+TQPixmap kpEffectEmbossCommand::apply (const TQPixmap &pixmap,
double radius, double sigma,
int repeat)
{
@@ -76,19 +76,19 @@ QPixmap kpEffectEmbossCommand::apply (const QPixmap &pixmap,
#endif
// (KImageEffect::emboss() ignores mask)
- QPixmap usePixmap = kpPixmapFX::pixmapWithDefinedTransparentPixels (
+ TQPixmap usePixmap = kpPixmapFX::pixmapWithDefinedTransparentPixels (
pixmap,
Qt::white/*arbitrarily chosen*/);
- QImage image = kpPixmapFX::convertToImage (usePixmap);
+ TQImage image = kpPixmapFX::convertToImage (usePixmap);
for (int i = 0; i < repeat; i++)
{
image = KImageEffect::emboss (image, radius, sigma);
}
- QPixmap retPixmap = kpPixmapFX::convertToPixmap (image);
+ TQPixmap retPixmap = kpPixmapFX::convertToPixmap (image);
// KImageEffect::emboss() nukes mask - restore it
@@ -100,7 +100,7 @@ QPixmap kpEffectEmbossCommand::apply (const QPixmap &pixmap,
}
// protected virtual [base kpColorEffectCommand]
-QPixmap kpEffectEmbossCommand::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectEmbossCommand::applyColorEffect (const TQPixmap &pixmap)
{
return apply (pixmap, m_radius, m_sigma, m_repeat);
}
@@ -109,14 +109,14 @@ QPixmap kpEffectEmbossCommand::applyColorEffect (const QPixmap &pixmap)
kpEffectEmbossWidget::kpEffectEmbossWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: kpColorEffectWidget (actOnSelection, mainWindow, parent, name)
{
- QGridLayout *lay = new QGridLayout (this, 4, 2, marginHint (), spacingHint ());
+ TQGridLayout *lay = new TQGridLayout (this, 4, 2, marginHint (), spacingHint ());
#if 0
- QLabel *amountLabel = new QLabel (i18n ("&Amount:"), this);
+ TQLabel *amountLabel = new TQLabel (i18n ("&Amount:"), this);
m_amountInput = new KIntNumInput (this);
m_amountInput->setRange (0, 10, 1/*step*/, true/*slider*/);
m_amountInput->setSpecialValueText (i18n ("None"));
@@ -131,11 +131,11 @@ kpEffectEmbossWidget::kpEffectEmbossWidget (bool actOnSelection,
lay->setColStretch (1, 1);
- connect (m_amountInput, SIGNAL (valueChanged (int)),
- this, SIGNAL (settingsChanged ()));
+ connect (m_amountInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SIGNAL (settingsChanged ()));
#endif
- m_enableCheckBox = new QCheckBox (i18n ("E&nable"), this);
+ m_enableCheckBox = new TQCheckBox (i18n ("E&nable"), this);
lay->addMultiCellWidget (m_enableCheckBox, 0, 0, 0, 1, Qt::AlignCenter);
@@ -144,8 +144,8 @@ kpEffectEmbossWidget::kpEffectEmbossWidget (bool actOnSelection,
// (settingsChangedDelayed() instead of settingsChanged() so that the
// user can quickly press OK to apply effect to document directly and
// not have to wait for the also slow preview)
- connect (m_enableCheckBox, SIGNAL (toggled (bool)),
- this, SIGNAL (settingsChangedDelayed ()));
+ connect (m_enableCheckBox, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SIGNAL (settingsChangedDelayed ()));
}
kpEffectEmbossWidget::~kpEffectEmbossWidget ()
@@ -154,9 +154,9 @@ kpEffectEmbossWidget::~kpEffectEmbossWidget ()
// public virtual [base kpColorEffectWidget]
-QString kpEffectEmbossWidget::caption () const
+TQString kpEffectEmbossWidget::caption () const
{
- return QString::null;
+ return TQString::null;
}
@@ -168,7 +168,7 @@ bool kpEffectEmbossWidget::isNoOp () const
}
// public virtual [base kpColorEffectWidget]
-QPixmap kpEffectEmbossWidget::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectEmbossWidget::applyColorEffect (const TQPixmap &pixmap)
{
if (isNoOp ())
return pixmap;
diff --git a/kolourpaint/pixmapfx/kpeffectemboss.h b/kolourpaint/pixmapfx/kpeffectemboss.h
index 0234627f..b77f69e7 100644
--- a/kolourpaint/pixmapfx/kpeffectemboss.h
+++ b/kolourpaint/pixmapfx/kpeffectemboss.h
@@ -35,7 +35,7 @@
#include <kpcoloreffect.h>
-class QCheckBox;
+class TQCheckBox;
class KIntNumInput;
class kpMainWindow;
@@ -50,12 +50,12 @@ public:
kpMainWindow *mainWindow);
virtual ~kpEffectEmbossCommand ();
- static QPixmap apply (const QPixmap &pixmap,
+ static TQPixmap apply (const TQPixmap &pixmap,
double radius, double sigma,
int repeat);
protected:
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
protected:
double m_radius, m_sigma;
@@ -70,13 +70,13 @@ Q_OBJECT
public:
kpEffectEmbossWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name = 0);
+ TQWidget *parent, const char *name = 0);
virtual ~kpEffectEmbossWidget ();
- virtual QString caption () const;
+ virtual TQString caption () const;
virtual bool isNoOp () const;
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
virtual kpColorEffectCommand *createCommand () const;
@@ -86,7 +86,7 @@ protected:
int repeat () const;
//KIntNumInput *m_amountInput;
- QCheckBox *m_enableCheckBox;
+ TQCheckBox *m_enableCheckBox;
};
diff --git a/kolourpaint/pixmapfx/kpeffectflatten.cpp b/kolourpaint/pixmapfx/kpeffectflatten.cpp
index 6a81bca0..b8dee16c 100644
--- a/kolourpaint/pixmapfx/kpeffectflatten.cpp
+++ b/kolourpaint/pixmapfx/kpeffectflatten.cpp
@@ -30,11 +30,11 @@
#include <kpeffectflatten.h>
-#include <qcheckbox.h>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqimage.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqvbox.h>
#include <kcolorbutton.h>
#include <kconfig.h>
@@ -52,8 +52,8 @@
// kpEffectFlattenCommand
//
-kpEffectFlattenCommand::kpEffectFlattenCommand (const QColor &color1,
- const QColor &color2,
+kpEffectFlattenCommand::kpEffectFlattenCommand (const TQColor &color1,
+ const TQColor &color2,
bool actOnSelection,
kpMainWindow *mainWindow)
: kpColorEffectCommand (i18n ("Flatten"), actOnSelection, mainWindow),
@@ -67,29 +67,29 @@ kpEffectFlattenCommand::~kpEffectFlattenCommand ()
// public static
-void kpEffectFlattenCommand::apply (QPixmap *destPixmapPtr,
- const QColor &color1, const QColor &color2)
+void kpEffectFlattenCommand::apply (TQPixmap *destPixmapPtr,
+ const TQColor &color1, const TQColor &color2)
{
if (!destPixmapPtr)
return;
- QImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
+ TQImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
apply (&image, color1, color2);
*destPixmapPtr = kpPixmapFX::convertToPixmap (image);
}
// public static
-QPixmap kpEffectFlattenCommand::apply (const QPixmap &pm,
- const QColor &color1, const QColor &color2)
+TQPixmap kpEffectFlattenCommand::apply (const TQPixmap &pm,
+ const TQColor &color1, const TQColor &color2)
{
- QImage image = kpPixmapFX::convertToImage (pm);
+ TQImage image = kpPixmapFX::convertToImage (pm);
apply (&image, color1, color2);
return kpPixmapFX::convertToPixmap (image);
}
// public static
-void kpEffectFlattenCommand::apply (QImage *destImagePtr,
- const QColor &color1, const QColor &color2)
+void kpEffectFlattenCommand::apply (TQImage *destImagePtr,
+ const TQColor &color1, const TQColor &color2)
{
if (!destImagePtr)
return;
@@ -98,10 +98,10 @@ void kpEffectFlattenCommand::apply (QImage *destImagePtr,
}
// public static
-QImage kpEffectFlattenCommand::apply (const QImage &img,
- const QColor &color1, const QColor &color2)
+TQImage kpEffectFlattenCommand::apply (const TQImage &img,
+ const TQColor &color1, const TQColor &color2)
{
- QImage retImage = img;
+ TQImage retImage = img;
apply (&retImage, color1, color2);
return retImage;
}
@@ -112,7 +112,7 @@ QImage kpEffectFlattenCommand::apply (const QImage &img,
//
// protected virtual [base kpColorEffectCommand]
-QPixmap kpEffectFlattenCommand::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectFlattenCommand::applyColorEffect (const TQPixmap &pixmap)
{
return apply (pixmap, m_color1, m_color2);
}
@@ -126,12 +126,12 @@ QPixmap kpEffectFlattenCommand::applyColorEffect (const QPixmap &pixmap)
// Don't initialise globally when we probably don't have a colour
// allocation context. This way, the colours aren't sometimes invalid
// (e.g. at 8-bit).
-QColor kpEffectFlattenWidget::s_lastColor1;
-QColor kpEffectFlattenWidget::s_lastColor2;
+TQColor kpEffectFlattenWidget::s_lastColor1;
+TQColor kpEffectFlattenWidget::s_lastColor2;
kpEffectFlattenWidget::kpEffectFlattenWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent,
+ TQWidget *parent,
const char *name)
: kpColorEffectWidget (actOnSelection, mainWindow, parent, name)
{
@@ -150,9 +150,9 @@ kpEffectFlattenWidget::kpEffectFlattenWidget (bool actOnSelection,
}
- m_enableCheckBox = new QCheckBox (i18n ("E&nable"), this);
+ m_enableCheckBox = new TQCheckBox (i18n ("E&nable"), this);
- QVBox *colorButtonContainer = new QVBox (this);
+ TQVBox *colorButtonContainer = new TQVBox (this);
colorButtonContainer->setMargin (KDialog::marginHint () / 2);
colorButtonContainer->setSpacing (spacingHint ());
m_color1Button = new KColorButton (s_lastColor1, colorButtonContainer);
@@ -163,18 +163,18 @@ kpEffectFlattenWidget::kpEffectFlattenWidget (bool actOnSelection,
m_color2Button->setEnabled (false);
- QVBoxLayout *lay = new QVBoxLayout (this, marginHint (), spacingHint ());
+ TQVBoxLayout *lay = new TQVBoxLayout (this, marginHint (), spacingHint ());
lay->addWidget (m_enableCheckBox);
lay->addWidget (colorButtonContainer);
- connect (m_enableCheckBox, SIGNAL (toggled (bool)),
- this, SLOT (slotEnableChanged (bool)));
+ connect (m_enableCheckBox, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotEnableChanged (bool)));
- connect (m_color1Button, SIGNAL (changed (const QColor &)),
- this, SIGNAL (settingsChanged ()));
- connect (m_color2Button, SIGNAL (changed (const QColor &)),
- this, SIGNAL (settingsChanged ()));
+ connect (m_color1Button, TQT_SIGNAL (changed (const TQColor &)),
+ this, TQT_SIGNAL (settingsChanged ()));
+ connect (m_color2Button, TQT_SIGNAL (changed (const TQColor &)),
+ this, TQT_SIGNAL (settingsChanged ()));
}
kpEffectFlattenWidget::~kpEffectFlattenWidget ()
@@ -193,13 +193,13 @@ kpEffectFlattenWidget::~kpEffectFlattenWidget ()
// public
-QColor kpEffectFlattenWidget::color1 () const
+TQColor kpEffectFlattenWidget::color1 () const
{
return m_color1Button->color ();
}
// public
-QColor kpEffectFlattenWidget::color2 () const
+TQColor kpEffectFlattenWidget::color2 () const
{
return m_color2Button->color ();
}
@@ -210,7 +210,7 @@ QColor kpEffectFlattenWidget::color2 () const
//
// public virtual [base kpColorEffectWidget]
-QString kpEffectFlattenWidget::caption () const
+TQString kpEffectFlattenWidget::caption () const
{
return i18n ("Colors");
}
@@ -223,7 +223,7 @@ bool kpEffectFlattenWidget::isNoOp () const
}
// public virtual [base kpColorEffectWidget]
-QPixmap kpEffectFlattenWidget::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectFlattenWidget::applyColorEffect (const TQPixmap &pixmap)
{
#if DEBUG_KP_EFFECT_FLATTEN
kdDebug () << "kpEffectFlattenWidget::applyColorEffect() nop="
diff --git a/kolourpaint/pixmapfx/kpeffectflatten.h b/kolourpaint/pixmapfx/kpeffectflatten.h
index 79c9bbaf..a4f06af9 100644
--- a/kolourpaint/pixmapfx/kpeffectflatten.h
+++ b/kolourpaint/pixmapfx/kpeffectflatten.h
@@ -30,13 +30,13 @@
#define KP_EFFECT_FLATTEN_H
-#include <qcolor.h>
+#include <tqcolor.h>
#include <kpcoloreffect.h>
-class QCheckBox;
-class QImage;
+class TQCheckBox;
+class TQImage;
class KColorButton;
@@ -46,20 +46,20 @@ class kpMainWindow;
class kpEffectFlattenCommand : public kpColorEffectCommand
{
public:
- kpEffectFlattenCommand (const QColor &color1, const QColor &color2,
+ kpEffectFlattenCommand (const TQColor &color1, const TQColor &color2,
bool actOnSelection,
kpMainWindow *mainWindow);
virtual ~kpEffectFlattenCommand ();
- static void apply (QPixmap *destPixmapPtr,
- const QColor &color1, const QColor &color2);
- static QPixmap apply (const QPixmap &pm,
- const QColor &color1, const QColor &color2);
- static void apply (QImage *destImagePtr,
- const QColor &color1, const QColor &color2);
- static QImage apply (const QImage &img,
- const QColor &color1, const QColor &color2);
+ static void apply (TQPixmap *destPixmapPtr,
+ const TQColor &color1, const TQColor &color2);
+ static TQPixmap apply (const TQPixmap &pm,
+ const TQColor &color1, const TQColor &color2);
+ static void apply (TQImage *destImagePtr,
+ const TQColor &color1, const TQColor &color2);
+ static TQImage apply (const TQImage &img,
+ const TQColor &color1, const TQColor &color2);
//
@@ -67,9 +67,9 @@ public:
//
protected:
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
- QColor m_color1, m_color2;
+ TQColor m_color1, m_color2;
};
@@ -80,25 +80,25 @@ Q_OBJECT
public:
kpEffectFlattenWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name = 0);
+ TQWidget *parent, const char *name = 0);
virtual ~kpEffectFlattenWidget ();
- static QColor s_lastColor1, s_lastColor2;
+ static TQColor s_lastColor1, s_lastColor2;
- QColor color1 () const;
- QColor color2 () const;
+ TQColor color1 () const;
+ TQColor color2 () const;
//
// kpColorEffectWidget interface
//
- virtual QString caption () const;
+ virtual TQString caption () const;
virtual bool isNoOp () const;
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
virtual kpColorEffectCommand *createCommand () const;
@@ -106,7 +106,7 @@ protected slots:
void slotEnableChanged (bool enable);
protected:
- QCheckBox *m_enableCheckBox;
+ TQCheckBox *m_enableCheckBox;
KColorButton *m_color1Button, *m_color2Button;
};
diff --git a/kolourpaint/pixmapfx/kpeffectinvert.cpp b/kolourpaint/pixmapfx/kpeffectinvert.cpp
index b9bb00a8..67c1d6d0 100644
--- a/kolourpaint/pixmapfx/kpeffectinvert.cpp
+++ b/kolourpaint/pixmapfx/kpeffectinvert.cpp
@@ -30,10 +30,10 @@
#include <kpeffectinvert.h>
-#include <qcheckbox.h>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qpixmap.h>
+#include <tqcheckbox.h>
+#include <tqimage.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
#include <kdebug.h>
#include <klocale.h>
@@ -68,23 +68,23 @@ kpEffectInvertCommand::~kpEffectInvertCommand ()
// public static
-void kpEffectInvertCommand::apply (QPixmap *destPixmapPtr, int channels)
+void kpEffectInvertCommand::apply (TQPixmap *destPixmapPtr, int channels)
{
- QImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
+ TQImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
apply (&image, channels);
*destPixmapPtr = kpPixmapFX::convertToPixmap (image);
}
// public static
-QPixmap kpEffectInvertCommand::apply (const QPixmap &pm, int channels)
+TQPixmap kpEffectInvertCommand::apply (const TQPixmap &pm, int channels)
{
- QImage image = kpPixmapFX::convertToImage (pm);
+ TQImage image = kpPixmapFX::convertToImage (pm);
apply (&image, channels);
return kpPixmapFX::convertToPixmap (image);
}
// public static
-void kpEffectInvertCommand::apply (QImage *destImagePtr, int channels)
+void kpEffectInvertCommand::apply (TQImage *destImagePtr, int channels)
{
QRgb mask = qRgba ((channels & Red) ? 0xFF : 0,
(channels & Green) ? 0xFF : 0,
@@ -124,9 +124,9 @@ void kpEffectInvertCommand::apply (QImage *destImagePtr, int channels)
}
// public static
-QImage kpEffectInvertCommand::apply (const QImage &img, int channels)
+TQImage kpEffectInvertCommand::apply (const TQImage &img, int channels)
{
- QImage retImage = img;
+ TQImage retImage = img;
apply (&retImage, channels);
return retImage;
}
@@ -137,7 +137,7 @@ QImage kpEffectInvertCommand::apply (const QImage &img, int channels)
//
// protected virtual [base kpColorEffectCommand]
-QPixmap kpEffectInvertCommand::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectInvertCommand::applyColorEffect (const TQPixmap &pixmap)
{
return apply (pixmap, m_channels);
}
@@ -149,30 +149,30 @@ QPixmap kpEffectInvertCommand::applyColorEffect (const QPixmap &pixmap)
kpEffectInvertWidget::kpEffectInvertWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent,
+ TQWidget *parent,
const char *name)
: kpColorEffectWidget (actOnSelection, mainWindow, parent, name)
{
- QVBoxLayout *topLevelLay = new QVBoxLayout (this, marginHint (), spacingHint ());
+ TQVBoxLayout *topLevelLay = new TQVBoxLayout (this, marginHint (), spacingHint ());
- QWidget *centerWidget = new QWidget (this);
+ TQWidget *centerWidget = new TQWidget (this);
topLevelLay->addWidget (centerWidget, 0/*stretch*/, Qt::AlignCenter);
- QVBoxLayout *centerWidgetLay = new QVBoxLayout (centerWidget,
+ TQVBoxLayout *centerWidgetLay = new TQVBoxLayout (centerWidget,
0/*margin*/,
spacingHint ());
- m_redCheckBox = new QCheckBox (i18n ("&Red"), centerWidget);
- m_greenCheckBox = new QCheckBox (i18n ("&Green"), centerWidget);
- m_blueCheckBox = new QCheckBox (i18n ("&Blue"), centerWidget);
+ m_redCheckBox = new TQCheckBox (i18n ("&Red"), centerWidget);
+ m_greenCheckBox = new TQCheckBox (i18n ("&Green"), centerWidget);
+ m_blueCheckBox = new TQCheckBox (i18n ("&Blue"), centerWidget);
- QWidget *spaceWidget = new QWidget (centerWidget);
+ TQWidget *spaceWidget = new TQWidget (centerWidget);
spaceWidget->setFixedSize (1, spacingHint ());
- m_allCheckBox = new QCheckBox (i18n ("&All"), centerWidget);
+ m_allCheckBox = new TQCheckBox (i18n ("&All"), centerWidget);
m_redCheckBox->setChecked (false);
@@ -192,15 +192,15 @@ kpEffectInvertWidget::kpEffectInvertWidget (bool actOnSelection,
m_inSignalHandler = false;
- connect (m_redCheckBox, SIGNAL (toggled (bool)),
- this, SLOT (slotRGBCheckBoxToggled ()));
- connect (m_greenCheckBox, SIGNAL (toggled (bool)),
- this, SLOT (slotRGBCheckBoxToggled ()));
- connect (m_blueCheckBox, SIGNAL (toggled (bool)),
- this, SLOT (slotRGBCheckBoxToggled ()));
-
- connect (m_allCheckBox, SIGNAL (toggled (bool)),
- this, SLOT (slotAllCheckBoxToggled ()));
+ connect (m_redCheckBox, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotRGBCheckBoxToggled ()));
+ connect (m_greenCheckBox, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotRGBCheckBoxToggled ()));
+ connect (m_blueCheckBox, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotRGBCheckBoxToggled ()));
+
+ connect (m_allCheckBox, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotAllCheckBoxToggled ()));
}
kpEffectInvertWidget::~kpEffectInvertWidget ()
@@ -244,7 +244,7 @@ int kpEffectInvertWidget::channels () const
//
// public virtual [base kpColorEffectWidget]
-QString kpEffectInvertWidget::caption () const
+TQString kpEffectInvertWidget::caption () const
{
return i18n ("Channels");
}
@@ -257,7 +257,7 @@ bool kpEffectInvertWidget::isNoOp () const
}
// public virtual [base kpColorEffectWidget]
-QPixmap kpEffectInvertWidget::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectInvertWidget::applyColorEffect (const TQPixmap &pixmap)
{
return kpEffectInvertCommand::apply (pixmap, channels ());
}
diff --git a/kolourpaint/pixmapfx/kpeffectinvert.h b/kolourpaint/pixmapfx/kpeffectinvert.h
index 61d6cfda..a63237df 100644
--- a/kolourpaint/pixmapfx/kpeffectinvert.h
+++ b/kolourpaint/pixmapfx/kpeffectinvert.h
@@ -33,8 +33,8 @@
#include <kpcoloreffect.h>
-class QCheckBox;
-class QImage;
+class TQCheckBox;
+class TQImage;
class kpMainWindow;
@@ -59,7 +59,7 @@ public:
//
// Inverts the colours of each pixel in the given image.
- // These functions differ from QImage::invertPixels() in the following ways:
+ // These functions differ from TQImage::invertPixels() in the following ways:
//
// 1. for 8-bit images, it inverts the colours of the Colour Table
// (this means that you would get visually similar results to inversion
@@ -68,10 +68,10 @@ public:
// 2. never inverts the Alpha Buffer
//
- static void apply (QPixmap *destPixmapPtr, int channels = RGB);
- static QPixmap apply (const QPixmap &pm, int channels = RGB);
- static void apply (QImage *destImagePtr, int channels = RGB);
- static QImage apply (const QImage &img, int channels = RGB);
+ static void apply (TQPixmap *destPixmapPtr, int channels = RGB);
+ static TQPixmap apply (const TQPixmap &pm, int channels = RGB);
+ static void apply (TQImage *destImagePtr, int channels = RGB);
+ static TQImage apply (const TQImage &img, int channels = RGB);
//
@@ -82,7 +82,7 @@ public:
virtual bool isInvertible () const { return true; }
protected:
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
int m_channels;
};
@@ -95,7 +95,7 @@ Q_OBJECT
public:
kpEffectInvertWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name = 0);
+ TQWidget *parent, const char *name = 0);
virtual ~kpEffectInvertWidget ();
@@ -106,10 +106,10 @@ public:
// kpColorEffectWidget interface
//
- virtual QString caption () const;
+ virtual TQString caption () const;
virtual bool isNoOp () const;
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
virtual kpColorEffectCommand *createCommand () const;
@@ -118,7 +118,7 @@ protected slots:
void slotAllCheckBoxToggled ();
protected:
- QCheckBox *m_redCheckBox, *m_greenCheckBox, *m_blueCheckBox,
+ TQCheckBox *m_redCheckBox, *m_greenCheckBox, *m_blueCheckBox,
*m_allCheckBox;
// blockSignals() didn't seem to work
diff --git a/kolourpaint/pixmapfx/kpeffectreducecolors.cpp b/kolourpaint/pixmapfx/kpeffectreducecolors.cpp
index b6eb7a42..44fd7ea7 100644
--- a/kolourpaint/pixmapfx/kpeffectreducecolors.cpp
+++ b/kolourpaint/pixmapfx/kpeffectreducecolors.cpp
@@ -30,12 +30,12 @@
#include <kpeffectreducecolors.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqimage.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqradiobutton.h>
#include <kdebug.h>
#include <klocale.h>
@@ -43,7 +43,7 @@
#include <kppixmapfx.h>
-QImage convertImageDepth (const QImage &image, int depth, bool dither)
+TQImage convertImageDepth (const TQImage &image, int depth, bool dither)
{
#if DEBUG_KP_EFFECT_REDUCE_COLORS
kdDebug () << "::convertImageDepth() changing image (w=" << image.width ()
@@ -73,7 +73,7 @@ QImage convertImageDepth (const QImage &image, int depth, bool dither)
#endif
- // Hack around Qt's braindead QImage::convertDepth(1, ...) (with
+ // Hack around Qt'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
@@ -89,8 +89,8 @@ QImage convertImageDepth (const QImage &image, int depth, bool dither)
bool moreThan2Colors = false;
- QImage monoImage (image.width (), image.height (),
- 1/*depth*/, 2/*numColors*/, QImage::LittleEndian);
+ TQImage monoImage (image.width (), image.height (),
+ 1/*depth*/, 2/*numColors*/, TQImage::LittleEndian);
#if DEBUG_KP_EFFECT_REDUCE_COLORS
kdDebug () << "\t\tinitialising output image w=" << monoImage.width ()
<< ",h=" << monoImage.height ()
@@ -153,7 +153,7 @@ QImage convertImageDepth (const QImage &image, int depth, bool dither)
}
- QImage retImage = image.convertDepth (depth,
+ TQImage retImage = image.convertDepth (depth,
Qt::AutoColor |
(dither ? Qt::DiffuseDither : Qt::ThresholdDither) |
Qt::ThresholdAlphaDither |
@@ -193,7 +193,7 @@ kpEffectReduceColorsCommand::~kpEffectReduceColorsCommand ()
// public
-QString kpEffectReduceColorsCommand::commandName (int depth, int dither) const
+TQString kpEffectReduceColorsCommand::commandName (int depth, int dither) const
{
if (depth == 1)
{
@@ -211,13 +211,13 @@ QString kpEffectReduceColorsCommand::commandName (int depth, int dither) const
}
else
{
- return QString::null;
+ return TQString::null;
}
}
// public static
-void kpEffectReduceColorsCommand::apply (QPixmap *destPixmapPtr, int depth, bool dither)
+void kpEffectReduceColorsCommand::apply (TQPixmap *destPixmapPtr, int depth, bool dither)
{
if (!destPixmapPtr)
return;
@@ -226,7 +226,7 @@ void kpEffectReduceColorsCommand::apply (QPixmap *destPixmapPtr, int depth, bool
return;
- QImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
+ TQImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
image = ::convertImageDepth (image, depth, dither);
@@ -235,12 +235,12 @@ void kpEffectReduceColorsCommand::apply (QPixmap *destPixmapPtr, int depth, bool
return;
- QPixmap pixmap = kpPixmapFX::convertToPixmap (image, false/*no dither*/);
+ TQPixmap pixmap = kpPixmapFX::convertToPixmap (image, false/*no dither*/);
// HACK: The above "image.convertDepth()" erases the Alpha Channel
// (at least for monochrome).
- // qpixmap.html says "alpha masks on monochrome images are ignored."
+ // tqpixmap.html says "alpha masks on monochrome images are ignored."
//
// Put the mask back.
//
@@ -251,9 +251,9 @@ void kpEffectReduceColorsCommand::apply (QPixmap *destPixmapPtr, int depth, bool
}
// public static
-QPixmap kpEffectReduceColorsCommand::apply (const QPixmap &pm, int depth, bool dither)
+TQPixmap kpEffectReduceColorsCommand::apply (const TQPixmap &pm, int depth, bool dither)
{
- QPixmap ret = pm;
+ TQPixmap ret = pm;
apply (&ret, depth, dither);
return ret;
}
@@ -264,7 +264,7 @@ QPixmap kpEffectReduceColorsCommand::apply (const QPixmap &pm, int depth, bool d
//
// protected virtual [base kpColorEffectCommand]
-QPixmap kpEffectReduceColorsCommand::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectReduceColorsCommand::applyColorEffect (const TQPixmap &pixmap)
{
return apply (pixmap, m_depth, m_dither);
}
@@ -276,27 +276,27 @@ QPixmap kpEffectReduceColorsCommand::applyColorEffect (const QPixmap &pixmap)
kpEffectReduceColorsWidget::kpEffectReduceColorsWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent,
+ TQWidget *parent,
const char *name)
: kpColorEffectWidget (actOnSelection, mainWindow, parent, name)
{
- QVBoxLayout *lay = new QVBoxLayout (this, marginHint (), spacingHint ());
+ TQVBoxLayout *lay = new TQVBoxLayout (this, marginHint (), spacingHint ());
m_blackAndWhiteRadioButton =
- new QRadioButton (i18n ("&Monochrome"), this);
+ new TQRadioButton (i18n ("&Monochrome"), this);
m_blackAndWhiteDitheredRadioButton =
- new QRadioButton (i18n ("Mo&nochrome (dithered)"), this);
+ new TQRadioButton (i18n ("Mo&nochrome (dithered)"), this);
- m_8BitRadioButton = new QRadioButton (i18n ("256 co&lor"), this);
+ m_8BitRadioButton = new TQRadioButton (i18n ("256 co&lor"), this);
- m_8BitDitheredRadioButton = new QRadioButton (i18n ("256 colo&r (dithered)"), this);
+ m_8BitDitheredRadioButton = new TQRadioButton (i18n ("256 colo&r (dithered)"), this);
- m_24BitRadioButton = new QRadioButton (i18n ("24-&bit color"), this);
+ m_24BitRadioButton = new TQRadioButton (i18n ("24-&bit color"), this);
- QButtonGroup *buttonGroup = new QButtonGroup (this);
+ TQButtonGroup *buttonGroup = new TQButtonGroup (this);
buttonGroup->hide ();
buttonGroup->insert (m_blackAndWhiteRadioButton);
@@ -306,7 +306,7 @@ kpEffectReduceColorsWidget::kpEffectReduceColorsWidget (bool actOnSelection,
buttonGroup->insert (m_24BitRadioButton);
- const int screenDepth = QPixmap::defaultDepth ();
+ const int screenDepth = TQPixmap::defaultDepth ();
#if DEBUG_KP_EFFECT_REDUCE_COLORS
kdDebug () << "kpEffectReduceColorsWidget::<ctor> screenDepth="
<< screenDepth
@@ -361,16 +361,16 @@ kpEffectReduceColorsWidget::kpEffectReduceColorsWidget (bool actOnSelection,
lay->addWidget (m_24BitRadioButton);
- connect (m_blackAndWhiteRadioButton, SIGNAL (toggled (bool)),
- this, SIGNAL (settingsChanged ()));
- connect (m_blackAndWhiteDitheredRadioButton, SIGNAL (toggled (bool)),
- this, SIGNAL (settingsChanged ()));
- connect (m_8BitRadioButton, SIGNAL (toggled (bool)),
- this, SIGNAL (settingsChanged ()));
- connect (m_8BitDitheredRadioButton, SIGNAL (toggled (bool)),
- this, SIGNAL (settingsChanged ()));
- connect (m_24BitRadioButton, SIGNAL (toggled (bool)),
- this, SIGNAL (settingsChanged ()));
+ connect (m_blackAndWhiteRadioButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SIGNAL (settingsChanged ()));
+ connect (m_blackAndWhiteDitheredRadioButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SIGNAL (settingsChanged ()));
+ connect (m_8BitRadioButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SIGNAL (settingsChanged ()));
+ connect (m_8BitDitheredRadioButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SIGNAL (settingsChanged ()));
+ connect (m_24BitRadioButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SIGNAL (settingsChanged ()));
}
kpEffectReduceColorsWidget::~kpEffectReduceColorsWidget ()
@@ -414,7 +414,7 @@ bool kpEffectReduceColorsWidget::dither () const
//
// public virtual [base kpColorEffectWidget]
-QString kpEffectReduceColorsWidget::caption () const
+TQString kpEffectReduceColorsWidget::caption () const
{
return i18n ("Reduce To");
}
@@ -427,7 +427,7 @@ bool kpEffectReduceColorsWidget::isNoOp () const
}
// public virtual [base kpColorEffectWidget]
-QPixmap kpEffectReduceColorsWidget::applyColorEffect (const QPixmap &pixmap)
+TQPixmap kpEffectReduceColorsWidget::applyColorEffect (const TQPixmap &pixmap)
{
return kpEffectReduceColorsCommand::apply (pixmap, depth (), dither ());
}
diff --git a/kolourpaint/pixmapfx/kpeffectreducecolors.h b/kolourpaint/pixmapfx/kpeffectreducecolors.h
index a14cffc7..bf44ef3e 100644
--- a/kolourpaint/pixmapfx/kpeffectreducecolors.h
+++ b/kolourpaint/pixmapfx/kpeffectreducecolors.h
@@ -33,13 +33,13 @@
#include <kpcoloreffect.h>
-class QRadioButton;
-class QImage;
+class TQRadioButton;
+class TQImage;
class kpMainWindow;
-QImage convertImageDepth (const QImage &image, int depth, bool dither);
+TQImage convertImageDepth (const TQImage &image, int depth, bool dither);
class kpEffectReduceColorsCommand : public kpColorEffectCommand
@@ -51,11 +51,11 @@ public:
kpMainWindow *mainWindow);
virtual ~kpEffectReduceColorsCommand ();
- QString commandName (int depth, int dither) const;
+ TQString commandName (int depth, int dither) const;
// (always preserves mask)
- static void apply (QPixmap *destPixmapPtr, int depth, bool dither);
- static QPixmap apply (const QPixmap &pm, int depth, bool dither);
+ static void apply (TQPixmap *destPixmapPtr, int depth, bool dither);
+ static TQPixmap apply (const TQPixmap &pm, int depth, bool dither);
//
@@ -63,7 +63,7 @@ public:
//
protected:
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
int m_depth;
bool m_dither;
@@ -77,7 +77,7 @@ Q_OBJECT
public:
kpEffectReduceColorsWidget (bool actOnSelection,
kpMainWindow *mainWindow,
- QWidget *parent, const char *name = 0);
+ TQWidget *parent, const char *name = 0);
virtual ~kpEffectReduceColorsWidget ();
@@ -89,20 +89,20 @@ public:
// kpColorEffectWidget interface
//
- virtual QString caption () const;
+ virtual TQString caption () const;
virtual bool isNoOp () const;
- virtual QPixmap applyColorEffect (const QPixmap &pixmap);
+ virtual TQPixmap applyColorEffect (const TQPixmap &pixmap);
virtual kpColorEffectCommand *createCommand () const;
protected:
- QRadioButton *m_blackAndWhiteRadioButton,
+ TQRadioButton *m_blackAndWhiteRadioButton,
*m_blackAndWhiteDitheredRadioButton,
*m_8BitRadioButton,
*m_8BitDitheredRadioButton,
*m_24BitRadioButton;
- QRadioButton *m_defaultRadioButton;
+ TQRadioButton *m_defaultRadioButton;
};
diff --git a/kolourpaint/pixmapfx/kpeffectsdialog.cpp b/kolourpaint/pixmapfx/kpeffectsdialog.cpp
index 666f81cf..90dfbd32 100644
--- a/kolourpaint/pixmapfx/kpeffectsdialog.cpp
+++ b/kolourpaint/pixmapfx/kpeffectsdialog.cpp
@@ -30,11 +30,11 @@
#include <kpeffectsdialog.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kcombobox.h>
@@ -63,12 +63,12 @@ kpEffectsDialog::kpEffectsDialog (bool actOnSelection,
const char *name)
: kpToolPreviewDialog (kpToolPreviewDialog::Preview,
true/*reserve top row*/,
- QString::null/*caption*/,
- QString::null/*afterActionText (no Dimensions Group Box)*/,
+ TQString::null/*caption*/,
+ TQString::null/*afterActionText (no Dimensions Group Box)*/,
actOnSelection,
parent,
name),
- m_delayedUpdateTimer (new QTimer (this)),
+ m_delayedUpdateTimer (new TQTimer (this)),
m_effectsComboBox (0),
m_settingsGroupBox (0),
m_settingsLayout (0),
@@ -84,16 +84,16 @@ kpEffectsDialog::kpEffectsDialog (bool actOnSelection,
setCaption (i18n ("More Image Effects"));
- connect (m_delayedUpdateTimer, SIGNAL (timeout ()),
- this, SLOT (slotUpdateWithWaitCursor ()));
+ connect (m_delayedUpdateTimer, TQT_SIGNAL (timeout ()),
+ this, TQT_SLOT (slotUpdateWithWaitCursor ()));
- QHBox *effectContainer = new QHBox (mainWidget ());
+ TQHBox *effectContainer = new TQHBox (mainWidget ());
effectContainer->setSpacing (spacingHint () * 4
- /*need more space for QGroupBox titles*/);
+ /*need more space for TQGroupBox titles*/);
effectContainer->setMargin (0);
- QLabel *label = new QLabel (i18n ("&Effect:"), effectContainer);
+ TQLabel *label = new TQLabel (i18n ("&Effect:"), effectContainer);
m_effectsComboBox = new KComboBox (effectContainer);
m_effectsComboBox->insertItem (i18n ("Balance"));
@@ -109,15 +109,15 @@ kpEffectsDialog::kpEffectsDialog (bool actOnSelection,
addCustomWidgetToFront (effectContainer);
- m_settingsGroupBox = new QGroupBox (mainWidget ());
- m_settingsLayout = new QVBoxLayout (m_settingsGroupBox,
+ m_settingsGroupBox = new TQGroupBox (mainWidget ());
+ m_settingsLayout = new TQVBoxLayout (m_settingsGroupBox,
marginHint () * 2,
spacingHint ());
addCustomWidgetToBack (m_settingsGroupBox);
- connect (m_effectsComboBox, SIGNAL (activated (int)),
- this, SLOT (selectEffect (int)));
+ connect (m_effectsComboBox, TQT_SIGNAL (activated (int)),
+ this, TQT_SLOT (selectEffect (int)));
selectEffect (0);
@@ -157,21 +157,21 @@ kpColorEffectCommand *kpEffectsDialog::createCommand () const
// protected virtual [base kpToolPreviewDialog]
-QSize kpEffectsDialog::newDimensions () const
+TQSize kpEffectsDialog::newDimensions () const
{
kpDocument *doc = document ();
if (!doc)
- return QSize ();
+ return TQSize ();
- return QSize (doc->width (m_actOnSelection),
+ return TQSize (doc->width (m_actOnSelection),
doc->height (m_actOnSelection));
}
// protected virtual [base kpToolPreviewDialog]
-QPixmap kpEffectsDialog::transformPixmap (const QPixmap &pixmap,
+TQPixmap kpEffectsDialog::transformPixmap (const TQPixmap &pixmap,
int targetWidth, int targetHeight) const
{
- QPixmap pixmapWithEffect;
+ TQPixmap pixmapWithEffect;
if (m_colorEffectWidget)
pixmapWithEffect = m_colorEffectWidget->applyColorEffect (pixmap);
@@ -209,7 +209,7 @@ void kpEffectsDialog::selectEffect (int which)
m_colorEffectWidget = 0;
- m_settingsGroupBox->setCaption (QString::null);
+ m_settingsGroupBox->setCaption (TQString::null);
#define CREATE_EFFECT_WIDGET(name) \
m_colorEffectWidget = new name (m_actOnSelection, \
@@ -255,12 +255,12 @@ void kpEffectsDialog::selectEffect (int which)
// Don't resize the preview when showing the widget:
// TODO: actually work
- QSize previewGroupBoxMinSize = m_previewGroupBox->minimumSize ();
- QSize previewGroupBoxMaxSize = m_previewGroupBox->maximumSize ();
- QLayout::ResizeMode previewGroupBoxResizeMode =
+ TQSize previewGroupBoxMinSize = m_previewGroupBox->minimumSize ();
+ TQSize previewGroupBoxMaxSize = m_previewGroupBox->maximumSize ();
+ TQLayout::ResizeMode previewGroupBoxResizeMode =
m_previewGroupBox->layout () ?
m_previewGroupBox->layout ()->resizeMode () :
- QLayout::Auto;
+ TQLayout::Auto;
#if DEBUG_KP_EFFECTS_DIALOG
kdDebug () << "\tpreviewGroupBox: minSize=" << previewGroupBoxMinSize
<< " maxSize=" << previewGroupBoxMaxSize
@@ -271,7 +271,7 @@ void kpEffectsDialog::selectEffect (int which)
#endif
if (m_previewGroupBox->layout ())
- m_previewGroupBox->layout ()->setResizeMode (QLayout::FreeResize);
+ m_previewGroupBox->layout ()->setResizeMode (TQLayout::FreeResize);
#if DEBUG_KP_EFFECTS_DIALOG
kdDebug () << "\tafter set resizeMode, previewGroupBox.size="
<< m_previewGroupBox->size () << endl;
@@ -308,12 +308,12 @@ void kpEffectsDialog::selectEffect (int which)
#endif
- connect (m_colorEffectWidget, SIGNAL (settingsChangedNoWaitCursor ()),
- this, SLOT (slotUpdate ()));
- connect (m_colorEffectWidget, SIGNAL (settingsChanged ()),
- this, SLOT (slotUpdateWithWaitCursor ()));
- connect (m_colorEffectWidget, SIGNAL (settingsChangedDelayed ()),
- this, SLOT (slotDelayedUpdate ()));
+ connect (m_colorEffectWidget, TQT_SIGNAL (settingsChangedNoWaitCursor ()),
+ this, TQT_SLOT (slotUpdate ()));
+ connect (m_colorEffectWidget, TQT_SIGNAL (settingsChanged ()),
+ this, TQT_SLOT (slotUpdateWithWaitCursor ()));
+ connect (m_colorEffectWidget, TQT_SIGNAL (settingsChangedDelayed ()),
+ this, TQT_SLOT (slotDelayedUpdate ()));
slotUpdateWithWaitCursor ();
#if DEBUG_KP_EFFECTS_DIALOG
kdDebug () << "\tafter slotUpdateWithWaitCursor, previewGroupBox.size="
diff --git a/kolourpaint/pixmapfx/kpeffectsdialog.h b/kolourpaint/pixmapfx/kpeffectsdialog.h
index fe7265cc..c0086cbb 100644
--- a/kolourpaint/pixmapfx/kpeffectsdialog.h
+++ b/kolourpaint/pixmapfx/kpeffectsdialog.h
@@ -33,10 +33,10 @@
#include <kptoolpreviewdialog.h>
-class QGroupBox;
-class QStringList;
-class QTimer;
-class QVBoxLayout;
+class TQGroupBox;
+class TQStringList;
+class TQTimer;
+class TQVBoxLayout;
class KComboBox;
@@ -59,8 +59,8 @@ public:
kpColorEffectCommand *createCommand () const;
protected:
- virtual QSize newDimensions () const;
- virtual QPixmap transformPixmap (const QPixmap &pixmap,
+ virtual TQSize newDimensions () const;
+ virtual TQPixmap transformPixmap (const TQPixmap &pixmap,
int targetWidth, int targetHeight) const;
public:
@@ -77,11 +77,11 @@ protected slots:
protected:
static int s_lastWidth, s_lastHeight;
- QTimer *m_delayedUpdateTimer;
+ TQTimer *m_delayedUpdateTimer;
KComboBox *m_effectsComboBox;
- QGroupBox *m_settingsGroupBox;
- QVBoxLayout *m_settingsLayout;
+ TQGroupBox *m_settingsGroupBox;
+ TQVBoxLayout *m_settingsLayout;
kpColorEffectWidget *m_colorEffectWidget;
};
diff --git a/kolourpaint/pixmapfx/kpfloodfill.cpp b/kolourpaint/pixmapfx/kpfloodfill.cpp
index 602e8acf..55238f2d 100644
--- a/kolourpaint/pixmapfx/kpfloodfill.cpp
+++ b/kolourpaint/pixmapfx/kpfloodfill.cpp
@@ -31,10 +31,10 @@
#include <kpfloodfill.h>
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <kdebug.h>
#include <kpdefs.h>
@@ -43,7 +43,7 @@
#include <kptool.h>
-kpFloodFill::kpFloodFill (QPixmap *pixmap, int x, int y,
+kpFloodFill::kpFloodFill (TQPixmap *pixmap, int x, int y,
const kpColor &color, int processedColorSimilarity)
: m_pixmapPtr (pixmap), m_x (x), m_y (y),
m_color (color), m_processedColorSimilarity (processedColorSimilarity),
@@ -57,7 +57,7 @@ kpFloodFill::~kpFloodFill ()
// private
-int kpFloodFill::fillLinesListSize (const QValueList <kpFloodFill::FillLine> &fillLines) const
+int kpFloodFill::fillLinesListSize (const TQValueList <kpFloodFill::FillLine> &fillLines) const
{
return (fillLines.size () * kpFloodFill::FillLine::size ());
}
@@ -66,7 +66,7 @@ int kpFloodFill::fillLinesListSize (const QValueList <kpFloodFill::FillLine> &fi
int kpFloodFill::size () const
{
int fillLinesCacheSize = 0;
- for (QValueVector < QValueList <kpFloodFill::FillLine > >::const_iterator it = m_fillLinesCache.begin ();
+ for (TQValueVector < TQValueList <kpFloodFill::FillLine > >::const_iterator it = m_fillLinesCache.begin ();
it != m_fillLinesCache.end ();
it++)
{
@@ -79,7 +79,7 @@ int kpFloodFill::size () const
}
-QRect kpFloodFill::boundingRect () const
+TQRect kpFloodFill::boundingRect () const
{
return m_boundingRect;
}
@@ -95,10 +95,10 @@ bool kpFloodFill::fill ()
// not trying to do a NOP fill
if (m_boundingRect.isValid ())
{
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
- QPainter painter, maskPainter;
- QBitmap maskBitmap;
+ TQPainter painter, maskPainter;
+ TQBitmap maskBitmap;
if (m_pixmapPtr->mask () || m_color.isTransparent ())
{
@@ -113,13 +113,13 @@ bool kpFloodFill::fill ()
painter.setPen (m_color.toQColor ());
}
- const QValueList <FillLine>::ConstIterator fillLinesEnd = m_fillLines.end ();
- for (QValueList <FillLine>::ConstIterator it = m_fillLines.begin ();
+ const TQValueList <FillLine>::ConstIterator fillLinesEnd = m_fillLines.end ();
+ for (TQValueList <FillLine>::ConstIterator it = m_fillLines.begin ();
it != fillLinesEnd;
it++)
{
- QPoint p1 = QPoint ((*it).m_x1, (*it).m_y);
- QPoint p2 = QPoint ((*it).m_x2, (*it).m_y);
+ TQPoint p1 = TQPoint ((*it).m_x1, (*it).m_y);
+ TQPoint p2 = TQPoint ((*it).m_x2, (*it).m_y);
if (painter.isActive ())
painter.drawLine (p1, p2);
@@ -137,7 +137,7 @@ bool kpFloodFill::fill ()
if (!maskBitmap.isNull ())
m_pixmapPtr->setMask (maskBitmap);
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
else
{
@@ -155,7 +155,7 @@ bool kpFloodFill::prepareColorToChange ()
kdDebug () << "kpFloodFill::prepareColorToChange" << endl;
#endif
- m_colorToChange = kpPixmapFX::getColorAtPixel (*m_pixmapPtr, QPoint (m_x, m_y));
+ m_colorToChange = kpPixmapFX::getColorAtPixel (*m_pixmapPtr, TQPoint (m_x, m_y));
if (m_colorToChange.isOpaque ())
{
@@ -184,7 +184,7 @@ bool kpFloodFill::prepare ()
#if DEBUG_KP_FLOOD_FILL && 1
kdDebug () << "kpFloodFill::prepare()" << endl;
#endif
- m_boundingRect = QRect ();
+ m_boundingRect = TQRect ();
if (m_initState < 1 && !prepareColorToChange ())
{
@@ -213,7 +213,7 @@ bool kpFloodFill::prepare ()
m_image = kpPixmapFX::convertToImage (*m_pixmapPtr);
if (m_image.isNull ())
{
- kdError () << "kpFloodFill::prepare() could not convert to QImage" << endl;
+ kdError () << "kpFloodFill::prepare() could not convert to TQImage" << endl;
return false;
}
@@ -231,7 +231,7 @@ bool kpFloodFill::prepare ()
// draw initial line
addLine (m_y, findMinX (m_y, m_x), findMaxX (m_y, m_x));
- for (QValueList <FillLine>::ConstIterator it = m_fillLines.begin ();
+ for (TQValueList <FillLine>::ConstIterator it = m_fillLines.begin ();
it != m_fillLines.end ();
it++)
{
@@ -267,7 +267,7 @@ void kpFloodFill::addLine (int y, int x1, int x2)
m_fillLines.append (FillLine (y, x1, x2));
m_fillLinesCache [y].append (FillLine (y /* OPT */, x1, x2));
- m_boundingRect = m_boundingRect.unite (QRect (QPoint (x1, y), QPoint (x2, y)));
+ m_boundingRect = m_boundingRect.unite (TQRect (TQPoint (x1, y), TQPoint (x2, y)));
}
kpColor kpFloodFill::pixelColor (int x, int y, bool *beenHere) const
@@ -283,8 +283,8 @@ kpColor kpFloodFill::pixelColor (int x, int y, bool *beenHere) const
return kpColor::invalid;
}
- const QValueList <FillLine>::ConstIterator theEnd = m_fillLinesCache [y].end ();
- for (QValueList <FillLine>::ConstIterator it = m_fillLinesCache [y].begin ();
+ const TQValueList <FillLine>::ConstIterator theEnd = m_fillLinesCache [y].end ();
+ for (TQValueList <FillLine>::ConstIterator it = m_fillLinesCache [y].begin ();
it != theEnd;
it++)
{
@@ -296,7 +296,7 @@ kpColor kpFloodFill::pixelColor (int x, int y, bool *beenHere) const
}
}
- return kpPixmapFX::getColorAtPixel (m_image, QPoint (x, y));
+ return kpPixmapFX::getColorAtPixel (m_image, TQPoint (x, y));
}
bool kpFloodFill::shouldGoTo (int x, int y) const
diff --git a/kolourpaint/pixmapfx/kpfloodfill.h b/kolourpaint/pixmapfx/kpfloodfill.h
index 5c0d8001..57cb5648 100644
--- a/kolourpaint/pixmapfx/kpfloodfill.h
+++ b/kolourpaint/pixmapfx/kpfloodfill.h
@@ -29,18 +29,18 @@
#ifndef __kpfloodfill_h__
#define __kpfloodfill_h__
-#include <qimage.h>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
+#include <tqimage.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
#include <kpcolor.h>
-class QPixmap;
+class TQPixmap;
class kpFloodFill
{
public:
- kpFloodFill (QPixmap *pixmap, int x, int y,
+ kpFloodFill (TQPixmap *pixmap, int x, int y,
const kpColor &color,
int processedColorSimilarity);
~kpFloodFill ();
@@ -57,19 +57,19 @@ public:
kpColor colorToChange () const { return m_colorToChange; };
bool prepare ();
- QRect boundingRect () const; // only valid after prepare()
+ TQRect boundingRect () const; // only valid after prepare()
bool fill ();
private:
- QPixmap *m_pixmapPtr;
+ TQPixmap *m_pixmapPtr;
int m_x, m_y;
kpColor m_color;
int m_processedColorSimilarity;
int m_initState;
- QRect m_boundingRect;
+ TQRect m_boundingRect;
struct FillLine
{
@@ -86,7 +86,7 @@ private:
int m_y, m_x1, m_x2;
};
- int fillLinesListSize (const QValueList <kpFloodFill::FillLine> &fillLines) const;
+ int fillLinesListSize (const TQValueList <kpFloodFill::FillLine> &fillLines) const;
void addLine (int y, int x1, int x2);
kpColor pixelColor (int x, int y, bool *beenHere = 0) const;
@@ -95,11 +95,11 @@ private:
int findMinX (int y, int x) const;
int findMaxX (int y, int x) const;
- QValueList <FillLine> m_fillLines;
+ TQValueList <FillLine> m_fillLines;
// Init info
- QImage m_image;
- QValueVector < QValueList <FillLine> > m_fillLinesCache;
+ TQImage m_image;
+ TQValueVector < TQValueList <FillLine> > m_fillLinesCache;
kpColor m_colorToChange;
};
diff --git a/kolourpaint/pixmapfx/kppixmapfx.cpp b/kolourpaint/pixmapfx/kppixmapfx.cpp
index 1bd0b173..5457ef50 100644
--- a/kolourpaint/pixmapfx/kppixmapfx.cpp
+++ b/kolourpaint/pixmapfx/kppixmapfx.cpp
@@ -33,15 +33,15 @@
#include <math.h>
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qdatetime.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qpointarray.h>
-#include <qrect.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqdatetime.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqpointarray.h>
+#include <tqrect.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -87,17 +87,17 @@ int kpPixmapFX::multiplyDimensions (int lhs, int rhs)
//
-// QPixmap Statistics
+// TQPixmap Statistics
//
// public static
-int kpPixmapFX::pixmapArea (const QPixmap &pixmap)
+int kpPixmapFX::pixmapArea (const TQPixmap &pixmap)
{
return kpPixmapFX::pixmapArea (pixmap.width (), pixmap.height ());
}
// public static
-int kpPixmapFX::pixmapArea (const QPixmap *pixmap)
+int kpPixmapFX::pixmapArea (const TQPixmap *pixmap)
{
return (pixmap ? kpPixmapFX::pixmapArea (*pixmap) : 0);
}
@@ -110,14 +110,14 @@ int kpPixmapFX::pixmapArea (int width, int height)
// public static
-int kpPixmapFX::pixmapSize (const QPixmap &pixmap)
+int kpPixmapFX::pixmapSize (const TQPixmap &pixmap)
{
return kpPixmapFX::pixmapSize (pixmap.width (), pixmap.height (),
pixmap.depth ());
}
// public static
-int kpPixmapFX::pixmapSize (const QPixmap *pixmap)
+int kpPixmapFX::pixmapSize (const TQPixmap *pixmap)
{
return (pixmap ? kpPixmapFX::pixmapSize (*pixmap) : 0);
}
@@ -142,13 +142,13 @@ int kpPixmapFX::pixmapSize (int width, int height, int depth)
// public static
-int kpPixmapFX::imageSize (const QImage &image)
+int kpPixmapFX::imageSize (const TQImage &image)
{
return kpPixmapFX::imageSize (image.width (), image.height (), image.depth ());
}
// public static
-int kpPixmapFX::imageSize (const QImage *image)
+int kpPixmapFX::imageSize (const TQImage *image)
{
return (image ? kpPixmapFX::imageSize (*image) : 0);
}
@@ -187,49 +187,49 @@ int kpPixmapFX::selectionSize (const kpSelection *sel)
// public static
-int kpPixmapFX::stringSize (const QString &string)
+int kpPixmapFX::stringSize (const TQString &string)
{
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "kpPixmapFX::stringSize(" << string << ")"
<< " len=" << string.length ()
- << " sizeof(QChar)=" << sizeof (QChar)
+ << " sizeof(TQChar)=" << sizeof (TQChar)
<< endl;
#endif
- return string.length () * sizeof (QChar);
+ return string.length () * sizeof (TQChar);
}
// public static
-int kpPixmapFX::pointArraySize (const QPointArray &points)
+int kpPixmapFX::pointArraySize (const TQPointArray &points)
{
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "kpPixmapFX::pointArraySize() points.size="
<< points.size ()
- << " sizeof(QPoint)=" << sizeof (QPoint)
+ << " sizeof(TQPoint)=" << sizeof (TQPoint)
<< endl;
#endif
- return (points.size () * sizeof (QPoint));
+ return (points.size () * sizeof (TQPoint));
}
//
-// QPixmap/QImage Conversion Functions
+// QPixmap/TQImage Conversion Functions
//
// public static
-QImage kpPixmapFX::convertToImage (const QPixmap &pixmap)
+TQImage kpPixmapFX::convertToImage (const TQPixmap &pixmap)
{
if (pixmap.isNull ())
- return QImage ();
+ return TQImage ();
return pixmap.convertToImage ();
}
// Returns true if <image> contains translucency (rather than just transparency)
-// QPixmap::hasAlphaChannel() appears to give incorrect results
-static bool imageHasAlphaChannel (const QImage &image)
+// TQPixmap::hasAlphaChannel() appears to give incorrect results
+static bool imageHasAlphaChannel (const TQImage &image)
{
if (image.depth () < 32)
return false;
@@ -248,9 +248,9 @@ static bool imageHasAlphaChannel (const QImage &image)
return false;
}
-static int imageNumColorsUpTo (const QImage &image, int max)
+static int imageNumColorsUpTo (const TQImage &image, int max)
{
- QMap <QRgb, bool> rgbMap;
+ TQMap <QRgb, bool> rgbMap;
if (image.depth () <= 8)
{
@@ -273,22 +273,22 @@ static int imageNumColorsUpTo (const QImage &image, int max)
return rgbMap.size ();
}
-static void convertToPixmapWarnAboutLoss (const QImage &image,
+static void convertToPixmapWarnAboutLoss (const TQImage &image,
const kpPixmapFX::WarnAboutLossInfo &wali)
{
if (!wali.isValid ())
return;
- const QString colorDepthTranslucencyDontAskAgain =
+ const TQString colorDepthTranslucencyDontAskAgain =
wali.m_dontAskAgainPrefix + "_ColorDepthTranslucency";
- const QString colorDepthDontAskAgain =
+ const TQString colorDepthDontAskAgain =
wali.m_dontAskAgainPrefix + "_ColorDepth";
- const QString translucencyDontAskAgain =
+ const TQString translucencyDontAskAgain =
wali.m_dontAskAgainPrefix + "_Translucency";
#if DEBUG_KP_PIXMAP_FX && 1
- QTime timer;
+ TQTime timer;
timer.start ();
#endif
@@ -303,8 +303,8 @@ static void convertToPixmapWarnAboutLoss (const QImage &image,
bool moreColorsThanDisplay =
(KMessageBox::shouldBeShownContinue (colorDepthDontAskAgain) &&
- image.depth () > QColor::numBitPlanes () &&
- QColor::numBitPlanes () < 24); // 32 indicates alpha channel
+ image.depth () > TQColor::numBitPlanes () &&
+ TQColor::numBitPlanes () < 24); // 32 indicates alpha channel
int screenDepthNeeded = 0;
@@ -322,7 +322,7 @@ static void convertToPixmapWarnAboutLoss (const QImage &image,
<< endl
<< "\timage.depth()=" << image.depth ()
<< endl
- << "\tscreenDepth=" << QColor::numBitPlanes ()
+ << "\tscreenDepth=" << TQColor::numBitPlanes ()
<< endl
<< "\tmoreColorsThanDisplay=" << moreColorsThanDisplay
<< endl
@@ -331,14 +331,14 @@ static void convertToPixmapWarnAboutLoss (const QImage &image,
#endif
- QApplication::setOverrideCursor (Qt::arrowCursor);
+ TQApplication::setOverrideCursor (Qt::arrowCursor);
if (moreColorsThanDisplay && hasAlphaChannel)
{
KMessageBox::information (wali.m_parent,
wali.m_moreColorsThanDisplayAndHasAlphaChannelMessage
.arg (screenDepthNeeded),
- QString::null, // or would you prefer "Low Screen Depth and Image Contains Transparency"? :)
+ TQString::null, // or would you prefer "Low Screen Depth and Image Contains Transparency"? :)
colorDepthTranslucencyDontAskAgain);
if (!KMessageBox::shouldBeShownContinue (colorDepthTranslucencyDontAskAgain))
@@ -363,26 +363,26 @@ static void convertToPixmapWarnAboutLoss (const QImage &image,
translucencyDontAskAgain);
}
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
// public static
-QPixmap kpPixmapFX::convertToPixmap (const QImage &image, bool pretty,
+TQPixmap kpPixmapFX::convertToPixmap (const TQImage &image, bool pretty,
const WarnAboutLossInfo &wali)
{
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "kpPixmapFX::convertToPixmap(image,pretty=" << pretty
<< ",warnAboutLossInfo.isValid=" << wali.isValid ()
<< ")" << endl;
- QTime timer;
+ TQTime timer;
timer.start ();
#endif
if (image.isNull ())
- return QPixmap ();
+ return TQPixmap ();
- QPixmap destPixmap;
+ TQPixmap destPixmap;
if (!pretty)
{
@@ -417,29 +417,29 @@ QPixmap kpPixmapFX::convertToPixmap (const QImage &image, bool pretty,
// TODO: don't dup convertToPixmap() code
// public static
-QPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const QImage &image,
+TQPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const TQImage &image,
const WarnAboutLossInfo &wali)
{
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "kpPixmapFX::convertToPixmapAsLosslessAsPossible(image depth="
<< image.depth ()
<< ",warnAboutLossInfo.isValid=" << wali.isValid ()
- << ") screenDepth=" << QPixmap::defaultDepth ()
+ << ") screenDepth=" << TQPixmap::defaultDepth ()
<< " imageNumColorsUpTo257=" << imageNumColorsUpTo (image, 257)
<< endl;
- QTime timer;
+ TQTime timer;
timer.start ();
#endif
if (image.isNull ())
- return QPixmap ();
+ return TQPixmap ();
- const int screenDepth = (QPixmap::defaultDepth () >= 24 ?
+ const int screenDepth = (TQPixmap::defaultDepth () >= 24 ?
32 :
- QPixmap::defaultDepth ());
+ TQPixmap::defaultDepth ());
- QPixmap destPixmap;
+ TQPixmap destPixmap;
int ditherFlags = 0;
if (image.depth () <= screenDepth)
@@ -553,17 +553,17 @@ QPixmap kpPixmapFX::convertToPixmapAsLosslessAsPossible (const QImage &image,
// public static
-QPixmap kpPixmapFX::pixmapWithDefinedTransparentPixels (const QPixmap &pixmap,
- const QColor &transparentColor)
+TQPixmap kpPixmapFX::pixmapWithDefinedTransparentPixels (const TQPixmap &pixmap,
+ const TQColor &transparentColor)
{
if (!pixmap.mask ())
return pixmap;
- QPixmap retPixmap (pixmap.width (), pixmap.height ());
+ TQPixmap retPixmap (pixmap.width (), pixmap.height ());
retPixmap.fill (transparentColor);
- QPainter p (&retPixmap);
- p.drawPixmap (QPoint (0, 0), pixmap);
+ TQPainter p (&retPixmap);
+ p.drawPixmap (TQPoint (0, 0), pixmap);
p.end ();
retPixmap.setMask (*pixmap.mask ());
@@ -577,9 +577,9 @@ QPixmap kpPixmapFX::pixmapWithDefinedTransparentPixels (const QPixmap &pixmap,
// public static
-QPixmap kpPixmapFX::getPixmapAt (const QPixmap &pm, const QRect &rect)
+TQPixmap kpPixmapFX::getPixmapAt (const TQPixmap &pm, const TQRect &rect)
{
- QPixmap retPixmap (rect.width (), rect.height ());
+ TQPixmap retPixmap (rect.width (), rect.height ());
#if DEBUG_KP_PIXMAP_FX && 0
kdDebug () << "kpPixmapFX::getPixmapAt(pm.hasMask="
@@ -590,7 +590,7 @@ QPixmap kpPixmapFX::getPixmapAt (const QPixmap &pm, const QRect &rect)
<< endl;
#endif
- const QRect validSrcRect = pm.rect ().intersect (rect);
+ const TQRect validSrcRect = pm.rect ().intersect (rect);
const bool wouldHaveUndefinedPixels = (validSrcRect != rect);
if (wouldHaveUndefinedPixels)
@@ -598,7 +598,7 @@ QPixmap kpPixmapFX::getPixmapAt (const QPixmap &pm, const QRect &rect)
#if DEBUG_KP_PIXMAP_FX && 0
kdDebug () << "\tret would contain undefined pixels - setting them to transparent" << endl;
#endif
- QBitmap transparentMask (rect.width (), rect.height ());
+ TQBitmap transparentMask (rect.width (), rect.height ());
transparentMask.fill (Qt::color0/*transparent*/);
retPixmap.setMask (transparentMask);
}
@@ -612,7 +612,7 @@ QPixmap kpPixmapFX::getPixmapAt (const QPixmap &pm, const QRect &rect)
}
- const QPoint destTopLeft = validSrcRect.topLeft () - rect.topLeft ();
+ const TQPoint destTopLeft = validSrcRect.topLeft () - rect.topLeft ();
// copy data _and_ mask (if avail)
copyBlt (&retPixmap, /* dest */
@@ -627,7 +627,7 @@ QPixmap kpPixmapFX::getPixmapAt (const QPixmap &pm, const QRect &rect)
kdDebug () << "\tensure opaque in valid region" << endl;
#endif
kpPixmapFX::ensureOpaqueAt (&retPixmap,
- QRect (destTopLeft.x (), destTopLeft.y (),
+ TQRect (destTopLeft.x (), destTopLeft.y (),
validSrcRect.width (), validSrcRect.height ()));
}
@@ -642,8 +642,8 @@ QPixmap kpPixmapFX::getPixmapAt (const QPixmap &pm, const QRect &rect)
// public static
-void kpPixmapFX::setPixmapAt (QPixmap *destPixmapPtr, const QRect &destRect,
- const QPixmap &srcPixmap)
+void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect,
+ const TQPixmap &srcPixmap)
{
if (!destPixmapPtr)
return;
@@ -666,7 +666,7 @@ void kpPixmapFX::setPixmapAt (QPixmap *destPixmapPtr, const QRect &destRect,
#if DEBUG_KP_PIXMAP_FX && 0
if (destPixmapPtr->mask ())
{
- QImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
+ TQImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
int numTrans = 0;
for (int y = 0; y < image.height (); y++)
@@ -704,7 +704,7 @@ void kpPixmapFX::setPixmapAt (QPixmap *destPixmapPtr, const QRect &destRect,
if (srcPixmap.mask ())
{
- QBitmap mask = getNonNullMask (*destPixmapPtr);
+ TQBitmap mask = getNonNullMask (*destPixmapPtr);
bitBlt (&mask,
destRect.x (), destRect.y (),
srcPixmap.mask (),
@@ -730,7 +730,7 @@ void kpPixmapFX::setPixmapAt (QPixmap *destPixmapPtr, const QRect &destRect,
<< endl;
if (destPixmapPtr->mask ())
{
- QImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
+ TQImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
int numTrans = 0;
for (int y = 0; y < image.height (); y++)
@@ -748,26 +748,26 @@ void kpPixmapFX::setPixmapAt (QPixmap *destPixmapPtr, const QRect &destRect,
}
// public static
-void kpPixmapFX::setPixmapAt (QPixmap *destPixmapPtr, const QPoint &destAt,
- const QPixmap &srcPixmap)
+void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, const TQPoint &destAt,
+ const TQPixmap &srcPixmap)
{
kpPixmapFX::setPixmapAt (destPixmapPtr,
- QRect (destAt.x (), destAt.y (),
+ TQRect (destAt.x (), destAt.y (),
srcPixmap.width (), srcPixmap.height ()),
srcPixmap);
}
// public static
-void kpPixmapFX::setPixmapAt (QPixmap *destPixmapPtr, int destX, int destY,
- const QPixmap &srcPixmap)
+void kpPixmapFX::setPixmapAt (TQPixmap *destPixmapPtr, int destX, int destY,
+ const TQPixmap &srcPixmap)
{
- kpPixmapFX::setPixmapAt (destPixmapPtr, QPoint (destX, destY), srcPixmap);
+ kpPixmapFX::setPixmapAt (destPixmapPtr, TQPoint (destX, destY), srcPixmap);
}
// public static
-void kpPixmapFX::paintPixmapAt (QPixmap *destPixmapPtr, const QPoint &destAt,
- const QPixmap &srcPixmap)
+void kpPixmapFX::paintPixmapAt (TQPixmap *destPixmapPtr, const TQPoint &destAt,
+ const TQPixmap &srcPixmap)
{
if (!destPixmapPtr)
return;
@@ -782,15 +782,15 @@ void kpPixmapFX::paintPixmapAt (QPixmap *destPixmapPtr, const QPoint &destAt,
}
// public static
-void kpPixmapFX::paintPixmapAt (QPixmap *destPixmapPtr, int destX, int destY,
- const QPixmap &srcPixmap)
+void kpPixmapFX::paintPixmapAt (TQPixmap *destPixmapPtr, int destX, int destY,
+ const TQPixmap &srcPixmap)
{
- kpPixmapFX::paintPixmapAt (destPixmapPtr, QPoint (destX, destY), srcPixmap);
+ kpPixmapFX::paintPixmapAt (destPixmapPtr, TQPoint (destX, destY), srcPixmap);
}
// public static
-kpColor kpPixmapFX::getColorAtPixel (const QPixmap &pm, const QPoint &at)
+kpColor kpPixmapFX::getColorAtPixel (const TQPixmap &pm, const TQPoint &at)
{
#if DEBUG_KP_PIXMAP_FX && 0
kdDebug () << "kpToolColorPicker::colorAtPixel" << p << endl;
@@ -802,25 +802,25 @@ kpColor kpPixmapFX::getColorAtPixel (const QPixmap &pm, const QPoint &at)
return kpColor::invalid;
}
- QPixmap pixmap = getPixmapAt (pm, QRect (at, at));
- QImage image = kpPixmapFX::convertToImage (pixmap);
+ TQPixmap pixmap = getPixmapAt (pm, TQRect (at, at));
+ TQImage image = kpPixmapFX::convertToImage (pixmap);
if (image.isNull ())
{
- kdError () << "kpPixmapFX::getColorAtPixel(QPixmap) could not convert to QImage" << endl;
+ kdError () << "kpPixmapFX::getColorAtPixel(TQPixmap) could not convert to TQImage" << endl;
return kpColor::invalid;
}
- return getColorAtPixel (image, QPoint (0, 0));
+ return getColorAtPixel (image, TQPoint (0, 0));
}
// public static
-kpColor kpPixmapFX::getColorAtPixel (const QPixmap &pm, int x, int y)
+kpColor kpPixmapFX::getColorAtPixel (const TQPixmap &pm, int x, int y)
{
- return kpPixmapFX::getColorAtPixel (pm, QPoint (x, y));
+ return kpPixmapFX::getColorAtPixel (pm, TQPoint (x, y));
}
// public static
-kpColor kpPixmapFX::getColorAtPixel (const QImage &img, const QPoint &at)
+kpColor kpPixmapFX::getColorAtPixel (const TQImage &img, const TQPoint &at)
{
if (!img.valid (at.x (), at.y ()))
return kpColor::invalid;
@@ -830,9 +830,9 @@ kpColor kpPixmapFX::getColorAtPixel (const QImage &img, const QPoint &at)
}
// public static
-kpColor kpPixmapFX::getColorAtPixel (const QImage &img, int x, int y)
+kpColor kpPixmapFX::getColorAtPixel (const TQImage &img, int x, int y)
{
- return kpPixmapFX::getColorAtPixel (img, QPoint (x, y));
+ return kpPixmapFX::getColorAtPixel (img, TQPoint (x, y));
}
@@ -842,7 +842,7 @@ kpColor kpPixmapFX::getColorAtPixel (const QImage &img, int x, int y)
// public static
-void kpPixmapFX::ensureNoAlphaChannel (QPixmap *destPixmapPtr)
+void kpPixmapFX::ensureNoAlphaChannel (TQPixmap *destPixmapPtr)
{
if (destPixmapPtr->hasAlphaChannel ())
destPixmapPtr->setMask (kpPixmapFX::getNonNullMask/*just in case*/ (*destPixmapPtr));
@@ -850,13 +850,13 @@ void kpPixmapFX::ensureNoAlphaChannel (QPixmap *destPixmapPtr)
// public static
-QBitmap kpPixmapFX::getNonNullMask (const QPixmap &pm)
+TQBitmap kpPixmapFX::getNonNullMask (const TQPixmap &pm)
{
if (pm.mask ())
return *pm.mask ();
else
{
- QBitmap maskBitmap (pm.width (), pm.height ());
+ TQBitmap maskBitmap (pm.width (), pm.height ());
maskBitmap.fill (Qt::color1/*opaque*/);
return maskBitmap;
@@ -865,14 +865,14 @@ QBitmap kpPixmapFX::getNonNullMask (const QPixmap &pm)
// public static
-void kpPixmapFX::ensureTransparentAt (QPixmap *destPixmapPtr, const QRect &destRect)
+void kpPixmapFX::ensureTransparentAt (TQPixmap *destPixmapPtr, const TQRect &destRect)
{
if (!destPixmapPtr)
return;
- QBitmap maskBitmap = getNonNullMask (*destPixmapPtr);
+ TQBitmap maskBitmap = getNonNullMask (*destPixmapPtr);
- QPainter p (&maskBitmap);
+ TQPainter p (&maskBitmap);
p.setPen (Qt::color0/*transparent*/);
p.setBrush (Qt::color0/*transparent*/);
@@ -886,8 +886,8 @@ void kpPixmapFX::ensureTransparentAt (QPixmap *destPixmapPtr, const QRect &destR
// public static
-void kpPixmapFX::paintMaskTransparentWithBrush (QPixmap *destPixmapPtr, const QPoint &destAt,
- const QPixmap &brushBitmap)
+void kpPixmapFX::paintMaskTransparentWithBrush (TQPixmap *destPixmapPtr, const TQPoint &destAt,
+ const TQPixmap &brushBitmap)
{
if (!destPixmapPtr)
return;
@@ -898,7 +898,7 @@ void kpPixmapFX::paintMaskTransparentWithBrush (QPixmap *destPixmapPtr, const QP
return;
}
- QBitmap destMaskBitmap = kpPixmapFX::getNonNullMask (*destPixmapPtr);
+ TQBitmap destMaskBitmap = kpPixmapFX::getNonNullMask (*destPixmapPtr);
// Src
// Dest Mask Brush Bitmap = Result
@@ -922,24 +922,24 @@ void kpPixmapFX::paintMaskTransparentWithBrush (QPixmap *destPixmapPtr, const QP
}
// public static
-void kpPixmapFX::paintMaskTransparentWithBrush (QPixmap *destPixmapPtr, int destX, int destY,
- const QPixmap &brushBitmap)
+void kpPixmapFX::paintMaskTransparentWithBrush (TQPixmap *destPixmapPtr, int destX, int destY,
+ const TQPixmap &brushBitmap)
{
kpPixmapFX::paintMaskTransparentWithBrush (destPixmapPtr,
- QPoint (destX, destY),
+ TQPoint (destX, destY),
brushBitmap);
}
// public static
-void kpPixmapFX::ensureOpaqueAt (QPixmap *destPixmapPtr, const QRect &destRect)
+void kpPixmapFX::ensureOpaqueAt (TQPixmap *destPixmapPtr, const TQRect &destRect)
{
if (!destPixmapPtr || !destPixmapPtr->mask ()/*already opaque*/)
return;
- QBitmap maskBitmap = *destPixmapPtr->mask ();
+ TQBitmap maskBitmap = *destPixmapPtr->mask ();
- QPainter p (&maskBitmap);
+ TQPainter p (&maskBitmap);
p.setPen (Qt::color1/*opaque*/);
p.setBrush (Qt::color1/*opaque*/);
@@ -952,25 +952,25 @@ void kpPixmapFX::ensureOpaqueAt (QPixmap *destPixmapPtr, const QRect &destRect)
}
// public static
-void kpPixmapFX::ensureOpaqueAt (QPixmap *destPixmapPtr, const QPoint &destAt,
- const QPixmap &srcPixmap)
+void kpPixmapFX::ensureOpaqueAt (TQPixmap *destPixmapPtr, const TQPoint &destAt,
+ const TQPixmap &srcPixmap)
{
if (!destPixmapPtr || !destPixmapPtr->mask ()/*already opaque*/)
return;
- QBitmap destMask = *destPixmapPtr->mask ();
+ TQBitmap destMask = *destPixmapPtr->mask ();
if (srcPixmap.mask ())
{
bitBlt (&destMask, /* dest */
destAt, /* dest pt */
srcPixmap.mask (), /* src */
- QRect (0, 0, srcPixmap.width (), srcPixmap.height ()), /* src rect */
+ TQRect (0, 0, srcPixmap.width (), srcPixmap.height ()), /* src rect */
Qt::OrROP/*if either is opaque, it's opaque*/);
}
else
{
- QPainter p (&destMask);
+ TQPainter p (&destMask);
p.setPen (Qt::color1/*opaque*/);
p.setBrush (Qt::color1/*opaque*/);
@@ -985,10 +985,10 @@ void kpPixmapFX::ensureOpaqueAt (QPixmap *destPixmapPtr, const QPoint &destAt,
}
// public static
-void kpPixmapFX::ensureOpaqueAt (QPixmap *destPixmapPtr, int destX, int destY,
- const QPixmap &srcPixmap)
+void kpPixmapFX::ensureOpaqueAt (TQPixmap *destPixmapPtr, int destX, int destY,
+ const TQPixmap &srcPixmap)
{
- kpPixmapFX::ensureOpaqueAt (destPixmapPtr, QPoint (destX, destY), srcPixmap);
+ kpPixmapFX::ensureOpaqueAt (destPixmapPtr, TQPoint (destX, destY), srcPixmap);
}
@@ -997,17 +997,17 @@ void kpPixmapFX::ensureOpaqueAt (QPixmap *destPixmapPtr, int destX, int destY,
//
// public static
-void kpPixmapFX::convertToGrayscale (QPixmap *destPixmapPtr)
+void kpPixmapFX::convertToGrayscale (TQPixmap *destPixmapPtr)
{
- QImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
+ TQImage image = kpPixmapFX::convertToImage (*destPixmapPtr);
kpPixmapFX::convertToGrayscale (&image);
*destPixmapPtr = kpPixmapFX::convertToPixmap (image);
}
// public static
-QPixmap kpPixmapFX::convertToGrayscale (const QPixmap &pm)
+TQPixmap kpPixmapFX::convertToGrayscale (const TQPixmap &pm)
{
- QImage image = kpPixmapFX::convertToImage (pm);
+ TQImage image = kpPixmapFX::convertToImage (pm);
kpPixmapFX::convertToGrayscale (&image);
return kpPixmapFX::convertToPixmap (image);
}
@@ -1025,7 +1025,7 @@ static QRgb toGray (QRgb rgb)
}
// public static
-void kpPixmapFX::convertToGrayscale (QImage *destImagePtr)
+void kpPixmapFX::convertToGrayscale (TQImage *destImagePtr)
{
if (destImagePtr->depth () > 8)
{
@@ -1048,23 +1048,23 @@ void kpPixmapFX::convertToGrayscale (QImage *destImagePtr)
}
// public static
-QImage kpPixmapFX::convertToGrayscale (const QImage &img)
+TQImage kpPixmapFX::convertToGrayscale (const TQImage &img)
{
- QImage retImage = img;
+ TQImage retImage = img;
kpPixmapFX::convertToGrayscale (&retImage);
return retImage;
}
// public static
-void kpPixmapFX::fill (QPixmap *destPixmapPtr, const kpColor &color)
+void kpPixmapFX::fill (TQPixmap *destPixmapPtr, const kpColor &color)
{
if (!destPixmapPtr)
return;
if (color.isOpaque ())
{
- destPixmapPtr->setMask (QBitmap ()); // no mask = opaque
+ destPixmapPtr->setMask (TQBitmap ()); // no mask = opaque
destPixmapPtr->fill (color.toQColor ());
}
else
@@ -1074,16 +1074,16 @@ void kpPixmapFX::fill (QPixmap *destPixmapPtr, const kpColor &color)
}
// public static
-QPixmap kpPixmapFX::fill (const QPixmap &pm, const kpColor &color)
+TQPixmap kpPixmapFX::fill (const TQPixmap &pm, const kpColor &color)
{
- QPixmap ret = pm;
+ TQPixmap ret = pm;
kpPixmapFX::fill (&ret, color);
return ret;
}
// public static
-void kpPixmapFX::resize (QPixmap *destPixmapPtr, int w, int h,
+void kpPixmapFX::resize (TQPixmap *destPixmapPtr, int w, int h,
const kpColor &backgroundColor, bool fillNewAreas)
{
#if DEBUG_KP_PIXMAP_FX && 1
@@ -1107,8 +1107,8 @@ void kpPixmapFX::resize (QPixmap *destPixmapPtr, int w, int h,
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "\tfilling in new areas" << endl;
#endif
- QBitmap maskBitmap;
- QPainter painter, maskPainter;
+ TQBitmap maskBitmap;
+ TQPainter painter, maskPainter;
if (backgroundColor.isOpaque ())
{
@@ -1152,17 +1152,17 @@ void kpPixmapFX::resize (QPixmap *destPixmapPtr, int w, int h,
}
// public static
-QPixmap kpPixmapFX::resize (const QPixmap &pm, int w, int h,
+TQPixmap kpPixmapFX::resize (const TQPixmap &pm, int w, int h,
const kpColor &backgroundColor, bool fillNewAreas)
{
- QPixmap ret = pm;
+ TQPixmap ret = pm;
kpPixmapFX::resize (&ret, w, h, backgroundColor, fillNewAreas);
return ret;
}
// public static
-void kpPixmapFX::scale (QPixmap *destPixmapPtr, int w, int h, bool pretty)
+void kpPixmapFX::scale (TQPixmap *destPixmapPtr, int w, int h, bool pretty)
{
if (!destPixmapPtr)
return;
@@ -1171,7 +1171,7 @@ void kpPixmapFX::scale (QPixmap *destPixmapPtr, int w, int h, bool pretty)
}
// public static
-QPixmap kpPixmapFX::scale (const QPixmap &pm, int w, int h, bool pretty)
+TQPixmap kpPixmapFX::scale (const TQPixmap &pm, int w, int h, bool pretty)
{
#if DEBUG_KP_PIXMAP_FX && 0
kdDebug () << "kpPixmapFX::scale(oldRect=" << pm.rect ()
@@ -1187,7 +1187,7 @@ QPixmap kpPixmapFX::scale (const QPixmap &pm, int w, int h, bool pretty)
if (pretty)
{
- QImage image = kpPixmapFX::convertToImage (pm);
+ TQImage image = kpPixmapFX::convertToImage (pm);
#if DEBUG_KP_PIXMAP_FX && 0
kdDebug () << "\tBefore smooth scale:" << endl;
@@ -1219,7 +1219,7 @@ QPixmap kpPixmapFX::scale (const QPixmap &pm, int w, int h, bool pretty)
}
else
{
- QWMatrix matrix;
+ TQWMatrix matrix;
matrix.scale (double (w) / double (pm.width ()),
double (h) / double (pm.height ()));
@@ -1235,7 +1235,7 @@ double kpPixmapFX::AngleInDegreesEpsilon =
/ (2.0/*max error allowed*/ * 2.0/*for good measure*/);
-static QWMatrix matrixWithZeroOrigin (const QWMatrix &matrix, int width, int height)
+static TQWMatrix matrixWithZeroOrigin (const TQWMatrix &matrix, int width, int height)
{
#if DEBUG_KP_PIXMAP_FX
kdDebug () << "matrixWithZeroOrigin(w=" << width << ",h=" << height << ")" << endl;
@@ -1247,23 +1247,23 @@ static QWMatrix matrixWithZeroOrigin (const QWMatrix &matrix, int width, int hei
<< " dy=" << matrix.dy ()
<< endl;
#endif
- // TODO: Should we be using QWMatrix::Areas?
- QRect newRect = matrix.mapRect (QRect (0, 0, width, height));
+ // TODO: Should we be using TQWMatrix::Areas?
+ TQRect newRect = matrix.mapRect (TQRect (0, 0, width, height));
#if DEBUG_KP_PIXMAP_FX
kdDebug () << "\tnewRect=" << newRect << endl;
#endif
- QWMatrix translatedMatrix (matrix.m11 (), matrix.m12 (), matrix.m21 (), matrix.m22 (),
+ TQWMatrix translatedMatrix (matrix.m11 (), matrix.m12 (), matrix.m21 (), matrix.m22 (),
matrix.dx () - newRect.left (), matrix.dy () - newRect.top ());
return translatedMatrix;
}
-static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
+static TQPixmap xForm (const TQPixmap &pm, const TQWMatrix &transformMatrix_,
const kpColor &backgroundColor,
int targetWidth, int targetHeight)
{
- QWMatrix transformMatrix = transformMatrix_;
+ TQWMatrix transformMatrix = transformMatrix_;
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "kppixmapfx.cpp: xForm(pm.size=" << pm.size ()
@@ -1272,14 +1272,14 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
<< ")"
<< endl;
#endif
- // TODO: Should we be using QWMatrix::Areas?
- QRect newRect = transformMatrix.map (pm.rect ());
+ // TODO: Should we be using TQWMatrix::Areas?
+ TQRect newRect = transformMatrix.map (pm.rect ());
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "\tmappedRect=" << newRect << endl;
#endif
- QWMatrix scaleMatrix;
+ TQWMatrix scaleMatrix;
if (targetWidth > 0 && targetWidth != newRect.width ())
{
#if DEBUG_KP_PIXMAP_FX && 1
@@ -1300,16 +1300,16 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
{
#if DEBUG_KP_PIXMAP_FX && 1
// TODO: What is going on here??? Why isn't matrix * working properly?
- QWMatrix wrongMatrix = transformMatrix * scaleMatrix;
- QWMatrix oldHat = transformMatrix;
+ TQWMatrix wrongMatrix = transformMatrix * scaleMatrix;
+ TQWMatrix oldHat = transformMatrix;
if (targetWidth > 0 && targetWidth != newRect.width ())
oldHat.scale (double (targetWidth) / double (newRect.width ()), 1);
if (targetHeight > 0 && targetHeight != newRect.height ())
oldHat.scale (1, double (targetHeight) / double (newRect.height ()));
- QWMatrix altHat = transformMatrix;
+ TQWMatrix altHat = transformMatrix;
altHat.scale ((targetWidth > 0 && targetWidth != newRect.width ()) ? double (targetWidth) / double (newRect.width ()) : 1,
(targetHeight > 0 && targetHeight != newRect.height ()) ? double (targetHeight) / double (newRect.height ()) : 1);
- QWMatrix correctMatrix = scaleMatrix * transformMatrix;
+ TQWMatrix correctMatrix = scaleMatrix * transformMatrix;
kdDebug () << "\tsupposedlyWrongMatrix: m11=" << wrongMatrix.m11 () // <<<---- this is the correct matrix???
<< " m12=" << wrongMatrix.m12 ()
@@ -1347,7 +1347,7 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
transformMatrix = transformMatrix * scaleMatrix;
- // TODO: Should we be using QWMatrix::Areas?
+ // TODO: Should we be using TQWMatrix::Areas?
newRect = transformMatrix.map (pm.rect ());
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "\tnewRect after targetWidth,targetHeight adjust=" << newRect << endl;
@@ -1355,7 +1355,7 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
}
- QPixmap newPixmap (targetWidth > 0 ? targetWidth : newRect.width (),
+ TQPixmap newPixmap (targetWidth > 0 ? targetWidth : newRect.width (),
targetHeight > 0 ? targetHeight : newRect.height ());
if ((targetWidth > 0 && targetWidth != newRect.width ()) ||
(targetHeight > 0 && targetHeight != newRect.height ()))
@@ -1370,7 +1370,7 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
#endif
}
- QBitmap newBitmapMask;
+ TQBitmap newBitmapMask;
if (backgroundColor.isOpaque ())
newPixmap.fill (backgroundColor.toQColor ());
@@ -1381,7 +1381,7 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
newBitmapMask.fill (backgroundColor.maskColor ());
}
- QPainter painter (&newPixmap);
+ TQPainter painter (&newPixmap);
#if DEBUG_KP_PIXMAP_FX && 1
kdDebug () << "\tmatrix: m11=" << transformMatrix.m11 ()
<< " m12=" << transformMatrix.m12 ()
@@ -1390,7 +1390,7 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
<< " dx=" << transformMatrix.dx ()
<< " dy=" << transformMatrix.dy ()
<< endl;
- const QWMatrix trueMatrix = QPixmap::trueMatrix (transformMatrix,
+ const TQWMatrix trueMatrix = TQPixmap::trueMatrix (transformMatrix,
pm.width (), pm.height ());
kdDebug () << "\ttrue matrix: m11=" << trueMatrix.m11 ()
<< " m12=" << trueMatrix.m12 ()
@@ -1402,7 +1402,7 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
#endif
painter.setWorldMatrix (transformMatrix);
#if DEBUG_KP_PIXMAP_FX && 0
- kdDebug () << "\ttranslate top=" << painter.xForm (QPoint (0, 0)) << endl;
+ kdDebug () << "\ttranslate top=" << painter.xForm (TQPoint (0, 0)) << endl;
kdDebug () << "\tmatrix: m11=" << painter.worldMatrix ().m11 ()
<< " m12=" << painter.worldMatrix ().m12 ()
<< " m21=" << painter.worldMatrix ().m21 ()
@@ -1411,14 +1411,14 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
<< " dy=" << painter.worldMatrix ().dy ()
<< endl;
#endif
- painter.drawPixmap (QPoint (0, 0), pm);
+ painter.drawPixmap (TQPoint (0, 0), pm);
painter.end ();
if (!newBitmapMask.isNull ())
{
- QPainter maskPainter (&newBitmapMask);
+ TQPainter maskPainter (&newBitmapMask);
maskPainter.setWorldMatrix (transformMatrix);
- maskPainter.drawPixmap (QPoint (0, 0), kpPixmapFX::getNonNullMask (pm));
+ maskPainter.drawPixmap (TQPoint (0, 0), kpPixmapFX::getNonNullMask (pm));
maskPainter.end ();
newPixmap.setMask (newBitmapMask);
}
@@ -1427,12 +1427,12 @@ static QPixmap xForm (const QPixmap &pm, const QWMatrix &transformMatrix_,
}
// public static
-QWMatrix kpPixmapFX::skewMatrix (int width, int height, double hangle, double vangle)
+TQWMatrix kpPixmapFX::skewMatrix (int width, int height, double hangle, double vangle)
{
if (fabs (hangle - 0) < kpPixmapFX::AngleInDegreesEpsilon &&
fabs (vangle - 0) < kpPixmapFX::AngleInDegreesEpsilon)
{
- return QWMatrix ();
+ return TQWMatrix ();
}
@@ -1464,9 +1464,9 @@ QWMatrix kpPixmapFX::skewMatrix (int width, int height, double hangle, double va
*
*/
- //QWMatrix matrix (1, tan (KP_DEGREES_TO_RADIANS (vangle)), tan (KP_DEGREES_TO_RADIANS (hangle)), 1, 0, 0);
+ //TQWMatrix matrix (1, tan (KP_DEGREES_TO_RADIANS (vangle)), tan (KP_DEGREES_TO_RADIANS (hangle)), 1, 0, 0);
// I think this is clearer than above :)
- QWMatrix matrix;
+ TQWMatrix matrix;
matrix.shear (tan (KP_DEGREES_TO_RADIANS (hangle)),
tan (KP_DEGREES_TO_RADIANS (vangle)));
@@ -1474,14 +1474,14 @@ QWMatrix kpPixmapFX::skewMatrix (int width, int height, double hangle, double va
}
// public static
-QWMatrix kpPixmapFX::skewMatrix (const QPixmap &pixmap, double hangle, double vangle)
+TQWMatrix kpPixmapFX::skewMatrix (const TQPixmap &pixmap, double hangle, double vangle)
{
return kpPixmapFX::skewMatrix (pixmap.width (), pixmap.height (), hangle, vangle);
}
// public static
-void kpPixmapFX::skew (QPixmap *destPixmapPtr, double hangle, double vangle,
+void kpPixmapFX::skew (TQPixmap *destPixmapPtr, double hangle, double vangle,
const kpColor &backgroundColor,
int targetWidth, int targetHeight)
{
@@ -1494,7 +1494,7 @@ void kpPixmapFX::skew (QPixmap *destPixmapPtr, double hangle, double vangle,
}
// public static
-QPixmap kpPixmapFX::skew (const QPixmap &pm, double hangle, double vangle,
+TQPixmap kpPixmapFX::skew (const TQPixmap &pm, double hangle, double vangle,
const kpColor &backgroundColor,
int targetWidth, int targetHeight)
{
@@ -1523,21 +1523,21 @@ QPixmap kpPixmapFX::skew (const QPixmap &pm, double hangle, double vangle,
}
- QWMatrix matrix = skewMatrix (pm, hangle, vangle);
+ TQWMatrix matrix = skewMatrix (pm, hangle, vangle);
return ::xForm (pm, matrix, backgroundColor, targetWidth, targetHeight);
}
// public static
-QWMatrix kpPixmapFX::rotateMatrix (int width, int height, double angle)
+TQWMatrix kpPixmapFX::rotateMatrix (int width, int height, double angle)
{
if (fabs (angle - 0) < kpPixmapFX::AngleInDegreesEpsilon)
{
- return QWMatrix ();
+ return TQWMatrix ();
}
- QWMatrix matrix;
+ TQWMatrix matrix;
matrix.translate (width / 2, height / 2);
matrix.rotate (angle);
@@ -1545,7 +1545,7 @@ QWMatrix kpPixmapFX::rotateMatrix (int width, int height, double angle)
}
// public static
-QWMatrix kpPixmapFX::rotateMatrix (const QPixmap &pixmap, double angle)
+TQWMatrix kpPixmapFX::rotateMatrix (const TQPixmap &pixmap, double angle)
{
return kpPixmapFX::rotateMatrix (pixmap.width (), pixmap.height (), angle);
}
@@ -1585,7 +1585,7 @@ bool kpPixmapFX::isLosslessRotation (double angle)
// public static
-void kpPixmapFX::rotate (QPixmap *destPixmapPtr, double angle,
+void kpPixmapFX::rotate (TQPixmap *destPixmapPtr, double angle,
const kpColor &backgroundColor,
int targetWidth, int targetHeight)
{
@@ -1598,7 +1598,7 @@ void kpPixmapFX::rotate (QPixmap *destPixmapPtr, double angle,
}
// public static
-QPixmap kpPixmapFX::rotate (const QPixmap &pm, double angle,
+TQPixmap kpPixmapFX::rotate (const TQPixmap &pm, double angle,
const kpColor &backgroundColor,
int targetWidth, int targetHeight)
{
@@ -1609,22 +1609,22 @@ QPixmap kpPixmapFX::rotate (const QPixmap &pm, double angle,
}
- QWMatrix matrix = rotateMatrix (pm, angle);
+ TQWMatrix matrix = rotateMatrix (pm, angle);
return ::xForm (pm, matrix, backgroundColor, targetWidth, targetHeight);
}
// public static
-QWMatrix kpPixmapFX::flipMatrix (int width, int height, bool horz, bool vert)
+TQWMatrix kpPixmapFX::flipMatrix (int width, int height, bool horz, bool vert)
{
if (width <= 0 || height <= 0)
{
kdError () << "kpPixmapFX::flipMatrix() passed invalid dimensions" << endl;
- return QWMatrix ();
+ return TQWMatrix ();
}
- return QWMatrix (horz ? -1 : +1, // m11
+ return TQWMatrix (horz ? -1 : +1, // m11
0, // m12
0, // m21
vert ? -1 : +1, // m22
@@ -1633,7 +1633,7 @@ QWMatrix kpPixmapFX::flipMatrix (int width, int height, bool horz, bool vert)
}
// public static
-QWMatrix kpPixmapFX::flipMatrix (const QPixmap &pixmap, bool horz, bool vert)
+TQWMatrix kpPixmapFX::flipMatrix (const TQPixmap &pixmap, bool horz, bool vert)
{
return kpPixmapFX::flipMatrix (pixmap.width (), pixmap.height (),
horz, vert);
@@ -1641,7 +1641,7 @@ QWMatrix kpPixmapFX::flipMatrix (const QPixmap &pixmap, bool horz, bool vert)
// public static
-void kpPixmapFX::flip (QPixmap *destPixmapPtr, bool horz, bool vert)
+void kpPixmapFX::flip (TQPixmap *destPixmapPtr, bool horz, bool vert)
{
if (!horz && !vert)
return;
@@ -1650,7 +1650,7 @@ void kpPixmapFX::flip (QPixmap *destPixmapPtr, bool horz, bool vert)
}
// public static
-QPixmap kpPixmapFX::flip (const QPixmap &pm, bool horz, bool vert)
+TQPixmap kpPixmapFX::flip (const TQPixmap &pm, bool horz, bool vert)
{
if (!horz && !vert)
return pm;
@@ -1659,7 +1659,7 @@ QPixmap kpPixmapFX::flip (const QPixmap &pm, bool horz, bool vert)
}
// public static
-void kpPixmapFX::flip (QImage *destImagePtr, bool horz, bool vert)
+void kpPixmapFX::flip (TQImage *destImagePtr, bool horz, bool vert)
{
if (!horz && !vert)
return;
@@ -1668,7 +1668,7 @@ void kpPixmapFX::flip (QImage *destImagePtr, bool horz, bool vert)
}
// public static
-QImage kpPixmapFX::flip (const QImage &img, bool horz, bool vert)
+TQImage kpPixmapFX::flip (const TQImage &img, bool horz, bool vert)
{
if (!horz && !vert)
return img;
diff --git a/kolourpaint/pixmapfx/kppixmapfx.h b/kolourpaint/pixmapfx/kppixmapfx.h
index c083ee43..ac52e992 100644
--- a/kolourpaint/pixmapfx/kppixmapfx.h
+++ b/kolourpaint/pixmapfx/kppixmapfx.h
@@ -30,19 +30,19 @@
#define KP_PIXMAP_FX_H
-#include <qstring.h>
+#include <tqstring.h>
-class QBitmap;
-class QColor;
-class QImage;
-class QPointArray;
-class QPixmap;
-class QPoint;
-class QRect;
-class QString;
-class QWidget;
-class QWMatrix;
+class TQBitmap;
+class TQColor;
+class TQImage;
+class TQPointArray;
+class TQPixmap;
+class TQPoint;
+class TQRect;
+class TQString;
+class TQWidget;
+class TQWMatrix;
class kpColor;
class kpSelection;
@@ -61,56 +61,56 @@ public:
//
- // QPixmap Statistics
+ // TQPixmap Statistics
//
// Returns the width * height.
- static int pixmapArea (const QPixmap &pixmap);
- static int pixmapArea (const QPixmap *pixmap);
+ static int pixmapArea (const TQPixmap &pixmap);
+ static int pixmapArea (const TQPixmap *pixmap);
static int pixmapArea (int width, int height);
// Returns the estimated size of <pixmap> in pixmap memory.
- static int pixmapSize (const QPixmap &pixmap);
- static int pixmapSize (const QPixmap *pixmap);
+ static int pixmapSize (const TQPixmap &pixmap);
+ static int pixmapSize (const TQPixmap *pixmap);
static int pixmapSize (int width, int height, int depth);
- static int imageSize (const QImage &image);
- static int imageSize (const QImage *image);
+ static int imageSize (const TQImage &image);
+ static int imageSize (const TQImage *image);
static int imageSize (int width, int height, int depth);
static int selectionSize (const kpSelection &sel);
static int selectionSize (const kpSelection *sel);
- static int stringSize (const QString &string);
+ static int stringSize (const TQString &string);
- static int pointArraySize (const QPointArray &points);
+ static int pointArraySize (const TQPointArray &points);
//
- // QPixmap/QImage Conversion Functions
+ // QPixmap/TQImage Conversion Functions
//
//
- // Converts <pixmap> to a QImage and returns it.
+ // Converts <pixmap> to a TQImage and returns it.
//
// WARNING: On an 8-bit screen:
//
- // QPixmap result = convertToPixmap (convertToImage (pixmap));
+ // TQPixmap result = convertToPixmap (convertToImage (pixmap));
//
// <result> is slightly differently colored to <pixmap>.
//
- // KolourPaint needs to convert to QImage occasionally as
- // QImage allows KolourPaint to read pixels and because the QImage
+ // KolourPaint needs to convert to TQImage occasionally as
+ // TQImage allows KolourPaint to read pixels and because the QImage
// methods give reliable results and pixel-identical results on
- // all platforms. The QPixmap paint engine has no such guarantee
+ // all platforms. The TQPixmap paint engine has no such guarantee
// and even depends on the quality of the video driver.
//
// As a result, KolourPaint should not be used on an 8-bit screen.
// HITODO: Add warning on startup, like in KolourPaint/KDE4.
//
// This bug will be fixed when KolourPaint gets a proper image library,
- // where QPixmap -> QImage -> QPixmap transitions will be not be needed.
- static QImage convertToImage (const QPixmap &pixmap);
+ // where TQPixmap -> TQImage -> TQPixmap transitions will be not be needed.
+ static TQImage convertToImage (const TQPixmap &pixmap);
//
// Dialog info for warning about data loss with convertToPixmap().
@@ -150,11 +150,11 @@ public:
//
// Dialog parent
//
- WarnAboutLossInfo (const QString &moreColorsThanDisplayAndHasAlphaChannelMessage,
- const QString &moreColorsThanDisplayMessage,
- const QString &hasAlphaChannelMessage,
- const QString &dontAskAgainPrefix,
- QWidget *parent)
+ WarnAboutLossInfo (const TQString &moreColorsThanDisplayAndHasAlphaChannelMessage,
+ const TQString &moreColorsThanDisplayMessage,
+ const TQString &hasAlphaChannelMessage,
+ const TQString &dontAskAgainPrefix,
+ TQWidget *parent)
:
m_moreColorsThanDisplayAndHasAlphaChannelMessage (
moreColorsThanDisplayAndHasAlphaChannelMessage),
@@ -183,16 +183,16 @@ public:
bool isValid () const { return m_isValid; }
- QString m_moreColorsThanDisplayAndHasAlphaChannelMessage,
+ TQString m_moreColorsThanDisplayAndHasAlphaChannelMessage,
m_moreColorsThanDisplayMessage,
m_hasAlphaChannelMessage;
- QString m_dontAskAgainPrefix;
- QWidget *m_parent;
+ TQString m_dontAskAgainPrefix;
+ TQWidget *m_parent;
bool m_isValid;
};
//
- // Converts <image> to a QPixmap of the current display's depth and
+ // Converts <image> to a TQPixmap of the current display's depth and
// returns it.
//
// If the flag <pretty> is set, it will dither the image making the
@@ -202,14 +202,14 @@ public:
//
// This will automatically call ensureNoAlphaChannel().
//
- // Never use a foreign QPixmap that is offered to you - always get the
- // foreign QImage and use this function to convert it to a sane QPixmap.
+ // Never use a foreign TQPixmap that is offered to you - always get the
+ // foreign TQImage and use this function to convert it to a sane TQPixmap.
//
// <wali>, if specified, describes parameters for the dialog that comes
// up warning the user of data loss if the <image> contains translucency
// and/or more colors than the current display.
//
- static QPixmap convertToPixmap (const QImage &image, bool pretty = false,
+ static TQPixmap convertToPixmap (const TQImage &image, bool pretty = false,
const WarnAboutLossInfo &wali = WarnAboutLossInfo ());
// Same as convertToPixmap() but tries as hard as possible to make the
@@ -221,15 +221,15 @@ public:
// instead. If you know for sure that <image> cannot be displayed
// losslessly, then call convertToPixmap() with <pretty> = true.
//
- static QPixmap convertToPixmapAsLosslessAsPossible (const QImage &image,
+ static TQPixmap convertToPixmapAsLosslessAsPossible (const TQImage &image,
const WarnAboutLossInfo &wali = WarnAboutLossInfo ());
// Sets the RGB values of the pixels where <pixmap> is transparent to
// <transparentColor>. This has visually no effect on the <pixmap>
// unless the mask is lost.
- static QPixmap pixmapWithDefinedTransparentPixels (const QPixmap &pixmap,
- const QColor &transparentColor);
+ static TQPixmap pixmapWithDefinedTransparentPixels (const TQPixmap &pixmap,
+ const TQColor &transparentColor);
//
@@ -240,50 +240,50 @@ public:
//
// Returns the pixel and mask data found at the <rect> in <pm>.
//
- static QPixmap getPixmapAt (const QPixmap &pm, const QRect &rect);
+ static TQPixmap getPixmapAt (const TQPixmap &pm, const TQRect &rect);
//
// Sets the pixel and mask data at <destRect> in <*destPixmapPtr>
// to <srcPixmap>.
//
- static void setPixmapAt (QPixmap *destPixmapPtr, const QRect &destRect,
- const QPixmap &srcPixmap);
+ static void setPixmapAt (TQPixmap *destPixmapPtr, const TQRect &destRect,
+ const TQPixmap &srcPixmap);
//
// Sets the pixel and mask data at the rectangle in <*destPixmapPtr>,
// with the top-left <destAt> and dimensions <srcPixmap.rect()>,
// to <srcPixmap>.
//
- static void setPixmapAt (QPixmap *destPixmapPtr, const QPoint &destAt,
- const QPixmap &srcPixmap);
- static void setPixmapAt (QPixmap *destPixmapPtr, int destX, int destY,
- const QPixmap &srcPixmap);
+ static void setPixmapAt (TQPixmap *destPixmapPtr, const TQPoint &destAt,
+ const TQPixmap &srcPixmap);
+ static void setPixmapAt (TQPixmap *destPixmapPtr, int destX, int destY,
+ const TQPixmap &srcPixmap);
//
// Draws <srcPixmap> on top of <*destPixmapPtr> at <destAt>.
// The mask of <*destPixmapPtr> is adjusted so that all opaque
// pixels in <srcPixmap> will be opaque in <*destPixmapPtr>.
//
- static void paintPixmapAt (QPixmap *destPixmapPtr, const QPoint &destAt,
- const QPixmap &srcPixmap);
- static void paintPixmapAt (QPixmap *destPixmapPtr, int destX, int destY,
- const QPixmap &srcPixmap);
+ static void paintPixmapAt (TQPixmap *destPixmapPtr, const TQPoint &destAt,
+ const TQPixmap &srcPixmap);
+ static void paintPixmapAt (TQPixmap *destPixmapPtr, int destX, int destY,
+ const TQPixmap &srcPixmap);
//
// Returns the colour of the pixel at <at> in <pm>.
// If the pixel is transparent, a value is returned such that
// kpTool::isColorTransparent(<return_value>) will return true.
//
- static kpColor getColorAtPixel (const QPixmap &pm, const QPoint &at);
- static kpColor getColorAtPixel (const QPixmap &pm, int x, int y);
+ static kpColor getColorAtPixel (const TQPixmap &pm, const TQPoint &at);
+ static kpColor getColorAtPixel (const TQPixmap &pm, int x, int y);
//
// Returns the color of the pixel at <at> in <img>.
// If the pixel is transparent, a value is returned such that
// kpTool::isColorTransparent(<return_value>) will return true.
//
- static kpColor getColorAtPixel (const QImage &img, const QPoint &at);
- static kpColor getColorAtPixel (const QImage &img, int x, int y);
+ static kpColor getColorAtPixel (const TQImage &img, const TQPoint &at);
+ static kpColor getColorAtPixel (const TQImage &img, int x, int y);
//
@@ -293,49 +293,49 @@ public:
//
// Removes <*destPixmapPtr>'s Alpha Channel and attempts to convert it
- // to a mask. KolourPaint - and QPixmap to a great extent - does not
+ // to a mask. KolourPaint - and TQPixmap to a great extent - does not
// support Alpha Channels - only masks. Call this whenever you get
// a pixmap from a foreign source; else all KolourPaint code will
// exhibit "undefined behaviour".
//
- static void ensureNoAlphaChannel (QPixmap *destPixmapPtr);
+ static void ensureNoAlphaChannel (TQPixmap *destPixmapPtr);
//
// Returns <pm>'s mask or a fully opaque mask (with <pm>'s dimensions)
// if <pm> does not have a mask.
//
- static QBitmap getNonNullMask (const QPixmap &pm);
+ static TQBitmap getNonNullMask (const TQPixmap &pm);
//
// Ensures that <*destPixmapPtr> is transparent at <rect>.
//
- static void ensureTransparentAt (QPixmap *destPixmapPtr, const QRect &destRect);
+ static void ensureTransparentAt (TQPixmap *destPixmapPtr, const TQRect &destRect);
//
// Sets the mask of <*destPixmapPtr> at the rectangle, with the
// top-left <destAt> and dimensions <srcMaskBitmap.rect()>,
// to transparent where <brushBitmap> is opaque.
//
- // <brushPixmap> must be a QPixmap of depth 1 (or a QBitmap).
+ // <brushPixmap> must be a TQPixmap of depth 1 (or a TQBitmap).
//
- static void paintMaskTransparentWithBrush (QPixmap *destPixmapPtr, const QPoint &destAt,
- const QPixmap &brushBitmap);
- static void paintMaskTransparentWithBrush (QPixmap *destPixmapPtr, int destX, int destY,
- const QPixmap &brushBitmap);
+ static void paintMaskTransparentWithBrush (TQPixmap *destPixmapPtr, const TQPoint &destAt,
+ const TQPixmap &brushBitmap);
+ static void paintMaskTransparentWithBrush (TQPixmap *destPixmapPtr, int destX, int destY,
+ const TQPixmap &brushBitmap);
//
// Ensures that <*destPixmapPtr> is opaque at <rect>.
//
- static void ensureOpaqueAt (QPixmap *destPixmapPtr, const QRect &destRect);
+ static void ensureOpaqueAt (TQPixmap *destPixmapPtr, const TQRect &destRect);
//
// Ensures that <srcPixmap>'s opaque pixels will be opaque if
// painted onto <*destPixmapPtr> at <destAt>.
//
- static void ensureOpaqueAt (QPixmap *destPixmapPtr, const QPoint &destAt,
- const QPixmap &srcPixmap);
- static void ensureOpaqueAt (QPixmap *destPixmapPtr, int destX, int destY,
- const QPixmap &srcPixmap);
+ static void ensureOpaqueAt (TQPixmap *destPixmapPtr, const TQPoint &destAt,
+ const TQPixmap &srcPixmap);
+ static void ensureOpaqueAt (TQPixmap *destPixmapPtr, int destX, int destY,
+ const TQPixmap &srcPixmap);
//
@@ -346,32 +346,32 @@ public:
//
// Converts the image to grayscale.
//
- static void convertToGrayscale (QPixmap *destPixmapPtr);
- static QPixmap convertToGrayscale (const QPixmap &pm);
- static void convertToGrayscale (QImage *destImagePtr);
- static QImage convertToGrayscale (const QImage &img);
+ static void convertToGrayscale (TQPixmap *destPixmapPtr);
+ static TQPixmap convertToGrayscale (const TQPixmap &pm);
+ static void convertToGrayscale (TQImage *destImagePtr);
+ static TQImage convertToGrayscale (const TQImage &img);
//
// Fills an image in the given color.
//
- static void fill (QPixmap *destPixmapPtr, const kpColor &color);
- static QPixmap fill (const QPixmap &pm, const kpColor &color);
+ static void fill (TQPixmap *destPixmapPtr, const kpColor &color);
+ static TQPixmap fill (const TQPixmap &pm, const kpColor &color);
//
// Resizes an image to the given width and height,
// filling any new areas with <backgroundColor> if <fillNewAreas> is set.
//
- static void resize (QPixmap *destPixmapPtr, int w, int h,
+ static void resize (TQPixmap *destPixmapPtr, int w, int h,
const kpColor &backgroundColor, bool fillNewAreas = true);
- static QPixmap resize (const QPixmap &pm, int w, int h,
+ static TQPixmap resize (const TQPixmap &pm, int w, int h,
const kpColor &backgroundColor, bool fillNewAreas = true);
//
// Scales an image to the given width and height.
// If <pretty> is true, a smooth scale will be used.
//
- static void scale (QPixmap *destPixmapPtr, int w, int h, bool pretty = false);
- static QPixmap scale (const QPixmap &pm, int w, int h, bool pretty = false);
+ static void scale (TQPixmap *destPixmapPtr, int w, int h, bool pretty = false);
+ static TQPixmap scale (const TQPixmap &pm, int w, int h, bool pretty = false);
// The minimum difference between 2 angles (in degrees) such that they are
@@ -395,13 +395,13 @@ public:
// Using <targetWidth> & <targetHeight> to generate preview pixmaps is
// significantly more efficient than skewing and then scaling yourself.
//
- static QWMatrix skewMatrix (int width, int height, double hangle, double vangle);
- static QWMatrix skewMatrix (const QPixmap &pixmap, double hangle, double vangle);
+ static TQWMatrix skewMatrix (int width, int height, double hangle, double vangle);
+ static TQWMatrix skewMatrix (const TQPixmap &pixmap, double hangle, double vangle);
- static void skew (QPixmap *destPixmapPtr, double hangle, double vangle,
+ static void skew (TQPixmap *destPixmapPtr, double hangle, double vangle,
const kpColor &backgroundColor,
int targetWidth = -1, int targetHeight = -1);
- static QPixmap skew (const QPixmap &pm, double hangle, double vangle,
+ static TQPixmap skew (const TQPixmap &pm, double hangle, double vangle,
const kpColor &backgroundColor,
int targetWidth = -1, int targetHeight = -1);
@@ -416,15 +416,15 @@ public:
// Using <targetWidth> & <targetHeight> to generate preview pixmaps is
// significantly more efficient than rotating and then scaling yourself.
//
- static QWMatrix rotateMatrix (int width, int height, double angle);
- static QWMatrix rotateMatrix (const QPixmap &pixmap, double angle);
+ static TQWMatrix rotateMatrix (int width, int height, double angle);
+ static TQWMatrix rotateMatrix (const TQPixmap &pixmap, double angle);
static bool isLosslessRotation (double angle);
- static void rotate (QPixmap *destPixmapPtr, double angle,
+ static void rotate (TQPixmap *destPixmapPtr, double angle,
const kpColor &backgroundColor,
int targetWidth = -1, int targetHeight = -1);
- static QPixmap rotate (const QPixmap &pm, double angle,
+ static TQPixmap rotate (const TQPixmap &pm, double angle,
const kpColor &backgroundColor,
int targetWidth = -1, int targetHeight = -1);
@@ -432,18 +432,18 @@ public:
//
// Flips an image in the given directions.
//
- static QWMatrix flipMatrix (int width, int height, bool horz, bool vert);
- static QWMatrix flipMatrix (const QPixmap &pixmap, bool horz, bool vert);
+ static TQWMatrix flipMatrix (int width, int height, bool horz, bool vert);
+ static TQWMatrix flipMatrix (const TQPixmap &pixmap, bool horz, bool vert);
// TODO: this kind of overloading is error prone
- // e.g. QPixmap pixmap;
+ // e.g. TQPixmap pixmap;
// kpPixmapFX::flip (pixmap, false, true);
// looks like it will flip vertically but does absolutely nothing!
// (should be &pixmap)
- static void flip (QPixmap *destPixmapPtr, bool horz, bool vert);
- static QPixmap flip (const QPixmap &pm, bool horz, bool vert);
- static void flip (QImage *destImagePtr, bool horz, bool vert);
- static QImage flip (const QImage &img, bool horz, bool vert);
+ static void flip (TQPixmap *destPixmapPtr, bool horz, bool vert);
+ static TQPixmap flip (const TQPixmap &pm, bool horz, bool vert);
+ static void flip (TQImage *destImagePtr, bool horz, bool vert);
+ static TQImage flip (const TQImage &img, bool horz, bool vert);
};
diff --git a/kolourpaint/tools/kptoolaction.cpp b/kolourpaint/tools/kptoolaction.cpp
index ef5c8510..d45acb30 100644
--- a/kolourpaint/tools/kptoolaction.cpp
+++ b/kolourpaint/tools/kptoolaction.cpp
@@ -31,10 +31,10 @@
#include <kptool.h>
-kpToolAction::kpToolAction (const QString &text,
- const QString &pic, const KShortcut &shortcut,
- const QObject *receiver, const char *slot,
- QObject *parent, const char *name)
+kpToolAction::kpToolAction (const TQString &text,
+ const TQString &pic, const KShortcut &shortcut,
+ const TQObject *receiver, const char *slot,
+ TQObject *parent, const char *name)
: KToggleAction (text,
pic, shortcut,
receiver, slot,
@@ -51,7 +51,7 @@ kpToolAction::~kpToolAction ()
// protected
void kpToolAction::updateToolTip ()
{
- const QString newToolTip =
+ const TQString newToolTip =
kpTool::toolTipForTextAndShortcut (text (), shortcut ());
if (newToolTip == toolTip ())
return;
@@ -66,7 +66,7 @@ void kpToolAction::updateToolTip ()
//
// public slot virtual [base KAction]
-void kpToolAction::setText (const QString &text)
+void kpToolAction::setText (const TQString &text)
{
KToggleAction::setText (text);
updateToolTip ();
diff --git a/kolourpaint/tools/kptoolaction.h b/kolourpaint/tools/kptoolaction.h
index df4e407e..bf3257c2 100644
--- a/kolourpaint/tools/kptoolaction.h
+++ b/kolourpaint/tools/kptoolaction.h
@@ -40,16 +40,16 @@ class kpToolAction : public KToggleAction,
Q_OBJECT
public:
- kpToolAction (const QString &text,
- const QString &pic, const KShortcut &shortcut,
- const QObject *receiver, const char *slot,
- QObject *parent, const char *name);
+ kpToolAction (const TQString &text,
+ const TQString &pic, const KShortcut &shortcut,
+ const TQObject *receiver, const char *slot,
+ TQObject *parent, const char *name);
virtual ~kpToolAction ();
signals:
// Not emitted when toolTip is manually overriden by setToolTip()
- void toolTipChanged (const QString &string);
+ void toolTipChanged (const TQString &string);
protected:
void updateToolTip ();
@@ -60,7 +60,7 @@ protected:
//
public slots:
- virtual void setText (const QString &text);
+ virtual void setText (const TQString &text);
virtual bool setShortcut (const KShortcut &shortcut);
diff --git a/kolourpaint/tools/kptoolairspray.cpp b/kolourpaint/tools/kptoolairspray.cpp
index 43f8bef3..7f9a2b04 100644
--- a/kolourpaint/tools/kptoolairspray.cpp
+++ b/kolourpaint/tools/kptoolairspray.cpp
@@ -30,14 +30,14 @@
#include <stdlib.h>
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qpointarray.h>
-#include <qrect.h>
-#include <qtimer.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqpointarray.h>
+#include <tqrect.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <klocale.h>
@@ -64,8 +64,8 @@ kpToolAirSpray::kpToolAirSpray (kpMainWindow *mainWindow)
mainWindow, "tool_spraycan"),
m_currentCommand (0)
{
- m_timer = new QTimer (this);
- connect (m_timer, SIGNAL (timeout ()), this, SLOT (actuallyDraw ()));
+ m_timer = new TQTimer (this);
+ connect (m_timer, TQT_SIGNAL (timeout ()), this, TQT_SLOT (actuallyDraw ()));
}
kpToolAirSpray::~kpToolAirSpray ()
@@ -75,7 +75,7 @@ kpToolAirSpray::~kpToolAirSpray ()
// private
-QString kpToolAirSpray::haventBegunDrawUserMessage () const
+TQString kpToolAirSpray::haventBegunDrawUserMessage () const
{
return i18n ("Click or drag to spray graffiti.");
}
@@ -95,8 +95,8 @@ void kpToolAirSpray::begin ()
if (m_toolWidgetSpraycanSize)
{
m_size = m_toolWidgetSpraycanSize->spraycanSize ();
- connect (m_toolWidgetSpraycanSize, SIGNAL (spraycanSizeChanged (int)),
- this, SLOT (slotSpraycanSizeChanged (int)));
+ connect (m_toolWidgetSpraycanSize, TQT_SIGNAL (spraycanSizeChanged (int)),
+ this, TQT_SLOT (slotSpraycanSizeChanged (int)));
m_toolWidgetSpraycanSize->show ();
}
@@ -110,8 +110,8 @@ void kpToolAirSpray::end ()
{
if (m_toolWidgetSpraycanSize)
{
- disconnect (m_toolWidgetSpraycanSize, SIGNAL (spraycanSizeChanged (int)),
- this, SLOT (slotSpraycanSizeChanged (int)));
+ disconnect (m_toolWidgetSpraycanSize, TQT_SIGNAL (spraycanSizeChanged (int)),
+ this, TQT_SLOT (slotSpraycanSizeChanged (int)));
m_toolWidgetSpraycanSize = 0;
}
@@ -141,7 +141,7 @@ void kpToolAirSpray::beginDraw ()
setUserMessage (cancelUserMessage ());
}
-void kpToolAirSpray::draw (const QPoint &thisPoint, const QPoint &, const QRect &)
+void kpToolAirSpray::draw (const TQPoint &thisPoint, const TQPoint &, const TQRect &)
{
// if the user is moving the spray, make the spray line continuous
if (thisPoint != m_lastPoint)
@@ -155,10 +155,10 @@ void kpToolAirSpray::draw (const QPoint &thisPoint, const QPoint &, const QRect
void kpToolAirSpray::actuallyDraw ()
{
- QPointArray pArray (10);
+ TQPointArray pArray (10);
int numPoints = 0;
- QPoint p = m_currentPoint;
+ TQPoint p = m_currentPoint;
#if DEBUG_KP_TOOL_SPRAYCAN
kdDebug () << "kpToolAirSpray::actuallyDraw() currentPoint=" << p
@@ -178,7 +178,7 @@ void kpToolAirSpray::actuallyDraw ()
// make it look circular
// OPT: can be done better
if (dx * dx + dy * dy <= radius * radius)
- pArray [numPoints++] = QPoint (p.x () + dx, p.y () + dy);
+ pArray [numPoints++] = TQPoint (p.x () + dx, p.y () + dy);
}
pArray.resize (numPoints);
@@ -194,7 +194,7 @@ void kpToolAirSpray::actuallyDraw ()
void kpToolAirSpray::cancelShape ()
{
#if 0
- endDraw (QPoint (), QRect ());
+ endDraw (TQPoint (), TQRect ());
mainWindow ()->commandHistory ()->undo ();
#else
m_timer->stop ();
@@ -215,7 +215,7 @@ void kpToolAirSpray::releasedAllButtons ()
}
// virtual
-void kpToolAirSpray::endDraw (const QPoint &, const QRect &)
+void kpToolAirSpray::endDraw (const TQPoint &, const TQRect &)
{
m_timer->stop ();
@@ -250,7 +250,7 @@ kpToolAirSprayCommand::~kpToolAirSprayCommand ()
// public virtual [base kpCommand]
-QString kpToolAirSprayCommand::name () const
+TQString kpToolAirSprayCommand::name () const
{
return i18n ("Spraycan");
}
@@ -289,7 +289,7 @@ void kpToolAirSprayCommand::unexecute ()
if (!m_newPixmapPtr)
{
// the ultimate in laziness - figure out Redo info only if we Undo
- m_newPixmapPtr = new QPixmap (m_boundingRect.width (), m_boundingRect.height ());
+ m_newPixmapPtr = new TQPixmap (m_boundingRect.width (), m_boundingRect.height ());
*m_newPixmapPtr = document ()->getPixmapAt (m_boundingRect);
}
else
@@ -300,9 +300,9 @@ void kpToolAirSprayCommand::unexecute ()
// public
-void kpToolAirSprayCommand::addPoints (const QPointArray &points)
+void kpToolAirSprayCommand::addPoints (const TQPointArray &points)
{
- QRect docRect = points.boundingRect ();
+ TQRect docRect = points.boundingRect ();
#if DEBUG_KP_TOOL_SPRAYCAN
kdDebug () << "kpToolAirSprayCommand::addPoints() docRect=" << docRect
@@ -311,10 +311,10 @@ void kpToolAirSprayCommand::addPoints (const QPointArray &points)
kdDebug () << "\t" << i << ": " << points [i] << endl;
#endif
- QPixmap pixmap = document ()->getPixmapAt (docRect);
- QBitmap mask;
+ TQPixmap pixmap = document ()->getPixmapAt (docRect);
+ TQBitmap mask;
- QPainter painter, maskPainter;
+ TQPainter painter, maskPainter;
if (m_color.isOpaque ())
{
@@ -331,7 +331,7 @@ void kpToolAirSprayCommand::addPoints (const QPointArray &points)
for (int i = 0; i < (int) points.count (); i++)
{
- QPoint pt (points [i].x () - docRect.x (),
+ TQPoint pt (points [i].x () - docRect.x (),
points [i].y () - docRect.y ());
if (painter.isActive ())
diff --git a/kolourpaint/tools/kptoolairspray.h b/kolourpaint/tools/kptoolairspray.h
index 24f02787..ed983980 100644
--- a/kolourpaint/tools/kptoolairspray.h
+++ b/kolourpaint/tools/kptoolairspray.h
@@ -33,11 +33,11 @@
#include <kpcolor.h>
#include <kptool.h>
-class QPixmap;
-class QPoint;
-class QRect;
-class QString;
-class QTimer;
+class TQPixmap;
+class TQPoint;
+class TQRect;
+class TQString;
+class TQTimer;
class kpMainWindow;
class kpToolAirSprayCommand;
@@ -53,7 +53,7 @@ public:
virtual ~kpToolAirSpray ();
private:
- QString haventBegunDrawUserMessage () const;
+ TQString haventBegunDrawUserMessage () const;
public:
virtual void begin ();
@@ -64,10 +64,10 @@ private slots:
public:
virtual void beginDraw ();
- virtual void draw (const QPoint &thisPoint, const QPoint &, const QRect &);
+ virtual void draw (const TQPoint &thisPoint, const TQPoint &, const TQRect &);
virtual void cancelShape ();
virtual void releasedAllButtons ();
- virtual void endDraw (const QPoint &, const QRect &);
+ virtual void endDraw (const TQPoint &, const TQRect &);
public slots:
void actuallyDraw ();
@@ -75,7 +75,7 @@ public slots:
private:
kpToolWidgetSpraycanSize *m_toolWidgetSpraycanSize;
kpToolAirSprayCommand *m_currentCommand;
- QTimer *m_timer;
+ TQTimer *m_timer;
int m_size;
};
@@ -86,7 +86,7 @@ public:
kpMainWindow *mainWindow);
virtual ~kpToolAirSprayCommand ();
- virtual QString name () const;
+ virtual TQString name () const;
virtual int size () const;
@@ -94,7 +94,7 @@ public:
virtual void unexecute ();
// interface for KToolAirSpray
- void addPoints (const QPointArray &points);
+ void addPoints (const TQPointArray &points);
void finalize ();
void cancel ();
@@ -102,9 +102,9 @@ private:
kpColor m_color;
int m_size;
- QPixmap *m_newPixmapPtr;
- QPixmap m_oldPixmap;
- QRect m_boundingRect;
+ TQPixmap *m_newPixmapPtr;
+ TQPixmap m_oldPixmap;
+ TQRect m_boundingRect;
};
#endif // __kptoolairspray_h__
diff --git a/kolourpaint/tools/kptoolautocrop.cpp b/kolourpaint/tools/kptoolautocrop.cpp
index 244c192d..f0284116 100644
--- a/kolourpaint/tools/kptoolautocrop.cpp
+++ b/kolourpaint/tools/kptoolautocrop.cpp
@@ -46,10 +46,10 @@
#include <kptoolautocrop.h>
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qimage.h>
-#include <qpainter.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <klocale.h>
@@ -65,7 +65,7 @@
#include <kpviewmanager.h>
-kpToolAutoCropBorder::kpToolAutoCropBorder (const QPixmap *pixmapPtr,
+kpToolAutoCropBorder::kpToolAutoCropBorder (const TQPixmap *pixmapPtr,
int processedColorSimilarity)
: m_pixmapPtr (pixmapPtr),
m_processedColorSimilarity (processedColorSimilarity)
@@ -82,7 +82,7 @@ int kpToolAutoCropBorder::size () const
// public
-const QPixmap *kpToolAutoCropBorder::pixmap () const
+const TQPixmap *kpToolAutoCropBorder::pixmap () const
{
return m_pixmapPtr;
}
@@ -94,7 +94,7 @@ int kpToolAutoCropBorder::processedColorSimilarity () const
}
// public
-QRect kpToolAutoCropBorder::rect () const
+TQRect kpToolAutoCropBorder::rect () const
{
return m_rect;
}
@@ -169,10 +169,10 @@ bool kpToolAutoCropBorder::calculate (int isX, int dir)
int maxX = m_pixmapPtr->width () - 1;
int maxY = m_pixmapPtr->height () - 1;
- QImage image = kpPixmapFX::convertToImage (*m_pixmapPtr);
+ TQImage image = kpPixmapFX::convertToImage (*m_pixmapPtr);
if (image.isNull ())
{
- kdError () << "Border::calculate() could not convert to QImage" << endl;
+ kdError () << "Border::calculate() could not convert to TQImage" << endl;
return false;
}
@@ -202,8 +202,8 @@ bool kpToolAutoCropBorder::calculate (int isX, int dir)
if (numCols)
{
- m_rect = QRect (QPoint (startX, 0),
- QPoint (startX + (numCols - 1) * dir, maxY)).normalize ();
+ m_rect = TQRect (TQPoint (startX, 0),
+ TQPoint (startX + (numCols - 1) * dir, maxY)).normalize ();
m_referenceColor = col;
}
}
@@ -232,8 +232,8 @@ bool kpToolAutoCropBorder::calculate (int isX, int dir)
if (numRows)
{
- m_rect = QRect (QPoint (0, startY),
- QPoint (maxX, startY + (numRows - 1) * dir)).normalize ();
+ m_rect = TQRect (TQPoint (0, startY),
+ TQPoint (maxX, startY + (numRows - 1) * dir)).normalize ();
m_referenceColor = col;
}
}
@@ -282,7 +282,7 @@ bool kpToolAutoCropBorder::exists () const
// public
void kpToolAutoCropBorder::invalidate ()
{
- m_rect = QRect ();
+ m_rect = TQRect ();
m_referenceColor = kpColor::invalid;
m_redSum = m_greenSum = m_blueSum = 0;
m_isSingleColor = false;
@@ -292,14 +292,14 @@ void kpToolAutoCropBorder::invalidate ()
class kpSetOverrideCursorSaver
{
public:
- kpSetOverrideCursorSaver (const QCursor &cursor)
+ kpSetOverrideCursorSaver (const TQCursor &cursor)
{
- QApplication::setOverrideCursor (cursor);
+ TQApplication::setOverrideCursor (cursor);
}
~kpSetOverrideCursorSaver ()
{
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
};
@@ -346,7 +346,7 @@ bool kpToolAutoCrop (kpMainWindow *mainWindow)
}
// OPT: if already pulled selection pixmap, no need to do it again here
- QPixmap pixmap = doc->selection () ? doc->getSelectedPixmap () : *doc->pixmap ();
+ TQPixmap pixmap = doc->selection () ? doc->getSelectedPixmap () : *doc->pixmap ();
if (pixmap.isNull ())
{
kdError () << "kptoolAutoCrop() pased NULL pixmap" << endl;
@@ -508,7 +508,7 @@ kpToolAutoCropCommand::~kpToolAutoCropCommand ()
// public static
-QString kpToolAutoCropCommand::name (bool actOnSelection, int options)
+TQString kpToolAutoCropCommand::name (bool actOnSelection, int options)
{
if (actOnSelection)
{
@@ -543,7 +543,7 @@ int kpToolAutoCropCommand::size () const
// private
-void kpToolAutoCropCommand::getUndoPixmap (const kpToolAutoCropBorder &border, QPixmap **pixmap)
+void kpToolAutoCropCommand::getUndoPixmap (const kpToolAutoCropBorder &border, TQPixmap **pixmap)
{
kpDocument *doc = document ();
@@ -568,7 +568,7 @@ void kpToolAutoCropCommand::getUndoPixmap (const kpToolAutoCropBorder &border, Q
delete *pixmap;
}
- *pixmap = new QPixmap (
+ *pixmap = new TQPixmap (
kpPixmapFX::getPixmapAt (*doc->pixmap (m_actOnSelection),
border.rect ()));
}
@@ -613,7 +613,7 @@ void kpToolAutoCropCommand::execute ()
return;
- QPixmap pixmapWithoutBorder =
+ TQPixmap pixmapWithoutBorder =
kpTool::neededPixmap (*doc->pixmap (m_actOnSelection),
m_contentsRect);
@@ -623,11 +623,11 @@ void kpToolAutoCropCommand::execute ()
else
{
m_oldSelection = *doc->selection ();
- m_oldSelection.setPixmap (QPixmap ());
+ m_oldSelection.setPixmap (TQPixmap ());
// m_contentsRect is relative to the top of the sel
// while sel is relative to the top of the doc
- QRect rect = m_contentsRect;
+ TQRect rect = m_contentsRect;
rect.moveBy (m_oldSelection.x (), m_oldSelection.y ());
kpSelection sel (kpSelection::Rectangle,
@@ -653,8 +653,8 @@ void kpToolAutoCropCommand::unexecute ()
if (!doc)
return;
- QPixmap pixmap (m_oldWidth, m_oldHeight);
- QBitmap maskBitmap;
+ TQPixmap pixmap (m_oldWidth, m_oldHeight);
+ TQBitmap maskBitmap;
// restore the position of the centre image
kpPixmapFX::setPixmapAt (&pixmap, m_contentsRect,
@@ -662,8 +662,8 @@ void kpToolAutoCropCommand::unexecute ()
// draw the borders
- QPainter painter (&pixmap);
- QPainter maskPainter;
+ TQPainter painter (&pixmap);
+ TQPainter maskPainter;
const kpToolAutoCropBorder *borders [] =
{
@@ -672,14 +672,14 @@ void kpToolAutoCropCommand::unexecute ()
0
};
- const QPixmap *pixmaps [] =
+ const TQPixmap *pixmaps [] =
{
m_leftPixmap, m_rightPixmap,
m_topPixmap, m_botPixmap,
0
};
- const QPixmap **p = pixmaps;
+ const TQPixmap **p = pixmaps;
for (const kpToolAutoCropBorder **b = borders; *b; b++, p++)
{
if (!(*b)->exists ())
@@ -759,22 +759,22 @@ void kpToolAutoCropCommand::unexecute ()
// private
-QRect kpToolAutoCropCommand::contentsRect () const
+TQRect kpToolAutoCropCommand::contentsRect () const
{
- const QPixmap *pixmap = document ()->pixmap (m_actOnSelection);
+ const TQPixmap *pixmap = document ()->pixmap (m_actOnSelection);
- QPoint topLeft (m_leftBorder.exists () ?
+ TQPoint topLeft (m_leftBorder.exists () ?
m_leftBorder.rect ().right () + 1 :
0,
m_topBorder.exists () ?
m_topBorder.rect ().bottom () + 1 :
0);
- QPoint botRight (m_rightBorder.exists () ?
+ TQPoint botRight (m_rightBorder.exists () ?
m_rightBorder.rect ().left () - 1 :
pixmap->width () - 1,
m_botBorder.exists () ?
m_botBorder.rect ().top () - 1 :
pixmap->height () - 1);
- return QRect (topLeft, botRight);
+ return TQRect (topLeft, botRight);
}
diff --git a/kolourpaint/tools/kptoolautocrop.h b/kolourpaint/tools/kptoolautocrop.h
index 4d016a1d..bb1a5d4a 100644
--- a/kolourpaint/tools/kptoolautocrop.h
+++ b/kolourpaint/tools/kptoolautocrop.h
@@ -29,14 +29,14 @@
#ifndef __kptoolautocrop_h__
#define __kptoolautocrop_h__
-#include <qrect.h>
+#include <tqrect.h>
#include <kpcommandhistory.h>
#include <kpcolor.h>
#include <kpselection.h>
-class QPixmap;
+class TQPixmap;
class kpDocument;
class kpMainWindow;
class kpViewManager;
@@ -49,13 +49,13 @@ bool kpToolAutoCrop (kpMainWindow *mainWindow);
class kpToolAutoCropBorder
{
public:
- kpToolAutoCropBorder (const QPixmap *pixmapPtr, int processedColorSimilarity);
+ kpToolAutoCropBorder (const TQPixmap *pixmapPtr, int processedColorSimilarity);
int size () const;
- const QPixmap *pixmap () const;
+ const TQPixmap *pixmap () const;
int processedColorSimilarity () const;
- QRect rect () const;
+ TQRect rect () const;
int left () const;
int right () const;
int top () const;
@@ -72,10 +72,10 @@ public:
void invalidate ();
private:
- const QPixmap *m_pixmapPtr;
+ const TQPixmap *m_pixmapPtr;
int m_processedColorSimilarity;
- QRect m_rect;
+ TQRect m_rect;
kpColor m_referenceColor;
int m_redSum, m_greenSum, m_blueSum;
bool m_isSingleColor;
@@ -99,12 +99,12 @@ public:
ShowAccel = 1
};
- static QString name (bool actOnSelection, int options);
+ static TQString name (bool actOnSelection, int options);
virtual int size () const;
private:
- void getUndoPixmap (const kpToolAutoCropBorder &border, QPixmap **pixmap);
+ void getUndoPixmap (const kpToolAutoCropBorder &border, TQPixmap **pixmap);
void getUndoPixmaps ();
void deleteUndoPixmaps ();
@@ -113,13 +113,13 @@ public:
virtual void unexecute ();
private:
- QRect contentsRect () const;
+ TQRect contentsRect () const;
bool m_actOnSelection;
kpToolAutoCropBorder m_leftBorder, m_rightBorder, m_topBorder, m_botBorder;
- QPixmap *m_leftPixmap, *m_rightPixmap, *m_topPixmap, *m_botPixmap;
+ TQPixmap *m_leftPixmap, *m_rightPixmap, *m_topPixmap, *m_botPixmap;
- QRect m_contentsRect;
+ TQRect m_contentsRect;
int m_oldWidth, m_oldHeight;
kpSelection m_oldSelection;
};
diff --git a/kolourpaint/tools/kptoolclear.cpp b/kolourpaint/tools/kptoolclear.cpp
index 230e54a3..7b1a775b 100644
--- a/kolourpaint/tools/kptoolclear.cpp
+++ b/kolourpaint/tools/kptoolclear.cpp
@@ -28,7 +28,7 @@
#include <kptoolclear.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kdebug.h>
#include <klocale.h>
@@ -66,9 +66,9 @@ kpToolClearCommand::~kpToolClearCommand ()
// public virtual [base kpCommand]
-QString kpToolClearCommand::name () const
+TQString kpToolClearCommand::name () const
{
- QString opName = i18n ("Clear");
+ TQString opName = i18n ("Clear");
if (m_actOnSelection)
return i18n ("Selection: %1").arg (opName);
@@ -95,7 +95,7 @@ void kpToolClearCommand::execute ()
}
- m_oldPixmapPtr = new QPixmap ();
+ m_oldPixmapPtr = new TQPixmap ();
*m_oldPixmapPtr = *doc->pixmap (m_actOnSelection);
@@ -104,7 +104,7 @@ void kpToolClearCommand::execute ()
// OPT: could just edit pixmap directly and signal change
kpSelection *sel = doc->selection ();
- QPixmap newPixmap (sel->width (), sel->height ());
+ TQPixmap newPixmap (sel->width (), sel->height ());
kpPixmapFX::fill (&newPixmap, m_newColor);
// TODO: maybe disable Image/Clear if transparent colour
if (m_newColor.isOpaque ())
diff --git a/kolourpaint/tools/kptoolclear.h b/kolourpaint/tools/kptoolclear.h
index ccf3697f..6d73006f 100644
--- a/kolourpaint/tools/kptoolclear.h
+++ b/kolourpaint/tools/kptoolclear.h
@@ -33,8 +33,8 @@
#include <kpcolor.h>
-class QPixmap;
-class QString;
+class TQPixmap;
+class TQString;
class kpDocument;
class kpMainWindow;
@@ -50,7 +50,7 @@ public:
kpMainWindow *mainWindow);
virtual ~kpToolClearCommand ();
- virtual QString name () const;
+ virtual TQString name () const;
virtual int size () const;
@@ -61,7 +61,7 @@ private:
bool m_actOnSelection;
kpColor m_newColor;
- QPixmap *m_oldPixmapPtr;
+ TQPixmap *m_oldPixmapPtr;
};
diff --git a/kolourpaint/tools/kptoolcolorpicker.cpp b/kolourpaint/tools/kptoolcolorpicker.cpp
index 1050b1cf..615012cd 100644
--- a/kolourpaint/tools/kptoolcolorpicker.cpp
+++ b/kolourpaint/tools/kptoolcolorpicker.cpp
@@ -31,9 +31,9 @@
#include <kptoolcolorpicker.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qpoint.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
#include <kdebug.h>
#include <klocale.h>
@@ -61,7 +61,7 @@ kpToolColorPicker::~kpToolColorPicker ()
{
}
-kpColor kpToolColorPicker::colorAtPixel (const QPoint &p)
+kpColor kpToolColorPicker::colorAtPixel (const TQPoint &p)
{
#if DEBUG_KP_TOOL_COLOR_PICKER && 0
kdDebug () << "kpToolColorPicker::colorAtPixel" << p << endl;
@@ -71,7 +71,7 @@ kpColor kpToolColorPicker::colorAtPixel (const QPoint &p)
}
-QString kpToolColorPicker::haventBegunDrawUserMessage () const
+TQString kpToolColorPicker::haventBegunDrawUserMessage () const
{
return i18n ("Click to select a color.");
}
@@ -90,7 +90,7 @@ void kpToolColorPicker::beginDraw ()
}
// virtual
-void kpToolColorPicker::draw (const QPoint &thisPoint, const QPoint &, const QRect &)
+void kpToolColorPicker::draw (const TQPoint &thisPoint, const TQPoint &, const TQRect &)
{
const kpColor color = colorAtPixel (thisPoint);
@@ -121,7 +121,7 @@ void kpToolColorPicker::releasedAllButtons ()
}
// virtual
-void kpToolColorPicker::endDraw (const QPoint &thisPoint, const QRect &)
+void kpToolColorPicker::endDraw (const TQPoint &thisPoint, const TQRect &)
{
const kpColor color = colorAtPixel (thisPoint);
@@ -162,7 +162,7 @@ kpToolColorPickerCommand::~kpToolColorPickerCommand ()
// public virtual [base kpCommand]
-QString kpToolColorPickerCommand::name () const
+TQString kpToolColorPickerCommand::name () const
{
return i18n ("Color Picker");
}
diff --git a/kolourpaint/tools/kptoolcolorpicker.h b/kolourpaint/tools/kptoolcolorpicker.h
index 46fc94be..6ebaa6d7 100644
--- a/kolourpaint/tools/kptoolcolorpicker.h
+++ b/kolourpaint/tools/kptoolcolorpicker.h
@@ -34,8 +34,8 @@
#include <kpcolor.h>
#include <kptool.h>
-class QPoint;
-class QRect;
+class TQPoint;
+class TQRect;
class kpColorToolBar;
@@ -52,18 +52,18 @@ public:
virtual bool returnToPreviousToolAfterEndDraw () const { return true; }
private:
- QString haventBegunDrawUserMessage () const;
+ TQString haventBegunDrawUserMessage () const;
public:
virtual void begin ();
virtual void beginDraw ();
- virtual void draw (const QPoint &thisPoint, const QPoint &, const QRect &);
+ virtual void draw (const TQPoint &thisPoint, const TQPoint &, const TQRect &);
virtual void cancelShape ();
virtual void releasedAllButtons ();
- virtual void endDraw (const QPoint &thisPoint, const QRect &);
+ virtual void endDraw (const TQPoint &thisPoint, const TQRect &);
private:
- kpColor colorAtPixel (const QPoint &p);
+ kpColor colorAtPixel (const TQPoint &p);
kpColor m_oldColor;
};
@@ -76,7 +76,7 @@ public:
kpMainWindow *mainWindow);
virtual ~kpToolColorPickerCommand ();
- virtual QString name () const;
+ virtual TQString name () const;
virtual int size () const;
diff --git a/kolourpaint/tools/kptoolconverttograyscale.cpp b/kolourpaint/tools/kptoolconverttograyscale.cpp
index a80ef8fa..524e3e6d 100644
--- a/kolourpaint/tools/kptoolconverttograyscale.cpp
+++ b/kolourpaint/tools/kptoolconverttograyscale.cpp
@@ -26,8 +26,8 @@
*/
-#include <qapplication.h>
-#include <qpixmap.h>
+#include <tqapplication.h>
+#include <tqpixmap.h>
#include <klocale.h>
@@ -54,9 +54,9 @@ kpToolConvertToGrayscaleCommand::~kpToolConvertToGrayscaleCommand ()
// public virtual [base kpCommand]
-QString kpToolConvertToGrayscaleCommand::name () const
+TQString kpToolConvertToGrayscaleCommand::name () const
{
- QString opName = i18n ("Reduce to Grayscale");
+ TQString opName = i18n ("Reduce to Grayscale");
if (m_actOnSelection)
return i18n ("Selection: %1").arg (opName);
@@ -79,16 +79,16 @@ void kpToolConvertToGrayscaleCommand::execute ()
if (!doc)
return;
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
- m_oldPixmapPtr = new QPixmap ();
+ m_oldPixmapPtr = new TQPixmap ();
*m_oldPixmapPtr = *doc->pixmap (m_actOnSelection);
- QPixmap newPixmap = kpPixmapFX::convertToGrayscale (*doc->pixmap (m_actOnSelection));
+ TQPixmap newPixmap = kpPixmapFX::convertToGrayscale (*doc->pixmap (m_actOnSelection));
doc->setPixmap (m_actOnSelection, newPixmap);
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
// public virtual [base kpCommand]
diff --git a/kolourpaint/tools/kptoolconverttograyscale.h b/kolourpaint/tools/kptoolconverttograyscale.h
index 6ea5e515..c5ae3aa8 100644
--- a/kolourpaint/tools/kptoolconverttograyscale.h
+++ b/kolourpaint/tools/kptoolconverttograyscale.h
@@ -31,8 +31,8 @@
#include <kpcommandhistory.h>
-class QPixmap;
-class QString;
+class TQPixmap;
+class TQString;
class kpMainWindow;
@@ -43,7 +43,7 @@ public:
kpMainWindow *mainWindow);
virtual ~kpToolConvertToGrayscaleCommand ();
- virtual QString name () const;
+ virtual TQString name () const;
virtual int size () const;
virtual void execute ();
@@ -51,7 +51,7 @@ public:
private:
bool m_actOnSelection;
- QPixmap *m_oldPixmapPtr;
+ TQPixmap *m_oldPixmapPtr;
};
#endif // __kptoolconverttograyscale_h__
diff --git a/kolourpaint/tools/kptoolcrop.cpp b/kolourpaint/tools/kptoolcrop.cpp
index 8cc6e880..f1e530ca 100644
--- a/kolourpaint/tools/kptoolcrop.cpp
+++ b/kolourpaint/tools/kptoolcrop.cpp
@@ -30,7 +30,7 @@
#include <kptoolcrop.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kdebug.h>
#include <klocale.h>
@@ -50,8 +50,8 @@ kpSelection selectionBorderAndMovedTo0_0 (const kpSelection &sel)
{
kpSelection borderSel = sel;
- borderSel.setPixmap (QPixmap ()); // only interested in border
- borderSel.moveTo (QPoint (0, 0));
+ borderSel.setPixmap (TQPixmap ()); // only interested in border
+ borderSel.moveTo (TQPoint (0, 0));
return borderSel;
}
@@ -68,7 +68,7 @@ public:
virtual ~kpToolCropSetImageCommand ();
/* (uninteresting child of macro cmd) */
- virtual QString name () const { return QString::null; }
+ virtual TQString name () const { return TQString::null; }
virtual int size () const
{
@@ -82,9 +82,9 @@ public:
protected:
kpColor m_backgroundColor;
- QPixmap m_oldPixmap;
+ TQPixmap m_oldPixmap;
kpSelection m_fromSelection;
- QPixmap m_pixmapIfFromSelectionDoesntHaveOne;
+ TQPixmap m_pixmapIfFromSelectionDoesntHaveOne;
};
@@ -94,7 +94,7 @@ kpToolCropSetImageCommand::kpToolCropSetImageCommand (kpMainWindow *mainWindow)
m_fromSelection (*mainWindow->document ()->selection ()),
m_pixmapIfFromSelectionDoesntHaveOne (
m_fromSelection.pixmap () ?
- QPixmap () :
+ TQPixmap () :
mainWindow->document ()->getSelectedPixmap ())
{
}
@@ -114,7 +114,7 @@ void kpToolCropSetImageCommand::execute ()
viewManager ()->setQueueUpdates ();
{
m_oldPixmap = kpPixmapFX::getPixmapAt (*document ()->pixmap (),
- QRect (0, 0, m_fromSelection.width (), m_fromSelection.height ()));
+ TQRect (0, 0, m_fromSelection.width (), m_fromSelection.height ()));
//
@@ -136,7 +136,7 @@ void kpToolCropSetImageCommand::execute ()
// any transparent pixels.
//
- QPixmap newDocPixmap (m_fromSelection.width (), m_fromSelection.height ());
+ TQPixmap newDocPixmap (m_fromSelection.width (), m_fromSelection.height ());
kpPixmapFX::fill (&newDocPixmap, m_backgroundColor);
#if DEBUG_KP_TOOL_CROP
@@ -144,7 +144,7 @@ void kpToolCropSetImageCommand::execute ()
<< " pm=" << m_fromSelection.pixmap ()
<< endl;
#endif
- QPixmap selTransparentPixmap;
+ TQPixmap selTransparentPixmap;
if (m_fromSelection.pixmap ())
{
@@ -166,15 +166,15 @@ void kpToolCropSetImageCommand::execute ()
}
kpPixmapFX::paintMaskTransparentWithBrush (&newDocPixmap,
- QPoint (0, 0),
+ TQPoint (0, 0),
m_fromSelection.maskForOwnType ());
kpPixmapFX::paintPixmapAt (&newDocPixmap,
- QPoint (0, 0),
+ TQPoint (0, 0),
selTransparentPixmap);
- document ()->setPixmapAt (newDocPixmap, QPoint (0, 0));
+ document ()->setPixmapAt (newDocPixmap, TQPoint (0, 0));
document ()->selectionDelete ();
@@ -193,7 +193,7 @@ void kpToolCropSetImageCommand::unexecute ()
viewManager ()->setQueueUpdates ();
{
- document ()->setPixmapAt (m_oldPixmap, QPoint (0, 0));
+ document ()->setPixmapAt (m_oldPixmap, TQPoint (0, 0));
m_oldPixmap.resize (0, 0);
#if DEBUG_KP_TOOL_CROP
@@ -274,9 +274,9 @@ kpToolCropCommand::kpToolCropCommand (kpMainWindow *mainWindow)
#endif
kpToolSelectionMoveCommand *moveCmd =
new kpToolSelectionMoveCommand (
- QString::null/*uninteresting child of macro cmd*/,
+ TQString::null/*uninteresting child of macro cmd*/,
mainWindow);
- moveCmd->moveTo (QPoint (0, 0), true/*move on exec, not now*/);
+ moveCmd->moveTo (TQPoint (0, 0), true/*move on exec, not now*/);
moveCmd->finalize ();
addCommand (moveCmd);
}
@@ -291,7 +291,7 @@ kpToolCropCommand::kpToolCropCommand (kpMainWindow *mainWindow)
#if 0
addCommand (
new kpToolSelectionCreateCommand (
- QString::null/*uninteresting child of macro cmd*/,
+ TQString::null/*uninteresting child of macro cmd*/,
selectionBorderAndMovedTo0_0 (*sel),
mainWindow));
#endif
diff --git a/kolourpaint/tools/kptoolflip.cpp b/kolourpaint/tools/kptoolflip.cpp
index 58eeb66d..146b639f 100644
--- a/kolourpaint/tools/kptoolflip.cpp
+++ b/kolourpaint/tools/kptoolflip.cpp
@@ -28,10 +28,10 @@
#include <kptoolflip.h>
-#include <qapplication.h>
-#include <qradiobutton.h>
-#include <qvbox.h>
-#include <qvbuttongroup.h>
+#include <tqapplication.h>
+#include <tqradiobutton.h>
+#include <tqvbox.h>
+#include <tqvbuttongroup.h>
#include <kdebug.h>
#include <klocale.h>
@@ -63,9 +63,9 @@ kpToolFlipCommand::~kpToolFlipCommand ()
// public virtual [base kpCommand]
-QString kpToolFlipCommand::name () const
+TQString kpToolFlipCommand::name () const
{
- QString opName;
+ TQString opName;
#if 1
@@ -80,7 +80,7 @@ QString kpToolFlipCommand::name () const
else
{
kdError () << "kpToolFlipCommand::name() not asked to flip" << endl;
- return QString::null;
+ return TQString::null;
}
#endif
@@ -120,7 +120,7 @@ void kpToolFlipCommand::flip ()
return;
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
if (m_actOnSelection)
@@ -131,13 +131,13 @@ void kpToolFlipCommand::flip ()
}
else
{
- QPixmap newPixmap = kpPixmapFX::flip (*doc->pixmap (), m_horiz, m_vert);
+ TQPixmap newPixmap = kpPixmapFX::flip (*doc->pixmap (), m_horiz, m_vert);
doc->setPixmap (newPixmap);
}
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
@@ -149,12 +149,12 @@ void kpToolFlipCommand::flip ()
bool kpToolFlipDialog::s_lastIsVerticalFlip = true;
-kpToolFlipDialog::kpToolFlipDialog (bool actOnSelection, QWidget *parent)
+kpToolFlipDialog::kpToolFlipDialog (bool actOnSelection, TQWidget *parent)
: KDialogBase (parent, 0/*name*/, true/*modal*/,
actOnSelection ? i18n ("Flip Selection") : i18n ("Flip Image"),
KDialogBase::Ok | KDialogBase::Cancel)
{
- QVBox *vbox = makeVBoxMainWidget ();
+ TQVBox *vbox = makeVBoxMainWidget ();
if (!vbox)
{
@@ -162,19 +162,19 @@ kpToolFlipDialog::kpToolFlipDialog (bool actOnSelection, QWidget *parent)
}
else
{
- QVButtonGroup *buttonGroup = new QVButtonGroup (i18n ("Direction"), vbox);
+ TQVButtonGroup *buttonGroup = new TQVButtonGroup (i18n ("Direction"), vbox);
// I'm sure vert flipping is much more common than horiz flipping so make it come first
- m_verticalFlipRadioButton = new QRadioButton (i18n ("&Vertical (upside-down)"), buttonGroup);
- m_horizontalFlipRadioButton = new QRadioButton (i18n ("&Horizontal"), buttonGroup);
+ m_verticalFlipRadioButton = new TQRadioButton (i18n ("&Vertical (upside-down)"), buttonGroup);
+ m_horizontalFlipRadioButton = new TQRadioButton (i18n ("&Horizontal"), buttonGroup);
m_verticalFlipRadioButton->setChecked (s_lastIsVerticalFlip);
m_horizontalFlipRadioButton->setChecked (!s_lastIsVerticalFlip);
- connect (m_verticalFlipRadioButton, SIGNAL (toggled (bool)),
- this, SLOT (slotIsVerticalFlipChanged ()));
- connect (m_horizontalFlipRadioButton, SIGNAL (toggled (bool)),
- this, SLOT (slotIsVerticalFlipChanged ()));
+ connect (m_verticalFlipRadioButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotIsVerticalFlipChanged ()));
+ connect (m_horizontalFlipRadioButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotIsVerticalFlipChanged ()));
}
}
diff --git a/kolourpaint/tools/kptoolflip.h b/kolourpaint/tools/kptoolflip.h
index c287c320..8399cf40 100644
--- a/kolourpaint/tools/kptoolflip.h
+++ b/kolourpaint/tools/kptoolflip.h
@@ -32,8 +32,8 @@
#include <kpcommandhistory.h>
#include <kdialogbase.h>
-class QRadioButton;
-class QString;
+class TQRadioButton;
+class TQString;
class kpDocument;
class kpMainWindow;
@@ -47,7 +47,7 @@ public:
kpMainWindow *mainWindow);
virtual ~kpToolFlipCommand ();
- virtual QString name () const;
+ virtual TQString name () const;
virtual int size () const;
@@ -67,7 +67,7 @@ class kpToolFlipDialog : public KDialogBase
Q_OBJECT
public:
- kpToolFlipDialog (bool actOnSelection, QWidget *parent);
+ kpToolFlipDialog (bool actOnSelection, TQWidget *parent);
~kpToolFlipDialog ();
private:
@@ -82,7 +82,7 @@ public:
bool isNoOp () const;
private:
- QRadioButton *m_horizontalFlipRadioButton, *m_verticalFlipRadioButton;
+ TQRadioButton *m_horizontalFlipRadioButton, *m_verticalFlipRadioButton;
};
#endif // __kptoolflip_h__
diff --git a/kolourpaint/tools/kptoolfloodfill.cpp b/kolourpaint/tools/kptoolfloodfill.cpp
index bb17d701..518820ba 100644
--- a/kolourpaint/tools/kptoolfloodfill.cpp
+++ b/kolourpaint/tools/kptoolfloodfill.cpp
@@ -31,10 +31,10 @@
#include <kptoolfloodfill.h>
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <kdebug.h>
#include <klocale.h>
@@ -63,7 +63,7 @@ kpToolFloodFill::~kpToolFloodFill ()
{
}
-QString kpToolFloodFill::haventBegunDrawUserMessage () const
+TQString kpToolFloodFill::haventBegunDrawUserMessage () const
{
return i18n ("Click to fill a region.");
}
@@ -80,7 +80,7 @@ void kpToolFloodFill::beginDraw ()
kdDebug () << "kpToolFloodFill::beginDraw()" << endl;
#endif
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
// Flood Fill is an expensive CPU operation so we only fill at a
// mouse click (beginDraw ()), not on mouse move (virtually draw())
@@ -112,13 +112,13 @@ void kpToolFloodFill::beginDraw ()
kdError () << "kpToolFloodFill::beginDraw() could not prepareColorToChange!" << endl;
}
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
setUserMessage (cancelUserMessage ());
}
// virtual
-void kpToolFloodFill::draw (const QPoint &thisPoint, const QPoint &, const QRect &)
+void kpToolFloodFill::draw (const TQPoint &thisPoint, const TQPoint &, const TQRect &)
{
setUserShapePoints (thisPoint);
}
@@ -127,7 +127,7 @@ void kpToolFloodFill::draw (const QPoint &thisPoint, const QPoint &, const QRect
void kpToolFloodFill::cancelShape ()
{
#if 0
- endDraw (QPoint (), QRect ());
+ endDraw (TQPoint (), TQRect ());
mainWindow ()->commandHistory ()->undo ();
#else
m_currentCommand->unexecute ();
@@ -145,7 +145,7 @@ void kpToolFloodFill::releasedAllButtons ()
}
// virtual
-void kpToolFloodFill::endDraw (const QPoint &, const QRect &)
+void kpToolFloodFill::endDraw (const TQPoint &, const TQRect &)
{
mainWindow ()->commandHistory ()->addCommand (m_currentCommand,
false /* no exec - we already did it up there */);
@@ -175,7 +175,7 @@ kpToolFloodFillCommand::~kpToolFloodFillCommand ()
// public virtual [base kpCommand]
-QString kpToolFloodFillCommand::name () const
+TQString kpToolFloodFillCommand::name () const
{
return i18n ("Flood Fill");
}
@@ -211,17 +211,17 @@ void kpToolFloodFillCommand::execute ()
}
else
{
- QRect rect = kpFloodFill::boundingRect ();
+ TQRect rect = kpFloodFill::boundingRect ();
if (rect.isValid ())
{
- QApplication::setOverrideCursor (QCursor::waitCursor);
+ TQApplication::setOverrideCursor (TQCursor::waitCursor);
m_oldPixmap = doc->getPixmapAt (rect);
kpFloodFill::fill ();
doc->slotContentsChanged (rect);
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
else
{
@@ -246,7 +246,7 @@ void kpToolFloodFillCommand::unexecute ()
}
else
{
- QRect rect = kpFloodFill::boundingRect ();
+ TQRect rect = kpFloodFill::boundingRect ();
if (rect.isValid ())
{
doc->setPixmapAt (m_oldPixmap, rect.topLeft ());
diff --git a/kolourpaint/tools/kptoolfloodfill.h b/kolourpaint/tools/kptoolfloodfill.h
index a2eeaa5a..73f5aae2 100644
--- a/kolourpaint/tools/kptoolfloodfill.h
+++ b/kolourpaint/tools/kptoolfloodfill.h
@@ -29,7 +29,7 @@
#ifndef __kptoolfloodfill_h__
#define __kptoolfloodfill_h__
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kpcommandhistory.h>
@@ -37,7 +37,7 @@
#include <kptool.h>
-class QString;
+class TQString;
class kpColor;
@@ -54,15 +54,15 @@ public:
virtual ~kpToolFloodFill ();
private:
- QString haventBegunDrawUserMessage () const;
+ TQString haventBegunDrawUserMessage () const;
public:
virtual void begin ();
virtual void beginDraw ();
- virtual void draw (const QPoint &thisPoint, const QPoint &, const QRect &);
+ virtual void draw (const TQPoint &thisPoint, const TQPoint &, const TQRect &);
virtual void cancelShape ();
virtual void releasedAllButtons ();
- virtual void endDraw (const QPoint &, const QRect &);
+ virtual void endDraw (const TQPoint &, const TQRect &);
private:
kpToolFloodFillCommand *m_currentCommand;
@@ -77,7 +77,7 @@ public:
kpMainWindow *mainWindow);
virtual ~kpToolFloodFillCommand ();
- virtual QString name () const;
+ virtual TQString name () const;
virtual int size () const;
@@ -87,7 +87,7 @@ public:
virtual void unexecute ();
private:
- QPixmap m_oldPixmap;
+ TQPixmap m_oldPixmap;
bool m_fillEntirePixmap;
};
diff --git a/kolourpaint/tools/kptoolpen.cpp b/kolourpaint/tools/kptoolpen.cpp
index eb731ceb..b738060c 100644
--- a/kolourpaint/tools/kptoolpen.cpp
+++ b/kolourpaint/tools/kptoolpen.cpp
@@ -28,13 +28,13 @@
#define DEBUG_KP_TOOL_PEN 0
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qcursor.h>
-#include <qimage.h>
-#include <qpainter.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqcursor.h>
+#include <tqimage.h>
+#include <tqpainter.h>
#if DEBUG_KP_TOOL_PEN
- #include <qdatetime.h>
+ #include <tqdatetime.h>
#endif
#include <kdebug.h>
@@ -60,7 +60,7 @@
*/
kpToolPen::kpToolPen (Mode mode,
- const QString &text, const QString &description,
+ const TQString &text, const TQString &description,
int key,
kpMainWindow *mainWindow, const char *name)
: kpTool (text, description, key, mainWindow, name),
@@ -103,7 +103,7 @@ kpToolPen::~kpToolPen ()
// private
-QString kpToolPen::haventBegunDrawUserMessage () const
+TQString kpToolPen::haventBegunDrawUserMessage () const
{
switch (m_mode)
{
@@ -116,7 +116,7 @@ QString kpToolPen::haventBegunDrawUserMessage () const
case ColorWasher:
return i18n ("Click or drag to erase pixels of the foreground color.");
default:
- return QString::null;
+ return TQString::null;
}
}
@@ -133,8 +133,8 @@ void kpToolPen::begin ()
if (m_mode & SquareBrushes)
{
m_toolWidgetEraserSize = tb->toolWidgetEraserSize ();
- connect (m_toolWidgetEraserSize, SIGNAL (eraserSizeChanged (int)),
- this, SLOT (slotEraserSizeChanged (int)));
+ connect (m_toolWidgetEraserSize, TQT_SIGNAL (eraserSizeChanged (int)),
+ this, TQT_SLOT (slotEraserSizeChanged (int)));
m_toolWidgetEraserSize->show ();
slotEraserSizeChanged (m_toolWidgetEraserSize->eraserSize ());
@@ -145,8 +145,8 @@ void kpToolPen::begin ()
if (m_mode & DiverseBrushes)
{
m_toolWidgetBrush = tb->toolWidgetBrush ();
- connect (m_toolWidgetBrush, SIGNAL (brushChanged (const QPixmap &, bool)),
- this, SLOT (slotBrushChanged (const QPixmap &, bool)));
+ connect (m_toolWidgetBrush, TQT_SIGNAL (brushChanged (const TQPixmap &, bool)),
+ this, TQT_SLOT (slotBrushChanged (const TQPixmap &, bool)));
m_toolWidgetBrush->show ();
slotBrushChanged (m_toolWidgetBrush->brush (),
@@ -163,15 +163,15 @@ void kpToolPen::end ()
{
if (m_toolWidgetEraserSize)
{
- disconnect (m_toolWidgetEraserSize, SIGNAL (eraserSizeChanged (int)),
- this, SLOT (slotEraserSizeChanged (int)));
+ disconnect (m_toolWidgetEraserSize, TQT_SIGNAL (eraserSizeChanged (int)),
+ this, TQT_SLOT (slotEraserSizeChanged (int)));
m_toolWidgetEraserSize = 0;
}
if (m_toolWidgetBrush)
{
- disconnect (m_toolWidgetBrush, SIGNAL (brushChanged (const QPixmap &, bool)),
- this, SLOT (slotBrushChanged (const QPixmap &, bool)));
+ disconnect (m_toolWidgetBrush, TQT_SIGNAL (brushChanged (const TQPixmap &, bool)),
+ this, TQT_SLOT (slotBrushChanged (const TQPixmap &, bool)));
m_toolWidgetBrush = 0;
}
@@ -224,7 +224,7 @@ void kpToolPen::beginDraw ()
}
// virtual
-void kpToolPen::hover (const QPoint &point)
+void kpToolPen::hover (const TQPoint &point)
{
#if DEBUG_KP_TOOL_PEN && 0
kdDebug () << "kpToolPen::hover(" << point << ")"
@@ -239,7 +239,7 @@ void kpToolPen::hover (const QPoint &point)
m_mouseButton = 0;
kpTempPixmap::RenderMode renderMode;
- QPixmap cursorPixmapForTempPixmap = m_cursorPixmap;
+ TQPixmap cursorPixmapForTempPixmap = m_cursorPixmap;
if (m_mode & SquareBrushes)
renderMode = kpTempPixmap::SetPixmap;
@@ -268,7 +268,7 @@ void kpToolPen::hover (const QPoint &point)
#if DEBUG_KP_TOOL_PEN && 0
if (document ()->rect ().contains (point))
{
- QImage image = kpPixmapFX::convertToImage (*document ()->pixmap ());
+ TQImage image = kpPixmapFX::convertToImage (*document ()->pixmap ());
QRgb v = image.pixel (point.x (), point.y ());
kdDebug () << "(" << point << "): r=" << qRed (v)
@@ -282,18 +282,18 @@ void kpToolPen::hover (const QPoint &point)
setUserShapePoints (point);
}
-bool kpToolPen::wash (QPainter *painter, QPainter *maskPainter,
- const QImage &image,
+bool kpToolPen::wash (TQPainter *painter, TQPainter *maskPainter,
+ const TQImage &image,
const kpColor &colorToReplace,
- const QRect &imageRect, int plotx, int ploty)
+ const TQRect &imageRect, int plotx, int ploty)
{
return wash (painter, maskPainter, image, colorToReplace, imageRect, hotRect (plotx, ploty));
}
-bool kpToolPen::wash (QPainter *painter, QPainter *maskPainter,
- const QImage &image,
+bool kpToolPen::wash (TQPainter *painter, TQPainter *maskPainter,
+ const TQImage &image,
const kpColor &colorToReplace,
- const QRect &imageRect, const QRect &drawRect)
+ const TQRect &imageRect, const TQRect &drawRect)
{
bool didSomething = false;
@@ -331,10 +331,10 @@ bool kpToolPen::wash (QPainter *painter, QPainter *maskPainter,
#if DEBUG_KP_TOOL_PEN && 0
fprintf (stderr, "y=%i x=%i colorAtPixel=%08X colorToReplace=%08X ... ",
y, x,
- kpPixmapFX::getColorAtPixel (image, QPoint (x, y)).toQRgb (),
+ kpPixmapFX::getColorAtPixel (image, TQPoint (x, y)).toQRgb (),
colorToReplace.toQRgb ());
#endif
- if (kpPixmapFX::getColorAtPixel (image, QPoint (x, y)).isSimilarTo (colorToReplace, processedColorSimilarity ()))
+ if (kpPixmapFX::getColorAtPixel (image, TQPoint (x, y)).isSimilarTo (colorToReplace, processedColorSimilarity ()))
{
#if DEBUG_KP_TOOL_PEN && 0
fprintf (stderr, "similar\n");
@@ -383,13 +383,13 @@ void kpToolPen::globalDraw ()
if (foregroundColor () == backgroundColor () && processedColorSimilarity () == 0)
return;
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
kpToolPenCommand *cmd = new kpToolPenCommand (
i18n ("Color Eraser"), mainWindow ());
- QPainter painter, maskPainter;
- QBitmap maskBitmap;
+ TQPainter painter, maskPainter;
+ TQBitmap maskBitmap;
if (backgroundColor ().isOpaque ())
{
@@ -406,8 +406,8 @@ void kpToolPen::globalDraw ()
maskPainter.setPen (backgroundColor ().maskColor ());
}
- const QImage image = kpPixmapFX::convertToImage (*document ()->pixmap ());
- QRect rect = document ()->rect ();
+ const TQImage image = kpPixmapFX::convertToImage (*document ()->pixmap ());
+ TQRect rect = document ()->rect ();
const bool didSomething = wash (&painter, &maskPainter, image,
foregroundColor ()/*replace foreground*/,
@@ -446,13 +446,13 @@ void kpToolPen::globalDraw ()
cmd = 0;
}
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
}
// virtual
// TODO: refactor!
-void kpToolPen::draw (const QPoint &thisPoint, const QPoint &lastPoint, const QRect &)
+void kpToolPen::draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const TQRect &)
{
if ((m_mode & WashesPixmaps) && (foregroundColor () == backgroundColor ()) && processedColorSimilarity () == 0)
return;
@@ -464,7 +464,7 @@ void kpToolPen::draw (const QPoint &thisPoint, const QPoint &lastPoint, const QR
{
if (m_mode & DrawsPixels)
{
- QPixmap pixmap (1, 1);
+ TQPixmap pixmap (1, 1);
const kpColor c = color (m_mouseButton);
@@ -475,7 +475,7 @@ void kpToolPen::draw (const QPoint &thisPoint, const QPoint &lastPoint, const QR
}
else
{
- QBitmap mask (1, 1);
+ TQBitmap mask (1, 1);
mask.fill (Qt::color0/*transparent*/);
pixmap.setMask (mask);
@@ -505,22 +505,22 @@ void kpToolPen::draw (const QPoint &thisPoint, const QPoint &lastPoint, const QR
{
#if DEBUG_KP_TOOL_PEN
kdDebug () << "Washing pixmap (immediate)" << endl;
- QTime timer;
+ TQTime timer;
#endif
- QRect rect = hotRect ();
+ TQRect rect = hotRect ();
#if DEBUG_KP_TOOL_PEN
timer.start ();
#endif
- QPixmap pixmap = document ()->getPixmapAt (rect);
+ TQPixmap pixmap = document ()->getPixmapAt (rect);
#if DEBUG_KP_TOOL_PEN
kdDebug () << "\tget from doc: " << timer.restart () << "ms" << endl;
#endif
- const QImage image = kpPixmapFX::convertToImage (pixmap);
+ const TQImage image = kpPixmapFX::convertToImage (pixmap);
#if DEBUG_KP_TOOL_PEN
kdDebug () << "\tconvert to image: " << timer.restart () << "ms" << endl;
#endif
- QPainter painter, maskPainter;
- QBitmap maskBitmap;
+ TQPainter painter, maskPainter;
+ TQBitmap maskBitmap;
if (color (m_mouseButton).isOpaque ())
{
@@ -576,7 +576,7 @@ void kpToolPen::draw (const QPoint &thisPoint, const QPoint &lastPoint, const QR
else
{
// find bounding rectangle
- QRect rect = QRect (thisPoint, lastPoint).normalize ();
+ TQRect rect = TQRect (thisPoint, lastPoint).normalize ();
if (m_mode != DrawsPixels)
rect = neededRect (rect, m_brushPixmap [m_mouseButton].width ());
@@ -586,17 +586,17 @@ void kpToolPen::draw (const QPoint &thisPoint, const QPoint &lastPoint, const QR
kdDebug () << "Washing pixmap (w=" << rect.width ()
<< ",h=" << rect.height () << ")" << endl;
}
- QTime timer;
+ TQTime timer;
int convAndWashTime;
#endif
const kpColor c = color (m_mouseButton);
bool transparent = c.isTransparent ();
- QPixmap pixmap = document ()->getPixmapAt (rect);
- QBitmap maskBitmap;
+ TQPixmap pixmap = document ()->getPixmapAt (rect);
+ TQBitmap maskBitmap;
- QPainter painter, maskPainter;
+ TQPainter painter, maskPainter;
if (m_mode & (DrawsPixels | WashesPixmaps))
{
@@ -614,7 +614,7 @@ void kpToolPen::draw (const QPoint &thisPoint, const QPoint &lastPoint, const QR
}
}
- QImage image;
+ TQImage image;
if (m_mode & WashesPixmaps)
{
#if DEBUG_KP_TOOL_PEN
@@ -631,7 +631,7 @@ void kpToolPen::draw (const QPoint &thisPoint, const QPoint &lastPoint, const QR
if (m_mode & DrawsPixels)
{
- QPoint sp = lastPoint - rect.topLeft (), ep = thisPoint - rect.topLeft ();
+ TQPoint sp = lastPoint - rect.topLeft (), ep = thisPoint - rect.topLeft ();
if (painter.isActive ())
painter.drawLine (sp, ep);
@@ -884,7 +884,7 @@ void kpToolPen::releasedAllButtons ()
}
// virtual
-void kpToolPen::endDraw (const QPoint &, const QRect &)
+void kpToolPen::endDraw (const TQPoint &, const TQRect &)
{
m_currentCommand->finalize ();
mainWindow ()->commandHistory ()->addCommand (m_currentCommand, false /* don't exec */);
@@ -939,7 +939,7 @@ void kpToolPen::slotBackgroundColorChanged (const kpColor &col)
}
// private slot
-void kpToolPen::slotBrushChanged (const QPixmap &pixmap, bool isDiagonalLine)
+void kpToolPen::slotBrushChanged (const TQPixmap &pixmap, bool isDiagonalLine)
{
#if DEBUG_KP_TOOL_PEN
kdDebug () << "kpToolPen::slotBrushChanged()" << endl;
@@ -984,17 +984,17 @@ void kpToolPen::slotEraserSizeChanged (int size)
updateBrushCursor ();
}
-QPoint kpToolPen::hotPoint () const
+TQPoint kpToolPen::hotPoint () const
{
return hotPoint (m_currentPoint);
}
-QPoint kpToolPen::hotPoint (int x, int y) const
+TQPoint kpToolPen::hotPoint (int x, int y) const
{
- return hotPoint (QPoint (x, y));
+ return hotPoint (TQPoint (x, y));
}
-QPoint kpToolPen::hotPoint (const QPoint &point) const
+TQPoint kpToolPen::hotPoint (const TQPoint &point) const
{
/*
* e.g.
@@ -1005,24 +1005,24 @@ QPoint kpToolPen::hotPoint (const QPoint &point) const
* Center
*/
return point -
- QPoint (m_brushPixmap [m_mouseButton].width () / 2,
+ TQPoint (m_brushPixmap [m_mouseButton].width () / 2,
m_brushPixmap [m_mouseButton].height () / 2);
}
-QRect kpToolPen::hotRect () const
+TQRect kpToolPen::hotRect () const
{
return hotRect (m_currentPoint);
}
-QRect kpToolPen::hotRect (int x, int y) const
+TQRect kpToolPen::hotRect (int x, int y) const
{
- return hotRect (QPoint (x, y));
+ return hotRect (TQPoint (x, y));
}
-QRect kpToolPen::hotRect (const QPoint &point) const
+TQRect kpToolPen::hotRect (const TQPoint &point) const
{
- QPoint topLeft = hotPoint (point);
- return QRect (topLeft.x (),
+ TQPoint topLeft = hotPoint (point);
+ return TQRect (topLeft.x (),
topLeft.y (),
m_brushPixmap [m_mouseButton].width (),
m_brushPixmap [m_mouseButton].height ());
@@ -1051,7 +1051,7 @@ void kpToolPen::updateBrushCursor (bool recalc)
* kpToolPenCommand
*/
-kpToolPenCommand::kpToolPenCommand (const QString &name, kpMainWindow *mainWindow)
+kpToolPenCommand::kpToolPenCommand (const TQString &name, kpMainWindow *mainWindow)
: kpNamedCommand (name, mainWindow),
m_pixmap (*document ()->pixmap ())
{
@@ -1087,7 +1087,7 @@ void kpToolPenCommand::swapOldAndNew ()
{
if (m_boundingRect.isValid ())
{
- QPixmap oldPixmap = document ()->getPixmapAt (m_boundingRect);
+ TQPixmap oldPixmap = document ()->getPixmapAt (m_boundingRect);
document ()->setPixmapAt (m_pixmap, m_boundingRect.topLeft ());
@@ -1096,13 +1096,13 @@ void kpToolPenCommand::swapOldAndNew ()
}
// public
-void kpToolPenCommand::updateBoundingRect (const QPoint &point)
+void kpToolPenCommand::updateBoundingRect (const TQPoint &point)
{
- updateBoundingRect (QRect (point, point));
+ updateBoundingRect (TQRect (point, point));
}
// public
-void kpToolPenCommand::updateBoundingRect (const QRect &rect)
+void kpToolPenCommand::updateBoundingRect (const TQRect &rect)
{
#if DEBUG_KP_TOOL_PEN & 0
kdDebug () << "kpToolPenCommand::updateBoundingRect() existing="
diff --git a/kolourpaint/tools/kptoolpen.h b/kolourpaint/tools/kptoolpen.h
index f57eb367..6bf8976a 100644
--- a/kolourpaint/tools/kptoolpen.h
+++ b/kolourpaint/tools/kptoolpen.h
@@ -29,14 +29,14 @@
#ifndef __kptoolpen_h__
#define __kptoolpen_h__
-#include <qpixmap.h>
-#include <qrect.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
#include <kpcommandhistory.h>
#include <kptool.h>
-class QPoint;
-class QString;
+class TQPoint;
+class TQString;
class kpColor;
class kpMainWindow;
@@ -71,7 +71,7 @@ public:
ColorWasher = WashesPixmaps | SquareBrushes | SwappedColors
};
- kpToolPen (Mode mode, const QString &text, const QString &description,
+ kpToolPen (Mode mode, const TQString &text, const TQString &description,
int key,
kpMainWindow *mainWindow, const char *name);
kpToolPen (kpMainWindow *mainWindow);
@@ -80,45 +80,45 @@ public:
void setMode (Mode mode);
private:
- QString haventBegunDrawUserMessage () const;
+ TQString haventBegunDrawUserMessage () const;
public:
virtual void begin ();
virtual void end ();
virtual void beginDraw ();
- virtual void hover (const QPoint &point);
+ virtual void hover (const TQPoint &point);
virtual void globalDraw ();
- virtual void draw (const QPoint &thisPoint, const QPoint &lastPoint, const QRect &);
+ virtual void draw (const TQPoint &thisPoint, const TQPoint &lastPoint, const TQRect &);
virtual void cancelShape ();
virtual void releasedAllButtons ();
- virtual void endDraw (const QPoint &, const QRect &);
+ virtual void endDraw (const TQPoint &, const TQRect &);
private slots:
virtual void slotForegroundColorChanged (const kpColor &col);
virtual void slotBackgroundColorChanged (const kpColor &col);
- void slotBrushChanged (const QPixmap &pixmap, bool isDiagonalLine);
+ void slotBrushChanged (const TQPixmap &pixmap, bool isDiagonalLine);
void slotEraserSizeChanged (int size);
private:
- bool wash (QPainter *painter, QPainter *maskPainter,
- const QImage &image,
+ bool wash (TQPainter *painter, TQPainter *maskPainter,
+ const TQImage &image,
const kpColor &colorToReplace,
- const QRect &imageRect, int plotx, int ploty);
- bool wash (QPainter *painter, QPainter *maskPainter,
- const QImage &image,
+ const TQRect &imageRect, int plotx, int ploty);
+ bool wash (TQPainter *painter, TQPainter *maskPainter,
+ const TQImage &image,
const kpColor &colorToReplace,
- const QRect &imageRect, const QRect &drawRect);
+ const TQRect &imageRect, const TQRect &drawRect);
kpColor color (int which);
- QPoint hotPoint () const;
- QPoint hotPoint (int x, int y) const;
- QPoint hotPoint (const QPoint &point) const;
- QRect hotRect () const;
- QRect hotRect (int x, int y) const;
- QRect hotRect (const QPoint &point) const;
+ TQPoint hotPoint () const;
+ TQPoint hotPoint (int x, int y) const;
+ TQPoint hotPoint (const TQPoint &point) const;
+ TQRect hotRect () const;
+ TQRect hotRect (int x, int y) const;
+ TQRect hotRect (const TQPoint &point) const;
Mode m_mode;
@@ -126,8 +126,8 @@ private:
kpToolWidgetBrush *m_toolWidgetBrush;
kpToolWidgetEraserSize *m_toolWidgetEraserSize;
- QPixmap m_brushPixmap [2];
- QPixmap m_cursorPixmap;
+ TQPixmap m_brushPixmap [2];
+ TQPixmap m_cursorPixmap;
bool m_brushIsDiagonalLine;
kpToolPenCommand *m_currentCommand;
@@ -136,7 +136,7 @@ private:
class kpToolPenCommand : public kpNamedCommand
{
public:
- kpToolPenCommand (const QString &name, kpMainWindow *mainWindow);
+ kpToolPenCommand (const TQString &name, kpMainWindow *mainWindow);
virtual ~kpToolPenCommand ();
virtual int size () const;
@@ -145,16 +145,16 @@ public:
virtual void unexecute ();
// interface for KToolPen
- void updateBoundingRect (const QPoint &point);
- void updateBoundingRect (const QRect &rect);
+ void updateBoundingRect (const TQPoint &point);
+ void updateBoundingRect (const TQRect &rect);
void finalize ();
void cancel ();
private:
void swapOldAndNew ();
- QPixmap m_pixmap;
- QRect m_boundingRect;
+ TQPixmap m_pixmap;
+ TQRect m_boundingRect;
};
#endif // __kptoolpen_h__
diff --git a/kolourpaint/tools/kptoolpolygon.cpp b/kolourpaint/tools/kptoolpolygon.cpp
index fb68745c..56c7941d 100644
--- a/kolourpaint/tools/kptoolpolygon.cpp
+++ b/kolourpaint/tools/kptoolpolygon.cpp
@@ -33,15 +33,15 @@
#include <float.h>
#include <math.h>
-#include <qbitmap.h>
-#include <qcursor.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qpoint.h>
-#include <qpushbutton.h>
-#include <qrect.h>
-#include <qtooltip.h>
-#include <qvbuttongroup.h>
+#include <tqbitmap.h>
+#include <tqcursor.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqpoint.h>
+#include <tqpushbutton.h>
+#include <tqrect.h>
+#include <tqtooltip.h>
+#include <tqvbuttongroup.h>
#include <kdebug.h>
#include <klocale.h>
@@ -58,16 +58,16 @@
#if DEBUG_KP_TOOL_POLYGON
-static const char *pointArrayToString (const QPointArray &pointArray)
+static const char *pointArrayToString (const TQPointArray &pointArray)
{
static char string [1000];
string [0] = '\0';
- for (QPointArray::ConstIterator it = pointArray.begin ();
+ for (TQPointArray::ConstIterator it = pointArray.begin ();
it != pointArray.end ();
it++)
{
- QString ps = QString (" (%1, %2)").arg ((*it).x ()).arg ((*it).y ());
+ TQString ps = TQString (" (%1, %2)").arg ((*it).x ()).arg ((*it).y ());
const char *pss = ps.latin1 ();
if (strlen (string) + strlen (pss) + 1 > sizeof (string) / sizeof (string [0]))
break;
@@ -79,18 +79,18 @@ static const char *pointArrayToString (const QPointArray &pointArray)
#endif
-static QPen makeMaskPen (const kpColor &color, int lineWidth, Qt::PenStyle lineStyle)
+static TQPen makeMaskPen (const kpColor &color, int lineWidth, Qt::PenStyle lineStyle)
{
- return QPen (color.maskColor (),
+ return TQPen (color.maskColor (),
lineWidth == 1 ? 0/*closer to looking width 1*/ : lineWidth, lineStyle,
Qt::RoundCap, Qt::RoundJoin);
}
-static QPen makePen (const kpColor &color, int lineWidth, Qt::PenStyle lineStyle)
+static TQPen makePen (const kpColor &color, int lineWidth, Qt::PenStyle lineStyle)
{
if (color.isOpaque ())
{
- return QPen (color.toQColor (),
+ return TQPen (color.toQColor (),
lineWidth == 1 ? 0/*closer to looking width 1*/ : lineWidth, lineStyle,
Qt::RoundCap, Qt::RoundJoin);
}
@@ -98,7 +98,7 @@ static QPen makePen (const kpColor &color, int lineWidth, Qt::PenStyle lineStyle
return Qt::NoPen;
}
-static QBrush makeMaskBrush (const kpColor &foregroundColor,
+static TQBrush makeMaskBrush (const kpColor &foregroundColor,
const kpColor &backgroundColor,
kpToolWidgetFillStyle *toolWidgetFillStyle)
{
@@ -108,7 +108,7 @@ static QBrush makeMaskBrush (const kpColor &foregroundColor,
return Qt::NoBrush;
}
-static QBrush makeBrush (const kpColor &foregroundColor,
+static TQBrush makeBrush (const kpColor &foregroundColor,
const kpColor &backgroundColor,
kpToolWidgetFillStyle *toolWidgetFillStyle)
{
@@ -118,7 +118,7 @@ static QBrush makeBrush (const kpColor &foregroundColor,
return Qt::NoBrush;
}
-static bool only1PixelInPointArray (const QPointArray &points)
+static bool only1PixelInPointArray (const TQPointArray &points)
{
if (points.count () == 0)
return false;
@@ -132,8 +132,8 @@ static bool only1PixelInPointArray (const QPointArray &points)
return true;
}
-static QPixmap pixmap (const QPixmap &oldPixmap,
- const QPointArray &points, const QRect &rect,
+static TQPixmap pixmap (const TQPixmap &oldPixmap,
+ const TQPointArray &points, const TQRect &rect,
const kpColor &foregroundColor, kpColor backgroundColor,
int lineWidth, Qt::PenStyle lineStyle,
kpToolWidgetFillStyle *toolWidgetFillStyle,
@@ -142,7 +142,7 @@ static QPixmap pixmap (const QPixmap &oldPixmap,
//
// figure out points to draw relative to topLeft of oldPixmap
- QPointArray pointsInRect = points;
+ TQPointArray pointsInRect = points;
pointsInRect.detach ();
pointsInRect.translate (-rect.x (), -rect.y ());
@@ -154,15 +154,15 @@ static QPixmap pixmap (const QPixmap &oldPixmap,
//
// draw
- QPen pen = makePen (foregroundColor, lineWidth, lineStyle),
+ TQPen pen = makePen (foregroundColor, lineWidth, lineStyle),
maskPen = makeMaskPen (foregroundColor, lineWidth, lineStyle);
- QBrush brush = makeBrush (foregroundColor, backgroundColor, toolWidgetFillStyle),
+ TQBrush brush = makeBrush (foregroundColor, backgroundColor, toolWidgetFillStyle),
maskBrush = makeMaskBrush (foregroundColor, backgroundColor, toolWidgetFillStyle);
- QPixmap pixmap = oldPixmap;
- QBitmap maskBitmap;
+ TQPixmap pixmap = oldPixmap;
+ TQBitmap maskBitmap;
- QPainter painter, maskPainter;
+ TQPainter painter, maskPainter;
if (pixmap.mask () ||
(maskPen.style () != Qt::NoPen &&
@@ -233,7 +233,7 @@ static QPixmap pixmap (const QPixmap &oldPixmap,
{
if (painter.isActive ())
{
- QPen XORpen = painter.pen ();
+ TQPen XORpen = painter.pen ();
XORpen.setColor (Qt::white);
painter.setPen (XORpen);
@@ -242,7 +242,7 @@ static QPixmap pixmap (const QPixmap &oldPixmap,
if (maskPainter.isActive ())
{
- QPen XORpen = maskPainter.pen ();
+ TQPen XORpen = maskPainter.pen ();
// TODO???
#if 0
@@ -261,7 +261,7 @@ static QPixmap pixmap (const QPixmap &oldPixmap,
break;
case kpToolPolygon::Curve:
int numPoints = pointsInRect.count ();
- QPointArray pa (4);
+ TQPointArray pa (4);
pa [0] = pointsInRect [0];
pa [3] = pointsInRect [1];
@@ -303,7 +303,7 @@ static QPixmap pixmap (const QPixmap &oldPixmap,
*/
kpToolPolygon::kpToolPolygon (Mode mode,
- const QString &text, const QString &description,
+ const TQString &text, const TQString &description,
int key,
kpMainWindow *mainWindow, const char *name)
: kpTool (text, description, key, mainWindow, name),
@@ -334,7 +334,7 @@ void kpToolPolygon::setMode (Mode m)
// private
-QString kpToolPolygon::haventBegunShapeUserMessage () const
+TQString kpToolPolygon::haventBegunShapeUserMessage () const
{
switch (m_mode)
{
@@ -346,7 +346,7 @@ QString kpToolPolygon::haventBegunShapeUserMessage () const
case Curve:
return i18n ("Drag out the start and end points.");
default:
- return QString::null;
+ return TQString::null;
}
}
@@ -370,11 +370,11 @@ void kpToolPolygon::begin ()
if (m_toolWidgetFillStyle)
{
- connect (m_toolWidgetFillStyle, SIGNAL (fillStyleChanged (kpToolWidgetFillStyle::FillStyle)),
- this, SLOT (slotFillStyleChanged (kpToolWidgetFillStyle::FillStyle)));
+ connect (m_toolWidgetFillStyle, TQT_SIGNAL (fillStyleChanged (kpToolWidgetFillStyle::FillStyle)),
+ this, TQT_SLOT (slotFillStyleChanged (kpToolWidgetFillStyle::FillStyle)));
}
- connect (m_toolWidgetLineWidth, SIGNAL (lineWidthChanged (int)),
- this, SLOT (slotLineWidthChanged (int)));
+ connect (m_toolWidgetLineWidth, TQT_SIGNAL (lineWidthChanged (int)),
+ this, TQT_SLOT (slotLineWidthChanged (int)));
if (m_toolWidgetFillStyle)
m_toolWidgetFillStyle->show ();
@@ -390,7 +390,7 @@ void kpToolPolygon::begin ()
m_lineWidth = 1;
}
- viewManager ()->setCursor (QCursor (CrossCursor));
+ viewManager ()->setCursor (TQCursor (CrossCursor));
m_originatingMouseButton = -1;
@@ -404,15 +404,15 @@ void kpToolPolygon::end ()
if (m_toolWidgetFillStyle)
{
- disconnect (m_toolWidgetFillStyle, SIGNAL (fillStyleChanged (kpToolWidgetFillStyle::FillStyle)),
- this, SLOT (slotFillStyleChanged (kpToolWidgetFillStyle::FillStyle)));
+ disconnect (m_toolWidgetFillStyle, TQT_SIGNAL (fillStyleChanged (kpToolWidgetFillStyle::FillStyle)),
+ this, TQT_SLOT (slotFillStyleChanged (kpToolWidgetFillStyle::FillStyle)));
m_toolWidgetFillStyle = 0;
}
if (m_toolWidgetLineWidth)
{
- disconnect (m_toolWidgetLineWidth, SIGNAL (lineWidthChanged (int)),
- this, SLOT (slotLineWidthChanged (int)));
+ disconnect (m_toolWidgetLineWidth, TQT_SIGNAL (lineWidthChanged (int)),
+ this, TQT_SLOT (slotLineWidthChanged (int)));
m_toolWidgetLineWidth = 0;
}
@@ -549,13 +549,13 @@ void kpToolPolygon::applyModifiers ()
if (fabs (KP_RADIANS_TO_DEGREES (angle) - 0)
< kpPixmapFX::AngleInDegreesEpsilon)
{
- m_toolLineEndPoint = QPoint (m_toolLineEndPoint.x (), m_toolLineStartPoint.y ());
+ m_toolLineEndPoint = TQPoint (m_toolLineEndPoint.x (), m_toolLineStartPoint.y ());
}
// vertical (dist from start !maintained)
else if (fabs (KP_RADIANS_TO_DEGREES (angle) - 90)
< kpPixmapFX::AngleInDegreesEpsilon)
{
- m_toolLineEndPoint = QPoint (m_toolLineStartPoint.x (), m_toolLineEndPoint.y ());
+ m_toolLineEndPoint = TQPoint (m_toolLineStartPoint.x (), m_toolLineEndPoint.y ());
}
// diagonal (dist from start maintained)
else
@@ -569,7 +569,7 @@ void kpToolPolygon::applyModifiers ()
const int newdy = qRound (dist * sin (angle) * sgn (diffy));
#undef sgn
- m_toolLineEndPoint = QPoint (m_toolLineStartPoint.x () + newdx,
+ m_toolLineEndPoint = TQPoint (m_toolLineStartPoint.x () + newdx,
m_toolLineStartPoint.y () + newdy);
#if DEBUG_KP_TOOL_POLYGON && 1
@@ -597,12 +597,12 @@ void kpToolPolygon::applyModifiers ()
m_points [count - 2] = m_toolLineStartPoint;
m_points [count - 1] = m_toolLineEndPoint;
- m_toolLineRect = kpTool::neededRect (QRect (m_toolLineStartPoint, m_toolLineEndPoint).normalize (),
+ m_toolLineRect = kpTool::neededRect (TQRect (m_toolLineStartPoint, m_toolLineEndPoint).normalize (),
m_lineWidth);
}
// virtual
-void kpToolPolygon::draw (const QPoint &, const QPoint &, const QRect &)
+void kpToolPolygon::draw (const TQPoint &, const TQPoint &, const TQRect &)
{
if (m_points.count () == 0)
return;
@@ -638,7 +638,7 @@ void kpToolPolygon::updateShape ()
if (m_points.count () == 0)
return;
- QRect boundingRect = kpTool::neededRect (m_points.boundingRect (), m_lineWidth);
+ TQRect boundingRect = kpTool::neededRect (m_points.boundingRect (), m_lineWidth);
#if DEBUG_KP_TOOL_POLYGON
kdDebug () << "kpToolPolygon::updateShape() boundingRect="
@@ -648,8 +648,8 @@ void kpToolPolygon::updateShape ()
<< endl;
#endif
- QPixmap oldPixmap = document ()->getPixmapAt (boundingRect);
- QPixmap newPixmap = pixmap (oldPixmap,
+ TQPixmap oldPixmap = document ()->getPixmapAt (boundingRect);
+ TQPixmap newPixmap = pixmap (oldPixmap,
m_points, boundingRect,
color (m_mouseButton), color (1 - m_mouseButton),
m_lineWidth, Qt::SolidLine,
@@ -668,7 +668,7 @@ void kpToolPolygon::updateShape ()
void kpToolPolygon::cancelShape ()
{
#if 0
- endDraw (QPoint (), QRect ());
+ endDraw (TQPoint (), TQRect ());
commandHistory ()->undo ();
#else
viewManager ()->invalidateTempPixmap ();
@@ -687,7 +687,7 @@ void kpToolPolygon::releasedAllButtons ()
}
// virtual
-void kpToolPolygon::endDraw (const QPoint &, const QRect &)
+void kpToolPolygon::endDraw (const TQPoint &, const TQRect &)
{
#if DEBUG_KP_TOOL_POLYGON
kdDebug () << "kpToolPolygon::endDraw() m_points=" << pointArrayToString (m_points) << endl;
@@ -772,7 +772,7 @@ void kpToolPolygon::endDraw (const QPoint &, const QRect &)
}
// public virtual
-void kpToolPolygon::endShape (const QPoint &, const QRect &)
+void kpToolPolygon::endShape (const TQPoint &, const TQRect &)
{
#if DEBUG_KP_TOOL_POLYGON
kdDebug () << "kpToolPolygon::endShape() m_points=" << pointArrayToString (m_points) << endl;
@@ -783,7 +783,7 @@ void kpToolPolygon::endShape (const QPoint &, const QRect &)
viewManager ()->invalidateTempPixmap ();
- QRect boundingRect = kpTool::neededRect (m_points.boundingRect (), m_lineWidth);
+ TQRect boundingRect = kpTool::neededRect (m_points.boundingRect (), m_lineWidth);
kpToolPolygonCommand *lineCommand =
new kpToolPolygonCommand
@@ -840,13 +840,13 @@ void kpToolPolygon::slotBackgroundColorChanged (const kpColor &)
* kpToolPolygonCommand
*/
-kpToolPolygonCommand::kpToolPolygonCommand (const QString &name,
- const QPointArray &points,
- const QRect &normalizedRect,
+kpToolPolygonCommand::kpToolPolygonCommand (const TQString &name,
+ const TQPointArray &points,
+ const TQRect &normalizedRect,
const kpColor &foregroundColor, const kpColor &backgroundColor,
int lineWidth, Qt::PenStyle lineStyle,
kpToolWidgetFillStyle *toolWidgetFillStyle,
- const QPixmap &originalArea,
+ const TQPixmap &originalArea,
enum kpToolPolygon::Mode mode,
kpMainWindow *mainWindow)
: kpNamedCommand (name, mainWindow),
@@ -877,7 +877,7 @@ int kpToolPolygonCommand::size () const
// public virtual [base kpCommand]
void kpToolPolygonCommand::execute ()
{
- QPixmap p = pixmap (m_originalArea,
+ TQPixmap p = pixmap (m_originalArea,
m_points, m_normalizedRect,
m_foregroundColor, m_backgroundColor,
m_lineWidth, m_lineStyle,
diff --git a/kolourpaint/tools/kptoolpolygon.h b/kolourpaint/tools/kptoolpolygon.h
index 456dc4c0..289fb9ab 100644
--- a/kolourpaint/tools/kptoolpolygon.h
+++ b/kolourpaint/tools/kptoolpolygon.h
@@ -29,13 +29,13 @@
#ifndef __kptoolpolygon_h__
#define __kptoolpolygon_h__
-#include <qbrush.h>
-#include <qpen.h>
-#include <qobject.h>
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qpointarray.h>
-#include <qrect.h>
+#include <tqbrush.h>
+#include <tqpen.h>
+#include <tqobject.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqpointarray.h>
+#include <tqrect.h>
#include <kpcommandhistory.h>
@@ -43,11 +43,11 @@
#include <kptool.h>
#include <kptoolwidgetfillstyle.h>
-class QMouseEvent;
-class QPen;
-class QPoint;
-class QRect;
-class QString;
+class TQMouseEvent;
+class TQPen;
+class TQPoint;
+class TQRect;
+class TQString;
class kpView;
class kpDocument;
@@ -67,7 +67,7 @@ public:
Polygon, Polyline, Line, Curve
};
- kpToolPolygon (Mode mode, const QString &text, const QString &description,
+ kpToolPolygon (Mode mode, const TQString &text, const TQString &description,
int key,
kpMainWindow *mainWindow, const char *name);
kpToolPolygon (kpMainWindow *mainWindow);
@@ -78,18 +78,18 @@ public:
virtual bool careAboutModifierState () const { return true; }
private:
- QString haventBegunShapeUserMessage () const;
+ TQString haventBegunShapeUserMessage () const;
public:
virtual void begin ();
virtual void end ();
virtual void beginDraw ();
- virtual void draw (const QPoint &, const QPoint &, const QRect &);
+ virtual void draw (const TQPoint &, const TQPoint &, const TQRect &);
virtual void cancelShape ();
virtual void releasedAllButtons ();
- virtual void endDraw (const QPoint &, const QRect &);
- virtual void endShape (const QPoint & = QPoint (), const QRect & = QRect ());
+ virtual void endDraw (const TQPoint &, const TQRect &);
+ virtual void endShape (const TQPoint & = TQPoint (), const TQRect & = TQRect ());
virtual bool hasBegunShape () const;
@@ -116,22 +116,22 @@ private:
void applyModifiers ();
- QPoint m_toolLineStartPoint, m_toolLineEndPoint;
- QRect m_toolLineRect;
+ TQPoint m_toolLineStartPoint, m_toolLineEndPoint;
+ TQRect m_toolLineRect;
- QPointArray m_points;
+ TQPointArray m_points;
};
class kpToolPolygonCommand : public kpNamedCommand
{
public:
- kpToolPolygonCommand (const QString &name,
- const QPointArray &points,
- const QRect &normalizedRect,
+ kpToolPolygonCommand (const TQString &name,
+ const TQPointArray &points,
+ const TQRect &normalizedRect,
const kpColor &foregroundColor, const kpColor &backgroundColor,
int lineWidth, Qt::PenStyle lineStyle,
kpToolWidgetFillStyle *toolWidgetFillStyle,
- const QPixmap &originalArea,
+ const TQPixmap &originalArea,
kpToolPolygon::Mode mode,
kpMainWindow *mainWindow);
virtual ~kpToolPolygonCommand ();
@@ -142,15 +142,15 @@ public:
virtual void unexecute ();
private:
- QPointArray m_points;
- QRect m_normalizedRect;
+ TQPointArray m_points;
+ TQRect m_normalizedRect;
kpColor m_foregroundColor, m_backgroundColor;
int m_lineWidth;
Qt::PenStyle m_lineStyle;
kpToolWidgetFillStyle *m_toolWidgetFillStyle;
- QPixmap m_originalArea;
+ TQPixmap m_originalArea;
kpToolPolygon::Mode m_mode;
};
diff --git a/kolourpaint/tools/kptoolpreviewdialog.cpp b/kolourpaint/tools/kptoolpreviewdialog.cpp
index 23149232..5149664b 100644
--- a/kolourpaint/tools/kptoolpreviewdialog.cpp
+++ b/kolourpaint/tools/kptoolpreviewdialog.cpp
@@ -29,11 +29,11 @@
#include <kptoolpreviewdialog.h>
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include <kdebug.h>
#include <klocale.h>
@@ -48,8 +48,8 @@
kpToolPreviewDialog::kpToolPreviewDialog (Features features,
bool reserveTopRow,
- const QString &caption,
- const QString &afterActionText,
+ const TQString &caption,
+ const TQString &afterActionText,
bool actOnSelection,
kpMainWindow *parent,
const char *name)
@@ -65,7 +65,7 @@ kpToolPreviewDialog::kpToolPreviewDialog (Features features,
m_previewPixmapLabel (0),
m_gridLayout (0)
{
- QWidget *baseWidget = new QWidget (this);
+ TQWidget *baseWidget = new TQWidget (this);
setMainWidget (baseWidget);
@@ -87,7 +87,7 @@ kpToolPreviewDialog::kpToolPreviewDialog (Features features,
createPreviewGroupBox ();
- m_gridLayout = new QGridLayout (baseWidget, 4, 2,
+ m_gridLayout = new TQGridLayout (baseWidget, 4, 2,
0/*margin*/, spacingHint ());
m_gridNumRows = reserveTopRow ? 1 : 0;
if (m_dimensionsGroupBox || m_previewGroupBox)
@@ -123,10 +123,10 @@ kpToolPreviewDialog::~kpToolPreviewDialog ()
// private
void kpToolPreviewDialog::createDimensionsGroupBox ()
{
- m_dimensionsGroupBox = new QGroupBox (i18n ("Dimensions"), mainWidget ());
+ m_dimensionsGroupBox = new TQGroupBox (i18n ("Dimensions"), mainWidget ());
- QLabel *originalLabel = new QLabel (i18n ("Original:"), m_dimensionsGroupBox);
- QString originalDimensions;
+ TQLabel *originalLabel = new TQLabel (i18n ("Original:"), m_dimensionsGroupBox);
+ TQString originalDimensions;
if (document ())
{
originalDimensions = i18n ("%1 x %2")
@@ -134,18 +134,18 @@ void kpToolPreviewDialog::createDimensionsGroupBox ()
.arg (m_oldHeight);
// Stop the Dimensions Group Box from resizing so often
- const QString minimumLengthString ("100000 x 100000");
+ const TQString minimumLengthString ("100000 x 100000");
const int padLength = minimumLengthString.length ();
for (int i = originalDimensions.length (); i < padLength; i++)
originalDimensions += " ";
}
- QLabel *originalDimensionsLabel = new QLabel (originalDimensions, m_dimensionsGroupBox);
+ TQLabel *originalDimensionsLabel = new TQLabel (originalDimensions, m_dimensionsGroupBox);
- QLabel *afterTransformLabel = new QLabel (m_afterActionText, m_dimensionsGroupBox);
- m_afterTransformDimensionsLabel = new QLabel (m_dimensionsGroupBox);
+ TQLabel *afterTransformLabel = new TQLabel (m_afterActionText, m_dimensionsGroupBox);
+ m_afterTransformDimensionsLabel = new TQLabel (m_dimensionsGroupBox);
- QGridLayout *dimensionsLayout = new QGridLayout (m_dimensionsGroupBox,
+ TQGridLayout *dimensionsLayout = new TQGridLayout (m_dimensionsGroupBox,
2, 2,
marginHint () * 2, spacingHint ());
@@ -158,20 +158,20 @@ void kpToolPreviewDialog::createDimensionsGroupBox ()
// private
void kpToolPreviewDialog::createPreviewGroupBox ()
{
- m_previewGroupBox = new QGroupBox (i18n ("Preview"), mainWidget ());
+ m_previewGroupBox = new TQGroupBox (i18n ("Preview"), mainWidget ());
m_previewPixmapLabel = new kpResizeSignallingLabel (m_previewGroupBox);
m_previewPixmapLabel->setMinimumSize (150, 110);
- connect (m_previewPixmapLabel, SIGNAL (resized ()),
- this, SLOT (updatePreview ()));
+ connect (m_previewPixmapLabel, TQT_SIGNAL (resized ()),
+ this, TQT_SLOT (updatePreview ()));
- QPushButton *updatePushButton = new QPushButton (i18n ("&Update"),
+ TQPushButton *updatePushButton = new TQPushButton (i18n ("&Update"),
m_previewGroupBox);
- connect (updatePushButton, SIGNAL (clicked ()),
- this, SLOT (slotUpdateWithWaitCursor ()));
+ connect (updatePushButton, TQT_SIGNAL (clicked ()),
+ this, TQT_SLOT (slotUpdateWithWaitCursor ()));
- QVBoxLayout *previewLayout = new QVBoxLayout (m_previewGroupBox,
+ TQVBoxLayout *previewLayout = new TQVBoxLayout (m_previewGroupBox,
marginHint () * 2,
QMAX (1, spacingHint () / 2));
@@ -188,13 +188,13 @@ kpDocument *kpToolPreviewDialog::document () const
// protected
-void kpToolPreviewDialog::addCustomWidgetToFront (QWidget *w)
+void kpToolPreviewDialog::addCustomWidgetToFront (TQWidget *w)
{
m_gridLayout->addMultiCellWidget (w, 0, 0, 0, 1);
}
// protected
-void kpToolPreviewDialog::addCustomWidget (QWidget *w)
+void kpToolPreviewDialog::addCustomWidget (TQWidget *w)
{
m_gridLayout->addMultiCellWidget (w, m_gridNumRows, m_gridNumRows, 0, 1);
m_gridNumRows++;
@@ -211,12 +211,12 @@ void kpToolPreviewDialog::updateDimensions ()
if (!doc)
return;
- QSize newDim = newDimensions ();
+ TQSize newDim = newDimensions ();
#if DEBUG_KP_TOOL_PREVIEW_DIALOG
kdDebug () << "kpToolPreviewDialog::updateDimensions(): newDim=" << newDim << endl;
#endif
- QString newDimString = i18n ("%1 x %2")
+ TQString newDimString = i18n ("%1 x %2")
.arg (newDim.width ())
.arg (newDim.height ());
m_afterTransformDimensionsLabel->setText (newDimString);
@@ -283,7 +283,7 @@ void kpToolPreviewDialog::updateShrukenDocumentPixmap ()
m_oldWidth,
m_oldHeight);
- QPixmap pixmap;
+ TQPixmap pixmap;
if (m_actOnSelection)
{
@@ -337,7 +337,7 @@ void kpToolPreviewDialog::updatePreview ()
if (!m_shrunkenDocumentPixmap.isNull ())
{
- QSize newDim = newDimensions ();
+ TQSize newDim = newDimensions ();
double keepsAspectScale = aspectScale (m_previewPixmapLabel->width (),
m_previewPixmapLabel->height (),
newDim.width (),
@@ -352,12 +352,12 @@ void kpToolPreviewDialog::updatePreview ()
1, // min
m_previewPixmapLabel->height ()); // max
- // TODO: Some effects work directly on QImage; so could cache the
- // QImage so that transformPixmap() is faster
- QPixmap transformedShrunkenDocumentPixmap =
+ // TODO: Some effects work directly on TQImage; so could cache the
+ // TQImage so that transformPixmap() is faster
+ TQPixmap transformedShrunkenDocumentPixmap =
transformPixmap (m_shrunkenDocumentPixmap, targetWidth, targetHeight);
- QPixmap previewPixmap (m_previewPixmapLabel->width (),
+ TQPixmap previewPixmap (m_previewPixmapLabel->width (),
m_previewPixmapLabel->height ());
kpPixmapFX::fill (&previewPixmap, kpColor::transparent);
kpPixmapFX::setPixmapAt (&previewPixmap,
@@ -392,7 +392,7 @@ void kpToolPreviewDialog::updatePreview ()
m_previewPixmapLabel->repaint (false/*no erase*/);
#if DEBUG_KP_TOOL_PREVIEW_DIALOG
- kdDebug () << "\tafter QLabel::setPixmap() previewPixmapLabel: w="
+ kdDebug () << "\tafter TQLabel::setPixmap() previewPixmapLabel: w="
<< m_previewPixmapLabel->width ()
<< " h="
<< m_previewPixmapLabel->height ()
@@ -420,11 +420,11 @@ void kpToolPreviewDialog::slotUpdateWithWaitCursor ()
<< endl;
#endif
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
slotUpdate ();
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
diff --git a/kolourpaint/tools/kptoolpreviewdialog.h b/kolourpaint/tools/kptoolpreviewdialog.h
index 35efdc38..074a03ec 100644
--- a/kolourpaint/tools/kptoolpreviewdialog.h
+++ b/kolourpaint/tools/kptoolpreviewdialog.h
@@ -29,14 +29,14 @@
#define __kp_tool_preview_dialog_h__
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kdialogbase.h>
-class QLabel;
-class QGridLayout;
-class QGroupBox;
+class TQLabel;
+class TQGridLayout;
+class TQGroupBox;
class kpDocument;
class kpMainWindow;
@@ -58,9 +58,9 @@ public:
kpToolPreviewDialog (Features features,
bool reserveTopRow,
// e.g. "Skew (Image|Selection)"
- const QString &caption,
+ const TQString &caption,
// (in the Dimensions Group Box) e.g. "After Skew:"
- const QString &afterActionText,
+ const TQString &afterActionText,
bool actOnSelection,
kpMainWindow *parent,
const char *name = 0);
@@ -77,15 +77,15 @@ protected:
kpDocument *document () const;
// All widgets must have mainWidget() as their parent
- void addCustomWidgetToFront (QWidget *w); // see <reserveTopRow> in ctor
- void addCustomWidget (QWidget *w);
- void addCustomWidgetToBack (QWidget *w)
+ void addCustomWidgetToFront (TQWidget *w); // see <reserveTopRow> in ctor
+ void addCustomWidget (TQWidget *w);
+ void addCustomWidgetToBack (TQWidget *w)
{
addCustomWidget (w);
}
- virtual QSize newDimensions () const = 0;
- virtual QPixmap transformPixmap (const QPixmap &pixmap,
+ virtual TQSize newDimensions () const = 0;
+ virtual TQPixmap transformPixmap (const TQPixmap &pixmap,
int targetWidth, int targetHeight) const = 0;
private:
@@ -109,21 +109,21 @@ protected slots:
virtual void slotUpdateWithWaitCursor ();
protected:
- QString m_afterActionText;
+ TQString m_afterActionText;
bool m_actOnSelection;
kpMainWindow *m_mainWindow;
int m_oldWidth, m_oldHeight;
- QGroupBox *m_dimensionsGroupBox;
- QLabel *m_afterTransformDimensionsLabel;
+ TQGroupBox *m_dimensionsGroupBox;
+ TQLabel *m_afterTransformDimensionsLabel;
- QGroupBox *m_previewGroupBox;
+ TQGroupBox *m_previewGroupBox;
kpResizeSignallingLabel *m_previewPixmapLabel;
- QSize m_previewPixmapLabelSizeWhenUpdatedPixmap;
- QPixmap m_shrunkenDocumentPixmap;
+ TQSize m_previewPixmapLabelSizeWhenUpdatedPixmap;
+ TQPixmap m_shrunkenDocumentPixmap;
- QGridLayout *m_gridLayout;
+ TQGridLayout *m_gridLayout;
int m_gridNumRows;
};
diff --git a/kolourpaint/tools/kptoolrectangle.cpp b/kolourpaint/tools/kptoolrectangle.cpp
index 275db667..2c717fee 100644
--- a/kolourpaint/tools/kptoolrectangle.cpp
+++ b/kolourpaint/tools/kptoolrectangle.cpp
@@ -28,10 +28,10 @@
#define DEBUG_KP_TOOL_RECTANGLE 0
-#include <qbitmap.h>
-#include <qcursor.h>
-#include <qevent.h>
-#include <qpainter.h>
+#include <tqbitmap.h>
+#include <tqcursor.h>
+#include <tqevent.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <klocale.h>
@@ -50,16 +50,16 @@
#include <kpview.h>
#include <kpviewmanager.h>
-static QPixmap pixmap (const kpToolRectangle::Mode mode,
- kpDocument *document, const QRect &rect,
- const QPoint &startPoint, const QPoint &endPoint,
- const QPen &pen, const QPen &maskPen,
- const QBrush &brush, const QBrush &maskBrush)
+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)
{
- QPixmap pixmap = document->getPixmapAt (rect);
- QBitmap maskBitmap;
+ TQPixmap pixmap = document->getPixmapAt (rect);
+ TQBitmap maskBitmap;
- QPainter painter, maskPainter;
+ TQPainter painter, maskPainter;
#if DEBUG_KP_TOOL_RECTANGLE && 1
kdDebug () << "pixmap: rect=" << rect
@@ -116,13 +116,13 @@ static QPixmap pixmap (const kpToolRectangle::Mode mode,
switch (mode)
{
case kpToolRectangle::Rectangle:
- PAINTER_CALL (drawRect (QRect (startPoint - rect.topLeft (), endPoint - rect.topLeft ())));
+ PAINTER_CALL (drawRect (TQRect (startPoint - rect.topLeft (), endPoint - rect.topLeft ())));
break;
case kpToolRectangle::RoundedRectangle:
- PAINTER_CALL (drawRoundRect (QRect (startPoint - rect.topLeft (), endPoint - rect.topLeft ())));
+ PAINTER_CALL (drawRoundRect (TQRect (startPoint - rect.topLeft (), endPoint - rect.topLeft ())));
break;
case kpToolRectangle::Ellipse:
- PAINTER_CALL (drawEllipse (QRect (startPoint - rect.topLeft (), endPoint - rect.topLeft ())));
+ PAINTER_CALL (drawEllipse (TQRect (startPoint - rect.topLeft (), endPoint - rect.topLeft ())));
break;
default:
kdError () << "kptoolrectangle.cpp::pixmap() passed unknown mode: " << int (mode) << endl;
@@ -159,8 +159,8 @@ static QPixmap pixmap (const kpToolRectangle::Mode mode,
*/
kpToolRectangle::kpToolRectangle (Mode mode,
- const QString &text,
- const QString &description,
+ const TQString &text,
+ const TQString &description,
int key,
kpMainWindow *mainWindow,
const char *name)
@@ -231,27 +231,27 @@ void kpToolRectangle::slotBackgroundColorChanged (const kpColor &)
// private
void kpToolRectangle::updatePen (int mouseButton)
{
- QColor maskPenColor = color (mouseButton).maskColor ();
+ TQColor maskPenColor = color (mouseButton).maskColor ();
if (!m_toolWidgetLineWidth)
{
if (color (mouseButton).isOpaque ())
- m_pen [mouseButton] = QPen (color (mouseButton).toQColor ());
+ m_pen [mouseButton] = TQPen (color (mouseButton).toQColor ());
else
m_pen [mouseButton] = Qt::NoPen;
- m_maskPen [mouseButton] = QPen (maskPenColor);
+ m_maskPen [mouseButton] = TQPen (maskPenColor);
}
else
{
if (color (mouseButton).isOpaque ())
{
- m_pen [mouseButton] = QPen (color (mouseButton).toQColor (),
+ m_pen [mouseButton] = TQPen (color (mouseButton).toQColor (),
m_toolWidgetLineWidth->lineWidth (),
Qt::SolidLine);
}
else
m_pen [mouseButton] = Qt::NoPen;
- m_maskPen [mouseButton] = QPen (maskPenColor,
+ m_maskPen [mouseButton] = TQPen (maskPenColor,
m_toolWidgetLineWidth->lineWidth (),
Qt::SolidLine);
}
@@ -302,7 +302,7 @@ void kpToolRectangle::slotFillStyleChanged ()
// private
-QString kpToolRectangle::haventBegunDrawUserMessage () const
+TQString kpToolRectangle::haventBegunDrawUserMessage () const
{
return i18n ("Drag to draw.");
}
@@ -323,16 +323,16 @@ void kpToolRectangle::begin ()
if (tb)
{
m_toolWidgetLineWidth = tb->toolWidgetLineWidth ();
- connect (m_toolWidgetLineWidth, SIGNAL (lineWidthChanged (int)),
- this, SLOT (slotLineWidthChanged ()));
+ connect (m_toolWidgetLineWidth, TQT_SIGNAL (lineWidthChanged (int)),
+ this, TQT_SLOT (slotLineWidthChanged ()));
m_toolWidgetLineWidth->show ();
updatePens ();
m_toolWidgetFillStyle = tb->toolWidgetFillStyle ();
- connect (m_toolWidgetFillStyle, SIGNAL (fillStyleChanged (kpToolWidgetFillStyle::FillStyle)),
- this, SLOT (slotFillStyleChanged ()));
+ connect (m_toolWidgetFillStyle, TQT_SIGNAL (fillStyleChanged (kpToolWidgetFillStyle::FillStyle)),
+ this, TQT_SLOT (slotFillStyleChanged ()));
m_toolWidgetFillStyle->show ();
updateBrushes ();
@@ -342,7 +342,7 @@ void kpToolRectangle::begin ()
kdDebug () << "\t\tm_toolWidgetFillStyle=" << m_toolWidgetFillStyle << endl;
#endif
- viewManager ()->setCursor (QCursor (CrossCursor));
+ viewManager ()->setCursor (TQCursor (CrossCursor));
setUserMessage (haventBegunDrawUserMessage ());
}
@@ -356,15 +356,15 @@ void kpToolRectangle::end ()
if (m_toolWidgetLineWidth)
{
- disconnect (m_toolWidgetLineWidth, SIGNAL (lineWidthChanged (int)),
- this, SLOT (slotLineWidthChanged ()));
+ disconnect (m_toolWidgetLineWidth, TQT_SIGNAL (lineWidthChanged (int)),
+ this, TQT_SLOT (slotLineWidthChanged ()));
m_toolWidgetLineWidth = 0;
}
if (m_toolWidgetFillStyle)
{
- disconnect (m_toolWidgetFillStyle, SIGNAL (fillStyleChanged (kpToolWidgetFillStyle::FillStyle)),
- this, SLOT (slotFillStyleChanged ()));
+ disconnect (m_toolWidgetFillStyle, TQT_SIGNAL (fillStyleChanged (kpToolWidgetFillStyle::FillStyle)),
+ this, TQT_SLOT (slotFillStyleChanged ()));
m_toolWidgetFillStyle = 0;
}
@@ -373,7 +373,7 @@ void kpToolRectangle::end ()
void kpToolRectangle::applyModifiers ()
{
- QRect rect = QRect (m_startPoint, m_currentPoint).normalize ();
+ TQRect rect = TQRect (m_startPoint, m_currentPoint).normalize ();
#if DEBUG_KP_TOOL_RECTANGLE
kdDebug () << "kpToolRectangle::applyModifiers(" << rect
@@ -387,7 +387,7 @@ void kpToolRectangle::applyModifiers ()
{
int xdiff = kAbs (m_startPoint.x () - m_currentPoint.x ());
int ydiff = kAbs (m_startPoint.y () - m_currentPoint.y ());
- rect = QRect (m_startPoint.x () - xdiff, m_startPoint.y () - ydiff,
+ rect = TQRect (m_startPoint.x () - xdiff, m_startPoint.y () - ydiff,
xdiff * 2 + 1, ydiff * 2 + 1);
}
@@ -419,13 +419,13 @@ void kpToolRectangle::applyModifiers ()
{
if (rect.width () < rect.height ())
{
- QPoint center = rect.center ();
+ TQPoint center = rect.center ();
rect.setHeight (rect.width ());
rect.moveCenter (center);
}
else
{
- QPoint center = rect.center ();
+ TQPoint center = rect.center ();
rect.setWidth (rect.height ());
rect.moveCenter (center);
}
@@ -449,7 +449,7 @@ void kpToolRectangle::updateShape ()
{
viewManager ()->setFastUpdates ();
- QPixmap newPixmap = pixmap (m_mode, document (), m_toolRectangleRect,
+ 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]);
@@ -462,7 +462,7 @@ void kpToolRectangle::updateShape ()
viewManager ()->restoreFastUpdates ();
}
-void kpToolRectangle::draw (const QPoint &, const QPoint &, const QRect &)
+void kpToolRectangle::draw (const TQPoint &, const TQPoint &, const TQRect &)
{
applyModifiers ();
@@ -508,7 +508,7 @@ void kpToolRectangle::draw (const QPoint &, const QPoint &, const QRect &)
void kpToolRectangle::cancelShape ()
{
#if 0
- endDraw (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ endDraw (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
mainWindow ()->commandHistory ()->undo ();
#else
viewManager ()->invalidateTempPixmap ();
@@ -522,7 +522,7 @@ void kpToolRectangle::releasedAllButtons ()
setUserMessage (haventBegunDrawUserMessage ());
}
-void kpToolRectangle::endDraw (const QPoint &, const QRect &)
+void kpToolRectangle::endDraw (const TQPoint &, const TQRect &)
{
applyModifiers ();
@@ -546,10 +546,10 @@ void kpToolRectangle::endDraw (const QPoint &, const QRect &)
*/
kpToolRectangleCommand::kpToolRectangleCommand (kpToolRectangle::Mode mode,
- const QPen &pen, const QPen &maskPen,
- const QBrush &brush, const QBrush &maskBrush,
- const QRect &rect,
- const QPoint &startPoint, const QPoint &endPoint,
+ const TQPen &pen, const TQPen &maskPen,
+ const TQBrush &brush, const TQBrush &maskBrush,
+ const TQRect &rect,
+ const TQPoint &startPoint, const TQPoint &endPoint,
kpMainWindow *mainWindow)
: kpCommand (mainWindow),
m_mode (mode),
@@ -569,7 +569,7 @@ kpToolRectangleCommand::~kpToolRectangleCommand ()
// public virtual [base kpCommand]
-QString kpToolRectangleCommand::name () const
+TQString kpToolRectangleCommand::name () const
{
switch (m_mode)
{
@@ -581,7 +581,7 @@ QString kpToolRectangleCommand::name () const
return i18n ("Ellipse");
default:
kdError () << "kpToolRectangleCommand::name() passed unknown mode: " << int (m_mode) << endl;
- return QString::null;
+ return TQString::null;
}
}
@@ -604,7 +604,7 @@ void kpToolRectangleCommand::execute ()
if (!m_oldPixmapPtr)
{
// OPT: I can do better with no brush
- m_oldPixmapPtr = new QPixmap ();
+ m_oldPixmapPtr = new TQPixmap ();
*m_oldPixmapPtr = doc->getPixmapAt (m_rect);
}
else
diff --git a/kolourpaint/tools/kptoolrectangle.h b/kolourpaint/tools/kptoolrectangle.h
index 0fcf5ff4..a412a475 100644
--- a/kolourpaint/tools/kptoolrectangle.h
+++ b/kolourpaint/tools/kptoolrectangle.h
@@ -29,17 +29,17 @@
#ifndef __kptoolrectangle_h__
#define __kptoolrectangle_h__
-#include <qbrush.h>
-#include <qpen.h>
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qrect.h>
+#include <tqbrush.h>
+#include <tqpen.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqrect.h>
#include <kpcommandhistory.h>
#include <kptool.h>
-class QString;
+class TQString;
class kpColor;
class kpMainWindow;
@@ -58,7 +58,7 @@ public:
enum Mode {Rectangle, RoundedRectangle, Ellipse};
kpToolRectangle (Mode mode,
- const QString &text, const QString &description,
+ const TQString &text, const TQString &description,
int key,
kpMainWindow *mainWindow,
const char *name);
@@ -70,7 +70,7 @@ public:
virtual bool careAboutModifierState () const { return true; }
private:
- QString haventBegunDrawUserMessage () const;
+ TQString haventBegunDrawUserMessage () const;
public:
virtual void begin ();
@@ -80,10 +80,10 @@ public:
private:
void updateShape ();
public:
- virtual void draw (const QPoint &, const QPoint &, const QRect &);
+ virtual void draw (const TQPoint &, const TQPoint &, const TQRect &);
virtual void cancelShape ();
virtual void releasedAllButtons ();
- virtual void endDraw (const QPoint &, const QRect &);
+ virtual void endDraw (const TQPoint &, const TQRect &);
private slots:
void updatePens ();
@@ -102,28 +102,28 @@ private:
kpToolWidgetFillStyle *m_toolWidgetFillStyle;
void updatePen (int mouseButton);
- QPen m_pen [2], m_maskPen [2];
+ TQPen m_pen [2], m_maskPen [2];
void updateBrush (int mouseButton);
- QBrush m_brush [2], m_maskBrush [2];
+ TQBrush m_brush [2], m_maskBrush [2];
void applyModifiers ();
- QPoint m_toolRectangleStartPoint, m_toolRectangleEndPoint;
- QRect m_toolRectangleRectWithoutLineWidth, m_toolRectangleRect;
+ TQPoint m_toolRectangleStartPoint, m_toolRectangleEndPoint;
+ TQRect m_toolRectangleRectWithoutLineWidth, m_toolRectangleRect;
};
class kpToolRectangleCommand : public kpCommand
{
public:
kpToolRectangleCommand (kpToolRectangle::Mode mode,
- const QPen &pen, const QPen &maskPen,
- const QBrush &brush, const QBrush &maskBrush,
- const QRect &rect,
- const QPoint &startPoint, const QPoint &endPoint,
+ const TQPen &pen, const TQPen &maskPen,
+ const TQBrush &brush, const TQBrush &maskBrush,
+ const TQRect &rect,
+ const TQPoint &startPoint, const TQPoint &endPoint,
kpMainWindow *mainWindow);
virtual ~kpToolRectangleCommand ();
- virtual QString name () const;
+ virtual TQString name () const;
virtual int size () const;
@@ -132,11 +132,11 @@ public:
private:
kpToolRectangle::Mode m_mode;
- QPen m_pen, m_maskPen;
- QBrush m_brush, m_maskBrush;
- QRect m_rect;
- QPoint m_startPoint, m_endPoint;
- QPixmap *m_oldPixmapPtr;
+ TQPen m_pen, m_maskPen;
+ TQBrush m_brush, m_maskBrush;
+ TQRect m_rect;
+ TQPoint m_startPoint, m_endPoint;
+ TQPixmap *m_oldPixmapPtr;
};
#endif // __kptoolrectangle_h__
diff --git a/kolourpaint/tools/kptoolresizescale.cpp b/kolourpaint/tools/kptoolresizescale.cpp
index ce9c9059..e7f14c5d 100644
--- a/kolourpaint/tools/kptoolresizescale.cpp
+++ b/kolourpaint/tools/kptoolresizescale.cpp
@@ -33,22 +33,22 @@
#include <math.h>
-#include <qaccel.h>
-#include <qapplication.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpoint.h>
-#include <qpointarray.h>
-#include <qpushbutton.h>
-#include <qrect.h>
-#include <qsize.h>
-#include <qtoolbutton.h>
-#include <qwhatsthis.h>
-#include <qwmatrix.h>
+#include <tqaccel.h>
+#include <tqapplication.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpoint.h>
+#include <tqpointarray.h>
+#include <tqpushbutton.h>
+#include <tqrect.h>
+#include <tqsize.h>
+#include <tqtoolbutton.h>
+#include <tqwhatsthis.h>
+#include <tqwmatrix.h>
#include <kapplication.h>
#include <kcombobox.h>
@@ -108,7 +108,7 @@ kpToolResizeScaleCommand::~kpToolResizeScaleCommand ()
// public virtual [base kpCommand]
-QString kpToolResizeScaleCommand::name () const
+TQString kpToolResizeScaleCommand::name () const
{
if (m_actOnSelection)
{
@@ -138,7 +138,7 @@ QString kpToolResizeScaleCommand::name () const
}
}
- return QString::null;
+ return TQString::null;
}
// public virtual [base kpCommand]
@@ -178,9 +178,9 @@ void kpToolResizeScaleCommand::setNewHeight (int height)
// public
-QSize kpToolResizeScaleCommand::newSize () const
+TQSize kpToolResizeScaleCommand::newSize () const
{
- return QSize (newWidth (), newHeight ());
+ return TQSize (newWidth (), newHeight ());
}
// public virtual
@@ -232,14 +232,14 @@ void kpToolResizeScaleCommand::scaleSelectionRegionWithDocument ()
const int newY = (int) (m_oldSelection->y () * vertScale);
- QPointArray currentPoints = m_oldSelection->points ();
+ TQPointArray currentPoints = m_oldSelection->points ();
currentPoints.detach ();
currentPoints.translate (-currentPoints.boundingRect ().x (),
-currentPoints.boundingRect ().y ());
// TODO: refactor into kpPixmapFX
- QWMatrix scaleMatrix;
+ TQWMatrix scaleMatrix;
scaleMatrix.scale (horizScale, vertScale);
currentPoints = scaleMatrix.map (currentPoints);
@@ -247,7 +247,7 @@ void kpToolResizeScaleCommand::scaleSelectionRegionWithDocument ()
-currentPoints.boundingRect ().x () + newX,
-currentPoints.boundingRect ().y () + newY);
- document ()->setSelection (kpSelection (currentPoints, QPixmap (),
+ document ()->setSelection (kpSelection (currentPoints, TQPixmap (),
m_oldSelection->transparency ()));
@@ -283,25 +283,25 @@ void kpToolResizeScaleCommand::execute ()
}
else
{
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
document ()->selection ()->textResize (m_newWidth, m_newHeight);
if (m_mainWindow->tool ())
m_mainWindow->tool ()->somethingBelowTheCursorChanged ();
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
}
else
{
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
if (m_newWidth < m_oldWidth)
{
m_oldRightPixmap = kpPixmapFX::getPixmapAt (
*document ()->pixmap (),
- QRect (m_newWidth, 0,
+ TQRect (m_newWidth, 0,
m_oldWidth - m_newWidth, m_oldHeight));
}
@@ -309,27 +309,27 @@ void kpToolResizeScaleCommand::execute ()
{
m_oldBottomPixmap = kpPixmapFX::getPixmapAt (
*document ()->pixmap (),
- QRect (0, m_newHeight,
+ TQRect (0, m_newHeight,
m_newWidth, m_oldHeight - m_newHeight));
}
document ()->resize (m_newWidth, m_newHeight, m_backgroundColor);
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
}
else
{
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
- QPixmap oldPixmap = *document ()->pixmap (m_actOnSelection);
+ TQPixmap oldPixmap = *document ()->pixmap (m_actOnSelection);
if (!m_isLosslessScale)
m_oldPixmap = oldPixmap;
- QPixmap newPixmap = kpPixmapFX::scale (oldPixmap, m_newWidth, m_newHeight,
+ TQPixmap newPixmap = kpPixmapFX::scale (oldPixmap, m_newWidth, m_newHeight,
m_type == SmoothScale);
@@ -337,12 +337,12 @@ void kpToolResizeScaleCommand::execute ()
{
// Save sel border
m_oldSelection = new kpSelection (*document ()->selection ());
- m_oldSelection->setPixmap (QPixmap ());
+ m_oldSelection->setPixmap (TQPixmap ());
}
if (m_actOnSelection)
{
- QRect newRect = QRect (m_oldSelection->x (), m_oldSelection->y (),
+ TQRect newRect = TQRect (m_oldSelection->x (), m_oldSelection->y (),
newPixmap.width (), newPixmap.height ());
// Not possible to retain non-rectangular selection borders on scale
@@ -365,7 +365,7 @@ void kpToolResizeScaleCommand::execute ()
}
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
}
@@ -395,51 +395,51 @@ void kpToolResizeScaleCommand::unexecute ()
}
else
{
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
document ()->selection ()->textResize (m_oldWidth, m_oldHeight);
if (m_mainWindow->tool ())
m_mainWindow->tool ()->somethingBelowTheCursorChanged ();
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
}
else
{
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
- QPixmap newPixmap (m_oldWidth, m_oldHeight);
+ TQPixmap newPixmap (m_oldWidth, m_oldHeight);
- kpPixmapFX::setPixmapAt (&newPixmap, QPoint (0, 0),
+ kpPixmapFX::setPixmapAt (&newPixmap, TQPoint (0, 0),
*doc->pixmap ());
if (m_newWidth < m_oldWidth)
{
kpPixmapFX::setPixmapAt (&newPixmap,
- QPoint (m_newWidth, 0),
+ TQPoint (m_newWidth, 0),
m_oldRightPixmap);
}
if (m_newHeight < m_oldHeight)
{
kpPixmapFX::setPixmapAt (&newPixmap,
- QPoint (0, m_newHeight),
+ TQPoint (0, m_newHeight),
m_oldBottomPixmap);
}
doc->setPixmap (newPixmap);
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
}
else
{
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
- QPixmap oldPixmap;
+ TQPixmap oldPixmap;
if (!m_isLosslessScale)
oldPixmap = m_oldPixmap;
@@ -471,7 +471,7 @@ void kpToolResizeScaleCommand::unexecute ()
}
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
}
@@ -505,7 +505,7 @@ double kpToolResizeScaleDialog::s_lastPercentWidth = 100,
kpToolResizeScaleDialog::kpToolResizeScaleDialog (kpMainWindow *mainWindow)
- : KDialogBase ((QWidget *) mainWindow,
+ : KDialogBase ((TQWidget *) mainWindow,
0/*name*/,
true/*modal*/,
i18n ("Resize / Scale")/*caption*/,
@@ -517,7 +517,7 @@ kpToolResizeScaleDialog::kpToolResizeScaleDialog (kpMainWindow *mainWindow)
s_lastPercentWidth = 100, s_lastPercentHeight = 100;
- QWidget *baseWidget = new QWidget (this);
+ TQWidget *baseWidget = new TQWidget (this);
setMainWidget (baseWidget);
@@ -526,7 +526,7 @@ kpToolResizeScaleDialog::kpToolResizeScaleDialog (kpMainWindow *mainWindow)
createDimensionsGroupBox (baseWidget);
- QVBoxLayout *baseLayout = new QVBoxLayout (baseWidget, 0/*margin*/, spacingHint ());
+ TQVBoxLayout *baseLayout = new TQVBoxLayout (baseWidget, 0/*margin*/, spacingHint ());
baseLayout->addWidget (m_actOnBox);
baseLayout->addWidget (m_operationGroupBox);
baseLayout->addWidget (m_dimensionsGroupBox);
@@ -558,13 +558,13 @@ kpSelection *kpToolResizeScaleDialog::selection () const
// private
-void kpToolResizeScaleDialog::createActOnBox (QWidget *baseWidget)
+void kpToolResizeScaleDialog::createActOnBox (TQWidget *baseWidget)
{
- m_actOnBox = new QHBox (baseWidget);
+ m_actOnBox = new TQHBox (baseWidget);
m_actOnBox->setSpacing (spacingHint () * 2);
- m_actOnLabel = new QLabel (i18n ("Ac&t on:"), m_actOnBox);
+ m_actOnLabel = new TQLabel (i18n ("Ac&t on:"), m_actOnBox);
m_actOnCombo = new KComboBox (m_actOnBox);
@@ -573,7 +573,7 @@ void kpToolResizeScaleDialog::createActOnBox (QWidget *baseWidget)
m_actOnCombo->insertItem (i18n ("Entire Image"), Image);
if (selection ())
{
- QString selName = i18n ("Selection");
+ TQString selName = i18n ("Selection");
if (selection ()->isText ())
selName = i18n ("Text Box");
@@ -591,29 +591,29 @@ void kpToolResizeScaleDialog::createActOnBox (QWidget *baseWidget)
m_actOnBox->setStretchFactor (m_actOnCombo, 1);
- connect (m_actOnCombo, SIGNAL (activated (int)),
- this, SLOT (slotActOnChanged ()));
+ connect (m_actOnCombo, TQT_SIGNAL (activated (int)),
+ this, TQT_SLOT (slotActOnChanged ()));
}
-static QIconSet toolButtonIconSet (const QString &iconName)
+static TQIconSet toolButtonIconSet (const TQString &iconName)
{
- QIconSet iconSet = UserIconSet (iconName);
+ TQIconSet iconSet = UserIconSet (iconName);
// No "disabled" pixmap is generated by UserIconSet() so generate it
// ourselves:
- QPixmap disabledIcon = KGlobal::iconLoader ()->iconEffect ()->apply (
+ TQPixmap disabledIcon = KGlobal::iconLoader ()->iconEffect ()->apply (
UserIcon (iconName),
KIcon::Toolbar, KIcon::DisabledState);
- const QPixmap iconSetNormalIcon = iconSet.pixmap (QIconSet::Small,
- QIconSet::Normal);
+ const TQPixmap iconSetNormalIcon = iconSet.pixmap (TQIconSet::Small,
+ TQIconSet::Normal);
// I bet past or future versions of KIconEffect::apply() resize the
// disabled icon if we claim it's in group KIcon::Toolbar. So resize
- // it to match the QIconSet::Normal icon, just in case.
+ // it to match the TQIconSet::Normal icon, just in case.
disabledIcon = kpPixmapFX::scale (disabledIcon,
iconSetNormalIcon.width (),
iconSetNormalIcon.height (),
@@ -621,29 +621,29 @@ static QIconSet toolButtonIconSet (const QString &iconName)
iconSet.setPixmap (disabledIcon,
- QIconSet::Small, QIconSet::Disabled);
+ TQIconSet::Small, TQIconSet::Disabled);
return iconSet;
}
-static void toolButtonSetLook (QToolButton *button,
- const QString &iconName,
- const QString &name)
+static void toolButtonSetLook (TQToolButton *button,
+ const TQString &iconName,
+ const TQString &name)
{
button->setIconSet (toolButtonIconSet (iconName));
button->setUsesTextLabel (true);
button->setTextLabel (name, false/*no tooltip*/);
- button->setAccel (QAccel::shortcutKey (name));
- button->setFocusPolicy (QWidget::StrongFocus);
+ button->setAccel (TQAccel::shortcutKey (name));
+ button->setFocusPolicy (TQWidget::StrongFocus);
button->setToggleButton (true);
}
// private
-void kpToolResizeScaleDialog::createOperationGroupBox (QWidget *baseWidget)
+void kpToolResizeScaleDialog::createOperationGroupBox (TQWidget *baseWidget)
{
- m_operationGroupBox = new QGroupBox (i18n ("Operation"), baseWidget);
- QWhatsThis::add (m_operationGroupBox,
+ m_operationGroupBox = new TQGroupBox (i18n ("Operation"), baseWidget);
+ TQWhatsThis::add (m_operationGroupBox,
i18n ("<qt>"
"<ul>"
"<li><b>Resize</b>: The size of the picture will be"
@@ -663,25 +663,25 @@ void kpToolResizeScaleDialog::createOperationGroupBox (QWidget *baseWidget)
"</qt>"));
// TODO: ALT+R doesn't select the button.
- m_resizeButton = new QToolButton (m_operationGroupBox);
+ m_resizeButton = new TQToolButton (m_operationGroupBox);
toolButtonSetLook (m_resizeButton,
- QString::fromLatin1 ("resize"),
+ TQString::fromLatin1 ("resize"),
i18n ("&Resize"));
- m_scaleButton = new QToolButton (m_operationGroupBox);
+ m_scaleButton = new TQToolButton (m_operationGroupBox);
toolButtonSetLook (m_scaleButton,
- QString::fromLatin1 ("scale"),
+ TQString::fromLatin1 ("scale"),
i18n ("&Scale"));
- m_smoothScaleButton = new QToolButton (m_operationGroupBox);
+ m_smoothScaleButton = new TQToolButton (m_operationGroupBox);
toolButtonSetLook (m_smoothScaleButton,
- QString::fromLatin1 ("smooth_scale"),
+ TQString::fromLatin1 ("smooth_scale"),
i18n ("S&mooth Scale"));
- //m_resizeLabel = new QLabel (i18n ("&Resize"), m_operationGroupBox);
- //m_scaleLabel = new QLabel (i18n ("&Scale"), m_operationGroupBox);
- //m_smoothScaleLabel = new QLabel (i18n ("S&mooth scale"), m_operationGroupBox);
+ //m_resizeLabel = new TQLabel (i18n ("&Resize"), m_operationGroupBox);
+ //m_scaleLabel = new TQLabel (i18n ("&Scale"), m_operationGroupBox);
+ //m_smoothScaleLabel = new TQLabel (i18n ("S&mooth scale"), m_operationGroupBox);
//m_resizeLabel->setAlignment (m_resizeLabel->alignment () | Qt::ShowPrefix);
@@ -689,7 +689,7 @@ void kpToolResizeScaleDialog::createOperationGroupBox (QWidget *baseWidget)
//m_smoothScaleLabel->setAlignment (m_smoothScaleLabel->alignment () | Qt::ShowPrefix);
- QButtonGroup *resizeScaleButtonGroup = new QButtonGroup (baseWidget);
+ TQButtonGroup *resizeScaleButtonGroup = new TQButtonGroup (baseWidget);
resizeScaleButtonGroup->setExclusive (true);
resizeScaleButtonGroup->hide ();
@@ -698,7 +698,7 @@ void kpToolResizeScaleDialog::createOperationGroupBox (QWidget *baseWidget)
resizeScaleButtonGroup->insert (m_smoothScaleButton);
- QGridLayout *operationLayout = new QGridLayout (m_operationGroupBox,
+ TQGridLayout *operationLayout = new TQGridLayout (m_operationGroupBox,
1, 2,
marginHint () * 2/*don't overlap groupbox title*/,
spacingHint ());
@@ -713,52 +713,52 @@ void kpToolResizeScaleDialog::createOperationGroupBox (QWidget *baseWidget)
//operationLayout->addWidget (m_smoothScaleLabel, 1, 2, Qt::AlignCenter);
- connect (m_resizeButton, SIGNAL (toggled (bool)),
- this, SLOT (slotTypeChanged ()));
- connect (m_scaleButton, SIGNAL (toggled (bool)),
- this, SLOT (slotTypeChanged ()));
- connect (m_smoothScaleButton, SIGNAL (toggled (bool)),
- this, SLOT (slotTypeChanged ()));
+ connect (m_resizeButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotTypeChanged ()));
+ connect (m_scaleButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotTypeChanged ()));
+ connect (m_smoothScaleButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotTypeChanged ()));
}
// private
-void kpToolResizeScaleDialog::createDimensionsGroupBox (QWidget *baseWidget)
+void kpToolResizeScaleDialog::createDimensionsGroupBox (TQWidget *baseWidget)
{
- m_dimensionsGroupBox = new QGroupBox (i18n ("Dimensions"), baseWidget);
+ m_dimensionsGroupBox = new TQGroupBox (i18n ("Dimensions"), baseWidget);
- QLabel *widthLabel = new QLabel (i18n ("Width:"), m_dimensionsGroupBox);
+ TQLabel *widthLabel = new TQLabel (i18n ("Width:"), m_dimensionsGroupBox);
widthLabel->setAlignment (widthLabel->alignment () | Qt::AlignHCenter);
- QLabel *heightLabel = new QLabel (i18n ("Height:"), m_dimensionsGroupBox);
+ TQLabel *heightLabel = new TQLabel (i18n ("Height:"), m_dimensionsGroupBox);
heightLabel->setAlignment (heightLabel->alignment () | Qt::AlignHCenter);
- QLabel *originalLabel = new QLabel (i18n ("Original:"), m_dimensionsGroupBox);
+ TQLabel *originalLabel = new TQLabel (i18n ("Original:"), m_dimensionsGroupBox);
m_originalWidthInput = new KIntNumInput (
document ()->width ((bool) selection ()),
m_dimensionsGroupBox);
- QLabel *xLabel0 = new QLabel (i18n ("x"), m_dimensionsGroupBox);
+ TQLabel *xLabel0 = new TQLabel (i18n ("x"), m_dimensionsGroupBox);
m_originalHeightInput = new KIntNumInput (
document ()->height ((bool) selection ()),
m_dimensionsGroupBox);
- QLabel *newLabel = new QLabel (i18n ("&New:"), m_dimensionsGroupBox);
+ TQLabel *newLabel = new TQLabel (i18n ("&New:"), m_dimensionsGroupBox);
m_newWidthInput = new KIntNumInput (m_dimensionsGroupBox);
- QLabel *xLabel1 = new QLabel (i18n ("x"), m_dimensionsGroupBox);
+ TQLabel *xLabel1 = new TQLabel (i18n ("x"), m_dimensionsGroupBox);
m_newHeightInput = new KIntNumInput (m_dimensionsGroupBox);
- QLabel *percentLabel = new QLabel (i18n ("&Percent:"), m_dimensionsGroupBox);
+ TQLabel *percentLabel = new TQLabel (i18n ("&Percent:"), m_dimensionsGroupBox);
m_percentWidthInput = new KDoubleNumInput (0.01/*lower*/, 1000000/*upper*/,
100/*value*/, 1/*step*/,
2/*precision*/,
m_dimensionsGroupBox);
m_percentWidthInput->setSuffix (i18n ("%"));
- QLabel *xLabel2 = new QLabel (i18n ("x"), m_dimensionsGroupBox);
+ TQLabel *xLabel2 = new TQLabel (i18n ("x"), m_dimensionsGroupBox);
m_percentHeightInput = new KDoubleNumInput (0.01/*lower*/, 1000000/*upper*/,
100/*value*/, 1/*step*/,
2/*precision*/,
m_dimensionsGroupBox);
m_percentHeightInput->setSuffix (i18n ("%"));
- m_keepAspectRatioCheckBox = new QCheckBox (i18n ("Keep &aspect ratio"),
+ m_keepAspectRatioCheckBox = new TQCheckBox (i18n ("Keep &aspect ratio"),
m_dimensionsGroupBox);
@@ -771,7 +771,7 @@ void kpToolResizeScaleDialog::createDimensionsGroupBox (QWidget *baseWidget)
percentLabel->setBuddy (m_percentWidthInput);
- QGridLayout *dimensionsLayout = new QGridLayout (m_dimensionsGroupBox,
+ TQGridLayout *dimensionsLayout = new TQGridLayout (m_dimensionsGroupBox,
5, 4, marginHint () * 2, spacingHint ());
dimensionsLayout->setColStretch (1/*column*/, 1);
dimensionsLayout->setColStretch (3/*column*/, 1);
@@ -800,18 +800,18 @@ void kpToolResizeScaleDialog::createDimensionsGroupBox (QWidget *baseWidget)
dimensionsLayout->setRowSpacing (4/*row*/, dimensionsLayout->rowSpacing (4) * 2);
- connect (m_newWidthInput, SIGNAL (valueChanged (int)),
- this, SLOT (slotWidthChanged (int)));
- connect (m_newHeightInput, SIGNAL (valueChanged (int)),
- this, SLOT (slotHeightChanged (int)));
+ connect (m_newWidthInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SLOT (slotWidthChanged (int)));
+ connect (m_newHeightInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SLOT (slotHeightChanged (int)));
- connect (m_percentWidthInput, SIGNAL (valueChanged (double)),
- this, SLOT (slotPercentWidthChanged (double)));
- connect (m_percentHeightInput, SIGNAL (valueChanged (double)),
- this, SLOT (slotPercentHeightChanged (double)));
+ connect (m_percentWidthInput, TQT_SIGNAL (valueChanged (double)),
+ this, TQT_SLOT (slotPercentWidthChanged (double)));
+ connect (m_percentHeightInput, TQT_SIGNAL (valueChanged (double)),
+ this, TQT_SLOT (slotPercentHeightChanged (double)));
- connect (m_keepAspectRatioCheckBox, SIGNAL (toggled (bool)),
- this, SLOT (setKeepAspectRatio (bool)));
+ connect (m_keepAspectRatioCheckBox, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (setKeepAspectRatio (bool)));
}
@@ -1100,7 +1100,7 @@ void kpToolResizeScaleDialog::slotOk ()
}
- QString message, caption, continueButtonText;
+ TQString message, caption, continueButtonText;
// Note: If eText, can't Scale nor SmoothScale.
// If eSelection, can't Resize.
diff --git a/kolourpaint/tools/kptoolresizescale.h b/kolourpaint/tools/kptoolresizescale.h
index e23b040e..1dd95aa0 100644
--- a/kolourpaint/tools/kptoolresizescale.h
+++ b/kolourpaint/tools/kptoolresizescale.h
@@ -29,7 +29,7 @@
#ifndef __kptoolresizescale_h__
#define __kptoolresizescale_h__
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kpcommandhistory.h>
#include <kdialogbase.h>
@@ -37,13 +37,13 @@
#include <kpcolor.h>
#include <kpselection.h>
-class QCheckBox;
-class QGroupBox;
-class QHBox;
-class QRadioButton;
-class QSize;
-class QString;
-class QToolButton;
+class TQCheckBox;
+class TQGroupBox;
+class TQHBox;
+class TQRadioButton;
+class TQSize;
+class TQString;
+class TQToolButton;
class KComboBox;
class KDoubleNumInput;
@@ -67,7 +67,7 @@ public:
kpMainWindow *mainWindow);
virtual ~kpToolResizeScaleCommand ();
- virtual QString name () const;
+ virtual TQString name () const;
virtual int size () const;
public:
@@ -77,7 +77,7 @@ public:
int newHeight () const;
void setNewHeight (int height);
- QSize newSize () const;
+ TQSize newSize () const;
virtual void resize (int width, int height);
public:
@@ -100,7 +100,7 @@ protected:
int m_oldWidth, m_oldHeight;
bool m_actOnTextSelection;
- QPixmap m_oldPixmap, m_oldRightPixmap, m_oldBottomPixmap;
+ TQPixmap m_oldPixmap, m_oldRightPixmap, m_oldBottomPixmap;
kpSelection *m_oldSelection;
};
@@ -125,9 +125,9 @@ private:
kpDocument *document () const;
kpSelection *selection () const;
- void createActOnBox (QWidget *baseWidget);
- void createOperationGroupBox (QWidget *baseWidget);
- void createDimensionsGroupBox (QWidget *baseWidget);
+ void createActOnBox (TQWidget *baseWidget);
+ void createOperationGroupBox (TQWidget *baseWidget);
+ void createDimensionsGroupBox (TQWidget *baseWidget);
void widthFitHeightToAspectRatio ();
void heightFitWidthToAspectRatio ();
@@ -172,23 +172,23 @@ private slots:
private:
kpMainWindow *m_mainWindow;
- QHBox *m_actOnBox;
- QLabel *m_actOnLabel;
+ TQHBox *m_actOnBox;
+ TQLabel *m_actOnLabel;
KComboBox *m_actOnCombo;
- QGroupBox *m_operationGroupBox;
- QToolButton *m_resizeButton,
+ TQGroupBox *m_operationGroupBox;
+ TQToolButton *m_resizeButton,
*m_scaleButton,
*m_smoothScaleButton;
- QLabel *m_resizeLabel,
+ TQLabel *m_resizeLabel,
*m_scaleLabel,
*m_smoothScaleLabel;
- QGroupBox *m_dimensionsGroupBox;
+ TQGroupBox *m_dimensionsGroupBox;
KIntNumInput *m_originalWidthInput, *m_originalHeightInput,
*m_newWidthInput, *m_newHeightInput;
KDoubleNumInput *m_percentWidthInput, *m_percentHeightInput;
- QCheckBox *m_keepAspectRatioCheckBox;
+ TQCheckBox *m_keepAspectRatioCheckBox;
int m_ignoreKeepAspectRatio;
};
diff --git a/kolourpaint/tools/kptoolrotate.cpp b/kolourpaint/tools/kptoolrotate.cpp
index 8a37b673..fe3a4cbe 100644
--- a/kolourpaint/tools/kptoolrotate.cpp
+++ b/kolourpaint/tools/kptoolrotate.cpp
@@ -30,14 +30,14 @@
#include <kptoolrotate.h>
-#include <qapplication.h>
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qwmatrix.h>
+#include <tqapplication.h>
+#include <tqbuttongroup.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqwmatrix.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -70,9 +70,9 @@ kpToolRotateCommand::~kpToolRotateCommand ()
// public virtual [base kpCommand]
-QString kpToolRotateCommand::name () const
+TQString kpToolRotateCommand::name () const
{
- QString opName = i18n ("Rotate");
+ TQString opName = i18n ("Rotate");
if (m_actOnSelection)
return i18n ("Selection: %1").arg (opName);
@@ -97,14 +97,14 @@ void kpToolRotateCommand::execute ()
return;
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
if (!m_losslessRotation)
m_oldPixmap = *doc->pixmap (m_actOnSelection);
- QPixmap newPixmap = kpPixmapFX::rotate (*doc->pixmap (m_actOnSelection),
+ TQPixmap newPixmap = kpPixmapFX::rotate (*doc->pixmap (m_actOnSelection),
m_angle,
m_backgroundColor);
@@ -115,23 +115,23 @@ void kpToolRotateCommand::execute ()
// Save old selection
m_oldSelection = *sel;
- m_oldSelection.setPixmap (QPixmap ());
+ m_oldSelection.setPixmap (TQPixmap ());
// Calculate new top left (so selection rotates about centre)
// (the Times2 trickery is used to reduce integer division error without
// resorting to the troublesome world of floating point)
- QPoint oldCenterTimes2 (sel->x () * 2 + sel->width (),
+ TQPoint oldCenterTimes2 (sel->x () * 2 + sel->width (),
sel->y () * 2 + sel->height ());
- QPoint newTopLeftTimes2 (oldCenterTimes2 - QPoint (newPixmap.width (), newPixmap.height ()));
- QPoint newTopLeft (newTopLeftTimes2.x () / 2, newTopLeftTimes2.y () / 2);
+ TQPoint newTopLeftTimes2 (oldCenterTimes2 - TQPoint (newPixmap.width (), newPixmap.height ()));
+ TQPoint newTopLeft (newTopLeftTimes2.x () / 2, newTopLeftTimes2.y () / 2);
// Calculate rotated points
- QPointArray currentPoints = sel->points ();
+ TQPointArray currentPoints = sel->points ();
currentPoints.translate (-currentPoints.boundingRect ().x (),
-currentPoints.boundingRect ().y ());
- QWMatrix rotateMatrix = kpPixmapFX::rotateMatrix (*doc->pixmap (m_actOnSelection), m_angle);
+ TQWMatrix rotateMatrix = kpPixmapFX::rotateMatrix (*doc->pixmap (m_actOnSelection), m_angle);
currentPoints = rotateMatrix.map (currentPoints);
currentPoints.translate (-currentPoints.boundingRect ().x () + newTopLeft.x (),
-currentPoints.boundingRect ().y () + newTopLeft.y ());
@@ -157,7 +157,7 @@ void kpToolRotateCommand::execute ()
<< endl;
#endif
doc->setSelection (kpSelection (kpSelection::Rectangle,
- QRect (newTopLeft.x (), newTopLeft.y (),
+ TQRect (newTopLeft.x (), newTopLeft.y (),
newPixmap.width (), newPixmap.height ()),
newPixmap,
m_oldSelection.transparency ()));
@@ -170,7 +170,7 @@ void kpToolRotateCommand::execute ()
doc->setPixmap (newPixmap);
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
// public virtual [base kpCommand]
@@ -181,10 +181,10 @@ void kpToolRotateCommand::unexecute ()
return;
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
- QPixmap oldPixmap;
+ TQPixmap oldPixmap;
if (!m_losslessRotation)
{
@@ -212,7 +212,7 @@ void kpToolRotateCommand::unexecute ()
}
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
@@ -266,33 +266,33 @@ kpToolRotateDialog::~kpToolRotateDialog ()
// private
void kpToolRotateDialog::createDirectionGroupBox ()
{
- QGroupBox *directionGroupBox = new QGroupBox (i18n ("Direction"), mainWidget ());
+ TQGroupBox *directionGroupBox = new TQGroupBox (i18n ("Direction"), mainWidget ());
addCustomWidget (directionGroupBox);
- QLabel *antiClockwisePixmapLabel = new QLabel (directionGroupBox);
+ TQLabel *antiClockwisePixmapLabel = new TQLabel (directionGroupBox);
antiClockwisePixmapLabel->setPixmap (UserIcon ("image_rotate_anticlockwise"));
- QLabel *clockwisePixmapLabel = new QLabel (directionGroupBox);
+ TQLabel *clockwisePixmapLabel = new TQLabel (directionGroupBox);
clockwisePixmapLabel->setPixmap (UserIcon ("image_rotate_clockwise"));
- m_antiClockwiseRadioButton = new QRadioButton (i18n ("Cou&nterclockwise"), directionGroupBox);
- m_clockwiseRadioButton = new QRadioButton (i18n ("C&lockwise"), directionGroupBox);
+ m_antiClockwiseRadioButton = new TQRadioButton (i18n ("Cou&nterclockwise"), directionGroupBox);
+ m_clockwiseRadioButton = new TQRadioButton (i18n ("C&lockwise"), directionGroupBox);
m_antiClockwiseRadioButton->setChecked (!s_lastIsClockwise);
m_clockwiseRadioButton->setChecked (s_lastIsClockwise);
- QButtonGroup *buttonGroup = new QButtonGroup (directionGroupBox);
+ TQButtonGroup *buttonGroup = new TQButtonGroup (directionGroupBox);
buttonGroup->hide ();
buttonGroup->insert (m_antiClockwiseRadioButton);
buttonGroup->insert (m_clockwiseRadioButton);
- QGridLayout *directionLayout = new QGridLayout (directionGroupBox,
+ TQGridLayout *directionLayout = new TQGridLayout (directionGroupBox,
2, 2, marginHint () * 2, spacingHint ());
directionLayout->addWidget (antiClockwisePixmapLabel, 0, 0, Qt::AlignCenter);
directionLayout->addWidget (clockwisePixmapLabel, 0, 1, Qt::AlignCenter);
@@ -300,31 +300,31 @@ void kpToolRotateDialog::createDirectionGroupBox ()
directionLayout->addWidget (m_clockwiseRadioButton, 1, 1, Qt::AlignCenter);
- connect (m_antiClockwiseRadioButton, SIGNAL (toggled (bool)),
- this, SLOT (slotUpdate ()));
- connect (m_clockwiseRadioButton, SIGNAL (toggled (bool)),
- this, SLOT (slotUpdate ()));
+ connect (m_antiClockwiseRadioButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotUpdate ()));
+ connect (m_clockwiseRadioButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotUpdate ()));
}
// private
void kpToolRotateDialog::createAngleGroupBox ()
{
- QGroupBox *angleGroupBox = new QGroupBox (i18n ("Angle"), mainWidget ());
+ TQGroupBox *angleGroupBox = new TQGroupBox (i18n ("Angle"), mainWidget ());
addCustomWidget (angleGroupBox);
- m_angle90RadioButton = new QRadioButton (i18n ("90 &degrees"), angleGroupBox);
- m_angle180RadioButton = new QRadioButton (i18n ("180 d&egrees"), angleGroupBox);
- m_angle270RadioButton = new QRadioButton (i18n ("270 de&grees"), angleGroupBox);
+ m_angle90RadioButton = new TQRadioButton (i18n ("90 &degrees"), angleGroupBox);
+ m_angle180RadioButton = new TQRadioButton (i18n ("180 d&egrees"), angleGroupBox);
+ m_angle270RadioButton = new TQRadioButton (i18n ("270 de&grees"), angleGroupBox);
- m_angleCustomRadioButton = new QRadioButton (i18n ("C&ustom:"), angleGroupBox);
+ m_angleCustomRadioButton = new TQRadioButton (i18n ("C&ustom:"), angleGroupBox);
m_angleCustomInput = new KIntNumInput (s_lastAngleCustom, angleGroupBox);
m_angleCustomInput->setMinValue (-359);
m_angleCustomInput->setMaxValue (+359);
- QLabel *degreesLabel = new QLabel (i18n ("degrees"), angleGroupBox);
+ TQLabel *degreesLabel = new TQLabel (i18n ("degrees"), angleGroupBox);
- m_angleButtonGroup = new QButtonGroup (angleGroupBox);
+ m_angleButtonGroup = new TQButtonGroup (angleGroupBox);
m_angleButtonGroup->hide ();
m_angleButtonGroup->insert (m_angle90RadioButton);
@@ -336,7 +336,7 @@ void kpToolRotateDialog::createAngleGroupBox ()
m_angleButtonGroup->setButton (s_lastAngleRadioButtonID);
- QGridLayout *angleLayout = new QGridLayout (angleGroupBox,
+ TQGridLayout *angleLayout = new TQGridLayout (angleGroupBox,
6, 3,
marginHint () * 2, spacingHint ());
@@ -351,20 +351,20 @@ void kpToolRotateDialog::createAngleGroupBox ()
angleLayout->setColStretch (1, 2); // Stretch Custom Angle Input
- connect (m_angle90RadioButton, SIGNAL (toggled (bool)),
- this, SLOT (slotUpdate ()));
- connect (m_angle180RadioButton, SIGNAL (toggled (bool)),
- this, SLOT (slotUpdate ()));
- connect (m_angle270RadioButton, SIGNAL (toggled (bool)),
- this, SLOT (slotUpdate ()));
+ connect (m_angle90RadioButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotUpdate ()));
+ connect (m_angle180RadioButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotUpdate ()));
+ connect (m_angle270RadioButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotUpdate ()));
- connect (m_angleCustomRadioButton, SIGNAL (toggled (bool)),
- this, SLOT (slotAngleCustomRadioButtonToggled (bool)));
- connect (m_angleCustomRadioButton, SIGNAL (toggled (bool)),
- this, SLOT (slotUpdate ()));
+ connect (m_angleCustomRadioButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotAngleCustomRadioButtonToggled (bool)));
+ connect (m_angleCustomRadioButton, TQT_SIGNAL (toggled (bool)),
+ this, TQT_SLOT (slotUpdate ()));
- connect (m_angleCustomInput, SIGNAL (valueChanged (int)),
- this, SLOT (slotUpdate ()));
+ connect (m_angleCustomInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SLOT (slotUpdate ()));
}
@@ -406,16 +406,16 @@ int kpToolRotateDialog::angle () const
// private virtual [base kpToolPreviewDialog]
-QSize kpToolRotateDialog::newDimensions () const
+TQSize kpToolRotateDialog::newDimensions () const
{
- QWMatrix matrix = kpPixmapFX::rotateMatrix (m_oldWidth, m_oldHeight, angle ());
- // TODO: Should we be using QWMatrix::Areas?
- QRect rect = matrix.map (QRect (0, 0, m_oldWidth, m_oldHeight));
+ TQWMatrix matrix = kpPixmapFX::rotateMatrix (m_oldWidth, m_oldHeight, angle ());
+ // TODO: Should we be using TQWMatrix::Areas?
+ TQRect rect = matrix.map (TQRect (0, 0, m_oldWidth, m_oldHeight));
return rect.size ();
}
// private virtual [base kpToolPreviewDialog]
-QPixmap kpToolRotateDialog::transformPixmap (const QPixmap &pixmap,
+TQPixmap kpToolRotateDialog::transformPixmap (const TQPixmap &pixmap,
int targetWidth, int targetHeight) const
{
return kpPixmapFX::rotate (pixmap, angle (),
@@ -447,7 +447,7 @@ void kpToolRotateDialog::slotUpdate ()
// private slot virtual [base KDialogBase]
void kpToolRotateDialog::slotOk ()
{
- QString message, caption, continueButtonText;
+ TQString message, caption, continueButtonText;
if (document ()->selection ())
{
diff --git a/kolourpaint/tools/kptoolrotate.h b/kolourpaint/tools/kptoolrotate.h
index 887473dc..1cff0884 100644
--- a/kolourpaint/tools/kptoolrotate.h
+++ b/kolourpaint/tools/kptoolrotate.h
@@ -29,8 +29,8 @@
#ifndef __kptoolrotate_h__
#define __kptoolrotate_h__
-#include <qpixmap.h>
-#include <qpoint.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
#include <kdialogbase.h>
@@ -40,9 +40,9 @@
#include <kptoolpreviewdialog.h>
-class QButtonGroup;
-class QRadioButton;
-class QString;
+class TQButtonGroup;
+class TQRadioButton;
+class TQString;
class KIntNumInput;
@@ -59,7 +59,7 @@ public:
kpMainWindow *mainWindow);
virtual ~kpToolRotateCommand ();
- virtual QString name () const;
+ virtual TQString name () const;
virtual int size () const;
@@ -73,7 +73,7 @@ private:
kpColor m_backgroundColor;
bool m_losslessRotation;
- QPixmap m_oldPixmap;
+ TQPixmap m_oldPixmap;
kpSelection m_oldSelection;
};
@@ -102,8 +102,8 @@ public:
int angle () const; // 0 <= angle < 360 (clockwise);
private:
- virtual QSize newDimensions () const;
- virtual QPixmap transformPixmap (const QPixmap &pixmap,
+ virtual TQSize newDimensions () const;
+ virtual TQPixmap transformPixmap (const TQPixmap &pixmap,
int targetWidth, int targetHeight) const;
private slots:
@@ -114,11 +114,11 @@ private slots:
virtual void slotOk ();
private:
- QRadioButton *m_antiClockwiseRadioButton,
+ TQRadioButton *m_antiClockwiseRadioButton,
*m_clockwiseRadioButton;
- QButtonGroup *m_angleButtonGroup;
- QRadioButton *m_angle90RadioButton,
+ TQButtonGroup *m_angleButtonGroup;
+ TQRadioButton *m_angle90RadioButton,
*m_angle180RadioButton,
*m_angle270RadioButton,
*m_angleCustomRadioButton;
diff --git a/kolourpaint/tools/kptoolselection.cpp b/kolourpaint/tools/kptoolselection.cpp
index f664f01b..7812c4f9 100644
--- a/kolourpaint/tools/kptoolselection.cpp
+++ b/kolourpaint/tools/kptoolselection.cpp
@@ -31,12 +31,12 @@
#include <kptoolselection.h>
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qpopupmenu.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <klocale.h>
@@ -53,8 +53,8 @@
kpToolSelection::kpToolSelection (Mode mode,
- const QString &text,
- const QString &description,
+ const TQString &text,
+ const TQString &description,
int key,
kpMainWindow *mainWindow,
const char *name)
@@ -65,13 +65,13 @@ kpToolSelection::kpToolSelection (Mode mode,
m_currentResizeScaleCommand (0),
m_toolWidgetOpaqueOrTransparent (0),
m_currentCreateTextCommand (0),
- m_createNOPTimer (new QTimer (this)),
- m_RMBMoveUpdateGUITimer (new QTimer (this))
+ m_createNOPTimer (new TQTimer (this)),
+ m_RMBMoveUpdateGUITimer (new TQTimer (this))
{
- connect (m_createNOPTimer, SIGNAL (timeout ()),
- this, SLOT (delayedDraw ()));
- connect (m_RMBMoveUpdateGUITimer, SIGNAL (timeout ()),
- this, SLOT (slotRMBMoveUpdateGUI ()));
+ connect (m_createNOPTimer, TQT_SIGNAL (timeout ()),
+ this, TQT_SLOT (delayedDraw ()));
+ connect (m_RMBMoveUpdateGUITimer, TQT_SIGNAL (timeout ()),
+ this, TQT_SLOT (slotRMBMoveUpdateGUI ()));
}
kpToolSelection::~kpToolSelection ()
@@ -121,7 +121,7 @@ bool kpToolSelection::onSelectionToSelectText () const
// public
-QString kpToolSelection::haventBegunDrawUserMessage () const
+TQString kpToolSelection::haventBegunDrawUserMessage () const
{
#if DEBUG_KP_TOOL_SELECTION && 0
kdDebug () << "kpToolSelection::haventBegunDrawUserMessage()"
@@ -180,8 +180,8 @@ void kpToolSelection::begin ()
if (m_toolWidgetOpaqueOrTransparent)
{
- connect (m_toolWidgetOpaqueOrTransparent, SIGNAL (isOpaqueChanged (bool)),
- this, SLOT (slotIsOpaqueChanged ()));
+ connect (m_toolWidgetOpaqueOrTransparent, TQT_SIGNAL (isOpaqueChanged (bool)),
+ this, TQT_SLOT (slotIsOpaqueChanged ()));
m_toolWidgetOpaqueOrTransparent->show ();
}
}
@@ -197,7 +197,7 @@ void kpToolSelection::begin ()
}
viewManager ()->restoreQueueUpdates ();
- m_startDragFromSelectionTopLeft = QPoint ();
+ m_startDragFromSelectionTopLeft = TQPoint ();
m_dragType = Unknown;
m_dragHasBegun = false;
m_hadSelectionBeforeDrag = false; // arbitrary
@@ -225,8 +225,8 @@ void kpToolSelection::end ()
if (m_toolWidgetOpaqueOrTransparent)
{
- disconnect (m_toolWidgetOpaqueOrTransparent, SIGNAL (isOpaqueChanged (bool)),
- this, SLOT (slotIsOpaqueChanged ()));
+ disconnect (m_toolWidgetOpaqueOrTransparent, TQT_SIGNAL (isOpaqueChanged (bool)),
+ this, TQT_SLOT (slotIsOpaqueChanged ()));
m_toolWidgetOpaqueOrTransparent = 0;
}
@@ -251,8 +251,8 @@ void kpToolSelection::beginDraw ()
#if DEBUG_KP_TOOL_SELECTION
kdDebug () << "kpToolSelection::beginDraw() m_startPoint="
<< m_startPoint
- << " QCursor::pos() view startPoint="
- << m_viewUnderStartPoint->mapFromGlobal (QCursor::pos ())
+ << " TQCursor::pos() view startPoint="
+ << m_viewUnderStartPoint->mapFromGlobal (TQCursor::pos ())
<< endl;
#endif
@@ -267,7 +267,7 @@ void kpToolSelection::beginDraw ()
// Currently used only to end the current text
if (hasBegunShape ())
- endShape (m_currentPoint, QRect (m_startPoint/* TODO: wrong */, m_currentPoint).normalize ());
+ endShape (m_currentPoint, TQRect (m_startPoint/* TODO: wrong */, m_currentPoint).normalize ());
m_dragType = Create;
m_dragHasBegun = false;
@@ -280,7 +280,7 @@ void kpToolSelection::beginDraw ()
#if DEBUG_KP_TOOL_SELECTION
kdDebug () << "\thas sel region rect=" << sel->boundingRect () << endl;
#endif
- QRect selectionRect = sel->boundingRect ();
+ TQRect selectionRect = sel->boundingRect ();
if (onSelectionResizeHandle () && !controlOrShiftPressed ())
{
@@ -366,14 +366,14 @@ void kpToolSelection::beginDraw ()
// protected
-const QCursor &kpToolSelection::cursor () const
+const TQCursor &kpToolSelection::cursor () const
{
#if DEBUG_KP_TOOL_SELECTION && 1
kdDebug () << "kpToolSelection::cursor()"
<< " m_currentPoint=" << m_currentPoint
- << " QCursor::pos() view under cursor="
+ << " TQCursor::pos() view under cursor="
<< (viewUnderCursor () ?
- viewUnderCursor ()->mapFromGlobal (QCursor::pos ()) :
+ viewUnderCursor ()->mapFromGlobal (TQCursor::pos ()) :
KP_INVALID_POINT)
<< " controlOrShiftPressed=" << controlOrShiftPressed ()
<< endl;
@@ -430,7 +430,7 @@ const QCursor &kpToolSelection::cursor () const
}
// virtual
-void kpToolSelection::hover (const QPoint &point)
+void kpToolSelection::hover (const TQPoint &point)
{
#if DEBUG_KP_TOOL_SELECTION && 1
kdDebug () << "kpToolSelection::hover" << point << endl;
@@ -449,7 +449,7 @@ void kpToolSelection::hover (const QPoint &point)
setUserShapeSize (KP_INVALID_SIZE);
}
- QString mess = haventBegunDrawUserMessage ();
+ TQString mess = haventBegunDrawUserMessage ();
if (mess != userMessage ())
setUserMessage (mess);
}
@@ -457,12 +457,12 @@ void kpToolSelection::hover (const QPoint &point)
// protected
void kpToolSelection::popupRMBMenu ()
{
- QPopupMenu *pop = mainWindow () ? mainWindow ()->selectionToolRMBMenu () : 0;
+ TQPopupMenu *pop = mainWindow () ? mainWindow ()->selectionToolRMBMenu () : 0;
if (!pop)
return;
// WARNING: enters event loop - may re-enter view/tool event handlers
- pop->exec (QCursor::pos ());
+ pop->exec (TQCursor::pos ());
// Cursor may have moved while menu up, triggering mouseMoveEvents
// for the menu - not the view. Update cursor position now.
@@ -513,16 +513,16 @@ void kpToolSelection::delayedDraw ()
if (hasBegunDraw ())
{
draw (m_currentPoint, m_lastPoint,
- QRect (m_startPoint, m_currentPoint).normalize ());
+ TQRect (m_startPoint, m_currentPoint).normalize ());
}
}
// virtual
-void kpToolSelection::draw (const QPoint &inThisPoint, const QPoint & /*lastPoint*/,
- const QRect &inNormalizedRect)
+void kpToolSelection::draw (const TQPoint &inThisPoint, const TQPoint & /*lastPoint*/,
+ const TQRect &inNormalizedRect)
{
- QPoint thisPoint = inThisPoint;
- QRect normalizedRect = inNormalizedRect;
+ TQPoint thisPoint = inThisPoint;
+ TQRect normalizedRect = inNormalizedRect;
#if DEBUG_KP_TOOL_SELECTION && 1
kdDebug () << "kpToolSelection::draw" << thisPoint
@@ -612,12 +612,12 @@ void kpToolSelection::draw (const QPoint &inThisPoint, const QPoint & /*lastPoin
{
case kpToolSelection::Rectangle:
{
- const QRect usefulRect = normalizedRect.intersect (document ()->rect ());
+ const TQRect usefulRect = normalizedRect.intersect (document ()->rect ());
document ()->setSelection (kpSelection (kpSelection::Rectangle, usefulRect,
mainWindow ()->selectionTransparency ()));
setUserShapePoints (m_startPoint,
- QPoint (QMAX (0, QMIN (m_currentPoint.x (), document ()->width () - 1)),
+ TQPoint (QMAX (0, QMIN (m_currentPoint.x (), document ()->width () - 1)),
QMAX (0, QMIN (m_currentPoint.y (), document ()->height () - 1))));
break;
}
@@ -705,11 +705,11 @@ void kpToolSelection::draw (const QPoint &inThisPoint, const QPoint & /*lastPoin
#if DEBUG_KP_TOOL_SELECTION && 1
kdDebug () << "\t\tnormalizedRect=" << normalizedRect
<< " kpSelection::preferredMinimumSize="
- << QSize (minimumWidth, minimumHeight)
+ << TQSize (minimumWidth, minimumHeight)
<< endl;
#endif
- QValueVector <QString> textLines (1, QString ());
+ TQValueVector <TQString> textLines (1, TQString ());
kpSelection sel (normalizedRect, textLines, textStyle);
if (!m_currentCreateTextCommand)
@@ -725,7 +725,7 @@ void kpToolSelection::draw (const QPoint &inThisPoint, const QPoint & /*lastPoin
viewManager ()->setTextCursorPosition (0, 0);
document ()->setSelection (sel);
- QPoint actualEndPoint = KP_INVALID_POINT;
+ TQPoint actualEndPoint = KP_INVALID_POINT;
if (m_startPoint == normalizedRect.topLeft ())
actualEndPoint = normalizedRect.bottomRight ();
else if (m_startPoint == normalizedRect.bottomRight ())
@@ -744,7 +744,7 @@ void kpToolSelection::draw (const QPoint &inThisPoint, const QPoint & /*lastPoin
setUserShapePoints (m_startPoint, m_currentPoint);
break;
case kpToolSelection::FreeForm:
- QPointArray points;
+ TQPointArray points;
if (document ()->selection ())
points = document ()->selection ()->points ();
@@ -785,7 +785,7 @@ void kpToolSelection::draw (const QPoint &inThisPoint, const QPoint & /*lastPoin
kpSelection *sel = document ()->selection ();
- QRect targetSelRect = QRect (thisPoint.x () - m_startDragFromSelectionTopLeft.x (),
+ TQRect targetSelRect = TQRect (thisPoint.x () - m_startDragFromSelectionTopLeft.x (),
thisPoint.y () - m_startDragFromSelectionTopLeft.y (),
sel->width (),
sel->height ());
@@ -845,7 +845,7 @@ void kpToolSelection::draw (const QPoint &inThisPoint, const QPoint & /*lastPoin
if (!sel->pixmap () && !m_currentPullFromDocumentCommand)
{
m_currentPullFromDocumentCommand = new kpToolSelectionPullFromDocumentCommand (
- QString::null/*uninteresting child of macro cmd*/,
+ TQString::null/*uninteresting child of macro cmd*/,
mainWindow ());
m_currentPullFromDocumentCommand->execute ();
}
@@ -853,7 +853,7 @@ void kpToolSelection::draw (const QPoint &inThisPoint, const QPoint & /*lastPoin
if (!m_currentMoveCommand)
{
m_currentMoveCommand = new kpToolSelectionMoveCommand (
- QString::null/*uninteresting child of macro cmd*/,
+ TQString::null/*uninteresting child of macro cmd*/,
mainWindow ());
m_currentMoveCommandIsSmear = false;
}
@@ -876,8 +876,8 @@ void kpToolSelection::draw (const QPoint &inThisPoint, const QPoint & /*lastPoin
//viewManager ()->restoreFastUpdates ();
//viewManager ()->restoreQueueUpdates ();
- QPoint start = m_currentMoveCommand->originalSelection ().topLeft ();
- QPoint end = targetSelRect.topLeft ();
+ TQPoint start = m_currentMoveCommand->originalSelection ().topLeft ();
+ TQPoint end = targetSelRect.topLeft ();
setUserShapePoints (start, end, false/*don't set size*/);
setUserShapeSize (end.x () - start.x (), end.y () - start.y ());
}
@@ -895,7 +895,7 @@ void kpToolSelection::draw (const QPoint &inThisPoint, const QPoint & /*lastPoin
kdDebug () << "\t\tnop" << endl;
#endif
- setUserShapePoints (QPoint (sel->width (), sel->height ()));
+ setUserShapePoints (TQPoint (sel->width (), sel->height ()));
return;
}
@@ -903,7 +903,7 @@ void kpToolSelection::draw (const QPoint &inThisPoint, const QPoint & /*lastPoin
if (!sel->pixmap () && !m_currentPullFromDocumentCommand)
{
m_currentPullFromDocumentCommand = new kpToolSelectionPullFromDocumentCommand (
- QString::null/*uninteresting child of macro cmd*/,
+ TQString::null/*uninteresting child of macro cmd*/,
mainWindow ());
m_currentPullFromDocumentCommand->execute ();
}
@@ -993,13 +993,13 @@ void kpToolSelection::draw (const QPoint &inThisPoint, const QPoint & /*lastPoin
viewManager ()->setFastUpdates ();
m_currentResizeScaleCommand->resizeAndMoveTo (newWidth, newHeight,
- QPoint (newX, newY),
+ TQPoint (newX, newY),
true/*smooth scale delayed*/);
viewManager ()->restoreFastUpdates ();
- setUserShapePoints (QPoint (originalSelection.width (),
+ setUserShapePoints (TQPoint (originalSelection.width (),
originalSelection.height ()),
- QPoint (newWidth,
+ TQPoint (newWidth,
newHeight),
false/*don't set size*/);
setUserShapeSize (newWidth - originalSelection.width (),
@@ -1111,7 +1111,7 @@ void kpToolSelection::releasedAllButtons ()
}
// virtual
-void kpToolSelection::endDraw (const QPoint & /*thisPoint*/, const QRect & /*normalizedRect*/)
+void kpToolSelection::endDraw (const TQPoint & /*thisPoint*/, const TQRect & /*normalizedRect*/)
{
m_createNOPTimer->stop ();
m_RMBMoveUpdateGUITimer->stop ();
@@ -1172,7 +1172,7 @@ void kpToolSelection::endDraw (const QPoint & /*thisPoint*/, const QRect & /*nor
selection = m_currentResizeScaleCommand->originalSelection ();
// just the border
- selection.setPixmap (QPixmap ());
+ selection.setPixmap (TQPixmap ());
kpCommand *createCommand = new kpToolSelectionCreateCommand (
i18n ("Selection: Create"),
@@ -1231,7 +1231,7 @@ void kpToolSelection::endDraw (const QPoint & /*thisPoint*/, const QRect & /*nor
// protected virtual [base kpTool]
-void kpToolSelection::keyPressEvent (QKeyEvent *e)
+void kpToolSelection::keyPressEvent (TQKeyEvent *e)
{
#if DEBUG_KP_TOOL_SELECTION && 0
kdDebug () << "kpToolSelection::keyPressEvent(e->text='" << e->text () << "')" << endl;
@@ -1270,7 +1270,7 @@ void kpToolSelection::keyPressEvent (QKeyEvent *e)
// private slot
-void kpToolSelection::selectionTransparencyChanged (const QString & /*name*/)
+void kpToolSelection::selectionTransparencyChanged (const TQString & /*name*/)
{
#if 0
#if DEBUG_KP_TOOL_SELECTION
@@ -1356,7 +1356,7 @@ void kpToolSelection::slotIsOpaqueChanged ()
kdDebug () << "\thave sel - set transparency" << endl;
#endif
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
if (hasBegunShape ())
endShapeInternal ();
@@ -1374,7 +1374,7 @@ void kpToolSelection::slotIsOpaqueChanged ()
mainWindow ()),
false/* no exec*/);
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
}
@@ -1400,7 +1400,7 @@ void kpToolSelection::slotBackgroundColorChanged (const kpColor &)
kdDebug () << "\thave sel - set transparency" << endl;
#endif
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
kpSelectionTransparency st = mainWindow ()->selectionTransparency ();
kpSelectionTransparency oldST = st;
@@ -1413,7 +1413,7 @@ void kpToolSelection::slotBackgroundColorChanged (const kpColor &)
mainWindow ()),
false/* no exec*/);
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
}
@@ -1439,7 +1439,7 @@ void kpToolSelection::slotColorSimilarityChanged (double, int)
kdDebug () << "\thave sel - set transparency" << endl;
#endif
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
kpSelectionTransparency st = mainWindow ()->selectionTransparency ();
kpSelectionTransparency oldST = st;
@@ -1452,7 +1452,7 @@ void kpToolSelection::slotColorSimilarityChanged (double, int)
mainWindow ()),
false/* no exec*/);
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
}
@@ -1461,7 +1461,7 @@ void kpToolSelection::slotColorSimilarityChanged (double, int)
* kpToolSelectionCreateCommand
*/
-kpToolSelectionCreateCommand::kpToolSelectionCreateCommand (const QString &name,
+kpToolSelectionCreateCommand::kpToolSelectionCreateCommand (const TQString &name,
const kpSelection &fromSelection,
kpMainWindow *mainWindow)
: kpNamedCommand (name, mainWindow),
@@ -1595,7 +1595,7 @@ void kpToolSelectionCreateCommand::unexecute ()
* kpToolSelectionPullFromDocumentCommand
*/
-kpToolSelectionPullFromDocumentCommand::kpToolSelectionPullFromDocumentCommand (const QString &name,
+kpToolSelectionPullFromDocumentCommand::kpToolSelectionPullFromDocumentCommand (const TQString &name,
kpMainWindow *mainWindow)
: kpNamedCommand (name, mainWindow),
m_backgroundColor (mainWindow ? mainWindow->backgroundColor () : kpColor::invalid),
@@ -1704,7 +1704,7 @@ void kpToolSelectionPullFromDocumentCommand::unexecute ()
// simply selecting another region as to do that, a destroy command
// must have been used.
doc->selectionCopyOntoDocument (false/*use opaque pixmap*/);
- doc->selection ()->setPixmap (QPixmap ());
+ doc->selection ()->setPixmap (TQPixmap ());
delete m_originalSelectionRegion;
m_originalSelectionRegion = new kpSelection (*doc->selection ());
@@ -1715,7 +1715,7 @@ void kpToolSelectionPullFromDocumentCommand::unexecute ()
* kpToolSelectionTransparencyCommand
*/
-kpToolSelectionTransparencyCommand::kpToolSelectionTransparencyCommand (const QString &name,
+kpToolSelectionTransparencyCommand::kpToolSelectionTransparencyCommand (const TQString &name,
const kpSelectionTransparency &st,
const kpSelectionTransparency &oldST,
kpMainWindow *mainWindow)
@@ -1747,14 +1747,14 @@ void kpToolSelectionTransparencyCommand::execute ()
if (!doc)
return;
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
m_mainWindow->setSelectionTransparency (m_st, true/*force colour change*/);
if (doc->selection ())
doc->selection ()->setTransparency (m_st);
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
// public virtual [base kpCommand]
@@ -1768,14 +1768,14 @@ void kpToolSelectionTransparencyCommand::unexecute ()
if (!doc)
return;
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
m_mainWindow->setSelectionTransparency (m_oldST, true/*force colour change*/);
if (doc->selection ())
doc->selection ()->setTransparency (m_oldST);
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
@@ -1783,7 +1783,7 @@ void kpToolSelectionTransparencyCommand::unexecute ()
* kpToolSelectionMoveCommand
*/
-kpToolSelectionMoveCommand::kpToolSelectionMoveCommand (const QString &name,
+kpToolSelectionMoveCommand::kpToolSelectionMoveCommand (const TQString &name,
kpMainWindow *mainWindow)
: kpNamedCommand (name, mainWindow)
{
@@ -1810,7 +1810,7 @@ kpSelection kpToolSelectionMoveCommand::originalSelection () const
<< " sel="
<< (doc ? doc->selection () : 0)
<< endl;
- return kpSelection (kpSelection::Rectangle, QRect ());
+ return kpSelection (kpSelection::Rectangle, TQRect ());
}
kpSelection selection = *doc->selection();
@@ -1858,8 +1858,8 @@ void kpToolSelectionMoveCommand::execute ()
if (vm)
vm->setQueueUpdates ();
- QPointArray::ConstIterator copyOntoDocumentPointsEnd = m_copyOntoDocumentPoints.end ();
- for (QPointArray::ConstIterator it = m_copyOntoDocumentPoints.begin ();
+ TQPointArray::ConstIterator copyOntoDocumentPointsEnd = m_copyOntoDocumentPoints.end ();
+ for (TQPointArray::ConstIterator it = m_copyOntoDocumentPoints.begin ();
it != copyOntoDocumentPointsEnd;
it++)
{
@@ -1921,7 +1921,7 @@ void kpToolSelectionMoveCommand::unexecute ()
}
// public
-void kpToolSelectionMoveCommand::moveTo (const QPoint &point, bool moveLater)
+void kpToolSelectionMoveCommand::moveTo (const TQPoint &point, bool moveLater)
{
#if DEBUG_KP_TOOL_SELECTION && 0
kdDebug () << "kpToolSelectionMoveCommand::moveTo" << point
@@ -1965,7 +1965,7 @@ void kpToolSelectionMoveCommand::moveTo (const QPoint &point, bool moveLater)
// public
void kpToolSelectionMoveCommand::moveTo (int x, int y, bool moveLater)
{
- moveTo (QPoint (x, y), moveLater);
+ moveTo (TQPoint (x, y), moveLater);
}
// public
@@ -1997,7 +1997,7 @@ void kpToolSelectionMoveCommand::copyOntoDocument ()
if (m_oldDocumentPixmap.isNull ())
m_oldDocumentPixmap = *doc->pixmap ();
- QRect selBoundingRect = sel->boundingRect ();
+ TQRect selBoundingRect = sel->boundingRect ();
m_documentBoundingRect.unite (selBoundingRect);
doc->selectionCopyOntoDocument ();
@@ -2029,7 +2029,7 @@ kpToolSelectionResizeScaleCommand::kpToolSelectionResizeScaleCommand (
i18n ("Text: Resize Box") :
i18n ("Selection: Smooth Scale"),
mainWindow),
- m_smoothScaleTimer (new QTimer (this))
+ m_smoothScaleTimer (new TQTimer (this))
{
m_originalSelection = *selection ();
@@ -2037,8 +2037,8 @@ kpToolSelectionResizeScaleCommand::kpToolSelectionResizeScaleCommand (
m_newWidth = selection ()->width ();
m_newHeight = selection ()->height ();
- connect (m_smoothScaleTimer, SIGNAL (timeout ()),
- this, SLOT (resizeScaleAndMove ()));
+ connect (m_smoothScaleTimer, TQT_SIGNAL (timeout ()),
+ this, TQT_SLOT (resizeScaleAndMove ()));
}
kpToolSelectionResizeScaleCommand::~kpToolSelectionResizeScaleCommand ()
@@ -2061,13 +2061,13 @@ kpSelection kpToolSelectionResizeScaleCommand::originalSelection () const
// public
-QPoint kpToolSelectionResizeScaleCommand::topLeft () const
+TQPoint kpToolSelectionResizeScaleCommand::topLeft () const
{
return m_newTopLeft;
}
// public
-void kpToolSelectionResizeScaleCommand::moveTo (const QPoint &point)
+void kpToolSelectionResizeScaleCommand::moveTo (const TQPoint &point)
{
if (point == m_newTopLeft)
return;
@@ -2105,7 +2105,7 @@ void kpToolSelectionResizeScaleCommand::resize (int width, int height,
// public
void kpToolSelectionResizeScaleCommand::resizeAndMoveTo (int width, int height,
- const QPoint &point,
+ const TQPoint &point,
bool delayed)
{
if (width == m_newWidth && height == m_newHeight &&
@@ -2149,7 +2149,7 @@ void kpToolSelectionResizeScaleCommand::resizeScaleAndMove (bool delayed)
else
{
newSel = kpSelection (kpSelection::Rectangle,
- QRect (m_originalSelection.x (),
+ TQRect (m_originalSelection.x (),
m_originalSelection.y (),
m_newWidth,
m_newHeight),
@@ -2203,7 +2203,7 @@ void kpToolSelectionResizeScaleCommand::finalize ()
// public virtual [base kpToolResizeScaleCommand]
void kpToolSelectionResizeScaleCommand::execute ()
{
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
killSmoothScaleTimer ();
@@ -2212,13 +2212,13 @@ void kpToolSelectionResizeScaleCommand::execute ()
if (m_mainWindow->tool ())
m_mainWindow->tool ()->somethingBelowTheCursorChanged ();
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
// public virtual [base kpToolResizeScaleCommand]
void kpToolSelectionResizeScaleCommand::unexecute ()
{
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
killSmoothScaleTimer ();
@@ -2227,7 +2227,7 @@ void kpToolSelectionResizeScaleCommand::unexecute ()
if (m_mainWindow->tool ())
m_mainWindow->tool ()->somethingBelowTheCursorChanged ();
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
@@ -2235,7 +2235,7 @@ void kpToolSelectionResizeScaleCommand::unexecute ()
* kpToolSelectionDestroyCommand
*/
-kpToolSelectionDestroyCommand::kpToolSelectionDestroyCommand (const QString &name,
+kpToolSelectionDestroyCommand::kpToolSelectionDestroyCommand (const TQString &name,
bool pushOntoDocument,
kpMainWindow *mainWindow)
: kpNamedCommand (name, mainWindow),
diff --git a/kolourpaint/tools/kptoolselection.h b/kolourpaint/tools/kptoolselection.h
index ee978a15..1f209d86 100644
--- a/kolourpaint/tools/kptoolselection.h
+++ b/kolourpaint/tools/kptoolselection.h
@@ -30,10 +30,10 @@
#define __kp_tool_selection_h__
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qpointarray.h>
-#include <qrect.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqpointarray.h>
+#include <tqrect.h>
#include <kpcolor.h>
#include <kpcommandhistory.h>
@@ -42,9 +42,9 @@
#include <kptool.h>
-class QPoint;
-class QRect;
-class QTimer;
+class TQPoint;
+class TQRect;
+class TQTimer;
class kpMainWindow;
class kpSelection;
@@ -64,7 +64,7 @@ public:
enum Mode {Rectangle, Ellipse, FreeForm, Text};
kpToolSelection (Mode mode,
- const QString &text, const QString &description,
+ const TQString &text, const TQString &description,
int key,
kpMainWindow *mainWindow, const char *name);
virtual ~kpToolSelection ();
@@ -80,7 +80,7 @@ protected:
bool onSelectionToSelectText () const;
public:
- QString haventBegunDrawUserMessage () const;
+ TQString haventBegunDrawUserMessage () const;
virtual void begin ();
virtual void end ();
@@ -91,9 +91,9 @@ public:
virtual void beginDraw ();
protected:
- const QCursor &cursor () const;
+ const TQCursor &cursor () const;
public:
- virtual void hover (const QPoint &point);
+ virtual void hover (const TQPoint &point);
protected:
void popupRMBMenu ();
void setSelectionBorderForMove ();
@@ -101,17 +101,17 @@ protected slots:
void slotRMBMoveUpdateGUI ();
void delayedDraw ();
public:
- virtual void draw (const QPoint &thisPoint, const QPoint &lastPoint,
- const QRect &normalizedRect);
+ virtual void draw (const TQPoint &thisPoint, const TQPoint &lastPoint,
+ const TQRect &normalizedRect);
virtual void cancelShape ();
virtual void releasedAllButtons ();
- virtual void endDraw (const QPoint &thisPoint, const QRect &normalizedRect);
+ virtual void endDraw (const TQPoint &thisPoint, const TQRect &normalizedRect);
protected:
- virtual void keyPressEvent (QKeyEvent *e);
+ virtual void keyPressEvent (TQKeyEvent *e);
protected:
- void selectionTransparencyChanged (const QString &name);
+ void selectionTransparencyChanged (const TQString &name);
protected slots:
virtual void slotIsOpaqueChanged ();
@@ -121,7 +121,7 @@ protected slots:
protected:
Mode m_mode;
- QPoint m_startDragFromSelectionTopLeft;
+ TQPoint m_startDragFromSelectionTopLeft;
enum DragType
{
Unknown, Create, Move, SelectText, ResizeScale
@@ -140,14 +140,14 @@ protected:
kpToolSelectionCreateCommand *m_currentCreateTextCommand;
bool m_cancelledShapeButStillHoldingButtons;
- QTimer *m_createNOPTimer, *m_RMBMoveUpdateGUITimer;
+ TQTimer *m_createNOPTimer, *m_RMBMoveUpdateGUITimer;
};
class kpToolSelectionCreateCommand : public kpNamedCommand
{
public:
// (if fromSelection doesn't have a pixmap, it will only recreate the region)
- kpToolSelectionCreateCommand (const QString &name, const kpSelection &fromSelection,
+ kpToolSelectionCreateCommand (const TQString &name, const kpSelection &fromSelection,
kpMainWindow *mainWindow);
virtual ~kpToolSelectionCreateCommand ();
@@ -170,7 +170,7 @@ private:
class kpToolSelectionPullFromDocumentCommand : public kpNamedCommand
{
public:
- kpToolSelectionPullFromDocumentCommand (const QString &name, kpMainWindow *mainWindow);
+ kpToolSelectionPullFromDocumentCommand (const TQString &name, kpMainWindow *mainWindow);
virtual ~kpToolSelectionPullFromDocumentCommand ();
virtual int size () const;
@@ -186,7 +186,7 @@ private:
class kpToolSelectionTransparencyCommand : public kpNamedCommand
{
public:
- kpToolSelectionTransparencyCommand (const QString &name,
+ kpToolSelectionTransparencyCommand (const TQString &name,
const kpSelectionTransparency &st,
const kpSelectionTransparency &oldST,
kpMainWindow *mainWindow);
@@ -204,7 +204,7 @@ private:
class kpToolSelectionMoveCommand : public kpNamedCommand
{
public:
- kpToolSelectionMoveCommand (const QString &name, kpMainWindow *mainWindow);
+ kpToolSelectionMoveCommand (const TQString &name, kpMainWindow *mainWindow);
virtual ~kpToolSelectionMoveCommand ();
kpSelection originalSelection () const;
@@ -214,20 +214,20 @@ public:
virtual void execute ();
virtual void unexecute ();
- void moveTo (const QPoint &point, bool moveLater = false);
+ void moveTo (const TQPoint &point, bool moveLater = false);
void moveTo (int x, int y, bool moveLater = false);
void copyOntoDocument ();
void finalize ();
private:
- QPoint m_startPoint, m_endPoint;
+ TQPoint m_startPoint, m_endPoint;
- QPixmap m_oldDocumentPixmap;
+ TQPixmap m_oldDocumentPixmap;
// area of document affected (not the bounding rect of the sel)
- QRect m_documentBoundingRect;
+ TQRect m_documentBoundingRect;
- QPointArray m_copyOntoDocumentPoints;
+ TQPointArray m_copyOntoDocumentPoints;
};
// You could subclass kpToolResizeScaleCommand and/or
@@ -238,7 +238,7 @@ private:
// 2. This is designed for the size and position to change several times
// before execute().
//
-class kpToolSelectionResizeScaleCommand : public QObject,
+class kpToolSelectionResizeScaleCommand : public TQObject,
public kpNamedCommand
{
Q_OBJECT
@@ -252,15 +252,15 @@ public:
public:
kpSelection originalSelection () const;
- QPoint topLeft () const;
- void moveTo (const QPoint &point);
+ TQPoint topLeft () const;
+ void moveTo (const TQPoint &point);
int width () const;
int height () const;
void resize (int width, int height, bool delayed = false);
// (equivalent to resize() followed by moveTo() but faster)
- void resizeAndMoveTo (int width, int height, const QPoint &point,
+ void resizeAndMoveTo (int width, int height, const TQPoint &point,
bool delayed = false);
protected:
@@ -284,16 +284,16 @@ public:
protected:
kpSelection m_originalSelection;
- QPoint m_newTopLeft;
+ TQPoint m_newTopLeft;
int m_newWidth, m_newHeight;
- QTimer *m_smoothScaleTimer;
+ TQTimer *m_smoothScaleTimer;
};
class kpToolSelectionDestroyCommand : public kpNamedCommand
{
public:
- kpToolSelectionDestroyCommand (const QString &name, bool pushOntoDocument,
+ kpToolSelectionDestroyCommand (const TQString &name, bool pushOntoDocument,
kpMainWindow *mainWindow);
virtual ~kpToolSelectionDestroyCommand ();
@@ -304,7 +304,7 @@ public:
private:
bool m_pushOntoDocument;
- QPixmap m_oldDocPixmap;
+ TQPixmap m_oldDocPixmap;
kpSelection *m_oldSelection;
int m_textRow, m_textCol;
diff --git a/kolourpaint/tools/kptoolskew.cpp b/kolourpaint/tools/kptoolskew.cpp
index f1e446be..dff1d19b 100644
--- a/kolourpaint/tools/kptoolskew.cpp
+++ b/kolourpaint/tools/kptoolskew.cpp
@@ -31,12 +31,12 @@
#include <kptoolskew.h>
-#include <qapplication.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qwmatrix.h>
+#include <tqapplication.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqwmatrix.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -73,9 +73,9 @@ kpToolSkewCommand::~kpToolSkewCommand ()
// public virtual [base kpCommand]
-QString kpToolSkewCommand::name () const
+TQString kpToolSkewCommand::name () const
{
- QString opName = i18n ("Skew");
+ TQString opName = i18n ("Skew");
if (m_actOnSelection)
return i18n ("Selection: %1").arg (opName);
@@ -100,14 +100,14 @@ void kpToolSkewCommand::execute ()
return;
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
- m_oldPixmapPtr = new QPixmap ();
+ m_oldPixmapPtr = new TQPixmap ();
*m_oldPixmapPtr = *doc->pixmap (m_actOnSelection);
- QPixmap newPixmap = kpPixmapFX::skew (*doc->pixmap (m_actOnSelection),
+ TQPixmap newPixmap = kpPixmapFX::skew (*doc->pixmap (m_actOnSelection),
kpToolSkewDialog::horizontalAngleForPixmapFX (m_hangle),
kpToolSkewDialog::verticalAngleForPixmapFX (m_vangle),
m_backgroundColor);
@@ -121,10 +121,10 @@ void kpToolSkewCommand::execute ()
// Calculate skewed points
- QPointArray currentPoints = sel->points ();
+ TQPointArray currentPoints = sel->points ();
currentPoints.translate (-currentPoints.boundingRect ().x (),
-currentPoints.boundingRect ().y ());
- QWMatrix skewMatrix = kpPixmapFX::skewMatrix (
+ TQWMatrix skewMatrix = kpPixmapFX::skewMatrix (
*doc->pixmap (m_actOnSelection),
kpToolSkewDialog::horizontalAngleForPixmapFX (m_hangle),
kpToolSkewDialog::verticalAngleForPixmapFX (m_vangle));
@@ -153,7 +153,7 @@ void kpToolSkewCommand::execute ()
<< endl;
#endif
doc->setSelection (kpSelection (kpSelection::Rectangle,
- QRect (currentPoints.boundingRect ().x (),
+ TQRect (currentPoints.boundingRect ().x (),
currentPoints.boundingRect ().y (),
newPixmap.width (),
newPixmap.height ()),
@@ -170,7 +170,7 @@ void kpToolSkewCommand::execute ()
}
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
// public virtual [base kpCommand]
@@ -181,10 +181,10 @@ void kpToolSkewCommand::unexecute ()
return;
- QApplication::setOverrideCursor (Qt::waitCursor);
+ TQApplication::setOverrideCursor (Qt::waitCursor);
- QPixmap oldPixmap = *m_oldPixmapPtr;
+ TQPixmap oldPixmap = *m_oldPixmapPtr;
delete m_oldPixmapPtr; m_oldPixmapPtr = 0;
@@ -200,7 +200,7 @@ void kpToolSkewCommand::unexecute ()
}
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
@@ -252,37 +252,37 @@ kpToolSkewDialog::~kpToolSkewDialog ()
// private
void kpToolSkewDialog::createAngleGroupBox ()
{
- QGroupBox *angleGroupBox = new QGroupBox (i18n ("Angle"), mainWidget ());
+ TQGroupBox *angleGroupBox = new TQGroupBox (i18n ("Angle"), mainWidget ());
addCustomWidget (angleGroupBox);
- QLabel *horizontalSkewPixmapLabel = new QLabel (angleGroupBox);
+ TQLabel *horizontalSkewPixmapLabel = new TQLabel (angleGroupBox);
horizontalSkewPixmapLabel->setPixmap (UserIcon ("image_skew_horizontal"));
- QLabel *horizontalSkewLabel = new QLabel (i18n ("&Horizontal:"), angleGroupBox);
+ TQLabel *horizontalSkewLabel = new TQLabel (i18n ("&Horizontal:"), angleGroupBox);
m_horizontalSkewInput = new KIntNumInput (s_lastHorizontalAngle, angleGroupBox);
m_horizontalSkewInput->setMinValue (-89);
m_horizontalSkewInput->setMaxValue (+89);
- QLabel *horizontalSkewDegreesLabel = new QLabel (i18n ("degrees"), angleGroupBox);
+ TQLabel *horizontalSkewDegreesLabel = new TQLabel (i18n ("degrees"), angleGroupBox);
- QLabel *verticalSkewPixmapLabel = new QLabel (angleGroupBox);
+ TQLabel *verticalSkewPixmapLabel = new TQLabel (angleGroupBox);
verticalSkewPixmapLabel->setPixmap (UserIcon ("image_skew_vertical"));
- QLabel *verticalSkewLabel = new QLabel (i18n ("&Vertical:"), angleGroupBox);
+ TQLabel *verticalSkewLabel = new TQLabel (i18n ("&Vertical:"), angleGroupBox);
m_verticalSkewInput = new KIntNumInput (s_lastVerticalAngle, angleGroupBox);
m_verticalSkewInput->setMinValue (-89);
m_verticalSkewInput->setMaxValue (+89);
- QLabel *verticalSkewDegreesLabel = new QLabel (i18n ("degrees"), angleGroupBox);
+ TQLabel *verticalSkewDegreesLabel = new TQLabel (i18n ("degrees"), angleGroupBox);
horizontalSkewLabel->setBuddy (m_horizontalSkewInput);
verticalSkewLabel->setBuddy (m_verticalSkewInput);
- QGridLayout *angleLayout = new QGridLayout (angleGroupBox, 4, 4,
+ TQGridLayout *angleLayout = new TQGridLayout (angleGroupBox, 4, 4,
marginHint () * 2, spacingHint ());
angleLayout->addWidget (horizontalSkewPixmapLabel, 0, 0);
@@ -296,31 +296,31 @@ void kpToolSkewDialog::createAngleGroupBox ()
angleLayout->addWidget (verticalSkewDegreesLabel, 1, 3);
- connect (m_horizontalSkewInput, SIGNAL (valueChanged (int)),
- this, SLOT (slotUpdate ()));
- connect (m_verticalSkewInput, SIGNAL (valueChanged (int)),
- this, SLOT (slotUpdate ()));
+ connect (m_horizontalSkewInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SLOT (slotUpdate ()));
+ connect (m_verticalSkewInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SLOT (slotUpdate ()));
}
// private virtual [base kpToolPreviewDialog]
-QSize kpToolSkewDialog::newDimensions () const
+TQSize kpToolSkewDialog::newDimensions () const
{
kpDocument *doc = document ();
if (!doc)
- return QSize ();
+ return TQSize ();
- QWMatrix skewMatrix = kpPixmapFX::skewMatrix (*doc->pixmap (),
+ TQWMatrix skewMatrix = kpPixmapFX::skewMatrix (*doc->pixmap (),
horizontalAngleForPixmapFX (),
verticalAngleForPixmapFX ());
- // TODO: Should we be using QWMatrix::Areas?
- QRect skewRect = skewMatrix.mapRect (doc->rect (m_actOnSelection));
+ // TODO: Should we be using TQWMatrix::Areas?
+ TQRect skewRect = skewMatrix.mapRect (doc->rect (m_actOnSelection));
- return QSize (skewRect.width (), skewRect.height ());
+ return TQSize (skewRect.width (), skewRect.height ());
}
// private virtual [base kpToolPreviewDialog]
-QPixmap kpToolSkewDialog::transformPixmap (const QPixmap &pixmap,
+TQPixmap kpToolSkewDialog::transformPixmap (const TQPixmap &pixmap,
int targetWidth, int targetHeight) const
{
return kpPixmapFX::skew (pixmap,
@@ -396,7 +396,7 @@ bool kpToolSkewDialog::isNoOp () const
// private slot virtual [base KDialogBase]
void kpToolSkewDialog::slotOk ()
{
- QString message, caption, continueButtonText;
+ TQString message, caption, continueButtonText;
if (document ()->selection ())
{
diff --git a/kolourpaint/tools/kptoolskew.h b/kolourpaint/tools/kptoolskew.h
index 570909c2..ae368020 100644
--- a/kolourpaint/tools/kptoolskew.h
+++ b/kolourpaint/tools/kptoolskew.h
@@ -29,7 +29,7 @@
#ifndef __kptool_skew_h__
#define __kptool_skew_h__
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kpcommandhistory.h>
#include <kdialogbase.h>
@@ -38,9 +38,9 @@
#include <kpselection.h>
#include <kptoolpreviewdialog.h>
-class QGroupBox;
-class QLabel;
-class QPixmap;
+class TQGroupBox;
+class TQLabel;
+class TQPixmap;
class KIntNumInput;
@@ -56,7 +56,7 @@ public:
kpMainWindow *mainWindow);
virtual ~kpToolSkewCommand ();
- virtual QString name () const;
+ virtual TQString name () const;
virtual int size () const;
@@ -68,7 +68,7 @@ private:
int m_hangle, m_vangle;
kpColor m_backgroundColor;
- QPixmap *m_oldPixmapPtr;
+ TQPixmap *m_oldPixmapPtr;
kpSelection m_oldSelection;
};
@@ -88,8 +88,8 @@ private:
void createAngleGroupBox ();
- virtual QSize newDimensions () const;
- virtual QPixmap transformPixmap (const QPixmap &pixmap,
+ virtual TQSize newDimensions () const;
+ virtual TQPixmap transformPixmap (const TQPixmap &pixmap,
int targetWidth, int targetHeight) const;
void updateLastAngles ();
diff --git a/kolourpaint/tools/kptooltext.cpp b/kolourpaint/tools/kptooltext.cpp
index 73a60e66..e2261278 100644
--- a/kolourpaint/tools/kptooltext.cpp
+++ b/kolourpaint/tools/kptooltext.cpp
@@ -30,7 +30,7 @@
#include <kptooltext.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#include <kdebug.h>
#include <klocale.h>
@@ -131,7 +131,7 @@ void kpToolText::cancelShape ()
}
// public virtual [base kpTool]
-void kpToolText::endShape (const QPoint &thisPoint, const QRect &normalizedRect)
+void kpToolText::endShape (const TQPoint &thisPoint, const TQRect &normalizedRect)
{
#if DEBUG_KP_TOOL_TEXT
kdDebug () << "kpToolText::endShape()" << endl;
@@ -152,7 +152,7 @@ void kpToolText::endShape (const QPoint &thisPoint, const QRect &normalizedRect)
// protected virtual [base kpTool]
-void kpToolText::keyPressEvent (QKeyEvent *e)
+void kpToolText::keyPressEvent (TQKeyEvent *e)
{
#if DEBUG_KP_TOOL_TEXT
kdDebug () << "kpToolText::keyPressEvent(e->text='" << e->text () << "')" << endl;
@@ -180,14 +180,14 @@ void kpToolText::keyPressEvent (QKeyEvent *e)
kdDebug () << "\tno text sel - passing on event to kpTool" << endl;
#endif
//if (hasBegunShape ())
- // endShape (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ // endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
kpToolSelection::keyPressEvent (e);
return;
}
- const QValueVector <QString> textLines = sel->textLines ();
+ const TQValueVector <TQString> textLines = sel->textLines ();
int cursorRow = viewManager ()->textCursorRow ();
int cursorCol = viewManager ()->textCursorCol ();
@@ -202,7 +202,7 @@ void kpToolText::keyPressEvent (QKeyEvent *e)
{
// TODO: why not endShapeInternal(); ditto for everywhere else in this file?
if (hasBegunShape ())
- endShape (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
m_enterCommand = new kpToolTextEnterCommand (i18n ("Text: New Line"),
viewManager ()->textCursorRow (), viewManager ()->textCursorCol (),
@@ -223,7 +223,7 @@ void kpToolText::keyPressEvent (QKeyEvent *e)
if (!m_backspaceCommand)
{
if (hasBegunShape ())
- endShape (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
m_backspaceCommand = new kpToolTextBackspaceCommand (i18n ("Text: Backspace"),
viewManager ()->textCursorRow (), viewManager ()->textCursorCol (),
@@ -244,7 +244,7 @@ void kpToolText::keyPressEvent (QKeyEvent *e)
if (!m_deleteCommand)
{
if (hasBegunShape ())
- endShape (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
m_deleteCommand = new kpToolTextDeleteCommand (i18n ("Text: Delete"),
viewManager ()->textCursorRow (), viewManager ()->textCursorCol (),
@@ -263,7 +263,7 @@ void kpToolText::keyPressEvent (QKeyEvent *e)
#endif
if (hasBegunShape ())
- endShape (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
if (cursorRow > 0)
{
@@ -281,7 +281,7 @@ void kpToolText::keyPressEvent (QKeyEvent *e)
#endif
if (hasBegunShape ())
- endShape (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
if (cursorRow < (int) textLines.size () - 1)
{
@@ -316,7 +316,7 @@ void kpToolText::keyPressEvent (QKeyEvent *e)
}
if (hasBegunShape ())
- endShape (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
if ((e->state () & Qt::ControlButton) == 0)
{
@@ -391,7 +391,7 @@ void kpToolText::keyPressEvent (QKeyEvent *e)
}
if (hasBegunShape ())
- endShape (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
if ((e->state () & Qt::ControlButton) == 0)
{
@@ -445,7 +445,7 @@ void kpToolText::keyPressEvent (QKeyEvent *e)
#endif
if (hasBegunShape ())
- endShape (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
if (e->state () & Qt::ControlButton)
cursorRow = 0;
@@ -463,7 +463,7 @@ void kpToolText::keyPressEvent (QKeyEvent *e)
#endif
if (hasBegunShape ())
- endShape (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
if (e->state () & Qt::ControlButton)
cursorRow = textLines.size () - 1;
@@ -479,7 +479,7 @@ void kpToolText::keyPressEvent (QKeyEvent *e)
#if DEBUG_KP_TOOL_TEXT
kdDebug () << "\ttext='" << e->text () << "'" << endl;
#endif
- QString usableText;
+ TQString usableText;
for (int i = 0; i < (int) e->text ().length (); i++)
{
if (e->text ().at (i).isPrint ())
@@ -494,7 +494,7 @@ void kpToolText::keyPressEvent (QKeyEvent *e)
if (!m_insertCommand)
{
if (hasBegunShape ())
- endShape (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
m_insertCommand = new kpToolTextInsertCommand (i18n ("Text: Write"),
viewManager ()->textCursorRow (), viewManager ()->textCursorCol (),
@@ -520,14 +520,14 @@ void kpToolText::keyPressEvent (QKeyEvent *e)
<< endl;
#endif
//if (hasBegunShape ())
- // endShape (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ // endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
kpToolSelection::keyPressEvent (e);
return;
}
}
-void kpToolText::imStartEvent (QIMEvent *e)
+void kpToolText::imStartEvent (TQIMEvent *e)
{
#if DEBUG_KP_TOOL_TEXT && 1
kdDebug () << "kpToolText::imStartEvent() text='" << e->text ()
@@ -545,10 +545,10 @@ void kpToolText::imStartEvent (QIMEvent *e)
m_IMStartCursorRow = viewManager ()->textCursorRow ();
m_IMStartCursorCol = viewManager ()->textCursorCol ();
- m_IMPreeditStr = QString::null;
+ m_IMPreeditStr = TQString::null;
}
-void kpToolText::imComposeEvent (QIMEvent *e)
+void kpToolText::imComposeEvent (TQIMEvent *e)
{
#if DEBUG_KP_TOOL_TEXT && 1
kdDebug () << "kpToolText::imComposeEvent() text='" << e->text ()
@@ -574,7 +574,7 @@ void kpToolText::imComposeEvent (QIMEvent *e)
if (!m_deleteCommand)
{
if (hasBegunShape ())
- endShape (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
m_deleteCommand = new kpToolTextDeleteCommand (i18n ("Text: Delete"),
viewManager ()->textCursorRow (), viewManager ()->textCursorCol (),
@@ -593,7 +593,7 @@ void kpToolText::imComposeEvent (QIMEvent *e)
if (!m_insertCommand)
{
if (hasBegunShape ())
- endShape (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
m_insertCommand = new kpToolTextInsertCommand (i18n ("Text: Write"),
viewManager ()->textCursorRow (), viewManager ()->textCursorCol (),
@@ -614,7 +614,7 @@ void kpToolText::imComposeEvent (QIMEvent *e)
}
}
-void kpToolText::imEndEvent (QIMEvent *e)
+void kpToolText::imEndEvent (TQIMEvent *e)
{
#if DEBUG_KP_TOOL_TEXT && 1
kdDebug () << "kpToolText::imEndEvent() text='" << e->text ()
@@ -640,7 +640,7 @@ void kpToolText::imEndEvent (QIMEvent *e)
if (!m_deleteCommand)
{
if (hasBegunShape ())
- endShape (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
m_deleteCommand = new kpToolTextDeleteCommand (i18n ("Text: Delete"),
viewManager ()->textCursorRow (), viewManager ()->textCursorCol (),
@@ -651,16 +651,16 @@ void kpToolText::imEndEvent (QIMEvent *e)
m_deleteCommand->addDelete ();
}
}
- m_IMPreeditStr = QString::null;
+ m_IMPreeditStr = TQString::null;
// commit string
- QString inputStr = e->text();
+ TQString inputStr = e->text();
if (inputStr.length() > 0)
{
if (!m_insertCommand)
{
if (hasBegunShape ())
- endShape (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
m_insertCommand = new kpToolTextInsertCommand (i18n ("Text: Write"),
viewManager ()->textCursorRow (), viewManager ()->textCursorCol (),
@@ -700,7 +700,7 @@ bool kpToolText::shouldChangeTextStyle () const
}
// protected
-void kpToolText::changeTextStyle (const QString &name,
+void kpToolText::changeTextStyle (const TQString &name,
const kpTextStyle &newTextStyle,
const kpTextStyle &oldTextStyle)
{
@@ -709,7 +709,7 @@ void kpToolText::changeTextStyle (const QString &name,
#endif
if (hasBegunShape ())
- endShape (m_currentPoint, QRect (m_startPoint, m_currentPoint).normalize ());
+ endShape (m_currentPoint, TQRect (m_startPoint, m_currentPoint).normalize ());
commandHistory ()->addCommand (
new kpToolTextChangeStyleCommand (
@@ -809,8 +809,8 @@ void kpToolText::slotColorSimilarityChanged (double, int)
// public slot
-void kpToolText::slotFontFamilyChanged (const QString &fontFamily,
- const QString &oldFontFamily)
+void kpToolText::slotFontFamilyChanged (const TQString &fontFamily,
+ const TQString &oldFontFamily)
{
#if DEBUG_KP_TOOL_TEXT
kdDebug () << "kpToolText::slotFontFamilyChanged() new="
@@ -941,7 +941,7 @@ void kpToolText::slotStrikeThruChanged (bool isStrikeThru)
* kpToolTextChangeStyleCommand
*/
-kpToolTextChangeStyleCommand::kpToolTextChangeStyleCommand (const QString &name,
+kpToolTextChangeStyleCommand::kpToolTextChangeStyleCommand (const TQString &name,
const kpTextStyle &newTextStyle, const kpTextStyle &oldTextStyle,
kpMainWindow *mainWindow)
: kpNamedCommand (name, mainWindow),
@@ -1009,8 +1009,8 @@ void kpToolTextChangeStyleCommand::unexecute ()
* kpToolTextInsertCommand
*/
-kpToolTextInsertCommand::kpToolTextInsertCommand (const QString &name,
- int row, int col, QString newText,
+kpToolTextInsertCommand::kpToolTextInsertCommand (const TQString &name,
+ int row, int col, TQString newText,
kpMainWindow *mainWindow)
: kpNamedCommand (name, mainWindow),
m_row (row), m_col (col)
@@ -1025,14 +1025,14 @@ kpToolTextInsertCommand::~kpToolTextInsertCommand ()
// public
-void kpToolTextInsertCommand::addText (const QString &moreText)
+void kpToolTextInsertCommand::addText (const TQString &moreText)
{
if (moreText.isEmpty ())
return;
- QValueVector <QString> textLines = selection ()->textLines ();
- const QString leftHalf = textLines [m_row].left (m_col);
- const QString rightHalf = textLines [m_row].mid (m_col);
+ TQValueVector <TQString> textLines = selection ()->textLines ();
+ const TQString leftHalf = textLines [m_row].left (m_col);
+ const TQString rightHalf = textLines [m_row].mid (m_col);
textLines [m_row] = leftHalf + moreText + rightHalf;
selection ()->setTextLines (textLines);
@@ -1046,7 +1046,7 @@ void kpToolTextInsertCommand::addText (const QString &moreText)
// public virtual [base kpCommand]
int kpToolTextInsertCommand::size () const
{
- return m_newText.length () * sizeof (QChar);
+ return m_newText.length () * sizeof (TQChar);
}
@@ -1055,8 +1055,8 @@ void kpToolTextInsertCommand::execute ()
{
viewManager ()->setTextCursorPosition (m_row, m_col);
- QString text = m_newText;
- m_newText = QString::null;
+ TQString text = m_newText;
+ m_newText = TQString::null;
addText (text);
}
@@ -1065,9 +1065,9 @@ void kpToolTextInsertCommand::unexecute ()
{
viewManager ()->setTextCursorPosition (m_row, m_col);
- QValueVector <QString> textLines = selection ()->textLines ();
- const QString leftHalf = textLines [m_row].left (m_col - m_newText.length ());
- const QString rightHalf = textLines [m_row].mid (m_col);
+ TQValueVector <TQString> textLines = selection ()->textLines ();
+ const TQString leftHalf = textLines [m_row].left (m_col - m_newText.length ());
+ const TQString rightHalf = textLines [m_row].mid (m_col);
textLines [m_row] = leftHalf + rightHalf;
selection ()->setTextLines (textLines);
@@ -1081,7 +1081,7 @@ void kpToolTextInsertCommand::unexecute ()
* kpToolTextEnterCommand
*/
-kpToolTextEnterCommand::kpToolTextEnterCommand (const QString &name,
+kpToolTextEnterCommand::kpToolTextEnterCommand (const TQString &name,
int row, int col,
kpMainWindow *mainWindow)
: kpNamedCommand (name, mainWindow),
@@ -1100,9 +1100,9 @@ kpToolTextEnterCommand::~kpToolTextEnterCommand ()
// public
void kpToolTextEnterCommand::addEnter ()
{
- QValueVector <QString> textLines = selection ()->textLines ();
+ TQValueVector <TQString> textLines = selection ()->textLines ();
- const QString rightHalf = textLines [m_row].mid (m_col);
+ const TQString rightHalf = textLines [m_row].mid (m_col);
textLines [m_row].truncate (m_col);
textLines.insert (textLines.begin () + m_row + 1, rightHalf);
@@ -1141,7 +1141,7 @@ void kpToolTextEnterCommand::unexecute ()
{
viewManager ()->setTextCursorPosition (m_row, m_col);
- QValueVector <QString> textLines = selection ()->textLines ();
+ TQValueVector <TQString> textLines = selection ()->textLines ();
for (int i = 0; i < m_numEnters; i++)
{
@@ -1175,7 +1175,7 @@ void kpToolTextEnterCommand::unexecute ()
* kpToolTextBackspaceCommand
*/
-kpToolTextBackspaceCommand::kpToolTextBackspaceCommand (const QString &name,
+kpToolTextBackspaceCommand::kpToolTextBackspaceCommand (const TQString &name,
int row, int col,
kpMainWindow *mainWindow)
: kpNamedCommand (name, mainWindow),
@@ -1194,7 +1194,7 @@ kpToolTextBackspaceCommand::~kpToolTextBackspaceCommand ()
// public
void kpToolTextBackspaceCommand::addBackspace ()
{
- QValueVector <QString> textLines = selection ()->textLines ();
+ TQValueVector <TQString> textLines = selection ()->textLines ();
if (m_col > 0)
{
@@ -1233,7 +1233,7 @@ void kpToolTextBackspaceCommand::addBackspace ()
// public virtual [base kpCommand]
int kpToolTextBackspaceCommand::size () const
{
- return m_deletedText.length () * sizeof (QChar);
+ return m_deletedText.length () * sizeof (TQChar);
}
@@ -1242,7 +1242,7 @@ void kpToolTextBackspaceCommand::execute ()
{
viewManager ()->setTextCursorPosition (m_row, m_col);
- m_deletedText = QString::null;
+ m_deletedText = TQString::null;
int oldNumBackspaces = m_numBackspaces;
m_numBackspaces = 0;
@@ -1255,13 +1255,13 @@ void kpToolTextBackspaceCommand::unexecute ()
{
viewManager ()->setTextCursorPosition (m_row, m_col);
- QValueVector <QString> textLines = selection ()->textLines ();
+ TQValueVector <TQString> textLines = selection ()->textLines ();
for (int i = 0; i < (int) m_deletedText.length (); i++)
{
if (m_deletedText [i] == '\n')
{
- const QString rightHalf = textLines [m_row].mid (m_col);
+ const TQString rightHalf = textLines [m_row].mid (m_col);
textLines [m_row].truncate (m_col);
textLines.insert (textLines.begin () + m_row + 1, rightHalf);
@@ -1271,15 +1271,15 @@ void kpToolTextBackspaceCommand::unexecute ()
}
else
{
- const QString leftHalf = textLines [m_row].left (m_col);
- const QString rightHalf = textLines [m_row].mid (m_col);
+ const TQString leftHalf = textLines [m_row].left (m_col);
+ const TQString rightHalf = textLines [m_row].mid (m_col);
textLines [m_row] = leftHalf + m_deletedText [i] + rightHalf;
m_col++;
}
}
- m_deletedText = QString::null;
+ m_deletedText = TQString::null;
selection ()->setTextLines (textLines);
@@ -1291,7 +1291,7 @@ void kpToolTextBackspaceCommand::unexecute ()
* kpToolTextDeleteCommand
*/
-kpToolTextDeleteCommand::kpToolTextDeleteCommand (const QString &name,
+kpToolTextDeleteCommand::kpToolTextDeleteCommand (const TQString &name,
int row, int col,
kpMainWindow *mainWindow)
: kpNamedCommand (name, mainWindow),
@@ -1310,7 +1310,7 @@ kpToolTextDeleteCommand::~kpToolTextDeleteCommand ()
// public
void kpToolTextDeleteCommand::addDelete ()
{
- QValueVector <QString> textLines = selection ()->textLines ();
+ TQValueVector <TQString> textLines = selection ()->textLines ();
if (m_col < (int) textLines [m_row].length ())
{
@@ -1341,7 +1341,7 @@ void kpToolTextDeleteCommand::addDelete ()
// public virtual [base kpCommand]
int kpToolTextDeleteCommand::size () const
{
- return m_deletedText.length () * sizeof (QChar);
+ return m_deletedText.length () * sizeof (TQChar);
}
@@ -1350,7 +1350,7 @@ void kpToolTextDeleteCommand::execute ()
{
viewManager ()->setTextCursorPosition (m_row, m_col);
- m_deletedText = QString::null;
+ m_deletedText = TQString::null;
int oldNumDeletes = m_numDeletes;
m_numDeletes = 0;
@@ -1363,27 +1363,27 @@ void kpToolTextDeleteCommand::unexecute ()
{
viewManager ()->setTextCursorPosition (m_row, m_col);
- QValueVector <QString> textLines = selection ()->textLines ();
+ TQValueVector <TQString> textLines = selection ()->textLines ();
for (int i = 0; i < (int) m_deletedText.length (); i++)
{
if (m_deletedText [i] == '\n')
{
- const QString rightHalf = textLines [m_row].mid (m_col);
+ const TQString rightHalf = textLines [m_row].mid (m_col);
textLines [m_row].truncate (m_col);
textLines.insert (textLines.begin () + m_row + 1, rightHalf);
}
else
{
- const QString leftHalf = textLines [m_row].left (m_col);
- const QString rightHalf = textLines [m_row].mid (m_col);
+ const TQString leftHalf = textLines [m_row].left (m_col);
+ const TQString rightHalf = textLines [m_row].mid (m_col);
textLines [m_row] = leftHalf + m_deletedText [i] + rightHalf;
}
}
- m_deletedText = QString::null;
+ m_deletedText = TQString::null;
selection ()->setTextLines (textLines);
diff --git a/kolourpaint/tools/kptooltext.h b/kolourpaint/tools/kptooltext.h
index a99654b7..15cda865 100644
--- a/kolourpaint/tools/kptooltext.h
+++ b/kolourpaint/tools/kptooltext.h
@@ -29,7 +29,7 @@
#ifndef __kp_tool_text_h__
#define __kp_tool_text_h__
-#include <qstring.h>
+#include <tqstring.h>
#include <kpcommandhistory.h>
@@ -57,17 +57,17 @@ public:
bool hasBegunText () const;
virtual bool hasBegunShape () const;
virtual void cancelShape ();
- virtual void endShape (const QPoint &thisPoint, const QRect &normalizedRect);
+ virtual void endShape (const TQPoint &thisPoint, const TQRect &normalizedRect);
protected:
- virtual void keyPressEvent (QKeyEvent *e);
- virtual void imStartEvent (QIMEvent *e);
- virtual void imComposeEvent (QIMEvent *e);
- virtual void imEndEvent (QIMEvent *e);
+ virtual void keyPressEvent (TQKeyEvent *e);
+ virtual void imStartEvent (TQIMEvent *e);
+ virtual void imComposeEvent (TQIMEvent *e);
+ virtual void imEndEvent (TQIMEvent *e);
protected:
bool shouldChangeTextStyle () const;
- void changeTextStyle (const QString &name,
+ void changeTextStyle (const TQString &name,
const kpTextStyle &newTextStyle,
const kpTextStyle &oldTextStyle);
@@ -80,7 +80,7 @@ protected slots:
virtual void slotColorSimilarityChanged (double, int);
public slots:
- void slotFontFamilyChanged (const QString &fontFamily, const QString &oldFontFamily);
+ void slotFontFamilyChanged (const TQString &fontFamily, const TQString &oldFontFamily);
void slotFontSizeChanged (int fontSize, int oldFontSize);
void slotBoldChanged (bool isBold);
void slotItalicChanged (bool isItalic);
@@ -96,14 +96,14 @@ protected:
bool m_isIMStarted;
int m_IMStartCursorRow;
int m_IMStartCursorCol;
- QString m_IMPreeditStr;
+ TQString m_IMPreeditStr;
};
class kpToolTextChangeStyleCommand : public kpNamedCommand
{
public:
- kpToolTextChangeStyleCommand (const QString &name,
+ kpToolTextChangeStyleCommand (const TQString &name,
const kpTextStyle &newTextStyle, const kpTextStyle &oldTextStyle,
kpMainWindow *mainWindow);
virtual ~kpToolTextChangeStyleCommand ();
@@ -120,12 +120,12 @@ protected:
class kpToolTextInsertCommand : public kpNamedCommand
{
public:
- kpToolTextInsertCommand (const QString &name,
- int row, int col, QString newText,
+ kpToolTextInsertCommand (const TQString &name,
+ int row, int col, TQString newText,
kpMainWindow *mainWindow);
virtual ~kpToolTextInsertCommand ();
- void addText (const QString &moreText);
+ void addText (const TQString &moreText);
virtual int size () const;
@@ -134,13 +134,13 @@ public:
protected:
int m_row, m_col;
- QString m_newText;
+ TQString m_newText;
};
class kpToolTextEnterCommand : public kpNamedCommand
{
public:
- kpToolTextEnterCommand (const QString &name,
+ kpToolTextEnterCommand (const TQString &name,
int row, int col,
kpMainWindow *mainWindow);
virtual ~kpToolTextEnterCommand ();
@@ -160,7 +160,7 @@ protected:
class kpToolTextBackspaceCommand : public kpNamedCommand
{
public:
- kpToolTextBackspaceCommand (const QString &name,
+ kpToolTextBackspaceCommand (const TQString &name,
int row, int col,
kpMainWindow *mainWindow);
virtual ~kpToolTextBackspaceCommand ();
@@ -175,13 +175,13 @@ public:
protected:
int m_row, m_col;
int m_numBackspaces;
- QString m_deletedText;
+ TQString m_deletedText;
};
class kpToolTextDeleteCommand : public kpNamedCommand
{
public:
- kpToolTextDeleteCommand (const QString &name,
+ kpToolTextDeleteCommand (const TQString &name,
int row, int col,
kpMainWindow *mainWindow);
virtual ~kpToolTextDeleteCommand ();
@@ -196,7 +196,7 @@ public:
protected:
int m_row, m_col;
int m_numDeletes;
- QString m_deletedText;
+ TQString m_deletedText;
};
#endif // __kp_tool_text_h__
diff --git a/kolourpaint/views/kpthumbnailview.cpp b/kolourpaint/views/kpthumbnailview.cpp
index 32c54376..179f7c92 100644
--- a/kolourpaint/views/kpthumbnailview.cpp
+++ b/kolourpaint/views/kpthumbnailview.cpp
@@ -39,7 +39,7 @@ kpThumbnailView::kpThumbnailView (kpDocument *document,
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: kpView (document, toolToolBar, viewManager,
buddyView,
@@ -64,13 +64,13 @@ void kpThumbnailView::setMaskToCoverDocument ()
<< endl;
#endif
- setMask (QRegion (QRect (origin ().x (), origin ().y (),
+ setMask (TQRegion (TQRect (origin ().x (), origin ().y (),
zoomedDocWidth (), zoomedDocHeight ())));
}
// protected virtual [base kpView]
-void kpThumbnailView::resizeEvent (QResizeEvent *e)
+void kpThumbnailView::resizeEvent (TQResizeEvent *e)
{
#if DEBUG_KP_THUMBNAIL_VIEW
kdDebug () << "kpThumbnailView(" << name () << ")::resizeEvent()"
diff --git a/kolourpaint/views/kpthumbnailview.h b/kolourpaint/views/kpthumbnailview.h
index c3420833..9bc4dad8 100644
--- a/kolourpaint/views/kpthumbnailview.h
+++ b/kolourpaint/views/kpthumbnailview.h
@@ -53,7 +53,7 @@ public:
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- QWidget *parent, const char *name);
+ TQWidget *parent, const char *name);
/**
* Destructs this thumbnail view.
@@ -64,7 +64,7 @@ public:
/**
* @returns the caption to display in an enclosing thumbnail window.
*/
- virtual QString caption () const = 0;
+ virtual TQString caption () const = 0;
protected:
@@ -83,7 +83,7 @@ protected:
*
* Extends @ref kpView.
*/
- virtual void resizeEvent (QResizeEvent *e);
+ virtual void resizeEvent (TQResizeEvent *e);
};
diff --git a/kolourpaint/views/kpunzoomedthumbnailview.cpp b/kolourpaint/views/kpunzoomedthumbnailview.cpp
index 09d5aed1..4f019905 100644
--- a/kolourpaint/views/kpunzoomedthumbnailview.cpp
+++ b/kolourpaint/views/kpunzoomedthumbnailview.cpp
@@ -50,7 +50,7 @@ kpUnzoomedThumbnailView::kpUnzoomedThumbnailView (
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: kpThumbnailView (document, toolToolBar, viewManager,
buddyView,
@@ -61,9 +61,9 @@ kpUnzoomedThumbnailView::kpUnzoomedThumbnailView (
if (buddyViewScrollableContainer ())
{
connect (buddyViewScrollableContainer (),
- SIGNAL (contentsMovingSoon (int, int)),
+ TQT_SIGNAL (contentsMovingSoon (int, int)),
this,
- SLOT (adjustToEnvironment ()));
+ TQT_SLOT (adjustToEnvironment ()));
}
// Call to virtual function - this is why the class is sealed
@@ -78,7 +78,7 @@ kpUnzoomedThumbnailView::~kpUnzoomedThumbnailView ()
// public virtual [base kpThumbnailView]
-QString kpUnzoomedThumbnailView::caption () const
+TQString kpUnzoomedThumbnailView::caption () const
{
return i18n ("Unzoomed Mode - Thumbnail");
}
@@ -160,8 +160,8 @@ void kpUnzoomedThumbnailView::adjustToEnvironment ()
if (!buddyViewScrollableContainer ())
return;
- QRect docRect = buddyView ()->transformViewToDoc (
- QRect (buddyViewScrollableContainer ()->contentsXSoon (),
+ TQRect docRect = buddyView ()->transformViewToDoc (
+ TQRect (buddyViewScrollableContainer ()->contentsXSoon (),
buddyViewScrollableContainer ()->contentsYSoon (),
QMIN (buddyView ()->width (), buddyViewScrollableContainer ()->visibleWidth ()),
QMIN (buddyView ()->height (), buddyViewScrollableContainer ()->visibleHeight ())));
@@ -192,7 +192,7 @@ void kpUnzoomedThumbnailView::adjustToEnvironment ()
{
// OPT: scrollView impl would be much, much faster
- setOrigin (QPoint (-x, -y));
+ setOrigin (TQPoint (-x, -y));
setMaskToCoverDocument ();
// Above might be a NOP even if e.g. doc size changed so force
diff --git a/kolourpaint/views/kpunzoomedthumbnailview.h b/kolourpaint/views/kpunzoomedthumbnailview.h
index 0f7ccf53..cff6bdab 100644
--- a/kolourpaint/views/kpunzoomedthumbnailview.h
+++ b/kolourpaint/views/kpunzoomedthumbnailview.h
@@ -65,7 +65,7 @@ public:
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- QWidget *parent, const char *name);
+ TQWidget *parent, const char *name);
/**
* Destructs an unzoomed thumbnail view.
@@ -76,7 +76,7 @@ public:
/**
* Implements @ref kpThumbnailView.
*/
- QString caption () const;
+ TQString caption () const;
public slots:
diff --git a/kolourpaint/views/kpzoomedthumbnailview.cpp b/kolourpaint/views/kpzoomedthumbnailview.cpp
index ecbfd317..c5bde48d 100644
--- a/kolourpaint/views/kpzoomedthumbnailview.cpp
+++ b/kolourpaint/views/kpzoomedthumbnailview.cpp
@@ -43,7 +43,7 @@ kpZoomedThumbnailView::kpZoomedThumbnailView (kpDocument *document,
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: kpThumbnailView (document, toolToolBar, viewManager,
buddyView,
@@ -61,7 +61,7 @@ kpZoomedThumbnailView::~kpZoomedThumbnailView ()
// public virtual [base kpThumbnailView]
-QString kpZoomedThumbnailView::caption () const
+TQString kpZoomedThumbnailView::caption () const
{
return i18n ("%1% - Thumbnail").arg (zoomLevelX ());
}
@@ -124,7 +124,7 @@ void kpZoomedThumbnailView::adjustToEnvironment ()
{
setZoomLevel (hzoom, vzoom);
- setOrigin (QPoint ((width () - zoomedDocWidth ()) / 2,
+ setOrigin (TQPoint ((width () - zoomedDocWidth ()) / 2,
(height () - zoomedDocHeight ()) / 2));
setMaskToCoverDocument ();
diff --git a/kolourpaint/views/kpzoomedthumbnailview.h b/kolourpaint/views/kpzoomedthumbnailview.h
index 0bcb367c..882c6d08 100644
--- a/kolourpaint/views/kpzoomedthumbnailview.h
+++ b/kolourpaint/views/kpzoomedthumbnailview.h
@@ -60,7 +60,7 @@ public:
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- QWidget *parent, const char *name);
+ TQWidget *parent, const char *name);
/**
* Destructs a zoomed thumbnail view.
@@ -71,7 +71,7 @@ public:
/**
* Implements @ref kpThumbnailView.
*/
- QString caption () const;
+ TQString caption () const;
public slots:
diff --git a/kolourpaint/views/kpzoomedview.cpp b/kolourpaint/views/kpzoomedview.cpp
index ef1d6981..c2b1f47d 100644
--- a/kolourpaint/views/kpzoomedview.cpp
+++ b/kolourpaint/views/kpzoomedview.cpp
@@ -43,7 +43,7 @@ kpZoomedView::kpZoomedView (kpDocument *document,
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: kpView (document, toolToolBar, viewManager,
buddyView,
diff --git a/kolourpaint/views/kpzoomedview.h b/kolourpaint/views/kpzoomedview.h
index c3729282..12565ab4 100644
--- a/kolourpaint/views/kpzoomedview.h
+++ b/kolourpaint/views/kpzoomedview.h
@@ -61,7 +61,7 @@ public:
kpViewManager *viewManager,
kpView *buddyView,
kpViewScrollableContainer *scrollableContainer,
- QWidget *parent, const char *name);
+ TQWidget *parent, const char *name);
/**
* Destructs an unzoomed view.
diff --git a/kolourpaint/widgets/kpcolorsimilaritycube.cpp b/kolourpaint/widgets/kpcolorsimilaritycube.cpp
index 9fe3f29b..c09e495a 100644
--- a/kolourpaint/widgets/kpcolorsimilaritycube.cpp
+++ b/kolourpaint/widgets/kpcolorsimilaritycube.cpp
@@ -32,9 +32,9 @@
#include <math.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qwhatsthis.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
#include <klocale.h>
@@ -49,14 +49,14 @@ const double kpColorSimilarityCube::colorCubeDiagonalDistance =
kpColorSimilarityCube::kpColorSimilarityCube (int look,
kpMainWindow *mainWindow,
- QWidget *parent,
+ TQWidget *parent,
const char *name)
- : QFrame (parent, name, Qt::WNoAutoErase/*no flicker*/),
+ : TQFrame (parent, name, Qt::WNoAutoErase/*no flicker*/),
m_mainWindow (mainWindow),
m_colorSimilarity (-1)
{
if (look & Depressed)
- setFrameStyle (QFrame::Panel | QFrame::Sunken);
+ setFrameStyle (TQFrame::Panel | TQFrame::Sunken);
setColorSimilarity (0);
@@ -66,7 +66,7 @@ kpColorSimilarityCube::kpColorSimilarityCube (int look,
if (look & DoubleClickInstructions)
{
- QWhatsThis::add (this,
+ TQWhatsThis::add (this,
i18n ("<qt><p><b>Color Similarity</b> is how close "
"colors must be in the RGB Color Cube "
"to be considered the same.</p>"
@@ -87,7 +87,7 @@ kpColorSimilarityCube::kpColorSimilarityCube (int look,
}
else
{
- QWhatsThis::add (this,
+ TQWhatsThis::add (this,
i18n ("<qt><p><b>Color Similarity</b> is how close "
"colors must be in the RGB Color Cube "
"to be considered the same.</p>"
@@ -138,14 +138,14 @@ void kpColorSimilarityCube::setColorSimilarity (double similarity)
// protected virtual [base QWidget]
-QSize kpColorSimilarityCube::sizeHint () const
+TQSize kpColorSimilarityCube::sizeHint () const
{
- return QSize (52, 52);
+ return TQSize (52, 52);
}
// protected
-QColor kpColorSimilarityCube::color (int redOrGreenOrBlue,
+TQColor kpColorSimilarityCube::color (int redOrGreenOrBlue,
int baseBrightness,
int similarityDirection) const
{
@@ -161,26 +161,26 @@ QColor kpColorSimilarityCube::color (int redOrGreenOrBlue,
switch (redOrGreenOrBlue)
{
default:
- case 0: return QColor (brightness, 0, 0);
- case 1: return QColor (0, brightness, 0);
- case 2: return QColor (0, 0, brightness);
+ case 0: return TQColor (brightness, 0, 0);
+ case 1: return TQColor (0, brightness, 0);
+ case 2: return TQColor (0, 0, brightness);
}
}
-static QPoint pointBetween (const QPoint &p, const QPoint &q)
+static TQPoint pointBetween (const TQPoint &p, const TQPoint &q)
{
- return QPoint ((p.x () + q.x ()) / 2, (p.y () + q.y ()) / 2);
+ return TQPoint ((p.x () + q.x ()) / 2, (p.y () + q.y ()) / 2);
}
-static void drawQuadrant (QPainter *p,
- const QColor &col,
- const QPoint &p1, const QPoint &p2, const QPoint &p3,
- const QPoint pointNotOnOutline)
+static void drawQuadrant (TQPainter *p,
+ const TQColor &col,
+ const TQPoint &p1, const TQPoint &p2, const TQPoint &p3,
+ const TQPoint pointNotOnOutline)
{
p->save ();
- QPointArray points (4);
+ TQPointArray points (4);
points [0] = p1;
points [1] = p2;
points [2] = p3;
@@ -202,10 +202,10 @@ static void drawQuadrant (QPainter *p,
}
// protected
-void kpColorSimilarityCube::drawFace (QPainter *p,
+void kpColorSimilarityCube::drawFace (TQPainter *p,
int redOrGreenOrBlue,
- const QPoint &tl, const QPoint &tr,
- const QPoint &bl, const QPoint &br)
+ const TQPoint &tl, const TQPoint &tr,
+ const TQPoint &bl, const TQPoint &br)
{
#if DEBUG_KP_COLOR_SIMILARITY_CUBE
kdDebug () << "kpColorSimilarityCube(RorGorB=" << redOrGreenOrBlue
@@ -225,18 +225,18 @@ void kpColorSimilarityCube::drawFace (QPainter *p,
// | | |
// bl --- bm --- br
- const QPoint tm (::pointBetween (tl, tr));
- const QPoint bm (::pointBetween (bl, br));
+ const TQPoint tm (::pointBetween (tl, tr));
+ const TQPoint bm (::pointBetween (bl, br));
- const QPoint ml (::pointBetween (tl, bl));
- const QPoint mr (::pointBetween (tr, br));
- const QPoint mm (::pointBetween (ml, mr));
+ const TQPoint ml (::pointBetween (tl, bl));
+ const TQPoint mr (::pointBetween (tr, br));
+ const TQPoint mm (::pointBetween (ml, mr));
const int baseBrightness = QMAX (127,
255 - int (kpColorSimilarityDialog::maximumColorSimilarity *
kpColorSimilarityCube::colorCubeDiagonalDistance / 2));
- QColor colors [2] =
+ TQColor colors [2] =
{
color (redOrGreenOrBlue, baseBrightness, -1),
color (redOrGreenOrBlue, baseBrightness, +1)
@@ -269,14 +269,14 @@ void kpColorSimilarityCube::drawFace (QPainter *p,
}
// protected virtual [base QFrame]
-void kpColorSimilarityCube::drawContents (QPainter *p)
+void kpColorSimilarityCube::drawContents (TQPainter *p)
{
- QRect cr (contentsRect ());
+ TQRect cr (contentsRect ());
- QPixmap backBuffer (cr.width (), cr.height ());
+ TQPixmap backBuffer (cr.width (), cr.height ());
backBuffer.fill (colorGroup ().background ());
- QPainter backBufferPainter (&backBuffer);
+ TQPainter backBufferPainter (&backBuffer);
int cubeRectSize = QMIN (cr.width () * 6 / 8, cr.height () * 6 / 8);
int dx = (cr.width () - cubeRectSize) / 2,
@@ -304,13 +304,13 @@ void kpColorSimilarityCube::drawContents (QPainter *p)
const double side = double (cubeRectSize) / (1 + sin (angle));
- const QPoint pointP ((int) (side * cos (angle)), 0);
- const QPoint pointQ ((int) (side * cos (angle) + side), 0);
- const QPoint pointR (0, (int) (side * sin (angle)));
- const QPoint pointS ((int) (side), (int) (side * sin (angle)));
- const QPoint pointU (0, (int) (side * sin (angle) + side));
- const QPoint pointT ((int) (side + side * cos (angle)), (int) (side));
- const QPoint pointV ((int) (side), (int) (side * sin (angle) + side));
+ const TQPoint pointP ((int) (side * cos (angle)), 0);
+ const TQPoint pointQ ((int) (side * cos (angle) + side), 0);
+ const TQPoint pointR (0, (int) (side * sin (angle)));
+ const TQPoint pointS ((int) (side), (int) (side * sin (angle)));
+ const TQPoint pointU (0, (int) (side * sin (angle) + side));
+ const TQPoint pointT ((int) (side + side * cos (angle)), (int) (side));
+ const TQPoint pointV ((int) (side), (int) (side * sin (angle) + side));
// Top Face
diff --git a/kolourpaint/widgets/kpcolorsimilaritycube.h b/kolourpaint/widgets/kpcolorsimilaritycube.h
index 358d4b3a..ee074d55 100644
--- a/kolourpaint/widgets/kpcolorsimilaritycube.h
+++ b/kolourpaint/widgets/kpcolorsimilaritycube.h
@@ -29,7 +29,7 @@
#ifndef __kp_color_similarity_cube_h__
#define __kp_color_similarity_cube_h__
-#include <qframe.h>
+#include <tqframe.h>
class kpColor;
class kpMainWindow;
@@ -46,7 +46,7 @@ public:
kpColorSimilarityCube (int look,
kpMainWindow *mainWindow,
- QWidget *parent,
+ TQWidget *parent,
const char *name = 0);
virtual ~kpColorSimilarityCube ();
@@ -55,15 +55,15 @@ public:
double colorSimilarity () const;
void setColorSimilarity (double similarity);
- virtual QSize sizeHint () const;
+ virtual TQSize sizeHint () const;
protected:
- QColor color (int redOrGreenOrBlue, int baseBrightness, int similarityDirection) const;
- void drawFace (QPainter *p,
+ TQColor color (int redOrGreenOrBlue, int baseBrightness, int similarityDirection) const;
+ void drawFace (TQPainter *p,
int redOrGreenOrBlue,
- const QPoint &tl, const QPoint &tr,
- const QPoint &bl, const QPoint &br);
- virtual void drawContents (QPainter *p);
+ const TQPoint &tl, const TQPoint &tr,
+ const TQPoint &bl, const TQPoint &br);
+ virtual void drawContents (TQPainter *p);
kpMainWindow *m_mainWindow;
double m_colorSimilarity;
diff --git a/kolourpaint/widgets/kpcolorsimilaritydialog.cpp b/kolourpaint/widgets/kpcolorsimilaritydialog.cpp
index d2766568..5831c62f 100644
--- a/kolourpaint/widgets/kpcolorsimilaritydialog.cpp
+++ b/kolourpaint/widgets/kpcolorsimilaritydialog.cpp
@@ -28,10 +28,10 @@
#include <kpcolorsimilaritydialog.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <knuminput.h>
@@ -44,36 +44,36 @@ const double kpColorSimilarityDialog::maximumColorSimilarity = .30;
kpColorSimilarityDialog::kpColorSimilarityDialog (kpMainWindow *mainWindow,
- QWidget *parent,
+ TQWidget *parent,
const char *name)
: KDialogBase (parent, name, true/*modal*/,
i18n ("Color Similarity"),
KDialogBase::Ok | KDialogBase::Cancel),
m_mainWindow (mainWindow)
{
- QWidget *baseWidget = new QWidget (this);
+ TQWidget *baseWidget = new TQWidget (this);
setMainWidget (baseWidget);
- QGroupBox *cubeGroupBox = new QGroupBox (i18n ("Preview"), baseWidget);
+ TQGroupBox *cubeGroupBox = new TQGroupBox (i18n ("Preview"), baseWidget);
m_colorSimilarityCube = new kpColorSimilarityCube (kpColorSimilarityCube::Plain,
mainWindow, cubeGroupBox);
m_colorSimilarityCube->setMinimumSize (240, 180);
- QPushButton *updatePushButton = new QPushButton (i18n ("&Update"), cubeGroupBox);
+ TQPushButton *updatePushButton = new TQPushButton (i18n ("&Update"), cubeGroupBox);
- QVBoxLayout *cubeLayout = new QVBoxLayout (cubeGroupBox, marginHint () * 2, spacingHint ());
+ TQVBoxLayout *cubeLayout = new TQVBoxLayout (cubeGroupBox, marginHint () * 2, spacingHint ());
cubeLayout->addWidget (m_colorSimilarityCube, 1/*stretch*/);
cubeLayout->addWidget (updatePushButton, 0/*stretch*/, Qt::AlignHCenter);
- connect (updatePushButton, SIGNAL (clicked ()),
- this, SLOT (slotColorSimilarityValueChanged ()));
+ connect (updatePushButton, TQT_SIGNAL (clicked ()),
+ this, TQT_SLOT (slotColorSimilarityValueChanged ()));
- QGroupBox *inputGroupBox = new QGroupBox (i18n ("RGB Color Cube Distance"), baseWidget);
+ TQGroupBox *inputGroupBox = new TQGroupBox (i18n ("RGB Color Cube Distance"), baseWidget);
m_colorSimilarityInput = new KIntNumInput (inputGroupBox);
m_colorSimilarityInput->setRange (0, int (kpColorSimilarityDialog::maximumColorSimilarity * 100 + .1/*don't floor below target int*/),
@@ -82,15 +82,15 @@ kpColorSimilarityDialog::kpColorSimilarityDialog (kpMainWindow *mainWindow,
m_colorSimilarityInput->setSpecialValueText (i18n ("Exact Match"));
- QVBoxLayout *inputLayout = new QVBoxLayout (inputGroupBox, marginHint () * 2, spacingHint ());
+ TQVBoxLayout *inputLayout = new TQVBoxLayout (inputGroupBox, marginHint () * 2, spacingHint ());
inputLayout->addWidget (m_colorSimilarityInput);
- connect (m_colorSimilarityInput, SIGNAL (valueChanged (int)),
- this, SLOT (slotColorSimilarityValueChanged ()));
+ connect (m_colorSimilarityInput, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SLOT (slotColorSimilarityValueChanged ()));
- QVBoxLayout *baseLayout = new QVBoxLayout (baseWidget, 0/*margin*/, spacingHint () * 2);
+ TQVBoxLayout *baseLayout = new TQVBoxLayout (baseWidget, 0/*margin*/, spacingHint () * 2);
baseLayout->addWidget (cubeGroupBox, 1/*stretch*/);
baseLayout->addWidget (inputGroupBox);
}
diff --git a/kolourpaint/widgets/kpcolorsimilaritydialog.h b/kolourpaint/widgets/kpcolorsimilaritydialog.h
index fd70ecd0..7dee17b8 100644
--- a/kolourpaint/widgets/kpcolorsimilaritydialog.h
+++ b/kolourpaint/widgets/kpcolorsimilaritydialog.h
@@ -41,7 +41,7 @@ Q_OBJECT
public:
kpColorSimilarityDialog (kpMainWindow *mainWindow,
- QWidget *parent,
+ TQWidget *parent,
const char *name = 0);
virtual ~kpColorSimilarityDialog ();
diff --git a/kolourpaint/widgets/kpcolortoolbar.cpp b/kolourpaint/widgets/kpcolortoolbar.cpp
index cba73b4f..327229df 100644
--- a/kolourpaint/widgets/kpcolortoolbar.cpp
+++ b/kolourpaint/widgets/kpcolortoolbar.cpp
@@ -31,14 +31,14 @@
#include <kpcolortoolbar.h>
-#include <qbitmap.h>
-#include <qdrawutil.h>
-#include <qframe.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qsize.h>
-#include <qtooltip.h>
-#include <qwidget.h>
+#include <tqbitmap.h>
+#include <tqdrawutil.h>
+#include <tqframe.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqsize.h>
+#include <tqtooltip.h>
+#include <tqwidget.h>
#include <kapplication.h>
#include <kcolordialog.h>
@@ -61,12 +61,12 @@
*/
kpDualColorButton::kpDualColorButton (kpMainWindow *mainWindow,
- QWidget *parent, const char *name)
- : QFrame (parent, name, Qt::WNoAutoErase/*no flicker*/),
+ TQWidget *parent, const char *name)
+ : TQFrame (parent, name, Qt::WNoAutoErase/*no flicker*/),
m_mainWindow (mainWindow),
m_backBuffer (0)
{
- setFrameStyle (QFrame::Panel | QFrame::Sunken);
+ setFrameStyle (TQFrame::Panel | TQFrame::Sunken);
m_color [0] = kpColor (0, 0, 0); // black
m_color [1] = kpColor (255, 255, 255); // white
@@ -150,48 +150,48 @@ kpColor kpDualColorButton::oldBackgroundColor () const
// public virtual [base QWidget]
-QSize kpDualColorButton::sizeHint () const
+TQSize kpDualColorButton::sizeHint () const
{
- return QSize (52, 52);
+ return TQSize (52, 52);
}
// protected
-QRect kpDualColorButton::swapPixmapRect () const
+TQRect kpDualColorButton::swapPixmapRect () const
{
- QPixmap swapPixmap = UserIcon ("colorbutton_swap_16x16");
+ TQPixmap swapPixmap = UserIcon ("colorbutton_swap_16x16");
- return QRect (contentsRect ().width () - swapPixmap.width (),
+ return TQRect (contentsRect ().width () - swapPixmap.width (),
0,
swapPixmap.width (),
swapPixmap.height ());
}
// protected
-QRect kpDualColorButton::foregroundBackgroundRect () const
+TQRect kpDualColorButton::foregroundBackgroundRect () const
{
- QRect cr (contentsRect ());
- return QRect (cr.width () / 8,
+ TQRect cr (contentsRect ());
+ return TQRect (cr.width () / 8,
cr.height () / 8,
cr.width () * 6 / 8,
cr.height () * 6 / 8);
}
// protected
-QRect kpDualColorButton::foregroundRect () const
+TQRect kpDualColorButton::foregroundRect () const
{
- QRect fbr (foregroundBackgroundRect ());
- return QRect (fbr.x (),
+ TQRect fbr (foregroundBackgroundRect ());
+ return TQRect (fbr.x (),
fbr.y (),
fbr.width () * 3 / 4,
fbr.height () * 3 / 4);
}
// protected
-QRect kpDualColorButton::backgroundRect () const
+TQRect kpDualColorButton::backgroundRect () const
{
- QRect fbr (foregroundBackgroundRect ());
- return QRect (fbr.x () + fbr.width () / 4,
+ TQRect fbr (foregroundBackgroundRect ());
+ return TQRect (fbr.x () + fbr.width () / 4,
fbr.y () + fbr.height () / 4,
fbr.width () * 3 / 4,
fbr.height () * 3 / 4);
@@ -201,7 +201,7 @@ QRect kpDualColorButton::backgroundRect () const
// TODO: drag a colour from this widget
// protected virtual [base QWidget]
-void kpDualColorButton::dragMoveEvent (QDragMoveEvent *e)
+void kpDualColorButton::dragMoveEvent (TQDragMoveEvent *e)
{
e->accept ((foregroundRect ().contains (e->pos ()) ||
backgroundRect ().contains (e->pos ())) &&
@@ -209,9 +209,9 @@ void kpDualColorButton::dragMoveEvent (QDragMoveEvent *e)
}
// protected virtual [base QWidget]
-void kpDualColorButton::dropEvent (QDropEvent *e)
+void kpDualColorButton::dropEvent (TQDropEvent *e)
{
- QColor col;
+ TQColor col;
KColorDrag::decode (e, col/*ref*/);
if (col.isValid ())
@@ -225,13 +225,13 @@ void kpDualColorButton::dropEvent (QDropEvent *e)
// protected virtual [base QWidget]
-void kpDualColorButton::mousePressEvent (QMouseEvent * /*e*/)
+void kpDualColorButton::mousePressEvent (TQMouseEvent * /*e*/)
{
// eat right-mouse click to prevent it from getting to the toolbar
}
// protected virtual [base QWidget]
-void kpDualColorButton::mouseDoubleClickEvent (QMouseEvent *e)
+void kpDualColorButton::mouseDoubleClickEvent (TQMouseEvent *e)
{
int whichColor = -1;
@@ -242,7 +242,7 @@ void kpDualColorButton::mouseDoubleClickEvent (QMouseEvent *e)
if (whichColor == 0 || whichColor == 1)
{
- QColor col = Qt::black;
+ TQColor col = Qt::black;
if (color (whichColor).isOpaque ())
col = color (whichColor).toQColor ();
else
@@ -264,7 +264,7 @@ void kpDualColorButton::mouseDoubleClickEvent (QMouseEvent *e)
}
// protected virtual [base QWidget]
-void kpDualColorButton::mouseReleaseEvent (QMouseEvent *e)
+void kpDualColorButton::mouseReleaseEvent (TQMouseEvent *e)
{
if (swapPixmapRect ().contains (e->pos ()) &&
m_color [0] != m_color [1])
@@ -289,7 +289,7 @@ void kpDualColorButton::mouseReleaseEvent (QMouseEvent *e)
// protected virtual [base QFrame]
-void kpDualColorButton::drawContents (QPainter *p)
+void kpDualColorButton::drawContents (TQPainter *p)
{
#if DEBUG_KP_COLOR_TOOL_BAR && 1
kdDebug () << "kpDualColorButton::draw() rect=" << rect ()
@@ -302,11 +302,11 @@ void kpDualColorButton::drawContents (QPainter *p)
m_backBuffer->height () != contentsRect ().height ())
{
delete m_backBuffer;
- m_backBuffer = new QPixmap (contentsRect ().width (), contentsRect ().height ());
+ m_backBuffer = new TQPixmap (contentsRect ().width (), contentsRect ().height ());
}
- QPainter backBufferPainter (m_backBuffer);
+ TQPainter backBufferPainter (m_backBuffer);
if (isEnabled () && m_mainWindow)
{
@@ -318,21 +318,21 @@ void kpDualColorButton::drawContents (QPainter *p)
else
{
backBufferPainter.fillRect (m_backBuffer->rect (),
- colorGroup ().color (QColorGroup::Background));
+ colorGroup ().color (TQColorGroup::Background));
}
- QPixmap swapPixmap = UserIcon ("colorbutton_swap_16x16");
+ TQPixmap swapPixmap = UserIcon ("colorbutton_swap_16x16");
if (!isEnabled ())
{
// swapPixmap has a mask after all
- swapPixmap.fill (colorGroup ().color (QColorGroup::Dark));
+ swapPixmap.fill (colorGroup ().color (TQColorGroup::Dark));
}
backBufferPainter.drawPixmap (swapPixmapRect ().topLeft (), swapPixmap);
// foreground patch must be drawn after background patch
// as it overlaps on top of background patch
- QRect bgRect = backgroundRect ();
- QRect bgRectInside = QRect (bgRect.x () + 2, bgRect.y () + 2,
+ TQRect bgRect = backgroundRect ();
+ TQRect bgRectInside = TQRect (bgRect.x () + 2, bgRect.y () + 2,
bgRect.width () - 4, bgRect.height () - 4);
if (isEnabled ())
{
@@ -346,13 +346,13 @@ void kpDualColorButton::drawContents (QPainter *p)
backBufferPainter.drawPixmap (bgRectInside, UserIcon ("color_transparent_26x26"));
}
else
- backBufferPainter.fillRect (bgRectInside, colorGroup ().color (QColorGroup::Button));
+ backBufferPainter.fillRect (bgRectInside, colorGroup ().color (TQColorGroup::Button));
qDrawShadePanel (&backBufferPainter, bgRect, colorGroup (),
false/*not sunken*/, 2/*lineWidth*/,
0/*never fill*/);
- QRect fgRect = foregroundRect ();
- QRect fgRectInside = QRect (fgRect.x () + 2, fgRect.y () + 2,
+ TQRect fgRect = foregroundRect ();
+ TQRect fgRectInside = TQRect (fgRect.x () + 2, fgRect.y () + 2,
fgRect.width () - 4, fgRect.height () - 4);
if (isEnabled ())
{
@@ -366,7 +366,7 @@ void kpDualColorButton::drawContents (QPainter *p)
backBufferPainter.drawPixmap (fgRectInside, UserIcon ("color_transparent_26x26"));
}
else
- backBufferPainter.fillRect (fgRectInside, colorGroup ().color (QColorGroup::Button));
+ backBufferPainter.fillRect (fgRectInside, colorGroup ().color (TQColorGroup::Button));
qDrawShadePanel (&backBufferPainter, fgRect, colorGroup (),
false/*not sunken*/, 2/*lineWidth*/,
0/*never fill*/);
@@ -404,14 +404,14 @@ enum
blendAdd = 100
};
-static QColor blend (const QColor &a, const QColor &b, int percent = blendNormal)
+static TQColor blend (const TQColor &a, const TQColor &b, int percent = blendNormal)
{
- return QColor (btwn0_255 (roundUp2 (a.red () + b.red ()) * percent / 100),
+ return TQColor (btwn0_255 (roundUp2 (a.red () + b.red ()) * percent / 100),
btwn0_255 (roundUp2 (a.green () + b.green ()) * percent / 100),
btwn0_255 (roundUp2 (a.blue () + b.blue ()) * percent / 100));
}
-static QColor add (const QColor &a, const QColor &b)
+static TQColor add (const TQColor &a, const TQColor &b)
{
return blend (a, b, blendAdd);
}
@@ -426,33 +426,33 @@ static QColor add (const QColor &a, const QColor &b)
//
// primary colors + B&W
-static QColor kpRed;
-static QColor kpGreen;
-static QColor kpBlue;
-static QColor kpBlack;
-static QColor kpWhite;
+static TQColor kpRed;
+static TQColor kpGreen;
+static TQColor kpBlue;
+static TQColor kpBlack;
+static TQColor kpWhite;
// intentionally _not_ an HSV darkener
-static QColor dark (const QColor &color)
+static TQColor dark (const TQColor &color)
{
return blend (color, kpBlack);
}
// full-brightness colors
-static QColor kpYellow;
-static QColor kpPurple;
-static QColor kpAqua;
+static TQColor kpYellow;
+static TQColor kpPurple;
+static TQColor kpAqua;
// mixed colors
-static QColor kpGrey;
-static QColor kpLightGrey;
-static QColor kpOrange;
+static TQColor kpGrey;
+static TQColor kpLightGrey;
+static TQColor kpOrange;
// pastel colors
-static QColor kpPink;
-static QColor kpLightGreen;
-static QColor kpLightBlue;
-static QColor kpTan;
+static TQColor kpPink;
+static TQColor kpLightGreen;
+static TQColor kpLightBlue;
+static TQColor kpTan;
static bool ownColorsInitialised = false;
@@ -461,7 +461,7 @@ static bool ownColorsInitialised = false;
*/
#define rows 2
#define cols 11
-kpColorCells::kpColorCells (QWidget *parent,
+kpColorCells::kpColorCells (TQWidget *parent,
Qt::Orientation o,
const char *name)
: KColorCells (parent, rows, cols),
@@ -476,8 +476,8 @@ kpColorCells::kpColorCells (QWidget *parent,
setAcceptDrops (true);
setAcceptDrags (true);
- connect (this, SIGNAL (colorDoubleClicked (int)),
- SLOT (slotColorDoubleClicked (int)));
+ connect (this, TQT_SIGNAL (colorDoubleClicked (int)),
+ TQT_SLOT (slotColorDoubleClicked (int)));
if (!ownColorsInitialised)
{
@@ -485,11 +485,11 @@ kpColorCells::kpColorCells (QWidget *parent,
// allocation context. This way, the colours aren't sometimes
// invalid (e.g. at 8-bit).
- kpRed = QColor (255, 0, 0);
- kpGreen = QColor (0, 255, 0);
- kpBlue = QColor (0, 0, 255);
- kpBlack = QColor (0, 0, 0);
- kpWhite = QColor (255, 255, 255);
+ kpRed = TQColor (255, 0, 0);
+ kpGreen = TQColor (0, 255, 0);
+ kpBlue = TQColor (0, 0, 255);
+ kpBlack = TQColor (0, 0, 0);
+ kpWhite = TQColor (255, 255, 255);
kpYellow = add (kpRed, kpGreen);
kpPurple = add (kpRed, kpBlue);
@@ -553,7 +553,7 @@ void kpColorCells::setOrientation (Qt::Orientation o)
kdDebug () << "\tsizeof (colors)=" << sizeof (colors)
<< " sizeof (colors [0])=" << sizeof (colors [0])
<< endl;*/
- QColor colors [] =
+ TQColor colors [] =
{
kpBlack,
kpGrey,
@@ -603,14 +603,14 @@ void kpColorCells::setOrientation (Qt::Orientation o)
}
KColorCells::setColor (pos, colors [i]);
- //QToolTip::add (this, cellGeometry (y, x), colors [i].name ());
+ //TQToolTip::add (this, cellGeometry (y, x), colors [i].name ());
}
m_orientation = o;
}
// virtual protected [base KColorCells]
-void kpColorCells::dropEvent (QDropEvent *e)
+void kpColorCells::dropEvent (TQDropEvent *e)
{
// Eat event so that:
//
@@ -622,9 +622,9 @@ void kpColorCells::dropEvent (QDropEvent *e)
}
// virtual protected
-void kpColorCells::paintCell (QPainter *painter, int row, int col)
+void kpColorCells::paintCell (TQPainter *painter, int row, int col)
{
- QColor oldColor;
+ TQColor oldColor;
int cellNo;
if (!isEnabled ())
@@ -653,7 +653,7 @@ void kpColorCells::paintCell (QPainter *painter, int row, int col)
}
// virtual protected
-void kpColorCells::mouseReleaseEvent (QMouseEvent *e)
+void kpColorCells::mouseReleaseEvent (TQMouseEvent *e)
{
m_mouseButton = -1;
@@ -674,9 +674,9 @@ void kpColorCells::mouseReleaseEvent (QMouseEvent *e)
m_mouseButton = 1;
}
- connect (this, SIGNAL (colorSelected (int)), this, SLOT (slotColorSelected (int)));
+ connect (this, TQT_SIGNAL (colorSelected (int)), this, TQT_SLOT (slotColorSelected (int)));
KColorCells::mouseReleaseEvent (e);
- disconnect (this, SIGNAL (colorSelected (int)), this, SLOT (slotColorSelected (int)));
+ disconnect (this, TQT_SIGNAL (colorSelected (int)), this, TQT_SLOT (slotColorSelected (int)));
#if DEBUG_KP_COLOR_TOOL_BAR
kdDebug () << "kpColorCells::mouseReleaseEvent() setting m_mouseButton back to -1" << endl;
@@ -685,7 +685,7 @@ void kpColorCells::mouseReleaseEvent (QMouseEvent *e)
}
// protected virtual [base KColorCells]
-void kpColorCells::resizeEvent (QResizeEvent *e)
+void kpColorCells::resizeEvent (TQResizeEvent *e)
{
// KColorCells::resizeEvent() tries to adjust the cellWidth and cellHeight
// to the current dimensions but doesn't take into account
@@ -703,7 +703,7 @@ void kpColorCells::slotColorSelected (int cell)
kdDebug () << "kpColorCells::slotColorSelected(cell=" << cell
<< ") mouseButton = " << m_mouseButton << endl;
#endif
- QColor c = KColorCells::color (cell);
+ TQColor c = KColorCells::color (cell);
if (m_mouseButton == 0)
{
@@ -727,7 +727,7 @@ void kpColorCells::slotColorDoubleClicked (int cell)
<< cell << ")" << endl;
#endif
- QColor color = KColorCells::color (cell);
+ TQColor color = KColorCells::color (cell);
// TODO: parent
if (KColorDialog::getColor (color/*ref*/))
@@ -739,14 +739,14 @@ void kpColorCells::slotColorDoubleClicked (int cell)
* kpTransparentColorCell
*/
-kpTransparentColorCell::kpTransparentColorCell (QWidget *parent, const char *name)
- : QFrame (parent, name)
+kpTransparentColorCell::kpTransparentColorCell (TQWidget *parent, const char *name)
+ : TQFrame (parent, name)
{
#if DEBUG_KP_COLOR_TOOL_BAR
kdDebug () << "kpTransparentColorCell::kpTransparentColorCell()" << endl;
#endif
- setFrameStyle (QFrame::Panel | QFrame::Sunken);
+ setFrameStyle (TQFrame::Panel | TQFrame::Sunken);
#if DEBUG_KP_COLOR_TOOL_BAR && 0
kdDebug () << "\tdefault line width=" << lineWidth ()
<< " frame width=" << frameWidth () << endl;
@@ -759,7 +759,7 @@ kpTransparentColorCell::kpTransparentColorCell (QWidget *parent, const char *nam
m_pixmap = UserIcon ("color_transparent_26x26");
- QToolTip::add (this, i18n ("Transparent"));
+ TQToolTip::add (this, i18n ("Transparent"));
}
kpTransparentColorCell::~kpTransparentColorCell ()
@@ -768,20 +768,20 @@ kpTransparentColorCell::~kpTransparentColorCell ()
// public virtual [base QWidget]
-QSize kpTransparentColorCell::sizeHint () const
+TQSize kpTransparentColorCell::sizeHint () const
{
- return QSize (m_pixmap.width () + frameWidth () * 2,
+ return TQSize (m_pixmap.width () + frameWidth () * 2,
m_pixmap.height () + frameWidth () * 2);
}
// protected virtual [base QWidget]
-void kpTransparentColorCell::mousePressEvent (QMouseEvent * /*e*/)
+void kpTransparentColorCell::mousePressEvent (TQMouseEvent * /*e*/)
{
// eat right-mouse click to prevent it from getting to the toolbar
}
// protected virtual [base QWidget]
-void kpTransparentColorCell::mouseReleaseEvent (QMouseEvent *e)
+void kpTransparentColorCell::mouseReleaseEvent (TQMouseEvent *e)
{
if (rect ().contains (e->pos ()))
{
@@ -799,9 +799,9 @@ void kpTransparentColorCell::mouseReleaseEvent (QMouseEvent *e)
}
// protected virtual [base QFrame]
-void kpTransparentColorCell::drawContents (QPainter *p)
+void kpTransparentColorCell::drawContents (TQPainter *p)
{
- QFrame::drawContents (p);
+ TQFrame::drawContents (p);
if (isEnabled ())
{
#if DEBUG_KP_COLOR_TOOL_BAR
@@ -818,10 +818,10 @@ void kpTransparentColorCell::drawContents (QPainter *p)
* kpColorPalette
*/
-kpColorPalette::kpColorPalette (QWidget *parent,
+kpColorPalette::kpColorPalette (TQWidget *parent,
Qt::Orientation o,
const char *name)
- : QWidget (parent, name),
+ : TQWidget (parent, name),
m_boxLayout (0)
{
#if DEBUG_KP_COLOR_TOOL_BAR
@@ -829,17 +829,17 @@ kpColorPalette::kpColorPalette (QWidget *parent,
#endif
m_transparentColorCell = new kpTransparentColorCell (this);
- m_transparentColorCell->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed);
- connect (m_transparentColorCell, SIGNAL (foregroundColorChanged (const kpColor &)),
- this, SIGNAL (foregroundColorChanged (const kpColor &)));
- connect (m_transparentColorCell, SIGNAL (backgroundColorChanged (const kpColor &)),
- this, SIGNAL (backgroundColorChanged (const kpColor &)));
+ m_transparentColorCell->setSizePolicy (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 &)),
+ this, TQT_SIGNAL (backgroundColorChanged (const kpColor &)));
m_colorCells = new kpColorCells (this);
- connect (m_colorCells, SIGNAL (foregroundColorChanged (const kpColor &)),
- this, SIGNAL (foregroundColorChanged (const kpColor &)));
- connect (m_colorCells, SIGNAL (backgroundColorChanged (const kpColor &)),
- this, SIGNAL (backgroundColorChanged (const kpColor &)));
+ connect (m_colorCells, TQT_SIGNAL (foregroundColorChanged (const kpColor &)),
+ this, TQT_SIGNAL (foregroundColorChanged (const kpColor &)));
+ connect (m_colorCells, TQT_SIGNAL (backgroundColorChanged (const kpColor &)),
+ this, TQT_SIGNAL (backgroundColorChanged (const kpColor &)));
setOrientation (o);
}
@@ -862,13 +862,13 @@ void kpColorPalette::setOrientation (Qt::Orientation o)
if (o == Qt::Horizontal)
{
- m_boxLayout = new QBoxLayout (this, QBoxLayout::LeftToRight, 0/*margin*/, 5/*spacing*/);
+ m_boxLayout = new TQBoxLayout (this, TQBoxLayout::LeftToRight, 0/*margin*/, 5/*spacing*/);
m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, Qt::AlignVCenter);
m_boxLayout->addWidget (m_colorCells);
}
else
{
- m_boxLayout = new QBoxLayout (this, QBoxLayout::TopToBottom, 0/*margin*/, 5/*spacing*/);
+ m_boxLayout = new TQBoxLayout (this, TQBoxLayout::TopToBottom, 0/*margin*/, 5/*spacing*/);
m_boxLayout->addWidget (m_transparentColorCell, 0/*stretch*/, Qt::AlignHCenter);
m_boxLayout->addWidget (m_colorCells);
}
@@ -882,7 +882,7 @@ void kpColorPalette::setOrientation (Qt::Orientation o)
*/
kpColorSimilarityToolBarItem::kpColorSimilarityToolBarItem (kpMainWindow *mainWindow,
- QWidget *parent,
+ TQWidget *parent,
const char *name)
: kpColorSimilarityCube (kpColorSimilarityCube::Depressed |
kpColorSimilarityCube::DoubleClickInstructions,
@@ -912,9 +912,9 @@ void kpColorSimilarityToolBarItem::setColorSimilarity (double similarity)
kpColorSimilarityCube::setColorSimilarity (similarity);
if (similarity > 0)
- QToolTip::add (this, i18n ("Color similarity: %1%").arg (qRound (similarity * 100)));
+ TQToolTip::add (this, i18n ("Color similarity: %1%").arg (qRound (similarity * 100)));
else
- QToolTip::add (this, i18n ("Color similarity: Exact"));
+ TQToolTip::add (this, i18n ("Color similarity: Exact"));
m_processedColorSimilarity = kpColor::processSimilarity (colorSimilarity ());
@@ -931,13 +931,13 @@ double kpColorSimilarityToolBarItem::oldColorSimilarity () const
// private virtual [base QWidget]
-void kpColorSimilarityToolBarItem::mousePressEvent (QMouseEvent * /*e*/)
+void kpColorSimilarityToolBarItem::mousePressEvent (TQMouseEvent * /*e*/)
{
// eat right-mouse click to prevent it from getting to the toolbar
}
// private virtual [base QWidget]
-void kpColorSimilarityToolBarItem::mouseDoubleClickEvent (QMouseEvent * /*e*/)
+void kpColorSimilarityToolBarItem::mouseDoubleClickEvent (TQMouseEvent * /*e*/)
{
kpColorSimilarityDialog dialog (m_mainWindow, this);
dialog.setColorSimilarity (colorSimilarity ());
@@ -952,42 +952,42 @@ void kpColorSimilarityToolBarItem::mouseDoubleClickEvent (QMouseEvent * /*e*/)
* kpColorToolBar
*/
-kpColorToolBar::kpColorToolBar (const QString &label, kpMainWindow *mainWindow, const char *name)
+kpColorToolBar::kpColorToolBar (const TQString &label, kpMainWindow *mainWindow, const char *name)
: KToolBar (mainWindow, name),
m_mainWindow (mainWindow)
{
setText (label);
- QWidget *base = new QWidget (this);
- m_boxLayout = new QBoxLayout (base, QBoxLayout::LeftToRight,
+ TQWidget *base = new TQWidget (this);
+ m_boxLayout = new TQBoxLayout (base, TQBoxLayout::LeftToRight,
5/*margin*/, (10 * 4)/*spacing*/);
m_dualColorButton = new kpDualColorButton (mainWindow, base);
- m_dualColorButton->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed);
- connect (m_dualColorButton, SIGNAL (colorsSwapped (const kpColor &, const kpColor &)),
- this, SIGNAL (colorsSwapped (const kpColor &, const kpColor &)));
- connect (m_dualColorButton, SIGNAL (foregroundColorChanged (const kpColor &)),
- this, SIGNAL (foregroundColorChanged (const kpColor &)));
- connect (m_dualColorButton, SIGNAL (backgroundColorChanged (const kpColor &)),
- this, SIGNAL (backgroundColorChanged (const kpColor &)));
+ m_dualColorButton->setSizePolicy (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 &)),
+ this, TQT_SIGNAL (foregroundColorChanged (const kpColor &)));
+ connect (m_dualColorButton, TQT_SIGNAL (backgroundColorChanged (const kpColor &)),
+ this, TQT_SIGNAL (backgroundColorChanged (const kpColor &)));
m_boxLayout->addWidget (m_dualColorButton, 0/*stretch*/);
m_colorPalette = new kpColorPalette (base);
- connect (m_colorPalette, SIGNAL (foregroundColorChanged (const kpColor &)),
- m_dualColorButton, SLOT (setForegroundColor (const kpColor &)));
- connect (m_colorPalette, SIGNAL (backgroundColorChanged (const kpColor &)),
- m_dualColorButton, SLOT (setBackgroundColor (const kpColor &)));
+ connect (m_colorPalette, TQT_SIGNAL (foregroundColorChanged (const kpColor &)),
+ m_dualColorButton, TQT_SLOT (setForegroundColor (const kpColor &)));
+ connect (m_colorPalette, TQT_SIGNAL (backgroundColorChanged (const kpColor &)),
+ m_dualColorButton, TQT_SLOT (setBackgroundColor (const kpColor &)));
m_boxLayout->addWidget (m_colorPalette, 0/*stretch*/);
m_colorSimilarityToolBarItem = new kpColorSimilarityToolBarItem (mainWindow, base);
- m_colorSimilarityToolBarItem->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed);
- connect (m_colorSimilarityToolBarItem, SIGNAL (colorSimilarityChanged (double, int)),
- this, SIGNAL (colorSimilarityChanged (double, int)));
+ m_colorSimilarityToolBarItem->setSizePolicy (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*/);
- // HACK: couldn't get QSpacerItem to work
- QWidget *fakeSpacer = new QWidget (base);
+ // HACK: couldn't get TQSpacerItem to work
+ TQWidget *fakeSpacer = new TQWidget (base);
m_boxLayout->addWidget (fakeSpacer, 1/*stretch*/);
m_lastDockedOrientationSet = false;
@@ -999,8 +999,8 @@ kpColorToolBar::kpColorToolBar (const QString &label, kpMainWindow *mainWindow,
// virtual
void kpColorToolBar::setOrientation (Qt::Orientation o)
{
- // (QDockWindow::undock() calls us)
- bool isOutsideDock = (place () == QDockWindow::OutsideDock);
+ // (TQDockWindow::undock() calls us)
+ bool isOutsideDock = (place () == TQDockWindow::OutsideDock);
if (!m_lastDockedOrientationSet || !isOutsideDock)
{
@@ -1016,11 +1016,11 @@ void kpColorToolBar::setOrientation (Qt::Orientation o)
if (o == Qt::Horizontal)
{
- m_boxLayout->setDirection (QBoxLayout::LeftToRight);
+ m_boxLayout->setDirection (TQBoxLayout::LeftToRight);
}
else
{
- m_boxLayout->setDirection (QBoxLayout::TopToBottom);
+ m_boxLayout->setDirection (TQBoxLayout::TopToBottom);
}
m_colorPalette->setOrientation (o);
diff --git a/kolourpaint/widgets/kpcolortoolbar.h b/kolourpaint/widgets/kpcolortoolbar.h
index b4a77bfb..3b50c825 100644
--- a/kolourpaint/widgets/kpcolortoolbar.h
+++ b/kolourpaint/widgets/kpcolortoolbar.h
@@ -30,8 +30,8 @@
#define __kp_color_toolbar_h__
-#include <qframe.h>
-#include <qwidget.h>
+#include <tqframe.h>
+#include <tqwidget.h>
#include <kcolordialog.h>
#include <ktoolbar.h>
@@ -40,7 +40,7 @@
#include <kpcolorsimilaritycube.h>
-class QGridLayout;
+class TQGridLayout;
class KColorButton;
class kpColorSimilarityCube;
@@ -62,7 +62,7 @@ Q_OBJECT
public:
kpDualColorButton (kpMainWindow *mainWindow,
- QWidget *parent, const char *name = 0);
+ TQWidget *parent, const char *name = 0);
virtual ~kpDualColorButton ();
kpColor color (int which) const;
@@ -90,28 +90,28 @@ public:
kpColor oldBackgroundColor () const;
public:
- virtual QSize sizeHint () const;
+ virtual TQSize sizeHint () const;
protected:
- QRect swapPixmapRect () const;
- QRect foregroundBackgroundRect () const;
- QRect foregroundRect () const;
- QRect backgroundRect () const;
+ TQRect swapPixmapRect () const;
+ TQRect foregroundBackgroundRect () const;
+ TQRect foregroundRect () const;
+ TQRect backgroundRect () const;
- //virtual void dragEnterEvent (QDragEnterEvent *e);
- virtual void dragMoveEvent (QDragMoveEvent *e);
- virtual void dropEvent (QDropEvent *e);
+ //virtual void dragEnterEvent (TQDragEnterEvent *e);
+ virtual void dragMoveEvent (TQDragMoveEvent *e);
+ virtual void dropEvent (TQDropEvent *e);
- virtual void mousePressEvent (QMouseEvent *e);
- virtual void mouseDoubleClickEvent (QMouseEvent *e);
- virtual void mouseReleaseEvent (QMouseEvent *e);
+ virtual void mousePressEvent (TQMouseEvent *e);
+ virtual void mouseDoubleClickEvent (TQMouseEvent *e);
+ virtual void mouseReleaseEvent (TQMouseEvent *e);
- virtual void drawContents (QPainter *p);
+ virtual void drawContents (TQPainter *p);
kpMainWindow *m_mainWindow;
kpColor m_color [2];
kpColor m_oldColor [2];
- QPixmap *m_backBuffer;
+ TQPixmap *m_backBuffer;
};
@@ -120,7 +120,7 @@ class kpColorCells : public KColorCells
Q_OBJECT
public:
- kpColorCells (QWidget *parent,
+ kpColorCells (TQWidget *parent,
Qt::Orientation o = Qt::Horizontal,
const char *name = 0);
virtual ~kpColorCells ();
@@ -129,8 +129,8 @@ public:
void setOrientation (Qt::Orientation o);
signals:
- void foregroundColorChanged (const QColor &color);
- void backgroundColorChanged (const QColor &color);
+ void foregroundColorChanged (const TQColor &color);
+ void backgroundColorChanged (const TQColor &color);
// lazy
void foregroundColorChanged (const kpColor &color);
@@ -139,10 +139,10 @@ signals:
protected:
Qt::Orientation m_orientation;
- virtual void dropEvent (QDropEvent *e);
- virtual void paintCell (QPainter *painter, int row, int col);
- virtual void mouseReleaseEvent (QMouseEvent *e);
- virtual void resizeEvent (QResizeEvent *e);
+ virtual void dropEvent (TQDropEvent *e);
+ virtual void paintCell (TQPainter *painter, int row, int col);
+ virtual void mouseReleaseEvent (TQMouseEvent *e);
+ virtual void resizeEvent (TQResizeEvent *e);
int m_mouseButton;
@@ -157,10 +157,10 @@ class kpTransparentColorCell : public QFrame
Q_OBJECT
public:
- kpTransparentColorCell (QWidget *parent, const char *name = 0);
+ kpTransparentColorCell (TQWidget *parent, const char *name = 0);
virtual ~kpTransparentColorCell ();
- virtual QSize sizeHint () const;
+ virtual TQSize sizeHint () const;
signals:
void transparentColorSelected (int mouseButton);
@@ -170,12 +170,12 @@ signals:
void backgroundColorChanged (const kpColor &color);
protected:
- virtual void mousePressEvent (QMouseEvent *e);
- virtual void mouseReleaseEvent (QMouseEvent *e);
+ virtual void mousePressEvent (TQMouseEvent *e);
+ virtual void mouseReleaseEvent (TQMouseEvent *e);
- virtual void drawContents (QPainter *p);
+ virtual void drawContents (TQPainter *p);
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
};
@@ -184,7 +184,7 @@ class kpColorPalette : public QWidget
Q_OBJECT
public:
- kpColorPalette (QWidget *parent,
+ kpColorPalette (TQWidget *parent,
Qt::Orientation o = Qt::Horizontal,
const char *name = 0);
virtual ~kpColorPalette ();
@@ -199,7 +199,7 @@ signals:
protected:
Qt::Orientation m_orientation;
- QBoxLayout *m_boxLayout;
+ TQBoxLayout *m_boxLayout;
kpTransparentColorCell *m_transparentColorCell;
kpColorCells *m_colorCells;
};
@@ -211,7 +211,7 @@ Q_OBJECT
public:
kpColorSimilarityToolBarItem (kpMainWindow *mainWindow,
- QWidget *parent,
+ TQWidget *parent,
const char *name = 0);
virtual ~kpColorSimilarityToolBarItem ();
@@ -229,8 +229,8 @@ public:
double oldColorSimilarity () const;
private:
- virtual void mousePressEvent (QMouseEvent *e);
- virtual void mouseDoubleClickEvent (QMouseEvent *e);
+ virtual void mousePressEvent (TQMouseEvent *e);
+ virtual void mouseDoubleClickEvent (TQMouseEvent *e);
private:
kpMainWindow *m_mainWindow;
@@ -245,7 +245,7 @@ class kpColorToolBar : public KToolBar
Q_OBJECT
public:
- kpColorToolBar (const QString &label, kpMainWindow *mainWindow, const char *name = 0);
+ kpColorToolBar (const TQString &label, kpMainWindow *mainWindow, const char *name = 0);
virtual ~kpColorToolBar ();
kpColor color (int which) const;
@@ -288,7 +288,7 @@ private:
bool m_lastDockedOrientationSet;
virtual void setOrientation (Qt::Orientation o);
- QBoxLayout *m_boxLayout;
+ TQBoxLayout *m_boxLayout;
kpDualColorButton *m_dualColorButton;
kpColorPalette *m_colorPalette;
kpColorSimilarityToolBarItem *m_colorSimilarityToolBarItem;
diff --git a/kolourpaint/widgets/kpresizesignallinglabel.cpp b/kolourpaint/widgets/kpresizesignallinglabel.cpp
index 77d0ad2b..cb5a2311 100644
--- a/kolourpaint/widgets/kpresizesignallinglabel.cpp
+++ b/kolourpaint/widgets/kpresizesignallinglabel.cpp
@@ -33,16 +33,16 @@
#include <kdebug.h>
-kpResizeSignallingLabel::kpResizeSignallingLabel (const QString &string,
- QWidget *parent,
+kpResizeSignallingLabel::kpResizeSignallingLabel (const TQString &string,
+ TQWidget *parent,
const char *name)
- : QLabel (string, parent, name)
+ : TQLabel (string, parent, name)
{
}
-kpResizeSignallingLabel::kpResizeSignallingLabel (QWidget *parent,
+kpResizeSignallingLabel::kpResizeSignallingLabel (TQWidget *parent,
const char *name)
- : QLabel (parent, name)
+ : TQLabel (parent, name)
{
}
@@ -52,13 +52,13 @@ kpResizeSignallingLabel::~kpResizeSignallingLabel ()
// protected virtual [base QLabel]
-void kpResizeSignallingLabel::resizeEvent (QResizeEvent *e)
+void kpResizeSignallingLabel::resizeEvent (TQResizeEvent *e)
{
#if DEBUG_KP_RESIZE_SIGNALLING_LABEL
kdDebug () << "kpResizeSignallingLabel::resizeEvent() newSize=" << e->size ()
<< " oldSize=" << e->oldSize () << endl;
#endif
- QLabel::resizeEvent (e);
+ TQLabel::resizeEvent (e);
emit resized ();
}
diff --git a/kolourpaint/widgets/kpresizesignallinglabel.h b/kolourpaint/widgets/kpresizesignallinglabel.h
index 6cd3beba..5a53dcf2 100644
--- a/kolourpaint/widgets/kpresizesignallinglabel.h
+++ b/kolourpaint/widgets/kpresizesignallinglabel.h
@@ -29,7 +29,7 @@
#define KP_RESIZE_SIGNALLING_LABEL
-#include <qlabel.h>
+#include <tqlabel.h>
class kpResizeSignallingLabel : public QLabel
@@ -37,15 +37,15 @@ class kpResizeSignallingLabel : public QLabel
Q_OBJECT
public:
- kpResizeSignallingLabel (const QString &string, QWidget *parent, const char *name = 0);
- kpResizeSignallingLabel (QWidget *parent, const char *name = 0);
+ kpResizeSignallingLabel (const TQString &string, TQWidget *parent, const char *name = 0);
+ kpResizeSignallingLabel (TQWidget *parent, const char *name = 0);
virtual ~kpResizeSignallingLabel ();
signals:
void resized ();
protected:
- virtual void resizeEvent (QResizeEvent *e);
+ virtual void resizeEvent (TQResizeEvent *e);
};
diff --git a/kolourpaint/widgets/kpsqueezedtextlabel.cpp b/kolourpaint/widgets/kpsqueezedtextlabel.cpp
index 53fd85c9..613c93a9 100644
--- a/kolourpaint/widgets/kpsqueezedtextlabel.cpp
+++ b/kolourpaint/widgets/kpsqueezedtextlabel.cpp
@@ -30,22 +30,22 @@
#include <kpsqueezedtextlabel.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qstring.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <klocale.h>
-kpSqueezedTextLabel::kpSqueezedTextLabel (QWidget *parent, const char *name)
- : QLabel (parent, name),
+kpSqueezedTextLabel::kpSqueezedTextLabel (TQWidget *parent, const char *name)
+ : TQLabel (parent, name),
m_showEllipsis (true)
{
}
-kpSqueezedTextLabel::kpSqueezedTextLabel (const QString &text, QWidget *parent, const char *name)
- : QLabel (parent, name),
+kpSqueezedTextLabel::kpSqueezedTextLabel (const TQString &text, TQWidget *parent, const char *name)
+ : TQLabel (parent, name),
m_showEllipsis (true)
{
setText (text);
@@ -53,18 +53,18 @@ kpSqueezedTextLabel::kpSqueezedTextLabel (const QString &text, QWidget *parent,
// public virtual
-QSize kpSqueezedTextLabel::minimumSizeHint () const
+TQSize kpSqueezedTextLabel::minimumSizeHint () const
{
#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
kdDebug () << "kpSqueezedTextLabel::minimumSizeHint() qLabel prefers"
- << QLabel::minimumSizeHint () << endl;
+ << TQLabel::minimumSizeHint () << endl;
#endif
- return QSize (-1/*no minimum width*/, QLabel::minimumHeight ());
+ return TQSize (-1/*no minimum width*/, TQLabel::minimumHeight ());
}
// public
-QString kpSqueezedTextLabel::fullText () const
+TQString kpSqueezedTextLabel::fullText () const
{
return m_fullText;
}
@@ -89,7 +89,7 @@ void kpSqueezedTextLabel::setShowEllipsis (bool yes)
// public slots virtual [base QLabel]
-void kpSqueezedTextLabel::setText (const QString &text)
+void kpSqueezedTextLabel::setText (const TQString &text)
{
m_fullText = text;
squeezeText ();
@@ -97,7 +97,7 @@ void kpSqueezedTextLabel::setText (const QString &text)
// protected virtual [base QWidget]
-void kpSqueezedTextLabel::resizeEvent (QResizeEvent *e)
+void kpSqueezedTextLabel::resizeEvent (TQResizeEvent *e)
{
#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
kdDebug () << "kpSqueezedTextLabeL::resizeEvent() size=" << e->size ()
@@ -109,9 +109,9 @@ void kpSqueezedTextLabel::resizeEvent (QResizeEvent *e)
// protected
-QString kpSqueezedTextLabel::ellipsisText () const
+TQString kpSqueezedTextLabel::ellipsisText () const
{
- return m_showEllipsis ? i18n ("...") : QString::null;
+ return m_showEllipsis ? i18n ("...") : TQString::null;
}
// protected
@@ -121,7 +121,7 @@ void kpSqueezedTextLabel::squeezeText ()
kdDebug () << "kpSqueezedTextLabeL::squeezeText" << endl;
#endif
- QFontMetrics fontMetrics (font ());
+ TQFontMetrics fontMetrics (font ());
int fullTextWidth = fontMetrics.width (m_fullText);
#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
kdDebug () << "\tfullText=" << m_fullText
@@ -135,7 +135,7 @@ void kpSqueezedTextLabel::squeezeText ()
#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
kdDebug () << "\tfullText will fit - display" << endl;
#endif
- QLabel::setText (m_fullText);
+ TQLabel::setText (m_fullText);
}
else
{
@@ -151,7 +151,7 @@ void kpSqueezedTextLabel::squeezeText ()
#if DEBUG_KP_SQUEEZED_TEXT_LABEL && 1
kdDebug () << "\t\t\tcan't even fit \"...\" - forget it" << endl;
#endif
- QLabel::setText (QString::null);
+ TQLabel::setText (TQString::null);
return;
}
@@ -208,7 +208,7 @@ void kpSqueezedTextLabel::squeezeText ()
}
}
- QLabel::setText (m_fullText.left (numLettersToUse) + ellipsisText ());
+ TQLabel::setText (m_fullText.left (numLettersToUse) + ellipsisText ());
}
}
diff --git a/kolourpaint/widgets/kpsqueezedtextlabel.h b/kolourpaint/widgets/kpsqueezedtextlabel.h
index 57aa7b2f..f4bd320d 100644
--- a/kolourpaint/widgets/kpsqueezedtextlabel.h
+++ b/kolourpaint/widgets/kpsqueezedtextlabel.h
@@ -28,8 +28,8 @@
#ifndef __kp_squeezed_text_label_h__
#define __kp_squeezed_text_label_h__
-#include <qlabel.h>
-#include <qstring.h>
+#include <tqlabel.h>
+#include <tqstring.h>
// KSqueezedTextLabel done properly - squeeze at the end of the string,
@@ -39,26 +39,26 @@ class kpSqueezedTextLabel : public QLabel
Q_OBJECT
public:
- kpSqueezedTextLabel (QWidget *parent, const char *name = 0);
- kpSqueezedTextLabel (const QString &text, QWidget *parent, const char *name = 0);
+ kpSqueezedTextLabel (TQWidget *parent, const char *name = 0);
+ kpSqueezedTextLabel (const TQString &text, TQWidget *parent, const char *name = 0);
- virtual QSize minimumSizeHint () const;
+ virtual TQSize minimumSizeHint () const;
// TODO: maybe text() should return the full text?
- QString fullText () const;
+ TQString fullText () const;
bool showEllipsis () const;
void setShowEllipsis (bool yes = true);
public slots:
- virtual void setText (const QString &text);
+ virtual void setText (const TQString &text);
protected:
- virtual void resizeEvent (QResizeEvent *);
- QString ellipsisText () const;
+ virtual void resizeEvent (TQResizeEvent *);
+ TQString ellipsisText () const;
void squeezeText ();
- QString m_fullText;
+ TQString m_fullText;
bool m_showEllipsis;
};
diff --git a/kolourpaint/widgets/kptooltoolbar.cpp b/kolourpaint/widgets/kptooltoolbar.cpp
index b8d1985c..26c610e9 100644
--- a/kolourpaint/widgets/kptooltoolbar.cpp
+++ b/kolourpaint/widgets/kptooltoolbar.cpp
@@ -31,13 +31,13 @@
#include <kptooltoolbar.h>
-#include <qbuttongroup.h>
-#include <qlayout.h>
-#include <qdatetime.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qwidget.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqlayout.h>
+#include <tqdatetime.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
+#include <tqwidget.h>
+#include <tqwhatsthis.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -58,8 +58,8 @@
class kpToolButton : public QToolButton
{
public:
- kpToolButton (kpTool *tool, QWidget *parent)
- : QToolButton (parent),
+ kpToolButton (kpTool *tool, TQWidget *parent)
+ : TQToolButton (parent),
m_tool (tool)
{
}
@@ -70,7 +70,7 @@ public:
protected:
// virtual [base QWidget]
- void mouseDoubleClickEvent (QMouseEvent *e)
+ void mouseDoubleClickEvent (TQMouseEvent *e)
{
if (e->button () == Qt::LeftButton && m_tool)
m_tool->globalDraw ();
@@ -80,8 +80,8 @@ protected:
};
-kpToolToolBar::kpToolToolBar (const QString &label, kpMainWindow *mainWindow, int colsOrRows, const char *name)
- : KToolBar ((QWidget *) mainWindow, name, false/*don't use global toolBar settings*/, true/*readConfig*/),
+kpToolToolBar::kpToolToolBar (const TQString &label, kpMainWindow *mainWindow, int colsOrRows, const char *name)
+ : KToolBar ((TQWidget *) mainWindow, name, false/*don't use global toolBar settings*/, true/*readConfig*/),
m_vertCols (colsOrRows),
m_buttonGroup (0),
m_baseWidget (0),
@@ -102,10 +102,10 @@ kpToolToolBar::kpToolToolBar (const QString &label, kpMainWindow *mainWindow, in
//setVerticallyStretchable (false);
- m_baseWidget = new QWidget (this);
+ m_baseWidget = new TQWidget (this);
#if DEBUG_KP_TOOL_TOOL_BAR
- QTime timer;
+ TQTime timer;
timer.start ();
#endif
@@ -127,12 +127,12 @@ kpToolToolBar::kpToolToolBar (const QString &label, kpMainWindow *mainWindow, in
<< timer.restart () << endl;
#endif
- for (QValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
+ for (TQValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
it != m_toolWidgets.end ();
it++)
{
- connect (*it, SIGNAL (optionSelected (int, int)),
- this, SIGNAL (toolWidgetOptionSelected ()));
+ connect (*it, TQT_SIGNAL (optionSelected (int, int)),
+ this, TQT_SIGNAL (toolWidgetOptionSelected ()));
}
#if DEBUG_KP_TOOL_TOOL_BAR
@@ -148,10 +148,10 @@ kpToolToolBar::kpToolToolBar (const QString &label, kpMainWindow *mainWindow, in
<< timer.elapsed () << endl;
#endif
- m_buttonGroup = new QButtonGroup (); // invisible
+ m_buttonGroup = new TQButtonGroup (); // invisible
m_buttonGroup->setExclusive (true);
- connect (m_buttonGroup, SIGNAL (clicked (int)), SLOT (slotToolButtonClicked ()));
+ connect (m_buttonGroup, TQT_SIGNAL (clicked (int)), TQT_SLOT (slotToolButtonClicked ()));
hideAllToolWidgets ();
}
@@ -200,7 +200,7 @@ int kpToolToolBar::defaultIconSize ()
if (m_defaultIconSize <= 0)
{
// Adapt according to screen geometry
- const QRect desktopSize = KGlobalSettings::desktopGeometry (this);
+ const TQRect desktopSize = KGlobalSettings::desktopGeometry (this);
#if DEBUG_KP_TOOL_TOOL_BAR
kdDebug () << "\tadapting to screen size=" << desktopSize << endl;
#endif
@@ -221,7 +221,7 @@ int kpToolToolBar::defaultIconSize ()
// public
void kpToolToolBar::registerTool (kpTool *tool)
{
- for (QValueVector <kpButtonToolPair>::const_iterator it = m_buttonToolPairs.begin ();
+ for (TQValueVector <kpButtonToolPair>::const_iterator it = m_buttonToolPairs.begin ();
it != m_buttonToolPairs.end ();
it++)
{
@@ -230,7 +230,7 @@ void kpToolToolBar::registerTool (kpTool *tool)
}
int num = m_buttonToolPairs.count ();
- QToolButton *b = new kpToolButton (tool, m_baseWidget);
+ TQToolButton *b = new kpToolButton (tool, m_baseWidget);
b->setAutoRaise (true);
b->setUsesBigPixmap (false);
b->setUsesTextLabel (false);
@@ -238,8 +238,8 @@ void kpToolToolBar::registerTool (kpTool *tool)
b->setText (tool->text ());
b->setIconSet (tool->iconSet (defaultIconSize ()));
- QToolTip::add (b, tool->toolTip ());
- QWhatsThis::add (b, tool->description ());
+ TQToolTip::add (b, tool->toolTip ());
+ TQWhatsThis::add (b, tool->description ());
m_buttonGroup->insert (b);
addButton (b, orientation (), num);
@@ -247,16 +247,16 @@ void kpToolToolBar::registerTool (kpTool *tool)
m_buttonToolPairs.append (kpButtonToolPair (b, tool));
- connect (tool, SIGNAL (actionActivated ()),
- this, SLOT (slotToolActionActivated ()));
- connect (tool, SIGNAL (actionToolTipChanged (const QString &)),
- this, SLOT (slotToolActionToolTipChanged ()));
+ connect (tool, TQT_SIGNAL (actionActivated ()),
+ this, TQT_SLOT (slotToolActionActivated ()));
+ connect (tool, TQT_SIGNAL (actionToolTipChanged (const TQString &)),
+ this, TQT_SLOT (slotToolActionToolTipChanged ()));
}
// public
void kpToolToolBar::unregisterTool (kpTool *tool)
{
- for (QValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
+ for (TQValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
it != m_buttonToolPairs.end ();
it++)
{
@@ -265,10 +265,10 @@ void kpToolToolBar::unregisterTool (kpTool *tool)
delete ((*it).m_button);
m_buttonToolPairs.erase (it);
- disconnect (tool, SIGNAL (actionActivated ()),
- this, SLOT (slotToolActionActivated ()));
- disconnect (tool, SIGNAL (actionToolTipChanged (const QString &)),
- this, SLOT (slotToolActionToolTipChanged ()));
+ disconnect (tool, TQT_SIGNAL (actionActivated ()),
+ this, TQT_SLOT (slotToolActionActivated ()));
+ disconnect (tool, TQT_SIGNAL (actionToolTipChanged (const TQString &)),
+ this, TQT_SLOT (slotToolActionToolTipChanged ()));
break;
}
}
@@ -277,7 +277,7 @@ void kpToolToolBar::unregisterTool (kpTool *tool)
// public
void kpToolToolBar::unregisterAllTools ()
{
- for (QValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
+ for (TQValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
it != m_buttonToolPairs.end ();
it++)
{
@@ -308,7 +308,7 @@ void kpToolToolBar::selectTool (const kpTool *tool, bool reselectIfSameTool)
if (tool)
{
- for (QValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
+ for (TQValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
it != m_buttonToolPairs.end ();
it++)
{
@@ -322,7 +322,7 @@ void kpToolToolBar::selectTool (const kpTool *tool, bool reselectIfSameTool)
}
else
{
- QButton *b = m_buttonGroup->selected ();
+ TQButton *b = m_buttonGroup->selected ();
#if DEBUG_KP_TOOL_TOOL_BAR
kdDebug () << "\twant to select no tool - button selected=" << b << endl;
#endif
@@ -351,7 +351,7 @@ void kpToolToolBar::selectPreviousTool ()
// public
void kpToolToolBar::hideAllToolWidgets ()
{
- for (QValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
+ for (TQValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
it != m_toolWidgets.end ();
it++)
{
@@ -368,7 +368,7 @@ int kpToolToolBar::numShownToolWidgets () const
int ret = 0;
- for (QValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
+ for (TQValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
it != m_toolWidgets.end ();
it++)
{
@@ -389,7 +389,7 @@ kpToolWidgetBase *kpToolToolBar::shownToolWidget (int which) const
{
int uptoVisibleWidget = 0;
- for (QValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
+ for (TQValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
it != m_toolWidgets.end ();
it++)
{
@@ -409,7 +409,7 @@ kpToolWidgetBase *kpToolToolBar::shownToolWidget (int which) const
// public
bool kpToolToolBar::toolsSingleKeyTriggersEnabled () const
{
- for (QValueVector <kpButtonToolPair>::const_iterator it = m_buttonToolPairs.begin ();
+ for (TQValueVector <kpButtonToolPair>::const_iterator it = m_buttonToolPairs.begin ();
it != m_buttonToolPairs.end ();
it++)
{
@@ -427,7 +427,7 @@ void kpToolToolBar::enableToolsSingleKeyTriggers (bool enable)
kdDebug () << "kpToolToolBar::enableToolsSingleKeyTriggers(" << enable << ")" << endl;
#endif
- for (QValueVector <kpButtonToolPair>::const_iterator it = m_buttonToolPairs.begin ();
+ for (TQValueVector <kpButtonToolPair>::const_iterator it = m_buttonToolPairs.begin ();
it != m_buttonToolPairs.end ();
it++)
{
@@ -439,14 +439,14 @@ void kpToolToolBar::enableToolsSingleKeyTriggers (bool enable)
// private slot
void kpToolToolBar::slotToolButtonClicked ()
{
- QButton *b = m_buttonGroup->selected ();
+ TQButton *b = m_buttonGroup->selected ();
#if DEBUG_KP_TOOL_TOOL_BAR
kdDebug () << "kpToolToolBar::slotToolButtonClicked() button=" << b << endl;
#endif
kpTool *tool = 0;
- for (QValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
+ for (TQValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
it != m_buttonToolPairs.end ();
it++)
{
@@ -534,13 +534,13 @@ void kpToolToolBar::slotToolActionToolTipChanged ()
if (!tool)
return;
- for (QValueVector <kpButtonToolPair>::const_iterator it = m_buttonToolPairs.begin ();
+ for (TQValueVector <kpButtonToolPair>::const_iterator it = m_buttonToolPairs.begin ();
it != m_buttonToolPairs.end ();
it++)
{
if (tool == (*it).m_tool)
{
- QToolTip::add ((*it).m_button, tool->toolTip ());
+ TQToolTip::add ((*it).m_button, tool->toolTip ());
return;
}
}
@@ -556,8 +556,8 @@ void kpToolToolBar::setOrientation (Qt::Orientation o)
<< ") called!" << endl;
#endif
- // (QDockWindow::undock() calls us)
- bool isOutsideDock = (place () == QDockWindow::OutsideDock);
+ // (TQDockWindow::undock() calls us)
+ bool isOutsideDock = (place () == TQDockWindow::OutsideDock);
if (!m_lastDockedOrientationSet || !isOutsideDock)
{
@@ -577,10 +577,10 @@ void kpToolToolBar::setOrientation (Qt::Orientation o)
delete m_baseLayout;
if (o == Qt::Vertical)
{
- m_baseLayout = new QBoxLayout (m_baseWidget, QBoxLayout::TopToBottom,
+ m_baseLayout = new TQBoxLayout (m_baseWidget, TQBoxLayout::TopToBottom,
5/*margin*/,
10/*spacing*/);
- m_toolLayout = new QGridLayout (m_baseLayout,
+ m_toolLayout = new TQGridLayout (m_baseLayout,
5/*arbitrary rows since toolBar auto-expands*/,
m_vertCols,
0/*margin*/,
@@ -588,10 +588,10 @@ void kpToolToolBar::setOrientation (Qt::Orientation o)
}
else // if (o == Qt::Horizontal)
{
- m_baseLayout = new QBoxLayout (m_baseWidget, QBoxLayout::LeftToRight,
+ m_baseLayout = new TQBoxLayout (m_baseWidget, TQBoxLayout::LeftToRight,
5/*margin*/,
10/*spacing*/);
- m_toolLayout = new QGridLayout (m_baseLayout,
+ m_toolLayout = new TQGridLayout (m_baseLayout,
m_vertCols/*rows in this case, since horiz*/,
5/*arbitrary cols since toolBar auto-expands*/,
0/*margin*/,
@@ -600,7 +600,7 @@ void kpToolToolBar::setOrientation (Qt::Orientation o)
int num = 0;
- for (QValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
+ for (TQValueVector <kpButtonToolPair>::iterator it = m_buttonToolPairs.begin ();
it != m_buttonToolPairs.end ();
it++)
{
@@ -608,7 +608,7 @@ void kpToolToolBar::setOrientation (Qt::Orientation o)
num++;
}
- for (QValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
+ for (TQValueVector <kpToolWidgetBase *>::const_iterator it = m_toolWidgets.begin ();
it != m_toolWidgets.end ();
it++)
{
@@ -624,7 +624,7 @@ void kpToolToolBar::setOrientation (Qt::Orientation o)
}
// private
-void kpToolToolBar::addButton (QButton *button, Qt::Orientation o, int num)
+void kpToolToolBar::addButton (TQButton *button, Qt::Orientation o, int num)
{
if (o == Qt::Vertical)
m_toolLayout->addWidget (button, num / m_vertCols, num % m_vertCols);
diff --git a/kolourpaint/widgets/kptooltoolbar.h b/kolourpaint/widgets/kptooltoolbar.h
index c3a7d1b7..417ae022 100644
--- a/kolourpaint/widgets/kptooltoolbar.h
+++ b/kolourpaint/widgets/kptooltoolbar.h
@@ -29,16 +29,16 @@
#ifndef __kp_tool_tool_bar_h__
#define __kp_tool_tool_bar_h__
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#include <ktoolbar.h>
-class QBoxLayout;
-class QButton;
-class QButtonGroup;
-class QWidget;
-class QGridLayout;
+class TQBoxLayout;
+class TQButton;
+class TQButtonGroup;
+class TQWidget;
+class TQGridLayout;
class kpMainWindow;
class kpTool;
@@ -56,7 +56,7 @@ class kpToolToolBar : public KToolBar
Q_OBJECT
public:
- kpToolToolBar (const QString &label, kpMainWindow *mainWindow, int colsOrRows = 2, const char *name = 0);
+ kpToolToolBar (const TQString &label, kpMainWindow *mainWindow, int colsOrRows = 2, const char *name = 0);
virtual ~kpToolToolBar ();
private:
@@ -102,16 +102,16 @@ public slots:
virtual void setOrientation (Qt::Orientation o);
private:
- void addButton (QButton *button, Qt::Orientation o, int num);
+ void addButton (TQButton *button, Qt::Orientation o, int num);
Qt::Orientation m_lastDockedOrientation;
bool m_lastDockedOrientationSet;
int m_vertCols;
- QButtonGroup *m_buttonGroup;
- QWidget *m_baseWidget;
- QBoxLayout *m_baseLayout;
- QGridLayout *m_toolLayout;
+ TQButtonGroup *m_buttonGroup;
+ TQWidget *m_baseWidget;
+ TQBoxLayout *m_baseLayout;
+ TQGridLayout *m_toolLayout;
kpToolWidgetBrush *m_toolWidgetBrush;
kpToolWidgetEraserSize *m_toolWidgetEraserSize;
@@ -120,12 +120,12 @@ private:
kpToolWidgetOpaqueOrTransparent *m_toolWidgetOpaqueOrTransparent;
kpToolWidgetSpraycanSize *m_toolWidgetSpraycanSize;
- QValueVector <kpToolWidgetBase *> m_toolWidgets;
+ TQValueVector <kpToolWidgetBase *> m_toolWidgets;
private:
struct kpButtonToolPair
{
- kpButtonToolPair (QButton *button, kpTool *tool)
+ kpButtonToolPair (TQButton *button, kpTool *tool)
: m_button (button), m_tool (tool)
{
}
@@ -135,11 +135,11 @@ private:
{
}
- QButton *m_button;
+ TQButton *m_button;
kpTool *m_tool;
};
- QValueVector <kpButtonToolPair> m_buttonToolPairs;
+ TQValueVector <kpButtonToolPair> m_buttonToolPairs;
kpTool *m_previousTool, *m_currentTool;
diff --git a/kolourpaint/widgets/kptoolwidgetbase.cpp b/kolourpaint/widgets/kptoolwidgetbase.cpp
index a0042dbc..0d0a9245 100644
--- a/kolourpaint/widgets/kptoolwidgetbase.cpp
+++ b/kolourpaint/widgets/kptoolwidgetbase.cpp
@@ -31,11 +31,11 @@
#include <kptoolwidgetbase.h>
-#include <qbitmap.h>
-#include <qcolor.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qtooltip.h>
+#include <tqbitmap.h>
+#include <tqcolor.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -45,15 +45,15 @@
#include <kpeffectinvert.h>
-kpToolWidgetBase::kpToolWidgetBase (QWidget *parent, const char *name)
- : QFrame (parent, name),
+kpToolWidgetBase::kpToolWidgetBase (TQWidget *parent, const char *name)
+ : TQFrame (parent, name),
m_invertSelectedPixmap (true),
m_selectedRow (-1), m_selectedCol (-1)
{
if (!name)
kdError () << "kpToolWidgetBase::kpToolWidgetBase() without name" << endl;
- setFrameStyle (QFrame::Panel | QFrame::Sunken);
+ setFrameStyle (TQFrame::Panel | TQFrame::Sunken);
setFixedSize (44, 66);
}
@@ -63,13 +63,13 @@ kpToolWidgetBase::~kpToolWidgetBase ()
// public
-void kpToolWidgetBase::addOption (const QPixmap &pixmap, const QString &toolTip)
+void kpToolWidgetBase::addOption (const TQPixmap &pixmap, const TQString &toolTip)
{
if (m_pixmaps.isEmpty ())
startNewOptionRow ();
m_pixmaps.last ().append (pixmap);
- m_pixmapRects.last ().append (QRect ());
+ m_pixmapRects.last ().append (TQRect ());
m_toolTips.last ().append (toolTip);
}
@@ -110,14 +110,14 @@ void kpToolWidgetBase::finishConstruction (int fallBackRow, int fallBackCol)
// private
-QValueVector <int> kpToolWidgetBase::spreadOutElements (const QValueVector <int> &sizes, int max)
+TQValueVector <int> kpToolWidgetBase::spreadOutElements (const TQValueVector <int> &sizes, int max)
{
if (sizes.count () == 0)
- return QValueVector <int> ();
+ return TQValueVector <int> ();
else if (sizes.count () == 1)
- return QValueVector <int> (1, sizes.first () > max ? 0 : 1/*margin*/);
+ return TQValueVector <int> (1, sizes.first () > max ? 0 : 1/*margin*/);
- QValueVector <int> retOffsets (sizes.count ());
+ TQValueVector <int> retOffsets (sizes.count ());
int totalSize = 0;
for (int i = 0; i < (int) sizes.count (); i++)
@@ -175,10 +175,10 @@ QPair <int, int> kpToolWidgetBase::defaultSelectedRowAndCol () const
KConfigGroupSaver cfgGroupSaver (kapp->config (), kpSettingsGroupTools);
KConfigBase *cfg = cfgGroupSaver.config ();
- QString nameString = QString::fromLatin1 (name ());
+ TQString nameString = TQString::fromLatin1 (name ());
- row = cfg->readNumEntry (nameString + QString::fromLatin1 (" Row"), -1);
- col = cfg->readNumEntry (nameString + QString::fromLatin1 (" Col"), -1);
+ row = cfg->readNumEntry (nameString + TQString::fromLatin1 (" Row"), -1);
+ col = cfg->readNumEntry (nameString + TQString::fromLatin1 (" Col"), -1);
}
#if DEBUG_KP_TOOL_WIDGET_BASE
@@ -218,9 +218,9 @@ void kpToolWidgetBase::saveSelectedAsDefault () const
KConfigGroupSaver cfgGroupSaver (kapp->config (), kpSettingsGroupTools);
KConfigBase *cfg = cfgGroupSaver.config ();
- QString nameString = QString::fromLatin1 (name ());
- cfg->writeEntry (nameString + QString::fromLatin1 (" Row"), m_selectedRow);
- cfg->writeEntry (nameString + QString::fromLatin1 (" Col"), m_selectedCol);
+ TQString nameString = TQString::fromLatin1 (name ());
+ cfg->writeEntry (nameString + TQString::fromLatin1 (" Row"), m_selectedRow);
+ cfg->writeEntry (nameString + TQString::fromLatin1 (" Col"), m_selectedCol);
cfg->sync ();
}
@@ -250,7 +250,7 @@ void kpToolWidgetBase::relayoutOptions ()
kdDebug () << "\tfinding heights of rows:" << endl;
#endif
- QValueVector <int> maxHeightOfRow (m_pixmaps.count ());
+ TQValueVector <int> maxHeightOfRow (m_pixmaps.count ());
for (int r = 0; r < (int) m_pixmaps.count (); r++)
{
@@ -264,7 +264,7 @@ void kpToolWidgetBase::relayoutOptions ()
#endif
}
- QValueVector <int> rowYOffset = spreadOutElements (maxHeightOfRow, height ());
+ TQValueVector <int> rowYOffset = spreadOutElements (maxHeightOfRow, height ());
#if DEBUG_KP_TOOL_WIDGET_BASE
kdDebug () << "\tspread out offsets of rows:" << endl;
for (int r = 0; r < (int) rowYOffset.count (); r++)
@@ -277,7 +277,7 @@ void kpToolWidgetBase::relayoutOptions ()
kdDebug () << "\tlaying out row " << r << ":" << endl;
#endif
- QValueVector <int> widths (m_pixmaps [r].count ());
+ TQValueVector <int> widths (m_pixmaps [r].count ());
for (int c = 0; c < (int) m_pixmaps [r].count (); c++)
widths [c] = m_pixmaps [r][c].width ();
#if DEBUG_KP_TOOL_WIDGET_BASE
@@ -286,7 +286,7 @@ void kpToolWidgetBase::relayoutOptions ()
kdDebug () << "\t\t\t" << c << ": " << widths [c] << endl;
#endif
- QValueVector <int> colXOffset = spreadOutElements (widths, width ());
+ TQValueVector <int> colXOffset = spreadOutElements (widths, width ());
#if DEBUG_KP_TOOL_WIDGET_BASE
kdDebug () << "\t\tspread out offsets of cols:" << endl;
for (int c = 0; c < (int) colXOffset.count (); c++)
@@ -319,10 +319,10 @@ void kpToolWidgetBase::relayoutOptions ()
else
h = rowYOffset [r + 1] - y;
- m_pixmapRects [r][c] = QRect (x, y, w, h);
+ m_pixmapRects [r][c] = TQRect (x, y, w, h);
if (!m_toolTips [r][c].isEmpty ())
- QToolTip::add (this, m_pixmapRects [r][c], m_toolTips [r][c]);
+ TQToolTip::add (this, m_pixmapRects [r][c], m_toolTips [r][c]);
}
}
@@ -537,7 +537,7 @@ bool kpToolWidgetBase::selectNextOption ()
// protected virtual [base QWidget]
-void kpToolWidgetBase::mousePressEvent (QMouseEvent *e)
+void kpToolWidgetBase::mousePressEvent (TQMouseEvent *e)
{
e->ignore ();
@@ -560,7 +560,7 @@ void kpToolWidgetBase::mousePressEvent (QMouseEvent *e)
}
// protected virtual [base QFrame]
-void kpToolWidgetBase::drawContents (QPainter *painter)
+void kpToolWidgetBase::drawContents (TQPainter *painter)
{
#if DEBUG_KP_TOOL_WIDGET_BASE && 1
kdDebug () << "kpToolWidgetBase::drawContents(): rect=" << contentsRect () << endl;
@@ -574,8 +574,8 @@ void kpToolWidgetBase::drawContents (QPainter *painter)
for (int j = 0; j < (int) m_pixmaps [i].count (); j++)
{
- QRect rect = m_pixmapRects [i][j];
- QPixmap pixmap = m_pixmaps [i][j];
+ TQRect rect = m_pixmapRects [i][j];
+ TQPixmap pixmap = m_pixmaps [i][j];
#if DEBUG_KP_TOOL_WIDGET_BASE && 1
kdDebug () << "\t\tCol: " << j << " rect=" << rect << endl;
@@ -598,7 +598,7 @@ void kpToolWidgetBase::drawContents (QPainter *painter)
#endif
- painter->drawPixmap (QPoint (rect.x () + (rect.width () - pixmap.width ()) / 2,
+ painter->drawPixmap (TQPoint (rect.x () + (rect.width () - pixmap.width ()) / 2,
rect.y () + (rect.height () - pixmap.height ()) / 2),
pixmap);
}
diff --git a/kolourpaint/widgets/kptoolwidgetbase.h b/kolourpaint/widgets/kptoolwidgetbase.h
index a23f9a16..1a4c8a6f 100644
--- a/kolourpaint/widgets/kptoolwidgetbase.h
+++ b/kolourpaint/widgets/kptoolwidgetbase.h
@@ -29,15 +29,15 @@
#ifndef __kp_tool_widget_base_h__
#define __kp_tool_widget_base_h__
-#include <qframe.h>
-#include <qpair.h>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qvaluevector.h>
-#include <qwidget.h>
+#include <tqframe.h>
+#include <tqpair.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqvaluevector.h>
+#include <tqwidget.h>
-class QPainter;
+class TQPainter;
// TODO: frame becomes a combobox when its parent kpToolToolBar becomes too small
@@ -46,11 +46,11 @@ class kpToolWidgetBase : public QFrame
Q_OBJECT
public:
- kpToolWidgetBase (QWidget *parent, const char *name); // must provide a name for config to work
+ kpToolWidgetBase (TQWidget *parent, const char *name); // must provide a name for config to work
virtual ~kpToolWidgetBase ();
public:
- void addOption (const QPixmap &pixmap, const QString &toolTip = QString::null);
+ void addOption (const TQPixmap &pixmap, const TQString &toolTip = TQString::null);
void startNewOptionRow ();
// Call this at the end of your constructor.
@@ -59,7 +59,7 @@ public:
void finishConstruction (int fallBackRow, int fallBackCol);
private:
- QValueVector <int> spreadOutElements (const QValueVector <int> &sizes, int maxSize);
+ TQValueVector <int> spreadOutElements (const TQValueVector <int> &sizes, int maxSize);
public: // (only have to use these if you don't use finishConstruction())
// (rereads from config file)
@@ -92,19 +92,19 @@ signals:
void optionSelected (int row, int col);
protected:
- virtual void mousePressEvent (QMouseEvent *e);
- virtual void drawContents (QPainter *painter);
+ virtual void mousePressEvent (TQMouseEvent *e);
+ virtual void drawContents (TQPainter *painter);
void setInvertSelectedPixmap (bool yes = true) { m_invertSelectedPixmap = yes; }
bool m_invertSelectedPixmap;
- // coulbe be a QFrame or a ComboBox
- QWidget *m_baseWidget;
+ // coulbe be a TQFrame or a ComboBox
+ TQWidget *m_baseWidget;
- QValueVector < QValueVector <QPixmap> > m_pixmaps;
- QValueVector < QValueVector <QString> > m_toolTips;
+ TQValueVector < TQValueVector <TQPixmap> > m_pixmaps;
+ TQValueVector < TQValueVector <TQString> > m_toolTips;
- QValueVector < QValueVector <QRect> > m_pixmapRects;
+ TQValueVector < TQValueVector <TQRect> > m_pixmapRects;
int m_selectedRow, m_selectedCol;
};
diff --git a/kolourpaint/widgets/kptoolwidgetbrush.cpp b/kolourpaint/widgets/kptoolwidgetbrush.cpp
index 046dc8b5..1e53891e 100644
--- a/kolourpaint/widgets/kptoolwidgetbrush.cpp
+++ b/kolourpaint/widgets/kptoolwidgetbrush.cpp
@@ -31,8 +31,8 @@
#include <kptoolwidgetbrush.h>
-#include <qbitmap.h>
-#include <qpainter.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <klocale.h>
@@ -52,12 +52,12 @@ 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 (QWidget *parent, const char *name)
+kpToolWidgetBrush::kpToolWidgetBrush (TQWidget *parent, const char *name)
: kpToolWidgetBase (parent, name)
{
setInvertSelectedPixmap ();
- QPixmap *pm = m_brushBitmaps;
+ TQPixmap *pm = m_brushBitmaps;
for (int shape = 0; shape < BRUSH_SIZE_NUM_ROWS; shape++)
{
@@ -69,13 +69,13 @@ kpToolWidgetBrush::kpToolWidgetBrush (QWidget *parent, const char *name)
(h <= 0 ? height () : h));
const int s = brushSize [shape][i];
- QRect rect;
+ TQRect rect;
if (s >= pm->width () || s >= pm->height ())
- rect = QRect (0, 0, pm->width (), pm->height ());
+ rect = TQRect (0, 0, pm->width (), pm->height ());
else
{
- rect = QRect ((pm->width () - s) / 2,
+ rect = TQRect ((pm->width () - s) / 2,
(pm->height () - s) / 2,
s,
s);
@@ -87,7 +87,7 @@ kpToolWidgetBrush::kpToolWidgetBrush (QWidget *parent, const char *name)
pm->fill (Qt::white);
- QPainter painter (pm);
+ TQPainter painter (pm);
painter.setPen (Qt::black);
painter.setBrush (Qt::black);
@@ -127,14 +127,14 @@ kpToolWidgetBrush::~kpToolWidgetBrush ()
// private
-QString kpToolWidgetBrush::brushName (int shape, int whichSize)
+TQString kpToolWidgetBrush::brushName (int shape, int whichSize)
{
int s = brushSize [shape][whichSize];
if (s == 1)
return i18n ("1x1");
- QString shapeName;
+ TQString shapeName;
// sync: <brushes>
switch (shape)
@@ -156,12 +156,12 @@ QString kpToolWidgetBrush::brushName (int shape, int whichSize)
}
if (shapeName.isEmpty ())
- return QString::null;
+ return TQString::null;
return i18n ("%1x%2 %3").arg (s).arg (s).arg (shapeName);
}
-QPixmap kpToolWidgetBrush::brush () const
+TQPixmap kpToolWidgetBrush::brush () const
{
return m_brushBitmaps [selectedRow () * BRUSH_SIZE_NUM_COLS + selectedCol ()];
}
diff --git a/kolourpaint/widgets/kptoolwidgetbrush.h b/kolourpaint/widgets/kptoolwidgetbrush.h
index db222e79..563d9625 100644
--- a/kolourpaint/widgets/kptoolwidgetbrush.h
+++ b/kolourpaint/widgets/kptoolwidgetbrush.h
@@ -29,7 +29,7 @@
#ifndef __kptoolwidgetbrush_h__
#define __kptoolwidgetbrush_h__
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kptoolwidgetbase.h>
@@ -38,24 +38,24 @@ class kpToolWidgetBrush : public kpToolWidgetBase
Q_OBJECT
public:
- kpToolWidgetBrush (QWidget *parent, const char *name);
+ kpToolWidgetBrush (TQWidget *parent, const char *name);
virtual ~kpToolWidgetBrush ();
private:
- QString brushName (int shape, int whichSize);
+ TQString brushName (int shape, int whichSize);
public:
- QPixmap brush () const;
+ TQPixmap brush () const;
bool brushIsDiagonalLine () const;
signals:
- void brushChanged (const QPixmap &pixmap, bool isDiagonalLine);
+ void brushChanged (const TQPixmap &pixmap, bool isDiagonalLine);
protected slots:
virtual bool setSelected (int row, int col, bool saveAsDefault);
private:
- QPixmap m_brushBitmaps [16];
+ TQPixmap m_brushBitmaps [16];
};
#endif // __kptoolwidgetbrush_h__
diff --git a/kolourpaint/widgets/kptoolwidgeterasersize.cpp b/kolourpaint/widgets/kptoolwidgeterasersize.cpp
index cc58c0d1..9b9ffe8a 100644
--- a/kolourpaint/widgets/kptoolwidgeterasersize.cpp
+++ b/kolourpaint/widgets/kptoolwidgeterasersize.cpp
@@ -30,8 +30,8 @@
#include <kptoolwidgeterasersize.h>
-#include <qbitmap.h>
-#include <qpainter.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <klocale.h>
@@ -44,13 +44,13 @@ static int eraserSizes [] = {2, 3, 5, 9, 17, 29};
static const int numEraserSizes = int (sizeof (eraserSizes) / sizeof (eraserSizes [0]));
-kpToolWidgetEraserSize::kpToolWidgetEraserSize (QWidget *parent, const char *name)
+kpToolWidgetEraserSize::kpToolWidgetEraserSize (TQWidget *parent, const char *name)
: kpToolWidgetBase (parent, name)
{
setInvertSelectedPixmap ();
- m_cursorPixmaps = new QPixmap [numEraserSizes];
- QPixmap *cursorPixmap = m_cursorPixmaps;
+ m_cursorPixmaps = new TQPixmap [numEraserSizes];
+ TQPixmap *cursorPixmap = m_cursorPixmaps;
for (int i = 0; i < numEraserSizes; i++)
{
@@ -63,22 +63,22 @@ kpToolWidgetEraserSize::kpToolWidgetEraserSize (QWidget *parent, const char *nam
cursorPixmap->fill (Qt::black);
- QPixmap previewPixmap (s, s);
+ TQPixmap previewPixmap (s, s);
if (i < 3)
{
// HACK: kpToolWidgetBase's layout code sucks and gives uneven spacing
previewPixmap.resize ((width () - 4) / 3, 9);
}
- QPainter painter (&previewPixmap);
- QRect rect ((previewPixmap.width () - s) / 2, (previewPixmap.height () - s) / 2, s, s);
+ TQPainter painter (&previewPixmap);
+ TQRect rect ((previewPixmap.width () - s) / 2, (previewPixmap.height () - s) / 2, s, s);
painter.fillRect (rect, Qt::black);
painter.end ();
- QBitmap mask (previewPixmap.width (), previewPixmap.height ());
+ TQBitmap mask (previewPixmap.width (), previewPixmap.height ());
mask.fill (Qt::color0/*transparent*/);
- QPainter maskPainter (&mask);
+ TQPainter maskPainter (&mask);
maskPainter.fillRect (rect, Qt::color1/*opaque*/);
maskPainter.end ();
@@ -104,7 +104,7 @@ int kpToolWidgetEraserSize::eraserSize () const
return eraserSizes [selected ()];
}
-QPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const
+TQPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const
{
#if DEBUG_KP_TOOL_WIDGET_ERASER_SIZE
kdDebug () << "kpToolWidgetEraseSize::cursorPixmap() selected=" << selected ()
@@ -113,7 +113,7 @@ QPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const
#endif
// TODO: why are we even storing m_cursorPixmaps?
- QPixmap pixmap = m_cursorPixmaps [selected ()];
+ TQPixmap pixmap = m_cursorPixmaps [selected ()];
if (color.isOpaque ())
pixmap.fill (color.toQColor ());
@@ -122,7 +122,7 @@ QPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const
if (showBorder)
{
- QPainter painter (&pixmap);
+ TQPainter painter (&pixmap);
painter.setPen (Qt::black);
painter.drawRect (pixmap.rect ());
}
@@ -130,13 +130,13 @@ QPixmap kpToolWidgetEraserSize::cursorPixmap (const kpColor &color) const
if (color.isTransparent ())
{
- QBitmap maskBitmap (pixmap.width (), pixmap.height ());
+ TQBitmap maskBitmap (pixmap.width (), pixmap.height ());
maskBitmap.fill (Qt::color0/*transparent*/);
if (showBorder)
{
- QPainter maskBitmapPainter (&maskBitmap);
+ TQPainter maskBitmapPainter (&maskBitmap);
maskBitmapPainter.setPen (Qt::color1/*opaque*/);
maskBitmapPainter.drawRect (maskBitmap.rect ());
}
diff --git a/kolourpaint/widgets/kptoolwidgeterasersize.h b/kolourpaint/widgets/kptoolwidgeterasersize.h
index 71093fd6..09b8c0f8 100644
--- a/kolourpaint/widgets/kptoolwidgeterasersize.h
+++ b/kolourpaint/widgets/kptoolwidgeterasersize.h
@@ -29,7 +29,7 @@
#ifndef __kptoolwidgeterasersize_h__
#define __kptoolwidgeterasersize_h__
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kptoolwidgetbase.h>
@@ -40,11 +40,11 @@ class kpToolWidgetEraserSize : public kpToolWidgetBase
Q_OBJECT
public:
- kpToolWidgetEraserSize (QWidget *parent, const char *name);
+ kpToolWidgetEraserSize (TQWidget *parent, const char *name);
virtual ~kpToolWidgetEraserSize ();
int eraserSize () const;
- QPixmap cursorPixmap (const kpColor &color) const;
+ TQPixmap cursorPixmap (const kpColor &color) const;
signals:
void eraserSizeChanged (int size);
@@ -53,7 +53,7 @@ protected slots:
virtual bool setSelected (int row, int col, bool saveAsDefault);
private:
- QPixmap *m_cursorPixmaps;
+ TQPixmap *m_cursorPixmaps;
};
#endif // __kptoolwidgeterasersize_h__
diff --git a/kolourpaint/widgets/kptoolwidgetfillstyle.cpp b/kolourpaint/widgets/kptoolwidgetfillstyle.cpp
index 74c174ce..9b780b3f 100644
--- a/kolourpaint/widgets/kptoolwidgetfillstyle.cpp
+++ b/kolourpaint/widgets/kptoolwidgetfillstyle.cpp
@@ -30,9 +30,9 @@
#include <kptoolwidgetfillstyle.h>
-#include <qbitmap.h>
-#include <qbrush.h>
-#include <qpainter.h>
+#include <tqbitmap.h>
+#include <tqbrush.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <klocale.h>
@@ -42,14 +42,14 @@
#include <kptool.h>
-kpToolWidgetFillStyle::kpToolWidgetFillStyle (QWidget *parent, const char *name)
+kpToolWidgetFillStyle::kpToolWidgetFillStyle (TQWidget *parent, const char *name)
: kpToolWidgetBase (parent, name)
{
setInvertSelectedPixmap ();
for (int i = 0; i < (int) FillStyleNum; i++)
{
- QPixmap pixmap;
+ TQPixmap pixmap;
pixmap = fillStylePixmap ((FillStyle) i,
(width () - 2/*margin*/) * 3 / 4,
@@ -68,14 +68,14 @@ kpToolWidgetFillStyle::~kpToolWidgetFillStyle ()
// private
-QPixmap kpToolWidgetFillStyle::fillStylePixmap (FillStyle fs, int w, int h)
+TQPixmap kpToolWidgetFillStyle::fillStylePixmap (FillStyle fs, int w, int h)
{
- QPixmap pixmap ((w <= 0 ? width () : w), (h <= 0 ? height () : h));
+ TQPixmap pixmap ((w <= 0 ? width () : w), (h <= 0 ? height () : h));
pixmap.fill (Qt::white);
- QPainter painter (&pixmap);
+ TQPainter painter (&pixmap);
- painter.setPen (QPen (Qt::black, 2));
+ painter.setPen (TQPen (Qt::black, 2));
painter.setBrush (brushForFillStyle (fs,
kpColor (Qt::black.rgb ())/*foreground*/,
kpColor (Qt::gray.rgb ())/*background*/));
@@ -85,11 +85,11 @@ QPixmap kpToolWidgetFillStyle::fillStylePixmap (FillStyle fs, int w, int h)
painter.end ();
- QBitmap mask (pixmap.width (), pixmap.height ());
+ TQBitmap mask (pixmap.width (), pixmap.height ());
mask.fill (Qt::color0);
painter.begin (&mask);
- painter.setPen (QPen (Qt::color1, 2));
+ painter.setPen (TQPen (Qt::color1, 2));
if (fs == FillWithBackground || fs == FillWithForeground)
painter.setBrush (Qt::color1);
@@ -104,7 +104,7 @@ QPixmap kpToolWidgetFillStyle::fillStylePixmap (FillStyle fs, int w, int h)
}
// private
-QString kpToolWidgetFillStyle::fillStyleName (FillStyle fs) const
+TQString kpToolWidgetFillStyle::fillStyleName (FillStyle fs) const
{
// do not complain about the "useless" breaks
// as the return statements might not be return statements one day
@@ -121,7 +121,7 @@ QString kpToolWidgetFillStyle::fillStyleName (FillStyle fs) const
return i18n ("Fill with Foreground Color");
break;
default:
- return QString::null;
+ return TQString::null;
break;
}
}
@@ -139,7 +139,7 @@ kpToolWidgetFillStyle::FillStyle kpToolWidgetFillStyle::fillStyle () const
}
// public static
-QBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs,
+TQBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs,
const kpColor &foregroundColor,
const kpColor &backgroundColor)
{
@@ -152,10 +152,10 @@ QBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs,
return Qt::NoBrush;
break;
case FillWithBackground:
- return QBrush (backgroundColor.maskColor ());
+ return TQBrush (backgroundColor.maskColor ());
break;
case FillWithForeground:
- return QBrush (foregroundColor.maskColor ());
+ return TQBrush (foregroundColor.maskColor ());
break;
default:
return Qt::NoBrush;
@@ -163,14 +163,14 @@ QBrush kpToolWidgetFillStyle::maskBrushForFillStyle (FillStyle fs,
}
}
-QBrush kpToolWidgetFillStyle::maskBrush (const kpColor &foregroundColor,
+TQBrush kpToolWidgetFillStyle::maskBrush (const kpColor &foregroundColor,
const kpColor &backgroundColor)
{
return maskBrushForFillStyle (fillStyle (), foregroundColor, backgroundColor);
}
// public static
-QBrush kpToolWidgetFillStyle::brushForFillStyle (FillStyle fs,
+TQBrush kpToolWidgetFillStyle::brushForFillStyle (FillStyle fs,
const kpColor &foregroundColor,
const kpColor &backgroundColor)
{
@@ -186,13 +186,13 @@ QBrush kpToolWidgetFillStyle::brushForFillStyle (FillStyle fs,
break;
case FillWithBackground:
if (backgroundColor.isOpaque ())
- return QBrush (backgroundColor.toQColor ());
+ return TQBrush (backgroundColor.toQColor ());
else
return Qt::NoBrush;
break;
case FillWithForeground:
if (foregroundColor.isOpaque ())
- return QBrush (foregroundColor.toQColor ());
+ return TQBrush (foregroundColor.toQColor ());
else
return Qt::NoBrush;
break;
@@ -203,7 +203,7 @@ QBrush kpToolWidgetFillStyle::brushForFillStyle (FillStyle fs,
}
// public
-QBrush kpToolWidgetFillStyle::brush (const kpColor &foregroundColor,
+TQBrush kpToolWidgetFillStyle::brush (const kpColor &foregroundColor,
const kpColor &backgroundColor)
{
return brushForFillStyle (fillStyle (), foregroundColor, backgroundColor);
diff --git a/kolourpaint/widgets/kptoolwidgetfillstyle.h b/kolourpaint/widgets/kptoolwidgetfillstyle.h
index 219d47f2..86a47270 100644
--- a/kolourpaint/widgets/kptoolwidgetfillstyle.h
+++ b/kolourpaint/widgets/kptoolwidgetfillstyle.h
@@ -31,7 +31,7 @@
#include <kptoolwidgetbase.h>
-class QBrush;
+class TQBrush;
class kpColor;
@@ -40,7 +40,7 @@ class kpToolWidgetFillStyle : public kpToolWidgetBase
Q_OBJECT
public:
- kpToolWidgetFillStyle (QWidget *parent, const char *name);
+ kpToolWidgetFillStyle (TQWidget *parent, const char *name);
virtual ~kpToolWidgetFillStyle ();
enum FillStyle
@@ -52,22 +52,22 @@ public:
};
private:
- QPixmap fillStylePixmap (FillStyle fs, int width, int height);
- QString fillStyleName (FillStyle fs) const;
+ TQPixmap fillStylePixmap (FillStyle fs, int width, int height);
+ TQString fillStyleName (FillStyle fs) const;
public:
FillStyle fillStyle () const;
- static QBrush maskBrushForFillStyle (FillStyle fs,
+ static TQBrush maskBrushForFillStyle (FillStyle fs,
const kpColor &foregroundColor,
const kpColor &backgroundColor);
- QBrush maskBrush (const kpColor &foregroundColor,
+ TQBrush maskBrush (const kpColor &foregroundColor,
const kpColor &backgroundColor);
- static QBrush brushForFillStyle (FillStyle fs,
+ static TQBrush brushForFillStyle (FillStyle fs,
const kpColor &foregroundColor,
const kpColor &backgroundColor);
- QBrush brush (const kpColor &foregroundColor,
+ TQBrush brush (const kpColor &foregroundColor,
const kpColor &backgroundColor);
signals:
diff --git a/kolourpaint/widgets/kptoolwidgetlinewidth.cpp b/kolourpaint/widgets/kptoolwidgetlinewidth.cpp
index 27e34ecb..ded51a03 100644
--- a/kolourpaint/widgets/kptoolwidgetlinewidth.cpp
+++ b/kolourpaint/widgets/kptoolwidgetlinewidth.cpp
@@ -28,15 +28,15 @@
#include <kptoolwidgetlinewidth.h>
-#include <qbitmap.h>
-#include <qpainter.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
#include <klocale.h>
static int lineWidths [] = {1, 2, 3, 5, 8};
-kpToolWidgetLineWidth::kpToolWidgetLineWidth (QWidget *parent, const char *name)
+kpToolWidgetLineWidth::kpToolWidgetLineWidth (TQWidget *parent, const char *name)
: kpToolWidgetBase (parent, name)
{
setInvertSelectedPixmap ();
@@ -48,19 +48,19 @@ kpToolWidgetLineWidth::kpToolWidgetLineWidth (QWidget *parent, const char *name)
for (int i = 0; i < numLineWidths; i++)
{
- QPixmap pixmap ((w <= 0 ? width () : w),
+ TQPixmap pixmap ((w <= 0 ? width () : w),
(h <= 0 ? height () : h));
pixmap.fill (Qt::white);
- QBitmap maskBitmap (pixmap.width (), pixmap.height ());
+ TQBitmap maskBitmap (pixmap.width (), pixmap.height ());
maskBitmap.fill (Qt::color0/*transparent*/);
- QPainter painter (&pixmap), maskPainter (&maskBitmap);
+ TQPainter painter (&pixmap), maskPainter (&maskBitmap);
painter.setPen (Qt::black), maskPainter.setPen (Qt::color1/*opaque*/);
painter.setBrush (Qt::black), maskPainter.setBrush (Qt::color1/*opaque*/);
- QRect rect = QRect (0, (pixmap.height () - lineWidths [i]) / 2,
+ TQRect rect = TQRect (0, (pixmap.height () - lineWidths [i]) / 2,
pixmap.width (), lineWidths [i]);
painter.drawRect (rect), maskPainter.drawRect (rect);
@@ -69,7 +69,7 @@ kpToolWidgetLineWidth::kpToolWidgetLineWidth (QWidget *parent, const char *name)
pixmap.setMask (maskBitmap);
- addOption (pixmap, QString::number (lineWidths [i]));
+ addOption (pixmap, TQString::number (lineWidths [i]));
startNewOptionRow ();
}
diff --git a/kolourpaint/widgets/kptoolwidgetlinewidth.h b/kolourpaint/widgets/kptoolwidgetlinewidth.h
index 3255e443..8fa041a0 100644
--- a/kolourpaint/widgets/kptoolwidgetlinewidth.h
+++ b/kolourpaint/widgets/kptoolwidgetlinewidth.h
@@ -36,7 +36,7 @@ class kpToolWidgetLineWidth : public kpToolWidgetBase
Q_OBJECT
public:
- kpToolWidgetLineWidth (QWidget *parent, const char *name);
+ kpToolWidgetLineWidth (TQWidget *parent, const char *name);
virtual ~kpToolWidgetLineWidth ();
int lineWidth () const;
diff --git a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp
index 41b55d0f..4cd5b6f6 100644
--- a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp
+++ b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.cpp
@@ -35,7 +35,7 @@
#include <klocale.h>
-kpToolWidgetOpaqueOrTransparent::kpToolWidgetOpaqueOrTransparent (QWidget *parent, const char *name)
+kpToolWidgetOpaqueOrTransparent::kpToolWidgetOpaqueOrTransparent (TQWidget *parent, const char *name)
: kpToolWidgetBase (parent, name)
{
setInvertSelectedPixmap (false);
diff --git a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h
index c24cd308..82ea3f50 100644
--- a/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h
+++ b/kolourpaint/widgets/kptoolwidgetopaqueortransparent.h
@@ -37,7 +37,7 @@ class kpToolWidgetOpaqueOrTransparent : public kpToolWidgetBase
Q_OBJECT
public:
- kpToolWidgetOpaqueOrTransparent (QWidget *parent, const char *name);
+ kpToolWidgetOpaqueOrTransparent (TQWidget *parent, const char *name);
virtual ~kpToolWidgetOpaqueOrTransparent ();
bool isOpaque () const;
diff --git a/kolourpaint/widgets/kptoolwidgetspraycansize.cpp b/kolourpaint/widgets/kptoolwidgetspraycansize.cpp
index 161e5015..2f426df5 100644
--- a/kolourpaint/widgets/kptoolwidgetspraycansize.cpp
+++ b/kolourpaint/widgets/kptoolwidgetspraycansize.cpp
@@ -31,9 +31,9 @@
#include <kptoolwidgetspraycansize.h>
-#include <qbitmap.h>
-#include <qimage.h>
-#include <qpainter.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -44,7 +44,7 @@
static int spraycanSizes [] = {9, 17, 29};
-kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (QWidget *parent, const char *name)
+kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *parent, const char *name)
: kpToolWidgetBase (parent, name)
{
#if DEBUG_KP_TOOL_WIDGET_SPRAYCAN_SIZE
@@ -54,22 +54,22 @@ kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (QWidget *parent, const char
for (int i = 0; i < int (sizeof (spraycanSizes) / sizeof (spraycanSizes [0])); i++)
{
int s = spraycanSizes [i];
- QString iconName = QString ("tool_spraycan_%1x%1").arg (s).arg(s);
+ TQString iconName = TQString ("tool_spraycan_%1x%1").arg (s).arg(s);
#if DEBUG_KP_TOOL_WIDGET_SPRAYCAN_SIZE
kdDebug () << "\ticonName=" << iconName << endl;
#endif
- QPixmap pixmap (s, s);
+ TQPixmap pixmap (s, s);
pixmap.fill (Qt::white);
- QPainter painter (&pixmap);
+ TQPainter painter (&pixmap);
painter.drawPixmap (0, 0, UserIcon (iconName));
painter.end ();
- QImage image = kpPixmapFX::convertToImage (pixmap);
+ TQImage image = kpPixmapFX::convertToImage (pixmap);
- QBitmap mask (pixmap.width (), pixmap.height ());
+ TQBitmap mask (pixmap.width (), pixmap.height ());
mask.fill (Qt::color0);
painter.begin (&mask);
diff --git a/kolourpaint/widgets/kptoolwidgetspraycansize.h b/kolourpaint/widgets/kptoolwidgetspraycansize.h
index b4233a80..6cc7d11e 100644
--- a/kolourpaint/widgets/kptoolwidgetspraycansize.h
+++ b/kolourpaint/widgets/kptoolwidgetspraycansize.h
@@ -36,7 +36,7 @@ class kpToolWidgetSpraycanSize : public kpToolWidgetBase
Q_OBJECT
public:
- kpToolWidgetSpraycanSize (QWidget *parent, const char *name);
+ kpToolWidgetSpraycanSize (TQWidget *parent, const char *name);
virtual ~kpToolWidgetSpraycanSize ();
int spraycanSize () const;
diff --git a/kooka/dwmenuaction.cpp b/kooka/dwmenuaction.cpp
index abe57f23..920fb433 100644
--- a/kooka/dwmenuaction.cpp
+++ b/kooka/dwmenuaction.cpp
@@ -31,14 +31,14 @@
#include "dwmenuaction.moc"
//-------------------------------------
-dwMenuAction::dwMenuAction( const QString& text, const KShortcut& cut,
- KDockWidget *dw,QObject* parent,
+dwMenuAction::dwMenuAction( const TQString& text, const KShortcut& cut,
+ KDockWidget *dw,TQObject* parent,
KDockMainWindow *mw, const char* name )
:KToggleAction(text,cut,parent,name),m_dw(dw),m_mw(mw)
{
- connect(this,SIGNAL(toggled(bool)),this,SLOT(slotToggled(bool)));
- connect(m_dw->dockManager(),SIGNAL(change()),this,SLOT(anDWChanged()));
- connect(m_dw,SIGNAL(destroyed()),this,SLOT(slotWidgetDestroyed()));
+ connect(this,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotToggled(bool)));
+ connect(m_dw->dockManager(),TQT_SIGNAL(change()),this,TQT_SLOT(anDWChanged()));
+ connect(m_dw,TQT_SIGNAL(destroyed()),this,TQT_SLOT(slotWidgetDestroyed()));
setChecked(m_dw->mayBeHide());
}
diff --git a/kooka/dwmenuaction.h b/kooka/dwmenuaction.h
index 9b1698ed..e260a094 100644
--- a/kooka/dwmenuaction.h
+++ b/kooka/dwmenuaction.h
@@ -30,7 +30,7 @@
#ifndef __DW_MENU_ACTION
#define __DW_MENU_ACTION
#include <kdockwidget.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kaction.h>
/**
@@ -44,9 +44,9 @@ class dwMenuAction:public KToggleAction
{
Q_OBJECT
public:
- dwMenuAction( const QString& text,
+ dwMenuAction( const TQString& text,
const KShortcut& cut = KShortcut(),
- KDockWidget *dw=0, QObject* parent = 0,
+ KDockWidget *dw=0, TQObject* parent = 0,
KDockMainWindow * mw=0, const char* name = 0 );
virtual ~dwMenuAction();
diff --git a/kooka/imageselectline.cpp b/kooka/imageselectline.cpp
index f8677f1f..4145cc30 100644
--- a/kooka/imageselectline.cpp
+++ b/kooka/imageselectline.cpp
@@ -25,11 +25,11 @@
* without including the source code for Qt in the source distribution. *
* *
***************************************************************************/
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qbutton.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqbutton.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
#include <kdebug.h>
#include <klocale.h>
@@ -47,22 +47,22 @@
* together in a row. The button opens a file selector box to pick a file.
*/
-ImageSelectLine::ImageSelectLine( QWidget *parent, const QString& text )
- : QHBox( parent )
+ImageSelectLine::ImageSelectLine( TQWidget *parent, const TQString& text )
+ : TQHBox( parent )
{
setSpacing( 5 );
- (void) new QLabel( text, this );
+ (void) new TQLabel( text, this );
m_urlCombo = new KURLComboBox( KURLComboBox::Files, this );
- m_buttFileSelect = new QPushButton( this );
+ m_buttFileSelect = new TQPushButton( this );
m_buttFileSelect->setPixmap( SmallIcon( "fileopen" ) );
m_urlCombo->setMaxItems(5);
- connect( m_urlCombo, SIGNAL( urlActivated( const KURL& )),
- this, SLOT( slUrlActivated( const KURL& )));
+ connect( m_urlCombo, TQT_SIGNAL( urlActivated( const KURL& )),
+ this, TQT_SLOT( slUrlActivated( const KURL& )));
- connect( m_buttFileSelect, SIGNAL( clicked() ),
- this, SLOT( slSelectFile()));
+ connect( m_buttFileSelect, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slSelectFile()));
}
void ImageSelectLine::slSelectFile()
@@ -70,7 +70,7 @@ void ImageSelectLine::slSelectFile()
KURL newUrl;
newUrl = KFileDialog::getImageOpenURL();
- QStringList l = m_urlCombo->urls();
+ TQStringList l = m_urlCombo->urls();
if( ! newUrl.isEmpty())
{
@@ -97,7 +97,7 @@ void ImageSelectLine::setURL( const KURL& url )
m_currUrl = url;
}
-void ImageSelectLine::setURLs( const QStringList& list )
+void ImageSelectLine::setURLs( const TQStringList& list )
{
if( m_urlCombo ) m_urlCombo->setURLs( list );
}
diff --git a/kooka/imageselectline.h b/kooka/imageselectline.h
index 991cb3fd..92cfec17 100644
--- a/kooka/imageselectline.h
+++ b/kooka/imageselectline.h
@@ -29,7 +29,7 @@
#ifndef __IMGSELECTLINE_H__
#define __IMGSELECTLINE_H__
-#include <qhbox.h>
+#include <tqhbox.h>
/**
*
@@ -37,18 +37,18 @@
class KURL;
class KURLComboBox;
-class QPushButton;
-class QStringList;
+class TQPushButton;
+class TQStringList;
class ImageSelectLine:public QHBox
{
Q_OBJECT
public:
- ImageSelectLine( QWidget *parent, const QString& text );
+ ImageSelectLine( TQWidget *parent, const TQString& text );
KURL selectedURL() const;
void setURL( const KURL& );
- void setURLs( const QStringList& );
+ void setURLs( const TQStringList& );
protected slots:
void slSelectFile();
@@ -58,7 +58,7 @@ private:
KURL m_currUrl;
KURLComboBox *m_urlCombo;
- QPushButton *m_buttFileSelect;
+ TQPushButton *m_buttFileSelect;
};
diff --git a/kooka/img_saver.cpp b/kooka/img_saver.cpp
index 1d7cf1d7..b8c789fc 100644
--- a/kooka/img_saver.cpp
+++ b/kooka/img_saver.cpp
@@ -45,20 +45,20 @@
#include <ktempfile.h>
#include <kinputdialog.h>
-#include <qdir.h>
-#include <qlayout.h>
-#include <qfileinfo.h>
-#include <qimage.h>
-#include <qmessagebox.h>
-#include <qvbox.h>
-#include <qbuttongroup.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqfileinfo.h>
+#include <tqimage.h>
+#include <tqmessagebox.h>
+#include <tqvbox.h>
+#include <tqbuttongroup.h>
#include "resource.h"
#include "img_saver.h"
#include "previewer.h"
#include "kookaimage.h"
-FormatDialog::FormatDialog( QWidget *parent, const QString&, const char *name )
+FormatDialog::FormatDialog( TQWidget *parent, const TQString&, const char *name )
:KDialogBase( parent, name, true,
/* Tabbed,*/ i18n( "Kooka Save Assistant" ),
Ok|Cancel, Ok )
@@ -66,17 +66,17 @@ FormatDialog::FormatDialog( QWidget *parent, const QString&, const char *name )
{
buildHelp();
// readConfig();
- // QFrame *page = addPage( QString( "Save the image") );
- QFrame *page = new QFrame( this );
- page->setFrameStyle( QFrame::Box | QFrame::Sunken );
+ // TQFrame *page = addPage( TQString( "Save the image") );
+ TQFrame *page = new TQFrame( this );
+ page->setFrameStyle( TQFrame::Box | TQFrame::Sunken );
Q_CHECK_PTR( page );
setMainWidget( page );
- QVBoxLayout *bigdad = new QVBoxLayout( page, marginHint(), spacingHint());
+ TQVBoxLayout *bigdad = new TQVBoxLayout( page, marginHint(), spacingHint());
Q_CHECK_PTR(bigdad);
// some nice words
- QLabel *l0 = new QLabel( page );
+ TQLabel *l0 = new TQLabel( page );
Q_CHECK_PTR(l0);
l0->setText( i18n( "<B>Save Assistant</B><P>Select an image format to save the scanned image." ));
bigdad->addWidget( l0 );
@@ -85,55 +85,55 @@ FormatDialog::FormatDialog( QWidget *parent, const QString&, const char *name )
bigdad->addWidget( sep );
// Layout-Boxes
- // QHBoxLayout *hl1= new QHBoxLayout( ); // Caption
- QHBoxLayout *lhBigMiddle = new QHBoxLayout( spacingHint() ); // Big middle
+ // TQHBoxLayout *hl1= new TQHBoxLayout( ); // Caption
+ TQHBoxLayout *lhBigMiddle = new TQHBoxLayout( spacingHint() ); // Big middle
Q_CHECK_PTR(lhBigMiddle);
bigdad->addLayout( lhBigMiddle );
- QVBoxLayout *lvFormatSel = new QVBoxLayout( spacingHint() ); // Selection List
+ TQVBoxLayout *lvFormatSel = new TQVBoxLayout( spacingHint() ); // Selection List
Q_CHECK_PTR(lvFormatSel);
lhBigMiddle->addLayout( lvFormatSel );
// Insert Scrolled List for formats
- QLabel *l1 = new QLabel( page );
+ TQLabel *l1 = new TQLabel( page );
Q_CHECK_PTR(l1);
l1->setText( i18n( "Available image formats:" ));
- lb_format = new QListBox( page, "ListBoxFormats" );
+ lb_format = new TQListBox( page, "ListBoxFormats" );
Q_CHECK_PTR(lb_format);
#ifdef USE_KIMAGEIO
- QStringList fo = KImageIO::types();
+ TQStringList fo = KImageIO::types();
#else
- QStringList fo = QImage::outputFormatList();
+ TQStringList fo = TQImage::outputFormatList();
#endif
kdDebug(28000) << "#### have " << fo.count() << " image types" << endl;
lb_format->insertStringList( fo );
- connect( lb_format, SIGNAL( highlighted(const QString&)),
- SLOT( showHelp(const QString&)));
+ connect( lb_format, TQT_SIGNAL( highlighted(const TQString&)),
+ TQT_SLOT( showHelp(const TQString&)));
// Insert label for helptext
- l_help = new QLabel( page );
+ l_help = new TQLabel( page );
Q_CHECK_PTR(l_help);
- l_help->setFrameStyle( QFrame::Panel|QFrame::Sunken );
+ l_help->setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
l_help->setText( i18n("-No format selected-" ));
l_help->setAlignment( AlignVCenter | AlignHCenter );
l_help->setMinimumWidth(230);
// Insert Selbox for subformat
- l2 = new QLabel( page );
+ l2 = new TQLabel( page );
Q_CHECK_PTR(l2);
l2->setText( i18n( "Select the image sub-format" ));
- cb_subf = new QComboBox( page, "ComboSubFormat" );
+ cb_subf = new TQComboBox( page, "ComboSubFormat" );
Q_CHECK_PTR( cb_subf );
// Checkbox to store setting
- cbDontAsk = new QCheckBox(i18n("Don't ask again for the save format if it is defined."),
+ cbDontAsk = new TQCheckBox(i18n("Don't ask again for the save format if it is defined."),
page );
Q_CHECK_PTR( cbDontAsk );
- QFrame *hl = new QFrame(page);
+ TQFrame *hl = new TQFrame(page);
Q_CHECK_PTR( hl );
- hl->setFrameStyle( QFrame::HLine|QFrame::Sunken );
+ hl->setFrameStyle( TQFrame::HLine|TQFrame::Sunken );
// bigdad->addWidget( l_caption, 1 );
lvFormatSel->addWidget( l1, 1 );
@@ -150,9 +150,9 @@ FormatDialog::FormatDialog( QWidget *parent, const QString&, const char *name )
}
-void FormatDialog::showHelp( const QString& item )
+void FormatDialog::showHelp( const TQString& item )
{
- QString helptxt = format_help[ item ];
+ TQString helptxt = format_help[ item ];
if( !helptxt.isEmpty() ) {
// Set the hint
@@ -165,7 +165,7 @@ void FormatDialog::showHelp( const QString& item )
}
}
-void FormatDialog::check_subformat( const QString & format )
+void FormatDialog::check_subformat( const TQString & format )
{
// not yet implemented
kdDebug(28000) << "This is format in check_subformat: " << format << endl;
@@ -174,9 +174,9 @@ void FormatDialog::check_subformat( const QString & format )
l2->setEnabled( false );
}
-void FormatDialog::setSelectedFormat( QString fo )
+void FormatDialog::setSelectedFormat( TQString fo )
{
- QListBoxItem *item = lb_format->findItem( fo );
+ TQListBoxItem *item = lb_format->findItem( fo );
if( item )
{
@@ -186,20 +186,20 @@ void FormatDialog::setSelectedFormat( QString fo )
}
-QString FormatDialog::getFormat( ) const
+TQString FormatDialog::getFormat( ) const
{
int item = lb_format->currentItem();
if( item > -1 )
{
- const QString f = lb_format->text( item );
+ const TQString f = lb_format->text( item );
return( f );
}
return( "BMP" );
}
-QCString FormatDialog::getSubFormat( ) const
+TQCString FormatDialog::getSubFormat( ) const
{
// Not yet...
return( "" );
@@ -208,18 +208,18 @@ QCString FormatDialog::getSubFormat( ) const
#include "formathelp.h"
void FormatDialog::buildHelp( void )
{
- format_help.insert( QString::fromLatin1("BMP"), HELP_BMP );
- format_help.insert( QString::fromLatin1("PNM"), HELP_PNM );
- format_help.insert( QString::fromLatin1("JPEG"), HELP_JPG );
- format_help.insert( QString::fromLatin1("JPG"), HELP_JPG );
- format_help.insert( QString::fromLatin1("EPS"), HELP_EPS );
+ 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 );
}
/* ********************************************************************** */
-ImgSaver::ImgSaver( QWidget *parent, const KURL dir_name )
- : QObject( parent )
+ImgSaver::ImgSaver( TQWidget *parent, const KURL dir_name )
+ : TQObject( parent )
{
if( dir_name.isEmpty() || dir_name.protocol() != "file" )
@@ -250,8 +250,8 @@ ImgSaver::ImgSaver( QWidget *parent, const KURL dir_name )
}
-ImgSaver::ImgSaver( QWidget *parent )
- :QObject( parent )
+ImgSaver::ImgSaver( TQWidget *parent )
+ :TQObject( parent )
{
directory = Previewer::galleryRoot();
createDir( directory );
@@ -265,14 +265,14 @@ ImgSaver::ImgSaver( QWidget *parent )
/* Needs a full qualified directory name */
-void ImgSaver::createDir( const QString& dir )
+void ImgSaver::createDir( const TQString& dir )
{
KURL url( dir );
if( ! KIO::NetAccess::exists(url, false, 0) )
{
kdDebug(28000) << "Wrn: Directory <" << dir << "> does not exist -> try to create !" << endl;
- // if( mkdir( QFile::encodeName( dir ), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH ) != 0 )
+ // if( mkdir( TQFile::encodeName( dir ), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH ) != 0 )
if( KIO::mkdir( KURL(dir)))
{
KMessageBox::sorry(0, i18n("The folder\n%1\n does not exist and could not be created;\n"
@@ -292,7 +292,7 @@ void ImgSaver::createDir( const QString& dir )
* This function asks the user for a filename or creates
* one by itself, depending on the settings
**/
-ImgSaveStat ImgSaver::saveImage( QImage *image )
+ImgSaveStat ImgSaver::saveImage( TQImage *image )
{
ImgSaveStat stat;
picType imgType;
@@ -322,8 +322,8 @@ ImgSaveStat ImgSaver::saveImage( QImage *image )
}
- QString format = findFormat( imgType );
- QString subformat = findSubFormat( format );
+ TQString format = findFormat( imgType );
+ TQString subformat = findSubFormat( format );
// Call save-Function with this params
if( format.isEmpty() )
@@ -333,7 +333,7 @@ ImgSaveStat ImgSaver::saveImage( QImage *image )
}
kdDebug(28000) << "saveImage: Directory is " << directory << endl;
- QString filename = createFilename( format );
+ TQString filename = createFilename( format );
KConfig *konf = KGlobal::config ();
konf->setGroup( OP_FILE_GROUP );
@@ -341,7 +341,7 @@ ImgSaveStat ImgSaver::saveImage( QImage *image )
if( konf->readBoolEntry( OP_ASK_FILENAME, false ) )
{
bool ok;
- QString text = KInputDialog::getText( i18n( "Filename" ), i18n("Enter filename:"),
+ TQString text = KInputDialog::getText( i18n( "Filename" ), i18n("Enter filename:"),
filename, &ok );
if(ok)
@@ -350,7 +350,7 @@ ImgSaveStat ImgSaver::saveImage( QImage *image )
}
}
- QString fi = directory + "/" + filename;
+ TQString fi = directory + "/" + filename;
if( extension(fi).isEmpty() )
{
@@ -374,17 +374,17 @@ ImgSaveStat ImgSaver::saveImage( QImage *image )
* This is done by numbering all existing files and adding
* one
**/
-QString ImgSaver::createFilename( QString format )
+TQString ImgSaver::createFilename( TQString format )
{
if( format.isNull() || format.isEmpty() ) return( 0 );
- QString s = "kscan_*." + format.lower();
- QDir files( directory, s );
+ TQString s = "kscan_*." + format.lower();
+ TQDir files( directory, s );
long c = 1;
- QString num;
+ TQString num;
num.setNum(c);
- QString fname = "kscan_" + num.rightJustify(4, '0') + "." + format.lower();
+ TQString fname = "kscan_" + num.rightJustify(4, '0') + "." + format.lower();
while( files.exists( fname ) ) {
num.setNum(++c);
@@ -397,9 +397,9 @@ QString ImgSaver::createFilename( QString format )
/**
* This function gets a filename from the parent. The filename must not be relative.
**/
-ImgSaveStat ImgSaver::saveImage( QImage *image, const KURL& filename, const QString& imgFormat )
+ImgSaveStat ImgSaver::saveImage( TQImage *image, const KURL& filename, const TQString& imgFormat )
{
- QString format = imgFormat;
+ TQString format = imgFormat;
/* Check if the filename is local */
if( !filename.isLocalFile())
@@ -408,7 +408,7 @@ ImgSaveStat ImgSaver::saveImage( QImage *image, const KURL& filename, const QStr
return( ISS_ERR_PROTOCOL );
}
- QString localFilename;
+ TQString localFilename;
localFilename = filename.directory( false, true) + filename.fileName();
kdDebug(28000) << "saveImage: Saving "<< localFilename << " in format " << format << endl;
@@ -422,9 +422,9 @@ ImgSaveStat ImgSaver::saveImage( QImage *image, const KURL& filename, const QStr
/*
* findFormat does all the stuff with the dialog.
*/
-QString ImgSaver::findFormat( picType type )
+TQString ImgSaver::findFormat( picType type )
{
- QString format;
+ TQString format;
KConfig *konf = KGlobal::config ();
konf->setGroup( OP_FILE_GROUP );
@@ -478,9 +478,9 @@ QString ImgSaver::findFormat( picType type )
}
-QString ImgSaver::picTypeAsString( picType type ) const
+TQString ImgSaver::picTypeAsString( picType type ) const
{
- QString res;
+ TQString res;
switch( type )
{
@@ -504,7 +504,7 @@ QString ImgSaver::picTypeAsString( picType type ) const
}
-QString ImgSaver::startFormatDialog( picType type)
+TQString ImgSaver::startFormatDialog( picType type)
{
FormatDialog fd( 0, picTypeAsString( type ), "FormatDialog" );
@@ -512,11 +512,11 @@ QString ImgSaver::startFormatDialog( picType type)
// set default values
if( type != PT_PREVIEW )
{
- QString defFormat = getFormatForType( type );
+ TQString defFormat = getFormatForType( type );
fd.setSelectedFormat( defFormat );
}
- QString format;
+ TQString format;
if( fd.exec() )
{
format = fd.getFormat();
@@ -534,7 +534,7 @@ QString ImgSaver::startFormatDialog( picType type)
* This method returns true if the image format given in format is remembered
* for that image type.
*/
-bool ImgSaver::isRememberedFormat( picType type, QString format ) const
+bool ImgSaver::isRememberedFormat( picType type, TQString format ) const
{
if( getFormatForType( type ) == format )
{
@@ -550,13 +550,13 @@ bool ImgSaver::isRememberedFormat( picType type, QString format ) const
-QString ImgSaver::getFormatForType( picType type ) const
+TQString ImgSaver::getFormatForType( picType type ) const
{
KConfig *konf = KGlobal::config ();
Q_CHECK_PTR( konf );
konf->setGroup( OP_FILE_GROUP );
- QString f;
+ TQString f;
switch( type )
{
@@ -580,7 +580,7 @@ QString ImgSaver::getFormatForType( picType type ) const
}
-void ImgSaver::storeFormatForType( picType type, QString format, bool ask )
+void ImgSaver::storeFormatForType( picType type, TQString format, bool ask )
{
KConfig *konf = KGlobal::config ();
Q_CHECK_PTR( konf );
@@ -611,7 +611,7 @@ void ImgSaver::storeFormatForType( picType type, QString format, bool ask )
}
-QString ImgSaver::findSubFormat( QString format )
+TQString ImgSaver::findSubFormat( TQString format )
{
kdDebug(28000) << "Searching Subformat for " << format << endl;
return( subformat );
@@ -622,9 +622,9 @@ QString ImgSaver::findSubFormat( QString format )
private save() does the work to save the image.
the filename must be complete and local.
**/
-ImgSaveStat ImgSaver::save( QImage *image, const QString &filename,
- const QString &format,
- const QString &subformat )
+ImgSaveStat ImgSaver::save( TQImage *image, const TQString &filename,
+ const TQString &format,
+ const TQString &subformat )
{
bool result = false;
@@ -638,9 +638,9 @@ ImgSaveStat ImgSaver::save( QImage *image, const QString &filename,
if( image )
{
// remember the last processed file - only the filename - no path
- QFileInfo fi( filename );
- QString dirPath = fi.dirPath();
- QDir dir = QDir( dirPath );
+ TQFileInfo fi( filename );
+ TQString dirPath = fi.dirPath();
+ TQDir dir = TQDir( dirPath );
if( ! dir.exists() )
{
@@ -696,16 +696,16 @@ void ImgSaver::readConfig( void )
konf->setGroup( OP_FILE_GROUP );
ask_for_format = konf->readBoolEntry( OP_FILE_ASK_FORMAT, true );
- QDir home = QDir::home();
+ TQDir home = TQDir::home();
}
-QString ImgSaver::errorString( ImgSaveStat stat )
+TQString ImgSaver::errorString( ImgSaveStat stat )
{
- QString re;
+ TQString re;
switch( stat ) {
case ISS_OK: re = i18n( " image save OK " ); break;
@@ -724,9 +724,9 @@ QString ImgSaver::errorString( ImgSaveStat stat )
}
-QString ImgSaver::extension( const KURL& url )
+TQString ImgSaver::extension( const KURL& url )
{
- QString extension = url.fileName();
+ TQString extension = url.fileName();
int dotPos = extension.findRev( '.' );
if( dotPos > 0 )
@@ -737,24 +737,24 @@ QString ImgSaver::extension( const KURL& url )
else
{
/* No extension was supplied */
- extension = QString();
+ extension = TQString();
}
return extension;
}
-bool ImgSaver::renameImage( const KURL& fromUrl, KURL& toUrl, bool askExt, QWidget *overWidget )
+bool ImgSaver::renameImage( const KURL& fromUrl, KURL& toUrl, bool askExt, TQWidget *overWidget )
{
/* Check if the provided filename has a extension */
- QString extTo = extension( toUrl );
- QString extFrom = extension( fromUrl );
+ TQString extTo = extension( toUrl );
+ TQString extFrom = extension( fromUrl );
KURL targetUrl( toUrl );
if( extTo.isEmpty() && !extFrom.isEmpty() )
{
/* Ask if the extension should be added */
int result = KMessageBox::Yes;
- QString fName = toUrl.fileName();
+ TQString fName = toUrl.fileName();
if( ! fName.endsWith( "." ) )
{
fName += ".";
@@ -764,7 +764,7 @@ bool ImgSaver::renameImage( const KURL& fromUrl, KURL& toUrl, bool askExt, QWid
if( askExt )
{
- QString s;
+ 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);
@@ -809,10 +809,10 @@ bool ImgSaver::renameImage( const KURL& fromUrl, KURL& toUrl, bool askExt, QWid
}
-QString ImgSaver::tempSaveImage( KookaImage *img, const QString& format, int colors )
+TQString ImgSaver::tempSaveImage( KookaImage *img, const TQString& format, int colors )
{
- KTempFile *tmpFile = new KTempFile( QString(), "."+format.lower());
+ KTempFile *tmpFile = new KTempFile( TQString(), "."+format.lower());
tmpFile->setAutoDelete( false );
tmpFile->close();
@@ -833,35 +833,35 @@ QString ImgSaver::tempSaveImage( KookaImage *img, const QString& format, int col
}
}
- QString name;
+ TQString name;
if( img )
{
name = tmpFile->name();
- if( ! img->save( name, format.latin1() ) ) name = QString();
+ if( ! img->save( name, format.latin1() ) ) name = TQString();
}
delete tmpFile;
return name;
}
-bool ImgSaver::copyImage( const KURL& fromUrl, const KURL& toUrl, QWidget *overWidget )
+bool ImgSaver::copyImage( const KURL& fromUrl, const KURL& toUrl, TQWidget *overWidget )
{
/* Check if the provided filename has a extension */
- QString extTo = extension( toUrl );
- QString extFrom = extension( fromUrl );
+ TQString extTo = extension( toUrl );
+ TQString extFrom = extension( fromUrl );
KURL targetUrl( toUrl );
if( extTo.isEmpty() && !extFrom.isEmpty())
{
/* Ask if the extension should be added */
int result = KMessageBox::Yes;
- QString fName = toUrl.fileName();
+ TQString fName = toUrl.fileName();
if( ! fName.endsWith( "." ))
fName += ".";
fName += extFrom;
- QString s;
+ 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);
diff --git a/kooka/img_saver.h b/kooka/img_saver.h
index f9a29898..95204ad7 100644
--- a/kooka/img_saver.h
+++ b/kooka/img_saver.h
@@ -26,19 +26,19 @@
#ifndef __IMG_SAVER_H__
#define __IMG_SAVER_H__
-#include <qobject.h>
-#include <qwidget.h>
-#include <qlabel.h>
-#include <qmemarray.h>
-#include <qstring.h>
-#include <qimage.h>
+#include <tqobject.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
+#include <tqmemarray.h>
+#include <tqstring.h>
+#include <tqimage.h>
#include <stdlib.h>
-#include <qdialog.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qlistbox.h>
-#include <qmap.h>
+#include <tqdialog.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqlistbox.h>
+#include <tqmap.h>
#include <kdialogbase.h>
#include <kurl.h>
@@ -102,36 +102,36 @@ class FormatDialog:public KDialogBase
{
Q_OBJECT
public:
- FormatDialog( QWidget *parent, const QString&, const char * );
+ FormatDialog( TQWidget *parent, const TQString&, const char * );
- QString getFormat( ) const;
- QCString getSubFormat( ) const;
- QString errorString( ImgSaveStat stat );
+ TQString getFormat( ) const;
+ TQCString getSubFormat( ) const;
+ TQString errorString( ImgSaveStat stat );
bool askForFormat( ) const
{ return( ! cbDontAsk->isChecked()); }
public slots:
- void setSelectedFormat( QString );
+ void setSelectedFormat( TQString );
protected slots:
- void showHelp( const QString& item );
+ void showHelp( const TQString& item );
private:
- void check_subformat( const QString & format );
+ void check_subformat( const TQString & format );
void buildHelp( void );
void readConfig( void );
- QMap<QString, QString> format_help;
- QComboBox *cb_subf;
- QListBox *lb_format;
- QLabel *l_help;
+ TQMap<TQString, TQString> format_help;
+ TQComboBox *cb_subf;
+ TQListBox *lb_format;
+ TQLabel *l_help;
QLabel *l2;
- QCheckBox *cbRemember;
- QCheckBox *cbDontAsk;
+ TQCheckBox *cbRemember;
+ TQCheckBox *cbDontAsk;
};
/**
@@ -142,7 +142,7 @@ private:
* and cares for database entries (later ;)
**/
-class ImgSaver:public QObject {
+class ImgSaver:public TQObject {
Q_OBJECT
public:
/**
@@ -153,56 +153,56 @@ public:
* @param dir Name of the save root directory
* @param name Name of a subdirectory in the saveroot.
**/
- ImgSaver( QWidget *parent, const KURL );
- ImgSaver( QWidget *parent );
+ ImgSaver( TQWidget *parent, const KURL );
+ ImgSaver( TQWidget *parent );
- QString errorString( ImgSaveStat );
+ TQString errorString( ImgSaveStat );
/**
* returns the name of the last file that was saved by ImgSaver.
*/
- QString lastFilename() const { return( last_file ); }
+ TQString lastFilename() const { return( last_file ); }
KURL lastFileUrl() const { return( KURL(last_file )); }
/**
* returns the image format of the last saved image.
*/
- QCString lastSaveFormat( void ) const { return( last_format ); }
+ TQCString lastSaveFormat( void ) const { return( last_format ); }
- QString getFormatForType( picType ) const;
- void storeFormatForType( picType, QString, bool );
- bool isRememberedFormat( picType type, QString format ) const;
+ TQString getFormatForType( picType ) const;
+ void storeFormatForType( picType, TQString, bool );
+ bool isRememberedFormat( picType type, TQString format ) const;
/* static function that exports a file */
- static bool copyImage( const KURL& fromUrl, const KURL& toUrl, QWidget *overWidget=0 );
- static bool renameImage( const KURL& fromUrl, KURL& toUrl, bool askExt=false, QWidget *overWidget=0 );
- static QString tempSaveImage( KookaImage *img, const QString& format, int colors = -1 );
+ static bool copyImage( const KURL& fromUrl, const KURL& toUrl, TQWidget *overWidget=0 );
+ static bool renameImage( const KURL& fromUrl, KURL& toUrl, bool askExt=false, TQWidget *overWidget=0 );
+ static TQString tempSaveImage( KookaImage *img, const TQString& format, int colors = -1 );
/* static function that returns the extension of an url */
- static QString extension( const KURL& );
+ static TQString extension( const KURL& );
public slots:
- ImgSaveStat saveImage( QImage *image );
- ImgSaveStat saveImage( QImage *image, const KURL& filename, const QString& imgFormat );
+ ImgSaveStat saveImage( TQImage *image );
+ ImgSaveStat saveImage( TQImage *image, const KURL& filename, const TQString& imgFormat );
private:
- QString picTypeAsString( picType type ) const;
- QString findFormat( picType type );
- QString findSubFormat( QString format );
- void createDir( const QString& );
-
- ImgSaveStat save( QImage *image, const QString &filename, const QString &format,
- const QString &subformat );
- QString createFilename( QString format );
+ TQString picTypeAsString( picType type ) const;
+ TQString findFormat( picType type );
+ TQString findSubFormat( TQString format );
+ void createDir( const TQString& );
+
+ ImgSaveStat save( TQImage *image, const TQString &filename, const TQString &format,
+ const TQString &subformat );
+ TQString createFilename( TQString format );
void readConfig( void );
- QString startFormatDialog( picType );
+ TQString startFormatDialog( picType );
- // QStrList all_formats;
- QString directory; // dir where the image should be saved
- QString last_file;
- QCString subformat;
- QCString last_format;
+ // TQStrList all_formats;
+ TQString directory; // dir where the image should be saved
+ TQString last_file;
+ TQCString subformat;
+ TQCString last_format;
bool ask_for_format;
- // QDict<QString> formats;
+ // TQDict<TQString> formats;
};
#endif
diff --git a/kooka/imgnamecombo.cpp b/kooka/imgnamecombo.cpp
index 77b59a0d..0e06646b 100644
--- a/kooka/imgnamecombo.cpp
+++ b/kooka/imgnamecombo.cpp
@@ -25,9 +25,9 @@
* *
***************************************************************************/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlistview.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlistview.h>
#include <kcombobox.h>
@@ -38,10 +38,10 @@
#include "imgnamecombo.h"
#include "img_saver.h"
-ImageNameCombo::ImageNameCombo( QWidget *parent )
+ImageNameCombo::ImageNameCombo( TQWidget *parent )
: KComboBox( parent )
{
- setInsertionPolicy( QComboBox::AtTop );
+ setInsertionPolicy( TQComboBox::AtTop );
}
ImageNameCombo::~ImageNameCombo()
@@ -49,12 +49,12 @@ ImageNameCombo::~ImageNameCombo()
}
-void ImageNameCombo::slotPathRemove( KFileTreeBranch *branch, const QString& relPath )
+void ImageNameCombo::slotPathRemove( KFileTreeBranch *branch, const TQString& relPath )
{
- QString path = branch->name() + QString::fromLatin1(" - ") + relPath;
+ TQString path = branch->name() + TQString::fromLatin1(" - ") + relPath;
kdDebug(28000) << "ImageNameCombo: Removing " << path << endl;
- QString select = currentText();
+ TQString select = currentText();
if( items.contains( path ))
{
@@ -66,10 +66,10 @@ void ImageNameCombo::slotPathRemove( KFileTreeBranch *branch, const QString& rel
rewriteList( branch, select );
}
-void ImageNameCombo::rewriteList( KFileTreeBranch *branch, const QString& selText )
+void ImageNameCombo::rewriteList( KFileTreeBranch *branch, const TQString& selText )
{
clear();
- for ( QStringList::Iterator it = items.begin(); it != items.end(); ++it )
+ for ( TQStringList::Iterator it = items.begin(); it != items.end(); ++it )
{
insertItem( branch->pixmap(), *it );
}
@@ -78,11 +78,11 @@ void ImageNameCombo::rewriteList( KFileTreeBranch *branch, const QString& selTex
setCurrentItem( index );
}
-void ImageNameCombo::slotGalleryPathChanged( KFileTreeBranch* branch, const QString& relativPath )
+void ImageNameCombo::slotGalleryPathChanged( KFileTreeBranch* branch, const TQString& relativPath )
{
- QString newPath;
+ TQString newPath;
- newPath = branch->name() + QString::fromLatin1(" - ") + relativPath;
+ newPath = branch->name() + TQString::fromLatin1(" - ") + relativPath;
kdDebug( 28000) << "Inserting " << newPath << " to combobox" << endl;
diff --git a/kooka/imgnamecombo.h b/kooka/imgnamecombo.h
index a577929e..1beb1235 100644
--- a/kooka/imgnamecombo.h
+++ b/kooka/imgnamecombo.h
@@ -35,23 +35,23 @@
*@author Klaas Freitag
*/
-class QListViewItem;
+class TQListViewItem;
class KFileBranch;
class ImageNameCombo: public KComboBox
{
Q_OBJECT
public:
- ImageNameCombo( QWidget* );
+ ImageNameCombo( TQWidget* );
~ImageNameCombo();
public slots:
- void slotGalleryPathChanged( KFileTreeBranch* branch, const QString& relativPath );
- void slotPathRemove( KFileTreeBranch *branch, const QString& relPath );
+ void slotGalleryPathChanged( KFileTreeBranch* branch, const TQString& relativPath );
+ void slotPathRemove( KFileTreeBranch *branch, const TQString& relPath );
private:
- void rewriteList( KFileTreeBranch *, const QString& selText );
- QStringList items;
+ void rewriteList( KFileTreeBranch *, const TQString& selText );
+ TQStringList items;
};
#endif
diff --git a/kooka/imgprintdialog.cpp b/kooka/imgprintdialog.cpp
index f9aa3930..fa7ee620 100644
--- a/kooka/imgprintdialog.cpp
+++ b/kooka/imgprintdialog.cpp
@@ -29,17 +29,17 @@
#include <knuminput.h>
#include <kdialog.h>
-#include <qstring.h>
-#include <qmap.h>
-#include <qlayout.h>
-#include <qvbuttongroup.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqlayout.h>
+#include <tqvbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
#include "kookaimage.h"
-#include <qvgroupbox.h>
-#include <qpaintdevicemetrics.h>
-#include <qlabel.h>
-#include <qtooltip.h>
+#include <tqvgroupbox.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
#include <kdebug.h>
#define ID_SCREEN 0
@@ -47,55 +47,55 @@
#define ID_CUSTOM 2
#define ID_FIT_PAGE 3
-ImgPrintDialog::ImgPrintDialog( KookaImage *img, QWidget *parent, const char* name )
+ImgPrintDialog::ImgPrintDialog( KookaImage *img, TQWidget *parent, const char* name )
: KPrintDialogPage( parent, name ),
m_image(img),
m_ignoreSignal(false)
{
setTitle(i18n("Image Printing"));
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
// layout->setMargin( KDialog::marginHint() );
// layout->setSpacing( KDialog::spacingHint() );
- m_scaleRadios = new QButtonGroup( 2, Qt::Vertical, i18n("Image Print Size"), this );
+ m_scaleRadios = new TQButtonGroup( 2, Qt::Vertical, i18n("Image Print Size"), this );
m_scaleRadios->setRadioButtonExclusive(true);
- connect( m_scaleRadios, SIGNAL(clicked(int)), SLOT(slScaleChanged(int)));
+ connect( m_scaleRadios, TQT_SIGNAL(clicked(int)), TQT_SLOT(slScaleChanged(int)));
- m_rbScreen = new QRadioButton( i18n("Scale to same size as on screen"),
+ m_rbScreen = new TQRadioButton( i18n("Scale to same size as on screen"),
m_scaleRadios );
- QToolTip::add( m_rbScreen, i18n("Screen scaling. That prints according to the screen resolution."));
+ TQToolTip::add( m_rbScreen, i18n("Screen scaling. That prints according to the screen resolution."));
m_scaleRadios->insert( m_rbScreen, ID_SCREEN );
- m_rbOrigSize = new QRadioButton( i18n("Original size (calculate from scan resolution)"),
+ m_rbOrigSize = new TQRadioButton( i18n("Original size (calculate from scan resolution)"),
m_scaleRadios );
- QToolTip::add( m_rbOrigSize,
+ TQToolTip::add( m_rbOrigSize,
i18n("Calculates the print size from the scan resolution. Enter the scan resolution in the dialog field below." ));
m_scaleRadios->insert( m_rbOrigSize, ID_ORIG );
- m_rbScale = new QRadioButton( i18n("Scale image to custom dimension"), m_scaleRadios );
- QToolTip::add( m_rbScale,
+ m_rbScale = new TQRadioButton( i18n("Scale image to custom dimension"), m_scaleRadios );
+ TQToolTip::add( m_rbScale,
i18n("Set the print size yourself in the dialog below. The image is centered on the paper."));
m_scaleRadios->insert( m_rbScale, ID_CUSTOM );
- m_rbFitPage = new QRadioButton( i18n("Scale image to fit to page"), m_scaleRadios );
- QToolTip::add( m_rbFitPage, i18n("Printout uses maximum space on the selected pager. Aspect ratio is maintained."));
+ m_rbFitPage = new TQRadioButton( i18n("Scale image to fit to page"), m_scaleRadios );
+ 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 );
- QHBoxLayout *hbox = new QHBoxLayout( this );
+ TQHBoxLayout *hbox = new TQHBoxLayout( this );
layout->addLayout( hbox );
/** Box for Image Resolutions **/
- QVGroupBox *group1 = new QVGroupBox( i18n("Resolutions"), this );
+ TQVGroupBox *group1 = new TQVGroupBox( i18n("Resolutions"), this );
hbox->addWidget( group1 );
/* Postscript generation resolution */
- m_psDraft = new QCheckBox( i18n("Generate low resolution PostScript (fast draft print)"),
+ m_psDraft = new TQCheckBox( i18n("Generate low resolution PostScript (fast draft print)"),
group1, "cbPostScriptRes" );
m_psDraft->setChecked( false );
@@ -107,27 +107,27 @@ ImgPrintDialog::ImgPrintDialog( KookaImage *img, QWidget *parent, const char* na
m_dpi->setSuffix( i18n(" dpi"));
/* Label for displaying the screen Resolution */
- m_screenRes = new QLabel( group1 );
+ m_screenRes = new TQLabel( group1 );
/** Box for Image Print Size **/
- QVGroupBox *group = new QVGroupBox( i18n("Image Print Size"), this );
+ TQVGroupBox *group = new TQVGroupBox( i18n("Image Print Size"), this );
hbox->addWidget( group );
m_sizeW = new KIntNumInput( group );
m_sizeW->setLabel( i18n("Image width:"), AlignVCenter );
m_sizeW->setSuffix( i18n(" mm"));
- connect( m_sizeW, SIGNAL(valueChanged(int)), SLOT(slCustomWidthChanged(int)));
+ connect( m_sizeW, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slCustomWidthChanged(int)));
m_sizeH = new KIntNumInput( m_sizeW, AlignVCenter, group );
m_sizeH->setLabel( i18n("Image height:"), AlignVCenter);
m_sizeH->setSuffix( i18n(" mm"));
- connect( m_sizeH, SIGNAL(valueChanged(int)), SLOT(slCustomHeightChanged(int)));
+ connect( m_sizeH, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slCustomHeightChanged(int)));
- m_ratio = new QCheckBox( i18n("Maintain aspect ratio"), group, "cbAspectRatio" );
+ m_ratio = new TQCheckBox( i18n("Maintain aspect ratio"), group, "cbAspectRatio" );
m_ratio->setChecked(true);
- QWidget *spaceEater = new QWidget( this );
- spaceEater->setSizePolicy( QSizePolicy( QSizePolicy::Ignored, QSizePolicy::Ignored ));
+ TQWidget *spaceEater = new TQWidget( this );
+ spaceEater->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ));
layout->addWidget( spaceEater );
/* Set start values */
@@ -143,10 +143,10 @@ void ImgPrintDialog::setImage( KookaImage *img )
}
-void ImgPrintDialog::setOptions(const QMap<QString,QString>& opts)
+void ImgPrintDialog::setOptions(const TQMap<TQString,TQString>& opts)
{
// m_autofit->setChecked(opts["app-img-autofit"] == "1");
- QString scale = opts[OPT_SCALING];
+ TQString scale = opts[OPT_SCALING];
kdDebug(28000) << "In setOption" << endl;
@@ -178,12 +178,12 @@ void ImgPrintDialog::setOptions(const QMap<QString,QString>& opts)
}
-void ImgPrintDialog::getOptions(QMap<QString,QString>& opts, bool )
+void ImgPrintDialog::getOptions(TQMap<TQString,TQString>& opts, bool )
{
// TODO: Check for meaning of include_def !
// kdDebug(28000) << "In getOption with include_def: " << include_def << endl;
- QString scale = "screen";
+ TQString scale = "screen";
if( m_rbOrigSize->isChecked() )
scale = "scan";
else if( m_rbScale->isChecked() )
@@ -193,19 +193,19 @@ void ImgPrintDialog::getOptions(QMap<QString,QString>& opts, bool )
opts[OPT_SCALING] = scale;
- opts[OPT_SCAN_RES] = QString::number( m_dpi->value() );
- opts[OPT_WIDTH] = QString::number( m_sizeW->value() );
- opts[OPT_HEIGHT] = QString::number( m_sizeH->value() );
- opts[OPT_PSGEN_DRAFT] = QString::number( m_psDraft->isChecked() );
- opts[OPT_RATIO] = QString::number( m_ratio->isChecked() );
+ opts[OPT_SCAN_RES] = TQString::number( m_dpi->value() );
+ opts[OPT_WIDTH] = TQString::number( m_sizeW->value() );
+ opts[OPT_HEIGHT] = TQString::number( m_sizeH->value() );
+ opts[OPT_PSGEN_DRAFT] = TQString::number( m_psDraft->isChecked() );
+ opts[OPT_RATIO] = TQString::number( m_ratio->isChecked() );
{
- QPaintDeviceMetrics metric( this );
- opts[OPT_SCREEN_RES] = QString::number( metric.logicalDpiX());
+ TQPaintDeviceMetrics metric( this );
+ opts[OPT_SCREEN_RES] = TQString::number( metric.logicalDpiX());
}
}
-bool ImgPrintDialog::isValid(QString& msg)
+bool ImgPrintDialog::isValid(TQString& msg)
{
/* check if scan reso is higher than 0 in case its needed */
int id = m_scaleRadios->id( m_scaleRadios->selected());
diff --git a/kooka/imgprintdialog.h b/kooka/imgprintdialog.h
index 845cc038..f710820e 100644
--- a/kooka/imgprintdialog.h
+++ b/kooka/imgprintdialog.h
@@ -27,8 +27,8 @@
#ifndef __IMGPRINTDIALOG_H__
#define __IMGPRINTDIALOG_H__
-#include <qmap.h>
-#include <qcheckbox.h>
+#include <tqmap.h>
+#include <tqcheckbox.h>
#include <kdeprint/kprintdialogpage.h>
#include "kookaimage.h"
@@ -41,24 +41,24 @@
#define OPT_PSGEN_DRAFT "kde-kooka-psdraft"
#define OPT_RATIO "kde-kooka-ratio"
#define OPT_FITPAGE "kde-kooka-fitpage"
-class QWidget;
-class QString;
-class QLabel;
+class TQWidget;
+class TQString;
+class TQLabel;
class KIntNumInput;
class KookaImage;
-class QVButtonGroup;
-class QRadioButton;
-class QCheckBox;
+class TQVButtonGroup;
+class TQRadioButton;
+class TQCheckBox;
class ImgPrintDialog: public KPrintDialogPage
{
Q_OBJECT
public:
- ImgPrintDialog( KookaImage *img, QWidget *parent=0L, const char* name=0L );
+ ImgPrintDialog( KookaImage *img, TQWidget *parent=0L, const char* name=0L );
- void setOptions(const QMap<QString,QString>& opts);
- void getOptions(QMap<QString,QString>& opts, bool include_def = false);
- bool isValid(QString& msg);
+ void setOptions(const TQMap<TQString,TQString>& opts);
+ void getOptions(TQMap<TQString,TQString>& opts, bool include_def = false);
+ bool isValid(TQString& msg);
void setImage( KookaImage *img );
@@ -68,21 +68,21 @@ protected slots:
void slCustomHeightChanged(int);
private:
- QButtonGroup *m_scaleRadios;
- QRadioButton *m_rbOrigSize;
- QRadioButton *m_rbScale;
- QRadioButton *m_rbScreen;
- QRadioButton *m_rbFitPage;
+ TQButtonGroup *m_scaleRadios;
+ TQRadioButton *m_rbOrigSize;
+ TQRadioButton *m_rbScale;
+ TQRadioButton *m_rbScreen;
+ TQRadioButton *m_rbFitPage;
KIntNumInput *m_sizeW;
KIntNumInput *m_sizeH;
KIntNumInput *m_dpi;
- QCheckBox *m_psDraft;
- QCheckBox *m_ratio;
+ TQCheckBox *m_psDraft;
+ TQCheckBox *m_ratio;
KookaImage *m_image;
- QLabel *m_screenRes;
+ TQLabel *m_screenRes;
bool m_ignoreSignal;
};
diff --git a/kooka/kadmosocr.cpp b/kooka/kadmosocr.cpp
index 72f9324b..d0d41e13 100644
--- a/kooka/kadmosocr.cpp
+++ b/kooka/kadmosocr.cpp
@@ -32,11 +32,11 @@
/* Kadmos CPP object oriented interface */
-#include <qimage.h>
-#include <qpainter.h>
-#include <qstring.h>
-#include <qrect.h>
-#include <qstringlist.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqstring.h>
+#include <tqrect.h>
+#include <tqstringlist.h>
#include <assert.h>
@@ -54,11 +54,11 @@ using namespace Kadmos;
/* -------------------- CRep -------------------- */
CRep::CRep()
- :QObject()
+ :TQObject()
{
memset(&m_RepData, 0, sizeof(m_RepData));
m_Error = RE_SUCCESS;
- m_undetectChar = QChar('_');
+ m_undetectChar = TQChar('_');
}
CRep::~CRep()
@@ -161,8 +161,8 @@ ocrWordList CRep::getLineWords( int line )
do
{
- QString resultWord;
- QRect boundingRect;
+ TQString resultWord;
+ TQRect boundingRect;
int newNextKnode = nextBestWord( line, nextKnode, resultWord, boundingRect );
boundingRect.moveBy( repRes->left, repRes->top );
@@ -179,7 +179,7 @@ ocrWordList CRep::getLineWords( int line )
// Alternativen:
- // partStrings( line, nextKnode, QString()); // fills m_parts - list with alternative words
+ // partStrings( line, nextKnode, TQString()); // fills m_parts - list with alternative words
// nextKnode = newNextKnode;
// kdDebug(28000) << "NextKnodeWord: " << resultWord << endl;
}
@@ -192,7 +192,7 @@ ocrWordList CRep::getLineWords( int line )
/* This fills theWord with the next best word and returns the
* next knode or 0 if there is no next node
*/
-int CRep::nextBestWord( int line, int knode, QString& theWord, QRect& brect )
+int CRep::nextBestWord( int line, int knode, TQString& theWord, TQRect& brect )
{
Kadmos::RelGraph *relg = getGraphKnode( line, knode );
@@ -207,7 +207,7 @@ int CRep::nextBestWord( int line, int knode, QString& theWord, QRect& brect )
// kdDebug(28000) << "Leading Blanks: " << relg->leading_blanks <<
// " und Knode " << knode << endl;
char c = relr->rec_char[0][0];
- QChar newChar = c;
+ TQChar newChar = c;
if( c == 0 )
{
kdDebug(28000) << "Undetected char found !" << endl;
@@ -227,7 +227,7 @@ int CRep::nextBestWord( int line, int knode, QString& theWord, QRect& brect )
/* save the bounding rect */
// kdDebug(28000) << "LEFT: " << relr->left << " TOP: " << relr->top << endl;
- QRect r( relr->left, relr->top, relr->width, relr->height );
+ TQRect r( relr->left, relr->top, relr->width, relr->height );
if( brect.isNull() )
{
@@ -258,13 +258,13 @@ int CRep::nextBestWord( int line, int knode, QString& theWord, QRect& brect )
-void CRep::partStrings( int line, int graphKnode, QString soFar )
+void CRep::partStrings( int line, int graphKnode, TQString soFar )
{
/* The following knodes after a word break */
Kadmos::RelGraph *relg = getGraphKnode( line, graphKnode );
// kdDebug(28000) << "GraphKnode is " << graphKnode << endl;
- QString theWord="";
+ TQString theWord="";
for( int resNo=0; resNo < SEG_ALT; resNo++ )
{
// kdDebug(28000) << "Alternative " << resNo << " is " << relg->result_number[resNo] << endl;
@@ -275,7 +275,7 @@ void CRep::partStrings( int line, int graphKnode, QString soFar )
}
Kadmos::RelResult *relr = getRelResult( line, relg, resNo );
- theWord = QChar(relr->rec_char[0][0]);
+ theWord = TQChar(relr->rec_char[0][0]);
if ( !soFar.isEmpty() && relg->leading_blanks )
{
@@ -288,7 +288,7 @@ void CRep::partStrings( int line, int graphKnode, QString soFar )
}
else
{
- /* make a QString from this single char and append it. */
+ /* make a TQString from this single char and append it. */
soFar += theWord;
}
@@ -311,19 +311,19 @@ void CRep::partStrings( int line, int graphKnode, QString soFar )
-void CRep::drawCharBox( QPixmap *pix, const QRect& r )
+void CRep::drawCharBox( TQPixmap *pix, const TQRect& r )
{
- drawBox( pix, r, QColor( Qt::red ));
+ drawBox( pix, r, TQColor( Qt::red ));
}
-void CRep::drawLineBox( QPixmap* pix, const QRect& r )
+void CRep::drawLineBox( TQPixmap* pix, const TQRect& r )
{
- drawBox( pix, r, QColor( Qt::blue ));
+ drawBox( pix, r, TQColor( Qt::blue ));
}
-void CRep::drawBox( QPixmap* pix, const QRect& r, const QColor& color )
+void CRep::drawBox( TQPixmap* pix, const TQRect& r, const TQColor& color )
{
- QPainter p;
+ TQPainter p;
p.begin(pix);
p.setPen( color );
@@ -332,7 +332,7 @@ void CRep::drawBox( QPixmap* pix, const QRect& r, const QColor& color )
-KADMOS_ERROR CRep::SetImage( const QString file )
+KADMOS_ERROR CRep::SetImage( const TQString file )
{
ReImageHandle image_handle;
image_handle = re_readimage(file.latin1(), &m_RepData.image);
@@ -345,7 +345,7 @@ KADMOS_ERROR CRep::SetImage( const QString file )
}
-KADMOS_ERROR CRep::SetImage(QImage *Image)
+KADMOS_ERROR CRep::SetImage(TQImage *Image)
{
// memcpy(&m_RepData.image, Image.bits(), Image.numBytes());
if( !Image ) return RE_PARAMETERERROR;
@@ -411,12 +411,12 @@ void CRep::CheckError()
}
}
-/* returns a QString containing the string describing the kadmos error */
-QString CRep::getErrorText() const
+/* returns a TQString containing the string describing the kadmos error */
+TQString CRep::getErrorText() const
{
re_ErrorText Err;
re_GetErrorText(&Err);
- return QString::fromLocal8Bit( Err.text );
+ return TQString::fromLocal8Bit( Err.text );
}
bool CRep::kadmosError()
diff --git a/kooka/kadmosocr.h b/kooka/kadmosocr.h
index 12056209..cc4d225f 100644
--- a/kooka/kadmosocr.h
+++ b/kooka/kadmosocr.h
@@ -31,18 +31,18 @@
#ifndef __KADMOS_OCR_
#define __KADMOS_OCR_
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include "config.h"
#ifdef HAVE_KADMOS
/* class declarations */
-class QImage;
-class QPixmap;
-class QColor;
-class QStringList;
-class QRect;
+class TQImage;
+class TQPixmap;
+class TQColor;
+class TQStringList;
+class TQRect;
class ocrWord;
@@ -53,7 +53,7 @@ namespace Kadmos {
/* include files */
#include "kadmos.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
/* ---------------------------------------- REP ---------------------------------------- */
//! Maximum number of lines in a paragraph
@@ -91,8 +91,8 @@ namespace Kadmos {
/**
@param Image is an image object
*/
- KADMOS_ERROR SetImage(QImage* Image);
- KADMOS_ERROR SetImage( const QString );
+ KADMOS_ERROR SetImage(TQImage* Image);
+ KADMOS_ERROR SetImage( const TQString );
int GetMaxLine();
ocrWordList getLineWords( int line );
@@ -100,7 +100,7 @@ namespace Kadmos {
const char* RepTextLine(int Line, unsigned char RejectLevel=128,
int RejectChar='~', long Format=TEXT_FORMAT_ANSI);
- void analyseLine(int, QPixmap* );
+ void analyseLine(int, TQPixmap* );
/** Enable/disable noise reduction
@param TRUE(enable)/FALSE(disable) noise reduction
*/
@@ -112,28 +112,28 @@ namespace Kadmos {
void SetScaling(bool bScaling);
/* draw graphic visualiser into the pixmap pointed to */
- virtual void drawLineBox( QPixmap*, const QRect& );
- virtual void drawCharBox( QPixmap*, const QRect& );
- virtual void drawBox( QPixmap*, const QRect&, const QColor& );
+ virtual void drawLineBox( TQPixmap*, const TQRect& );
+ virtual void drawCharBox( TQPixmap*, const TQRect& );
+ virtual void drawBox( TQPixmap*, const TQRect&, const TQColor& );
- int nextBestWord( int line, int knode, QString& theWord, QRect& brect );
+ int nextBestWord( int line, int knode, TQString& theWord, TQRect& brect );
- /* Error text in QString */
- QString getErrorText() const;
+ /* Error text in TQString */
+ TQString getErrorText() const;
bool kadmosError();
private:
- void partStrings( int line, int graphKnode, QString soFar );
+ void partStrings( int line, int graphKnode, TQString soFar );
void CheckError();
RepData m_RepData;
KADMOS_ERROR m_Error;
char m_Line[2*CHAR_MAX_LEN];
int m_currLine;
- QStringList m_parts;
- QString m_theWord;
+ TQStringList m_parts;
+ TQString m_theWord;
int m_recurse;
- QChar m_undetectChar;
+ TQChar m_undetectChar;
};
} /* End of Kadmos namespace */
diff --git a/kooka/kocrbase.cpp b/kooka/kocrbase.cpp
index 889739e7..3ede6ef0 100644
--- a/kooka/kocrbase.cpp
+++ b/kooka/kocrbase.cpp
@@ -24,10 +24,10 @@
* *
***************************************************************************/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qfileinfo.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqfileinfo.h>
+#include <tqtooltip.h>
#include <kio/job.h>
#include <kio/previewjob.h>
@@ -40,8 +40,8 @@
#include <kseparator.h>
#include <kmessagebox.h>
#include <kactivelabel.h>
-#include <qhbox.h>
-#include <qvbox.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
#include "resource.h"
#include "kocrbase.h"
@@ -52,14 +52,14 @@
#include <kstandarddirs.h>
#include <kfilemetainfo.h>
#include <ksconfig.h>
-#include <qstringlist.h>
-#include <qcolor.h>
-#include <qgrid.h>
-#include <qsizepolicy.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-
-KOCRBase::KOCRBase( QWidget *parent, KSpellConfig *spellConfig,
+#include <tqstringlist.h>
+#include <tqcolor.h>
+#include <tqgrid.h>
+#include <tqsizepolicy.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
+
+KOCRBase::KOCRBase( TQWidget *parent, KSpellConfig *spellConfig,
KDialogBase::DialogType face )
:KDialogBase( face, i18n("Optical Character Recognition"),
User2|Close|User1, User1, parent,0, false, true,
@@ -86,9 +86,9 @@ KOCRBase::KOCRBase( QWidget *parent, KSpellConfig *spellConfig,
m_userWantsSpellCheck = konf->readBoolEntry(CFG_WANT_KSPELL, true);
/* Connect signals which disable the fields and store the configuration */
- connect( this, SIGNAL( user1Clicked()), this, SLOT( writeConfig()));
- connect( this, SIGNAL( user1Clicked()), this, SLOT( startOCR() ));
- connect( this, SIGNAL( user2Clicked()), this, SLOT( stopOCR() ));
+ connect( this, TQT_SIGNAL( user1Clicked()), this, TQT_SLOT( writeConfig()));
+ connect( this, TQT_SIGNAL( user1Clicked()), this, TQT_SLOT( startOCR() ));
+ connect( this, TQT_SIGNAL( user2Clicked()), this, TQT_SLOT( stopOCR() ));
m_previewSize.setWidth(200);
m_previewSize.setHeight(300);
@@ -98,11 +98,11 @@ KOCRBase::KOCRBase( QWidget *parent, KSpellConfig *spellConfig,
}
-KAnimWidget* KOCRBase::getAnimation(QWidget *parent)
+KAnimWidget* KOCRBase::getAnimation(TQWidget *parent)
{
if( ! m_animation )
{
- m_animation = new KAnimWidget( QString("kde"), 48, parent, "ANIMATION" );
+ m_animation = new KAnimWidget( TQString("kde"), 48, parent, "ANIMATION" );
}
return( m_animation );
}
@@ -119,24 +119,24 @@ EngineError KOCRBase::setupGui()
void KOCRBase::imgIntro()
{
m_imgPage = addVBoxPage( i18n("Image") );
- (void) new QLabel( i18n("Image Information"), m_imgPage );
+ (void) new TQLabel( i18n("Image Information"), m_imgPage );
// Caption - Label and image
- m_imgHBox = new QHBox( m_imgPage );
+ m_imgHBox = new TQHBox( m_imgPage );
m_imgHBox->setSpacing( KDialog::spacingHint());
- m_previewPix = new QLabel( m_imgHBox );
- m_previewPix->setPixmap(QPixmap());
+ m_previewPix = new TQLabel( m_imgHBox );
+ m_previewPix->setPixmap(TQPixmap());
m_previewPix->setFixedSize(m_previewSize);
m_previewPix->setAlignment( Qt::AlignCenter );
- m_previewPix->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ m_previewPix->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
// m_previewPix->resize(m_previewSize);
/* See introduceImage where the meta box is filled with data from the
* incoming widget.
*/
- m_metaBox = new QVBox( m_imgHBox );
+ m_metaBox = new TQVBox( m_imgHBox );
}
/*
@@ -148,22 +148,22 @@ void KOCRBase::ocrIntro( )
// Caption - Label and image
/* labelstring */
- (void) new QLabel( i18n("<b>Starting Optical Character Recognition with %1</b><p>").
+ (void) new TQLabel( i18n("<b>Starting Optical Character Recognition with %1</b><p>").
arg( ocrEngineName() ), m_ocrPage );
// Find the kadmos logo and display if available
KStandardDirs stdDir;
- QString logo = stdDir.findResource( "data", "kooka/pics/" + ocrEngineLogo() );
+ TQString logo = stdDir.findResource( "data", "kooka/pics/" + ocrEngineLogo() );
kdDebug(28000)<< "Reading logo " << logo << endl;
- QPixmap pix;
- QWidget *pa = m_ocrPage;
+ TQPixmap pix;
+ TQWidget *pa = m_ocrPage;
if( pix.load( logo ))
{
- QHBox *hb_cap = new QHBox( m_ocrPage );
+ TQHBox *hb_cap = new TQHBox( m_ocrPage );
hb_cap->setSpacing( KDialog::spacingHint());
- QLabel *imgLab = new QLabel( hb_cap );
+ TQLabel *imgLab = new TQLabel( hb_cap );
imgLab->setAlignment( Qt::AlignHCenter | Qt::AlignTop );
imgLab->setPixmap( pix );
pa = hb_cap;
@@ -178,26 +178,26 @@ void KOCRBase::spellCheckIntro()
m_spellchkPage = addVBoxPage( i18n("Spell-checking") );
/* Want the spell checking at all? Checkbox here */
- QGroupBox *gb1 = new QGroupBox( 1, Qt::Horizontal, i18n("OCR Post Processing"), m_spellchkPage );
- m_cbWantCheck = new QCheckBox( i18n("Enable spell-checking for validation of the OCR result"),
+ TQGroupBox *gb1 = new TQGroupBox( 1, Qt::Horizontal, i18n("OCR Post Processing"), m_spellchkPage );
+ m_cbWantCheck = new TQCheckBox( i18n("Enable spell-checking for validation of the OCR result"),
gb1 );
/* Spellcheck options */
- m_gbSpellOpts = new QGroupBox( 1, Qt::Horizontal, i18n("Spell-Check Options"),
+ m_gbSpellOpts = new TQGroupBox( 1, Qt::Horizontal, i18n("Spell-Check Options"),
m_spellchkPage );
KSpellConfig *sCfg = new KSpellConfig( m_gbSpellOpts, "SPELLCHK", m_spellConfig, false );
/* A space eater */
- QWidget *spaceEater = new QWidget(m_spellchkPage);
- spaceEater->setSizePolicy( QSizePolicy( QSizePolicy::Ignored, QSizePolicy::Ignored ));
+ TQWidget *spaceEater = new TQWidget(m_spellchkPage);
+ spaceEater->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ));
/* connect toggle button */
- connect( m_cbWantCheck, SIGNAL(toggled(bool)), this, SLOT(slWantSpellcheck(bool)));
+ connect( m_cbWantCheck, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slWantSpellcheck(bool)));
m_cbWantCheck->setChecked( m_userWantsSpellCheck );
m_gbSpellOpts->setEnabled( m_userWantsSpellCheck );
m_spellConfig = sCfg;
- connect( sCfg, SIGNAL(configChanged()),
- this, SLOT(slSpellConfigChanged()));
+ connect( sCfg, TQT_SIGNAL(configChanged()),
+ this, TQT_SLOT(slSpellConfigChanged()));
}
void KOCRBase::slSpellConfigChanged()
@@ -228,12 +228,12 @@ void KOCRBase::introduceImage( KookaImage* img)
{
if( ! (img && img->isFileBound()) ) return;
KFileMetaInfo info = img->fileMetaInfo();
- QStringList groups;
+ TQStringList groups;
if ( info.isValid() )
groups = info.preferredGroups();
delete m_metaBox;
- m_metaBox = new QVBox( m_imgHBox );
+ m_metaBox = new TQVBox( m_imgHBox );
/* Start to create a preview job for the thumb */
KURL::List li(img->url());
@@ -242,50 +242,50 @@ void KOCRBase::introduceImage( KookaImage* img)
if( m_job )
{
- connect( m_job, SIGNAL( result( KIO::Job * )),
- this, SLOT( slPreviewResult( KIO::Job * )));
- connect( m_job, SIGNAL( gotPreview( const KFileItem*, const QPixmap& )),
- SLOT( slGotPreview( const KFileItem*, const QPixmap& ) ));
+ connect( m_job, TQT_SIGNAL( result( KIO::Job * )),
+ this, TQT_SLOT( slPreviewResult( KIO::Job * )));
+ connect( m_job, TQT_SIGNAL( gotPreview( const KFileItem*, const TQPixmap& )),
+ TQT_SLOT( slGotPreview( const KFileItem*, const TQPixmap& ) ));
/* KIO::Jo result is called in any way: Success, Failed, Error,
* thus connecting the failed is not really necessary.
*/
}
- for ( QStringList::Iterator it = groups.begin(); it != groups.end(); ++it )
+ for ( TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it )
{
- QString theGroup(*it);
+ TQString theGroup(*it);
kdDebug(29000) << "handling the group " << theGroup << endl;
- QStringList keys = info.group(theGroup).supportedKeys();
+ TQStringList keys = info.group(theGroup).supportedKeys();
if( keys.count() > 0 )
{
// info.groupInfo( theGroup )->translatedName()
// FIXME: howto get the translated group name?
- QLabel *lGroup = new QLabel( theGroup, m_metaBox );
- lGroup->setBackgroundColor( QColor(gray));
+ TQLabel *lGroup = new TQLabel( theGroup, m_metaBox );
+ lGroup->setBackgroundColor( TQColor(gray));
lGroup->setMargin( KDialog::spacingHint());
- QGrid *nGrid = new QGrid( 2, m_metaBox );
+ TQGrid *nGrid = new TQGrid( 2, m_metaBox );
nGrid->setSpacing( KDialog::spacingHint());
- for ( QStringList::Iterator keyIt = keys.begin(); keyIt != keys.end(); ++keyIt )
+ for ( TQStringList::Iterator keyIt = keys.begin(); keyIt != keys.end(); ++keyIt )
{
KFileMetaInfoItem item = info.item(*keyIt);
- QString itKey = item.translatedKey();
+ TQString itKey = item.translatedKey();
if( itKey.isEmpty() )
itKey = item.key();
if( ! itKey.isEmpty() )
{
- (void) new QLabel( item.translatedKey() + ": ", nGrid );
- (void) new QLabel( item.string(), nGrid );
+ (void) new TQLabel( item.translatedKey() + ": ", nGrid );
+ (void) new TQLabel( item.string(), nGrid );
kdDebug(29000) << "hasKey " << *keyIt << endl;
}
}
}
}
- QWidget *spaceEater = new QWidget( m_metaBox );
- spaceEater->setSizePolicy( QSizePolicy( QSizePolicy::Ignored, QSizePolicy::Ignored ));
+ TQWidget *spaceEater = new TQWidget( m_metaBox );
+ spaceEater->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ));
m_metaBox->show();
}
@@ -299,7 +299,7 @@ void KOCRBase::slPreviewResult(KIO::Job *job )
}
}
-void KOCRBase::slGotPreview( const KFileItem*, const QPixmap& newPix )
+void KOCRBase::slGotPreview( const KFileItem*, const TQPixmap& newPix )
{
kdDebug(28000) << "Got the preview" << endl;
m_previewPix->setPixmap(newPix);
diff --git a/kooka/kocrbase.h b/kooka/kocrbase.h
index 05987b1d..a2a04342 100644
--- a/kooka/kocrbase.h
+++ b/kooka/kocrbase.h
@@ -29,8 +29,8 @@
#include <kdialogbase.h>
#include <kio/previewjob.h>
-#include <qimage.h>
-#include <qstring.h>
+#include <tqimage.h>
+#include <tqstring.h>
#include <kscanslider.h>
#include <kanimwidget.h>
@@ -43,19 +43,19 @@
class KookaImage;
-class QHBox;
-class QVBox;
-class QLabel;
-class QSize;
+class TQHBox;
+class TQVBox;
+class TQLabel;
+class TQSize;
class KSpellConfig;
-class QCheckBox;
-class QGroupBox;
+class TQCheckBox;
+class TQGroupBox;
class KOCRBase: public KDialogBase
{
Q_OBJECT
public:
- KOCRBase( QWidget *, KSpellConfig *spellConfig,
+ KOCRBase( TQWidget *, KSpellConfig *spellConfig,
KDialogBase::DialogType face = KDialogBase::Plain );
~KOCRBase();
@@ -64,21 +64,21 @@ public:
/**
* @return the name of the ocr engine
*/
- virtual QString ocrEngineName() const { return QString(); }
+ virtual TQString ocrEngineName() const { return TQString(); }
/**
* @return the filename (without path) of the logo of the ocr engine.
* the logo needs to be installed in $KDEDIR/share/apps/kooka/pics
*/
- virtual QString ocrEngineLogo() const { return QString(); }
+ virtual TQString ocrEngineLogo() const { return TQString(); }
/**
* @return a description string of the ocr engine
*/
- virtual QString ocrEngineDesc() const { return QString(); }
+ virtual TQString ocrEngineDesc() const { return TQString(); }
- QVBox* ocrPage() const { return m_ocrPage; }
- QVBox* imagePage() const { return m_imgPage; }
+ TQVBox* ocrPage() const { return m_ocrPage; }
+ TQVBox* imagePage() const { return m_imgPage; }
KSpellConfig* spellConfig() const
{ return m_spellConfig; }
@@ -123,7 +123,7 @@ protected:
protected slots:
- virtual KAnimWidget* getAnimation(QWidget*);
+ virtual KAnimWidget* getAnimation(TQWidget*);
virtual void writeConfig();
virtual void slSpellConfigChanged();
@@ -134,25 +134,25 @@ protected slots:
private slots:
virtual void slPreviewResult( KIO::Job* );
- virtual void slGotPreview( const KFileItem*, const QPixmap& );
+ virtual void slGotPreview( const KFileItem*, const TQPixmap& );
private:
KAnimWidget *m_animation;
- QVBox *m_ocrPage;
- QVBox *m_imgPage;
- QVBox *m_spellchkPage;
- QVBox *m_metaBox;
- QHBox *m_imgHBox;
- QLabel *m_previewPix;
+ TQVBox *m_ocrPage;
+ TQVBox *m_imgPage;
+ TQVBox *m_spellchkPage;
+ TQVBox *m_metaBox;
+ TQHBox *m_imgHBox;
+ TQLabel *m_previewPix;
KookaImage *m_currImg;
KSpellConfig *m_spellConfig;
bool m_wantSpellCfg; /* show the spellcheck options? */
bool m_userWantsSpellCheck; /* user has enabled/disabled spellcheck */
- QSize m_previewSize;
+ TQSize m_previewSize;
- QCheckBox *m_cbWantCheck;
- QGroupBox *m_gbSpellOpts;
+ TQCheckBox *m_cbWantCheck;
+ TQGroupBox *m_gbSpellOpts;
};
#endif
diff --git a/kooka/kocrgocr.cpp b/kooka/kocrgocr.cpp
index cfc4c92c..aa6eb333 100644
--- a/kooka/kocrgocr.cpp
+++ b/kooka/kocrgocr.cpp
@@ -26,10 +26,10 @@
/* $Id$ */
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qfileinfo.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqfileinfo.h>
+#include <tqtooltip.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -47,8 +47,8 @@
#include <kscanslider.h>
#include "kookaimage.h"
#include "kookapref.h"
-#include <qvbox.h>
-#include <qhbox.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
/* defines for konfig-reading */
@@ -58,25 +58,25 @@
-KGOCRDialog::KGOCRDialog( QWidget *parent, KSpellConfig *spellConfig )
+KGOCRDialog::KGOCRDialog( TQWidget *parent, KSpellConfig *spellConfig )
:KOCRBase( parent, spellConfig, KDialogBase::Tabbed ),
- m_ocrCmd( QString())
+ m_ocrCmd( TQString())
{
kdDebug(28000) << "Starting KOCR-Start-Dialog!" << endl;
// Layout-Boxes
}
-QString KGOCRDialog::ocrEngineLogo() const
+TQString KGOCRDialog::ocrEngineLogo() const
{
return "gocr.png";
}
-QString KGOCRDialog::ocrEngineName() const
+TQString KGOCRDialog::ocrEngineName() const
{
return i18n("GOCR" );
}
-QString KGOCRDialog::ocrEngineDesc() const
+TQString KGOCRDialog::ocrEngineDesc() const
{
return i18n("GOCR is an Open Source project "
"for optical character recognition.<P>"
@@ -90,7 +90,7 @@ EngineError KGOCRDialog::setupGui()
{
KOCRBase::setupGui();
- QVBox *page = ocrPage();
+ TQVBox *page = ocrPage();
Q_CHECK_PTR( page );
KConfig *conf = KGlobal::config ();
@@ -100,7 +100,7 @@ EngineError KGOCRDialog::setupGui()
// (void) new KSeparator( KSeparator::HLine, page);
// Entry-Field.
- QString res = conf->readPathEntry( CFG_GOCR_BINARY, "notFound" );
+ TQString res = conf->readPathEntry( CFG_GOCR_BINARY, "notFound" );
if( res == "notFound" )
{
res = KookaPreferences::tryFindGocr();
@@ -118,12 +118,12 @@ EngineError KGOCRDialog::setupGui()
else
m_ocrCmd = res;
- (void) new QLabel( i18n("Using GOCR binary: ") + res, page );
+ (void) new TQLabel( i18n("Using GOCR binary: ") + res, page );
(void) new KSeparator( KSeparator::HLine, page);
- QHBox *hb = new QHBox(page);
+ TQHBox *hb = new TQHBox(page);
hb->setSpacing( KDialog::spacingHint());
- QVBox *innerBox = new QVBox( hb );
+ TQVBox *innerBox = new TQVBox( hb );
innerBox->setSpacing( KDialog::spacingHint());
/* This is for a 'work-in-progress'-Animation */
getAnimation(hb);
@@ -132,19 +132,19 @@ EngineError KGOCRDialog::setupGui()
sliderGrayLevel = new KScanSlider( innerBox , i18n("&Gray level"), 0, 254, true, 160 );
int numdefault = conf->readNumEntry( CFG_GOCR_GRAYLEVEL, 160 );
sliderGrayLevel->slSetSlider( numdefault );
- QToolTip::add( sliderGrayLevel,
+ TQToolTip::add( sliderGrayLevel,
i18n( "The numeric value gray pixels are \nconsidered to be black.\n\nDefault is 160"));
sliderDustSize = new KScanSlider( innerBox, i18n("&Dust size" ), 0, 60, true, 10 );
numdefault = conf->readNumEntry( CFG_GOCR_DUSTSIZE, 10 );
sliderDustSize->slSetSlider( numdefault );
- QToolTip::add( sliderDustSize,
+ TQToolTip::add( sliderDustSize,
i18n( "Clusters smaller than this value\nwill be considered to be dust and \nremoved from the image.\n\nDefault is 10"));
sliderSpace = new KScanSlider( innerBox, i18n( "&Space width" ), 0, 60, true, 0 );
numdefault = conf->readNumEntry( CFG_GOCR_SPACEWIDTH, 0 );
sliderSpace->slSetSlider( numdefault );
- QToolTip::add( sliderSpace, i18n("Spacing between characters.\n\nDefault is 0 what means autodetection"));
+ TQToolTip::add( sliderSpace, i18n("Spacing between characters.\n\nDefault is 0 what means autodetection"));
return ENG_OK;
}
@@ -182,7 +182,7 @@ void KGOCRDialog::writeConfig( void )
KConfig *conf = KGlobal::config ();
conf->setGroup( CFG_GROUP_OCR_DIA );
- conf->writeEntry( CFG_GOCR_BINARY, QString(getOCRCmd()));
+ conf->writeEntry( CFG_GOCR_BINARY, TQString(getOCRCmd()));
conf->writeEntry( CFG_GOCR_GRAYLEVEL, getGraylevel());
conf->writeEntry( CFG_GOCR_DUSTSIZE, getDustsize());
conf->writeEntry( CFG_GOCR_SPACEWIDTH, getSpaceWidth());
diff --git a/kooka/kocrgocr.h b/kooka/kocrgocr.h
index 619cfedd..f17cdd0a 100644
--- a/kooka/kocrgocr.h
+++ b/kooka/kocrgocr.h
@@ -29,8 +29,8 @@
#define KOCRGOCR_H
#include <kdialogbase.h>
-#include <qimage.h>
-#include <qstring.h>
+#include <tqimage.h>
+#include <tqstring.h>
#include <kscanslider.h>
#include <kanimwidget.h>
@@ -46,10 +46,10 @@ class KGOCRDialog: public KOCRBase
{
Q_OBJECT
public:
- KGOCRDialog( QWidget*, KSpellConfig* );
+ KGOCRDialog( TQWidget*, KSpellConfig* );
~KGOCRDialog();
- QString getOCRCmd( void ) const
+ TQString getOCRCmd( void ) const
{ return m_ocrCmd;}
int getGraylevel( void ) const
@@ -61,9 +61,9 @@ public:
EngineError setupGui();
- QString ocrEngineName() const;
- QString ocrEngineDesc() const;
- QString ocrEngineLogo() const;
+ TQString ocrEngineName() const;
+ TQString ocrEngineDesc() const;
+ TQString ocrEngineLogo() const;
public slots:
void enableFields(bool);
@@ -80,7 +80,7 @@ private:
KScanSlider *sliderDustSize;
KScanSlider *sliderSpace;
- QString m_ocrCmd;
+ TQString m_ocrCmd;
};
#endif
diff --git a/kooka/kocrkadmos.cpp b/kooka/kocrkadmos.cpp
index b4d58244..6ac6fb12 100644
--- a/kooka/kocrkadmos.cpp
+++ b/kooka/kocrkadmos.cpp
@@ -24,16 +24,16 @@
* *
***************************************************************************/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qfileinfo.h>
-#include <qtooltip.h>
-#include <qvbox.h>
-#include <qdict.h>
-#include <qdir.h>
-#include <qmap.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqfileinfo.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
+#include <tqdict.h>
+#include <tqdir.h>
+#include <tqmap.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -50,9 +50,9 @@
#include "kocrkadmos.moc"
#include <kscanslider.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kstandarddirs.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
/* defines for konfig-reading */
@@ -64,7 +64,7 @@
#define CNTRY_CZ i18n( "Czech Republic, Slovakia")
#define CNTRY_GB i18n( "Great Britain, USA" )
-KadmosDialog::KadmosDialog( QWidget *parent, KSpellConfig *spellConfig )
+KadmosDialog::KadmosDialog( TQWidget *parent, KSpellConfig *spellConfig )
:KOCRBase( parent, spellConfig, KDialogBase::Tabbed ),
m_cbNoise(0),
m_cbAutoscale(0),
@@ -75,17 +75,17 @@ KadmosDialog::KadmosDialog( QWidget *parent, KSpellConfig *spellConfig )
findClassifiers();
}
-QString KadmosDialog::ocrEngineLogo() const
+TQString KadmosDialog::ocrEngineLogo() const
{
return "kadmoslogo.png";
}
-QString KadmosDialog::ocrEngineName() const
+TQString KadmosDialog::ocrEngineName() const
{
return i18n("KADMOS OCR/ICR");
}
-QString KadmosDialog::ocrEngineDesc() const
+TQString KadmosDialog::ocrEngineDesc() const
{
return i18n("This version of Kooka was linked with the <I>KADMOS OCR/ICR engine</I>, a "
"commercial engine for optical character recognition.<P>"
@@ -101,8 +101,8 @@ EngineError KadmosDialog::findClassifiers()
findClassifierPath();
KLocale *locale = KGlobal::locale();
- QStringList allCountries = locale->allLanguagesTwoAlpha ();
- for ( QStringList::Iterator it = allCountries.begin();
+ TQStringList allCountries = locale->allLanguagesTwoAlpha ();
+ for ( TQStringList::Iterator it = allCountries.begin();
it != allCountries.end(); ++it )
{
m_longCountry2short[locale->twoAlphaToCountryName(*it)] = *it;
@@ -111,30 +111,30 @@ EngineError KadmosDialog::findClassifiers()
m_longCountry2short[ CNTRY_CZ ] = "cz";
m_longCountry2short[ CNTRY_GB ] = "us";
- QStringList lst;
+ TQStringList lst;
/* custom Path */
if( ! m_customClassifierPath.isEmpty() )
{
- QDir dir( m_customClassifierPath );
+ TQDir dir( m_customClassifierPath );
- QStringList lst1 = dir.entryList( "ttf*.rec" );
+ TQStringList lst1 = dir.entryList( "ttf*.rec" );
- for ( QStringList::Iterator it = lst1.begin(); it != lst1.end(); ++it )
+ for ( TQStringList::Iterator it = lst1.begin(); it != lst1.end(); ++it )
{
lst << m_customClassifierPath + *it;
}
lst1 = dir.entryList( "hand*.rec" );
- for ( QStringList::Iterator it = lst1.begin(); it != lst1.end(); ++it )
+ for ( TQStringList::Iterator it = lst1.begin(); it != lst1.end(); ++it )
{
lst << m_customClassifierPath + *it;
}
lst1 = dir.entryList( "norm*.rec" );
- for ( QStringList::Iterator it = lst1.begin(); it != lst1.end(); ++it )
+ for ( TQStringList::Iterator it = lst1.begin(); it != lst1.end(); ++it )
{
lst << m_customClassifierPath + *it;
}
@@ -153,19 +153,19 @@ EngineError KadmosDialog::findClassifiers()
/* no go through lst and sort out hand-, ttf- and norm classifier */
- for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
+ for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
{
- QFileInfo fi( *it);
- QString name = fi.fileName().lower();
+ TQFileInfo fi( *it);
+ TQString name = fi.fileName().lower();
kdDebug(28000) << "Checking file " << *it << endl;
if( name.startsWith( "ttf" ) )
{
- QString lang = name.mid(3,2);
+ TQString lang = name.mid(3,2);
if( allCountries.contains(lang) )
{
- QString lngCountry = locale->twoAlphaToCountryName(lang);
+ TQString lngCountry = locale->twoAlphaToCountryName(lang);
if( lngCountry.isEmpty() )
lngCountry = name;
m_ttfClassifier << lngCountry;
@@ -187,10 +187,10 @@ EngineError KadmosDialog::findClassifiers()
}
else if( name.startsWith( "hand" ) )
{
- QString lang = name.mid(4,2);
+ TQString lang = name.mid(4,2);
if( allCountries.contains(lang) )
{
- QString lngCountry = locale->twoAlphaToCountryName(lang);
+ TQString lngCountry = locale->twoAlphaToCountryName(lang);
if( lngCountry.isEmpty() )
lngCountry = name;
m_handClassifier << lngCountry;
@@ -269,43 +269,43 @@ EngineError KadmosDialog::setupGui()
// setupClassification( addVBoxPage( i18n("Classification")));
/* continue page setup on the first page */
- QVBox *page = ocrPage();
+ TQVBox *page = ocrPage();
// Horizontal line
(void) new KSeparator( KSeparator::HLine, page);
// FIXME: dynamic classifier reading.
- (void) new QLabel( i18n("Please classify the font type and language of the text on the image:"),
+ (void) new TQLabel( i18n("Please classify the font type and language of the text on the image:"),
page );
- QHBox *locBox = new QHBox( page );
- m_bbFont = new QButtonGroup(1, Qt::Horizontal, i18n("Font Type Selection"), locBox);
+ TQHBox *locBox = new TQHBox( page );
+ m_bbFont = new TQButtonGroup(1, Qt::Horizontal, i18n("Font Type Selection"), locBox);
- m_rbMachine = new QRadioButton( i18n("Machine print"), m_bbFont );
- m_rbHand = new QRadioButton( i18n("Hand writing"), m_bbFont );
- m_rbNorm = new QRadioButton( i18n("Norm font"), m_bbFont );
+ m_rbMachine = new TQRadioButton( i18n("Machine print"), m_bbFont );
+ m_rbHand = new TQRadioButton( i18n("Hand writing"), m_bbFont );
+ m_rbNorm = new TQRadioButton( i18n("Norm font"), m_bbFont );
- m_gbLang = new QGroupBox(1, Qt::Horizontal, i18n("Country"), locBox);
+ m_gbLang = new TQGroupBox(1, Qt::Horizontal, i18n("Country"), locBox);
- m_cbLang = new QComboBox( m_gbLang );
+ m_cbLang = new TQComboBox( m_gbLang );
m_cbLang->setCurrentText( KLocale::defaultCountry() );
- connect( m_bbFont, SIGNAL(clicked(int)), this, SLOT(slFontChanged(int) ));
+ connect( m_bbFont, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slFontChanged(int) ));
m_rbMachine->setChecked(true);
/* --- */
- QHBox *innerBox = new QHBox( page );
+ TQHBox *innerBox = new TQHBox( page );
innerBox->setSpacing( KDialog::spacingHint());
- QButtonGroup *cbGroup = new QButtonGroup( 1, Qt::Horizontal, i18n("OCR Modifier"), innerBox );
+ TQButtonGroup *cbGroup = new TQButtonGroup( 1, Qt::Horizontal, i18n("OCR Modifier"), innerBox );
Q_CHECK_PTR(cbGroup);
- m_cbNoise = new QCheckBox( i18n( "Enable automatic noise reduction" ), cbGroup );
- m_cbAutoscale = new QCheckBox( i18n( "Enable automatic scaling"), cbGroup );
+ m_cbNoise = new TQCheckBox( i18n( "Enable automatic noise reduction" ), cbGroup );
+ m_cbAutoscale = new TQCheckBox( i18n( "Enable automatic scaling"), cbGroup );
getAnimation(innerBox);
- // (void) new QWidget ( page );
+ // (void) new TQWidget ( page );
if( err != ENG_OK )
{
@@ -366,17 +366,17 @@ void KadmosDialog::slFontChanged( int id )
}
-void KadmosDialog::setupPreprocessing( QVBox* )
+void KadmosDialog::setupPreprocessing( TQVBox* )
{
}
-void KadmosDialog::setupSegmentation( QVBox* )
+void KadmosDialog::setupSegmentation( TQVBox* )
{
}
-void KadmosDialog::setupClassification( QVBox* )
+void KadmosDialog::setupClassification( TQVBox* )
{
}
@@ -386,19 +386,19 @@ void KadmosDialog::setupClassification( QVBox* )
* was one found.
*/
-bool KadmosDialog::getSelClassifier( QString& path ) const
+bool KadmosDialog::getSelClassifier( TQString& path ) const
{
- QString classifier = getSelClassifierName();
+ TQString classifier = getSelClassifierName();
- QString cmplPath;
+ TQString cmplPath;
/*
* Search the complete path for the classifier file name
* returned from the getSelClassifierName method
*/
- for ( QStringList::ConstIterator it = m_classifierPath.begin();
+ for ( TQStringList::ConstIterator it = m_classifierPath.begin();
it != m_classifierPath.end(); ++it )
{
- QFileInfo fi( *it );
+ TQFileInfo fi( *it );
if( fi.fileName() == classifier )
{
cmplPath = *it;
@@ -417,7 +417,7 @@ bool KadmosDialog::getSelClassifier( QString& path ) const
else
{
/* Check if the classifier exists on the HD. If not, return an empty string */
- QFileInfo fi(cmplPath);
+ TQFileInfo fi(cmplPath);
if( res && ! fi.exists() )
{
@@ -439,11 +439,11 @@ bool KadmosDialog::getSelClassifier( QString& path ) const
return res;
}
-QString KadmosDialog::getSelClassifierName() const
+TQString KadmosDialog::getSelClassifierName() const
{
- QButton *butt = m_bbFont->selected();
+ TQButton *butt = m_bbFont->selected();
- QString fType, rType;
+ TQString fType, rType;
if( butt )
{
@@ -459,11 +459,11 @@ QString KadmosDialog::getSelClassifierName() const
}
/* Get the long text from the combo box */
- QString selLang = m_cbLang->currentText();
- QString trans;
+ TQString selLang = m_cbLang->currentText();
+ TQString trans;
if( fType != "norm" && m_longCountry2short.contains( selLang ))
{
- QString langType = m_longCountry2short[selLang];
+ TQString langType = m_longCountry2short[selLang];
trans = fType+langType+".rec";
}
else
diff --git a/kooka/kocrkadmos.h b/kooka/kocrkadmos.h
index 38247cc9..567af55b 100644
--- a/kooka/kocrkadmos.h
+++ b/kooka/kocrkadmos.h
@@ -29,7 +29,7 @@
#define KOCRKADMOS_H
#include <kdialogbase.h>
-#include <qmap.h>
+#include <tqmap.h>
#include "kocrbase.h"
/**
@@ -39,27 +39,27 @@
class KScanCombo;
-class QWidget;
-class QButtonGroup;
+class TQWidget;
+class TQButtonGroup;
class KConfig;
-class QCheckBox;
+class TQCheckBox;
class KSpellConfig;
-class QRadioButton;
+class TQRadioButton;
class KadmosClassifier /* Not yet used FIXME */
{
public:
- KadmosClassifier( QString lang, QString filename );
- QString getCmplFilename() const { return path+filename; }
- QString getFilename() const { return filename; }
- QString language() const { return languagesName; }
+ KadmosClassifier( TQString lang, TQString filename );
+ TQString getCmplFilename() const { return path+filename; }
+ TQString getFilename() const { return filename; }
+ TQString language() const { return languagesName; }
- void setPath( const QString& p ) { path=p; }
+ void setPath( const TQString& p ) { path=p; }
private:
- QString filename;
- QString path;
- QString languagesName;
+ TQString filename;
+ TQString path;
+ TQString languagesName;
};
@@ -67,20 +67,20 @@ class KadmosDialog: public KOCRBase
{
Q_OBJECT
public:
- KadmosDialog( QWidget *, KSpellConfig *spellConfig );
+ KadmosDialog( TQWidget *, KSpellConfig *spellConfig );
~KadmosDialog();
- typedef QMap<QString, QString> StrMap;
+ typedef TQMap<TQString, TQString> StrMap;
EngineError setupGui();
bool getAutoScale();
bool getNoiseReduction();
- bool getSelClassifier(QString&) const;
- QString getSelClassifierName() const;
+ bool getSelClassifier(TQString&) const;
+ TQString getSelClassifierName() const;
- QString ocrEngineName() const;
- QString ocrEngineDesc() const;
- QString ocrEngineLogo() const;
+ TQString ocrEngineName() const;
+ TQString ocrEngineDesc() const;
+ TQString ocrEngineLogo() const;
public slots:
void enableFields(bool);
@@ -88,9 +88,9 @@ public slots:
protected:
void writeConfig();
- void setupPreprocessing( QVBox *box );
- void setupSegmentation( QVBox *box );
- void setupClassification( QVBox *box );
+ void setupPreprocessing( TQVBox *box );
+ void setupSegmentation( TQVBox *box );
+ void setupClassification( TQVBox *box );
EngineError findClassifiers();
EngineError findClassifierPath();
@@ -101,27 +101,27 @@ private slots:
private:
StrMap m_classifierTranslate;
- QCheckBox *m_cbNoise;
- QCheckBox *m_cbAutoscale;
- QString m_customClassifierPath;
+ TQCheckBox *m_cbNoise;
+ TQCheckBox *m_cbAutoscale;
+ TQString m_customClassifierPath;
QButtonGroup *m_bbFont;
- QRadioButton *m_rbMachine;
- QRadioButton *m_rbHand;
- QRadioButton *m_rbNorm;
+ TQRadioButton *m_rbMachine;
+ TQRadioButton *m_rbHand;
+ TQRadioButton *m_rbNorm;
- QGroupBox *m_gbLang;
+ TQGroupBox *m_gbLang;
- QComboBox *m_cbLang;
+ TQComboBox *m_cbLang;
- QStringList m_ttfClassifier;
- QStringList m_handClassifier;
- QStringList m_classifierPath;
+ TQStringList m_ttfClassifier;
+ TQStringList m_handClassifier;
+ TQStringList m_classifierPath;
bool m_haveNorm;
- typedef QMap<QString, QString> StringMap;
+ typedef TQMap<TQString, TQString> StringMap;
StringMap m_longCountry2short;
};
diff --git a/kooka/kocrocrad.cpp b/kooka/kocrocrad.cpp
index 1ce94f65..aab63405 100644
--- a/kooka/kocrocrad.cpp
+++ b/kooka/kocrocrad.cpp
@@ -26,11 +26,11 @@
/* $Id$ */
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qfileinfo.h>
-#include <qtooltip.h>
-#include <qregexp.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqfileinfo.h>
+#include <tqtooltip.h>
+#include <tqregexp.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -48,15 +48,15 @@
#include <kscanslider.h>
#include "kookaimage.h"
#include "kookapref.h"
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qcombobox.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqcombobox.h>
-ocradDialog::ocradDialog( QWidget *parent, KSpellConfig *spellConfig )
+ocradDialog::ocradDialog( TQWidget *parent, KSpellConfig *spellConfig )
:KOCRBase( parent, spellConfig, KDialogBase::Tabbed ),
- m_ocrCmd( QString()),
+ m_ocrCmd( TQString()),
m_orfUrlRequester(0L),
m_layoutMode(0),
m_binaryLabel(0),
@@ -67,17 +67,17 @@ ocradDialog::ocradDialog( QWidget *parent, KSpellConfig *spellConfig )
// Layout-Boxes
}
-QString ocradDialog::ocrEngineLogo() const
+TQString ocradDialog::ocrEngineLogo() const
{
return "ocrad.png";
}
-QString ocradDialog::ocrEngineName() const
+TQString ocradDialog::ocrEngineName() const
{
return i18n("ocrad" );
}
-QString ocradDialog::ocrEngineDesc() const
+TQString ocradDialog::ocrEngineDesc() const
{
return i18n("ocrad is a Free Software project "
"for optical character recognition.<p>"
@@ -101,7 +101,7 @@ EngineError ocradDialog::setupGui()
{
KOCRBase::setupGui();
- QVBox *page = ocrPage();
+ TQVBox *page = ocrPage();
Q_CHECK_PTR( page );
KConfig *conf = KGlobal::config ();
@@ -111,7 +111,7 @@ EngineError ocradDialog::setupGui()
// (void) new KSeparator( KSeparator::HLine, page);
// Entry-Field.
- QString res = conf->readPathEntry( CFG_OCRAD_BINARY, "notFound" );
+ TQString res = conf->readPathEntry( CFG_OCRAD_BINARY, "notFound" );
if( res == "notFound" )
{
res = KookaPreferences::tryFindBinary("ocrad", CFG_OCRAD_BINARY);
@@ -135,10 +135,10 @@ EngineError ocradDialog::setupGui()
kdDebug(28000) << "Layout detection from config: " << layoutDetect << endl;
(void) new KSeparator( KSeparator::HLine, page);
- QHBox *hb1 = new QHBox(page);
+ TQHBox *hb1 = new TQHBox(page);
hb1->setSpacing( KDialog::spacingHint() );
- (void) new QLabel( i18n("OCRAD layout analysis mode: "), hb1);
- m_layoutMode = new QComboBox(hb1);
+ (void) new TQLabel( i18n("OCRAD layout 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);
@@ -146,10 +146,10 @@ EngineError ocradDialog::setupGui()
/** stating the ocrad binary **/
(void) new KSeparator( KSeparator::HLine, page);
- QHBox *hb = new QHBox(page);
+ TQHBox *hb = new TQHBox(page);
hb->setSpacing( KDialog::spacingHint());
- m_binaryLabel = new QLabel( i18n("Using ocrad binary: ") + res, hb );
+ m_binaryLabel = new TQLabel( i18n("Using ocrad binary: ") + res, hb );
// retrieve Program version and display
version(res);
@@ -180,7 +180,7 @@ void ocradDialog::writeConfig( void )
KConfig *conf = KGlobal::config ();
conf->setGroup( CFG_GROUP_OCR_DIA );
- conf->writeEntry( CFG_OCRAD_BINARY, QString(getOCRCmd()));
+ conf->writeEntry( CFG_OCRAD_BINARY, TQString(getOCRCmd()));
conf->setGroup( CFG_GROUP_OCRAD );
conf->writeEntry( CFG_OCRAD_LAYOUT_DETECTION, m_layoutMode->currentItem());
@@ -195,15 +195,15 @@ void ocradDialog::enableFields(bool )
/* Later: Allow interactive loading of orf files
* for now, return emty string
*/
-QString ocradDialog::orfUrl() const
+TQString ocradDialog::orfUrl() const
{
if( m_orfUrlRequester )
return m_orfUrlRequester->url();
else
- return QString();
+ return TQString();
}
-void ocradDialog::version( const QString& exe )
+void ocradDialog::version( const TQString& exe )
{
if( m_proc ) delete m_proc;
@@ -211,10 +211,10 @@ void ocradDialog::version( const QString& exe )
kdDebug(28000) << "Using " << exe << " as command" << endl;
*m_proc << exe;
- *m_proc << QString("-V");
+ *m_proc << TQString("-V");
- connect( m_proc, SIGNAL(receivedStdout(KProcess *, char *, int )),
- this, SLOT(slReceiveStdIn(KProcess *, char *, int )));
+ connect( m_proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int )),
+ this, TQT_SLOT(slReceiveStdIn(KProcess *, char *, int )));
if( ! m_proc->start( KProcess::NotifyOnExit, KProcess::Stdout ) )
{
@@ -224,19 +224,19 @@ void ocradDialog::version( const QString& exe )
void ocradDialog::slReceiveStdIn( KProcess*, char *buffer, int buflen)
{
- QString vstr = QString::fromUtf8(buffer, buflen);
+ TQString vstr = TQString::fromUtf8(buffer, buflen);
kdDebug(28000) << "Got input: "<< buffer << endl;
- QRegExp rx;
+ TQRegExp rx;
rx.setPattern("GNU Ocrad version ([\\d\\.]+)");
if( rx.search( vstr ) > -1 )
{
- QString vStr = rx.cap(1);
+ TQString vStr = rx.cap(1);
vStr.remove(0,2);
m_version = vStr.toInt();
- QString v = i18n("Version: ") + rx.cap(1);
+ TQString v = i18n("Version: ") + rx.cap(1);
if( m_binaryLabel )
{
diff --git a/kooka/kocrocrad.h b/kooka/kocrocrad.h
index d268f403..828aceed 100644
--- a/kooka/kocrocrad.h
+++ b/kooka/kocrocrad.h
@@ -29,8 +29,8 @@
#define KOCROCRAD_H
#include <kdialogbase.h>
-#include <qimage.h>
-#include <qstring.h>
+#include <tqimage.h>
+#include <tqstring.h>
#include <kscanslider.h>
#include <kanimwidget.h>
@@ -49,26 +49,26 @@
class KSpellConfig;
class KURLRequester;
class KProcess;
-class QLabel;
-class QComboBox;
+class TQLabel;
+class TQComboBox;
class ocradDialog: public KOCRBase
{
Q_OBJECT
public:
- ocradDialog( QWidget*, KSpellConfig* );
+ ocradDialog( TQWidget*, KSpellConfig* );
~ocradDialog();
- QString getOCRCmd( void ) const
+ TQString getOCRCmd( void ) const
{ return m_ocrCmd;}
EngineError setupGui();
- QString ocrEngineName() const;
- QString ocrEngineDesc() const;
- QString ocrEngineLogo() const;
+ TQString ocrEngineName() const;
+ TQString ocrEngineDesc() const;
+ TQString ocrEngineLogo() const;
- QString orfUrl() const;
+ TQString orfUrl() const;
int layoutDetectionMode() const;
@@ -88,17 +88,17 @@ protected:
private:
- void version( const QString& exe );
+ void version( const TQString& exe );
private slots:
void slReceiveStdIn( KProcess *proc, char *buffer, int buflen);
private:
- QString m_ocrCmd;
+ TQString m_ocrCmd;
KURLRequester *m_orfUrlRequester;
- QComboBox *m_layoutMode;
- QLabel *m_binaryLabel;
+ TQComboBox *m_layoutMode;
+ TQLabel *m_binaryLabel;
KProcess *m_proc;
int m_version;
};
diff --git a/kooka/kooka.cpp b/kooka/kooka.cpp
index 3e3d660d..aea6c2d8 100644
--- a/kooka/kooka.cpp
+++ b/kooka/kooka.cpp
@@ -30,11 +30,11 @@
#include "kookapref.h"
#include "imgprintdialog.h"
-#include <qlineedit.h>
-#include <qprinter.h>
-#include <qprintdialog.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
+#include <tqlineedit.h>
+#include <tqprinter.h>
+#include <tqprintdialog.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
#include <kglobal.h>
#include <klocale.h>
@@ -49,7 +49,7 @@
#include <kstatusbar.h>
#include <kurl.h>
#include <kurlrequesterdlg.h>
-#include <qstrlist.h>
+#include <tqstrlist.h>
#include <kedittoolbar.h>
#include <kmessagebox.h>
#include <kdockwidget.h>
@@ -57,13 +57,13 @@
#include <kstdaccel.h>
#include <kaction.h>
#include <kstdaction.h>
-#include <qiconset.h>
+#include <tqiconset.h>
#include <kurldrag.h>
#define DOCK_SIZES "DockSizes"
-Kooka::Kooka( const QCString& deviceToUse)
+Kooka::Kooka( const TQCString& deviceToUse)
: KParts::DockMainWindow( 0, "Kooka" ),
m_printer(0),
m_prefDialogIndex(0)
@@ -83,20 +83,20 @@ Kooka::Kooka( const QCString& deviceToUse)
createGUI(0L); // m_view->ocrResultPart());
// and a status bar
- statusBar()->insertItem( QString(), KookaView::StatusTemp );
+ statusBar()->insertItem( TQString(), KookaView::StatusTemp );
statusBar()->show();
// allow the view to change the statusbar and caption
- connect(m_view, SIGNAL(signalChangeStatusbar(const QString&)),
- this, SLOT(changeStatusbar(const QString&)));
- connect(m_view, SIGNAL(signalCleanStatusbar(void)),
- this, SLOT(cleanStatusbar()));
- connect(m_view, SIGNAL(signalChangeCaption(const QString&)),
- this, SLOT(changeCaption(const QString&)));
+ connect(m_view, TQT_SIGNAL(signalChangeStatusbar(const TQString&)),
+ this, TQT_SLOT(changeStatusbar(const TQString&)));
+ connect(m_view, TQT_SIGNAL(signalCleanStatusbar(void)),
+ this, TQT_SLOT(cleanStatusbar()));
+ connect(m_view, TQT_SIGNAL(signalChangeCaption(const TQString&)),
+ this, TQT_SLOT(changeCaption(const TQString&)));
changeCaption( i18n( "KDE Scanning" ));
- setAutoSaveSettings( QString::fromLatin1("General Options"),
+ setAutoSaveSettings( TQString::fromLatin1("General Options"),
true );
}
@@ -125,47 +125,47 @@ void Kooka::startup( void )
void Kooka::setupActions()
{
- KStdAction::print(this, SLOT(filePrint()), actionCollection());
- KStdAction::quit(this , SLOT(close()), actionCollection());
+ KStdAction::print(this, TQT_SLOT(filePrint()), actionCollection());
+ KStdAction::quit(this , TQT_SLOT(close()), actionCollection());
- KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()),
+ KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()),
actionCollection());
- KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()),
+ KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()),
actionCollection());
- KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection());
m_view->createDockMenu(actionCollection(), this, "settings_show_docks" );
/* Image Viewer action Toolbar - OCR, Scaling etc. */
(void) new KAction(i18n("&OCR Image..."), "ocr", CTRL+Key_O,
- m_view, SLOT(doOCR()),
+ m_view, TQT_SLOT(doOCR()),
actionCollection(), "ocrImage" );
(void) new KAction(i18n("O&CR on Selection..."), "ocr-select", CTRL+Key_C,
- m_view, SLOT(doOCRonSelection()),
+ m_view, TQT_SLOT(doOCRonSelection()),
actionCollection(), "ocrImageSelect" );
KAction *act;
act = new KAction(i18n("Scale to W&idth"), "scaletowidth", CTRL+Key_I,
- m_view, SLOT( slIVScaleToWidth()),
+ m_view, TQT_SLOT( slIVScaleToWidth()),
actionCollection(), "scaleToWidth" );
m_view->connectViewerAction( act );
act = new KAction(i18n("Scale to &Height"), "scaletoheight", CTRL+Key_H,
- m_view, SLOT( slIVScaleToHeight()),
+ m_view, TQT_SLOT( slIVScaleToHeight()),
actionCollection(), "scaleToHeight" );
m_view->connectViewerAction( act );
act = new KAction(i18n("Original &Size"), "scaleorig", CTRL+Key_S,
- m_view, SLOT( slIVScaleOriginal()),
+ m_view, TQT_SLOT( slIVScaleOriginal()),
actionCollection(), "scaleOriginal" );
m_view->connectViewerAction( act );
#ifdef QICONSET_HONOUR_ON_OFF
- /* The Toggleaction does not seem to handle the on/off icon from QIconSet */
- QIconSet lockSet;
- lockSet.setPixmap(BarIcon("lock") , QIconSet::Automatic, QIconSet::Normal, QIconSet::On );
- lockSet.setPixmap(BarIcon("unlock"), QIconSet::Automatic, QIconSet::Normal, QIconSet::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 );
+ lockSet.setPixmap(BarIcon("unlock"), TQIconSet::Automatic, TQIconSet::Normal, TQIconSet::Off);
act = new KToggleAction ( i18n("Keep &Zoom Setting"), lockSet, CTRL+Key_Z,
actionCollection(), "keepZoom" );
#else
@@ -173,100 +173,100 @@ actionCollection());
actionCollection(), "keepZoom" );
#endif
- connect( act, SIGNAL( toggled( bool ) ), m_view->getImageViewer(),
- SLOT(setKeepZoom(bool)));
+ connect( act, TQT_SIGNAL( toggled( bool ) ), m_view->getImageViewer(),
+ TQT_SLOT(setKeepZoom(bool)));
m_view->connectViewerAction( act );
/* thumbview and gallery actions */
act = new KAction(i18n("Set Zoom..."), "viewmag", 0,
- m_view, SLOT( slIVShowZoomDialog()),
+ 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, SLOT( slCreateNewImgFromSelection() ),
+ m_view, TQT_SLOT( slCreateNewImgFromSelection() ),
actionCollection(), "createFromSelection" );
(void) new KAction(i18n("Mirror Image &Vertically"), "mirror-vert", CTRL+Key_V,
- this, SLOT( slMirrorVertical() ),
+ this, TQT_SLOT( slMirrorVertical() ),
actionCollection(), "mirrorVertical" );
(void) new KAction(i18n("&Mirror Image Horizontally"), "mirror-horiz", CTRL+Key_M,
- this, SLOT( slMirrorHorizontal() ),
+ this, TQT_SLOT( slMirrorHorizontal() ),
actionCollection(), "mirrorHorizontal" );
(void) new KAction(i18n("Mirror Image &Both Directions"), "mirror-both", CTRL+Key_B,
- this, SLOT( slMirrorBoth() ),
+ this, TQT_SLOT( slMirrorBoth() ),
actionCollection(), "mirrorBoth" );
(void) new KAction(i18n("Open Image in &Graphic Application..."), "fileopen", CTRL+Key_G,
- m_view, SLOT( slOpenCurrInGraphApp() ),
+ m_view, TQT_SLOT( slOpenCurrInGraphApp() ),
actionCollection(), "openInGraphApp" );
act = new KAction(i18n("&Rotate Image Clockwise"), "rotate_cw", CTRL+Key_R,
- this, SLOT( slRotateClockWise() ),
+ 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, SLOT( slRotateCounterClockWise() ),
+ this, TQT_SLOT( slRotateCounterClockWise() ),
actionCollection(), "rotateCounterClockwise" );
m_view->connectViewerAction( act );
act = new KAction(i18n("Rotate Image 180 &Degrees"), "rotate", CTRL+Key_D,
- this, SLOT( slRotate180() ),
+ this, TQT_SLOT( slRotate180() ),
actionCollection(), "upsitedown" );
m_view->connectViewerAction( act );
/* Gallery actions */
act = new KAction(i18n("&Create Folder..."), "folder_new", 0,
- m_view->gallery(), SLOT( slotCreateFolder() ),
+ m_view->gallery(), TQT_SLOT( slotCreateFolder() ),
actionCollection(), "foldernew" );
m_view->connectGalleryAction( act );
act = new KAction(i18n("&Save Image..."), "filesave", 0,
- m_view->gallery(), SLOT( slotExportFile() ),
+ m_view->gallery(), TQT_SLOT( slotExportFile() ),
actionCollection(), "saveImage" );
m_view->connectGalleryAction( act );
act = new KAction(i18n("&Import Image..."), "inline_image", 0,
- m_view->gallery(), SLOT( slotImportFile() ),
+ m_view->gallery(), TQT_SLOT( slotImportFile() ),
actionCollection(), "importImage" );
m_view->connectGalleryAction( act );
act = new KAction(i18n("&Delete Image"), "edittrash", 0,
- m_view->gallery(), SLOT( slotDeleteItems() ),
+ m_view->gallery(), TQT_SLOT( slotDeleteItems() ),
actionCollection(), "deleteImage" );
m_view->connectGalleryAction( act );
act = new KAction(i18n("&Unload Image"), "fileclose", 0,
- m_view->gallery(), SLOT( slotUnloadItems() ),
+ m_view->gallery(), TQT_SLOT( slotUnloadItems() ),
actionCollection(), "unloadImage" );
m_view->connectGalleryAction( act );
#if 0
/* not yet supported actions - coming post 3.1 */
(void) new KAction(i18n("&Load Scan Parameters"), "bookmark_add", CTRL+Key_L,
- m_view, SLOT(slLoadScanParams()),
+ m_view, TQT_SLOT(slLoadScanParams()),
actionCollection(), "loadscanparam" );
(void) new KAction(i18n("Save &Scan Parameters"), "bookmark_add", CTRL+Key_S,
- m_view, SLOT(slSaveScanParams()),
+ m_view, TQT_SLOT(slSaveScanParams()),
actionCollection(), "savescanparam" );
#endif
(void) new KAction(i18n("Select Scan Device"), "scanner", 0,
- m_view, SLOT( slSelectDevice()),
+ m_view, TQT_SLOT( slSelectDevice()),
actionCollection(), "selectsource" );
(void) new KAction( i18n("Enable All Warnings && Messages"), 0,
- this, SLOT(slEnableWarnings()),
+ this, TQT_SLOT(slEnableWarnings()),
actionCollection(), "enable_msgs");
m_saveOCRTextAction = new KAction( i18n("Save OCR Res&ult Text"), "filesaveas", CTRL+Key_U,
- m_view, SLOT(slSaveOCRResult()),
+ m_view, TQT_SLOT(slSaveOCRResult()),
actionCollection(), "saveOCRResult");
}
@@ -294,18 +294,18 @@ void Kooka::readProperties(KConfig *config)
// in 'saveProperties'
config->setGroup( KOOKA_STATE_GROUP );
m_prefDialogIndex = config->readNumEntry( PREFERENCE_DIA_TAB, 0 );
- // QString url = config->readPathEntry("lastURL");
+ // TQString url = config->readPathEntry("lastURL");
}
-void Kooka::dragEnterEvent(QDragEnterEvent *event)
+void Kooka::dragEnterEvent(TQDragEnterEvent *event)
{
// accept uri drops only
event->accept(KURLDrag::canDecode(event));
}
#if 0
-void Kooka::dropEvent(QDropEvent *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*
@@ -354,7 +354,7 @@ void Kooka::fileSave()
void Kooka::fileSaveAs()
{
// this slot is called whenever the File->Save As menu is selected,
- QStrList strlist;
+ TQStrList strlist;
strlist.append( "BMP" );
strlist.append( "JPEG" );
FormatDialog fd( 0, "FormatDialog", &strlist );
@@ -387,7 +387,7 @@ void Kooka::optionsConfigureToolbars()
// use the standard toolbar editor
saveMainWindowSettings(KGlobal::config(), autoSaveGroup());
KEditToolbar dlg(factory());
- connect(&dlg, SIGNAL(newToolbarConfig()), SLOT(newToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(newToolbarConfig()));
dlg.exec();
}
@@ -402,7 +402,7 @@ void Kooka::optionsPreferences()
// popup some sort of preference dialog, here
KookaPreferences dlg;
dlg.showPage( m_prefDialogIndex );
- connect( &dlg, SIGNAL( dataSaved() ), m_view, SLOT(slFreshUpThumbView()));
+ connect( &dlg, TQT_SIGNAL( dataSaved() ), m_view, TQT_SLOT(slFreshUpThumbView()));
if (dlg.exec())
{
@@ -412,13 +412,13 @@ void Kooka::optionsPreferences()
}
}
-void Kooka::changeStatusbar(const QString& text)
+void Kooka::changeStatusbar(const TQString& text)
{
// display the text on the statusbar
statusBar()->changeItem( text, KookaView::StatusTemp );
}
-void Kooka::changeCaption(const QString& text)
+void Kooka::changeCaption(const TQString& text)
{
// display the text on the caption
setCaption(text);
diff --git a/kooka/kooka.h b/kooka/kooka.h
index 66f59e0c..91a98fea 100644
--- a/kooka/kooka.h
+++ b/kooka/kooka.h
@@ -59,7 +59,7 @@ public:
/**
* Default Constructor
*/
- Kooka(const QCString& deviceToUse);
+ Kooka(const TQCString& deviceToUse);
/**
* Default Destructor
@@ -76,8 +76,8 @@ protected:
/**
* Overridden virtuals for Qt drag 'n drop (XDND)
*/
- virtual void dragEnterEvent(QDragEnterEvent *event);
- // virtual void dropEvent(QDropEvent *event);
+ virtual void dragEnterEvent(TQDragEnterEvent *event);
+ // virtual void dropEvent(TQDropEvent *event);
/**
* This function is called when it is time for the app to save its
@@ -105,9 +105,9 @@ private slots:
void optionsConfigureToolbars();
void optionsPreferences();
- void changeStatusbar(const QString& text);
+ void changeStatusbar(const TQString& text);
void cleanStatusbar(void) { changeStatusbar(""); }
- void changeCaption(const QString& text);
+ void changeCaption(const TQString& text);
void newToolbarConfig();
// void fileSaveAs();
diff --git a/kooka/kookaimage.cpp b/kooka/kookaimage.cpp
index 4db87728..5857440a 100644
--- a/kooka/kookaimage.cpp
+++ b/kooka/kookaimage.cpp
@@ -40,7 +40,7 @@
KookaImage::KookaImage( )
- : QImage(),
+ : TQImage(),
m_subImages(-1),
m_subNo(0),
m_parent(0),
@@ -52,7 +52,7 @@ KookaImage::KookaImage( )
/* constructor for subimages */
KookaImage::KookaImage( int subNo, KookaImage *p )
- : QImage(),
+ : TQImage(),
m_subImages(-1),
m_subNo(subNo),
m_parent( p ),
@@ -65,7 +65,7 @@ KookaImage::KookaImage( int subNo, KookaImage *p )
KookaImage& KookaImage::operator=(const KookaImage& img)
{
- QImage::operator=(img);
+ TQImage::operator=(img);
m_subImages = img.subImagesCount();
m_subNo = img.m_subNo;
@@ -76,9 +76,9 @@ KookaImage& KookaImage::operator=(const KookaImage& img)
return *this;
}
-KookaImage& KookaImage::operator=(const QImage& img)
+KookaImage& KookaImage::operator=(const TQImage& img)
{
- QImage::operator=(img);
+ TQImage::operator=(img);
return *this;
}
@@ -94,7 +94,7 @@ void KookaImage::setFileItem( KFileItem* it )
const KFileMetaInfo KookaImage::fileMetaInfo( )
{
- QString filename = localFileName( );
+ TQString filename = localFileName( );
if( ! filename.isEmpty() )
{
kdDebug(28000) << "Fetching metainfo for " << filename << endl;
@@ -105,21 +105,21 @@ const KFileMetaInfo KookaImage::fileMetaInfo( )
return KFileMetaInfo();
}
-QString KookaImage::localFileName( ) const
+TQString KookaImage::localFileName( ) const
{
if( ! m_url.isEmpty() )
return( m_url.directory() + "/" + m_url.fileName());
else
- return QString();
+ return TQString();
}
bool KookaImage::loadFromUrl( const KURL& url )
{
bool ret = true;
m_url = url;
- QString filename = localFileName( );
- QString format ( imageFormat( filename ));
+ TQString filename = localFileName( );
+ TQString format ( imageFormat( filename ));
/* if the format was not recogniseable, check the extension, if it is tif, try to read it by
* tifflib */
@@ -189,13 +189,13 @@ bool KookaImage::loadFromUrl( const KURL& url )
}
-KookaImage::KookaImage( const QImage& img )
- : QImage( img )
+KookaImage::KookaImage( const TQImage& img )
+ : TQImage( img )
/* m_subImages( 1 ) */
{
m_subImages = 0;
- /* Load one QImage, can not be Tiff yet. */
+ /* Load one TQImage, can not be Tiff yet. */
kdDebug(28000) << "constructor from other image here " << endl;
}
@@ -222,7 +222,7 @@ KURL KookaImage::url() const
return m_url;
}
-bool KookaImage::loadTiffDir( const QString& filename, int no )
+bool KookaImage::loadTiffDir( const TQString& filename, int no )
{
#ifdef HAVE_LIBTIFF
int imgWidth, imgHeight;
@@ -300,7 +300,7 @@ bool KookaImage::loadTiffDir( const QString& 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), QImage::ScaleFree );
+ *this = smoothScale( imgWidth, int(imgHeight*yScalefactor), TQImage::ScaleFree );
}
else
{
@@ -308,7 +308,7 @@ bool KookaImage::loadTiffDir( const QString& 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, QImage::ScaleFree );
+ *this = smoothScale( int(imgWidth*scalefactor), imgHeight, TQImage::ScaleFree );
}
}
@@ -341,9 +341,9 @@ bool KookaImage::isSubImage() const
/*
* tiling
*/
-int KookaImage::cutToTiles( const QSize maxSize, int& rows, int& cols, TileMode )
+int KookaImage::cutToTiles( const TQSize maxSize, int& rows, int& cols, TileMode )
{
- QSize imgSize = size();
+ TQSize imgSize = size();
int w = imgSize.width();
if( w > maxSize.width() )
@@ -369,7 +369,7 @@ int KookaImage::cutToTiles( const QSize maxSize, int& rows, int& cols, TileMode
while( w ) // Loop over width, cut in horizontal direction
{
cols++;
- m_tileVector.append( QRect( absX, absY, w, h ));
+ m_tileVector.append( TQRect( absX, absY, w, h ));
absX += w+1;
w = imgSize.width() - absX;
@@ -403,11 +403,11 @@ int KookaImage::cutToTiles( const QSize maxSize, int& rows, int& cols, TileMode
-QRect KookaImage::getTileRect( int rowPos, int colPos ) const
+TQRect KookaImage::getTileRect( int rowPos, int colPos ) const
{
int indx = rowPos*m_tileCols+colPos;
kdDebug(28000) << "Tile Index: " << indx << endl;
- const QRect r = m_tileVector[(rowPos)*m_tileCols + colPos];
+ const TQRect r = m_tileVector[(rowPos)*m_tileCols + colPos];
return r;
}
diff --git a/kooka/kookaimage.h b/kooka/kookaimage.h
index 84018d4d..c75c2dae 100644
--- a/kooka/kookaimage.h
+++ b/kooka/kookaimage.h
@@ -29,10 +29,10 @@
#ifndef KOOKAIMAGE_H
#define KOOKAIMAGE_H
#include <kurl.h>
-#include <qimage.h>
-#include <qptrlist.h>
-#include <qvaluevector.h>
-#include <qrect.h>
+#include <tqimage.h>
+#include <tqptrlist.h>
+#include <tqvaluevector.h>
+#include <tqrect.h>
#include <kfilemetainfo.h>
@@ -41,7 +41,7 @@ class KFileItem;
/**
* @author Klaas Freitag
*
- * class that represents an image, very much as QImage. But this one can contain
+ * class that represents an image, very much as TQImage. But this one can contain
* multiple pages.
*/
@@ -58,10 +58,10 @@ public:
* @param p is the parent image.
*/
KookaImage( int subNo, KookaImage *p );
- KookaImage( const QImage& img );
+ KookaImage( const TQImage& img );
KookaImage& operator=(const KookaImage& );
- KookaImage& operator=(const QImage& );
+ KookaImage& operator=(const TQImage& );
/**
* load an image from a KURL. This method reads the entire file and sets
* the values for subimage count.
@@ -91,7 +91,7 @@ public:
void extractNow();
KURL url() const;
- QString localFileName( ) const;
+ TQString localFileName( ) const;
/**
* Set and get the KFileItem of the image. Note that the KFileItem pointer returned
@@ -124,15 +124,15 @@ public:
* The parameters rows and cols contain the number of rows and cols after
* tiling. If both are one, the image is smaller than maxSize, thus the
* left-top tile is index 1,1.
- * Use getTile() to read the QRect list.
+ * Use getTile() to read the TQRect list.
*/
- int cutToTiles( const QSize maxSize, int& rows, int& cols, TileMode mode = MaxCut );
+ int cutToTiles( const TQSize maxSize, int& rows, int& cols, TileMode mode = MaxCut );
/**
* read tiles from the tile list. The image needs to be tiled by method
* cutToTiles before.
*/
- QRect getTileRect( int rowPos, int colPos ) const;
+ TQRect getTileRect( int rowPos, int colPos ) const;
/**
* retrieve the sub number of this image.
@@ -141,7 +141,7 @@ public:
private:
int m_subImages;
- bool loadTiffDir( const QString&, int );
+ 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 */
@@ -154,12 +154,12 @@ private:
KFileItem *m_fileItem;
bool m_fileBound;
- QValueVector<QRect> m_tileVector;
+ TQValueVector<TQRect> m_tileVector;
int m_tileCols; /* number of tile columns */
};
-class KookaImageList: public QPtrList<KookaImage>
+class KookaImageList: public TQPtrList<KookaImage>
{
public:
KookaImageList() {}
diff --git a/kooka/kookapref.cpp b/kooka/kookapref.cpp
index c5996275..06274670 100644
--- a/kooka/kookapref.cpp
+++ b/kooka/kookapref.cpp
@@ -36,12 +36,12 @@
#include <kcolorbutton.h>
#include <kstandarddirs.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qvgroupbox.h>
-#include <qgrid.h>
-#include <qcheckbox.h>
-#include <qstringlist.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqvgroupbox.h>
+#include <tqgrid.h>
+#include <tqcheckbox.h>
+#include <tqstringlist.h>
#include <devselector.h>
#include "config.h"
@@ -51,8 +51,8 @@
#include "ksaneocr.h"
#include <kmessagebox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
#include <kurlrequester.h>
KookaPreferences::KookaPreferences()
@@ -74,10 +74,10 @@ void KookaPreferences::setupOCRPage()
{
konf->setGroup( CFG_GROUP_OCR_DIA );
- QFrame *page = addPage( i18n("OCR"), i18n("Optical Character Recognition" ),
+ TQFrame *page = addPage( i18n("OCR"), i18n("Optical Character Recognition" ),
BarIcon("ocrImage", KIcon::SizeMedium ) );
- QVBoxLayout *top = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *top = new TQVBoxLayout( page, 0, spacingHint() );
bool haveGocr = false;
bool haveOcrad = false;
@@ -86,10 +86,10 @@ void KookaPreferences::setupOCRPage()
/*
* Switch ocr engines
*/
- QButtonGroup *engGroup = new QButtonGroup( 1, Qt::Horizontal, i18n("OCR Engine to Use"), page );
- m_gocrBut = new QRadioButton( i18n("GOCR engine") , engGroup );
- m_kadmosBut = new QRadioButton( i18n("KADMOS engine"), engGroup );
- m_ocradBut = new QRadioButton( i18n("OCRAD engine"), engGroup );
+ TQButtonGroup *engGroup = new TQButtonGroup( 1, Qt::Horizontal, i18n("OCR Engine to Use"), page );
+ m_gocrBut = new TQRadioButton( i18n("GOCR engine") , engGroup );
+ m_kadmosBut = new TQRadioButton( i18n("KADMOS engine"), engGroup );
+ m_ocradBut = new TQRadioButton( i18n("OCRAD engine"), engGroup );
m_kadmosBut->setChecked(false);
m_gocrBut->setChecked(false);
m_ocradBut->setChecked(false);
@@ -98,11 +98,11 @@ void KookaPreferences::setupOCRPage()
/*
* GOCR Option Box
*/
- QVGroupBox *gp = new QVGroupBox( i18n("GOCR OCR"), page );
+ TQVGroupBox *gp = new TQVGroupBox( i18n("GOCR OCR"), page );
m_urlReqGocr = binaryCheckBox( gp, "gocr" );
- connect( m_urlReqGocr, SIGNAL( textChanged( const QString& )),
- this, SLOT( slCheckOnGOCR( const QString& )));
- QString cmdGocr = tryFindBinary( "gocr", CFG_GOCR_BINARY );
+ connect( m_urlReqGocr, TQT_SIGNAL( textChanged( const TQString& )),
+ this, TQT_SLOT( slCheckOnGOCR( const TQString& )));
+ TQString cmdGocr = tryFindBinary( "gocr", CFG_GOCR_BINARY );
kdDebug(28000) << "Found gocr command: " << cmdGocr << endl;
m_gocrBut->setEnabled(false);
if( !cmdGocr.isEmpty() )
@@ -117,11 +117,11 @@ void KookaPreferences::setupOCRPage()
/*
* OCRAD Option Box
*/
- gp = new QVGroupBox( i18n("OCRAD OCR"), page );
+ gp = new TQVGroupBox( i18n("OCRAD OCR"), page );
m_urlReqOcrad = binaryCheckBox( gp, "ocrad" );
- connect( m_urlReqOcrad, SIGNAL( textChanged( const QString& )),
- this, SLOT( slCheckOnOCRAD( const QString& )));
- QString cmdOcrad = tryFindBinary( "ocrad", CFG_OCRAD_BINARY );
+ connect( m_urlReqOcrad, TQT_SIGNAL( textChanged( const TQString& )),
+ this, TQT_SLOT( slCheckOnOCRAD( const TQString& )));
+ TQString cmdOcrad = tryFindBinary( "ocrad", CFG_OCRAD_BINARY );
kdDebug(28000) << "Found ocrad command: " << cmdOcrad << endl;
m_ocradBut->setEnabled(false);
if( !cmdOcrad.isEmpty() )
@@ -136,26 +136,26 @@ void KookaPreferences::setupOCRPage()
/*
* Global Kadmos Options
*/
- QVGroupBox *kgp = new QVGroupBox( i18n("KADMOS OCR"), page );
+ TQVGroupBox *kgp = new TQVGroupBox( i18n("KADMOS OCR"), page );
#ifdef HAVE_KADMOS
- (void) new QLabel( i18n("The KADMOS OCR engine is available"), kgp);
+ (void) new TQLabel( i18n("The KADMOS OCR engine is available"), kgp);
m_kadmosBut->setChecked(true);
m_kadmosBut->setEnabled(true);
haveKadmos = true;
#else
- (void) new QLabel( i18n("The KADMOS OCR engine is not available in this version of Kooka"), kgp );
+ (void) new TQLabel( i18n("The KADMOS OCR engine is not available in this version of Kooka"), kgp );
m_kadmosBut->setEnabled(false);
#endif
top->addWidget( kgp );
- QWidget *spaceEater = new QWidget( page );
- spaceEater->setSizePolicy( QSizePolicy( QSizePolicy::Ignored, QSizePolicy::Ignored ));
+ TQWidget *spaceEater = new TQWidget( page );
+ spaceEater->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ));
top->addWidget( spaceEater );
/*
* Now read the config value CFG_OCR_ENGINE and set the radios to the value if available
*/
- QString useEngine = konf->readEntry( CFG_OCR_ENGINE, "ocrad" );
+ TQString useEngine = konf->readEntry( CFG_OCR_ENGINE, "ocrad" );
if( useEngine != "notFound" )
{
if( useEngine == "gocr" && haveGocr )
@@ -176,56 +176,56 @@ void KookaPreferences::setupOCRPage()
}
}
-KURLRequester* KookaPreferences::binaryCheckBox( QWidget *parent, const QString& program )
+KURLRequester* KookaPreferences::binaryCheckBox( TQWidget *parent, const TQString& program )
{
- QHBox *hbox = new QHBox( parent );
+ TQHBox *hbox = new TQHBox( parent );
- (void) new QLabel( i18n("Select the %1 binary to use:").arg( program ), hbox );
+ (void) new TQLabel( i18n("Select the %1 binary to use:").arg( program ), hbox );
KURLRequester* urlRequester = new KURLRequester( parent );
urlRequester->setMode( KFile::File | KFile::ExistingOnly | KFile::LocalOnly );
- QToolTip::add( urlRequester,
+ TQToolTip::add( urlRequester,
i18n( "Enter the path to %1, the optical-character-recognition "
"command line tool.").arg(program));
return urlRequester;
}
-QString KookaPreferences::tryFindGocr( void )
+TQString KookaPreferences::tryFindGocr( void )
{
return( tryFindBinary( "gocr", CFG_GOCR_BINARY ) );
}
-QString KookaPreferences::tryFindBinary( const QString& bin, const QString& configKey )
+TQString KookaPreferences::tryFindBinary( const TQString& bin, const TQString& configKey )
{
/* First check the config files for an entry */
KConfig *cfg = KGlobal::config();
cfg->setGroup(CFG_GROUP_OCR_DIA);
- QString res = cfg->readPathEntry( configKey /* CFG_GOCR_BINARY */, "notFound" );
+ TQString res = cfg->readPathEntry( configKey /* CFG_GOCR_BINARY */, "notFound" );
if( res != "notFound" )
{
- QFileInfo fi( res );
+ TQFileInfo fi( res );
if( fi.exists() && fi.isExecutable() && !fi.isDir() && res.contains(bin) )
{
return res;
}
}
- res = QString();
+ res = TQString();
- QStringList locations;
+ TQStringList locations;
locations.append( "/usr/bin/" + bin );
locations.append( "/bin/" + bin );
locations.append( "/usr/X11R6/bin/"+bin );
locations.append( "/usr/local/bin/"+bin );
- for ( QStringList::Iterator it = locations.begin(); it != locations.end(); ++it )
+ for ( TQStringList::Iterator it = locations.begin(); it != locations.end(); ++it )
{
- QString cmd = *it;
+ TQString cmd = *it;
kdDebug(28000) << "checking command " << cmd << endl;
- QFileInfo fi( cmd );
+ TQFileInfo fi( cmd );
if( fi.exists() && fi.isExecutable() && !fi.isDir())
{
res = cmd;
@@ -238,7 +238,7 @@ QString KookaPreferences::tryFindBinary( const QString& bin, const QString& conf
}
-void KookaPreferences::slCheckOnGOCR( const QString& cmd )
+void KookaPreferences::slCheckOnGOCR( const TQString& cmd )
{
if( checkOCRBinIntern( cmd, "gocr", false ))
{
@@ -251,7 +251,7 @@ void KookaPreferences::slCheckOnGOCR( const QString& cmd )
}
}
-void KookaPreferences::slCheckOnOCRAD( const QString& cmd )
+void KookaPreferences::slCheckOnOCRAD( const TQString& cmd )
{
if( checkOCRBinIntern( cmd, "ocrad", false ))
{
@@ -265,17 +265,17 @@ void KookaPreferences::slCheckOnOCRAD( const QString& cmd )
}
#if 0
-void KookaPreferences::checkOCRBinarySilent( const QString& cmd )
+void KookaPreferences::checkOCRBinarySilent( const TQString& cmd )
{
// checkOCRBinIntern( cmd, this->sender(), false);
}
#endif
-bool KookaPreferences::checkOCRBinIntern( const QString& cmd, const QString& tool, bool show_msg )
+bool KookaPreferences::checkOCRBinIntern( const TQString& cmd, const TQString& tool, bool show_msg )
{
if( ! cmd.contains( tool )) return false;
bool ret = true;
- QFileInfo fi( cmd );
+ TQFileInfo fi( cmd );
if( ! fi.exists() )
{
if( show_msg )
@@ -308,32 +308,32 @@ void KookaPreferences::setupStartupPage()
/* startup options */
konf->setGroup( GROUP_STARTUP );
- QFrame *page = addPage( i18n("Startup"), i18n("Kooka Startup Preferences" ),
+ TQFrame *page = addPage( i18n("Startup"), i18n("Kooka Startup Preferences" ),
BarIcon("gear", KIcon::SizeMedium ) );
- QVBoxLayout *top = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *top = new TQVBoxLayout( page, 0, spacingHint() );
/* Description-Label */
- top->addWidget( new QLabel( i18n("Note that changing these options will affect Kooka's next start!"), page ));
+ top->addWidget( new TQLabel( i18n("Note that changing these options will affect Kooka's next start!"), page ));
/* Query for network scanner (Checkbox) */
- cbNetQuery = new QCheckBox( i18n("Query network for available scanners"),
+ cbNetQuery = new TQCheckBox( i18n("Query network for available scanners"),
page, "CB_NET_QUERY" );
- QToolTip::add( cbNetQuery,
+ 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 )) );
/* Show scanner selection box on startup (Checkbox) */
- cbShowScannerSelection = new QCheckBox( i18n("Show the scanner selection box on next startup"),
+ cbShowScannerSelection = new TQCheckBox( i18n("Show the scanner selection box on next startup"),
page, "CB_SHOW_SELECTION" );
- QToolTip::add( cbShowScannerSelection,
+ TQToolTip::add( cbShowScannerSelection,
i18n( "Check this if you once checked 'do not show the scanner selection on startup',\nbut you want to see it again." ));
cbShowScannerSelection->setChecked( !konf->readBoolEntry( STARTUP_SKIP_ASK, false ));
/* Read startup image on startup (Checkbox) */
- cbReadStartupImage = new QCheckBox( i18n("Load the last image into the viewer on startup"),
+ cbReadStartupImage = new TQCheckBox( i18n("Load the last image into the viewer on startup"),
page, "CB_LOAD_ON_START" );
- QToolTip::add( cbReadStartupImage,
+ TQToolTip::add( cbReadStartupImage,
i18n( "Check this if you want Kooka to load the last selected image into the viewer on startup.\nIf your images are large, that might slow down Kooka's start." ));
cbReadStartupImage->setChecked( konf->readBoolEntry( STARTUP_READ_IMAGE, true));
@@ -350,21 +350,21 @@ void KookaPreferences::setupStartupPage()
void KookaPreferences::setupSaveFormatPage( )
{
konf->setGroup( OP_FILE_GROUP );
- QFrame *page = addPage( i18n("Image Saving"), i18n("Configure Image Save Assistant" ),
+ TQFrame *page = addPage( i18n("Image Saving"), i18n("Configure Image Save Assistant" ),
BarIcon("filesave", KIcon::SizeMedium ) );
- QVBoxLayout *top = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *top = new TQVBoxLayout( page, 0, spacingHint() );
/* Skip the format asking if a format entry exists */
- cbSkipFormatAsk = new QCheckBox( i18n("Always display image save assistant"),
+ cbSkipFormatAsk = new TQCheckBox( i18n("Always display image save assistant"),
page, "CB_IMGASSIST_QUERY" );
cbSkipFormatAsk->setChecked( konf->readBoolEntry( OP_FILE_ASK_FORMAT, true ));
- QToolTip::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." ));
+ 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 );
- cbFilenameAsk = new QCheckBox( i18n("Ask for filename when saving file"),
+ cbFilenameAsk = new TQCheckBox( i18n("Ask for filename when saving file"),
page, "CB_ASK_FILENAME" );
cbFilenameAsk->setChecked( konf->readBoolEntry( OP_ASK_FILENAME, false));
- QToolTip::add( cbFilenameAsk, i18n("Check this if you want to enter a filename when an image has been scanned." ));
+ TQToolTip::add( cbFilenameAsk, i18n("Check this if you want to enter a filename when an image has been scanned." ));
top->addWidget( cbFilenameAsk );
@@ -376,20 +376,20 @@ void KookaPreferences::setupThumbnailPage()
{
konf->setGroup( THUMB_GROUP );
- QFrame *page = addPage( i18n("Thumbnail View"), i18n("Thumbnail Gallery View" ),
+ TQFrame *page = addPage( i18n("Thumbnail View"), i18n("Thumbnail Gallery View" ),
BarIcon("thumbnail", KIcon::SizeMedium ) );
- QVBoxLayout *top = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *top = new TQVBoxLayout( page, 0, spacingHint() );
- top->addWidget( new QLabel( i18n("Here you can configure the appearance of the thumbnail view of your scan picture gallery."),page ));
+ top->addWidget( new TQLabel( i18n("Here you can configure the appearance of the thumbnail view of your scan picture gallery."),page ));
/* Backgroundimage */
KStandardDirs stdDir;
- QString bgImg = konf->readPathEntry( BG_WALLPAPER );
+ TQString bgImg = konf->readPathEntry( BG_WALLPAPER );
if( bgImg.isEmpty() )
bgImg = stdDir.findResource( "data", STD_TILE_IMG );
/* image file selector */
- QVGroupBox *hgb1 = new QVGroupBox( i18n("Thumbview Background" ), page );
+ TQVGroupBox *hgb1 = new TQVGroupBox( i18n("Thumbview Background" ), page );
m_tileSelector = new ImageSelectLine( hgb1, i18n("Select background image:"));
kdDebug(28000) << "Setting tile url " << bgImg << endl;
m_tileSelector->setURL( KURL(bgImg) );
@@ -397,42 +397,42 @@ void KookaPreferences::setupThumbnailPage()
top->addWidget( hgb1 );
/* Add the Boxes to configure size, framestyle and background */
- QVGroupBox *hgb2 = new QVGroupBox( i18n("Thumbnail Size" ), page );
- QVGroupBox *hgb3 = new QVGroupBox( i18n("Thumbnail Frame" ), page );
+ TQVGroupBox *hgb2 = new TQVGroupBox( i18n("Thumbnail Size" ), page );
+ TQVGroupBox *hgb3 = new TQVGroupBox( i18n("Thumbnail Frame" ), page );
/* Thumbnail size */
int w = konf->readNumEntry( PIXMAP_WIDTH, 100);
int h = konf->readNumEntry( PIXMAP_HEIGHT, 120 );
- QGrid *lGrid = new QGrid( 2, hgb2 );
+ TQGrid *lGrid = new TQGrid( 2, hgb2 );
lGrid->setSpacing( 2 );
- QLabel *l1 = new QLabel( i18n("Thumbnail maximum &width:"), lGrid );
+ TQLabel *l1 = new TQLabel( i18n("Thumbnail maximum &width:"), lGrid );
m_thumbWidth = new KIntNumInput( w, lGrid );
m_thumbWidth->setMinValue(1);
l1->setBuddy( m_thumbWidth );
lGrid->setSpacing( 4 );
- l1 = new QLabel( i18n("Thumbnail maximum &height:"), lGrid );
+ l1 = new TQLabel( i18n("Thumbnail maximum &height:"), lGrid );
m_thumbHeight = new KIntNumInput( m_thumbWidth, h, lGrid );
m_thumbHeight->setMinValue(1);
l1->setBuddy( m_thumbHeight );
/* Frame Stuff */
int frameWidth = konf->readNumEntry( THUMB_MARGIN, 3 );
- QColor col1 = konf->readColorEntry( MARGIN_COLOR1, &(colorGroup().base()));
- QColor col2 = konf->readColorEntry( MARGIN_COLOR2, &(colorGroup().foreground()));
+ TQColor col1 = konf->readColorEntry( MARGIN_COLOR1, &(colorGroup().base()));
+ TQColor col2 = konf->readColorEntry( MARGIN_COLOR2, &(colorGroup().foreground()));
- QGrid *fGrid = new QGrid( 2, hgb3 );
+ TQGrid *fGrid = new TQGrid( 2, hgb3 );
fGrid->setSpacing( 2 );
- l1 = new QLabel(i18n("Thumbnail &frame width:"), fGrid );
+ l1 = new TQLabel(i18n("Thumbnail &frame width:"), fGrid );
m_frameWidth = new KIntNumInput( frameWidth, fGrid );
m_frameWidth->setMinValue(0);
l1->setBuddy( m_frameWidth );
- l1 = new QLabel(i18n("Frame color &1: "), fGrid );
+ l1 = new TQLabel(i18n("Frame color &1: "), fGrid );
m_colButt1 = new KColorButton( col1, fGrid );
l1->setBuddy( m_colButt1 );
- l1 = new QLabel(i18n("Frame color &2: "), fGrid );
+ l1 = new TQLabel(i18n("Frame color &2: "), fGrid );
m_colButt2 = new KColorButton( col2, fGrid );
l1->setBuddy( m_colButt2 );
/* TODO: Gradient type */
@@ -457,7 +457,7 @@ void KookaPreferences::slotApply( void )
/* ** startup options ** */
/** write the global one, to read from libkscan also */
- konf->setGroup(QString::fromLatin1(GROUP_STARTUP));
+ konf->setGroup(TQString::fromLatin1(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 */
@@ -490,7 +490,7 @@ void KookaPreferences::slotApply( void )
/* ** OCR Options ** */
konf->setGroup( CFG_GROUP_OCR_DIA );
- QString eng( "gocr" );
+ TQString eng( "gocr" );
if( m_ocradBut->isChecked() )
eng = "ocrad";
@@ -508,7 +508,7 @@ void KookaPreferences::slotApply( void )
konf->writeEntry(CFG_OCR_ENGINE, eng );
- QString path = m_urlReqGocr->url();
+ TQString path = m_urlReqGocr->url();
if( ! path.isEmpty() )
konf->writePathEntry( CFG_GOCR_BINARY, path );
@@ -528,12 +528,12 @@ void KookaPreferences::slotDefault( void )
cbReadStartupImage->setChecked( true);
cbSkipFormatAsk->setChecked( true );
KStandardDirs stdDir;
- QString bgImg = stdDir.findResource( "data", STD_TILE_IMG );
+ TQString bgImg = stdDir.findResource( "data", STD_TILE_IMG );
m_tileSelector->setURL( KURL(bgImg) );
m_thumbWidth->setValue( 100 );
m_thumbHeight->setValue( 120 );
- QColor col1 = QColor( colorGroup().base());
- QColor col2 = QColor( colorGroup().foreground());
+ TQColor col1 = TQColor( colorGroup().base());
+ TQColor col2 = TQColor( colorGroup().foreground());
m_frameWidth->setValue( 3 );
m_colButt1->setColor( col1 );
diff --git a/kooka/kookapref.h b/kooka/kookapref.h
index c5ab34c0..46f27bb4 100644
--- a/kooka/kookapref.h
+++ b/kooka/kookapref.h
@@ -27,17 +27,17 @@
#define KOOKAPREF_H
#include <kdialogbase.h>
-#include <qframe.h>
+#include <tqframe.h>
class KConfig;
-class QLabel;
+class TQLabel;
class KIntNumInput;
class KColorButton;
class ImageSelectLine;
class KScanEntry;
-class QRadioButton;
+class TQRadioButton;
class KURLRequester;
-class QCheckBox;
+class TQCheckBox;
#define STARTUP_READ_IMAGE "ReadImageOnStart"
#define CFG_GROUP_OCR_DIA "ocrDialog"
@@ -49,8 +49,8 @@ class KookaPreferences : public KDialogBase
Q_OBJECT
public:
KookaPreferences();
- static QString tryFindGocr( void );
- static QString tryFindBinary( const QString&, const QString& );
+ static TQString tryFindGocr( void );
+ static TQString tryFindBinary( const TQString&, const TQString& );
public slots:
void slotOk( void );
@@ -58,10 +58,10 @@ public slots:
void slotDefault( void );
private slots:
- bool checkOCRBinIntern( const QString&, const QString&, bool );
+ bool checkOCRBinIntern( const TQString&, const TQString&, bool );
- void slCheckOnGOCR( const QString& );
- void slCheckOnOCRAD( const QString& );
+ void slCheckOnGOCR( const TQString& );
+ void slCheckOnOCRAD( const TQString& );
signals:
void dataSaved();
@@ -71,14 +71,14 @@ private:
void setupSaveFormatPage();
void setupThumbnailPage();
void setupOCRPage();
- KURLRequester* binaryCheckBox( QWidget *, const QString& );
+ KURLRequester* binaryCheckBox( TQWidget *, const TQString& );
- QCheckBox *cbNetQuery;
- QCheckBox *cbSkipFormatAsk;
- QCheckBox *cbFilenameAsk;
- QCheckBox *cbShowScannerSelection;
+ TQCheckBox *cbNetQuery;
+ TQCheckBox *cbSkipFormatAsk;
+ TQCheckBox *cbFilenameAsk;
+ TQCheckBox *cbShowScannerSelection;
KConfig *konf;
- QCheckBox *cbReadStartupImage;
+ TQCheckBox *cbReadStartupImage;
KIntNumInput *m_thumbWidth;
KIntNumInput *m_thumbHeight;
@@ -90,10 +90,10 @@ private:
KURLRequester *m_urlReqGocr;
KURLRequester *m_urlReqOcrad;
- QRadioButton *m_gocrBut;
- QRadioButton *m_kadmosBut;
- QRadioButton *m_ocradBut;
- QString m_prevOCREngine;
+ TQRadioButton *m_gocrBut;
+ TQRadioButton *m_kadmosBut;
+ TQRadioButton *m_ocradBut;
+ TQString m_prevOCREngine;
};
diff --git a/kooka/kookaprint.cpp b/kooka/kookaprint.cpp
index 6e0554e9..5dad1f33 100644
--- a/kooka/kookaprint.cpp
+++ b/kooka/kookaprint.cpp
@@ -27,15 +27,15 @@
#include "kookaprint.h"
#include "kookaimage.h"
#include <kprinter.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
-#include <qfontmetrics.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqfontmetrics.h>
#include "imgprintdialog.h"
#include <kdebug.h>
#include <klocale.h>
KookaPrint::KookaPrint( KPrinter *printer )
- :QObject(),
+ :TQObject(),
m_printer(printer),
m_extraMarginPercent(10)
{
@@ -47,7 +47,7 @@ bool KookaPrint::printImage( KookaImage *img )
bool result = true;
if( ! m_printer || !img) return false;
- QString psMode = m_printer->option( OPT_PSGEN_DRAFT );
+ TQString psMode = m_printer->option( OPT_PSGEN_DRAFT );
kdDebug(28000) << "User setting for quality: " << psMode << endl;
#if 0
@@ -58,20 +58,20 @@ bool KookaPrint::printImage( KookaImage *img )
#endif
/* Create painter _after_ setting Resolution */
- QPainter painter(m_printer);
+ TQPainter painter(m_printer);
m_painter = &painter;
KookaImage tmpImg;
- QPoint pt(0, 0); // the top-left corner (image will be centered)
+ TQPoint pt(0, 0); // the top-left corner (image will be centered)
- // We use a QPaintDeviceMetrics to know the actual page size in pixel,
+ // We use a TQPaintDeviceMetrics to know the actual page size in pixel,
// this gives the real painting area
- QPaintDeviceMetrics printermetrics( m_painter->device() );
+ TQPaintDeviceMetrics printermetrics( m_painter->device() );
int screenRes = m_printer->option( OPT_SCREEN_RES ).toInt();
// int printerRes = printermetrics.logicalDpiX();
int printerRes = m_printer->resolution();
- QString scale = m_printer->option( OPT_SCALING );
+ TQString scale = m_printer->option( OPT_SCALING );
int reso = screenRes;
@@ -98,7 +98,7 @@ bool KookaPrint::printImage( KookaImage *img )
/* Scale the image for printing */
kdDebug(28000) << "Printer-Resolution: " << printerRes << " and scale-Reso: " << reso << endl;
- QSize margins = m_printer->margins();
+ TQSize margins = m_printer->margins();
kdDebug(28000) << "Printer-Margins left: " << margins.width() << " and top " << margins.height()
<< endl;
if( reso > 0)
@@ -112,10 +112,10 @@ bool KookaPrint::printImage( KookaImage *img )
kdDebug(28000) << "Scaling to printer size " << newWidth << " x " << newHeight << endl;
- tmpImg = img->smoothScale(newWidth, newHeight, QImage::ScaleFree);
+ tmpImg = img->smoothScale(newWidth, newHeight, TQImage::ScaleFree);
- QSize sz = tmpImg.size(); // the current image size
- QSize maxOnPage = maxPageSize(); // the maximum space on one side
+ TQSize sz = tmpImg.size(); // the current image size
+ TQSize maxOnPage = maxPageSize(); // the maximum space on one side
int maxRows, maxCols;
int subpagesCnt = tmpImg.cutToTiles( maxOnPage, maxRows, maxCols );
@@ -129,12 +129,12 @@ bool KookaPrint::printImage( KookaImage *img )
{
for( int col = 0; col < maxCols; col++ )
{
- const QRect part = tmpImg.getTileRect( row, col );
- const QSize imgSize = part.size();
+ const TQRect part = tmpImg.getTileRect( row, col );
+ const TQSize imgSize = part.size();
kdDebug(28000) << "Printing part from " << part.x() << "/" << part.y()
<< " width:"<< part.width() << " and height " << part.height() << endl;
- QImage tileImg = tmpImg.copy( part );
+ TQImage tileImg = tmpImg.copy( part );
m_painter->drawImage( printPosTopLeft(imgSize), tileImg );
drawCornerMarker( imgSize, row, col, maxRows, maxCols );
@@ -155,10 +155,10 @@ void KookaPrint::printFittingToPage(KookaImage *img)
KookaImage tmpImg;
- QString psMode = m_printer->option( OPT_RATIO );
+ TQString psMode = m_printer->option( OPT_RATIO );
bool maintainAspect = (psMode == "1");
- QSize s = maxPageSize();
+ TQSize s = maxPageSize();
double wAspect = double(s.width()) / double(img->width());
double hAspect = double(s.height()) / double(img->height());
@@ -177,36 +177,36 @@ void KookaPrint::printFittingToPage(KookaImage *img)
newHeight = int( double( img->height() ) * hAspect );
}
- tmpImg = img->smoothScale(newWidth, newHeight, QImage::ScaleFree);
+ tmpImg = img->smoothScale(newWidth, newHeight, TQImage::ScaleFree);
m_painter->drawImage( 0,0, tmpImg );
}
-void KookaPrint::drawMarkerAroundPoint( const QPoint& p )
+void KookaPrint::drawMarkerAroundPoint( const TQPoint& p )
{
if( ! m_painter ) return;
const int len = 10;
- m_painter->drawLine( p-QPoint(len,0), p+QPoint(len,0));
- m_painter->drawLine( p-QPoint(0,len), p+QPoint(0,len));
+ m_painter->drawLine( p-TQPoint(len,0), p+TQPoint(len,0));
+ m_painter->drawLine( p-TQPoint(0,len), p+TQPoint(0,len));
}
-void KookaPrint::drawCutSign( const QPoint& p, int num, MarkerDirection dir )
+void KookaPrint::drawCutSign( const TQPoint& p, int num, MarkerDirection dir )
{
- QBrush saveB = m_painter->brush();
+ TQBrush saveB = m_painter->brush();
int start = 0;
const int radius=20;
- QColor brushColor( Qt::red );
+ TQColor brushColor( Qt::red );
int toffX=0;
int toffY=0;
- QString numStr = QString::number(num);
+ TQString numStr = TQString::number(num);
- QFontMetrics fm = m_painter->fontMetrics();
+ TQFontMetrics fm = m_painter->fontMetrics();
int textWidth = fm.width( numStr )/2;
int textHeight = fm.width( numStr )/2;
int textYOff = 0;
@@ -257,7 +257,7 @@ void KookaPrint::drawCutSign( const QPoint& p, int num, MarkerDirection dir )
// m_painter->drawRect( x, y, radius, radius ); /* debug !!! */
const int tAway = radius*3/4;
- QRect bRect = fm.boundingRect( QString::number(num));
+ TQRect bRect = fm.boundingRect( TQString::number(num));
int textX = p.x()+ tAway * toffX + textXOff;
int textY = p.y()+ tAway * toffY + textYOff;
@@ -265,8 +265,8 @@ void KookaPrint::drawCutSign( const QPoint& p, int num, MarkerDirection dir )
kdDebug(28000) << "Drawing to position " << textX << "/" << textY << endl;
m_painter->drawText( textX,
textY,
- QString::number(num));
- QBrush b( brushColor, NoBrush /* remove this to get debug color*/ );
+ TQString::number(num));
+ TQBrush b( brushColor, NoBrush /* remove this to get debug color*/ );
m_painter->setBrush( b );
@@ -279,9 +279,9 @@ void KookaPrint::drawCutSign( const QPoint& p, int num, MarkerDirection dir )
/*
* draws the circle and the numbers that indicate the pages to glue to the side
*/
-void KookaPrint::drawCornerMarker( const QSize& imgSize, int row, int col, int maxRows, int maxCols )
+void KookaPrint::drawCornerMarker( const TQSize& imgSize, int row, int col, int maxRows, int maxCols )
{
- QPoint p;
+ TQPoint p;
kdDebug(28000) << "Marker: Row: " << row << " and col " << col <<" from max "
<< maxRows << "x" << maxCols << endl;
@@ -326,12 +326,12 @@ void KookaPrint::drawCornerMarker( const QSize& imgSize, int row, int col, int m
drawCutSign( p, indx+maxCols, SO );
}
- // p += QPoint( 1, 1 );
+ // p += TQPoint( 1, 1 );
drawMarkerAroundPoint( p ); /* at bottom right */
/* Bottom left */
p = printPosBottomLeft( imgSize );
- // p += QPoint( -1, 1 );
+ // p += TQPoint( -1, 1 );
if( maxRows > 1 || maxCols > 1 )
{
if( col > 0 )
@@ -344,64 +344,64 @@ void KookaPrint::drawCornerMarker( const QSize& imgSize, int row, int col, int m
drawMarkerAroundPoint( p ); /* at bottom left */
}
-QSize KookaPrint::maxPageSize( int extraShrinkPercent ) const
+TQSize KookaPrint::maxPageSize( int extraShrinkPercent ) const
{
- if( ! m_painter ) return QSize();
- QPaintDeviceMetrics printermetrics( m_painter->device() );
+ if( ! m_painter ) return TQSize();
+ TQPaintDeviceMetrics printermetrics( m_painter->device() );
double extraShrink = double(100-extraShrinkPercent)/100.0;
- QSize retSize( printermetrics.width(), printermetrics.height() );
+ TQSize retSize( printermetrics.width(), printermetrics.height() );
if( extraShrinkPercent > 0 )
- retSize = QSize( int(double(printermetrics.width())* extraShrink) ,
+ retSize = TQSize( int(double(printermetrics.width())* extraShrink) ,
int(double(printermetrics.height())* extraShrink ));
return retSize;
}
int KookaPrint::extraMarginPix() const
{
- QSize max = maxPageSize();
+ TQSize max = maxPageSize();
/* take the half extra margin */
return int(double(max.width())*double(m_extraMarginPercent) / 100.0 / 2.0);
}
-QPoint KookaPrint::printPosTopLeft( const QSize& imgSize ) const
+TQPoint KookaPrint::printPosTopLeft( const TQSize& imgSize ) const
{
- QSize max = maxPageSize();
+ TQSize max = maxPageSize();
/* take the half extra margin */
int eMargin = extraMarginPix();
- return QPoint( eMargin + (max.width() - imgSize.width())/2,
+ return TQPoint( eMargin + (max.width() - imgSize.width())/2,
eMargin + (max.height() - imgSize.height())/2 );
}
-QPoint KookaPrint::printPosTopRight(const QSize& imgSize) const
+TQPoint KookaPrint::printPosTopRight(const TQSize& imgSize) const
{
- QSize max = maxPageSize();
+ TQSize max = maxPageSize();
/* take the half extra margin */
int eMargin = extraMarginPix();
- return QPoint( eMargin + (max.width() - imgSize.width())/2+imgSize.width(),
+ return TQPoint( eMargin + (max.width() - imgSize.width())/2+imgSize.width(),
eMargin + (max.height() - imgSize.height())/2 );
}
-QPoint KookaPrint::printPosBottomLeft(const QSize& imgSize) const
+TQPoint KookaPrint::printPosBottomLeft(const TQSize& imgSize) const
{
- QSize max = maxPageSize();
+ TQSize max = maxPageSize();
int eMargin = extraMarginPix();
/* take the half extra margin */
- return QPoint( eMargin+(max.width() - imgSize.width())/2,
+ return TQPoint( eMargin+(max.width() - imgSize.width())/2,
eMargin+(max.height() - imgSize.height())/2 + imgSize.height() );
}
-QPoint KookaPrint::printPosBottomRight(const QSize& imgSize) const
+TQPoint KookaPrint::printPosBottomRight(const TQSize& imgSize) const
{
- QSize max = maxPageSize();
+ TQSize max = maxPageSize();
/* take the half extra margin */
int eMargin = extraMarginPix();
- return QPoint( eMargin+(max.width() - imgSize.width())/2 + imgSize.width(),
+ return TQPoint( eMargin+(max.width() - imgSize.width())/2 + imgSize.width(),
eMargin+(max.height() - imgSize.height())/2 + imgSize.height() );
}
diff --git a/kooka/kookaprint.h b/kooka/kookaprint.h
index 5f87d973..0373b642 100644
--- a/kooka/kookaprint.h
+++ b/kooka/kookaprint.h
@@ -27,24 +27,24 @@
#ifndef __KOOKA_PRINT_H__
#define __KOOKA_PRINT_H__
-#include <qobject.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstring.h>
#include <kprinter.h>
#include <kdeprint/kprintdialogpage.h>
class KookaImage;
class KPrinter;
-class QPainter;
+class TQPainter;
class KLineEdit;
class ImageSettings : public KPrintDialogPage
{
public:
- void setOptions( const QMap<QString, QString>& opts );
- void getOptions( QMap<QString, QString>& opts, bool include_def = false );
- bool isValid( QString& msg );
+ void setOptions( const TQMap<TQString, TQString>& opts );
+ void getOptions( TQMap<TQString, TQString>& opts, bool include_def = false );
+ bool isValid( TQString& msg );
private:
KLineEdit *m_width, *m_height;
@@ -61,10 +61,10 @@ public:
/**
* The top left edge of the required print position
*/
- virtual QPoint printPosTopLeft(const QSize&) const;
- virtual QPoint printPosTopRight(const QSize&) const;
- virtual QPoint printPosBottomLeft(const QSize&) const;
- virtual QPoint printPosBottomRight(const QSize&) const;
+ virtual TQPoint printPosTopLeft(const TQSize&) const;
+ virtual TQPoint printPosTopRight(const TQSize&) const;
+ virtual TQPoint printPosBottomLeft(const TQSize&) const;
+ virtual TQPoint printPosBottomRight(const TQSize&) const;
virtual int extraMarginPix() const;
@@ -72,7 +72,7 @@ public:
* The maximum pixel size of the image (or imagepart) on
* the current page
*/
- virtual QSize maxPageSize( int extraShrinkPercent = 0 ) const;
+ virtual TQSize maxPageSize( int extraShrinkPercent = 0 ) const;
public slots:
@@ -81,14 +81,14 @@ public slots:
protected:
typedef enum { SW, NW, NO, SO } MarkerDirection;
- virtual void drawMarkerAroundPoint( const QPoint& );
- virtual void drawCutSign( const QPoint&, int, MarkerDirection );
- virtual void drawCornerMarker( const QSize&, int, int, int, int );
+ virtual void drawMarkerAroundPoint( const TQPoint& );
+ virtual void drawCutSign( const TQPoint&, int, MarkerDirection );
+ virtual void drawCornerMarker( const TQSize&, int, int, int, int );
private:
KPrinter *m_printer;
- QPainter *m_painter;
+ TQPainter *m_painter;
int m_extraMarginPercent;
};
diff --git a/kooka/kookaview.cpp b/kooka/kookaview.cpp
index f1c1d8d0..2843535f 100644
--- a/kooka/kookaview.cpp
+++ b/kooka/kookaview.cpp
@@ -45,15 +45,15 @@
#if 0
#include "paramsetdialogs.h"
#endif
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qsplitter.h>
-#include <qstrlist.h>
-#include <qpaintdevice.h>
-#include <qpaintdevicemetrics.h>
-#include <qpopupmenu.h>
-#include <qwidgetstack.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqsplitter.h>
+#include <tqstrlist.h>
+#include <tqpaintdevice.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpopupmenu.h>
+#include <tqwidgetstack.h>
#include <kurl.h>
#include <krun.h>
@@ -72,18 +72,18 @@
#include <kiconloader.h>
#include <kshortcut.h>
#include <kdockwidget.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <kparts/componentfactory.h>
-#include <qimage.h>
+#include <tqimage.h>
#include <kpopupmenu.h>
#define STARTUP_IMG_SELECTION "SelectedImageOnStartup"
-KookaView::KookaView( KParts::DockMainWindow *parent, const QCString& deviceToUse)
- : QObject(),
+KookaView::KookaView( KParts::DockMainWindow *parent, const TQCString& deviceToUse)
+ : TQObject(),
m_ocrResultImg(0),
ocrFabric(0),
m_mainDock(0),
@@ -112,8 +112,8 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const QCString& deviceToUs
img_canvas = new ImageCanvas( m_mainDock );
img_canvas->setMinimumSize(100,200);
img_canvas->enableContextMenu(true);
- connect( img_canvas, SIGNAL( imageReadOnly(bool)),
- this, SLOT(slViewerReadOnly(bool)));
+ connect( img_canvas, TQT_SIGNAL( imageReadOnly(bool)),
+ this, TQT_SLOT(slViewerReadOnly(bool)));
KPopupMenu *ctxtmenu = static_cast<KPopupMenu*>(img_canvas->contextMenu());
if( ctxtmenu )
@@ -147,10 +147,10 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const QCString& deviceToUs
30 ); // relation target/this (in percent)
- connect( packager, SIGNAL(showThumbnails( KFileTreeViewItem* )),
- this, SLOT( slShowThumbnails( KFileTreeViewItem* )));
- connect( m_thumbview, SIGNAL( selectFromThumbnail( const KURL& )),
- packager, SLOT( slSelectImage(const KURL&)));
+ connect( packager, TQT_SIGNAL(showThumbnails( KFileTreeViewItem* )),
+ this, TQT_SLOT( slShowThumbnails( KFileTreeViewItem* )));
+ connect( m_thumbview, TQT_SIGNAL( selectFromThumbnail( const KURL& )),
+ packager, TQT_SLOT( slSelectImage(const KURL&)));
/*
* Create a Kombobox that holds the last folders visible even on the preview page
@@ -161,10 +161,10 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const QCString& deviceToUs
m_dockRecent->setDockSite(KDockWidget::DockFullSite);
- QHBox *recentBox = new QHBox( m_dockRecent );
+ TQHBox *recentBox = new TQHBox( m_dockRecent );
recentBox->setMargin(KDialog::marginHint());
- QLabel *lab = new QLabel( i18n("Gallery:"), recentBox );
- lab->setSizePolicy( QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed) );
+ TQLabel *lab = new TQLabel( i18n("Gallery:"), recentBox );
+ lab->setSizePolicy( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed) );
recentFolder = new ImageNameCombo( recentBox );
m_dockRecent->setWidget( recentBox );
@@ -174,14 +174,14 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const QCString& deviceToUs
- connect( packager, SIGNAL( galleryPathSelected( KFileTreeBranch*, const QString&)),
- recentFolder, SLOT( slotGalleryPathChanged( KFileTreeBranch*, const QString& )));
+ connect( packager, TQT_SIGNAL( galleryPathSelected( KFileTreeBranch*, const TQString&)),
+ recentFolder, TQT_SLOT( slotGalleryPathChanged( KFileTreeBranch*, const TQString& )));
- connect( packager, SIGNAL( directoryToRemove( KFileTreeBranch*, const QString&)),
- recentFolder, SLOT( slotPathRemove( KFileTreeBranch*, const QString& )));
+ connect( packager, TQT_SIGNAL( directoryToRemove( KFileTreeBranch*, const TQString&)),
+ recentFolder, TQT_SLOT( slotPathRemove( KFileTreeBranch*, const TQString& )));
- connect( recentFolder, SIGNAL(activated( const QString& )),
- packager, SLOT(slotSelectDirectory( const QString& )));
+ connect( recentFolder, TQT_SIGNAL(activated( const TQString& )),
+ packager, TQT_SLOT(slotSelectDirectory( const TQString& )));
/* the object from the kscan lib to handle low level scanning */
m_dockScanParam = parent->createDockWidget( "Scan Parameter",
@@ -236,7 +236,7 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const QCString& deviceToUs
100 ); // relation target/this (in percent)
m_ocrResEdit->setTextFormat( Qt::PlainText );
- m_ocrResEdit->setWordWrap( QTextEdit::NoWrap );
+ m_ocrResEdit->setWordWrap( TQTextEdit::NoWrap );
// m_dockOCRText->hide();
}
@@ -246,33 +246,33 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const QCString& deviceToUs
}
/* New image created after scanning */
- connect(sane, SIGNAL(sigNewImage(QImage*,ImgScanInfo*)), this, SLOT(slNewImageScanned(QImage*,ImgScanInfo*)));
+ connect(sane, TQT_SIGNAL(sigNewImage(TQImage*,ImgScanInfo*)), this, TQT_SLOT(slNewImageScanned(TQImage*,ImgScanInfo*)));
/* New preview image */
- connect(sane, SIGNAL(sigNewPreview(QImage*,ImgScanInfo *)), this, SLOT( slNewPreview(QImage*,ImgScanInfo *)));
+ connect(sane, TQT_SIGNAL(sigNewPreview(TQImage*,ImgScanInfo *)), this, TQT_SLOT( slNewPreview(TQImage*,ImgScanInfo *)));
- connect( sane, SIGNAL( sigScanStart() ), this, SLOT( slScanStart()));
- connect( sane, SIGNAL( sigScanFinished(KScanStat)), this, SLOT(slScanFinished(KScanStat)));
- connect( sane, SIGNAL( sigAcquireStart()), this, SLOT( slAcquireStart()));
+ connect( sane, TQT_SIGNAL( sigScanStart() ), this, TQT_SLOT( slScanStart()));
+ connect( sane, TQT_SIGNAL( sigScanFinished(KScanStat)), this, TQT_SLOT(slScanFinished(KScanStat)));
+ connect( sane, TQT_SIGNAL( sigAcquireStart()), this, TQT_SLOT( slAcquireStart()));
/* Image canvas should show a new document */
- connect( packager, SIGNAL( showImage( KookaImage* )),
- this, SLOT( slShowAImage( KookaImage*)));
+ connect( packager, TQT_SIGNAL( showImage( KookaImage* )),
+ this, TQT_SLOT( slShowAImage( KookaImage*)));
- connect( packager, SIGNAL( aboutToShowImage(const KURL&)),
- this, SLOT( slStartLoading( const KURL& )));
+ connect( packager, TQT_SIGNAL( aboutToShowImage(const KURL&)),
+ this, TQT_SLOT( slStartLoading( const KURL& )));
/* Packager unloads the image */
- connect( packager, SIGNAL( unloadImage( KookaImage* )),
- this, SLOT( slUnloadAImage( KookaImage*)));
+ connect( packager, TQT_SIGNAL( unloadImage( KookaImage* )),
+ this, TQT_SLOT( slUnloadAImage( KookaImage*)));
/* a image changed mostly through a image manipulation method like rotate */
- connect( packager, SIGNAL( fileChanged( KFileItem* )),
- m_thumbview, SLOT( slImageChanged( KFileItem* )));
+ connect( packager, TQT_SIGNAL( fileChanged( KFileItem* )),
+ m_thumbview, TQT_SLOT( slImageChanged( KFileItem* )));
- connect( packager, SIGNAL( fileRenamed( KFileItem*, const KURL& )),
- m_thumbview, SLOT( slImageRenamed( KFileItem*, const KURL& )));
+ connect( packager, TQT_SIGNAL( fileRenamed( KFileItem*, const KURL& )),
+ m_thumbview, TQT_SLOT( slImageRenamed( KFileItem*, const KURL& )));
- connect( packager, SIGNAL( fileDeleted( KFileItem* )),
- m_thumbview, SLOT( slImageDeleted( KFileItem* )));
+ connect( packager, TQT_SIGNAL( fileDeleted( KFileItem* )),
+ m_thumbview, TQT_SLOT( slImageDeleted( KFileItem* )));
packager->openRoots();
@@ -280,8 +280,8 @@ KookaView::KookaView( KParts::DockMainWindow *parent, const QCString& deviceToUs
/* Status Bar */
KStatusBar *statBar = m_mainWindow->statusBar();
- // statBar->insertItem(QString("1"), SBAR_ZOOM, 0, true );
- statBar->insertItem( QString("-"), StatusImage, 0, true );
+ // statBar->insertItem(TQString("1"), SBAR_ZOOM, 0, true );
+ statBar->insertItem( TQString("-"), StatusImage, 0, true );
/* Set a large enough size */
int w = statBar->fontMetrics().
@@ -306,13 +306,13 @@ void KookaView::slViewerReadOnly( bool )
}
-bool KookaView::slSelectDevice( const QCString& useDevice )
+bool KookaView::slSelectDevice( const TQCString& useDevice )
{
kdDebug(28000) << "Kookaview: select a device!" << endl;
bool haveConnection = false;
- QCString selDevice;
+ TQCString selDevice;
/* in case useDevice is the term 'gallery', the user does not want to
* connect to a scanner, but only work in gallery mode. Otherwise, try
* to read the device to use from config or from a user dialog */
@@ -346,8 +346,8 @@ bool KookaView::slSelectDevice( const QCString& useDevice )
if( sane->openDevice( selDevice ) == KSCAN_OK )
{
- connect( scan_params, SIGNAL( scanResolutionChanged( int, int )),
- preview_canvas, SLOT( slNewScanResolutions( int, int )));
+ connect( scan_params, TQT_SIGNAL( scanResolutionChanged( int, int )),
+ preview_canvas, TQT_SLOT( slNewScanResolutions( int, int )));
if( ! scan_params->connectDevice( sane ) )
{
@@ -360,12 +360,12 @@ bool KookaView::slSelectDevice( const QCString& useDevice )
/* New Rectangle selection in the preview, now scanimge exists */
ImageCanvas *previewCanvas = preview_canvas->getImageCanvas();
- connect( previewCanvas , SIGNAL( newRect(QRect)),
- scan_params, SLOT(slCustomScanSize(QRect)));
- connect( previewCanvas, SIGNAL( noRect()),
- scan_params, SLOT(slMaximalScanSize()));
- // connect( scan_params, SIGNAL( scanResolutionChanged( int, int )),
- // preview_canvas, SLOT( slNewScanResolutions( int, int )));
+ connect( previewCanvas , TQT_SIGNAL( newRect(TQRect)),
+ scan_params, TQT_SLOT(slCustomScanSize(TQRect)));
+ connect( previewCanvas, TQT_SIGNAL( noRect()),
+ scan_params, TQT_SLOT(slMaximalScanSize()));
+ // connect( scan_params, TQT_SIGNAL( scanResolutionChanged( int, int )),
+ // preview_canvas, TQT_SLOT( slNewScanResolutions( int, int )));
/* load the preview image */
if( preview_canvas )
{
@@ -397,16 +397,16 @@ bool KookaView::slSelectDevice( const QCString& useDevice )
return( haveConnection );
}
-QCString KookaView::userDeviceSelection( ) const
+TQCString KookaView::userDeviceSelection( ) const
{
/* Human readable scanner descriptions */
- QStringList hrbackends;
+ TQStringList hrbackends;
/* a list of backends the scan backend knows */
- QStrList backends = sane->getDevices();
- QStrListIterator it( backends );
+ TQStrList backends = sane->getDevices();
+ TQStrListIterator it( backends );
- QCString selDevice;
+ TQCString selDevice;
if( backends.count() > 0 )
{
while( it )
@@ -423,7 +423,7 @@ QCString KookaView::userDeviceSelection( ) const
if( selDevice.isEmpty() || selDevice.isNull() )
{
kdDebug(29000) << "selDevice not found - starting selector!" << selDevice << endl;
- if ( ds.exec() == QDialog::Accepted )
+ if ( ds.exec() == TQDialog::Accepted )
{
selDevice = ds.getSelectedDevice();
}
@@ -446,7 +446,7 @@ void KookaView::loadStartupImage( void )
if( wantReadOnStart )
{
- QString startup = konf->readPathEntry( STARTUP_IMG_SELECTION );
+ TQString startup = konf->readPathEntry( STARTUP_IMG_SELECTION );
if( !startup.isEmpty() )
{
@@ -479,7 +479,7 @@ void KookaView::print()
}
}
-void KookaView::slNewPreview( QImage *new_img, ImgScanInfo * )
+void KookaView::slNewPreview( TQImage *new_img, ImgScanInfo * )
{
if( new_img )
{
@@ -495,7 +495,7 @@ void KookaView::slNewPreview( QImage *new_img, ImgScanInfo * )
bool KookaView::ToggleVisibility( int item )
{
- QWidget *w = 0;
+ TQWidget *w = 0;
bool ret = false;
switch( item )
@@ -558,32 +558,32 @@ void KookaView::startOCR( KookaImage *img )
ocrFabric = new KSANEOCR( m_mainDock, KGlobal::config() );
ocrFabric->setImageCanvas( img_canvas );
- connect( ocrFabric, SIGNAL( newOCRResultText( const QString& )),
- m_ocrResEdit, SLOT(setText( const QString& )));
+ connect( ocrFabric, TQT_SIGNAL( newOCRResultText( const TQString& )),
+ m_ocrResEdit, TQT_SLOT(setText( const TQString& )));
- connect( ocrFabric, SIGNAL( newOCRResultText( const QString& )),
- m_dockOCRText, SLOT( show() ));
+ connect( ocrFabric, TQT_SIGNAL( newOCRResultText( const TQString& )),
+ m_dockOCRText, TQT_SLOT( show() ));
- connect( ocrFabric, SIGNAL( repaintOCRResImage( )),
- img_canvas, SLOT(repaint()));
+ connect( ocrFabric, TQT_SIGNAL( repaintOCRResImage( )),
+ img_canvas, TQT_SLOT(repaint()));
- connect( ocrFabric, SIGNAL( clearOCRResultText()),
- m_ocrResEdit, SLOT(clear()));
+ connect( ocrFabric, TQT_SIGNAL( clearOCRResultText()),
+ m_ocrResEdit, TQT_SLOT(clear()));
- connect( ocrFabric, SIGNAL( updateWord(int, const QString&, const QString& )),
- m_ocrResEdit, SLOT( slUpdateOCRResult( int, const QString&, const QString& )));
+ connect( ocrFabric, TQT_SIGNAL( updateWord(int, const TQString&, const TQString& )),
+ m_ocrResEdit, TQT_SLOT( slUpdateOCRResult( int, const TQString&, const TQString& )));
- connect( ocrFabric, SIGNAL( ignoreWord(int, const ocrWord&)),
- m_ocrResEdit, SLOT( slIgnoreWrongWord( int, const ocrWord& )));
+ connect( ocrFabric, TQT_SIGNAL( ignoreWord(int, const ocrWord&)),
+ m_ocrResEdit, TQT_SLOT( slIgnoreWrongWord( int, const ocrWord& )));
- connect( ocrFabric, SIGNAL( markWordWrong(int, const ocrWord& )),
- m_ocrResEdit, SLOT( slMarkWordWrong( int, const ocrWord& )));
+ connect( ocrFabric, TQT_SIGNAL( markWordWrong(int, const ocrWord& )),
+ m_ocrResEdit, TQT_SLOT( slMarkWordWrong( int, const ocrWord& )));
- connect( ocrFabric, SIGNAL( readOnlyEditor( bool )),
- m_ocrResEdit, SLOT( setReadOnly( bool )));
+ connect( ocrFabric, TQT_SIGNAL( readOnlyEditor( bool )),
+ m_ocrResEdit, TQT_SLOT( setReadOnly( bool )));
- connect( ocrFabric, SIGNAL( selectWord( int, const ocrWord& )),
- m_ocrResEdit, SLOT( slSelectWord( int, const ocrWord& )));
+ connect( ocrFabric, TQT_SIGNAL( selectWord( int, const ocrWord& )),
+ m_ocrResEdit, TQT_SLOT( slSelectWord( int, const ocrWord& )));
}
@@ -600,7 +600,7 @@ void KookaView::startOCR( KookaImage *img )
}
-void KookaView::slOCRResultImage( const QPixmap& pix )
+void KookaView::slOCRResultImage( const TQPixmap& pix )
{
kdDebug(28000) << "Showing OCR Result Image" << endl;
if( ! img_canvas ) return;
@@ -611,7 +611,7 @@ void KookaView::slOCRResultImage( const QPixmap& pix )
delete m_ocrResultImg;
}
- m_ocrResultImg = new QImage();
+ m_ocrResultImg = new TQImage();
*m_ocrResultImg = pix;
img_canvas->newImage( m_ocrResultImg );
img_canvas->setReadOnly(true); // ocr result images should be read only.
@@ -645,7 +645,7 @@ void KookaView::slAcquireStart( )
}
}
-void KookaView::slNewImageScanned( QImage* img, ImgScanInfo* si )
+void KookaView::slNewImageScanned( TQImage* img, ImgScanInfo* si )
{
KookaImageMeta *meta = new KookaImageMeta;
meta->setScanResolution(si->getXResolution(), si->getYResolution());
@@ -688,7 +688,7 @@ void KookaView::slCreateNewImgFromSelection()
if( img_canvas->rootImage() )
{
emit( signalChangeStatusbar( i18n("Create new image from selection" )));
- QImage img;
+ TQImage img;
if( img_canvas->selectedImage( &img ) )
{
packager->slAddImage( &img );
@@ -701,15 +701,15 @@ void KookaView::slCreateNewImgFromSelection()
void KookaView::slRotateImage(int angle)
{
- // QImage *img = (QImage*) img_canvas->rootImage();
+ // TQImage *img = (TQImage*) img_canvas->rootImage();
KookaImage *img = packager->getCurrImage();
bool doUpdate = true;
if( img )
{
- QImage resImg;
+ TQImage resImg;
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
switch( angle )
{
case 90:
@@ -732,7 +732,7 @@ void KookaView::slRotateImage(int angle)
break;
}
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
/* updateCurrImage does the status-bar cleanup */
if( doUpdate )
@@ -747,14 +747,14 @@ void KookaView::slRotateImage(int angle)
void KookaView::slMirrorImage( MirrorType m )
{
- const QImage *img = img_canvas->rootImage();
+ const TQImage *img = img_canvas->rootImage();
bool doUpdate = true;
if( img )
{
- QImage resImg;
+ TQImage resImg;
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
switch( m )
{
case MirrorVertical:
@@ -773,7 +773,7 @@ void KookaView::slMirrorImage( MirrorType m )
kdDebug(28000) << "Mirroring: no way ;)" << endl;
doUpdate = false;
}
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
/* updateCurrImage does the status-bar cleanup */
if( doUpdate )
@@ -820,8 +820,8 @@ void KookaView::slSaveScanParams( )
if( dialog.exec())
{
kdDebug(28000)<< "Executed successfully" << endl;
- QString name = dialog.paramSetName();
- QString desc = dialog.paramSetDescription();
+ TQString name = dialog.paramSetName();
+ TQString desc = dialog.paramSetDescription();
sane->slSaveScanConfigSet( name, desc );
}
#endif
@@ -876,10 +876,10 @@ void KookaView::slShowThumbnails(KFileTreeViewItem *dirKfi, bool forceRedraw )
}
else
{
- kftvi = static_cast<KFileTreeViewItem*>(static_cast<QListViewItem*>(kftvi)->parent());
+ kftvi = static_cast<KFileTreeViewItem*>(static_cast<TQListViewItem*>(kftvi)->parent());
dirKfi = kftvi;
forceRedraw = true;
- packager->setSelected( static_cast<QListViewItem*>(dirKfi), true );
+ packager->setSelected( static_cast<TQListViewItem*>(dirKfi), true );
}
}
@@ -894,7 +894,7 @@ void KookaView::slShowThumbnails(KFileTreeViewItem *dirKfi, bool forceRedraw )
KFileItemList fileItemsList;
- QListViewItem * myChild = dirKfi->firstChild();
+ TQListViewItem * myChild = dirKfi->firstChild();
while( myChild )
{
fileItemsList.append( static_cast<KFileTreeViewItem*>(myChild)->fileItem());
@@ -923,7 +923,7 @@ void KookaView::slStartLoading( const KURL& url )
}
-void KookaView::updateCurrImage( QImage& img )
+void KookaView::updateCurrImage( TQImage& img )
{
if( ! img_canvas->readOnly() )
{
@@ -951,7 +951,7 @@ void KookaView::saveProperties(KConfig *config)
void KookaView::slOpenCurrInGraphApp( void )
{
- QString file;
+ TQString file;
if( packager )
{
@@ -969,13 +969,13 @@ void KookaView::slOpenCurrInGraphApp( void )
}
-QImage KookaView::rotateLeft( QImage *m_img )
+TQImage KookaView::rotateLeft( TQImage *m_img )
{
- QImage rot;
+ TQImage rot;
if( m_img )
{
- QWMatrix m;
+ TQWMatrix m;
m.rotate(-90);
rot = m_img->xForm(m);
@@ -983,13 +983,13 @@ QImage KookaView::rotateLeft( QImage *m_img )
return( rot );
}
-QImage KookaView::rotateRight( QImage *m_img )
+TQImage KookaView::rotateRight( TQImage *m_img )
{
- QImage rot;
+ TQImage rot;
if( m_img )
{
- QWMatrix m;
+ TQWMatrix m;
m.rotate(+90);
rot = m_img->xForm(m);
@@ -997,13 +997,13 @@ QImage KookaView::rotateRight( QImage *m_img )
return( rot );
}
-QImage KookaView::rotate180( QImage *m_img )
+TQImage KookaView::rotate180( TQImage *m_img )
{
- QImage rot;
+ TQImage rot;
if( m_img )
{
- QWMatrix m;
+ TQWMatrix m;
m.rotate(+180);
rot = m_img->xForm(m);
@@ -1015,7 +1015,7 @@ QImage KookaView::rotate180( QImage *m_img )
void KookaView::connectViewerAction( KAction *action )
{
- QPopupMenu *popup = img_canvas->contextMenu();
+ TQPopupMenu *popup = img_canvas->contextMenu();
kdDebug(29000) << "This is the popup: " << popup << endl;
if( popup && action )
{
@@ -1025,7 +1025,7 @@ void KookaView::connectViewerAction( KAction *action )
void KookaView::connectGalleryAction( KAction *action )
{
- QPopupMenu *popup = packager->contextMenu();
+ TQPopupMenu *popup = packager->contextMenu();
if( popup && action )
{
diff --git a/kooka/kookaview.h b/kooka/kookaview.h
index a1f7898a..10017e88 100644
--- a/kooka/kookaview.h
+++ b/kooka/kookaview.h
@@ -26,14 +26,14 @@
#ifndef KOOKAVIEW_H
#define KOOKAVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kopenwith.h>
#include "kookaiface.h"
#include <kdockwidget.h>
-#include <qtabwidget.h>
-#include <qlayout.h>
-#include <qimage.h>
-#include <qsplitter.h>
+#include <tqtabwidget.h>
+#include <tqlayout.h>
+#include <tqimage.h>
+#include <tqsplitter.h>
#include <kparts/dockmainwindow.h>
#include <kparts/part.h>
@@ -46,7 +46,7 @@
#include "img_canvas.h"
class KDockWidget;
-class QPainter;
+class TQPainter;
class KSANEOCR;
class KConfig;
class KPrinter;
@@ -55,7 +55,7 @@ class KAction;
class KActionCollection;
class ThumbView;
class KookaImage;
-class QPixmap;
+class TQPixmap;
class ocrResEdit;
/**
* This is the main view class for Kooka. Most of the non-menu,
@@ -76,7 +76,7 @@ public:
/**
* Default constructor
*/
- KookaView(KParts::DockMainWindow *parent, const QCString& deviceToUse);
+ KookaView(KParts::DockMainWindow *parent, const TQCString& deviceToUse);
/**
* Destructor
@@ -102,7 +102,7 @@ public:
public slots:
void slShowPreview() { }
void slShowPackager() { }
- void slNewPreview( QImage *, ImgScanInfo * );
+ void slNewPreview( TQImage *, ImgScanInfo * );
void slSetScanParamsVisible( bool v )
{ if( v ) scan_params->show(); else scan_params->hide(); }
@@ -137,7 +137,7 @@ public slots:
void slLoadScanParams( );
void slSaveScanParams( );
- void slOCRResultImage( const QPixmap& );
+ void slOCRResultImage( const TQPixmap& );
void slShowThumbnails( KFileTreeViewItem *dirKfi = 0, bool forceRedraw=false);
void slFreshUpThumbView();
@@ -158,7 +158,7 @@ public slots:
* slot to select the scanner device. Does all the work with selection
* of scanner, disconnection of the old device and connecting the new.
*/
- bool slSelectDevice(const QCString& useDevice=QCString());
+ bool slSelectDevice(const TQCString& useDevice=TQCString());
void connectViewerAction( KAction *action );
void connectGalleryAction( KAction *action );
@@ -175,9 +175,9 @@ protected slots:
/**
* called from the scandevice if a new Image was successfully scanned.
- * Needs to convert the one-page-QImage to a KookaImage
+ * Needs to convert the one-page-TQImage to a KookaImage
*/
- void slNewImageScanned(QImage*, ImgScanInfo*);
+ void slNewImageScanned(TQImage*, ImgScanInfo*);
/**
* called if an viewer image was set to read only or back to read write state.
@@ -187,7 +187,7 @@ signals:
/**
* Use this signal to change the content of the statusbar
*/
- void signalChangeStatusbar(const QString& text);
+ void signalChangeStatusbar(const TQString& text);
/**
* Use this signal to clean up the statusbar
@@ -197,15 +197,15 @@ signals:
/**
* Use this signal to change the content of the caption
*/
- void signalChangeCaption(const QString& text);
+ void signalChangeCaption(const TQString& text);
private:
- QImage rotateRight( QImage* );
- QImage rotateLeft ( QImage* );
- QImage rotate180 ( QImage* );
- QCString userDeviceSelection( ) const;
+ TQImage rotateRight( TQImage* );
+ TQImage rotateLeft ( TQImage* );
+ TQImage rotate180 ( TQImage* );
+ TQCString userDeviceSelection( ) const;
- void updateCurrImage( QImage& ) ;
+ void updateCurrImage( TQImage& ) ;
ImageCanvas *img_canvas;
ThumbView *m_thumbview;
@@ -217,9 +217,9 @@ private:
KScanDevice *sane;
KComboBox *recentFolder;
- QCString connectedDevice;
+ TQCString connectedDevice;
- QImage *m_ocrResultImg;
+ TQImage *m_ocrResultImg;
int image_pool_id;
int preview_id;
diff --git a/kooka/ksaneocr.cpp b/kooka/ksaneocr.cpp
index cf10d682..365624c6 100644
--- a/kooka/ksaneocr.cpp
+++ b/kooka/ksaneocr.cpp
@@ -35,8 +35,8 @@
#include <stdlib.h>
#include <kspell.h>
#include <kspelldlg.h>
-#include <qfile.h>
-#include <qcolor.h>
+#include <tqfile.h>
+#include <tqcolor.h>
#include <stdio.h>
#include <unistd.h>
@@ -54,21 +54,21 @@
#include "kookapref.h"
#include "ocrword.h"
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
#include <klocale.h>
-#include <qpaintdevice.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qbrush.h>
-#include <qfileinfo.h>
+#include <tqpaintdevice.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqbrush.h>
+#include <tqfileinfo.h>
/*
* Thread support is disabled here because the kadmos lib seems not to be
* thread save unfortunately. See slotKadmosResult-comments for more information
*/
-KSANEOCR::KSANEOCR( QWidget*, KConfig *cfg ):
+KSANEOCR::KSANEOCR( TQWidget*, KConfig *cfg ):
m_ocrProcessDia(0L),
daemon(0L),
visibleOCRRunning(false),
@@ -102,7 +102,7 @@ KSANEOCR::KSANEOCR( QWidget*, KConfig *cfg ):
{
/* -- ocr dialog information -- */
konf->setGroup( CFG_GROUP_OCR_DIA );
- QString eng = konf->readEntry(CFG_OCR_ENGINE, "ocrad");
+ TQString eng = konf->readEntry(CFG_OCR_ENGINE, "ocrad");
if( eng == "ocrad" )
{
@@ -113,7 +113,7 @@ KSANEOCR::KSANEOCR( QWidget*, KConfig *cfg ):
m_ocrEngine = GOCR;
}
#ifdef HAVE_KADMOS
- else if( eng == QString("kadmos") ) m_ocrEngine = KADMOS;
+ else if( eng == TQString("kadmos") ) m_ocrEngine = KADMOS;
#endif
kdDebug(28000) << "OCR engine is " << eng << endl;
@@ -173,7 +173,7 @@ void KSANEOCR::slSetImage(KookaImage *img )
/*
* Request to visualise a line-box in the source image, KADMOS Engine
*/
-void KSANEOCR::slLineBox( const QRect& )
+void KSANEOCR::slLineBox( const TQRect& )
{
if( ! m_img ) return;
}
@@ -183,7 +183,7 @@ void KSANEOCR::slLineBox( const QRect& )
* starts visual ocr process. Depending on the ocr engine, this function creates
* a new dialog, and shows it.
*/
-bool KSANEOCR::startOCRVisible( QWidget *parent )
+bool KSANEOCR::startOCRVisible( TQWidget *parent )
{
if( visibleOCRRunning ) return( false );
bool res = true;
@@ -224,9 +224,9 @@ bool KSANEOCR::startOCRVisible( QWidget *parent )
m_ocrProcessDia->introduceImage( m_img );
visibleOCRRunning = true;
- connect( m_ocrProcessDia, SIGNAL( user1Clicked()), this, SLOT( startOCRProcess() ));
- connect( m_ocrProcessDia, SIGNAL( closeClicked()), this, SLOT( slotClose() ));
- connect( m_ocrProcessDia, SIGNAL( user2Clicked()), this, SLOT( slotStopOCR() ));
+ connect( m_ocrProcessDia, TQT_SIGNAL( user1Clicked()), this, TQT_SLOT( startOCRProcess() ));
+ connect( m_ocrProcessDia, TQT_SIGNAL( closeClicked()), this, TQT_SLOT( slotClose() ));
+ connect( m_ocrProcessDia, TQT_SIGNAL( user2Clicked()), this, TQT_SLOT( slotStopOCR() ));
m_ocrProcessDia->show();
}
@@ -250,7 +250,7 @@ void KSANEOCR::finishedOCRVisible( bool success )
if( success )
{
- QString goof = ocrResultText();
+ TQString goof = ocrResultText();
emit newOCRResultText(goof);
@@ -258,7 +258,7 @@ void KSANEOCR::finishedOCRVisible( bool success )
{
if( m_resultImage != 0 ) delete m_resultImage;
kdDebug(28000) << "Result image name: " << m_ocrResultImage << endl;
- m_resultImage = new QImage( m_ocrResultImage, "BMP" );
+ m_resultImage = new TQImage( m_ocrResultImage, "BMP" );
kdDebug(28000) << "New result image has dimensions: " << m_resultImage->width() << "x" << m_resultImage->height()<< endl;
/* The image canvas is non-zero. Set it to our image */
m_imgCanvas->newImageHoldZoom( m_resultImage );
@@ -279,9 +279,9 @@ void KSANEOCR::finishedOCRVisible( bool success )
*/
connect( new KSpell( m_parent, i18n("Kooka OCR Dictionary Check"),
- this, SLOT( slSpellReady(KSpell*)),
+ this, TQT_SLOT( slSpellReady(KSpell*)),
m_ocrProcessDia->spellConfig() ),
- SIGNAL( death()), this, SLOT(slSpellDead()));
+ TQT_SIGNAL( death()), this, TQT_SLOT(slSpellDead()));
}
delete m_ocrProcessDia;
@@ -369,7 +369,7 @@ void KSANEOCR::startOCRAD( )
ocradDialog *ocrDia = static_cast<ocradDialog*>(m_ocrProcessDia);
m_ocrResultImage = ocrDia->orfUrl();
- const QString cmd = ocrDia->getOCRCmd();
+ const TQString cmd = ocrDia->getOCRCmd();
// if( m_ocrResultImage.isEmpty() )
{
@@ -381,10 +381,10 @@ void KSANEOCR::startOCRAD( )
m_ocrImagePBM = ImgSaver::tempSaveImage( m_img, "PBM", 1 );
/* temporar file for orf result */
- KTempFile *tmpOrf = new KTempFile( QString(), ".orf" );
+ KTempFile *tmpOrf = new KTempFile( TQString(), ".orf" );
tmpOrf->setAutoDelete( false );
tmpOrf->close();
- m_tmpOrfName = QFile::encodeName(tmpOrf->name());
+ m_tmpOrfName = TQFile::encodeName(tmpOrf->name());
if( daemon )
@@ -397,25 +397,25 @@ void KSANEOCR::startOCRAD( )
Q_CHECK_PTR(daemon);
*daemon << cmd;
- *daemon << QString("-x");
+ *daemon << TQString("-x");
*daemon << m_tmpOrfName; // the orf result file
- *daemon << QFile::encodeName( m_ocrImagePBM ); // The name of the image
- *daemon << QString("-l");
- *daemon << QString::number( ocrDia->layoutDetectionMode());
+ *daemon << TQFile::encodeName( m_ocrImagePBM ); // The name of the image
+ *daemon << TQString("-l");
+ *daemon << TQString::number( ocrDia->layoutDetectionMode());
KConfig *konf = KGlobal::config ();
KConfigGroupSaver( konf, CFG_GROUP_OCRAD );
- QString format = konf->readEntry( CFG_OCRAD_FORMAT, "utf8");
- *daemon << QString("-F");
+ TQString format = konf->readEntry( CFG_OCRAD_FORMAT, "utf8");
+ *daemon << TQString("-F");
*daemon << format;
- QString charset = konf->readEntry( CFG_OCRAD_CHARSET, "iso-8859-15");
- *daemon << QString("-c");
+ TQString charset = konf->readEntry( CFG_OCRAD_CHARSET, "iso-8859-15");
+ *daemon << TQString("-c");
*daemon << charset;
- QString addArgs = konf->readEntry( CFG_OCRAD_EXTRA_ARGUMENTS, QString() );
+ TQString addArgs = konf->readEntry( CFG_OCRAD_EXTRA_ARGUMENTS, TQString() );
if( !addArgs.isEmpty() )
{
@@ -425,12 +425,12 @@ void KSANEOCR::startOCRAD( )
m_ocrResultText = "";
- connect(daemon, SIGNAL(processExited(KProcess *)),
- this, SLOT( ocradExited(KProcess*)));
- connect(daemon, SIGNAL(receivedStdout(KProcess *, char*, int)),
- this, SLOT( ocradStdIn(KProcess*, char*, int)));
- connect(daemon, SIGNAL(receivedStderr(KProcess *, char*, int)),
- this, SLOT( ocradStdErr(KProcess*, char*, int)));
+ connect(daemon, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT( ocradExited(KProcess*)));
+ connect(daemon, TQT_SIGNAL(receivedStdout(KProcess *, char*, int)),
+ this, TQT_SLOT( ocradStdIn(KProcess*, char*, int)));
+ connect(daemon, TQT_SIGNAL(receivedStderr(KProcess *, char*, int)),
+ this, TQT_SLOT( ocradStdErr(KProcess*, char*, int)));
if (!daemon->start(KProcess::NotifyOnExit, KProcess::All))
{
@@ -448,7 +448,7 @@ void KSANEOCR::startOCRAD( )
void KSANEOCR::ocradExited(KProcess* )
{
kdDebug(28000) << "ocrad exit " << endl;
- QString err;
+ TQString err;
bool parseRes = true;
if( ! readORF(m_tmpOrfName, err) )
@@ -464,14 +464,14 @@ void KSANEOCR::ocradExited(KProcess* )
void KSANEOCR::ocradStdErr(KProcess*, char* buffer, int buflen)
{
- QString errorBuffer = QString::fromLocal8Bit(buffer, buflen);
+ TQString errorBuffer = TQString::fromLocal8Bit(buffer, buflen);
kdDebug(28000) << "ocrad says on stderr: " << errorBuffer << endl;
}
void KSANEOCR::ocradStdIn(KProcess*, char* buffer, int buflen)
{
- QString errorBuffer = QString::fromLocal8Bit(buffer, buflen);
+ TQString errorBuffer = TQString::fromLocal8Bit(buffer, buflen);
kdDebug(28000) << "ocrad says on stdin: " << errorBuffer << endl;
}
@@ -503,7 +503,7 @@ void KSANEOCR::startOCRProcess( void )
KGOCRDialog *gocrDia = static_cast<KGOCRDialog*>(m_ocrProcessDia);
- const QString cmd = gocrDia->getOCRCmd();
+ const TQString cmd = gocrDia->getOCRCmd();
/* Save the image to a temp file */
@@ -513,7 +513,7 @@ void KSANEOCR::startOCRProcess( void )
* Gray: PGM
* Bunt: PPM
*/
- QString format;
+ TQString format;
if( m_img->depth() == 1 )
format = "PBM";
else if( m_img->isGrayscale() )
@@ -521,7 +521,7 @@ void KSANEOCR::startOCRProcess( void )
else
format = "PPM";
- QString tmpFile = ImgSaver::tempSaveImage( m_img, format ); // m_tmpFile->name();
+ TQString tmpFile = ImgSaver::tempSaveImage( m_img, format ); // m_tmpFile->name();
kdDebug(28000) << "Starting GOCR-Command: " << cmd << " on file " << tmpFile
<< ", format " << format << endl;
@@ -535,15 +535,15 @@ void KSANEOCR::startOCRProcess( void )
Q_CHECK_PTR(daemon);
m_ocrResultText = "";
- connect(daemon, SIGNAL(processExited(KProcess *)),
- this, SLOT( gocrExited(KProcess*)));
- connect(daemon, SIGNAL(receivedStdout(KProcess *, char*, int)),
- this, SLOT( gocrStdIn(KProcess*, char*, int)));
- connect(daemon, SIGNAL(receivedStderr(KProcess *, char*, int)),
- this, SLOT( gocrStdErr(KProcess*, char*, int)));
+ connect(daemon, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT( gocrExited(KProcess*)));
+ connect(daemon, TQT_SIGNAL(receivedStdout(KProcess *, char*, int)),
+ this, TQT_SLOT( gocrStdIn(KProcess*, char*, int)));
+ connect(daemon, TQT_SIGNAL(receivedStderr(KProcess *, char*, int)),
+ this, TQT_SLOT( gocrStdErr(KProcess*, char*, int)));
- QString opt;
- *daemon << QFile::encodeName(cmd);
+ TQString opt;
+ *daemon << TQFile::encodeName(cmd);
*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 << QFile::encodeName(tmpFile);
+ *daemon << TQFile::encodeName(tmpFile);
m_ocrCurrLine = 0; // Important in gocrStdIn to store the results
@@ -587,7 +587,7 @@ void KSANEOCR::startOCRProcess( void )
kdDebug(28000) << "Starting Kadmos OCR Engine" << endl;
- QString clasPath; /* target where the clasPath is written in */
+ TQString clasPath; /* target where the clasPath is written in */
if( ! kadDia->getSelClassifier( clasPath ) )
{
KMessageBox::error( m_parent,
@@ -597,7 +597,7 @@ void KSANEOCR::startOCRProcess( void )
finishedOCRVisible(false);
return;
}
- QCString c = clasPath.latin1();
+ TQCString c = clasPath.latin1();
kdDebug(28000) << "Using classifier " << c << endl;
m_rep.Init( c );
@@ -618,10 +618,10 @@ void KSANEOCR::startOCRProcess( void )
kdDebug(28000) << "Image depth " << m_img->depth() << ", colors: " << m_img->numColors() << endl;
#define USE_KADMOS_FILEOP /* use a save-file for OCR instead of filling the reImage struct manually */
#ifdef USE_KADMOS_FILEOP
- m_tmpFile = new KTempFile( QString(), QString("bmp"));
+ m_tmpFile = new KTempFile( TQString(), TQString("bmp"));
m_tmpFile->setAutoDelete( false );
m_tmpFile->close();
- QString tmpFile = m_tmpFile->name();
+ TQString tmpFile = m_tmpFile->name();
kdDebug() << "Saving to file " << tmpFile << endl;
m_img->save( tmpFile, "BMP" );
m_rep.SetImage(tmpFile);
@@ -649,7 +649,7 @@ void KSANEOCR::startOCRProcess( void )
}
#ifdef QT_THREAD_SUPPORT
/* start a timer and wait until it fires. */
- QTimer::singleShot( 500, this, SLOT( slotKadmosResult() ));
+ TQTimer::singleShot( 500, this, TQT_SLOT( slotKadmosResult() ));
#else
slotKadmosResult();
#endif
@@ -703,7 +703,7 @@ void KSANEOCR::slotKadmosResult()
else
{
/* recognition thread is not yet finished. Wait another half a second. */
- QTimer::singleShot( 500, this, SLOT( slotKadmosResult() ));
+ TQTimer::singleShot( 500, this, TQT_SLOT( slotKadmosResult() ));
/* Never comes here if no threads exist on the system */
}
#endif /* HAVE_KADMOS */
@@ -724,7 +724,7 @@ void KSANEOCR::gocrExited(KProcess* d)
* accordingly and than go through every line and create ocrwords for every
* word.
*/
- QStringList lines = QStringList::split( '\n', m_ocrResultText, true );
+ TQStringList lines = TQStringList::split( '\n', m_ocrResultText, true );
m_ocrPage.clear();
m_ocrPage.resize( lines.count() );
@@ -733,13 +733,13 @@ void KSANEOCR::gocrExited(KProcess* d)
unsigned int lineCnt = 0;
- for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it )
+ for ( TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it )
{
kdDebug(28000) << "Splitting up line " << *it << endl;
ocrWordList ocrLine;
- QStringList words = QStringList::split( QRegExp( "\\s+" ), *it, false );
- for ( QStringList::Iterator itWord = words.begin(); itWord != words.end(); ++itWord )
+ TQStringList words = TQStringList::split( TQRegExp( "\\s+" ), *it, false );
+ for ( TQStringList::Iterator itWord = words.begin(); itWord != words.end(); ++itWord )
{
kdDebug(28000) << "Appending to results: " << *itWord << endl;
ocrLine.append( ocrWord( *itWord ));
@@ -784,10 +784,10 @@ void KSANEOCR::gocrExited(KProcess* d)
*
*/
-bool KSANEOCR::readORF( const QString& fileName, QString& errStr )
+bool KSANEOCR::readORF( const TQString& fileName, TQString& errStr )
{
- QFile file( fileName );
- QRegExp rx;
+ TQFile file( fileName );
+ TQRegExp rx;
bool error = false;
/* use a global line number counter here, not the one from the orf. The orf one
@@ -811,7 +811,7 @@ bool KSANEOCR::readORF( const QString& fileName, QString& errStr )
kdDebug(28000) << "***** starting to analyse orf at " << fileName << " *****" << endl;
/* some checks on the orf */
- QFileInfo fi( fileName );
+ TQFileInfo fi( fileName );
if( ! fi.exists() ) {
error = true;
errStr = i18n("The orf %1 does not exist.").arg(fileName);
@@ -824,9 +824,9 @@ bool KSANEOCR::readORF( const QString& fileName, QString& errStr )
if ( !error && file.open( IO_ReadOnly ) )
{
- QTextStream stream( &file );
- QString line;
- QString recLine; // recognised line
+ TQTextStream stream( &file );
+ TQString line;
+ TQString recLine; // recognised line
while ( !stream.atEnd() )
{
@@ -838,13 +838,13 @@ bool KSANEOCR::readORF( const QString& fileName, QString& errStr )
kdDebug(28000) << "# Line check |" << line << "|" << endl;
if( line.startsWith( "total blocks " ) ) // total count fo blocks, must be first line
{
- blockCnt = line.right( len - 13 /* QString("total blocks ").length() */ ).toInt();
+ blockCnt = line.right( len - 13 /* TQString("total blocks ").length() */ ).toInt();
kdDebug(28000) << "Amount of blocks: " << blockCnt << endl;
m_blocks.resize(blockCnt);
}
else if( line.startsWith( "total text blocks " ))
{
- blockCnt = line.right( len - 18 /* QString("total text blocks ").length() */ ).toInt();
+ blockCnt = line.right( len - 18 /* TQString("total text blocks ").length() */ ).toInt();
kdDebug(28000) << "Amount of blocks (V. 10): " << blockCnt << endl;
m_blocks.resize(blockCnt);
}
@@ -855,7 +855,7 @@ bool KSANEOCR::readORF( const QString& fileName, QString& errStr )
{
currBlock = (rx.cap(1).toInt())-1;
kdDebug(28000) << "Setting current block " << currBlock << endl;
- QRect r( rx.cap(2).toInt(), rx.cap(3).toInt(), rx.cap(4).toInt(), rx.cap(5).toInt());
+ TQRect r( rx.cap(2).toInt(), rx.cap(3).toInt(), rx.cap(4).toInt(), rx.cap(5).toInt());
m_blocks[currBlock] = r;
}
else
@@ -866,7 +866,7 @@ bool KSANEOCR::readORF( const QString& fileName, QString& errStr )
}
else if( line.startsWith( "lines " ))
{
- int lineCnt = line.right( len - 6 /* QString("lines ").length() */).toInt();
+ int lineCnt = line.right( len - 6 /* TQString("lines ").length() */).toInt();
m_ocrPage.resize(m_ocrPage.size()+lineCnt);
kdDebug(28000) << "Resized ocrPage to linecount " << lineCnt << endl;
}
@@ -879,7 +879,7 @@ bool KSANEOCR::readORF( const QString& fileName, QString& errStr )
kdDebug(28000) << "RegExp-Result: " << rx.cap(1) << " : " << rx.cap(2) << endl;
int charCount = rx.cap(2).toInt();
ocrWord word;
- QRect brect;
+ TQRect brect;
ocrWordList ocrLine;
ocrLine.setBlock(currBlock);
/* Loop over all characters in the line. Every char has it's own line
@@ -889,7 +889,7 @@ bool KSANEOCR::readORF( const QString& fileName, QString& errStr )
for( int c=0; c < charCount && !stream.atEnd(); c++ )
{
/* Read one line per character */
- QString charLine = stream.readLine();
+ TQString charLine = stream.readLine();
int semiPos = charLine.find(';');
if( semiPos == -1 )
{
@@ -897,8 +897,8 @@ bool KSANEOCR::readORF( const QString& fileName, QString& errStr )
}
else
{
- QString rectStr = charLine.left( semiPos );
- QString results = charLine.remove(0, semiPos+1 );
+ TQString rectStr = charLine.left( semiPos );
+ TQString results = charLine.remove(0, semiPos+1 );
bool lineErr = false;
// rectStr contains the rectangle info of for the character
@@ -915,14 +915,14 @@ bool KSANEOCR::readORF( const QString& fileName, QString& errStr )
lineErr = true;
}
// kdDebug(28000) << "Results-line after cutting the alter: " << results << endl;
- QChar detectedChar = UndetectedChar;
+ TQChar detectedChar = UndetectedChar;
if( !lineErr )
{
/* take the first alternative only FIXME */
if( altCount > 0 )
detectedChar = results[1];
// kdDebug(28000) << "Found " << altCount << " alternatives for "
- // << QString(detectedChar) << endl;
+ // << TQString(detectedChar) << endl;
}
/* Analyse the rectangle */
@@ -933,7 +933,7 @@ bool KSANEOCR::readORF( const QString& fileName, QString& errStr )
if( rx.search( rectStr ) != -1 )
{
/* unite the rectangles */
- QRect privRect( rx.cap(1).toInt(), rx.cap(2).toInt(),
+ TQRect privRect( rx.cap(1).toInt(), rx.cap(2).toInt(),
rx.cap(3).toInt(), rx.cap(4).toInt() );
word.setRect( word.rect() | privRect );
}
@@ -950,10 +950,10 @@ bool KSANEOCR::readORF( const QString& fileName, QString& errStr )
if( detectedChar == ' ' )
{
/* add the block offset to the rect of the word */
- QRect r = word.rect();
+ TQRect r = word.rect();
if( ocradVersion < 10 )
{
- QRect blockRect = m_blocks[currBlock];
+ TQRect blockRect = m_blocks[currBlock];
r.moveBy( blockRect.x(), blockRect.y());
}
@@ -971,10 +971,10 @@ bool KSANEOCR::readORF( const QString& fileName, QString& errStr )
if( !word.isEmpty() )
{
/* add the block offset to the rect of the word */
- QRect r = word.rect();
+ TQRect r = word.rect();
if( ocradVersion < 10 )
{
- QRect blockRect = m_blocks[currBlock];
+ TQRect blockRect = m_blocks[currBlock];
r.moveBy( blockRect.x(), blockRect.y());
}
word.setRect( r );
@@ -1022,23 +1022,23 @@ void KSANEOCR::cleanUpFiles( void )
if( ! m_ocrResultImage.isEmpty())
{
kdDebug(28000) << "Unlinking OCR Result image file!" << endl;
- unlink(QFile::encodeName(m_ocrResultImage));
- m_ocrResultImage = QString();
+ unlink(TQFile::encodeName(m_ocrResultImage));
+ m_ocrResultImage = TQString();
}
if( ! m_ocrImagePBM.isEmpty())
{
kdDebug(28000) << "Unlinking OCR PBM file!" << endl;
- unlink( QFile::encodeName(m_ocrImagePBM));
- m_ocrImagePBM = QString();
+ unlink( TQFile::encodeName(m_ocrImagePBM));
+ m_ocrImagePBM = TQString();
}
if( ! m_tmpOrfName.isEmpty() )
{
if( m_unlinkORF )
{
- unlink(QFile::encodeName(m_tmpOrfName));
- m_tmpOrfName = QString();
+ unlink(TQFile::encodeName(m_tmpOrfName));
+ m_tmpOrfName = TQString();
}
else
{
@@ -1053,7 +1053,7 @@ void KSANEOCR::cleanUpFiles( void )
void KSANEOCR::gocrStdErr(KProcess*, char* buffer, int buflen)
{
- QString errorBuffer = QString::fromLocal8Bit(buffer, buflen);
+ TQString errorBuffer = TQString::fromLocal8Bit(buffer, buflen);
kdDebug(28000) << "gocr says: " << errorBuffer << endl;
}
@@ -1061,9 +1061,9 @@ void KSANEOCR::gocrStdErr(KProcess*, char* buffer, int buflen)
void KSANEOCR::gocrStdIn(KProcess*, char* buffer, int buflen)
{
- QString aux = QString::fromLocal8Bit(buffer, buflen);
+ TQString aux = TQString::fromLocal8Bit(buffer, buflen);
- QRegExp rx( "^\\s*\\d+\\s+\\d+");
+ TQRegExp rx( "^\\s*\\d+\\s+\\d+");
if( rx.search( aux ) > -1 )
{
/* calculate ocr progress for gocr */
@@ -1084,18 +1084,18 @@ void KSANEOCR::gocrStdIn(KProcess*, char* buffer, int buflen)
/*
* Assemble the result text
*/
-QString KSANEOCR::ocrResultText()
+TQString KSANEOCR::ocrResultText()
{
- QString res;
- const QString space(" ");
+ TQString res;
+ const TQString space(" ");
/* start from the back and search the original word to replace it */
- QValueVector<ocrWordList>::iterator pageIt;
+ TQValueVector<ocrWordList>::iterator pageIt;
for( pageIt = m_ocrPage.begin(); pageIt != m_ocrPage.end(); ++pageIt )
{
/* thats goes over all lines */
- QValueList<ocrWord>::iterator lineIt;
+ TQValueList<ocrWord>::iterator lineIt;
for( lineIt = (*pageIt).begin(); lineIt != (*pageIt).end(); ++lineIt )
{
res += space + *lineIt;
@@ -1119,15 +1119,15 @@ void KSANEOCR::setImageCanvas( ImageCanvas *canvas )
}
-bool KSANEOCR::eventFilter( QObject *object, QEvent *event )
+bool KSANEOCR::eventFilter( TQObject *object, TQEvent *event )
{
- QWidget *w = (QWidget*) object;
+ TQWidget *w = (TQWidget*) object;
if( m_applyFilter && m_imgCanvas && w == m_imgCanvas )
{
- if( event->type() == QEvent::MouseButtonDblClick )
+ if( event->type() == TQEvent::MouseButtonDblClick )
{
- QMouseEvent *mev = static_cast<QMouseEvent*>(event);
+ TQMouseEvent *mev = static_cast<TQMouseEvent*>(event);
int x = mev->x();
int y = mev->y();
@@ -1145,7 +1145,7 @@ bool KSANEOCR::eventFilter( QObject *object, QEvent *event )
x = int(double(x)*100/scale);
}
/* now search the word that was clicked on */
- QValueVector<ocrWordList>::iterator pageIt;
+ TQValueVector<ocrWordList>::iterator pageIt;
int line = 0;
bool valid = false;
@@ -1153,7 +1153,7 @@ bool KSANEOCR::eventFilter( QObject *object, QEvent *event )
for( pageIt = m_ocrPage.begin(); pageIt != m_ocrPage.end(); ++pageIt )
{
- QRect r = (*pageIt).wordListRect();
+ TQRect r = (*pageIt).wordListRect();
if( y > r.top() && y < r.bottom() )
{
@@ -1178,7 +1178,7 @@ bool KSANEOCR::eventFilter( QObject *object, QEvent *event )
for( wordIt = words.begin(); wordIt != words.end() && !valid; ++wordIt )
{
- QRect r = (*wordIt).rect();
+ TQRect r = (*wordIt).rect();
if( x > r.left() && x < r.right() )
{
wordToFind = *wordIt;
@@ -1215,8 +1215,8 @@ bool KSANEOCR::eventFilter( QObject *object, QEvent *event )
* KSpell detects the correction by itself and delivers it in newword here.
* To see all alternatives KSpell proposes, slMissspelling must be used.
*/
-void KSANEOCR::slSpellCorrected( const QString& originalword,
- const QString& newword,
+void KSANEOCR::slSpellCorrected( const TQString& originalword,
+ const TQString& newword,
unsigned int pos )
{
kdDebug(28000) << "Corrected: Original Word " << originalword << " was corrected to "
@@ -1240,7 +1240,7 @@ void KSANEOCR::slSpellCorrected( const QString& originalword,
}
-void KSANEOCR::slSpellIgnoreWord( const QString& word )
+void KSANEOCR::slSpellIgnoreWord( const TQString& word )
{
ocrWord ignoreOCRWord;
@@ -1254,9 +1254,9 @@ void KSANEOCR::slSpellIgnoreWord( const QString& word )
m_imgCanvas->removeHighlight( m_currHighlight );
/* create a new highlight. That will never be removed */
- QBrush brush;
- QPen pen( gray, 1 );
- QRect r = ignoreOCRWord.rect();
+ TQBrush brush;
+ TQPen pen( gray, 1 );
+ TQRect r = ignoreOCRWord.rect();
r.moveBy(0,2); // a bit offset to the top
if( m_applyFilter )
@@ -1265,7 +1265,7 @@ void KSANEOCR::slSpellIgnoreWord( const QString& word )
}
}
-ocrWord KSANEOCR::ocrWordFromKSpellWord( int line, const QString& word )
+ocrWord KSANEOCR::ocrWordFromKSpellWord( int line, const TQString& word )
{
ocrWord resWord;
if( lineValid(line) )
@@ -1289,7 +1289,7 @@ bool KSANEOCR::lineValid( int line )
return ret;
}
-void KSANEOCR::slMisspelling( const QString& originalword, const QStringList& suggestions,
+void KSANEOCR::slMisspelling( const TQString& originalword, const TQStringList& suggestions,
unsigned int pos )
{
/* for the first try, use the first suggestion */
@@ -1311,11 +1311,11 @@ void KSANEOCR::slMisspelling( const QString& originalword, const QStringList& su
if( ! resWord.isEmpty() )
{
- QBrush brush;
- brush.setColor( QColor(red)); // , "Dense4Pattern" );
+ TQBrush brush;
+ brush.setColor( TQColor(red)); // , "Dense4Pattern" );
brush.setStyle( Qt::Dense4Pattern );
- QPen pen( red, 2 );
- QRect r = resWord.rect();
+ TQPen pen( red, 2 );
+ TQRect r = resWord.rect();
r.moveBy(0,2); // a bit offset to the top
@@ -1347,18 +1347,18 @@ void KSANEOCR::slMisspelling( const QString& originalword, const QStringList& su
void KSANEOCR::slSpellReady( KSpell *spell )
{
m_spell = spell;
- connect ( m_spell, SIGNAL( misspelling( const QString&, const QStringList&,
+ connect ( m_spell, TQT_SIGNAL( misspelling( const TQString&, const TQStringList&,
unsigned int )),
- this, SLOT( slMisspelling(const QString& ,
- const QStringList& ,
+ this, TQT_SLOT( slMisspelling(const TQString& ,
+ const TQStringList& ,
unsigned int )));
- connect( m_spell, SIGNAL( corrected ( const QString&, const QString&, unsigned int )),
- this, SLOT( slSpellCorrected( const QString&, const QString&, unsigned int )));
+ connect( m_spell, TQT_SIGNAL( corrected ( const TQString&, const TQString&, unsigned int )),
+ this, TQT_SLOT( slSpellCorrected( const TQString&, const TQString&, unsigned int )));
- connect( m_spell, SIGNAL( ignoreword( const QString& )),
- this, SLOT( slSpellIgnoreWord( const QString& )));
+ connect( m_spell, TQT_SIGNAL( ignoreword( const TQString& )),
+ this, TQT_SLOT( slSpellIgnoreWord( const TQString& )));
- connect( m_spell, SIGNAL( done(bool)), this, SLOT(slCheckListDone(bool)));
+ connect( m_spell, TQT_SIGNAL( done(bool)), this, TQT_SLOT(slCheckListDone(bool)));
kdDebug(28000) << "Spellcheck available" << endl;
@@ -1460,8 +1460,8 @@ void KSANEOCR::slCheckListDone(bool)
* The original word was origWord. This slot is called from slSpellCorrected
*
*/
-bool KSANEOCR::slUpdateWord( int line, int spellWordIndx, const QString& origWord,
- const QString& newWord )
+bool KSANEOCR::slUpdateWord( int line, int spellWordIndx, const TQString& origWord,
+ const TQString& newWord )
{
bool result = false;
diff --git a/kooka/ksaneocr.h b/kooka/ksaneocr.h
index 425718dc..fabb25e8 100644
--- a/kooka/ksaneocr.h
+++ b/kooka/ksaneocr.h
@@ -26,8 +26,8 @@
#ifndef KSANEOCR_H
#define KSANEOCR_H
-#include <qwidget.h>
-#include <qobject.h>
+#include <tqwidget.h>
+#include <tqobject.h>
#include "ocrword.h"
@@ -53,9 +53,9 @@ class KOCRBase;
class KookaImage;
class KTempFile;
class KProcess;
-class QRect;
-class QPixmap;
-class QStringList;
+class TQRect;
+class TQPixmap;
+class TQStringList;
class KSpell;
class KSpellConfig;
class ImageCanvas;
@@ -78,10 +78,10 @@ class KSANEOCR : public QObject
public:
enum OCREngines{ GOCR, OCRAD, KADMOS };
- KSANEOCR( QWidget*, KConfig *);
+ KSANEOCR( TQWidget*, KConfig *);
~KSANEOCR();
- bool startOCRVisible( QWidget* parent=0);
+ bool startOCRVisible( TQWidget* parent=0);
void finishedOCRVisible( bool );
@@ -98,7 +98,7 @@ public:
* return the final ocr result
*/
- QString ocrResultText();
+ TQString ocrResultText();
/**
* @return the current spell config.
@@ -116,9 +116,9 @@ public:
void setImageCanvas( ImageCanvas* canvas );
signals:
- void newOCRResultText( const QString& );
+ void newOCRResultText( const TQString& );
void clearOCRResultText();
- void newOCRResultPixmap( const QPixmap& );
+ void newOCRResultPixmap( const TQPixmap& );
/**
* progress of the ocr process. The first integer is the main progress,
@@ -144,7 +144,7 @@ signals:
* @param wordFrom the original word
* @param wordTo the new word(s).
*/
- void updateWord( int line, const QString& wordFrom, const QString& wordTo );
+ void updateWord( int line, const TQString& wordFrom, const TQString& wordTo );
/**
* signal to indicate that word word was ignored by the user. This should result
@@ -166,14 +166,14 @@ signals:
/**
* indicates that the text editor holding the text that came through
* newOCRResultText should be set to readonly or not. Can be connected
- * to QTextEdit::setReadOnly directly.
+ * to TQTextEdit::setReadOnly directly.
*/
void readOnlyEditor( bool );
public slots:
void slSetImage( KookaImage* );
- void slLineBox( const QRect& );
+ void slLineBox( const TQRect& );
protected:
/**
@@ -181,13 +181,13 @@ protected:
* This method starts the spell checking.
**/
void startLineSpellCheck();
- ocrWord ocrWordFromKSpellWord( int line, const QString& word );
+ ocrWord ocrWordFromKSpellWord( int line, const TQString& word );
/**
* Eventhandler to handle the mouse events to the image viewer showing the
* ocr result image
*/
- bool eventFilter( QObject *object, QEvent *event );
+ bool eventFilter( TQObject *object, TQEvent *event );
void startOCRAD();
protected slots:
@@ -202,20 +202,20 @@ protected slots:
*/
// void gotOCRLine( int line );
- void slMisspelling( const QString& originalword,
- const QStringList& suggestions,
+ void slMisspelling( const TQString& originalword,
+ const TQStringList& suggestions,
unsigned int pos );
- void slSpellCorrected( const QString& originalword,
- const QString& newword,
+ void slSpellCorrected( const TQString& originalword,
+ const TQString& newword,
unsigned int pos );
- void slSpellIgnoreWord( const QString& word );
+ void slSpellIgnoreWord( const TQString& word );
void slCheckListDone( bool );
bool slUpdateWord( int line, int spellWordIndx,
- const QString& origWord,
- const QString& newWord );
+ const TQString& origWord,
+ const TQString& newWord );
private slots:
@@ -233,7 +233,7 @@ private slots:
* reads orf files from a file and fills the result structures
* accordingly.
*/
- bool readORF( const QString&, QString& );
+ bool readORF( const TQString&, TQString& );
private:
void cleanUpFiles( void );
@@ -245,15 +245,15 @@ private:
KTempFile *m_tmpFile;
KookaImage *m_img;
- QString m_ocrResultText;
- QString m_ocrResultImage;
- QString m_ocrImagePBM;
- QString m_tmpOrfName;
- QImage *m_resultImage;
+ TQString m_ocrResultText;
+ TQString m_ocrResultImage;
+ TQString m_ocrImagePBM;
+ TQString m_tmpOrfName;
+ TQImage *m_resultImage;
OCREngines m_ocrEngine;
- QPixmap m_resPixmap;
- QPixmap m_storePixmap;
+ TQPixmap m_resPixmap;
+ TQPixmap m_storePixmap;
ImageCanvas *m_imgCanvas;
@@ -265,10 +265,10 @@ private:
/* ValueVector of wordLists for every line of ocr results */
ocrBlock m_ocrPage; /* one block contains all lines of the page */
- QWidget *m_parent;
+ TQWidget *m_parent;
/* current processed line to speed kspell correction */
unsigned m_ocrCurrLine;
- QStringList m_checkStrings;
+ TQStringList m_checkStrings;
int m_currHighlight;
bool m_applyFilter;
diff --git a/kooka/main.cpp b/kooka/main.cpp
index 086d3ddf..67f014c9 100644
--- a/kooka/main.cpp
+++ b/kooka/main.cpp
@@ -26,8 +26,8 @@
* *
***************************************************************************/
-#include <qdict.h>
-#include <qpixmap.h>
+#include <tqdict.h>
+#include <tqpixmap.h>
#include <kapplication.h>
#include <dcopclient.h>
@@ -90,7 +90,7 @@ int main( int argc, char *argv[] )
KIconLoader *loader = KGlobal::iconLoader();
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QCString devToUse = args->getOption( "d" );
+ TQCString devToUse = args->getOption( "d" );
if( args->isSet("g") )
{
devToUse = "gallery";
diff --git a/kooka/ocrresedit.cpp b/kooka/ocrresedit.cpp
index a289a079..a8d842a1 100644
--- a/kooka/ocrresedit.cpp
+++ b/kooka/ocrresedit.cpp
@@ -23,7 +23,7 @@
* without including the source code for Qt in the source distribution. *
* *
***************************************************************************/
-#include <qcolor.h>
+#include <tqcolor.h>
#include "ocrresedit.h"
#include "ocrword.h"
@@ -31,13 +31,13 @@
#include <kfiledialog.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
/* -------------------- ocrResEdit -------------------- */
-ocrResEdit::ocrResEdit( QWidget *parent )
- : QTextEdit(parent)
+ocrResEdit::ocrResEdit( TQWidget *parent )
+ : TQTextEdit(parent)
{
m_updateColor.setNamedColor( "SeaGreen");
m_ignoreColor.setNamedColor( "CadetBlue4" );
@@ -52,8 +52,8 @@ void ocrResEdit::slMarkWordWrong( int line, const ocrWord& word )
}
-void ocrResEdit::slUpdateOCRResult( int line, const QString& wordFrom,
- const QString& wordTo )
+void ocrResEdit::slUpdateOCRResult( int line, const TQString& wordFrom,
+ const TQString& wordTo )
{
/* the index is quite useless here, since the text could have had been
* changed by corrections before. Thus better search the word and update
@@ -74,7 +74,7 @@ void ocrResEdit::slSelectWord( int line, const ocrWord& word )
{
if( line < paragraphs() )
{
- QString editLine = text(line);
+ TQString editLine = text(line);
int cnt = editLine.contains( word);
if( cnt > 0 )
@@ -86,8 +86,8 @@ void ocrResEdit::slSelectWord( int line, const ocrWord& word )
}
}
-void ocrResEdit::slReplaceWord( int line, const QString& wordFrom,
- const QString& wordTo, const QColor& color )
+void ocrResEdit::slReplaceWord( int line, const TQString& wordFrom,
+ const TQString& wordTo, const TQColor& color )
{
kdDebug(28000) << "Updating word " << wordFrom << " in line " << line << endl;
@@ -95,7 +95,7 @@ void ocrResEdit::slReplaceWord( int line, const QString& wordFrom,
if( line < paragraphs() )
{
- QString editLine = text(line);
+ TQString editLine = text(line);
int cnt = editLine.contains( wordFrom );
if( cnt > 0 )
@@ -103,7 +103,7 @@ void ocrResEdit::slReplaceWord( int line, const QString& wordFrom,
int pos = editLine.find(wordFrom);
setSelection( line, pos, line, pos+wordFrom.length());
- QColor saveCol = this->color();
+ TQColor saveCol = this->color();
setColor( color );
if( isRO ) {
setReadOnly(false);
@@ -129,16 +129,16 @@ void ocrResEdit::slReplaceWord( int line, const QString& wordFrom,
void ocrResEdit::slSaveText()
{
- QString fileName = KFileDialog::getSaveFileName( (QDir::home()).path(),
+ TQString fileName = KFileDialog::getSaveFileName( (TQDir::home()).path(),
"*.txt",
this,
i18n("Save OCR Result Text") );
if( fileName.isEmpty() )
return;
- QFile file( fileName );
+ TQFile file( fileName );
if ( file.open( IO_WriteOnly ) )
{
- QTextStream stream( &file );
+ TQTextStream stream( &file );
stream << text();
file.close();
}
diff --git a/kooka/ocrresedit.h b/kooka/ocrresedit.h
index 6c483db4..19191266 100644
--- a/kooka/ocrresedit.h
+++ b/kooka/ocrresedit.h
@@ -27,21 +27,21 @@
#ifndef _OCR_RESEDIT_
#define _OCR_RESEDIT_
-#include <qtextedit.h>
+#include <tqtextedit.h>
-class QString;
-class QColor;
+class TQString;
+class TQColor;
class ocrWord;
class ocrResEdit : public QTextEdit
{
Q_OBJECT
public:
- ocrResEdit( QWidget *parent );
+ ocrResEdit( TQWidget *parent );
public slots:
- void slUpdateOCRResult( int line, const QString& wordFrom,
- const QString& wordTo );
+ void slUpdateOCRResult( int line, const TQString& wordFrom,
+ const TQString& wordTo );
void slMarkWordWrong( int line, const ocrWord& word );
@@ -52,13 +52,13 @@ public slots:
void slSaveText();
protected slots:
- void slReplaceWord( int line, const QString& wordFrom,
- const QString& wordTo, const QColor& color );
+ void slReplaceWord( int line, const TQString& wordFrom,
+ const TQString& wordTo, const TQColor& color );
private:
- QColor m_updateColor;
- QColor m_ignoreColor;
- QColor m_wrnColor;
+ TQColor m_updateColor;
+ TQColor m_ignoreColor;
+ TQColor m_wrnColor;
};
diff --git a/kooka/ocrword.cpp b/kooka/ocrword.cpp
index 1bd29f3e..4b04ea6e 100644
--- a/kooka/ocrword.cpp
+++ b/kooka/ocrword.cpp
@@ -24,29 +24,29 @@
* *
***************************************************************************/
-#include <qstring.h>
+#include <tqstring.h>
#include "ocrword.h"
-#include <qrect.h>
-#include <qptrlist.h>
+#include <tqrect.h>
+#include <tqptrlist.h>
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
/* -------------------- ocrWord -------------------- */
-ocrWord::ocrWord( const QString& s )
- : QString(s)
+ocrWord::ocrWord( const TQString& s )
+ : TQString(s)
{
}
-ocrWord::ocrWord() : QString()
+ocrWord::ocrWord() : TQString()
{
}
#if 0
-QRect ocrWord::boundingRect()
+TQRect ocrWord::boundingRect()
{
- QRect r;
+ TQRect r;
return r;
}
@@ -54,16 +54,16 @@ QRect ocrWord::boundingRect()
/* -------------------- CocrWordList ------------------ */
ocrWordList::ocrWordList()
- :QValueList<ocrWord>(),
+ :TQValueList<ocrWord>(),
m_block(0)
{
// setAutoDelete( true );
}
-QStringList ocrWordList::stringList()
+TQStringList ocrWordList::stringList()
{
- QStringList res;
- QRegExp rx("[,\\.-]");
+ TQStringList res;
+ TQRegExp rx("[,\\.-]");
ocrWordList::iterator it;
for ( it = begin(); it != end(); ++it )
@@ -77,7 +77,7 @@ QStringList ocrWordList::stringList()
* We live with the problem here that dashes bring confusion ;-)
*/
if( (*it).contains( rx ) )
- res += QStringList::split( rx, (*it) );
+ res += TQStringList::split( rx, (*it) );
else
#endif
res << *it;
@@ -86,14 +86,14 @@ QStringList ocrWordList::stringList()
}
-bool ocrWordList::updateOCRWord( const QString& from, const QString& to )
+bool ocrWordList::updateOCRWord( const TQString& from, const TQString& to )
{
ocrWordList::iterator it;
bool res = false;
for( it = begin(); it != end(); ++it )
{
- QString word = (*it);
+ TQString word = (*it);
kdDebug(28000) << "updateOCRWord in list: Comparing word " << word << endl;
if( word.contains( from, true ) ) // case sensitive search
{
@@ -106,9 +106,9 @@ bool ocrWordList::updateOCRWord( const QString& from, const QString& to )
return res;
}
-QRect ocrWordList::wordListRect()
+TQRect ocrWordList::wordListRect()
{
- QRect rect;
+ TQRect rect;
ocrWordList::iterator it;
@@ -126,15 +126,15 @@ QRect ocrWordList::wordListRect()
* This search goes through the wordlist and tries to find the words without caring
* for special chars. It simply removes all chars from the words that are not alphanumeric.
*/
-bool ocrWordList::findFuzzyIndex( const QString& word, ocrWord& resWord )
+bool ocrWordList::findFuzzyIndex( const TQString& word, ocrWord& resWord )
{
ocrWordList::iterator it;
bool res = false;
for( it = begin(); it != end() && !res; ++it )
{
- QString fuzzyword = (*it);
- fuzzyword.remove( QRegExp( "\\W" )); // Remove all non-word characters.
+ TQString fuzzyword = (*it);
+ fuzzyword.remove( TQRegExp( "\\W" )); // Remove all non-word characters.
fuzzyword.remove( '_' );
// kdDebug(28000) << "findFuzzy: Comparing word " << fuzzyword << " which was "
diff --git a/kooka/ocrword.h b/kooka/ocrword.h
index 606acb9f..fd906367 100644
--- a/kooka/ocrword.h
+++ b/kooka/ocrword.h
@@ -27,28 +27,28 @@
#ifndef _OCR_WORD_
#define _OCR_WORD_
-#include <qstringlist.h>
-#include <qvaluevector.h>
-#include <qvaluelist.h>
-#include <qrect.h>
+#include <tqstringlist.h>
+#include <tqvaluevector.h>
+#include <tqvaluelist.h>
+#include <tqrect.h>
-class QString;
-class QRect;
+class TQString;
+class TQRect;
/* ==== ocrWord ====================================== */
class ocrWord : public QString
{
public:
- ocrWord(const QString& s);
+ ocrWord(const TQString& s);
ocrWord();
- QStringList getAlternatives()
+ TQStringList getAlternatives()
{ return m_alternatives; }
- void setAlternatives( const QString& s )
+ void setAlternatives( const TQString& s )
{ m_alternatives.append(s); }
- // QRect boundingRect();
+ // TQRect boundingRect();
void setKnode( int k )
{ m_startKnode = k; }
@@ -58,16 +58,16 @@ public:
int getLine() const { return m_line; }
int getKnode() const { return m_startKnode; }
- void setRect( const QRect& r )
+ void setRect( const TQRect& r )
{ m_position = r; }
- QRect rect()
+ TQRect rect()
{ return m_position; }
private:
- QStringList m_alternatives;
+ TQStringList m_alternatives;
int m_startKnode;
int m_line;
- QRect m_position;
+ TQRect m_position;
};
/* ==== ocrWordList ====================================== */
@@ -75,17 +75,17 @@ private:
/**
* This represents a line of words in an ocr'ed document
*/
-class ocrWordList : public QValueList<ocrWord>
+class ocrWordList : public TQValueList<ocrWord>
{
public:
ocrWordList();
- QStringList stringList();
+ TQStringList stringList();
- bool updateOCRWord( const QString& from, const QString& to );
+ bool updateOCRWord( const TQString& from, const TQString& to );
- bool findFuzzyIndex( const QString& word, ocrWord& resWord );
+ bool findFuzzyIndex( const TQString& word, ocrWord& resWord );
- QRect wordListRect( );
+ TQRect wordListRect( );
void setBlock( int b );
int block() const { return m_block; }
@@ -98,14 +98,14 @@ private:
* All lines of a block: A value vector containing as much as entries
* as lines are available in a block. Needs to be resized acordingly.
*/
-typedef QValueVector<ocrWordList> ocrBlock;
+typedef TQValueVector<ocrWordList> ocrBlock;
/**
* Blocks taken together form the page.
* Attention: Needs to be resized to the amount of blocks !!
*/
-typedef QValueVector<ocrBlock> ocrBlockPage;
+typedef TQValueVector<ocrBlock> ocrBlockPage;
-typedef QValueVector<QRect> rectList;
+typedef TQValueVector<TQRect> rectList;
#endif
diff --git a/kooka/scanpackager.cpp b/kooka/scanpackager.cpp
index 7af7f151..2dd3096b 100644
--- a/kooka/scanpackager.cpp
+++ b/kooka/scanpackager.cpp
@@ -34,16 +34,16 @@
#include "previewer.h"
#include "devselector.h"
-#include <qapplication.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qpopupmenu.h>
-#include <qdict.h>
-#include <qpixmap.h>
+#include <tqapplication.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqpopupmenu.h>
+#include <tqdict.h>
+#include <tqpixmap.h>
#include <kmessagebox.h>
-#include <qfiledialog.h>
-#include <qstringlist.h>
-#include <qheader.h>
+#include <tqfiledialog.h>
+#include <tqstringlist.h>
+#include <tqheader.h>
#include <kfiletreeview.h>
#include <kfiletreeviewitem.h>
@@ -71,11 +71,11 @@
/* ----------------------------------------------------------------------- */
/* Constructor Scan Packager */
-ScanPackager::ScanPackager( QWidget *parent ) : KFileTreeView( parent )
+ScanPackager::ScanPackager( TQWidget *parent ) : KFileTreeView( parent )
{
// TODO:
setItemsRenameable (true );
- setDefaultRenameAction( QListView::Reject );
+ setDefaultRenameAction( TQListView::Reject );
addColumn( i18n("Image Name" ));
setColumnAlignment( 0, AlignLeft );
@@ -90,8 +90,8 @@ ScanPackager::ScanPackager( QWidget *parent ) : KFileTreeView( parent )
setDropVisualizer(true);
setAcceptDrops(true);
- connect( this, SIGNAL(dropped( QWidget*, QDropEvent*, KURL::List&, KURL& )),
- this, SLOT( slotUrlsDropped( QWidget*, QDropEvent*, KURL::List&, KURL& )));
+ connect( this, TQT_SIGNAL(dropped( TQWidget*, TQDropEvent*, KURL::List&, KURL& )),
+ this, TQT_SLOT( slotUrlsDropped( TQWidget*, TQDropEvent*, KURL::List&, KURL& )));
kdDebug(28000) << "connected Drop-Signal" << endl;
setRenameable ( 0, true );
@@ -101,19 +101,19 @@ ScanPackager::ScanPackager( QWidget *parent ) : KFileTreeView( parent )
setRootIsDecorated( false );
- connect( this, SIGNAL( clicked( QListViewItem*)),
- SLOT( slClicked(QListViewItem*)));
+ connect( this, TQT_SIGNAL( clicked( TQListViewItem*)),
+ TQT_SLOT( slClicked(TQListViewItem*)));
- connect( this, SIGNAL( rightButtonPressed( QListViewItem *, const QPoint &, int )),
- SLOT( slShowContextMenue(QListViewItem *, const QPoint &, int )));
+ connect( this, TQT_SIGNAL( rightButtonPressed( TQListViewItem *, const TQPoint &, int )),
+ TQT_SLOT( slShowContextMenue(TQListViewItem *, const TQPoint &, int )));
- connect( this, SIGNAL(itemRenamed (QListViewItem*, const QString &, int ) ), this,
- SLOT(slFileRename( QListViewItem*, const QString&, int)));
+ connect( this, TQT_SIGNAL(itemRenamed (TQListViewItem*, const TQString &, int ) ), this,
+ TQT_SLOT(slFileRename( TQListViewItem*, const TQString&, int)));
img_counter = 1;
/* Set the current export dir to home */
- m_currCopyDir = QDir::home().absPath();
+ m_currCopyDir = TQDir::home().absPath();
m_currImportDir = m_currCopyDir;
/* Preload frequently used icons */
@@ -158,17 +158,17 @@ KFileTreeBranch* ScanPackager::openRoot( const KURL& root, bool )
setDirOnlyMode( m_defaultBranch, false );
m_defaultBranch->setShowExtensions( true ); // false );
- connect( m_defaultBranch, SIGNAL( newTreeViewItems( KFileTreeBranch*, const KFileTreeViewItemList& )),
- this, SLOT( slotDecorate(KFileTreeBranch*, const KFileTreeViewItemList& )));
+ connect( m_defaultBranch, TQT_SIGNAL( newTreeViewItems( KFileTreeBranch*, const KFileTreeViewItemList& )),
+ this, TQT_SLOT( slotDecorate(KFileTreeBranch*, const KFileTreeViewItemList& )));
- connect( m_defaultBranch, SIGNAL( directoryChildCount( KFileTreeViewItem* , int )),
- this, SLOT( slotDirCount( KFileTreeViewItem *, int )));
+ connect( m_defaultBranch, TQT_SIGNAL( directoryChildCount( KFileTreeViewItem* , int )),
+ this, TQT_SLOT( slotDirCount( KFileTreeViewItem *, int )));
- connect( m_defaultBranch, SIGNAL( deleteItem( KFileItem* )),
- this, SLOT( slotDeleteFromBranch(KFileItem*)));
+ connect( m_defaultBranch, TQT_SIGNAL( deleteItem( KFileItem* )),
+ this, TQT_SLOT( slotDeleteFromBranch(KFileItem*)));
- connect( m_defaultBranch, SIGNAL( populateFinished( KFileTreeViewItem * )),
- this, SLOT( slotStartupFinished( KFileTreeViewItem * )));
+ connect( m_defaultBranch, TQT_SIGNAL( populateFinished( KFileTreeViewItem * )),
+ this, TQT_SLOT( slotStartupFinished( KFileTreeViewItem * )));
return( m_defaultBranch );
@@ -194,7 +194,7 @@ void ScanPackager::slotDirCount( KFileTreeViewItem* item, int cnt )
{
if( item && item->isDir() )
{
- QString cc = i18n( "one item", "%n items", cnt);
+ TQString cc = i18n( "one item", "%n items", cnt);
item->setText( 1, cc );
}
else
@@ -245,7 +245,7 @@ void ScanPackager::slotDecorate( KFileTreeViewItem* item )
}
/* set image size in pixels */
- QString t = i18n( "%1 x %2" ).arg( img->width()).arg(img->height());
+ TQString t = i18n( "%1 x %2" ).arg( img->width()).arg(img->height());
item->setText( 1, t );
kdDebug( 28000) << "Image loaded and decorated!" << endl;
}
@@ -260,7 +260,7 @@ void ScanPackager::slotDecorate( KFileTreeViewItem* item )
}
/* Image format */
- QString format = getImgFormat( item );
+ TQString format = getImgFormat( item );
item->setText( 2, format );
}
@@ -299,7 +299,7 @@ void ScanPackager::slotDecorate( KFileTreeBranch* branch, const KFileTreeViewIte
-void ScanPackager::slFileRename( QListViewItem* it, const QString& newStr, int )
+void ScanPackager::slFileRename( TQListViewItem* it, const TQString& newStr, int )
{
bool success = true;
@@ -368,18 +368,18 @@ void ScanPackager::slFileRename( QListViewItem* it, const QString& newStr, int )
* Method that checks if the new filename a user enters while renaming an image is valid.
* It checks for a proper extension.
*/
-QString ScanPackager::buildNewFilename( QString cmplFilename, QString currFormat ) const
+TQString ScanPackager::buildNewFilename( TQString cmplFilename, TQString currFormat ) const
{
/* cmplFilename = new name the user wishes.
* currFormat = the current format of the image.
* if the new filename has a valid extension, which is the same as the
* format of the current, fine. A ''-String has to be returned.
*/
- QFileInfo fiNew( cmplFilename );
- QString base = fiNew.baseName();
- QString newExt = fiNew.extension( false ).lower();
- QString nowExt = currFormat.lower();
- QString ext = "";
+ TQFileInfo fiNew( cmplFilename );
+ TQString base = fiNew.baseName();
+ TQString newExt = fiNew.extension( false ).lower();
+ TQString nowExt = currFormat.lower();
+ TQString ext = "";
kdDebug(28000) << "Filename wanted: "<< cmplFilename << " <"<<newExt<<"> <" << nowExt<<">" <<endl;
@@ -407,15 +407,15 @@ QString ScanPackager::buildNewFilename( QString cmplFilename, QString currFormat
/* ----------------------------------------------------------------------- */
/* This method returns the directory of an image or directory.
*/
-QString ScanPackager::itemDirectory( const KFileTreeViewItem* item, bool relativ ) const
+TQString ScanPackager::itemDirectory( const KFileTreeViewItem* item, bool relativ ) const
{
if( ! item )
{
kdDebug(28000) << "ERR: itemDirectory without item" << endl;
- return QString::null;
+ return TQString::null;
}
- QString relativUrl= (item->url()).prettyURL();
+ TQString relativUrl= (item->url()).prettyURL();
if( ! item->isDir() )
{
@@ -435,7 +435,7 @@ QString ScanPackager::itemDirectory( const KFileTreeViewItem* item, bool relativ
if( branch )
{
kdDebug(28000) << "Relativ URL of the file " << relativUrl << endl;
- QString rootUrl = (branch->rootUrl()).prettyURL(); // directory of branch root
+ TQString rootUrl = (branch->rootUrl()).prettyURL(); // directory of branch root
if( relativUrl.startsWith( rootUrl ))
{
@@ -459,18 +459,18 @@ QString ScanPackager::itemDirectory( const KFileTreeViewItem* item, bool relativ
* call slClicked with it.
*/
-void ScanPackager::slotSelectDirectory( const QString & dirString )
+void ScanPackager::slotSelectDirectory( const TQString & dirString )
{
kdDebug(28000) << "Trying to decode directory string " << dirString << endl;
- QString searchFor = QString::fromLatin1(" - ");
+ TQString searchFor = TQString::fromLatin1(" - ");
int pos = dirString.find( searchFor );
if( pos > -1 )
{
/* Splitting up the string coming in */
- QString branchName = dirString.left( pos );
- QString relPath( dirString );
+ TQString branchName = dirString.left( pos );
+ TQString relPath( dirString );
relPath = relPath.remove( 0, pos + searchFor.length());
@@ -490,7 +490,7 @@ void ScanPackager::slotSelectDirectory( const QString & dirString )
/* ----------------------------------------------------------------------- */
/* This slot is called when clicking on an item. */
-void ScanPackager::slClicked( QListViewItem *newItem )
+void ScanPackager::slClicked( TQListViewItem *newItem )
{
KFileTreeViewItem *item = static_cast<KFileTreeViewItem*>(newItem);
@@ -508,19 +508,19 @@ void ScanPackager::slClicked( QListViewItem *newItem )
{
/* if not a dir, load the image if necessary. This is done by loadImageForItem,
* which is async( TODO ). The image finally arrives in slotImageArrived */
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
emit( aboutToShowImage( item->url()));
loadImageForItem( item );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
/* emit a signal indicating the new directory if there is a new one */
- QString wholeDir = itemDirectory( item, false ); /* not relativ to root */
+ TQString wholeDir = itemDirectory( item, false ); /* not relativ to root */
if( currSelectedDir != wholeDir )
{
currSelectedDir = wholeDir;
- QString relativUrl = itemDirectory( item, true );
+ TQString relativUrl = itemDirectory( item, true );
kdDebug(28000) << "Emitting " << relativUrl << " as new relative Url" << endl;
/* Emit the signal with branch and the relative path */
emit( galleryPathSelected( item->branch(), relativUrl ));
@@ -663,9 +663,9 @@ KookaImage* ScanPackager::getCurrImage() const
}
-QString ScanPackager::getCurrImageFileName( bool withPath = true ) const
+TQString ScanPackager::getCurrImageFileName( bool withPath = true ) const
{
- QString result = "";
+ TQString result = "";
KFileTreeViewItem *curr = currentKFileTreeViewItem();
if( ! curr )
@@ -689,33 +689,33 @@ QString ScanPackager::getCurrImageFileName( bool withPath = true ) const
}
/* ----------------------------------------------------------------------- */
-QCString ScanPackager::getImgFormat( KFileTreeViewItem* item ) const
+TQCString ScanPackager::getImgFormat( KFileTreeViewItem* item ) const
{
- QCString cstr;
+ TQCString cstr;
if( !item ) return( cstr );
#if 0
KFileItem *kfi = item->fileItem();
- QString mime = kfi->mimetype();
+ TQString mime = kfi->mimetype();
#endif
// TODO find the real extension for use with the filename !
// temporarely:
- QString f = localFileName( item );
+ TQString f = localFileName( item );
- return( QImage::imageFormat( f ));
+ return( TQImage::imageFormat( f ));
}
-QString ScanPackager::localFileName( KFileTreeViewItem *it ) const
+TQString ScanPackager::localFileName( KFileTreeViewItem *it ) const
{
- if( ! it ) return( QString::null );
+ if( ! it ) return( TQString::null );
KURL url = it->url();
- QString res;
+ TQString res;
if( url.isLocalFile())
{
@@ -726,7 +726,7 @@ QString ScanPackager::localFileName( KFileTreeViewItem *it ) const
}
/* Called if the image exists but was changed by image manipulation func */
-void ScanPackager::slotCurrentImageChanged( QImage *img )
+void ScanPackager::slotCurrentImageChanged( TQImage *img )
{
KFileTreeViewItem *curr = currentKFileTreeViewItem();
if( ! curr )
@@ -741,8 +741,8 @@ void ScanPackager::slotCurrentImageChanged( QImage *img )
/* unload image and free memory */
slotUnloadItem( curr );
- const QString filename = localFileName( curr );
- const QCString format = getImgFormat( curr );
+ const TQString filename = localFileName( curr );
+ const TQCString format = getImgFormat( curr );
ImgSaver saver( this );
ImgSaveStat is_stat = ISS_OK;
is_stat = saver.saveImage( img, filename, format );
@@ -783,7 +783,7 @@ void ScanPackager::slotCurrentImageChanged( QImage *img )
/* This slot takes a new scanned Picture and saves it.
* It urgently needs to make a deep copy of the image !
*/
-void ScanPackager::slAddImage( QImage *img, KookaImageMeta* )
+void ScanPackager::slAddImage( TQImage *img, KookaImageMeta* )
{
ImgSaveStat is_stat = ISS_OK;
/* Save the image with the help of the ImgSaver */
@@ -844,17 +844,17 @@ void ScanPackager::slAddImage( QImage *img, KookaImageMeta* )
KFileTreeBranchList branchlist = branches();
KFileTreeBranch *kookaBranch = branchlist.at(0);
- QString strdir = itemDirectory(curr);
- if(strdir.endsWith(QString("/"))) strdir.truncate( strdir.length() - 1 );
+ TQString strdir = itemDirectory(curr);
+ if(strdir.endsWith(TQString("/"))) strdir.truncate( strdir.length() - 1 );
kdDebug(28000) << "Updating directory with " << strdir << endl;
if( kookaBranch ) kookaBranch->updateDirectory( KURL(strdir) );
slotSetNextUrlToSelect( lurl );
m_nextUrlToShow = lurl;
- QString s;
+ TQString s;
/* Count amount of children of the father */
- QListViewItem *paps = curr->parent();
+ TQListViewItem *paps = curr->parent();
if( curr->isDir() ) /* take only father if the is no directory */
paps = curr;
@@ -888,7 +888,7 @@ void ScanPackager::slSelectImage( const KURL& name )
}
-KFileTreeViewItem *ScanPackager::spFindItem( SearchType type, const QString name, const KFileTreeBranch *branch )
+KFileTreeViewItem *ScanPackager::spFindItem( SearchType type, const TQString name, const KFileTreeBranch *branch )
{
/* Prepare a list of branches to go through. If the parameter branch is set, search
* only in the parameter branch. If it is zero, search all branches returned by
@@ -944,7 +944,7 @@ KFileTreeViewItem *ScanPackager::spFindItem( SearchType type, const QString name
}
/* ----------------------------------------------------------------------- */
-void ScanPackager::slShowContextMenue(QListViewItem *lvi, const QPoint &p, int col )
+void ScanPackager::slShowContextMenue(TQListViewItem *lvi, const TQPoint &p, int col )
{
kdDebug(28000) << "Showing Context Menue" << endl;
(void) col;
@@ -979,11 +979,11 @@ void ScanPackager::slotExportFile( )
else
{
KURL fromUrl( curr->url());
- QString filter = "*." + getImgFormat(curr).lower();
+ TQString filter = "*." + getImgFormat(curr).lower();
filter += "\n*|" + i18n( "All Files" );
// initial += fromUrl.filename(false);
- QString initial = m_currCopyDir + "/";
+ TQString initial = m_currCopyDir + "/";
initial += fromUrl.filename(false);
KURL fileName = KFileDialog::getSaveURL ( initial,
filter, this );
@@ -996,7 +996,7 @@ void ScanPackager::slotExportFile( )
ImgSaver::copyImage( fromUrl, fileName );
/* remember the filename for the next export */
- fileName.setFileName( QString());
+ fileName.setFileName( TQString());
m_currCopyDir = fileName.url( );
}
}
@@ -1030,13 +1030,13 @@ void ScanPackager::slotImportFile()
-void ScanPackager::slotUrlsDropped( QWidget*, QDropEvent* ev, KURL::List& urls, KURL& copyTo )
+void ScanPackager::slotUrlsDropped( TQWidget*, TQDropEvent* ev, KURL::List& urls, KURL& copyTo )
{
if( !urls.isEmpty() )
{
kdDebug(28000) << "Kooka drop event!" << endl;
// kdDebug(28000) << "Kooka drop event. First src url=" << urls.first() << " copyTo=" << copyTo
- // << " move=" << ( ev->action() == QDropEvent::Move ) << endl;
+ // << " move=" << ( ev->action() == TQDropEvent::Move ) << endl;
/* first make the last url to copy to the one to select next */
if( ! urls.empty() )
@@ -1049,7 +1049,7 @@ void ScanPackager::slotUrlsDropped( QWidget*, QDropEvent* ev, KURL::List& urls,
// slotSetNextUrlToSelect( nextSel );
}
- if ( ev->action() == QDropEvent::Move )
+ if ( ev->action() == TQDropEvent::Move )
copyjob = KIO::move( urls, copyTo, true );
else
copyjob = KIO::copy( urls, copyTo, true );
@@ -1122,7 +1122,7 @@ void ScanPackager::slotDeleteItems( )
if( ! curr ) return;
KURL urlToDel = curr->url();
- QListViewItem *nextToSelect = curr->nextSibling();
+ TQListViewItem *nextToSelect = curr->nextSibling();
kdDebug(28000) << "Deleting: " << urlToDel.prettyURL() << endl;
bool ask = true; /* for later use */
@@ -1132,7 +1132,7 @@ void ScanPackager::slotDeleteItems( )
KFileItem *item = curr->fileItem();
if( ask )
{
- QString s;
+ TQString s;
s = i18n("Do you really want to delete this image?\nIt cannot be restored!" );
if( item->isDir() )
{
@@ -1167,8 +1167,8 @@ void ScanPackager::slotDeleteItems( )
void ScanPackager::slotCreateFolder( )
{
bool ok;
- QString folder = KInputDialog::getText( i18n( "New Folder" ),
- i18n( "Please enter a name for the new folder:" ), QString::null,
+ TQString folder = KInputDialog::getText( i18n( "New Folder" ),
+ i18n( "Please enter a name for the new folder:" ), TQString::null,
&ok, this );
if( ok )
@@ -1209,9 +1209,9 @@ void ScanPackager::slotCreateFolder( )
/* ----------------------------------------------------------------------- */
-QString ScanPackager::getImgName( QString name_on_disk )
+TQString ScanPackager::getImgName( TQString name_on_disk )
{
- QString s;
+ TQString s;
(void) name_on_disk;
s = i18n("image %1").arg(img_counter++);
@@ -1230,7 +1230,7 @@ void ScanPackager::slotDeleteFromBranch( KFileItem* kfi )
emit fileDeleted( kfi );
}
-void ScanPackager::contentsDragMoveEvent( QDragMoveEvent *e )
+void ScanPackager::contentsDragMoveEvent( TQDragMoveEvent *e )
{
if( ! acceptDrag( e ) )
{
@@ -1238,13 +1238,13 @@ void ScanPackager::contentsDragMoveEvent( QDragMoveEvent *e )
return;
}
- QListViewItem *afterme = 0;
- QListViewItem *parent = 0;
+ TQListViewItem *afterme = 0;
+ TQListViewItem *parent = 0;
findDrop( e->pos(), parent, afterme );
// "afterme" is 0 when aiming at a directory itself
- QListViewItem *item = afterme ? afterme : parent;
+ TQListViewItem *item = afterme ? afterme : parent;
if( item )
{
diff --git a/kooka/scanpackager.h b/kooka/scanpackager.h
index 13173050..496d6dee 100644
--- a/kooka/scanpackager.h
+++ b/kooka/scanpackager.h
@@ -28,11 +28,11 @@
#ifndef SCANPACKAGER_H
#define SCANPACKAGER_H
-#include <qlistview.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qdragobject.h>
-#include <qmap.h>
+#include <tqlistview.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqdragobject.h>
+#include <tqmap.h>
#include <klistview.h>
#include <kio/job.h>
#include <kio/global.h>
@@ -45,7 +45,7 @@
*/
class KURL;
-class QPopupMenu;
+class TQPopupMenu;
class KFileTreeViewItem;
class KookaImage;
class KookaImageMeta;
@@ -75,39 +75,39 @@ class ScanPackager : public KFileTreeView
{
Q_OBJECT
public:
- ScanPackager( QWidget *parent);
+ ScanPackager( TQWidget *parent);
~ScanPackager();
- virtual QString getImgName( QString name_on_disk );
+ virtual TQString getImgName( TQString name_on_disk );
- QString getCurrImageFileName( bool ) const;
+ TQString getCurrImageFileName( bool ) const;
KookaImage* getCurrImage() const;
KFileTreeBranch* openRoot( const KURL&, bool open=false );
- QPopupMenu *contextMenu() const { return m_contextMenu; }
+ TQPopupMenu *contextMenu() const { return m_contextMenu; }
void openRoots();
public slots:
void slSelectImage( const KURL& );
- void slAddImage( QImage *img, KookaImageMeta* meta = 0 );
- void slShowContextMenue(QListViewItem *, const QPoint &, int );
+ void slAddImage( TQImage *img, KookaImageMeta* meta = 0 );
+ void slShowContextMenue(TQListViewItem *, const TQPoint &, int );
void slotExportFile( );
void slotImportFile();
void slotCanceled(KIO::Job*);
- void slotCurrentImageChanged( QImage* );
+ void slotCurrentImageChanged( TQImage* );
void slotDecorate( KFileTreeViewItem* );
void slotDecorate( KFileTreeBranch*, const KFileTreeViewItemList& );
- void slotSelectDirectory( const QString& );
+ void slotSelectDirectory( const TQString& );
protected:
- virtual void contentsDragMoveEvent( QDragMoveEvent *e );
+ virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
protected slots:
- void slClicked( QListViewItem * );
- void slFileRename( QListViewItem*, const QString&, int );
+ void slClicked( TQListViewItem * );
+ void slFileRename( TQListViewItem*, const TQString&, int );
// void slFilenameChanged( KFileTreeViewItem*, const KURL & );
void slImageArrived( KFileTreeViewItem *item, KookaImage* image );
void slotCreateFolder( );
@@ -115,15 +115,15 @@ protected slots:
void slotUnloadItems( );
void slotUnloadItem( KFileTreeViewItem *curr );
void slotDirCount( KFileTreeViewItem *item, int cnt );
- void slotUrlsDropped( QWidget*, QDropEvent*, KURL::List& urls, KURL& copyTo );
+ void slotUrlsDropped( TQWidget*, TQDropEvent*, KURL::List& urls, KURL& copyTo );
void slotDeleteFromBranch( KFileItem* );
void slotStartupFinished( KFileTreeViewItem * );
signals:
void showImage ( KookaImage* );
void deleteImage( KookaImage* );
void unloadImage( KookaImage* );
- void galleryPathSelected( KFileTreeBranch* branch, const QString& relativPath );
- void directoryToRemove( KFileTreeBranch *branch, const QString& relativPath );
+ void galleryPathSelected( KFileTreeBranch* branch, const TQString& relativPath );
+ void directoryToRemove( KFileTreeBranch *branch, const TQString& relativPath );
void showThumbnails( KFileTreeViewItem* );
void aboutToShowImage( const KURL& ); /* starting to load image */
@@ -134,31 +134,31 @@ signals:
void fileRenamed( KFileItem*, const KURL& );
private:
- QString localFileName( KFileTreeViewItem* it ) const;
+ TQString localFileName( KFileTreeViewItem* it ) const;
void loadImageForItem( KFileTreeViewItem* item );
- QCString getImgFormat( KFileTreeViewItem* item ) const;
+ TQCString getImgFormat( KFileTreeViewItem* item ) const;
- QString buildNewFilename( QString cmplFilename, QString currFormat ) const;
- KFileTreeViewItem *spFindItem( SearchType type, const QString name, const KFileTreeBranch* branch = 0 );
- QString itemDirectory( const KFileTreeViewItem*, bool relativ = false ) const;
+ TQString buildNewFilename( TQString cmplFilename, TQString currFormat ) const;
+ KFileTreeViewItem *spFindItem( SearchType type, const TQString name, const KFileTreeBranch* branch = 0 );
+ TQString itemDirectory( const KFileTreeViewItem*, bool relativ = false ) const;
- // int readDir( QListViewItem *parent, QString dir_to_read );
- void showContextMenu( QPoint p, bool show_folder = true );
+ // int readDir( TQListViewItem *parent, TQString dir_to_read );
+ void showContextMenu( TQPoint p, bool show_folder = true );
- QString m_currImportDir;
- QString m_currCopyDir;
- QString currSelectedDir;
+ TQString m_currImportDir;
+ TQString m_currCopyDir;
+ TQString currSelectedDir;
KIO::Job *copyjob;
int img_counter;
- QPopupMenu *m_contextMenu;
+ TQPopupMenu *m_contextMenu;
// like m_nextUrlToSelect in KFileTreeView but for our own purposes (showing the image)
KURL m_nextUrlToShow;
- QPixmap m_floppyPixmap;
- QPixmap m_grayPixmap;
- QPixmap m_bwPixmap;
- QPixmap m_colorPixmap;
+ TQPixmap m_floppyPixmap;
+ TQPixmap m_grayPixmap;
+ TQPixmap m_bwPixmap;
+ TQPixmap m_colorPixmap;
KFileTreeBranch *m_defaultBranch;
bool m_startup;
diff --git a/kooka/thumbview.cpp b/kooka/thumbview.cpp
index 5dfa93b6..b085e197 100644
--- a/kooka/thumbview.cpp
+++ b/kooka/thumbview.cpp
@@ -27,8 +27,8 @@
* *
***************************************************************************/
-#include <qpixmap.h>
-#include <qpainter.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
#include <kio/previewjob.h>
#include <kdebug.h>
@@ -47,8 +47,8 @@
-ThumbView::ThumbView( QWidget *parent, const char *name )
- : QVBox( parent ),
+ThumbView::ThumbView( TQWidget *parent, const char *name )
+ : TQVBox( parent ),
m_iconView(0),
m_job(0)
{
@@ -65,7 +65,7 @@ ThumbView::ThumbView( QWidget *parent, const char *name )
readSettings();
- m_basePix.resize( QSize( m_pixWidth, m_pixHeight ) );
+ m_basePix.resize( TQSize( m_pixWidth, m_pixHeight ) );
m_basePix.fill(); // fills white per default TODO
@@ -73,8 +73,8 @@ ThumbView::ThumbView( QWidget *parent, const char *name )
slSetBackGround();
- connect( m_iconView, SIGNAL( executed( QIconViewItem* )),
- this, SLOT( slDoubleClicked( QIconViewItem* )));
+ connect( m_iconView, TQT_SIGNAL( executed( TQIconViewItem* )),
+ this, TQT_SLOT( slDoubleClicked( TQIconViewItem* )));
m_pendingJobs.setAutoDelete(false);
}
@@ -90,7 +90,7 @@ bool ThumbView::readSettings()
cfg->setGroup( THUMB_GROUP );
bool dirty = false;
- QColor color;
+ TQColor color;
color = cfg->readColorEntry( MARGIN_COLOR1, &(colorGroup().base()));
if( color != m_marginColor1 )
{
@@ -138,7 +138,7 @@ bool ThumbView::readSettings()
}
KStandardDirs stdDir;
- QString newBgImg = cfg->readEntry( BG_WALLPAPER, stdDir.findResource( "data", STD_TILE_IMG ) );
+ TQString newBgImg = cfg->readEntry( BG_WALLPAPER, stdDir.findResource( "data", STD_TILE_IMG ) );
if( m_bgImg != newBgImg )
{
@@ -149,7 +149,7 @@ bool ThumbView::readSettings()
return (sizeDirty || dirty);
}
-void ThumbView::slDoubleClicked( QIconViewItem *qIt )
+void ThumbView::slDoubleClicked( TQIconViewItem *qIt )
{
ThumbViewItem *it = static_cast<ThumbViewItem*>( qIt );
@@ -163,11 +163,11 @@ void ThumbView::slDoubleClicked( QIconViewItem *qIt )
void ThumbView::slSetBackGround( )
{
- QPixmap bgPix;
+ TQPixmap bgPix;
if( m_bgImg.isEmpty())
{
- bgPix.resize( QSize(16, 16));
- bgPix.fill( QPixmap::blue );
+ bgPix.resize( TQSize(16, 16));
+ bgPix.fill( TQPixmap::blue );
}
else
{
@@ -188,7 +188,7 @@ void ThumbView::slImageChanged( KFileItem *kfit )
KURL itemUrl = kfit->url();
/* delete filename */
- itemUrl.setFileName( QString());
+ itemUrl.setFileName( TQString());
if( !itemUrl.equals( thumbDir, true ))
{
// kdDebug(28000) << "returning, because directory does not match: " << itemUrl.prettyURL() << endl;
@@ -214,7 +214,7 @@ void ThumbView::slImageRenamed( KFileItem *kfit, const KURL& newUrl )
clear();
}
- for ( QIconViewItem *item = m_iconView->firstItem(); item; item = item->nextItem() )
+ for ( TQIconViewItem *item = m_iconView->firstItem(); item; item = item->nextItem() )
{
ThumbViewItem *it=static_cast<ThumbViewItem*>( item );
@@ -239,7 +239,7 @@ void ThumbView::slCheckForUpdate( KFileItem *kfit )
/* iterate over all icon items and compare urls.
* TODO: Check the parent url to avoid iteration over all */
- for ( QIconViewItem *item = m_iconView->firstItem(); item && !haveItem;
+ for ( TQIconViewItem *item = m_iconView->firstItem(); item && !haveItem;
item = item->nextItem() )
{
if( searchUrl == static_cast<ThumbViewItem*>(item)->itemUrl() )
@@ -270,7 +270,7 @@ bool ThumbView::deleteImage( KFileItem *kfit )
/* iterate over all icon items and compare urls.
* TODO: Check the parent url to avoid iteration over all */
- for ( QIconViewItem *item = m_iconView->firstItem(); item && !haveItem; item = item->nextItem() )
+ for ( TQIconViewItem *item = m_iconView->firstItem(); item && !haveItem; item = item->nextItem() )
{
if( searchUrl == static_cast<ThumbViewItem*>(item)->itemUrl() )
{
@@ -323,19 +323,19 @@ void ThumbView::slNewFileItems( const KFileItemList& items )
KFileItem *item = 0;
for ( ; (item = it.current()); ++it )
{
- QString filename = item->url().prettyURL();
+ TQString filename = item->url().prettyURL();
if( item->isDir() )
{
/* create a dir pixmap */
}
else
{
- QPixmap p(m_basePix) ;
- QPixmap mime( item->pixmap(0) );
+ TQPixmap p(m_basePix) ;
+ TQPixmap mime( item->pixmap(0) );
if( p.width() > mime.width() && p.height() > mime.height() )
{
- QPainter paint( &p );
+ TQPainter paint( &p );
paint.drawPixmap( (p.width()-mime.width())/2,
(p.height()-mime.height())/2,
mime );
@@ -389,18 +389,18 @@ void ThumbView::slNewFileItems( const KFileItemList& items )
if( m_job )
{
- connect( m_job, SIGNAL( result( KIO::Job * )),
- this, SLOT( slPreviewResult( KIO::Job * )));
- connect( m_job, SIGNAL( gotPreview( const KFileItem*, const QPixmap& )),
- SLOT( slGotPreview( const KFileItem*, const QPixmap& ) ));
+ connect( m_job, TQT_SIGNAL( result( KIO::Job * )),
+ this, TQT_SLOT( slPreviewResult( KIO::Job * )));
+ connect( m_job, TQT_SIGNAL( gotPreview( const KFileItem*, const TQPixmap& )),
+ TQT_SLOT( slGotPreview( const KFileItem*, const TQPixmap& ) ));
m_pendingJobs.clear();
/* KIO::Jo result is called in any way: Success, Failed, Error,
* thus connecting the failed is not really necessary.
*/
- // connect( job, SIGNAL( failed( const KFileItem* )),
- // this, SLOT( slotFailed( const KFileItem* ) ));
+ // connect( job, TQT_SIGNAL( failed( const KFileItem* )),
+ // this, TQT_SLOT( slotFailed( const KFileItem* ) ));
}
}
@@ -408,7 +408,7 @@ void ThumbView::slNewFileItems( const KFileItemList& items )
-void ThumbView::slGotPreview( const KFileItem* newFileItem, const QPixmap& newPix )
+void ThumbView::slGotPreview( const KFileItem* newFileItem, const TQPixmap& newPix )
{
if( ! newFileItem ) return;
KFileIconViewItem *item = static_cast<KFileIconViewItem*>(const_cast<void*>(newFileItem->extraData( this )));
@@ -451,17 +451,17 @@ void ThumbView::slPreviewResult( KIO::Job *job )
}
-QPixmap ThumbView::createPixmap( const QPixmap& preview ) const
+TQPixmap ThumbView::createPixmap( const TQPixmap& preview ) const
{
- QImage ires = KImageEffect::unbalancedGradient( QSize( 2*m_thumbMargin+ preview.width(),
+ TQImage ires = KImageEffect::unbalancedGradient( TQSize( 2*m_thumbMargin+ preview.width(),
2*m_thumbMargin+ preview.height()),
m_marginColor1, m_marginColor2,
KImageEffect::DiagonalGradient );
- QPixmap pixRet;
+ TQPixmap pixRet;
pixRet.convertFromImage( ires );
- QPainter p( &pixRet );
+ TQPainter p( &pixRet );
p.drawPixmap( m_thumbMargin, m_thumbMargin, preview );
p.flush();
diff --git a/kooka/thumbview.h b/kooka/thumbview.h
index c16afa84..e1bc78cb 100644
--- a/kooka/thumbview.h
+++ b/kooka/thumbview.h
@@ -29,11 +29,11 @@
#ifndef __THUMBVIEW_H__
#define __THUMBVIEW_H__
-#include <qwidget.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qcolor.h>
-#include <qvbox.h>
+#include <tqwidget.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqcolor.h>
+#include <tqvbox.h>
#include <kiconview.h>
#include <kurl.h>
@@ -51,18 +51,18 @@
#define BG_WALLPAPER "BackGroundTile"
#define STD_TILE_IMG "kooka/pics/thumbviewtile.png"
-class QPixmap;
-class QListViewItem;
+class TQPixmap;
+class TQListViewItem;
class KProgress;
class KIO::PreviewJob;
-class ThumbView: public QVBox /* KIconView */
+class ThumbView: public TQVBox /* KIconView */
{
Q_OBJECT
public:
- ThumbView( QWidget *parent, const char *name=0 );
+ ThumbView( TQWidget *parent, const char *name=0 );
~ThumbView();
void setCurrentDir( const KURL& s)
@@ -70,9 +70,9 @@ public:
KURL currentDir( ) const
{ return m_currentDir; }
- QSize tumbSize( ) const
+ TQSize tumbSize( ) const
{
- return( QSize( m_pixWidth, m_pixHeight ));
+ return( TQSize( m_pixWidth, m_pixHeight ));
}
int thumbMargin() const
@@ -85,7 +85,7 @@ public slots:
m_pixWidth = w;
m_pixHeight = h;
}
- void slSetThumbSize( const QSize& s )
+ void slSetThumbSize( const TQSize& s )
{
m_pixWidth = s.width();
m_pixHeight = s.height();
@@ -97,14 +97,14 @@ public slots:
}
void slNewFileItems( const KFileItemList& );
- void slGotPreview( const KFileItem*, const QPixmap& );
+ void slGotPreview( const KFileItem*, const TQPixmap& );
void slPreviewResult( KIO::Job* );
/**
* This connects to the IconView's executed signal and tells the packager
* to select the image
*/
- void slDoubleClicked( QIconViewItem* );
+ void slDoubleClicked( TQIconViewItem* );
/**
* indication that a image changed, needs to be reloaded.
@@ -124,26 +124,26 @@ protected:
signals:
/**
- * selects a QListViewItem from the thumbnail. This signal only makes
+ * selects a TQListViewItem from the thumbnail. This signal only makes
* sense if connected to a ScanPackager.
*/
void selectFromThumbnail( const KURL& );
private:
- QPixmap createPixmap( const QPixmap& ) const;
+ TQPixmap createPixmap( const TQPixmap& ) const;
bool deleteImage( KFileItem* );
KIconView *m_iconView;
KProgress *m_progress;
KURL m_currentDir;
- QPixmap m_basePix;
+ TQPixmap m_basePix;
int m_pixWidth;
int m_pixHeight;
int m_thumbMargin;
- QColor m_marginColor1;
- QColor m_marginColor2;
- QString m_bgImg;
+ TQColor m_marginColor1;
+ TQColor m_marginColor2;
+ TQString m_bgImg;
int m_cntJobsStarted;
KIO::PreviewJob *m_job;
diff --git a/kooka/thumbviewitem.cpp b/kooka/thumbviewitem.cpp
index 7f2d01f6..c8f8dab3 100644
--- a/kooka/thumbviewitem.cpp
+++ b/kooka/thumbviewitem.cpp
@@ -32,8 +32,8 @@
#include "thumbview.h"
#include "thumbviewitem.h"
-ThumbViewItem::ThumbViewItem(QIconView *parent, const QString &text,
- const QPixmap &pixmap,
+ThumbViewItem::ThumbViewItem(TQIconView *parent, const TQString &text,
+ const TQPixmap &pixmap,
KFileItem *fi )
:KFileIconViewItem( parent, text, pixmap,fi )
{
diff --git a/kooka/thumbviewitem.h b/kooka/thumbviewitem.h
index 745c2b25..74dad84b 100644
--- a/kooka/thumbviewitem.h
+++ b/kooka/thumbviewitem.h
@@ -41,9 +41,9 @@ class KFileTreeViewItem;
class ThumbViewItem: public KFileIconViewItem
{
public:
- ThumbViewItem( QIconView *parent,
- const QString &text,
- const QPixmap &pixmap,
+ ThumbViewItem( TQIconView *parent,
+ const TQString &text,
+ const TQPixmap &pixmap,
KFileItem *fi );
void setItemUrl( const KURL& u );
diff --git a/kpdf/conf/dlggeneral.ui.h b/kpdf/conf/dlggeneral.ui.h
index 8eafde39..316b009f 100644
--- a/kpdf/conf/dlggeneral.ui.h
+++ b/kpdf/conf/dlggeneral.ui.h
@@ -14,7 +14,7 @@
#include <config.h>
-void DlgGeneral::showEvent( QShowEvent * )
+void DlgGeneral::showEvent( TQShowEvent * )
{
#if KPDF_FORCE_DRM
kcfg_ObeyDRM->hide();
diff --git a/kpdf/conf/dlgperformance.ui.h b/kpdf/conf/dlgperformance.ui.h
index 4a13310e..4d6062b6 100644
--- a/kpdf/conf/dlgperformance.ui.h
+++ b/kpdf/conf/dlgperformance.ui.h
@@ -14,7 +14,7 @@
void DlgPerformance::init()
{
- QFont labelFont = descLabel->font();
+ TQFont labelFont = descLabel->font();
labelFont.setBold( true );
descLabel->setFont( labelFont );
}
diff --git a/kpdf/conf/preferencesdialog.cpp b/kpdf/conf/preferencesdialog.cpp
index 7968d3fd..61211008 100644
--- a/kpdf/conf/preferencesdialog.cpp
+++ b/kpdf/conf/preferencesdialog.cpp
@@ -18,7 +18,7 @@
// reimplementing this
#include "preferencesdialog.h"
-PreferencesDialog::PreferencesDialog( QWidget * parent, KConfigSkeleton * skeleton )
+PreferencesDialog::PreferencesDialog( TQWidget * parent, KConfigSkeleton * skeleton )
: KConfigDialog( parent, "preferences", skeleton )
{
m_general = new DlgGeneral(0);
diff --git a/kpdf/conf/preferencesdialog.h b/kpdf/conf/preferencesdialog.h
index 475320ab..36aaa909 100644
--- a/kpdf/conf/preferencesdialog.h
+++ b/kpdf/conf/preferencesdialog.h
@@ -13,7 +13,7 @@
#include <kconfigdialog.h>
#include "conf/settings.h"
-class QWidget;
+class TQWidget;
class KConfigSkeleton;
class DlgGeneral;
@@ -25,7 +25,7 @@ class PreferencesDialog : public KConfigDialog
{
public:
- PreferencesDialog( QWidget * parent, KConfigSkeleton * config );
+ PreferencesDialog( TQWidget * parent, KConfigSkeleton * config );
protected:
// void updateSettings(); // Called when OK/Apply is pressed.
diff --git a/kpdf/core/document.cpp b/kpdf/core/document.cpp
index 25e19d9a..02395747 100644
--- a/kpdf/core/document.cpp
+++ b/kpdf/core/document.cpp
@@ -9,14 +9,14 @@
***************************************************************************/
// qt/kde/system includes
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qimage.h>
-#include <qtextstream.h>
-#include <qvaluevector.h>
-#include <qtimer.h>
-#include <qmap.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqimage.h>
+#include <tqtextstream.h>
+#include <tqvaluevector.h>
+#include <tqtimer.h>
+#include <tqmap.h>
#include <kdebug.h>
#include <kimageio.h>
#include <klocale.h>
@@ -43,7 +43,7 @@ class KPDFDocumentPrivate
{
public:
// find descriptors, mapped by ID (we handle multiple searches)
- QMap< int, RunningSearch * > searches;
+ TQMap< int, RunningSearch * > searches;
int m_lastSearchID;
// needed because for remote documents docFileName is a local file and
@@ -51,26 +51,26 @@ class KPDFDocumentPrivate
KURL url;
// cached stuff
- QString docFileName;
- QString xmlFileName;
+ TQString docFileName;
+ TQString xmlFileName;
// a list of the mimetypes qimage can understand
- QStringList kimgioMimes;
+ TQStringList kimgioMimes;
// viewport stuff
- QValueList< DocumentViewport > viewportHistory;
- QValueList< DocumentViewport >::iterator viewportIterator;
+ TQValueList< DocumentViewport > viewportHistory;
+ TQValueList< DocumentViewport >::iterator viewportIterator;
DocumentViewport nextDocumentViewport; // see KPDFLink::Goto for an explanation
// observers / requests / allocator stuff
- QMap< int, DocumentObserver * > observers;
- QValueList< PixmapRequest * > pixmapRequestsStack;
- QValueList< AllocatedPixmap * > allocatedPixmapsFifo;
+ TQMap< int, DocumentObserver * > observers;
+ TQValueList< PixmapRequest * > pixmapRequestsStack;
+ TQValueList< AllocatedPixmap * > allocatedPixmapsFifo;
int allocatedPixmapsTotalMemory;
// timers (memory checking / info saver)
- QTimer * memCheckTimer;
- QTimer * saveBookmarksTimer;
+ TQTimer * memCheckTimer;
+ TQTimer * saveBookmarksTimer;
};
struct AllocatedPixmap
@@ -88,37 +88,37 @@ struct RunningSearch
// store search properties
int continueOnPage;
NormalizedRect continueOnMatch;
- QValueList< int > highlightedPages;
+ TQValueList< int > highlightedPages;
// fields related to previous searches (used for 'continueSearch')
- QString cachedString;
+ TQString cachedString;
KPDFDocument::SearchType cachedType;
bool cachedCaseSensitive;
bool cachedViewportMove;
bool cachedNoDialogs;
- QColor cachedColor;
+ TQColor cachedColor;
};
#define foreachObserver( cmd ) {\
- QMap< int, DocumentObserver * >::iterator it=d->observers.begin(), end=d->observers.end();\
+ TQMap< int, DocumentObserver * >::iterator it=d->observers.begin(), end=d->observers.end();\
for ( ; it != end ; ++ it ) { (*it)-> cmd ; } }
/** KPDFDocument **/
-KPDFDocument::KPDFDocument(QWidget *widget)
- : QObject(widget), generator( 0 ), d( new KPDFDocumentPrivate )
+KPDFDocument::KPDFDocument(TQWidget *widget)
+ : TQObject(widget), generator( 0 ), d( new KPDFDocumentPrivate )
{
d->allocatedPixmapsTotalMemory = 0;
d->memCheckTimer = 0;
d->saveBookmarksTimer = 0;
d->m_lastSearchID = -1;
KImageIO::registerFormats();
- QStringList list = QImage::inputFormatList();
- QStringList::Iterator it = list.begin();
+ TQStringList list = TQImage::inputFormatList();
+ TQStringList::Iterator it = list.begin();
while( it != list.end() )
{
- d->kimgioMimes << KMimeType::findByPath(QString("foo.%1").arg(*it), 0, true)->name();
+ d->kimgioMimes << KMimeType::findByPath(TQString("foo.%1").arg(*it), 0, true)->name();
++it;
}
}
@@ -133,20 +133,20 @@ KPDFDocument::~KPDFDocument()
}
-bool KPDFDocument::openDocument( const QString & docFile, const KURL & url, const KMimeType::Ptr &mime )
+bool KPDFDocument::openDocument( const TQString & docFile, const KURL & url, const KMimeType::Ptr &mime )
{
- // docFile is always local so we can use QFile on it
- QFile fileReadTest( docFile );
+ // docFile is always local so we can use TQFile on it
+ TQFile fileReadTest( docFile );
if ( !fileReadTest.open( IO_ReadOnly ) )
{
- d->docFileName = QString::null;
+ d->docFileName = TQString::null;
return false;
}
// determine the related "xml document-info" filename
d->url = url;
d->docFileName = docFile;
- QString fn = docFile.contains('/') ? docFile.section('/', -1, -1) : docFile;
- fn = "kpdf/" + QString::number(fileReadTest.size()) + "." + fn + ".xml";
+ TQString fn = docFile.contains('/') ? docFile.section('/', -1, -1) : docFile;
+ fn = "kpdf/" + TQString::number(fileReadTest.size()) + "." + fn + ".xml";
fileReadTest.close();
d->xmlFileName = locateLocal( "data", fn );
@@ -157,7 +157,7 @@ bool KPDFDocument::openDocument( const QString & docFile, const KURL & url, cons
// kdError() << "PS generator not available" << endl;
else
{
- QStringList::Iterator it = d->kimgioMimes.begin();
+ TQStringList::Iterator it = d->kimgioMimes.begin();
while( it != d->kimgioMimes.end() )
{
kdDebug() << *it << endl;
@@ -176,9 +176,9 @@ bool KPDFDocument::openDocument( const QString & docFile, const KURL & url, cons
}
// 1. load Document (and set busy cursor while loading)
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
bool openOk = generator->loadDocument( docFile, pages_vector );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if ( !openOk || pages_vector.size() <= 0 )
{
delete generator;
@@ -203,16 +203,16 @@ bool KPDFDocument::openDocument( const QString & docFile, const KURL & url, cons
// start bookmark saver timer
if ( !d->saveBookmarksTimer )
{
- d->saveBookmarksTimer = new QTimer( this );
- connect( d->saveBookmarksTimer, SIGNAL( timeout() ), this, SLOT( saveDocumentInfo() ) );
+ d->saveBookmarksTimer = new TQTimer( this );
+ connect( d->saveBookmarksTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( saveDocumentInfo() ) );
}
d->saveBookmarksTimer->start( 5 * 60 * 1000 );
// start memory check timer
if ( !d->memCheckTimer )
{
- d->memCheckTimer = new QTimer( this );
- connect( d->memCheckTimer, SIGNAL( timeout() ), this, SLOT( slotTimedMemoryCheck() ) );
+ d->memCheckTimer = new TQTimer( this );
+ connect( d->memCheckTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotTimedMemoryCheck() ) );
}
d->memCheckTimer->start( 2000 );
@@ -244,32 +244,32 @@ void KPDFDocument::closeDocument()
d->url = KURL();
// remove requests left in queue
- QValueList< PixmapRequest * >::iterator sIt = d->pixmapRequestsStack.begin();
- QValueList< PixmapRequest * >::iterator sEnd = d->pixmapRequestsStack.end();
+ TQValueList< PixmapRequest * >::iterator sIt = d->pixmapRequestsStack.begin();
+ TQValueList< PixmapRequest * >::iterator sEnd = d->pixmapRequestsStack.end();
for ( ; sIt != sEnd; ++sIt )
delete *sIt;
d->pixmapRequestsStack.clear();
// send an empty list to observers (to free their data)
- foreachObserver( notifySetup( QValueVector< KPDFPage * >(), true ) );
+ foreachObserver( notifySetup( TQValueVector< KPDFPage * >(), true ) );
// delete pages and clear 'pages_vector' container
- QValueVector< KPDFPage * >::iterator pIt = pages_vector.begin();
- QValueVector< KPDFPage * >::iterator pEnd = pages_vector.end();
+ TQValueVector< KPDFPage * >::iterator pIt = pages_vector.begin();
+ TQValueVector< KPDFPage * >::iterator pEnd = pages_vector.end();
for ( ; pIt != pEnd; ++pIt )
delete *pIt;
pages_vector.clear();
// clear 'memory allocation' descriptors
- QValueList< AllocatedPixmap * >::iterator aIt = d->allocatedPixmapsFifo.begin();
- QValueList< AllocatedPixmap * >::iterator aEnd = d->allocatedPixmapsFifo.end();
+ TQValueList< AllocatedPixmap * >::iterator aIt = d->allocatedPixmapsFifo.begin();
+ TQValueList< AllocatedPixmap * >::iterator aEnd = d->allocatedPixmapsFifo.end();
for ( ; aIt != aEnd; ++aIt )
delete *aIt;
d->allocatedPixmapsFifo.clear();
// clear 'running searches' descriptors
- QMap< int, RunningSearch * >::iterator rIt = d->searches.begin();
- QMap< int, RunningSearch * >::iterator rEnd = d->searches.end();
+ TQMap< int, RunningSearch * >::iterator rIt = d->searches.begin();
+ TQMap< int, RunningSearch * >::iterator rEnd = d->searches.end();
for ( ; rIt != rEnd; ++rIt )
delete *rIt;
d->searches.clear();
@@ -302,13 +302,13 @@ void KPDFDocument::removeObserver( DocumentObserver * pObserver )
{
// free observer's pixmap data
int observerId = pObserver->observerId();
- QValueVector<KPDFPage*>::iterator it = pages_vector.begin(), end = pages_vector.end();
+ TQValueVector<KPDFPage*>::iterator it = pages_vector.begin(), end = pages_vector.end();
for ( ; it != end; ++it )
(*it)->deletePixmap( observerId );
// [MEM] free observer's allocation descriptors
- QValueList< AllocatedPixmap * >::iterator aIt = d->allocatedPixmapsFifo.begin();
- QValueList< AllocatedPixmap * >::iterator aEnd = d->allocatedPixmapsFifo.end();
+ TQValueList< AllocatedPixmap * >::iterator aIt = d->allocatedPixmapsFifo.begin();
+ TQValueList< AllocatedPixmap * >::iterator aEnd = d->allocatedPixmapsFifo.end();
while ( aIt != aEnd )
{
AllocatedPixmap * p = *aIt;
@@ -332,13 +332,13 @@ void KPDFDocument::reparseConfig()
if ( generator && generator->reparseConfig() )
{
// invalidate pixmaps
- QValueVector<KPDFPage*>::iterator it = pages_vector.begin(), end = pages_vector.end();
+ TQValueVector<KPDFPage*>::iterator it = pages_vector.begin(), end = pages_vector.end();
for ( ; it != end; ++it )
(*it)->deletePixmapsAndRects();
// [MEM] remove allocation descriptors
- QValueList< AllocatedPixmap * >::iterator aIt = d->allocatedPixmapsFifo.begin();
- QValueList< AllocatedPixmap * >::iterator aEnd = d->allocatedPixmapsFifo.end();
+ TQValueList< AllocatedPixmap * >::iterator aIt = d->allocatedPixmapsFifo.begin();
+ TQValueList< AllocatedPixmap * >::iterator aEnd = d->allocatedPixmapsFifo.end();
for ( ; aIt != aEnd; ++aIt )
delete *aIt;
d->allocatedPixmapsFifo.clear();
@@ -355,9 +355,9 @@ void KPDFDocument::reparseConfig()
}
-QWidget *KPDFDocument::widget() const
+TQWidget *KPDFDocument::widget() const
{
- return static_cast<QWidget*>(parent());
+ return static_cast<TQWidget*>(parent());
}
bool KPDFDocument::isOpened() const
@@ -415,9 +415,9 @@ bool KPDFDocument::historyAtEnd() const
return d->viewportIterator == --(d->viewportHistory.end());
}
-QString KPDFDocument::getMetaData( const QString & key, const QString & option ) const
+TQString KPDFDocument::getMetaData( const TQString & key, const TQString & option ) const
{
- return generator ? generator->getMetaData( key, option ) : QString();
+ return generator ? generator->getMetaData( key, option ) : TQString();
}
bool KPDFDocument::supportsSearching() const
@@ -435,12 +435,12 @@ void KPDFDocument::putFontInfo(KListView *list)
if (generator) generator->putFontInfo(list);
}
-void KPDFDocument::requestPixmaps( const QValueList< PixmapRequest * > & requests )
+void KPDFDocument::requestPixmaps( const TQValueList< PixmapRequest * > & requests )
{
if ( !generator )
{
// delete requests..
- QValueList< PixmapRequest * >::const_iterator rIt = requests.begin(), rEnd = requests.end();
+ TQValueList< PixmapRequest * >::const_iterator rIt = requests.begin(), rEnd = requests.end();
for ( ; rIt != rEnd; ++rIt )
delete *rIt;
// ..and return
@@ -449,7 +449,7 @@ void KPDFDocument::requestPixmaps( const QValueList< PixmapRequest * > & request
// 1. [CLEAN STACK] remove previous requests of requesterID
int requesterID = requests.first()->id;
- QValueList< PixmapRequest * >::iterator sIt = d->pixmapRequestsStack.begin(), sEnd = d->pixmapRequestsStack.end();
+ TQValueList< PixmapRequest * >::iterator sIt = d->pixmapRequestsStack.begin(), sEnd = d->pixmapRequestsStack.end();
while ( sIt != sEnd )
{
if ( (*sIt)->id == requesterID )
@@ -464,7 +464,7 @@ void KPDFDocument::requestPixmaps( const QValueList< PixmapRequest * > & request
// 2. [ADD TO STACK] add requests to stack
bool threadingDisabled = !KpdfSettings::enableThreading();
- QValueList< PixmapRequest * >::const_iterator rIt = requests.begin(), rEnd = requests.end();
+ TQValueList< PixmapRequest * >::const_iterator rIt = requests.begin(), rEnd = requests.end();
for ( ; rIt != rEnd; ++rIt )
{
// set the 'page field' (see PixmapRequest) and check if it is valid
@@ -568,7 +568,7 @@ void KPDFDocument::setViewport( const DocumentViewport & viewport, int excludeId
}
// notify change to all other (different from id) observers
- QMap< int, DocumentObserver * >::iterator it = d->observers.begin(), end = d->observers.end();
+ TQMap< int, DocumentObserver * >::iterator it = d->observers.begin(), end = d->observers.end();
for ( ; it != end ; ++ it )
if ( it.key() != excludeId )
(*it)->notifyViewportChanged( smoothMove );
@@ -577,9 +577,9 @@ void KPDFDocument::setViewport( const DocumentViewport & viewport, int excludeId
if ( d->allocatedPixmapsFifo.count() > 1 )
{
const int page = viewport.pageNumber;
- QValueList< AllocatedPixmap * > viewportPixmaps;
- QValueList< AllocatedPixmap * >::iterator aIt = d->allocatedPixmapsFifo.begin();
- QValueList< AllocatedPixmap * >::iterator aEnd = d->allocatedPixmapsFifo.end();
+ TQValueList< AllocatedPixmap * > viewportPixmaps;
+ TQValueList< AllocatedPixmap * >::iterator aIt = d->allocatedPixmapsFifo.begin();
+ TQValueList< AllocatedPixmap * >::iterator aEnd = d->allocatedPixmapsFifo.end();
while ( aIt != aEnd )
{
if ( (*aIt)->page == page )
@@ -609,7 +609,7 @@ void KPDFDocument::setPrevViewport()
void KPDFDocument::setNextViewport()
// restore next viewport from the history
{
- QValueList< DocumentViewport >::iterator nextIterator = d->viewportIterator;
+ TQValueList< DocumentViewport >::iterator nextIterator = d->viewportIterator;
++nextIterator;
if ( nextIterator != d->viewportHistory.end() )
{
@@ -625,8 +625,8 @@ void KPDFDocument::setNextDocumentViewport( const DocumentViewport & viewport )
}
-bool KPDFDocument::searchText( int searchID, const QString & text, bool fromStart, bool caseSensitive,
- SearchType type, bool moveViewport, const QColor & color, bool noDialogs )
+bool KPDFDocument::searchText( int searchID, const TQString & text, bool fromStart, bool caseSensitive,
+ SearchType type, bool moveViewport, const TQColor & color, bool noDialogs )
{
// don't perform searches on empty docs
if ( !generator || pages_vector.isEmpty() )
@@ -657,23 +657,23 @@ bool KPDFDocument::searchText( int searchID, const QString & text, bool fromStar
// global data for search
bool foundAMatch = false;
- QValueList< int > pagesToNotify;
+ TQValueList< int > pagesToNotify;
// remove highlights from pages and queue them for notifying changes
pagesToNotify += s->highlightedPages;
- QValueList< int >::iterator it = s->highlightedPages.begin(), end = s->highlightedPages.end();
+ TQValueList< int >::iterator it = s->highlightedPages.begin(), end = s->highlightedPages.end();
for ( ; it != end; ++it )
pages_vector[ *it ]->deleteHighlights( searchID );
s->highlightedPages.clear();
// set hourglass cursor
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
// 1. ALLDOC - proces all document marking pages
if ( type == AllDoc )
{
// search and highlight text on all pages
- QValueVector< KPDFPage * >::iterator it = pages_vector.begin(), end = pages_vector.end();
+ TQValueVector< KPDFPage * >::iterator it = pages_vector.begin(), end = pages_vector.end();
for ( ; it != end; ++it )
{
// get page (from the first to the last)
@@ -713,7 +713,7 @@ bool KPDFDocument::searchText( int searchID, const QString & text, bool fromStar
}
// reset cursor to previous shape
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
// send page lists if found anything new
//if ( foundAMatch ) ?maybe?
@@ -747,7 +747,7 @@ bool KPDFDocument::searchText( int searchID, const QString & text, bool fromStar
{
if ( currentPage >= pageCount )
{
- if ( noDialogs || KMessageBox::questionYesNo(widget(), i18n("End of document reached.\nContinue from the beginning?"), QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()) == KMessageBox::Yes )
+ if ( noDialogs || KMessageBox::questionYesNo(widget(), i18n("End of document reached.\nContinue from the beginning?"), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel()) == KMessageBox::Yes )
currentPage = 0;
else
break;
@@ -765,7 +765,7 @@ bool KPDFDocument::searchText( int searchID, const QString & text, bool fromStar
}
// reset cursor to previous shape
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
// if a match has been found..
if ( match )
@@ -804,12 +804,12 @@ bool KPDFDocument::searchText( int searchID, const QString & text, bool fromStar
{
// search and highlight every word in 'text' on all pages
bool matchAll = type == GoogleAll;
- QStringList words = QStringList::split( " ", text );
+ TQStringList words = TQStringList::split( " ", text );
int wordsCount = words.count(),
hueStep = (wordsCount > 1) ? (60 / (wordsCount - 1)) : 60,
baseHue, baseSat, baseVal;
color.getHsv( &baseHue, &baseSat, &baseVal );
- QValueVector< KPDFPage * >::iterator it = pages_vector.begin(), end = pages_vector.end();
+ TQValueVector< KPDFPage * >::iterator it = pages_vector.begin(), end = pages_vector.end();
for ( ; it != end; ++it )
{
// get page (from the first to the last)
@@ -825,11 +825,11 @@ bool KPDFDocument::searchText( int searchID, const QString & text, bool fromStar
anyMatched = false;
for ( int w = 0; w < wordsCount; w++ )
{
- QString word = words[ w ];
+ TQString word = words[ w ];
int newHue = baseHue - w * hueStep;
if ( newHue < 0 )
newHue += 360;
- QColor wordColor = QColor( newHue, baseSat, baseVal, QColor::Hsv );
+ TQColor wordColor = TQColor( newHue, baseSat, baseVal, TQColor::Hsv );
NormalizedRect * lastMatch = 0;
// add all highlights for current word
bool wordMatched = false;
@@ -866,14 +866,14 @@ bool KPDFDocument::searchText( int searchID, const QString & text, bool fromStar
}
// reset cursor to previous shape
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
// send page lists to update observers (since some filter on bookmarks)
foreachObserver( notifySetup( pages_vector, false ) );
}
// notify observers about highlights changes
- QValueList< int >::iterator nIt = pagesToNotify.begin(), nEnd = pagesToNotify.end();
+ TQValueList< int >::iterator nIt = pagesToNotify.begin(), nEnd = pagesToNotify.end();
for ( ; nIt != nEnd; ++nIt )
foreachObserver( notifyPageChanged( *nIt, DocumentObserver::Highlights ) );
@@ -904,7 +904,7 @@ void KPDFDocument::resetSearch( int searchID )
RunningSearch * s = d->searches[ searchID ];
// unhighlight pages and inform observers about that
- QValueList< int >::iterator it = s->highlightedPages.begin(), end = s->highlightedPages.end();
+ TQValueList< int >::iterator it = s->highlightedPages.begin(), end = s->highlightedPages.end();
for ( ; it != end; ++it )
{
int pageNumber = *it;
@@ -972,7 +972,7 @@ void KPDFDocument::processLink( const KPDFLink * link )
case KPDFLink::Execute: {
const KPDFLinkExecute * exe = static_cast< const KPDFLinkExecute * >( link );
- QString fileName = exe->fileName();
+ TQString fileName = exe->fileName();
if ( fileName.endsWith( ".pdf" ) || fileName.endsWith( ".PDF" ) )
{
openRelativeFile( fileName );
@@ -1071,7 +1071,7 @@ void KPDFDocument::processLink( const KPDFLink * link )
kapp->invokeMailer( browse->url() );
else
{
- QString url = browse->url();
+ 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")
@@ -1105,8 +1105,8 @@ void KPDFDocument::requestDone( PixmapRequest * req )
#endif
// [MEM] 1.1 find and remove a previous entry for the same page and id
- QValueList< AllocatedPixmap * >::iterator aIt = d->allocatedPixmapsFifo.begin();
- QValueList< AllocatedPixmap * >::iterator aEnd = d->allocatedPixmapsFifo.end();
+ TQValueList< AllocatedPixmap * >::iterator aIt = d->allocatedPixmapsFifo.begin();
+ TQValueList< AllocatedPixmap * >::iterator aEnd = d->allocatedPixmapsFifo.end();
for ( ; aIt != aEnd; ++aIt )
if ( (*aIt)->page == req->pageNumber && (*aIt)->id == req->id )
{
@@ -1197,8 +1197,8 @@ void KPDFDocument::cleanupPixmapMemory( int /*sure? bytesOffset*/ )
{
// [MEM] free memory starting from older pixmaps
int pagesFreed = 0;
- QValueList< AllocatedPixmap * >::iterator pIt = d->allocatedPixmapsFifo.begin();
- QValueList< AllocatedPixmap * >::iterator pEnd = d->allocatedPixmapsFifo.end();
+ TQValueList< AllocatedPixmap * >::iterator pIt = d->allocatedPixmapsFifo.begin();
+ TQValueList< AllocatedPixmap * >::iterator pEnd = d->allocatedPixmapsFifo.end();
while ( (pIt != pEnd) && (memoryToFree > 0) )
{
AllocatedPixmap * p = *pIt;
@@ -1228,16 +1228,16 @@ int KPDFDocument::getTotalMemory()
#ifdef __linux__
// if /proc/meminfo doesn't exist, return 128MB
- QFile memFile( "/proc/meminfo" );
+ TQFile memFile( "/proc/meminfo" );
if ( !memFile.open( IO_ReadOnly ) )
return (cachedValue = 134217728);
// read /proc/meminfo and sum up the contents of 'MemFree', 'Buffers'
// and 'Cached' fields. consider swapped memory as used memory.
- QTextStream readStream( &memFile );
+ TQTextStream readStream( &memFile );
while ( !readStream.atEnd() )
{
- QString entry = readStream.readLine();
+ TQString entry = readStream.readLine();
if ( entry.startsWith( "MemTotal:" ) )
return (cachedValue = (1024 * entry.section( ' ', -2, -2 ).toInt()));
}
@@ -1247,23 +1247,23 @@ int KPDFDocument::getTotalMemory()
int KPDFDocument::getFreeMemory()
{
- static QTime lastUpdate = QTime::currentTime();
+ static TQTime lastUpdate = TQTime::currentTime();
static int cachedValue = 0;
- if ( lastUpdate.secsTo( QTime::currentTime() ) <= 2 )
+ if ( lastUpdate.secsTo( TQTime::currentTime() ) <= 2 )
return cachedValue;
#ifdef __linux__
// if /proc/meminfo doesn't exist, return MEMORY FULL
- QFile memFile( "/proc/meminfo" );
+ TQFile memFile( "/proc/meminfo" );
if ( !memFile.open( IO_ReadOnly ) )
return 0;
// read /proc/meminfo and sum up the contents of 'MemFree', 'Buffers'
// and 'Cached' fields. consider swapped memory as used memory.
int memoryFree = 0;
- QString entry;
- QTextStream readStream( &memFile );
+ TQString entry;
+ TQTextStream readStream( &memFile );
while ( !readStream.atEnd() )
{
entry = readStream.readLine();
@@ -1277,7 +1277,7 @@ int KPDFDocument::getFreeMemory()
}
memFile.close();
- lastUpdate = QTime::currentTime();
+ lastUpdate = TQTime::currentTime();
return ( cachedValue = ( 1024 * memoryFree ) );
#else
@@ -1291,12 +1291,12 @@ void KPDFDocument::loadDocumentInfo()
// are still uninitialized at this point so don't access them
{
//kdDebug() << "Using '" << d->xmlFileName << "' as document info file." << endl;
- QFile infoFile( d->xmlFileName );
+ TQFile infoFile( d->xmlFileName );
if ( !infoFile.exists() || !infoFile.open( IO_ReadOnly ) )
return;
// Load DOM from XML file
- QDomDocument doc( "documentInfo" );
+ TQDomDocument doc( "documentInfo" );
if ( !doc.setContent( &infoFile ) )
{
kdDebug() << "Could not set content" << endl;
@@ -1305,21 +1305,21 @@ void KPDFDocument::loadDocumentInfo()
}
infoFile.close();
- QDomElement root = doc.documentElement();
+ TQDomElement root = doc.documentElement();
if ( root.tagName() != "documentInfo" )
return;
// Parse the DOM tree
- QDomNode topLevelNode = root.firstChild();
+ TQDomNode topLevelNode = root.firstChild();
while ( topLevelNode.isElement() )
{
- QString catName = topLevelNode.toElement().tagName();
+ TQString catName = topLevelNode.toElement().tagName();
// Get bookmarks list from DOM
if ( catName == "bookmarkList" )
{
- QDomNode n = topLevelNode.firstChild();
- QDomElement e;
+ TQDomNode n = topLevelNode.firstChild();
+ TQDomElement e;
int pageNumber;
bool ok;
while ( n.isElement() )
@@ -1337,10 +1337,10 @@ void KPDFDocument::loadDocumentInfo()
// Get 'general info' from the DOM
else if ( catName == "generalInfo" )
{
- QDomNode infoNode = topLevelNode.firstChild();
+ TQDomNode infoNode = topLevelNode.firstChild();
while ( infoNode.isElement() )
{
- QDomElement infoElement = infoNode.toElement();
+ TQDomElement infoElement = infoNode.toElement();
// compatibility: [pre-3.4 viewport storage] @remove after 3.4 relase
if ( infoElement.tagName() == "activePage" )
@@ -1355,13 +1355,13 @@ void KPDFDocument::loadDocumentInfo()
// clear history
d->viewportHistory.clear();
// append old viewports
- QDomNode historyNode = infoNode.firstChild();
+ TQDomNode historyNode = infoNode.firstChild();
while ( historyNode.isElement() )
{
- QDomElement historyElement = historyNode.toElement();
+ TQDomElement historyElement = historyNode.toElement();
if ( historyElement.hasAttribute( "viewport" ) )
{
- QString vpString = historyElement.attribute( "viewport" );
+ TQString vpString = historyElement.attribute( "viewport" );
d->viewportIterator = d->viewportHistory.append(
DocumentViewport( vpString ) );
}
@@ -1378,17 +1378,17 @@ void KPDFDocument::loadDocumentInfo()
} // </documentInfo>
}
-QString KPDFDocument::giveAbsolutePath( const QString & fileName )
+TQString KPDFDocument::giveAbsolutePath( const TQString & fileName )
{
if ( !d->url.isValid() )
- return QString::null;
+ return TQString::null;
return d->url.upURL().url() + fileName;
}
-bool KPDFDocument::openRelativeFile( const QString & fileName )
+bool KPDFDocument::openRelativeFile( const TQString & fileName )
{
- QString absFileName = giveAbsolutePath( fileName );
+ TQString absFileName = giveAbsolutePath( fileName );
if ( absFileName.isNull() )
return false;
@@ -1404,35 +1404,35 @@ void KPDFDocument::saveDocumentInfo() const
if ( d->docFileName.isNull() )
return;
- QFile infoFile( d->xmlFileName );
+ TQFile infoFile( d->xmlFileName );
if (infoFile.open( IO_WriteOnly | IO_Truncate) )
{
// Create DOM
- QDomDocument doc( "documentInfo" );
- QDomElement root = doc.createElement( "documentInfo" );
+ TQDomDocument doc( "documentInfo" );
+ TQDomElement root = doc.createElement( "documentInfo" );
doc.appendChild( root );
// Add bookmark list to DOM
- QDomElement bookmarkList = doc.createElement( "bookmarkList" );
+ TQDomElement bookmarkList = doc.createElement( "bookmarkList" );
root.appendChild( bookmarkList );
for ( uint i = 0; i < pages_vector.count() ; i++ )
{
if ( pages_vector[i]->hasBookmark() )
{
- QDomElement page = doc.createElement( "page" );
- page.appendChild( doc.createTextNode( QString::number(i) ) );
+ TQDomElement page = doc.createElement( "page" );
+ page.appendChild( doc.createTextNode( TQString::number(i) ) );
bookmarkList.appendChild( page );
}
}
// Add general info to DOM
- QDomElement generalInfo = doc.createElement( "generalInfo" );
+ TQDomElement generalInfo = doc.createElement( "generalInfo" );
root.appendChild( generalInfo );
// <general info><history> ... </history> saves history up to 10 viewports
- QValueList< DocumentViewport >::iterator backIterator = d->viewportIterator;
+ TQValueList< DocumentViewport >::iterator backIterator = d->viewportIterator;
if ( backIterator != d->viewportHistory.end() )
{
// go back up to 10 steps from the current viewportIterator
@@ -1441,16 +1441,16 @@ void KPDFDocument::saveDocumentInfo() const
--backIterator;
// create history root node
- QDomElement historyNode = doc.createElement( "history" );
+ TQDomElement historyNode = doc.createElement( "history" );
generalInfo.appendChild( historyNode );
// add old[backIterator] and present[viewportIterator] items
- QValueList< DocumentViewport >::iterator endIt = d->viewportIterator;
+ TQValueList< DocumentViewport >::iterator endIt = d->viewportIterator;
++endIt;
while ( backIterator != endIt )
{
- QString name = (backIterator == d->viewportIterator) ? "current" : "oldPage";
- QDomElement historyEntry = doc.createElement( name );
+ TQString name = (backIterator == d->viewportIterator) ? "current" : "oldPage";
+ TQDomElement historyEntry = doc.createElement( name );
historyEntry.setAttribute( "viewport", (*backIterator).toString() );
historyNode.appendChild( historyEntry );
++backIterator;
@@ -1458,8 +1458,8 @@ void KPDFDocument::saveDocumentInfo() const
}
// Save DOM to XML file
- QString xml = doc.toString();
- QTextStream os( &infoFile );
+ TQString xml = doc.toString();
+ TQTextStream os( &infoFile );
os << xml;
}
infoFile.close();
@@ -1489,7 +1489,7 @@ DocumentViewport::DocumentViewport( int n )
autoFit.height = false;
}
-DocumentViewport::DocumentViewport( const QString & xmlDesc )
+DocumentViewport::DocumentViewport( const TQString & xmlDesc )
: pageNumber( -1 )
{
// default settings (maybe overridden below)
@@ -1508,7 +1508,7 @@ DocumentViewport::DocumentViewport( const QString & xmlDesc )
// decode the string
bool ok;
int field = 0;
- QString token = xmlDesc.section( ';', field, field );
+ TQString token = xmlDesc.section( ';', field, field );
while ( !token.isEmpty() )
{
// decode the current token
@@ -1545,18 +1545,18 @@ DocumentViewport::DocumentViewport( const QString & xmlDesc )
}
}
-QString DocumentViewport::toString() const
+TQString DocumentViewport::toString() const
{
// start string with page number
- QString s = QString::number( pageNumber );
+ TQString s = TQString::number( pageNumber );
// if has center coordinates, save them on string
if ( rePos.enabled )
- s += QString( ";C2:" ) + QString::number( rePos.normalizedX ) +
- ':' + QString::number( rePos.normalizedY ) +
- ':' + QString::number( rePos.pos );
+ s += TQString( ";C2:" ) + TQString::number( rePos.normalizedX ) +
+ ':' + TQString::number( rePos.normalizedY ) +
+ ':' + TQString::number( rePos.pos );
// if has autofit enabled, save its state on string
if ( autoFit.enabled )
- s += QString( ";AF1:" ) + (autoFit.width ? "T" : "F") +
+ s += TQString( ";AF1:" ) + (autoFit.width ? "T" : "F") +
':' + (autoFit.height ? "T" : "F");
return s;
}
@@ -1583,20 +1583,20 @@ bool DocumentViewport::operator==( const DocumentViewport & vp ) const
/** DocumentInfo **/
DocumentInfo::DocumentInfo()
- : QDomDocument( "DocumentInformation" )
+ : TQDomDocument( "DocumentInformation" )
{
- QDomElement docElement = createElement( "DocumentInfo" );
+ TQDomElement docElement = createElement( "DocumentInfo" );
appendChild( docElement );
}
-void DocumentInfo::set( const QString &key, const QString &value,
- const QString &title )
+void DocumentInfo::set( const TQString &key, const TQString &value,
+ const TQString &title )
{
- QDomElement docElement = documentElement();
- QDomElement element;
+ TQDomElement docElement = documentElement();
+ TQDomElement element;
// check whether key already exists
- QDomNodeList list = docElement.elementsByTagName( key );
+ TQDomNodeList list = docElement.elementsByTagName( key );
if ( list.count() > 0 )
element = list.item( 0 ).toElement();
else
@@ -1609,24 +1609,24 @@ void DocumentInfo::set( const QString &key, const QString &value,
docElement.appendChild( element );
}
-QString DocumentInfo::get( const QString &key ) const
+TQString DocumentInfo::get( const TQString &key ) const
{
- QDomElement docElement = documentElement();
- QDomElement element;
+ TQDomElement docElement = documentElement();
+ TQDomElement element;
// check whether key already exists
- QDomNodeList list = docElement.elementsByTagName( key );
+ TQDomNodeList list = docElement.elementsByTagName( key );
if ( list.count() > 0 )
return list.item( 0 ).toElement().attribute( "value" );
else
- return QString();
+ return TQString();
}
/** DocumentSynopsis **/
DocumentSynopsis::DocumentSynopsis()
- : QDomDocument( "DocumentSynopsis" )
+ : TQDomDocument( "DocumentSynopsis" )
{
// void implementation, only subclassed for naming
}
diff --git a/kpdf/core/document.h b/kpdf/core/document.h
index 8e4c1d8e..c1eb840a 100644
--- a/kpdf/core/document.h
+++ b/kpdf/core/document.h
@@ -11,10 +11,10 @@
#ifndef _KPDF_DOCUMENT_H_
#define _KPDF_DOCUMENT_H_
-#include <qobject.h>
-#include <qvaluevector.h>
-#include <qstring.h>
-#include <qdom.h>
+#include <tqobject.h>
+#include <tqvaluevector.h>
+#include <tqstring.h>
+#include <tqdom.h>
#include <kmimetype.h>
@@ -51,11 +51,11 @@ class KPDFDocument : public QObject
{
Q_OBJECT
public:
- KPDFDocument( QWidget *widget );
+ KPDFDocument( TQWidget *widget );
~KPDFDocument();
// document handling
- bool openDocument( const QString & docFile, const KURL & url, const KMimeType::Ptr &mime );
+ bool openDocument( const TQString & docFile, const KURL & url, const KMimeType::Ptr &mime );
void closeDocument();
// misc methods
@@ -67,7 +67,7 @@ class KPDFDocument : public QObject
enum Permission { AllowModify = 1, AllowCopy = 2, AllowPrint = 4, AllowNotes = 8 };
// returns the widget where the document is shown
- QWidget *widget() const;
+ TQWidget *widget() const;
// query methods (const ones)
bool isOpened() const;
@@ -81,7 +81,7 @@ class KPDFDocument : public QObject
bool isAllowed( int /*Document::Permisison(s)*/ ) const;
bool historyAtBegin() const;
bool historyAtEnd() const;
- QString getMetaData( const QString & key, const QString & option = QString() ) const;
+ TQString getMetaData( const TQString & key, const TQString & option = TQString() ) const;
bool supportsSearching() const;
bool hasFonts() const;
void putFontInfo(KListView *list);
@@ -92,12 +92,12 @@ class KPDFDocument : public QObject
void setPrevViewport();
void setNextViewport();
void setNextDocumentViewport( const DocumentViewport & viewport );
- void requestPixmaps( const QValueList< PixmapRequest * > & requests );
+ void requestPixmaps( const TQValueList< PixmapRequest * > & requests );
void requestTextPage( uint page );
enum SearchType { NextMatch, PrevMatch, AllDoc, GoogleAll, GoogleAny };
- bool searchText( int searchID, const QString & text, bool fromStart, bool caseSensitive,
- SearchType type, bool moveViewport, const QColor & color, bool noDialogs = false );
+ bool searchText( int searchID, const TQString & text, bool fromStart, bool caseSensitive,
+ SearchType type, bool moveViewport, const TQColor & color, bool noDialogs = false );
bool continueSearch( int searchID );
void resetSearch( int searchID );
bool continueLastSearch();
@@ -125,11 +125,11 @@ class KPDFDocument : public QObject
int getFreeMemory();
// more private functions
void loadDocumentInfo();
- QString giveAbsolutePath( const QString & fileName );
- bool openRelativeFile( const QString & fileName );
+ TQString giveAbsolutePath( const TQString & fileName );
+ bool openRelativeFile( const TQString & fileName );
Generator * generator;
- QValueVector< KPDFPage * > pages_vector;
+ TQValueVector< KPDFPage * > pages_vector;
class KPDFDocumentPrivate * d;
private slots:
@@ -173,8 +173,8 @@ class DocumentViewport
/** class methods **/
// allowed constructors, don't use others
DocumentViewport( int pageNumber = -1 );
- DocumentViewport( const QString & xmlDesc );
- QString toString() const;
+ DocumentViewport( const TQString & xmlDesc );
+ TQString toString() const;
bool operator==( const DocumentViewport & vp ) const;
};
@@ -193,14 +193,14 @@ class DocumentInfo : public QDomDocument
* Sets a value for a special key. The title should be an i18n'ed
* string, since it's used in the document information dialog.
*/
- void set( const QString &key, const QString &value,
- const QString &title = QString() );
+ void set( const TQString &key, const TQString &value,
+ const TQString &title = TQString() );
/**
* Returns the value for a given key or an empty string when the
* key doesn't exist.
*/
- QString get( const QString &key ) const;
+ TQString get( const TQString &key ) const;
};
/**
diff --git a/kpdf/core/generator.h b/kpdf/core/generator.h
index e0c892fd..841915a2 100644
--- a/kpdf/core/generator.h
+++ b/kpdf/core/generator.h
@@ -10,9 +10,9 @@
#ifndef _KPDF_GENERATOR_H_
#define _KPDF_GENERATOR_H_
-#include <qobject.h>
-#include <qvaluevector.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqvaluevector.h>
+#include <tqstring.h>
#include "core/document.h"
class KListView;
class KPrinter;
@@ -24,7 +24,7 @@ class PixmapRequest;
* Many observers may want to request data syncronously or asyncronously.
* - Sync requests. These should be done in-place.
* - Async request must be done in real background. That usually means a
- * thread, such as QThread derived classes.
+ * thread, such as TQThread derived classes.
* Once contents are available, they must be immediately stored in the
* KPDFPage they refer to, and a signal is emitted as soon as storing
* (even for sync or async queries) has been done.
@@ -45,7 +45,7 @@ class Generator : public QObject
public:
/** virtual methods to reimplement **/
// load a document and fill up the pagesVector
- virtual bool loadDocument( const QString & fileName, QValueVector< KPDFPage * > & pagesVector ) = 0;
+ virtual bool loadDocument( const TQString & fileName, TQValueVector< KPDFPage * > & pagesVector ) = 0;
// Document description and Table of contents
virtual const DocumentInfo * generateDocumentInfo() { return 0L; }
@@ -69,7 +69,7 @@ class Generator : public QObject
// print document using already configured kprinter
virtual bool print( KPrinter& /*printer*/ ) { return false; }
// access meta data of the generator
- virtual QString getMetaData( const QString &/*key*/, const QString &/*option*/ ) { return QString(); }
+ virtual TQString getMetaData( const TQString &/*key*/, const TQString &/*option*/ ) { return TQString(); }
// tell generator to re-parse configuration and return true if something changed
virtual bool reparseConfig() { return false; }
diff --git a/kpdf/core/generator_kimgio/generator_kimgio.cpp b/kpdf/core/generator_kimgio/generator_kimgio.cpp
index bb754686..82491ddc 100644
--- a/kpdf/core/generator_kimgio/generator_kimgio.cpp
+++ b/kpdf/core/generator_kimgio/generator_kimgio.cpp
@@ -7,8 +7,8 @@
* (at your option) any later version. *
***************************************************************************/
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <kprinter.h>
#include "core/page.h"
@@ -23,9 +23,9 @@ KIMGIOGenerator::~KIMGIOGenerator()
delete m_pix;
}
-bool KIMGIOGenerator::loadDocument( const QString & fileName, QValueVector<KPDFPage*> & pagesVector )
+bool KIMGIOGenerator::loadDocument( const TQString & fileName, TQValueVector<KPDFPage*> & pagesVector )
{
- m_pix = new QPixmap(fileName);
+ m_pix = new TQPixmap(fileName);
pagesVector.resize( 1 );
@@ -42,7 +42,7 @@ bool KIMGIOGenerator::canGeneratePixmap()
void KIMGIOGenerator::generatePixmap( PixmapRequest * request )
{
- QPixmap *p = new QPixmap(*m_pix);
+ TQPixmap *p = new TQPixmap(*m_pix);
request->page->setPixmap(request->id, p);
}
@@ -66,7 +66,7 @@ void KIMGIOGenerator::putFontInfo( KListView * )
bool KIMGIOGenerator::print( KPrinter& printer )
{
- QPainter p(&printer);
+ TQPainter p(&printer);
p.drawPixmap(0, 0, *m_pix);
return true;
}
diff --git a/kpdf/core/generator_kimgio/generator_kimgio.h b/kpdf/core/generator_kimgio/generator_kimgio.h
index bda411f2..2e4606a7 100644
--- a/kpdf/core/generator_kimgio/generator_kimgio.h
+++ b/kpdf/core/generator_kimgio/generator_kimgio.h
@@ -19,7 +19,7 @@ class KIMGIOGenerator : public Generator
virtual ~KIMGIOGenerator();
// [INHERITED] load a document and fill up the pagesVector
- bool loadDocument( const QString & fileName, QValueVector<KPDFPage*> & pagesVector );
+ bool loadDocument( const TQString & fileName, TQValueVector<KPDFPage*> & pagesVector );
// [INHERITED] perform actions on document / pages
bool canGeneratePixmap();
@@ -37,7 +37,7 @@ class KIMGIOGenerator : public Generator
bool print( KPrinter& printer );
private:
- QPixmap *m_pix;
+ TQPixmap *m_pix;
};
#endif
diff --git a/kpdf/core/generator_pdf/generator_pdf.cpp b/kpdf/core/generator_pdf/generator_pdf.cpp
index 35020e56..9540d2fd 100644
--- a/kpdf/core/generator_pdf/generator_pdf.cpp
+++ b/kpdf/core/generator_pdf/generator_pdf.cpp
@@ -9,13 +9,13 @@
***************************************************************************/
// qt/kde includes
-#include <qfile.h>
-#include <qevent.h>
-#include <qimage.h>
-#include <qapplication.h>
-#include <qpaintdevicemetrics.h>
-#include <qregexp.h>
-#include <qvariant.h>
+#include <tqfile.h>
+#include <tqevent.h>
+#include <tqimage.h>
+#include <tqapplication.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqregexp.h>
+#include <tqvariant.h>
#include <kapplication.h>
#include <klistview.h>
#include <klocale.h>
@@ -95,7 +95,7 @@ PDFGenerator::~PDFGenerator()
//BEGIN Generator inherited functions
-bool PDFGenerator::loadDocument( const QString & filePath, QValueVector<KPDFPage*> & pagesVector )
+bool PDFGenerator::loadDocument( const TQString & filePath, TQValueVector<KPDFPage*> & pagesVector )
{
#ifndef NDEBUG
if ( pdfdoc )
@@ -105,7 +105,7 @@ bool PDFGenerator::loadDocument( const QString & filePath, QValueVector<KPDFPage
}
#endif
// create PDFDoc for the given file
- pdfdoc = new PDFDoc( new GString( QFile::encodeName( filePath ) ), 0, 0 );
+ pdfdoc = new PDFDoc( new GString( TQFile::encodeName( filePath ) ), 0, 0 );
// if the file didn't open correctly it might be encrypted, so ask for a pass
bool firstInput = true;
@@ -114,12 +114,12 @@ bool PDFGenerator::loadDocument( const QString & filePath, QValueVector<KPDFPage
int keep = 1;
while ( !pdfdoc->isOk() && pdfdoc->getErrorCode() == errEncrypted )
{
- QCString password;
+ TQCString password;
// 1.A. try to retrieve the first password from the kde wallet system
if ( !triedWallet )
{
- QString walletName = KWallet::Wallet::NetworkWallet();
+ TQString walletName = KWallet::Wallet::NetworkWallet();
wallet = KWallet::Wallet::openWallet( walletName );
if ( wallet )
{
@@ -129,7 +129,7 @@ bool PDFGenerator::loadDocument( const QString & filePath, QValueVector<KPDFPage
wallet->setFolder( "KPdf" );
// look for the pass in that folder
- QString retrievedPass;
+ TQString retrievedPass;
if ( !wallet->readPassword( filePath.section('/', -1, -1), retrievedPass ) )
password = retrievedPass.local8Bit();
}
@@ -139,7 +139,7 @@ bool PDFGenerator::loadDocument( const QString & filePath, QValueVector<KPDFPage
// 1.B. if not retrieved, ask the password using the kde password dialog
if ( password.isNull() )
{
- QString prompt;
+ TQString prompt;
if ( firstInput )
prompt = i18n( "Please insert the password to read the document:" );
else
@@ -152,15 +152,15 @@ bool PDFGenerator::loadDocument( const QString & filePath, QValueVector<KPDFPage
}
// 2. reopen the document using the password
- GString * pwd2 = new GString( QString::fromLocal8Bit(password.data()).latin1() );
+ GString * pwd2 = new GString( TQString::fromLocal8Bit(password.data()).latin1() );
delete pdfdoc;
- pdfdoc = new PDFDoc( new GString( QFile::encodeName( filePath ) ), pwd2, pwd2 );
+ pdfdoc = new PDFDoc( new GString( TQFile::encodeName( filePath ) ), pwd2, pwd2 );
delete pwd2;
// 3. if the password is correct and the user chose to remember it, store it to the wallet
if ( pdfdoc->isOk() && wallet && /*safety check*/ wallet->isOpen() && keep > 0 )
{
- QString goodPass = QString::fromLocal8Bit( password.data() );
+ TQString goodPass = TQString::fromLocal8Bit( password.data() );
wallet->writePassword( filePath.section('/', -1, -1), goodPass );
}
}
@@ -209,12 +209,12 @@ const DocumentInfo * PDFGenerator::generateDocumentInfo()
if ( pdfdoc )
{
docInfo.set( "format", i18n( "PDF v. <version>", "PDF v. %1" )
- .arg( QString::number( pdfdoc->getPDFVersion() ) ), i18n( "Format" ) );
+ .arg( 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" ),
i18n("Optimized") );
- docInfo.set( "pages", QString::number( pdfdoc->getCatalog()->getNumPages() ), i18n("Pages") );
+ docInfo.set( "pages", TQString::number( pdfdoc->getCatalog()->getNumPages() ), i18n("Pages") );
}
else
{
@@ -381,7 +381,7 @@ void PDFGenerator::putFontInfo(KListView *list)
fonts = NULL;
fontsLen = fontsSize = 0;
- QValueVector<Ref> visitedXObjects;
+ TQValueVector<Ref> visitedXObjects;
for (pg = 1; pg <= pdfdoc->getNumPages(); ++pg)
{
page = pdfdoc->getCatalog()->getPage(pg);
@@ -414,7 +414,7 @@ void PDFGenerator::putFontInfo(KListView *list)
bool PDFGenerator::print( KPrinter& printer )
{
// PageSize is a CUPS artificially created setting
- QString ps = printer.option("PageSize");
+ TQString ps = printer.option("PageSize");
int paperWidth, paperHeight;
int marginTop, marginLeft, marginRight, marginBottom;
marginTop = (int)printer.option("kde-margin-top").toDouble();
@@ -423,7 +423,7 @@ bool PDFGenerator::print( KPrinter& printer )
marginBottom = (int)printer.option("kde-margin-bottom").toDouble();
bool forceRasterize = printer.option("kde-kpdf-forceRaster").toInt();
- if (ps.find(QRegExp("w\\d+h\\d+")) == 0)
+ if (ps.find(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
// remove the w
@@ -440,19 +440,19 @@ bool PDFGenerator::print( KPrinter& printer )
if (!ps.isEmpty()) qtPageSize = pageNameToPageSize(ps);
else qtPageSize = printer.pageSize();
- QPrinter dummy(QPrinter::PrinterResolution);
+ TQPrinter dummy(TQPrinter::PrinterResolution);
dummy.setFullPage(true);
- dummy.setPageSize((QPrinter::PageSize)qtPageSize);
+ dummy.setPageSize((TQPrinter::PageSize)qtPageSize);
- QPaintDeviceMetrics metrics(&dummy);
+ TQPaintDeviceMetrics metrics(&dummy);
paperWidth = metrics.width();
paperHeight = metrics.height();
}
- KTempFile tf( QString::null, ".ps" );
+ KTempFile tf( TQString::null, ".ps" );
globalParams->setPSPaperWidth(paperWidth);
globalParams->setPSPaperHeight(paperHeight);
- QString pstitle = getDocumentInfo("Title", true);
+ TQString pstitle = getDocumentInfo("Title", true);
if ( pstitle.isEmpty() )
{
pstitle = m_document->currentDocument().fileName( false );
@@ -460,7 +460,7 @@ bool PDFGenerator::print( KPrinter& printer )
// this looks non-unicode-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
- QCString pstitle8Bit = pstitle.latin1();
+ TQCString pstitle8Bit = pstitle.latin1();
const char* pstitlechar;
if (!pstitle.isEmpty())
{
@@ -492,7 +492,7 @@ bool PDFGenerator::print( KPrinter& printer )
if (result == KMessageBox::Yes) psOut->setScale(xScale, yScale);
}
- QValueList<int> pageList;
+ TQValueList<int> pageList;
if (!printer.previewOnly())
{
@@ -503,7 +503,7 @@ bool PDFGenerator::print( KPrinter& printer )
for(int i = 1; i <= pdfdoc->getNumPages(); i++) pageList.append(i);
}
- QValueList<int>::const_iterator pIt = pageList.begin(), pEnd = pageList.end();
+ TQValueList<int>::const_iterator pIt = pageList.begin(), pEnd = pageList.end();
docLock.lock();
for ( ; pIt != pEnd; ++pIt )
{
@@ -524,7 +524,7 @@ bool PDFGenerator::print( KPrinter& printer )
}
}
-static GString *QStringToGString(const QString &s) {
+static GString *QStringToGString(const TQString &s) {
int len = s.length();
char *cstring = (char *)gmallocn(s.length(), sizeof(char));
for (int i = 0; i < len; ++i)
@@ -532,20 +532,20 @@ static GString *QStringToGString(const QString &s) {
return new GString(cstring, len);
}
-static QString unicodeToQString(Unicode* u, int len) {
- QString ret;
+static TQString unicodeToQString(Unicode* u, int len) {
+ TQString ret;
ret.setLength(len);
- QChar* qch = (QChar*) ret.unicode();
+ TQChar* qch = (TQChar*) ret.unicode();
for (;len;--len)
- *qch++ = (QChar) *u++;
+ *qch++ = (TQChar) *u++;
return ret;
}
-static QString UnicodeParsedString(GString *s1) {
+static TQString UnicodeParsedString(GString *s1) {
GBool isUnicode;
int i;
Unicode u;
- QString result;
+ TQString result;
if ( ( s1->getChar(0) & 0xff ) == 0xfe && ( s1->getChar(1) & 0xff ) == 0xff )
{
isUnicode = gTrue;
@@ -573,7 +573,7 @@ static QString UnicodeParsedString(GString *s1) {
return result;
}
-QString PDFGenerator::getMetaData( const QString & key, const QString & option )
+TQString PDFGenerator::getMetaData( const TQString & key, const TQString & option )
{
if ( key == "StartFullScreen" )
{
@@ -603,13 +603,13 @@ QString PDFGenerator::getMetaData( const QString & key, const QString & option )
if ( pdfdoc->getCatalog()->getPageMode() == Catalog::UseOutlines )
return "yes";
}
- return QString();
+ return TQString();
}
bool PDFGenerator::reparseConfig()
{
// load paper color from Settings or use the white default color
- QColor color = ( (KpdfSettings::renderMode() == KpdfSettings::EnumRenderMode::Paper ) &&
+ TQColor color = ( (KpdfSettings::renderMode() == KpdfSettings::EnumRenderMode::Paper ) &&
KpdfSettings::changeColors() ) ? KpdfSettings::paperColor() : Qt::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
@@ -634,7 +634,7 @@ bool PDFGenerator::reparseConfig()
}
//END Generator inherited functions
-void PDFGenerator::scanFonts(Dict *resDict, KListView *list, Ref **fonts, int &fontsLen, int &fontsSize, QValueVector<Ref> *visitedXObjects)
+void PDFGenerator::scanFonts(Dict *resDict, KListView *list, Ref **fonts, int &fontsLen, int &fontsSize, TQValueVector<Ref> *visitedXObjects)
{
Object obj1, obj2, xObjDict, xObj, xObj2, resObj;
Ref r;
@@ -717,7 +717,7 @@ void PDFGenerator::scanFont(GfxFont *font, KListView *list, Ref **fonts, int &fo
GBool emb;
int i;
- QString fontTypeNames[12] = {
+ TQString fontTypeNames[12] = {
i18n("unknown"),
i18n("Type 1"),
i18n("Type 1C"),
@@ -750,7 +750,7 @@ void PDFGenerator::scanFont(GfxFont *font, KListView *list, Ref **fonts, int &fo
if (font->getType() == fontType3) emb = gTrue;
else emb = font->getEmbeddedFontID(&embRef);
- QString sName, sEmb, sPath;
+ TQString sName, sEmb, sPath;
if (name)
{
sName = name->getCString();
@@ -783,34 +783,34 @@ void PDFGenerator::scanFont(GfxFont *font, KListView *list, Ref **fonts, int &fo
(*fonts)[fontsLen++] = *font->getID();
}
-QString PDFGenerator::getDocumentInfo( const QString & data, bool canReturnNull ) const
+TQString PDFGenerator::getDocumentInfo( const TQString & data, bool canReturnNull ) const
// note: MUTEX is LOCKED while calling this
{
// [Albert] Code adapted from pdfinfo.cc on xpdf
Object info;
if ( !pdfdoc )
- return canReturnNull ? QString::null : i18n( "Unknown" );
+ return canReturnNull ? TQString::null : i18n( "Unknown" );
pdfdoc->getDocInfo( &info );
if ( !info.isDict() )
- return canReturnNull ? QString::null : i18n( "Unknown" );
+ return canReturnNull ? TQString::null : i18n( "Unknown" );
Object obj;
Dict *infoDict = info.getDict();
if ( infoDict->lookup( (char*)data.latin1(), &obj )->isString() )
{
- QString result = UnicodeParsedString(obj.getString());
+ TQString result = UnicodeParsedString(obj.getString());
obj.free();
info.free();
return result;
}
obj.free();
info.free();
- return canReturnNull ? QString::null : i18n( "Unknown" );
+ return canReturnNull ? TQString::null : i18n( "Unknown" );
}
-QString PDFGenerator::getDocumentDate( const QString & data ) const
+TQString PDFGenerator::getDocumentDate( const TQString & data ) const
// note: MUTEX is LOCKED while calling this
{
// [Albert] Code adapted from pdfinfo.cc on xpdf
@@ -826,23 +826,23 @@ QString PDFGenerator::getDocumentDate( const QString & data ) const
int year, mon, day, hour, min, sec;
Dict *infoDict = info.getDict();
UnicodeMap *uMap = globalParams->getTextEncoding();
- QString result;
+ TQString result;
if ( !uMap )
return i18n( "Unknown Date" );
if ( infoDict->lookup( (char*)data.latin1(), &obj )->isString() )
{
- QString s = UnicodeParsedString(obj.getString());
+ TQString s = UnicodeParsedString(obj.getString());
if ( s[0] == 'D' && s[1] == ':' )
s = s.mid(2);
if ( !s.isEmpty() && sscanf( s.latin1(), "%4d%2d%2d%2d%2d%2d", &year, &mon, &day, &hour, &min, &sec ) == 6 )
{
- 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() )
- result = KGlobal::locale()->formatDateTime( QDateTime(d, t), false, true );
+ result = KGlobal::locale()->formatDateTime( TQDateTime(d, t), false, true );
else
result = s;
}
@@ -856,7 +856,7 @@ QString PDFGenerator::getDocumentDate( const QString & data ) const
return result;
}
-void PDFGenerator::addSynopsisChildren( QDomNode * parent, GList * items )
+void PDFGenerator::addSynopsisChildren( TQDomNode * parent, GList * items )
{
int numItems = items->getLength();
for ( int i = 0; i < numItems; ++i )
@@ -865,13 +865,13 @@ void PDFGenerator::addSynopsisChildren( QDomNode * parent, GList * items )
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);
if ( name.isEmpty() )
continue;
- QDomElement item = docSyn.createElement( name );
+ TQDomElement item = docSyn.createElement( name );
parent->appendChild( item );
// 2. find the page the link refers to
@@ -888,9 +888,9 @@ void PDFGenerator::addSynopsisChildren( QDomNode * parent, GList * items )
// so better storing the reference and provide the viewport as metadata
// on demand
GString *s = g->getNamedDest();
- QChar *charArray = new QChar[s->getLength()];
- for (int i = 0; i < s->getLength(); ++i) charArray[i] = QChar(s->getCString()[i]);
- QString option(charArray, s->getLength());
+ TQChar *charArray = new QChar[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 );
delete[] charArray;
}
@@ -907,7 +907,7 @@ void PDFGenerator::addSynopsisChildren( QDomNode * parent, GList * items )
}
}
- item.setAttribute( "Open", QVariant( (bool)outlineItem->isOpen() ).toString() );
+ item.setAttribute( "Open", TQVariant( (bool)outlineItem->isOpen() ).toString() );
// 3. recursively descend over children
outlineItem->open();
@@ -1042,7 +1042,7 @@ void PDFGenerator::addTransition( int pageNumber, KPDFPage * page )
-void PDFGenerator::customEvent( QCustomEvent * event )
+void PDFGenerator::customEvent( TQCustomEvent * event )
{
// catch generator 'ready events' only
if ( event->type() != TGE_DATAREADY_ID )
@@ -1074,11 +1074,11 @@ void PDFGenerator::customEvent( QCustomEvent * event )
// 2. put thread's generated data into the KPDFPage
PixmapRequest * request = static_cast< PixmapRequest * >( event->data() );
- QImage * outImage = generatorThread->takeImage();
+ TQImage * outImage = generatorThread->takeImage();
TextPage * outTextPage = generatorThread->takeTextPage();
- QValueList< ObjectRect * > outRects = generatorThread->takeObjectRects();
+ TQValueList< ObjectRect * > outRects = generatorThread->takeObjectRects();
- request->page->setPixmap( request->id, new QPixmap( *outImage ) );
+ request->page->setPixmap( request->id, new TQPixmap( *outImage ) );
delete outImage;
if ( outTextPage )
request->page->setSearchPage( outTextPage );
@@ -1105,9 +1105,9 @@ struct PPGThreadPrivate
PixmapRequest * currentRequest;
// internal temp stored items. don't delete this.
- QImage * m_image;
+ TQImage * m_image;
TextPage * m_textPage;
- QValueList< ObjectRect * > m_rects;
+ TQValueList< ObjectRect * > m_rects;
bool m_rectsTaken;
};
@@ -1129,7 +1129,7 @@ PDFPixmapGeneratorThread::~PDFPixmapGeneratorThread()
delete d->m_textPage;
if ( !d->m_rectsTaken && d->m_rects.count() )
{
- QValueList< ObjectRect * >::iterator it = d->m_rects.begin(), end = d->m_rects.end();
+ TQValueList< ObjectRect * >::iterator it = d->m_rects.begin(), end = d->m_rects.end();
for ( ; it != end; ++it )
delete *it;
}
@@ -1161,7 +1161,7 @@ void PDFPixmapGeneratorThread::startGeneration( PixmapRequest * request )
#endif
// set generation parameters and run thread
d->currentRequest = request;
- start( QThread::InheritPriority );
+ start( TQThread::InheritPriority );
}
void PDFPixmapGeneratorThread::endGeneration()
@@ -1179,9 +1179,9 @@ void PDFPixmapGeneratorThread::endGeneration()
d->currentRequest = 0;
}
-QImage * PDFPixmapGeneratorThread::takeImage() const
+TQImage * PDFPixmapGeneratorThread::takeImage() const
{
- QImage * img = d->m_image;
+ TQImage * img = d->m_image;
d->m_image = 0;
return img;
}
@@ -1193,7 +1193,7 @@ TextPage * PDFPixmapGeneratorThread::takeTextPage() const
return tp;
}
-QValueList< ObjectRect * > PDFPixmapGeneratorThread::takeObjectRects() const
+TQValueList< ObjectRect * > PDFPixmapGeneratorThread::takeObjectRects() const
{
d->m_rectsTaken = true;
return d->m_rects;
@@ -1253,7 +1253,7 @@ void PDFPixmapGeneratorThread::run()
d->generator->docLock.unlock();
// notify the GUI thread that data is pending and can be read
- QCustomEvent * readyEvent = new QCustomEvent( TGE_DATAREADY_ID );
+ TQCustomEvent * readyEvent = new TQCustomEvent( TGE_DATAREADY_ID );
readyEvent->setData( d->currentRequest );
- QApplication::postEvent( d->generator, readyEvent );
+ TQApplication::postEvent( d->generator, readyEvent );
}
diff --git a/kpdf/core/generator_pdf/generator_pdf.h b/kpdf/core/generator_pdf/generator_pdf.h
index ca267b18..662c19fd 100644
--- a/kpdf/core/generator_pdf/generator_pdf.h
+++ b/kpdf/core/generator_pdf/generator_pdf.h
@@ -11,10 +11,10 @@
#ifndef _KPDF_GENERATOR_PDF_H_
#define _KPDF_GENERATOR_PDF_H_
-#include <qmutex.h>
-#include <qcolor.h>
-#include <qstring.h>
-#include <qthread.h>
+#include <tqmutex.h>
+#include <tqcolor.h>
+#include <tqstring.h>
+#include <tqthread.h>
#include "core/generator.h"
#include "core/document.h"
#include "core/link.h"
@@ -42,7 +42,7 @@ class PDFPixmapGeneratorThread;
* For generating page contents we tell PDFDoc to render a page and grab
* contents from out OutputDevs when rendering finishes.
*
- * Background asyncronous contents providing is done via a QThread inherited
+ * Background asyncronous contents providing is done via a TQThread inherited
* class defined at the bottom of the file.
*/
class PDFGenerator : public Generator
@@ -52,7 +52,7 @@ class PDFGenerator : public Generator
virtual ~PDFGenerator();
// [INHERITED] load a document and fill up the pagesVector
- bool loadDocument( const QString & fileName, QValueVector<KPDFPage*> & pagesVector );
+ bool loadDocument( const TQString & fileName, TQValueVector<KPDFPage*> & pagesVector );
// [INHERITED] document informations
const DocumentInfo * generateDocumentInfo();
@@ -77,7 +77,7 @@ class PDFGenerator : public Generator
bool print( KPrinter& printer );
// [INHERITED] reply to some metadata requests
- QString getMetaData( const QString & key, const QString & option );
+ TQString getMetaData( const TQString & key, const TQString & option );
// [INHERITED] reparse configuration
bool reparseConfig();
@@ -86,26 +86,26 @@ class PDFGenerator : public Generator
// friend class to access private document related variables
friend class PDFPixmapGeneratorThread;
- void scanFonts(Dict *resDict, KListView *list, Ref **fonts, int &fontsLen, int &fontsSize, QValueVector<Ref> *visitedXObjects);
+ void scanFonts(Dict *resDict, KListView *list, Ref **fonts, int &fontsLen, int &fontsSize, TQValueVector<Ref> *visitedXObjects);
void scanFont(GfxFont *font, KListView *list, Ref **fonts, int &fontsLen, int &fontsSize);
void fillViewportFromLink( DocumentViewport &viewport, LinkDest *destination );
// private functions for accessing document informations via PDFDoc
- QString getDocumentInfo( const QString & data, bool canReturnNull = false ) const;
- QString getDocumentDate( const QString & data ) const;
+ 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( QDomNode * parent, GList * items );
+ void addSynopsisChildren( TQDomNode * parent, GList * items );
// private function for creating the transition information
void addTransition( int pageNumber, KPDFPage * page );
// (async related) receive data from the generator thread
- void customEvent( QCustomEvent * );
+ void customEvent( TQCustomEvent * );
// xpdf dependant stuff
- QMutex docLock;
+ TQMutex docLock;
PDFDoc * pdfdoc;
KPDFOutputDev * kpdfOutputDev;
- QColor paperColor;
+ TQColor paperColor;
// asyncronous generation related stuff
PDFPixmapGeneratorThread * generatorThread;
@@ -136,9 +136,9 @@ class PDFPixmapGeneratorThread : public QThread
void endGeneration();
// methods for getting contents from the GUI thread
- QImage * takeImage() const;
+ TQImage * takeImage() const;
TextPage * takeTextPage() const;
- QValueList< ObjectRect * > takeObjectRects() const;
+ TQValueList< ObjectRect * > takeObjectRects() const;
private:
// can't be called from the outside (but from startGeneration)
diff --git a/kpdf/core/generator_pdf/gp_outputdev.cpp b/kpdf/core/generator_pdf/gp_outputdev.cpp
index c55ccd7c..df3fd85b 100644
--- a/kpdf/core/generator_pdf/gp_outputdev.cpp
+++ b/kpdf/core/generator_pdf/gp_outputdev.cpp
@@ -20,8 +20,8 @@
#endif
#include <kdebug.h>
-#include <qpixmap.h>
-#include <qimage.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
#include "gp_outputdev.h"
#include "generator_pdf.h"
@@ -66,25 +66,25 @@ void KPDFOutputDev::setParams( int width, int height, bool genL, bool genI, bool
m_generateImages = genI;
}
-QPixmap * KPDFOutputDev::takePixmap()
+TQPixmap * KPDFOutputDev::takePixmap()
{
- QPixmap * pix = m_pixmap;
+ TQPixmap * pix = m_pixmap;
m_pixmap = 0;
return pix;
}
-QImage * KPDFOutputDev::takeImage()
+TQImage * KPDFOutputDev::takeImage()
{
- QImage * img = m_image;
+ TQImage * img = m_image;
m_image = 0;
return img;
}
-QValueList< ObjectRect * > KPDFOutputDev::takeObjectRects()
+TQValueList< ObjectRect * > KPDFOutputDev::takeObjectRects()
{
if ( m_rects.isEmpty() )
return m_rects;
- QValueList< ObjectRect * > rectsCopy( m_rects );
+ TQValueList< ObjectRect * > rectsCopy( m_rects );
m_rects.clear();
return rectsCopy;
}
@@ -101,8 +101,8 @@ void KPDFOutputDev::endPage()
// does not work
/* SplashColorPtr dataPtr = getBitmap()->getDataPtr();
// construct a qimage SHARING the raw bitmap data in memory
- QImage * img = new QImage( dataPtr, bw, bh, 32, 0, 0, QImage::IgnoreEndian );*/
- QImage * img = new QImage( bw, bh, 32 );
+ TQImage * img = new TQImage( dataPtr, bw, bh, 32, 0, 0, TQImage::IgnoreEndian );*/
+ TQImage * img = new TQImage( bw, bh, 32 );
SplashColorPtr pixel = new Guchar[4];
for (int i = 0; i < bw; i++)
{
@@ -114,26 +114,26 @@ void KPDFOutputDev::endPage()
}
delete [] pixel;
- // use the QImage or convert it immediately to QPixmap for better
+ // use the TQImage or convert it immediately to TQPixmap for better
// handling and memory unloading
if ( m_qtThreadSafety )
{
delete m_image;
// it may happen (in fact it doesn't) that we need a rescaling
if ( bw != m_pixmapWidth && bh != m_pixmapHeight )
- m_image = new QImage( img->smoothScale( m_pixmapWidth, m_pixmapHeight ) );
+ m_image = new TQImage( img->smoothScale( m_pixmapWidth, m_pixmapHeight ) );
else
// dereference image from the xpdf memory
- m_image = new QImage( img->copy() );
+ m_image = new TQImage( img->copy() );
}
else
{
delete m_pixmap;
// it may happen (in fact it doesn't) that we need a rescaling
if ( bw != m_pixmapWidth || bh != m_pixmapHeight )
- m_pixmap = new QPixmap( img->smoothScale( m_pixmapWidth, m_pixmapHeight ) );
+ m_pixmap = new TQPixmap( img->smoothScale( m_pixmapWidth, m_pixmapHeight ) );
else
- m_pixmap = new QPixmap( *img );
+ m_pixmap = new TQPixmap( *img );
}
// destroy the shared descriptor and (###) unload underlying xpdf bitmap
@@ -217,7 +217,7 @@ void KPDFOutputDev::clear()
// delete rects
if ( m_rects.count() )
{
- QValueList< ObjectRect * >::iterator it = m_rects.begin(), end = m_rects.end();
+ TQValueList< ObjectRect * >::iterator it = m_rects.begin(), end = m_rects.end();
for ( ; it != end; ++it )
delete *it;
m_rects.clear();
@@ -246,7 +246,7 @@ KPDFLink * KPDFOutputDev::generateLink( LinkAction * a )
{
LinkGoTo * g = (LinkGoTo *) a;
// ceate link: no ext file, namedDest, object pointer
- link = new KPDFLinkGoto( QString::null, decodeViewport( g->getNamedDest(), g->getDest() ) );
+ link = new KPDFLinkGoto( TQString::null, decodeViewport( g->getNamedDest(), g->getDest() ) );
}
break;
@@ -256,7 +256,7 @@ KPDFLink * KPDFOutputDev::generateLink( LinkAction * a )
// copy link file
const char * fileName = g->getFileName()->getCString();
// ceate link: fileName, namedDest, object pointer
- link = new KPDFLinkGoto( (QString)fileName, decodeViewport( g->getNamedDest(), g->getDest() ) );
+ link = new KPDFLinkGoto( (TQString)fileName, 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 e08724e0..7788b1db 100644
--- a/kpdf/core/generator_pdf/gp_outputdev.h
+++ b/kpdf/core/generator_pdf/gp_outputdev.h
@@ -19,11 +19,11 @@
#pragma interface
#endif
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "xpdf/PDFDoc.h" // for 'Object'
#include "xpdf/SplashOutputDev.h"
-class QPixmap;
+class TQPixmap;
class KPDFLink;
class ObjectRect;
class DocumentViewport;
@@ -52,9 +52,9 @@ class KPDFOutputDev : public SplashOutputDev
bool decodeLinks, bool decodeImages, bool qtThreadSafety = false );
// takes pointers out of the class (so deletion it's up to others)
- QPixmap * takePixmap();
- QImage * takeImage();
- QValueList< ObjectRect * > takeObjectRects();
+ TQPixmap * takePixmap();
+ TQImage * takeImage();
+ TQValueList< ObjectRect * > takeObjectRects();
/** inherited from OutputDev */
// End a page.
@@ -82,9 +82,9 @@ class KPDFOutputDev : public SplashOutputDev
// Internal objects
PDFDoc * m_doc;
- QPixmap * m_pixmap;
- QImage * m_image;
- QValueList< ObjectRect * > m_rects; // objectRects (links/images)
+ TQPixmap * m_pixmap;
+ TQImage * m_image;
+ TQValueList< ObjectRect * > m_rects; // objectRects (links/images)
};
#endif
diff --git a/kpdf/core/link.cpp b/kpdf/core/link.cpp
index d8e47a49..33d0fe98 100644
--- a/kpdf/core/link.cpp
+++ b/kpdf/core/link.cpp
@@ -16,22 +16,22 @@ KPDFLink::~KPDFLink()
{
}
-QString KPDFLinkGoto::linkTip() const
+TQString KPDFLinkGoto::linkTip() const
{
- return m_extFileName.isEmpty() ? ( m_vp.pageNumber != -1 ? i18n( "Go to page %1" ).arg( m_vp.pageNumber + 1 ) : QString::null ) : i18n("Open external file");
+ return m_extFileName.isEmpty() ? ( m_vp.pageNumber != -1 ? i18n( "Go to page %1" ).arg( m_vp.pageNumber + 1 ) : TQString::null ) : i18n("Open external file");
}
-QString KPDFLinkExecute::linkTip() const
+TQString KPDFLinkExecute::linkTip() const
{
return i18n( "Execute '%1'..." ).arg( m_fileName );
}
-QString KPDFLinkBrowse::linkTip() const
+TQString KPDFLinkBrowse::linkTip() const
{
return m_url;
}
-QString KPDFLinkAction::linkTip() const
+TQString KPDFLinkAction::linkTip() const
{
switch ( m_type )
{
@@ -61,5 +61,5 @@ QString KPDFLinkAction::linkTip() const
default: ;
}
- return QString::null;
+ return TQString::null;
}
diff --git a/kpdf/core/link.h b/kpdf/core/link.h
index 10420c50..eff3573e 100644
--- a/kpdf/core/link.h
+++ b/kpdf/core/link.h
@@ -10,8 +10,8 @@
#ifndef _KPDF_LINK_H_
#define _KPDF_LINK_H_
-#include <qstring.h>
-#include <qrect.h>
+#include <tqstring.h>
+#include <tqrect.h>
#include "core/document.h" // for DocumentViewport
/**
@@ -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 QString linkTip() const { return QString::null; }
+ virtual TQString linkTip() const { return TQString::null; }
// virtual destructor (remove warnings)
virtual ~KPDFLink();
@@ -40,16 +40,16 @@ class KPDFLinkGoto : public KPDFLink
public:
// query for goto parameters
bool isExternal() const { return !m_extFileName.isEmpty(); }
- const QString & fileName() const { return m_extFileName; }
+ const TQString & fileName() const { return m_extFileName; }
const DocumentViewport & destViewport() const { return m_vp; }
// create a KPDFLink_Goto
- KPDFLinkGoto( QString extFileName, const DocumentViewport & vp ) { m_extFileName = extFileName; m_vp = vp; }
+ KPDFLinkGoto( TQString extFileName, const DocumentViewport & vp ) { m_extFileName = extFileName; m_vp = vp; }
LinkType linkType() const { return Goto; }
- QString linkTip() const;
+ TQString linkTip() const;
private:
- QString m_extFileName;
+ TQString m_extFileName;
DocumentViewport m_vp;
};
@@ -58,17 +58,17 @@ class KPDFLinkExecute : public KPDFLink
{
public:
// query for filename / parameters
- const QString & fileName() const { return m_fileName; }
- const QString & parameters() const { return m_parameters; }
+ const TQString & fileName() const { return m_fileName; }
+ const TQString & parameters() const { return m_parameters; }
// create a KPDFLink_Execute
- KPDFLinkExecute( const QString & file, const QString & params ) { m_fileName = file; m_parameters = params; }
+ KPDFLinkExecute( const TQString & file, const TQString & params ) { m_fileName = file; m_parameters = params; }
LinkType linkType() const { return Execute; }
- QString linkTip() const;
+ TQString linkTip() 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.. **/
@@ -76,15 +76,15 @@ class KPDFLinkBrowse : public KPDFLink
{
public:
// query for URL
- const QString & url() const { return m_url; }
+ const TQString & url() const { return m_url; }
// create a KPDFLink_Browse
- KPDFLinkBrowse( const QString &url ) { m_url = url; }
+ KPDFLinkBrowse( const TQString &url ) { m_url = url; }
LinkType linkType() const { return Browse; }
- QString linkTip() const;
+ TQString linkTip() const;
private:
- QString m_url;
+ TQString m_url;
};
/** Action: contains an action to perform on document / kpdf **/
@@ -100,7 +100,7 @@ class KPDFLinkAction : public KPDFLink
// create a KPDFLink_Action
KPDFLinkAction( enum ActionType actionType ) { m_type = actionType; }
LinkType linkType() const { return Action; }
- QString linkTip() const;
+ TQString linkTip() const;
private:
ActionType m_type;
diff --git a/kpdf/core/observer.h b/kpdf/core/observer.h
index 28f07bf5..ea0ce6c1 100644
--- a/kpdf/core/observer.h
+++ b/kpdf/core/observer.h
@@ -11,8 +11,8 @@
#ifndef _KPDF_DOCUMENTOBSERVER_H_
#define _KPDF_DOCUMENTOBSERVER_H_
-#include <qvaluevector.h>
-#include <qrect.h>
+#include <tqvaluevector.h>
+#include <tqrect.h>
/** IDs for observers. Globally defined here. **/
#define PRESENTATION_ID 1
@@ -46,7 +46,7 @@ class DocumentObserver
// commands from the Document to all observers
enum ChangedFlags { Pixmap = 1, Bookmark = 2, Highlights = 4 };
- virtual void notifySetup( const QValueVector< KPDFPage * > & /*pages*/, bool /*documentChanged*/ ) {};
+ virtual void notifySetup( const TQValueVector< KPDFPage * > & /*pages*/, bool /*documentChanged*/ ) {};
virtual void notifyViewportChanged( bool /*smoothMove*/ ) {};
virtual void notifyPageChanged( int /*pageNumber*/, int /*changedFlags*/ ) {};
virtual void notifyContentsCleared( int /*changedFlags*/ ) {};
diff --git a/kpdf/core/page.cpp b/kpdf/core/page.cpp
index 70bc71bc..6b611360 100644
--- a/kpdf/core/page.cpp
+++ b/kpdf/core/page.cpp
@@ -8,9 +8,9 @@
***************************************************************************/
// qt/kde includes
-#include <qpixmap.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include <kdebug.h>
// local includes
@@ -78,7 +78,7 @@ bool KPDFPage::hasPixmap( int id, int width, int height ) const
return false;
if ( width == -1 || height == -1 )
return true;
- QPixmap * p = m_pixmaps[ id ];
+ TQPixmap * p = m_pixmaps[ id ];
return p ? ( p->width() == width && p->height() == height ) : false;
}
@@ -96,7 +96,7 @@ bool KPDFPage::hasObjectRect( double x, double y ) const
{
if ( m_rects.count() < 1 )
return false;
- QValueList< ObjectRect * >::const_iterator it = m_rects.begin(), end = m_rects.end();
+ TQValueList< ObjectRect * >::const_iterator it = m_rects.begin(), end = m_rects.end();
for ( ; it != end; ++it )
if ( (*it)->contains( x, y ) )
return true;
@@ -112,7 +112,7 @@ bool KPDFPage::hasHighlights( int s_id ) const
if ( s_id == -1 )
return true;
// iterate on the highlights list to find an entry by id
- QValueList< HighlightRect * >::const_iterator it = m_highlights.begin(), end = m_highlights.end();
+ TQValueList< HighlightRect * >::const_iterator it = m_highlights.begin(), end = m_highlights.end();
for ( ; it != end; ++it )
if ( (*it)->s_id == s_id )
return true;
@@ -125,15 +125,15 @@ bool KPDFPage::hasTransition() const
}
-NormalizedRect * KPDFPage::findText( const QString & text, bool strictCase, NormalizedRect * lastRect ) const
+NormalizedRect * KPDFPage::findText( const TQString & text, bool strictCase, NormalizedRect * lastRect ) const
{
if ( text.isEmpty() )
return 0;
// create a xpf's Unicode (unsigned int) array for the given text
- const QChar * str = text.unicode();
+ const TQChar * str = text.unicode();
int len = text.length();
- QMemArray<Unicode> u(len);
+ TQMemArray<Unicode> u(len);
for (int i = 0; i < len; ++i)
u[i] = str[i].unicode();
@@ -172,23 +172,23 @@ NormalizedRect * KPDFPage::findText( const QString & text, bool strictCase, Norm
return 0;
}
-const QString KPDFPage::getText( const NormalizedRect & rect ) const
+const TQString KPDFPage::getText( const NormalizedRect & rect ) const
{
if ( !m_text )
- return QString::null;
+ return TQString::null;
int left = (int)( rect.left * m_width ),
top = (int)( rect.top * m_height ),
right = (int)( rect.right * m_width ),
bottom = (int)( rect.bottom * m_height );
GString * text = m_text->getText( left, top, right, bottom );
- QString result = QString::fromUtf8( text->getCString() );
+ TQString result = TQString::fromUtf8( text->getCString() );
delete text;
return result;
}
const ObjectRect * KPDFPage::hasObject( ObjectRect::ObjectType type, double x, double y ) const
{
- QValueList< ObjectRect * >::const_iterator it = m_rects.begin(), end = m_rects.end();
+ TQValueList< ObjectRect * >::const_iterator it = m_rects.begin(), end = m_rects.end();
for ( ; it != end; ++it )
if ( (*it)->contains( x, y ) )
if ((*it)->objectType() == type) return *it;
@@ -201,7 +201,7 @@ const KPDFPageTransition * KPDFPage::getTransition() const
}
-void KPDFPage::setPixmap( int id, QPixmap * pixmap )
+void KPDFPage::setPixmap( int id, TQPixmap * pixmap )
{
if ( m_pixmaps.contains( id ) )
delete m_pixmaps[id];
@@ -219,15 +219,15 @@ void KPDFPage::setBookmark( bool state )
m_bookmarked = state;
}
-void KPDFPage::setObjectRects( const QValueList< ObjectRect * > rects )
+void KPDFPage::setObjectRects( const TQValueList< ObjectRect * > rects )
{
- QValueList< ObjectRect * >::iterator it = m_rects.begin(), end = m_rects.end();
+ TQValueList< ObjectRect * >::iterator it = m_rects.begin(), end = m_rects.end();
for ( ; it != end; ++it )
delete *it;
m_rects = rects;
}
-void KPDFPage::setHighlight( int s_id, NormalizedRect * &rect, const QColor & color )
+void KPDFPage::setHighlight( int s_id, NormalizedRect * &rect, const TQColor & color )
{
// create a HighlightRect descriptor taking values from params
HighlightRect * hr = new HighlightRect();
@@ -262,12 +262,12 @@ void KPDFPage::deletePixmap( int id )
void KPDFPage::deletePixmapsAndRects()
{
// delete all stored pixmaps
- QMap<int,QPixmap *>::iterator it = m_pixmaps.begin(), end = m_pixmaps.end();
+ TQMap<int,TQPixmap *>::iterator it = m_pixmaps.begin(), end = m_pixmaps.end();
for ( ; it != end; ++it )
delete *it;
m_pixmaps.clear();
// delete ObjectRects
- QValueList< ObjectRect * >::iterator rIt = m_rects.begin(), rEnd = m_rects.end();
+ TQValueList< ObjectRect * >::iterator rIt = m_rects.begin(), rEnd = m_rects.end();
for ( ; rIt != rEnd; ++rIt )
delete *rIt;
m_rects.clear();
@@ -276,7 +276,7 @@ void KPDFPage::deletePixmapsAndRects()
void KPDFPage::deleteHighlights( int s_id )
{
// delete highlights by ID
- QValueList< HighlightRect * >::iterator it = m_highlights.begin(), end = m_highlights.end();
+ TQValueList< HighlightRect * >::iterator it = m_highlights.begin(), end = m_highlights.end();
while ( it != end )
{
HighlightRect * highlight = *it;
@@ -300,7 +300,7 @@ NormalizedRect::NormalizedRect( double l, double t, double r, double b )
// note: check for swapping coords?
: left( l ), top( t ), right( r ), bottom( b ) {}
-NormalizedRect::NormalizedRect( const QRect & r, double xScale, double yScale )
+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 ) {}
@@ -319,13 +319,13 @@ bool NormalizedRect::intersects( double l, double t, double r, double b ) const
return (l < right) && (r > left) && (t < bottom) && (b > top);
}
-QRect NormalizedRect::geometry( int xScale, int yScale ) const
+TQRect NormalizedRect::geometry( int xScale, int yScale ) const
{
int l = (int)( left * xScale ),
t = (int)( top * yScale ),
r = (int)( right * xScale ),
b = (int)( bottom * yScale );
- return QRect( l, t, r - l + 1, b - t + 1 );
+ return TQRect( l, t, r - l + 1, b - t + 1 );
}
diff --git a/kpdf/core/page.h b/kpdf/core/page.h
index 4a8be71d..2de7aceb 100644
--- a/kpdf/core/page.h
+++ b/kpdf/core/page.h
@@ -10,11 +10,11 @@
#ifndef _KPDF_PAGE_H_
#define _KPDF_PAGE_H_
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
-class QPixmap;
-class QRect;
+class TQPixmap;
+class TQRect;
class TextPage;
class KPDFPageTransition;
class HighlightRect;
@@ -30,13 +30,13 @@ class NormalizedRect
NormalizedRect();
NormalizedRect( double l, double t, double r, double b );
- NormalizedRect( const QRect & r, double xScale, double yScale );
+ NormalizedRect( const TQRect & r, double xScale, double yScale );
bool contains( double x, double y ) const;
bool intersects( const NormalizedRect & normRect ) const;
bool intersects( double l, double t, double r, double b ) const;
- QRect geometry( int xScale, int yScale ) const;
+ TQRect geometry( int xScale, int yScale ) const;
};
/**
@@ -102,18 +102,18 @@ class KPDFPage
//bool hasAnnotation( double x, double y ) const;
bool hasTransition() const;
- NormalizedRect * findText( const QString & text, bool keepCase, NormalizedRect * last = 0 ) const;
- const QString getText( const NormalizedRect & rect ) const;
+ NormalizedRect * findText( const TQString & text, bool keepCase, NormalizedRect * last = 0 ) const;
+ const TQString getText( const NormalizedRect & rect ) const;
const ObjectRect * hasObject( ObjectRect::ObjectType type, double x, double y ) const;
//const Annotation * getAnnotation( double x, double y ) const;
const KPDFPageTransition * getTransition() const;
// operations: set/delete contents (by KPDFDocument)
- void setPixmap( int p_id, QPixmap * pixmap );
+ void setPixmap( int p_id, TQPixmap * pixmap );
void setSearchPage( TextPage * text );
void setBookmark( bool state );
- void setObjectRects( const QValueList< ObjectRect * > rects );
- void setHighlight( int s_id, NormalizedRect * &r, const QColor & color );
+ void setObjectRects( const TQValueList< ObjectRect * > rects );
+ void setHighlight( int s_id, NormalizedRect * &r, const TQColor & color );
//void setAnnotation( Annotation * annotation );
void setTransition( KPDFPageTransition * transition );
void deletePixmap( int p_id );
@@ -129,11 +129,11 @@ class KPDFPage
float m_width, m_height;
bool m_bookmarked;
- QMap< int, QPixmap * > m_pixmaps;
+ TQMap< int, TQPixmap * > m_pixmaps;
TextPage * m_text;
- QValueList< ObjectRect * > m_rects;
- QValueList< HighlightRect * > m_highlights;
- //QValueList< Annotation * > m_annotations;
+ TQValueList< ObjectRect * > m_rects;
+ TQValueList< HighlightRect * > m_highlights;
+ //TQValueList< Annotation * > m_annotations;
KPDFPageTransition * m_transition;
};
@@ -146,7 +146,7 @@ struct HighlightRect : public NormalizedRect
// searchID of the highlight owner
int s_id;
// color of the highlight
- QColor color;
+ TQColor color;
};
#endif
diff --git a/kpdf/error.cpp b/kpdf/error.cpp
index 028fe7e3..00d3581e 100644
--- a/kpdf/error.cpp
+++ b/kpdf/error.cpp
@@ -18,13 +18,13 @@
#include "xpdf/GlobalParams.h"
#include "xpdf/Error.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
void CDECL error(int pos, char *msg, ...) {
va_list args;
- QString emsg, tmsg;
+ TQString emsg, tmsg;
char buffer[1024]; // should be big enough
// NB: this can be called before the globalParams object is created
@@ -32,7 +32,7 @@ void CDECL error(int pos, char *msg, ...) {
return;
}
if (pos >= 0) {
- emsg = QString("Error (%1): ").arg(pos);
+ emsg = TQString("Error (%1): ").arg(pos);
} else {
emsg = "Error: ";
}
diff --git a/kpdf/part.cpp b/kpdf/part.cpp
index 69ad7f00..b2775255 100644
--- a/kpdf/part.cpp
+++ b/kpdf/part.cpp
@@ -22,16 +22,16 @@
***************************************************************************/
// qt/kde includes
-#include <qcheckbox.h>
-#include <qsplitter.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qtoolbox.h>
-#include <qtooltip.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqsplitter.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqtoolbox.h>
+#include <tqtooltip.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <dcopobject.h>
#include <dcopclient.h>
#include <kapplication.h>
@@ -80,27 +80,27 @@ class PDFOptionsPage : public KPrintDialogPage
PDFOptionsPage()
{
setTitle( i18n( "PDF Options" ) );
- QVBoxLayout *layout = new QVBoxLayout(this);
- m_forceRaster = new QCheckBox(i18n("Force rasterization"), this);
- QToolTip::add(m_forceRaster, i18n("Rasterize into an image before printing"));
- QWhatsThis::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."));
+ TQVBoxLayout *layout = 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);
}
- void getOptions( QMap<QString,QString>& opts, bool incldef = false )
+ void getOptions( TQMap<TQString,TQString>& opts, bool incldef = false )
{
Q_UNUSED(incldef);
- opts[ "kde-kpdf-forceRaster" ] = QString::number( m_forceRaster->isChecked() );
+ opts[ "kde-kpdf-forceRaster" ] = TQString::number( m_forceRaster->isChecked() );
}
- void setOptions( const QMap<QString,QString>& opts )
+ void setOptions( const TQMap<TQString,TQString>& opts )
{
m_forceRaster->setChecked( opts[ "kde-kpdf-forceRaster" ].toInt() );
}
private:
- QCheckBox *m_forceRaster;
+ TQCheckBox *m_forceRaster;
};
// definition of searchID for this class
@@ -113,18 +113,18 @@ using namespace KPDF;
unsigned int Part::m_count = 0;
-Part::Part(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QStringList & /*args*/ )
+Part::Part(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQStringList & /*args*/ )
: DCOPObject("kpdf"), KParts::ReadOnlyPart(parent, 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
- connect(this, SIGNAL(started(KIO::Job *)), this, SLOT(setMimeTypes(KIO::Job *)));
+ connect(this, TQT_SIGNAL(started(KIO::Job *)), this, TQT_SLOT(setMimeTypes(KIO::Job *)));
// connect the completed signal so we can put the window caption when loading remote files
- connect(this, SIGNAL(completed()), this, SLOT(emitWindowCaption()));
- connect(this, SIGNAL(canceled(const QString &)), this, SLOT(emitWindowCaption()));
+ connect(this, TQT_SIGNAL(completed()), this, TQT_SLOT(emitWindowCaption()));
+ connect(this, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(emitWindowCaption()));
// load catalog for translation
KGlobal::locale()->insertCatalogue("kpdf");
@@ -144,86 +144,86 @@ Part::Part(QWidget *parentWidget, const char *widgetName,
// build the document
m_document = new KPDFDocument(widget());
- connect( m_document, SIGNAL( linkFind() ), this, SLOT( slotFind() ) );
- connect( m_document, SIGNAL( linkGoToPage() ), this, SLOT( slotGoToPage() ) );
- connect( m_document, SIGNAL( linkPresentation() ), this, SLOT( slotShowPresentation() ) );
- connect( m_document, SIGNAL( linkEndPresentation() ), this, SLOT( slotHidePresentation() ) );
- connect( m_document, SIGNAL( openURL(const KURL &) ), this, SLOT( openURLFromDocument(const KURL &) ) );
- connect( m_document, SIGNAL( close() ), this, SLOT( close() ) );
+ connect( m_document, TQT_SIGNAL( linkFind() ), this, TQT_SLOT( slotFind() ) );
+ connect( m_document, TQT_SIGNAL( linkGoToPage() ), this, TQT_SLOT( slotGoToPage() ) );
+ connect( m_document, TQT_SIGNAL( linkPresentation() ), this, TQT_SLOT( slotShowPresentation() ) );
+ connect( m_document, TQT_SIGNAL( linkEndPresentation() ), this, TQT_SLOT( slotHidePresentation() ) );
+ 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, SIGNAL( quit() ), parent, SLOT( slotQuit() ) );
+ connect( m_document, TQT_SIGNAL( quit() ), parent, TQT_SLOT( slotQuit() ) );
else
- connect( m_document, SIGNAL( quit() ), this, SLOT( cannotQuit() ) );
+ 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->boxLayout()->setSpacing( KDialog::spacingHint() );
-// QLabel * sLabel = new QLabel( i18n( "&Search:" ), m_searchToolBar, "kde toolbar widget" );
+// TQLabel * sLabel = new TQLabel( i18n( "&Search:" ), m_searchToolBar, "kde toolbar widget" );
// m_searchWidget = new SearchWidget( m_searchToolBar, m_document );
// sLabel->setBuddy( m_searchWidget );
// m_searchToolBar->setStretchableWidget( m_searchWidget );
// widgets: [] splitter []
- m_splitter = new QSplitter( parentWidget, widgetName );
+ m_splitter = new TQSplitter( parentWidget, widgetName );
m_splitter->setOpaqueResize( true );
setWidget( m_splitter );
- m_showLeftPanel = new KToggleAction( i18n( "Show &Navigation Panel"), "show_side_panel", 0, this, SLOT( slotShowLeftPanel() ), actionCollection(), "show_leftpanel" );
+ m_showLeftPanel = new KToggleAction( i18n( "Show &Navigation Panel"), "show_side_panel", 0, this, TQT_SLOT( slotShowLeftPanel() ), actionCollection(), "show_leftpanel" );
m_showLeftPanel->setCheckedState( i18n( "Hide &Navigation Panel") );
m_showLeftPanel->setShortcut( "CTRL+L" );
m_showLeftPanel->setChecked( KpdfSettings::showLeftPanel() );
// widgets: [left panel] | []
- m_leftPanel = new QWidget( m_splitter );
+ m_leftPanel = new TQWidget( m_splitter );
m_leftPanel->setMinimumWidth( 90 );
m_leftPanel->setMaximumWidth( 300 );
- QVBoxLayout * leftPanelLayout = new QVBoxLayout( m_leftPanel );
+ TQVBoxLayout * leftPanelLayout = new TQVBoxLayout( m_leftPanel );
// widgets: [left toolbox/..] | []
- m_toolBox = new QToolBox( m_leftPanel );
+ m_toolBox = new TQToolBox( m_leftPanel );
leftPanelLayout->addWidget( m_toolBox );
int index;
// [left toolbox: Table of Contents] | []
// dummy wrapper with layout to enable horizontal scroll bars (bug: 147233)
- QWidget *tocWrapper = new QWidget(m_toolBox);
- QVBoxLayout *tocWrapperLayout = new QVBoxLayout(tocWrapper);
+ TQWidget *tocWrapper = new TQWidget(m_toolBox);
+ TQVBoxLayout *tocWrapperLayout = new TQVBoxLayout(tocWrapper);
m_tocFrame = new TOC( tocWrapper, m_document );
tocWrapperLayout->add(m_tocFrame);
- connect(m_tocFrame, SIGNAL(hasTOC(bool)), this, SLOT(enableTOC(bool)));
- index = m_toolBox->addItem( tocWrapper, QIconSet(SmallIcon("text_left")), i18n("Contents") );
+ connect(m_tocFrame, TQT_SIGNAL(hasTOC(bool)), this, TQT_SLOT(enableTOC(bool)));
+ index = m_toolBox->addItem( tocWrapper, TQIconSet(SmallIcon("text_left")), i18n("Contents") );
m_toolBox->setItemToolTip(index, i18n("Contents"));
enableTOC( false );
// [left toolbox: Thumbnails and Bookmarks] | []
- QVBox * thumbsBox = new ThumbnailsBox( m_toolBox );
+ TQVBox * thumbsBox = new ThumbnailsBox( m_toolBox );
m_searchWidget = new SearchWidget( thumbsBox, m_document );
m_thumbnailList = new ThumbnailList( thumbsBox, m_document );
// ThumbnailController * m_tc = new ThumbnailController( thumbsBox, m_thumbnailList );
- connect( m_thumbnailList, SIGNAL( urlDropped( const KURL& ) ), SLOT( openURLFromDocument( const KURL & )) );
- connect( m_thumbnailList, SIGNAL( rightClick(const KPDFPage *, const QPoint &) ), this, SLOT( slotShowMenu(const KPDFPage *, const QPoint &) ) );
+ connect( m_thumbnailList, TQT_SIGNAL( urlDropped( const KURL& ) ), TQT_SLOT( openURLFromDocument( const KURL & )) );
+ connect( m_thumbnailList, TQT_SIGNAL( rightClick(const KPDFPage *, const TQPoint &) ), this, TQT_SLOT( slotShowMenu(const KPDFPage *, const TQPoint &) ) );
// shrink the bottom controller toolbar (too hackish..)
thumbsBox->setStretchFactor( m_searchWidget, 100 );
thumbsBox->setStretchFactor( m_thumbnailList, 100 );
// thumbsBox->setStretchFactor( m_tc, 1 );
- index = m_toolBox->addItem( thumbsBox, QIconSet(SmallIcon("thumbnail")), i18n("Thumbnails") );
+ index = m_toolBox->addItem( thumbsBox, TQIconSet(SmallIcon("thumbnail")), i18n("Thumbnails") );
m_toolBox->setItemToolTip(index, i18n("Thumbnails"));
m_toolBox->setCurrentItem( thumbsBox );
slotShowLeftPanel();
/* // [left toolbox: Annotations] | []
- QFrame * editFrame = new QFrame( m_toolBox );
- int iIdx = m_toolBox->addItem( editFrame, QIconSet(SmallIcon("pencil")), i18n("Annotations") );
+ TQFrame * editFrame = new TQFrame( m_toolBox );
+ int iIdx = m_toolBox->addItem( editFrame, TQIconSet(SmallIcon("pencil")), i18n("Annotations") );
m_toolBox->setItemEnabled( iIdx, false );*/
// widgets: [../miniBarContainer] | []
- QWidget * miniBarContainer = new QWidget( m_leftPanel );
+ TQWidget * miniBarContainer = new TQWidget( m_leftPanel );
leftPanelLayout->addWidget( miniBarContainer );
- QVBoxLayout * miniBarLayout = new QVBoxLayout( miniBarContainer );
+ TQVBoxLayout * miniBarLayout = new TQVBoxLayout( miniBarContainer );
// widgets: [../[spacer/..]] | []
- QWidget * miniSpacer = new QWidget( miniBarContainer );
+ TQWidget * miniSpacer = new TQWidget( miniBarContainer );
miniSpacer->setFixedHeight( 6 );
miniBarLayout->addWidget( miniSpacer );
// widgets: [../[../MiniBar]] | []
@@ -234,8 +234,8 @@ Part::Part(QWidget *parentWidget, const char *widgetName,
m_pageView = new PageView( m_splitter, m_document );
m_pageView->setFocus(); //usability setting
m_splitter->setFocusProxy(m_pageView);
- connect( m_pageView, SIGNAL( urlDropped( const KURL& ) ), SLOT( openURLFromDocument( const KURL & )));
- connect( m_pageView, SIGNAL( rightClick(const KPDFPage *, const QPoint &) ), this, SLOT( slotShowMenu(const KPDFPage *, const QPoint &) ) );
+ connect( m_pageView, TQT_SIGNAL( urlDropped( const KURL& ) ), TQT_SLOT( openURLFromDocument( const KURL & )));
+ connect( m_pageView, TQT_SIGNAL( rightClick(const KPDFPage *, const TQPoint &) ), this, TQT_SLOT( slotShowMenu(const KPDFPage *, const TQPoint &) ) );
// add document observers
m_document->addObserver( this );
@@ -248,60 +248,60 @@ Part::Part(QWidget *parentWidget, const char *widgetName,
KActionCollection * ac = actionCollection();
// Page Traversal actions
- m_gotoPage = KStdAction::gotoPage( this, SLOT( slotGoToPage() ), ac, "goto_page" );
+ m_gotoPage = KStdAction::gotoPage( this, TQT_SLOT( slotGoToPage() ), ac, "goto_page" );
m_gotoPage->setShortcut( "CTRL+G" );
// dirty way to activate gotopage when pressing miniBar's button
- connect( m_miniBar, SIGNAL( gotoPage() ), m_gotoPage, SLOT( activate() ) );
+ connect( m_miniBar, TQT_SIGNAL( gotoPage() ), m_gotoPage, TQT_SLOT( activate() ) );
- m_prevPage = KStdAction::prior(this, SLOT(slotPreviousPage()), ac, "previous_page");
+ m_prevPage = KStdAction::prior(this, TQT_SLOT(slotPreviousPage()), ac, "previous_page");
m_prevPage->setWhatsThis( i18n( "Moves to the previous page of the document" ) );
m_prevPage->setShortcut( 0 );
// dirty way to activate prev page when pressing miniBar's button
- connect( m_miniBar, SIGNAL( prevPage() ), m_prevPage, SLOT( activate() ) );
+ connect( m_miniBar, TQT_SIGNAL( prevPage() ), m_prevPage, TQT_SLOT( activate() ) );
- m_nextPage = KStdAction::next(this, SLOT(slotNextPage()), ac, "next_page" );
+ m_nextPage = KStdAction::next(this, TQT_SLOT(slotNextPage()), ac, "next_page" );
m_nextPage->setWhatsThis( i18n( "Moves to the next page of the document" ) );
m_nextPage->setShortcut( 0 );
// dirty way to activate next page when pressing miniBar's button
- connect( m_miniBar, SIGNAL( nextPage() ), m_nextPage, SLOT( activate() ) );
+ connect( m_miniBar, TQT_SIGNAL( nextPage() ), m_nextPage, TQT_SLOT( activate() ) );
- m_firstPage = KStdAction::firstPage( this, SLOT( slotGotoFirst() ), ac, "first_page" );
+ m_firstPage = KStdAction::firstPage( this, TQT_SLOT( slotGotoFirst() ), ac, "first_page" );
m_firstPage->setWhatsThis( i18n( "Moves to the first page of the document" ) );
- m_lastPage = KStdAction::lastPage( this, SLOT( slotGotoLast() ), ac, "last_page" );
+ m_lastPage = KStdAction::lastPage( this, TQT_SLOT( slotGotoLast() ), ac, "last_page" );
m_lastPage->setWhatsThis( i18n( "Moves to the last page of the document" ) );
- m_historyBack = KStdAction::back( this, SLOT( slotHistoryBack() ), ac, "history_back" );
+ m_historyBack = KStdAction::back( this, TQT_SLOT( slotHistoryBack() ), ac, "history_back" );
m_historyBack->setWhatsThis( i18n( "Go to the place you were before" ) );
- m_historyNext = KStdAction::forward( this, SLOT( slotHistoryNext() ), ac, "history_forward" );
+ m_historyNext = KStdAction::forward( this, TQT_SLOT( slotHistoryNext() ), ac, "history_forward" );
m_historyNext->setWhatsThis( i18n( "Go to the place you were after" ) );
// Find and other actions
- m_find = KStdAction::find( this, SLOT( slotFind() ), ac, "find" );
+ m_find = KStdAction::find( this, TQT_SLOT( slotFind() ), ac, "find" );
m_find->setEnabled( false );
- m_findNext = KStdAction::findNext( this, SLOT( slotFindNext() ), ac, "find_next" );
+ m_findNext = KStdAction::findNext( this, TQT_SLOT( slotFindNext() ), ac, "find_next" );
m_findNext->setEnabled( false );
- m_saveAs = KStdAction::saveAs( this, SLOT( slotSaveFileAs() ), ac, "save" );
+ m_saveAs = KStdAction::saveAs( this, TQT_SLOT( slotSaveFileAs() ), ac, "save" );
m_saveAs->setEnabled( false );
- KAction * prefs = KStdAction::preferences( this, SLOT( slotPreferences() ), ac, "preferences" );
+ KAction * prefs = KStdAction::preferences( this, TQT_SLOT( slotPreferences() ), ac, "preferences" );
prefs->setText( i18n( "Configure KPDF..." ) );
- m_printPreview = KStdAction::printPreview( this, SLOT( slotPrintPreview() ), ac );
+ m_printPreview = KStdAction::printPreview( this, TQT_SLOT( slotPrintPreview() ), ac );
m_printPreview->setEnabled( false );
- m_showProperties = new KAction(i18n("&Properties"), "info", 0, this, SLOT(slotShowProperties()), ac, "properties");
+ m_showProperties = new KAction(i18n("&Properties"), "info", 0, this, TQT_SLOT(slotShowProperties()), ac, "properties");
m_showProperties->setEnabled( false );
- m_showPresentation = new KAction( i18n("P&resentation"), "kpresenter_kpr", "Ctrl+Shift+P", this, SLOT(slotShowPresentation()), ac, "presentation");
+ 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
m_pageView->setupActions( ac );
// apply configuration (both internal settings and GUI configured items)
- QValueList<int> splitterSizes = KpdfSettings::splitterSizes();
+ TQValueList<int> splitterSizes = KpdfSettings::splitterSizes();
if ( !splitterSizes.count() )
{
// the first time use 1/10 for the panel and 9/10 for the pageView
@@ -313,11 +313,11 @@ Part::Part(QWidget *parentWidget, const char *widgetName,
// by connecting to Qt4::QSplitter's sliderMoved())
m_pageView->installEventFilter( this );
m_watcher = new KDirWatch( this );
- connect( m_watcher, SIGNAL( dirty( const QString& ) ), this, SLOT( slotFileDirty( const QString& ) ) );
- m_dirtyHandler = new QTimer( this );
- connect( m_dirtyHandler, SIGNAL( timeout() ),this, SLOT( slotDoFileDirty() ) );
- m_saveSplitterSizeTimer = new QTimer( this );
- connect( m_saveSplitterSizeTimer, SIGNAL( timeout() ),this, SLOT( saveSplitterSize() ) );
+ connect( m_watcher, TQT_SIGNAL( dirty( const TQString& ) ), this, TQT_SLOT( slotFileDirty( const TQString& ) ) );
+ m_dirtyHandler = new TQTimer( this );
+ connect( m_dirtyHandler, TQT_SIGNAL( timeout() ),this, TQT_SLOT( slotDoFileDirty() ) );
+ m_saveSplitterSizeTimer = new TQTimer( this );
+ connect( m_saveSplitterSizeTimer, TQT_SIGNAL( timeout() ),this, TQT_SLOT( saveSplitterSize() ) );
slotNewConfig();
@@ -417,12 +417,12 @@ bool Part::openFile()
}
if ( (*mime).is( "application/postscript" ) )
{
- QString app = KStandardDirs::findExe( "ps2pdf" );
+ TQString app = KStandardDirs::findExe( "ps2pdf" );
if ( !app.isNull() )
{
- if ( QFile::exists(m_file) )
+ if ( TQFile::exists(m_file) )
{
- KTempFile tf( QString::null, ".pdf" );
+ KTempFile tf( TQString::null, ".pdf" );
if ( tf.status() == 0 )
{
tf.close();
@@ -432,7 +432,7 @@ bool Part::openFile()
*p << app;
*p << m_file << m_temporaryLocalFile;
m_pageView->showText(i18n("Converting from ps to pdf..."), 0);
- connect(p, SIGNAL(processExited(KProcess *)), this, SLOT(psTransformEnded()));
+ connect(p, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(psTransformEnded()));
p -> start();
return true;
}
@@ -447,7 +447,7 @@ bool Part::openFile()
}
}
- m_temporaryLocalFile = QString::null;
+ m_temporaryLocalFile = TQString::null;
bool ok = m_document->openDocument( m_file, url(), mime );
@@ -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."), QString::null, "autoPresentationWarning");
+ KMessageBox::information(m_presentationWidget, i18n("The document is going to be launched on presentation mode because the file requested it."), TQString::null, "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 = QString::null;
+ m_jobMime = TQString::null;
// this calls the above 'openURL' method
bool b = KParts::ReadOnlyPart::openURL(url);
@@ -527,11 +527,11 @@ void Part::setMimeTypes(KIO::Job *job)
if (job)
{
job->addMetaData("accept", "application/pdf, */*;q=0.5");
- connect(job, SIGNAL(mimetype(KIO::Job*,const QString&)), this, SLOT(readMimeType(KIO::Job*,const QString&)));
+ connect(job, TQT_SIGNAL(mimetype(KIO::Job*,const TQString&)), this, TQT_SLOT(readMimeType(KIO::Job*,const TQString&)));
}
}
-void Part::readMimeType(KIO::Job *, const QString &mime)
+void Part::readMimeType(KIO::Job *, const TQString &mime)
{
m_jobMime = mime;
}
@@ -547,8 +547,8 @@ bool Part::closeURL()
{
if (!m_temporaryLocalFile.isNull())
{
- QFile::remove( m_temporaryLocalFile );
- m_temporaryLocalFile = QString::null;
+ TQFile::remove( m_temporaryLocalFile );
+ m_temporaryLocalFile = TQString::null;
}
slotHidePresentation();
@@ -568,10 +568,10 @@ bool Part::closeURL()
return KParts::ReadOnlyPart::closeURL();
}
-bool Part::eventFilter( QObject * watched, QEvent * e )
+bool Part::eventFilter( TQObject * watched, TQEvent * e )
{
// if pageView has been resized, save splitter sizes
- if ( watched == m_pageView && e->type() == QEvent::Resize )
+ if ( watched == m_pageView && e->type() == TQEvent::Resize )
m_saveSplitterSizeTimer->start(500, true);
// only intercept events, don't block them
@@ -589,7 +589,7 @@ void Part::slotShowLeftPanel()
m_thumbnailList->setShown( showLeft );
}
-void Part::slotFileDirty( const QString& fileName )
+void Part::slotFileDirty( const TQString& fileName )
{
// The beauty of this is that each start cancels the previous one.
// This means that timeout() is only fired when there have
@@ -638,7 +638,7 @@ void Part::close()
{
closeURL();
}
- else KMessageBox::information(widget(), i18n("This link points to a close document action that does not work when using the embedded viewer."), QString::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::null, "warnNoCloseIfNotInKPDF");
}
void Part::updateViewActions()
@@ -675,7 +675,7 @@ void Part::enableTOC(bool enable)
void Part::psTransformEnded()
{
- QString aux = m_file;
+ TQString aux = m_file;
m_file = m_temporaryLocalFile;
openFile();
m_file = aux; // so watching works, we have to watch the ps file not the autogenerated pdf
@@ -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."), QString::null, "warnNoQuitIfNotInKPDF");
+ KMessageBox::information(widget(), i18n("This link points to a quit application action that does not work when using the embedded viewer."), TQString::null, "warnNoQuitIfNotInKPDF");
}
void Part::saveSplitterSize()
@@ -699,16 +699,16 @@ void Part::saveSplitterSize()
class KPDFGotoPageDialog : public KDialogBase
{
public:
- KPDFGotoPageDialog(QWidget *p, int current, int max) : KDialogBase(p, 0L, true, i18n("Go to Page"), Ok | Cancel, Ok) {
- QWidget *w = new QWidget(this);
+ KPDFGotoPageDialog(TQWidget *p, int current, int max) : KDialogBase(p, 0L, true, i18n("Go to Page"), Ok | Cancel, Ok) {
+ TQWidget *w = new TQWidget(this);
setMainWidget(w);
- QVBoxLayout *topLayout = new QVBoxLayout( w, 0, spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( w, 0, spacingHint() );
e1 = new KIntNumInput(current, w);
e1->setRange(1, max);
e1->setEditFocus(true);
- QLabel *label = new QLabel( e1,i18n("&Page:"), w );
+ TQLabel *label = new TQLabel( e1,i18n("&Page:"), w );
topLayout->addWidget(label);
topLayout->addWidget(e1);
topLayout->addSpacing(spacingHint()); // A little bit extra space
@@ -728,7 +728,7 @@ public:
void Part::slotGoToPage()
{
KPDFGotoPageDialog pageDialog( m_pageView, m_document->currentPage() + 1, m_document->pages() );
- if ( pageDialog.exec() == QDialog::Accepted )
+ if ( pageDialog.exec() == TQDialog::Accepted )
m_document->setViewportPage( pageDialog.getPage() - 1 );
}
@@ -782,7 +782,7 @@ void Part::slotFind()
{
dlg.setOptions( dlg.options() | KFindDialog::CaseSensitive );
}
- if ( dlg.exec() == QDialog::Accepted )
+ if ( dlg.exec() == TQDialog::Accepted )
{
savedCaseSensitive = dlg.options() & KFindDialog::CaseSensitive;
m_searchHistory = dlg.findHistory();
@@ -801,7 +801,7 @@ void Part::slotFindNext()
void Part::slotSaveFileAs()
{
- KURL saveURL = KFileDialog::getSaveURL( url().isLocalFile() ? url().url() : url().fileName(), QString::null, widget() );
+ KURL saveURL = KFileDialog::getSaveURL( url().isLocalFile() ? url().url() : url().fileName(), TQString::null, widget() );
if ( saveURL.isValid() && !saveURL.isEmpty() )
{
if (saveURL == url())
@@ -811,7 +811,7 @@ void Part::slotSaveFileAs()
}
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()), QString::null, i18n("Overwrite")) != KMessageBox::Continue)
+ 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)
return;
}
@@ -830,7 +830,7 @@ void Part::slotPreferences()
// we didn't find an instance of this dialog, so lets create it
PreferencesDialog * dialog = new PreferencesDialog( m_pageView, KpdfSettings::self() );
// keep us informed when the user changes settings
- connect( dialog, SIGNAL( settingsChanged() ), this, SLOT( slotNewConfig() ) );
+ connect( dialog, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( slotNewConfig() ) );
dialog->show();
}
@@ -855,8 +855,8 @@ void Part::slotNewConfig()
m_searchWidget->setShown( showSearch );
// Main View (pageView)
- QScrollView::ScrollBarMode scrollBarMode = KpdfSettings::showScrollBars() ?
- QScrollView::AlwaysOn : QScrollView::AlwaysOff;
+ TQScrollView::ScrollBarMode scrollBarMode = KpdfSettings::showScrollBars() ?
+ TQScrollView::AlwaysOn : TQScrollView::AlwaysOff;
if ( m_pageView->hScrollBarMode() != scrollBarMode )
{
m_pageView->setHScrollBarMode( scrollBarMode );
@@ -903,7 +903,7 @@ void Part::slotPrintPreview()
doPrint(printer);
}
-void Part::slotShowMenu(const KPDFPage *page, const QPoint &point)
+void Part::slotShowMenu(const KPDFPage *page, const TQPoint &point)
{
bool reallyShow = false;
if (!m_actionsSearched)
@@ -916,8 +916,8 @@ void Part::slotShowMenu(const KPDFPage *page, const QPoint &point)
if (factory())
{
- QPtrList<KXMLGUIClient> clients(factory()->clients());
- QPtrListIterator<KXMLGUIClient> clientsIt( clients );
+ TQPtrList<KXMLGUIClient> clients(factory()->clients());
+ TQPtrListIterator<KXMLGUIClient> clientsIt( clients );
for( ; (!m_showMenuBarAction || !m_showFullScreenAction) && clientsIt.current(); ++clientsIt)
{
client = clientsIt.current();
@@ -927,8 +927,8 @@ void Part::slotShowMenu(const KPDFPage *page, const QPoint &point)
begin = actions.begin();
for ( it = begin; it != end; ++it )
{
- if (QString((*it)->name()) == "options_show_menubar") m_showMenuBarAction = (KToggleAction*)(*it);
- if (QString((*it)->name()) == "fullscreen") m_showFullScreenAction = (KToggleAction*)(*it);
+ if (TQString((*it)->name()) == "options_show_menubar") m_showMenuBarAction = (KToggleAction*)(*it);
+ if (TQString((*it)->name()) == "fullscreen") m_showFullScreenAction = (KToggleAction*)(*it);
}
}
}
@@ -1070,7 +1070,7 @@ void Part::restoreDocument(KConfig* config)
KURL url ( config->readPathEntry( "URL" ) );
if ( url.isValid() )
{
- QString viewport = config->readEntry( "Viewport" );
+ TQString viewport = config->readEntry( "Viewport" );
if (!viewport.isEmpty()) m_document->setNextDocumentViewport( DocumentViewport( viewport ) );
openURL( url );
}
diff --git a/kpdf/part.h b/kpdf/part.h
index be572c5f..70a3119e 100644
--- a/kpdf/part.h
+++ b/kpdf/part.h
@@ -18,14 +18,14 @@
#include <kparts/browserextension.h>
#include <kparts/part.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include "core/document.h"
#include "core/observer.h"
#include "dcop.h"
-class QWidget;
-class QSplitter;
-class QToolBox;
+class TQWidget;
+class TQSplitter;
+class TQToolBox;
class KURL;
class KAction;
@@ -62,8 +62,8 @@ Q_OBJECT
public:
// Default constructor
- Part(QWidget* parentWidget, const char* widgetName,
- QObject* parent, const char* name, const QStringList& args);
+ Part(TQWidget* parentWidget, const char* widgetName,
+ TQObject* parent, const char* name, const TQStringList& args);
// Destructor
~Part();
@@ -89,7 +89,7 @@ protected:
bool openURL(const KURL &url);
bool closeURL();
// filter that watches for splitter size changes
- bool eventFilter( QObject * watched, QEvent * e );
+ bool eventFilter( TQObject * watched, TQEvent * e );
protected slots:
void openURLFromDocument(const KURL &url);
@@ -107,7 +107,7 @@ protected slots:
void slotPreferences();
void slotNewConfig();
void slotPrintPreview();
- void slotShowMenu(const KPDFPage *page, const QPoint &point);
+ void slotShowMenu(const KPDFPage *page, const TQPoint &point);
void slotShowProperties();
void slotShowLeftPanel();
void slotShowPresentation();
@@ -121,7 +121,7 @@ protected slots:
void cannotQuit();
void saveSplitterSize();
void setMimeTypes(KIO::Job *job);
- void readMimeType(KIO::Job *job, const QString &mime);
+ void readMimeType(KIO::Job *job, const TQString &mime);
void emitWindowCaption();
public slots:
@@ -129,7 +129,7 @@ public slots:
void slotPrint();
void restoreDocument(KConfig* config);
void saveDocumentRestoreInfo(KConfig* config);
- void slotFileDirty( const QString& );
+ void slotFileDirty( const TQString& );
void slotDoFileDirty();
private:
@@ -137,38 +137,38 @@ private:
// the document
KPDFDocument * m_document;
- QString m_temporaryLocalFile;
+ TQString m_temporaryLocalFile;
// main widgets
- QSplitter *m_splitter;
- QWidget *m_leftPanel;
- QToolBox *m_toolBox;
+ TQSplitter *m_splitter;
+ TQWidget *m_leftPanel;
+ TQToolBox *m_toolBox;
SearchWidget *m_searchWidget;
- QGuardedPtr<ThumbnailList> m_thumbnailList;
- QGuardedPtr<PageView> m_pageView;
- QGuardedPtr<TOC> m_tocFrame;
- QGuardedPtr<MiniBar> m_miniBar;
- QGuardedPtr<PresentationWidget> m_presentationWidget;
+ TQGuardedPtr<ThumbnailList> m_thumbnailList;
+ TQGuardedPtr<PageView> m_pageView;
+ TQGuardedPtr<TOC> m_tocFrame;
+ TQGuardedPtr<MiniBar> m_miniBar;
+ TQGuardedPtr<PresentationWidget> m_presentationWidget;
// static instances counter
static unsigned int m_count;
// this is a hack because we can not use writeConfig on part destructor
// and we don't want to writeconfig every time someone moves the splitter
- // so we use a QTimer each 500 ms
- QTimer *m_saveSplitterSizeTimer;
+ // so we use a TQTimer each 500 ms
+ TQTimer *m_saveSplitterSizeTimer;
KDirWatch *m_watcher;
- QTimer *m_dirtyHandler;
+ TQTimer *m_dirtyHandler;
DocumentViewport m_viewportDirty;
bool m_wasPresentationOpen;
int m_dirtyToolboxIndex;
// Remember the search history
- QStringList m_searchHistory;
+ TQStringList m_searchHistory;
// mimetype got from the job
- QString m_jobMime;
+ TQString m_jobMime;
// actions
KAction *m_gotoPage;
diff --git a/kpdf/shell/shell.cpp b/kpdf/shell/shell.cpp
index 82b18fa6..8b6d185a 100644
--- a/kpdf/shell/shell.cpp
+++ b/kpdf/shell/shell.cpp
@@ -18,8 +18,8 @@
***************************************************************************/
// qt/kde includes
-#include <qcursor.h>
-#include <qtimer.h>
+#include <tqcursor.h>
+#include <tqtimer.h>
#include <kaction.h>
#include <kapplication.h>
#include <kedittoolbar.h>
@@ -87,9 +87,9 @@ void Shell::init()
m_part = 0;
return;
}
- connect( this, SIGNAL( restoreDocument(KConfig*) ),m_part, SLOT( restoreDocument(KConfig*)));
- connect( this, SIGNAL( saveDocumentRestoreInfo(KConfig*) ), m_part, SLOT( saveDocumentRestoreInfo(KConfig*)));
- connect( m_part, SIGNAL( enablePrintAction(bool) ), m_printAction, SLOT( setEnabled(bool)));
+ connect( this, TQT_SIGNAL( restoreDocument(KConfig*) ),m_part, TQT_SLOT( restoreDocument(KConfig*)));
+ connect( this, TQT_SIGNAL( saveDocumentRestoreInfo(KConfig*) ), m_part, TQT_SLOT( saveDocumentRestoreInfo(KConfig*)));
+ connect( m_part, TQT_SIGNAL( enablePrintAction(bool) ), m_printAction, TQT_SLOT( setEnabled(bool)));
readSettings();
if (!KGlobal::config()->hasGroup("MainWindow"))
@@ -99,7 +99,7 @@ void Shell::init()
}
setAutoSaveSettings();
- if (m_openUrl.isValid()) QTimer::singleShot(0, this, SLOT(delayedOpen()));
+ if (m_openUrl.isValid()) TQTimer::singleShot(0, this, TQT_SLOT(delayedOpen()));
}
void Shell::delayedOpen()
@@ -146,19 +146,19 @@ void Shell::writeSettings()
void Shell::setupActions()
{
- KAction * openAction = KStdAction::open(this, SLOT(fileOpen()), actionCollection());
- m_recent = KStdAction::openRecent( this, SLOT( openURL( const KURL& ) ), actionCollection() );
- connect( m_recent, SIGNAL( activated() ), openAction, SLOT( activate() ) );
+ KAction * openAction = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
+ m_recent = KStdAction::openRecent( this, TQT_SLOT( openURL( const KURL& ) ), actionCollection() );
+ connect( m_recent, TQT_SIGNAL( activated() ), openAction, TQT_SLOT( activate() ) );
m_recent->setWhatsThis( i18n( "<b>Click</b> to open a file or <b>Click and hold</b> to select a recent file" ) );
- m_printAction = KStdAction::print( m_part, SLOT( slotPrint() ), actionCollection() );
+ m_printAction = KStdAction::print( m_part, TQT_SLOT( slotPrint() ), actionCollection() );
m_printAction->setEnabled( false );
- KStdAction::quit(this, SLOT(slotQuit()), actionCollection());
+ KStdAction::quit(this, TQT_SLOT(slotQuit()), actionCollection());
setStandardToolBarMenuEnabled(true);
- m_showMenuBarAction = KStdAction::showMenubar( this, SLOT( slotShowMenubar() ), actionCollection());
- KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
- m_fullScreenAction = KStdAction::fullScreen( this, SLOT( slotUpdateFullScreen() ), actionCollection(), this );
+ 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 );
}
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( QString::null, "application/pdf application/postscript" );//getOpenFileName();
+ KURL url = KFileDialog::getOpenURL( TQString::null, "application/pdf application/postscript" );//getOpenFileName();
if (!url.isEmpty())
openURL(url);
@@ -197,7 +197,7 @@ Shell::fileOpen()
Shell::optionsConfigureToolbars()
{
KEditToolbar dlg(factory());
- connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(applyNewToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(applyNewToolbarConfig()));
dlg.exec();
}
diff --git a/kpdf/ui/minibar.cpp b/kpdf/ui/minibar.cpp
index 1a259add..be3c9383 100644
--- a/kpdf/ui/minibar.cpp
+++ b/kpdf/ui/minibar.cpp
@@ -9,13 +9,13 @@
***************************************************************************/
// qt / kde includes
-#include <qapplication.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qlayout.h>
-#include <qvalidator.h>
-#include <qpainter.h>
+#include <tqapplication.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
+#include <tqvalidator.h>
+#include <tqpainter.h>
#include <kiconloader.h>
#include <kaccelmanager.h>
#include <kdeversion.h>
@@ -32,10 +32,10 @@ class ProgressWidget : public QWidget
void setProgress( float percentage );
protected:
- void mouseMoveEvent( QMouseEvent * e );
- void mousePressEvent( QMouseEvent * e );
- void wheelEvent( QWheelEvent * e );
- void paintEvent( QPaintEvent * e );
+ void mouseMoveEvent( TQMouseEvent * e );
+ void mousePressEvent( TQMouseEvent * e );
+ void wheelEvent( TQWheelEvent * e );
+ void paintEvent( TQPaintEvent * e );
private:
MiniBar * m_miniBar;
@@ -48,83 +48,83 @@ class PagesEdit : public QLineEdit
public:
PagesEdit( MiniBar * parent );
void setPagesNumber( int pages );
- void setText( const QString & );
+ void setText( const TQString & );
protected:
- void focusInEvent( QFocusEvent * e );
- void focusOutEvent( QFocusEvent * e );
- void mousePressEvent( QMouseEvent * e );
- void wheelEvent( QWheelEvent * e );
+ void focusInEvent( TQFocusEvent * e );
+ void focusOutEvent( TQFocusEvent * e );
+ void mousePressEvent( TQMouseEvent * e );
+ void wheelEvent( TQWheelEvent * e );
private:
MiniBar * m_miniBar;
bool m_eatClick;
- QString backString;
- QIntValidator * m_validator;
+ TQString backString;
+ TQIntValidator * m_validator;
};
// [private widget] a flat qpushbutton that enlights on hover
class HoverButton : public QPushButton
{
public:
- HoverButton( QWidget * parent );
+ HoverButton( TQWidget * parent );
protected:
- void paintEvent( QPaintEvent * e );
- void enterEvent( QPaintEvent * e );
- void leaveEvent( QPaintEvent * e );
+ void paintEvent( TQPaintEvent * e );
+ void enterEvent( TQPaintEvent * e );
+ void leaveEvent( TQPaintEvent * e );
};
/** MiniBar **/
-MiniBar::MiniBar( QWidget * parent, KPDFDocument * document )
- : QFrame( parent, "miniBar" ), m_document( document ),
+MiniBar::MiniBar( TQWidget * parent, KPDFDocument * document )
+ : TQFrame( parent, "miniBar" ), m_document( document ),
m_currentPage( -1 )
{
// left spacer
- QHBoxLayout * horLayout = new QHBoxLayout( this );
- QSpacerItem * spacerL = new QSpacerItem( 20, 10, QSizePolicy::Expanding );
+ TQHBoxLayout * horLayout = new TQHBoxLayout( this );
+ TQSpacerItem * spacerL = new TQSpacerItem( 20, 10, TQSizePolicy::Expanding );
horLayout->addItem( spacerL );
// central 2r by 3c grid layout that contains all components
- QGridLayout * gridLayout = new QGridLayout( 0, 3,5, 2,1 );
+ TQGridLayout * gridLayout = new TQGridLayout( 0, 3,5, 2,1 );
// top spacer 6x6 px
-// QSpacerItem * spacerTop = new QSpacerItem( 6, 6, QSizePolicy::Fixed, QSizePolicy::Fixed );
+// TQSpacerItem * spacerTop = new TQSpacerItem( 6, 6, TQSizePolicy::Fixed, TQSizePolicy::Fixed );
// gridLayout->addMultiCell( spacerTop, 0, 0, 0, 4 );
// center progress widget
m_progressWidget = new ProgressWidget( this );
gridLayout->addMultiCellWidget( m_progressWidget, 0, 0, 0, 4 );
// bottom: left prev_page button
m_prevButton = new HoverButton( this );
- m_prevButton->setIconSet( SmallIconSet( QApplication::reverseLayout() ? "1rightarrow" : "1leftarrow" ) );
+ m_prevButton->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? "1rightarrow" : "1leftarrow" ) );
gridLayout->addWidget( m_prevButton, 1, 0 );
// bottom: left lineEdit (current page box)
m_pagesEdit = new PagesEdit( this );
gridLayout->addWidget( m_pagesEdit, 1, 1 );
// bottom: central '/' label
- gridLayout->addWidget( new QLabel( "/", this ), 1, 2 );
+ gridLayout->addWidget( new TQLabel( "/", this ), 1, 2 );
// bottom: right button
m_pagesButton = new HoverButton( this );
gridLayout->addWidget( m_pagesButton, 1, 3 );
// bottom: right next_page button
m_nextButton = new HoverButton( this );
- m_nextButton->setIconSet( SmallIconSet( QApplication::reverseLayout() ? "1leftarrow" : "1rightarrow" ) );
+ m_nextButton->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? "1leftarrow" : "1rightarrow" ) );
gridLayout->addWidget( m_nextButton, 1, 4 );
horLayout->addLayout( gridLayout );
// right spacer
- QSpacerItem * spacerR = new QSpacerItem( 20, 10, QSizePolicy::Expanding );
+ TQSpacerItem * spacerR = new TQSpacerItem( 20, 10, TQSizePolicy::Expanding );
horLayout->addItem( spacerR );
// customize own look
- setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
// connect signals from child widgets to internal handlers / signals bouncers
- connect( m_pagesEdit, SIGNAL( returnPressed() ), this, SLOT( slotChangePage() ) );
- connect( m_pagesButton, SIGNAL( clicked() ), this, SIGNAL( gotoPage() ) );
- connect( m_prevButton, SIGNAL( clicked() ), this, SIGNAL( prevPage() ) );
- connect( m_nextButton, SIGNAL( clicked() ), this, SIGNAL( nextPage() ) );
+ connect( m_pagesEdit, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( slotChangePage() ) );
+ connect( m_pagesButton, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( gotoPage() ) );
+ connect( m_prevButton, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( prevPage() ) );
+ connect( m_nextButton, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( nextPage() ) );
// widget starts hidden (will be shown after opening a document)
parent->hide();
@@ -135,7 +135,7 @@ MiniBar::~MiniBar()
m_document->removeObserver( this );
}
-void MiniBar::notifySetup( const QValueVector< KPDFPage * > & pageVector, bool changed )
+void MiniBar::notifySetup( const TQValueVector< KPDFPage * > & pageVector, bool changed )
{
// only process data when document changes
if ( !changed )
@@ -146,12 +146,12 @@ void MiniBar::notifySetup( const QValueVector< KPDFPage * > & pageVector, bool c
if ( pages < 1 )
{
m_currentPage = -1;
- static_cast<QWidget*>( parent() )->hide();
+ static_cast<TQWidget*>( parent() )->hide();
return;
}
// resize width of widgets
- int numberWidth = 10 + fontMetrics().width( QString::number( pages ) );
+ int numberWidth = 10 + fontMetrics().width( TQString::number( pages ) );
m_pagesEdit->setMinimumWidth( numberWidth );
m_pagesEdit->setMaximumWidth( 2 * numberWidth );
m_pagesButton->setMinimumWidth( numberWidth );
@@ -168,10 +168,10 @@ void MiniBar::notifySetup( const QValueVector< KPDFPage * > & pageVector, bool c
// update child widgets
m_pagesEdit->setPagesNumber( pages );
- m_pagesButton->setText( QString::number( pages ) );
+ m_pagesButton->setText( TQString::number( pages ) );
m_prevButton->setEnabled( false );
m_nextButton->setEnabled( false );
- static_cast<QWidget*>( parent() )->show();
+ static_cast<TQWidget*>( parent() )->show();
}
void MiniBar::notifyViewportChanged( bool /*smoothMove*/ )
@@ -191,14 +191,14 @@ void MiniBar::notifyViewportChanged( bool /*smoothMove*/ )
m_prevButton->setEnabled( page > 0 );
m_nextButton->setEnabled( page < ( pages - 1 ) );
// update text on widgets
- m_pagesEdit->setText( QString::number( page + 1 ) );
+ m_pagesEdit->setText( TQString::number( page + 1 ) );
}
}
-void MiniBar::resizeEvent( QResizeEvent * e )
+void MiniBar::resizeEvent( TQResizeEvent * e )
{
// auto-hide 'prev' and 'next' buttons if not enough space
- const QSize & myHint = minimumSizeHint();
+ const TQSize & myHint = minimumSizeHint();
bool shown = m_prevButton->isVisible() && m_nextButton->isVisible();
if ( shown && e->size().width() < myHint.width() )
{
@@ -221,7 +221,7 @@ void MiniBar::resizeEvent( QResizeEvent * e )
void MiniBar::slotChangePage()
{
// get text from the lineEdit
- QString pageNumber = m_pagesEdit->text();
+ TQString pageNumber = m_pagesEdit->text();
// convert it to page number and go to that page
bool ok;
@@ -260,7 +260,7 @@ void MiniBar::slotEmitPrevPage()
/** ProgressWidget **/
ProgressWidget::ProgressWidget( MiniBar * parent )
- : QWidget( parent, "progress", WNoAutoErase ),
+ : TQWidget( parent, "progress", WNoAutoErase ),
m_miniBar( parent ), m_progressPercentage( -1 )
{
setFixedHeight( 4 );
@@ -273,19 +273,19 @@ void ProgressWidget::setProgress( float percentage )
update();
}
-void ProgressWidget::mouseMoveEvent( QMouseEvent * e )
+void ProgressWidget::mouseMoveEvent( TQMouseEvent * e )
{
if ( e->state() == Qt::LeftButton && width() > 0 )
- m_miniBar->slotGotoNormalizedPage( (float)( QApplication::reverseLayout() ? width() - e->x() : e->x() ) / (float)width() );
+ m_miniBar->slotGotoNormalizedPage( (float)( TQApplication::reverseLayout() ? width() - e->x() : e->x() ) / (float)width() );
}
-void ProgressWidget::mousePressEvent( QMouseEvent * e )
+void ProgressWidget::mousePressEvent( TQMouseEvent * e )
{
if ( e->button() == Qt::LeftButton && width() > 0 )
- m_miniBar->slotGotoNormalizedPage( (float)( QApplication::reverseLayout() ? width() - e->x() : e->x() ) / (float)width() );
+ m_miniBar->slotGotoNormalizedPage( (float)( TQApplication::reverseLayout() ? width() - e->x() : e->x() ) / (float)width() );
}
-void ProgressWidget::wheelEvent( QWheelEvent * e )
+void ProgressWidget::wheelEvent( TQWheelEvent * e )
{
if ( e->delta() > 0 )
m_miniBar->slotEmitNextPage();
@@ -293,7 +293,7 @@ void ProgressWidget::wheelEvent( QWheelEvent * e )
m_miniBar->slotEmitPrevPage();
}
-void ProgressWidget::paintEvent( QPaintEvent * e )
+void ProgressWidget::paintEvent( TQPaintEvent * e )
{
if ( m_progressPercentage < 0.0 )
return;
@@ -302,11 +302,11 @@ void ProgressWidget::paintEvent( QPaintEvent * e )
int w = width(),
h = height(),
l = (int)( (float)w * m_progressPercentage );
- QRect cRect = ( QApplication::reverseLayout() ? QRect( 0, 0, w - l, h ) : QRect( l, 0, w - l, h ) ).intersect( e->rect() );
- QRect fRect = ( QApplication::reverseLayout() ? QRect( w - l, 0, l, h ) : QRect( 0, 0, l, h ) ).intersect( e->rect() );
+ TQRect cRect = ( TQApplication::reverseLayout() ? TQRect( 0, 0, w - l, h ) : TQRect( l, 0, w - l, h ) ).intersect( e->rect() );
+ TQRect fRect = ( TQApplication::reverseLayout() ? TQRect( w - l, 0, l, h ) : TQRect( 0, 0, l, h ) ).intersect( e->rect() );
// paint rects and a separator line
- QPainter p( this );
+ TQPainter p( this );
if ( cRect.isValid() )
p.fillRect( cRect, palette().active().highlightedText() );
if ( fRect.isValid() )
@@ -314,7 +314,7 @@ void ProgressWidget::paintEvent( QPaintEvent * e )
if ( l && l != w )
{
p.setPen( palette().active().highlight().dark( 120 ) );
- int delta = QApplication::reverseLayout() ? w - l : l;
+ int delta = TQApplication::reverseLayout() ? w - l : l;
p.drawLine( delta, 0, delta, h );
}
// draw a frame-like outline
@@ -326,14 +326,14 @@ void ProgressWidget::paintEvent( QPaintEvent * e )
/** PagesEdit **/
PagesEdit::PagesEdit( MiniBar * parent )
- : QLineEdit( parent ), m_miniBar( parent ), m_eatClick( false )
+ : TQLineEdit( parent ), m_miniBar( parent ), m_eatClick( false )
{
// customize look
- setFrameShadow( QFrame::Raised );
+ setFrameShadow( TQFrame::Raised );
focusOutEvent( 0 );
// use an integer validator
- m_validator = new QIntValidator( 1, 1, this );
+ m_validator = new TQIntValidator( 1, 1, this );
setValidator( m_validator );
// customize text properties
@@ -346,48 +346,48 @@ void PagesEdit::setPagesNumber( int pages )
m_validator->setTop( pages );
}
-void PagesEdit::setText( const QString & text )
+void PagesEdit::setText( const TQString & text )
{
// store a copy of the string
backString = text;
// call default handler if hasn't focus
if ( !hasFocus() )
- QLineEdit::setText( text );
+ TQLineEdit::setText( text );
}
-void PagesEdit::focusInEvent( QFocusEvent * e )
+void PagesEdit::focusInEvent( TQFocusEvent * e )
{
// select all text
selectAll();
- if ( e->reason() == QFocusEvent::Mouse )
+ if ( e->reason() == TQFocusEvent::Mouse )
m_eatClick = true;
// change background color to the default 'edit' color
setLineWidth( 2 );
setPaletteBackgroundColor( Qt::white );
// call default handler
- QLineEdit::focusInEvent( e );
+ TQLineEdit::focusInEvent( e );
}
-void PagesEdit::focusOutEvent( QFocusEvent * e )
+void PagesEdit::focusOutEvent( TQFocusEvent * e )
{
// change background color to a dark tone
setLineWidth( 1 );
setPaletteBackgroundColor( palette().active().background().light( 105 ) );
// restore text
- QLineEdit::setText( backString );
+ TQLineEdit::setText( backString );
// call default handler
- QLineEdit::focusOutEvent( e );
+ TQLineEdit::focusOutEvent( e );
}
-void PagesEdit::mousePressEvent( QMouseEvent * e )
+void PagesEdit::mousePressEvent( TQMouseEvent * e )
{
// if this click got the focus in, don't process the event
if ( !m_eatClick )
- QLineEdit::mousePressEvent( e );
+ TQLineEdit::mousePressEvent( e );
m_eatClick = false;
}
-void PagesEdit::wheelEvent( QWheelEvent * e )
+void PagesEdit::wheelEvent( TQWheelEvent * e )
{
if ( e->delta() > 0 )
m_miniBar->slotEmitNextPage();
@@ -398,8 +398,8 @@ void PagesEdit::wheelEvent( QWheelEvent * e )
/** HoverButton **/
-HoverButton::HoverButton( QWidget * parent )
- : QPushButton( parent )
+HoverButton::HoverButton( TQWidget * parent )
+ : TQPushButton( parent )
{
setMouseTracking( true );
#if KDE_IS_VERSION(3,3,90)
@@ -407,28 +407,28 @@ HoverButton::HoverButton( QWidget * parent )
#endif
}
-void HoverButton::enterEvent( QPaintEvent * e )
+void HoverButton::enterEvent( TQPaintEvent * e )
{
update();
- QPushButton::enterEvent( e );
+ TQPushButton::enterEvent( e );
}
-void HoverButton::leaveEvent( QPaintEvent * e )
+void HoverButton::leaveEvent( TQPaintEvent * e )
{
update();
- QPushButton::leaveEvent( e );
+ TQPushButton::leaveEvent( e );
}
-void HoverButton::paintEvent( QPaintEvent * e )
+void HoverButton::paintEvent( TQPaintEvent * e )
{
if ( hasMouse() )
{
- QPushButton::paintEvent( e );
+ TQPushButton::paintEvent( e );
}
else
{
- QPainter p( this );
- p.fillRect(e->rect(), parentWidget() ? parentWidget()->palette().brush(QPalette::Active, QColorGroup::Background) : paletteBackgroundColor());
+ TQPainter p( this );
+ p.fillRect(e->rect(), parentWidget() ? parentWidget()->palette().brush(TQPalette::Active, TQColorGroup::Background) : paletteBackgroundColor());
drawButtonLabel( &p );
}
}
diff --git a/kpdf/ui/minibar.h b/kpdf/ui/minibar.h
index 7c815e5e..f532999c 100644
--- a/kpdf/ui/minibar.h
+++ b/kpdf/ui/minibar.h
@@ -11,7 +11,7 @@
#ifndef _KPDF_MINIBAR_H_
#define _KPDF_MINIBAR_H_
-#include <qframe.h>
+#include <tqframe.h>
#include "core/observer.h"
class KPDFDocument;
@@ -22,16 +22,16 @@ class ProgressWidget;
/**
* @short A widget to display page number and change current page.
*/
-class MiniBar : public QFrame, public DocumentObserver
+class MiniBar : public TQFrame, public DocumentObserver
{
Q_OBJECT
public:
- MiniBar( QWidget *parent, KPDFDocument * document );
+ MiniBar( TQWidget *parent, KPDFDocument * document );
~MiniBar();
// [INHERITED] from DocumentObserver
uint observerId() const { return MINIBAR_ID; }
- void notifySetup( const QValueVector< KPDFPage * > & pages, bool );
+ void notifySetup( const TQValueVector< KPDFPage * > & pages, bool );
void notifyViewportChanged( bool smoothMove );
signals:
@@ -46,7 +46,7 @@ class MiniBar : public QFrame, public DocumentObserver
void slotEmitPrevPage();
protected:
- void resizeEvent( QResizeEvent * );
+ void resizeEvent( TQResizeEvent * );
private:
KPDFDocument * m_document;
diff --git a/kpdf/ui/pagepainter.cpp b/kpdf/ui/pagepainter.cpp
index f68df254..899be054 100644
--- a/kpdf/ui/pagepainter.cpp
+++ b/kpdf/ui/pagepainter.cpp
@@ -8,11 +8,11 @@
***************************************************************************/
// qt / kde includes
-#include <qrect.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qapplication.h>
+#include <tqrect.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqapplication.h>
#include <kimageeffect.h>
// local includes
@@ -21,9 +21,9 @@
#include "conf/settings.h"
void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags,
- QPainter * destPainter, const QRect & limits, int width, int height )
+ TQPainter * destPainter, const TQRect & limits, int width, int height )
{
- QPixmap * pixmap = 0;
+ TQPixmap * pixmap = 0;
// if a pixmap is present for given id, use it
if ( page->m_pixmaps.contains( id ) )
@@ -33,7 +33,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags,
else if ( !page->m_pixmaps.isEmpty() && width != -1 )
{
int minDistance = -1;
- QMap< int,QPixmap * >::const_iterator it = page->m_pixmaps.begin(), end = page->m_pixmaps.end();
+ TQMap< int,TQPixmap * >::const_iterator it = page->m_pixmaps.begin(), end = page->m_pixmaps.end();
for ( ; it != end; ++it )
{
int pixWidth = (*it)->width(),
@@ -49,7 +49,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags,
// if have no pixmap, draw blank page with gray cross and exit
if ( !pixmap )
{
- QColor color = Qt::white;
+ TQColor color = Qt::white;
if ( KpdfSettings::changeColors() )
{
switch ( KpdfSettings::renderMode() )
@@ -92,7 +92,7 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags,
nYMax = (double)limits.bottom() / (double)height;
// if no rect intersects limits, disable paintHighlights
paintHighlights = false;
- QValueList< HighlightRect * >::const_iterator hIt = page->m_highlights.begin(), hEnd = page->m_highlights.end();
+ TQValueList< HighlightRect * >::const_iterator hIt = page->m_highlights.begin(), hEnd = page->m_highlights.end();
for ( ; hIt != hEnd; ++hIt )
{
if ( (*hIt)->intersects( nXMin, nYMin, nXMax, nYMax ) )
@@ -105,13 +105,13 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags,
// use backBuffer if 'pixmap direct manipulation' is needed
bool backBuffer = paintAccessibility || paintHighlights;
- QPixmap * backPixmap = 0;
- QPainter * p = destPainter;
+ TQPixmap * backPixmap = 0;
+ TQPainter * p = destPainter;
if ( backBuffer )
{
// let's paint using a buffered painter
- backPixmap = new QPixmap( limits.width(), limits.height() );
- p = new QPainter( backPixmap );
+ backPixmap = new TQPixmap( limits.width(), limits.height() );
+ p = new TQPainter( backPixmap );
p->translate( -limits.left(), -limits.top() );
}
@@ -131,14 +131,14 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags,
// 2. mangle pixmap: convert it to 32-bit qimage and perform pixel-level manipulations
if ( backBuffer )
{
- QImage backImage = backPixmap->convertToImage();
+ TQImage backImage = backPixmap->convertToImage();
// 2.1. modify pixmap following accessibility settings
if ( paintAccessibility )
{
switch ( KpdfSettings::renderMode() )
{
case KpdfSettings::EnumRenderMode::Inverted:
- // Invert image pixels using QImage internal function
+ // Invert image pixels using TQImage internal function
backImage.invertPixels(false);
break;
case KpdfSettings::EnumRenderMode::Recolor:
@@ -174,11 +174,11 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags,
if ( paintHighlights )
{
// draw highlights that are inside the 'limits' paint region
- QValueList< HighlightRect * >::const_iterator hIt = page->m_highlights.begin(), hEnd = page->m_highlights.end();
+ TQValueList< HighlightRect * >::const_iterator hIt = page->m_highlights.begin(), hEnd = page->m_highlights.end();
for ( ; hIt != hEnd; ++hIt )
{
HighlightRect * r = *hIt;
- QRect highlightRect = r->geometry( width, height );
+ TQRect highlightRect = r->geometry( width, height );
if ( highlightRect.isValid() && highlightRect.intersects( limits ) )
{
// find out the rect to highlight on pixmap
@@ -213,20 +213,20 @@ void PagePainter::paintPageOnPainter( const KPDFPage * page, int id, int flags,
// 3. visually enchance links and images if requested
if ( enhanceLinks || enhanceImages )
{
- QColor normalColor = QApplication::palette().active().highlight();
- QColor lightColor = normalColor.light( 140 );
+ TQColor normalColor = TQApplication::palette().active().highlight();
+ TQColor lightColor = normalColor.light( 140 );
// enlarging limits for intersection is like growing the 'rectGeometry' below
- QRect limitsEnlarged = limits;
+ TQRect limitsEnlarged = limits;
limitsEnlarged.addCoords( -2, -2, 2, 2 );
// draw rects that are inside the 'limits' paint region as opaque rects
- QValueList< ObjectRect * >::const_iterator lIt = page->m_rects.begin(), lEnd = page->m_rects.end();
+ TQValueList< ObjectRect * >::const_iterator lIt = page->m_rects.begin(), lEnd = page->m_rects.end();
for ( ; lIt != lEnd; ++lIt )
{
ObjectRect * rect = *lIt;
if ( (enhanceLinks && rect->objectType() == ObjectRect::Link) ||
(enhanceImages && rect->objectType() == ObjectRect::Image) )
{
- QRect rectGeometry = rect->geometry( width, height );
+ TQRect rectGeometry = rect->geometry( width, height );
if ( rectGeometry.intersects( limitsEnlarged ) )
{
// expand rect and draw inner border
diff --git a/kpdf/ui/pagepainter.h b/kpdf/ui/pagepainter.h
index 21ef7629..8d6cde10 100644
--- a/kpdf/ui/pagepainter.h
+++ b/kpdf/ui/pagepainter.h
@@ -11,8 +11,8 @@
#define _KPDF_PAGEPAINTER_H_
class KPDFPage;
-class QPainter;
-class QRect;
+class TQPainter;
+class TQRect;
/**
* @short Paints a KPDFPage to an open painter using given flags.
@@ -30,7 +30,7 @@ class PagePainter
// 'width' and 'height' the expected size of page contents (used only
// to pick up an alternative pixmap if the pixmap of 'id' is missing.
static void paintPageOnPainter( const KPDFPage * page, int id, int flags,
- QPainter * p, const QRect & limits, int width = -1, int height = -1 );
+ TQPainter * p, const TQRect & limits, int width = -1, int height = -1 );
};
#endif
diff --git a/kpdf/ui/pageview.cpp b/kpdf/ui/pageview.cpp
index 866b8d66..3b0baecd 100644
--- a/kpdf/ui/pageview.cpp
+++ b/kpdf/ui/pageview.cpp
@@ -17,14 +17,14 @@
***************************************************************************/
// qt/kde includes
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qapplication.h>
-#include <qclipboard.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
#include <dcopclient.h>
#include <kcursor.h>
#include <kiconloader.h>
@@ -65,35 +65,35 @@ class PageViewPrivate
public:
// the document, pageviewItems and the 'visible cache'
KPDFDocument * document;
- QValueVector< PageViewItem * > items;
- QValueList< PageViewItem * > visibleItems;
+ TQValueVector< PageViewItem * > items;
+ TQValueList< PageViewItem * > visibleItems;
// view layout (columns and continuous in Settings), zoom and mouse
PageView::ZoomMode zoomMode;
float zoomFactor;
int rotation;
PageView::MouseMode mouseMode;
- QPoint mouseGrabPos;
- QPoint mousePressPos;
+ TQPoint mouseGrabPos;
+ TQPoint mousePressPos;
int mouseMidStartY;
bool mouseOnRect;
- QRect mouseSelectionRect;
- QColor selectionRectColor;
+ TQRect mouseSelectionRect;
+ TQColor selectionRectColor;
// type ahead find
bool typeAheadActive;
- QString typeAheadString;
- QTimer * findTimeoutTimer;
+ TQString typeAheadString;
+ TQTimer * findTimeoutTimer;
// viewport move
bool viewportMoveActive;
- QTime viewportMoveTime;
- QPoint viewportMoveDest;
- QTimer * viewportMoveTimer;
+ TQTime viewportMoveTime;
+ TQPoint viewportMoveDest;
+ TQTimer * viewportMoveTimer;
// auto scroll
int scrollIncrement;
- QTimer * autoScrollTimer;
+ TQTimer * autoScrollTimer;
// other stuff
- QTimer * delayResizeTimer;
+ TQTimer * delayResizeTimer;
bool dirtyLayout;
bool blockViewport; // prevents changes to viewport
bool blockPixmapsRequest; // prevent pixmap requests
@@ -101,8 +101,8 @@ public:
PageViewTip * tip;
// drag scroll
- QPoint dragScrollVector;
- QTimer dragScrollTimer;
+ TQPoint dragScrollVector;
+ TQTimer dragScrollTimer;
// actions
KToggleAction * aMouseNormal;
@@ -123,7 +123,7 @@ class PageViewTip : public QToolTip
{
public:
PageViewTip( PageView * view )
- : QToolTip( view->viewport() ), m_view( view )
+ : TQToolTip( view->viewport() ), m_view( view )
{
}
@@ -134,15 +134,15 @@ class PageViewTip : public QToolTip
protected:
- void maybeTip( const QPoint &p );
+ void maybeTip( const TQPoint &p );
private:
PageView * m_view;
};
-void PageViewTip::maybeTip( const QPoint &_p )
+void PageViewTip::maybeTip( const TQPoint &_p )
{
- QPoint p( _p.x() + m_view->contentsX(), _p.y() + m_view->contentsY() );
+ TQPoint p( _p.x() + m_view->contentsX(), _p.y() + m_view->contentsY() );
PageViewItem * pageItem = m_view->pickItemOnPoint( p.x(), p.y() );
if ( pageItem && m_view->d->mouseMode == PageView::MouseNormal )
{
@@ -155,10 +155,10 @@ void PageViewTip::maybeTip( const QPoint &_p )
{
// set tooltip over link's rect
KPDFLink *link = (KPDFLink *)object->pointer();
- QString strtip = link->linkTip();
+ TQString strtip = link->linkTip();
if ( !strtip.isEmpty() )
{
- QRect linkRect = object->geometry( pageItem->width(), pageItem->height() );
+ TQRect linkRect = object->geometry( pageItem->width(), pageItem->height() );
linkRect.moveBy( - m_view->contentsX() + pageItem->geometry().left(), - m_view->contentsY() + pageItem->geometry().top() );
tip( linkRect, strtip );
}
@@ -178,8 +178,8 @@ void PageViewTip::maybeTip( const QPoint &_p )
* other misc functions: only slotRequestVisiblePixmaps and pickItemOnPoint noticeable,
* and many insignificant stuff like this comment :-)
*/
-PageView::PageView( QWidget *parent, KPDFDocument *document )
- : QScrollView( parent, "KPDF::pageView", WStaticContents | WNoAutoErase )
+PageView::PageView( TQWidget *parent, KPDFDocument *document )
+ : TQScrollView( parent, "KPDF::pageView", WStaticContents | WNoAutoErase )
{
// create and initialize private storage structure
d = new PageViewPrivate();
@@ -215,11 +215,11 @@ PageView::PageView( QWidget *parent, KPDFDocument *document )
viewport()->setMouseTracking( true );
// conntect the padding of the viewport to pixmaps requests
- connect( this, SIGNAL(contentsMoving(int, int)), this, SLOT(slotRequestVisiblePixmaps(int, int)) );
- connect( &d->dragScrollTimer, SIGNAL(timeout()), this, SLOT(slotDragScroll()) );
+ connect( this, TQT_SIGNAL(contentsMoving(int, int)), this, TQT_SLOT(slotRequestVisiblePixmaps(int, int)) );
+ connect( &d->dragScrollTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotDragScroll()) );
// set a corner button to resize the view to the page size
-// QPushButton * resizeButton = new QPushButton( viewport() );
+// TQPushButton * resizeButton = new TQPushButton( viewport() );
// resizeButton->setPixmap( SmallIcon("crop") );
// setCornerWidget( resizeButton );
// resizeButton->setEnabled( false );
@@ -227,13 +227,13 @@ PageView::PageView( QWidget *parent, KPDFDocument *document )
setInputMethodEnabled( true );
// schedule the welcome message
- QTimer::singleShot( 0, this, SLOT( slotShowWelcome() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotShowWelcome() ) );
}
PageView::~PageView()
{
// delete all widgets
- QValueVector< PageViewItem * >::iterator dIt = d->items.begin(), dEnd = d->items.end();
+ TQValueVector< PageViewItem * >::iterator dIt = d->items.begin(), dEnd = d->items.end();
for ( ; dIt != dEnd; ++dIt )
delete *dIt;
delete d->tip;
@@ -245,63 +245,63 @@ PageView::~PageView()
void PageView::setupActions( KActionCollection * ac )
{
// Zoom actions ( higher scales takes lots of memory! )
- d->aZoom = new KSelectAction( i18n( "Zoom" ), "viewmag", 0, this, SLOT( slotZoom() ), ac, "zoom_to" );
+ d->aZoom = new KSelectAction( i18n( "Zoom" ), "viewmag", 0, 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, SLOT( slotZoomIn() ), ac, "zoom_in" );
+ KStdAction::zoomIn( this, TQT_SLOT( slotZoomIn() ), ac, "zoom_in" );
- KStdAction::zoomOut( this, SLOT( slotZoomOut() ), ac, "zoom_out" );
+ KStdAction::zoomOut( 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, SIGNAL( toggled( bool ) ), SLOT( slotFitToWidthToggled( bool ) ) );
+ connect( d->aZoomFitWidth, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotFitToWidthToggled( bool ) ) );
d->aZoomFitPage = new KToggleAction( i18n("Fit to &Page"), "view_fit_window", 0, ac, "zoom_fit_page" );
- connect( d->aZoomFitPage, SIGNAL( toggled( bool ) ), SLOT( slotFitToPageToggled( bool ) ) );
+ connect( d->aZoomFitPage, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotFitToPageToggled( bool ) ) );
d->aZoomFitText = new KToggleAction( i18n("Fit to &Text"), "viewmagfit", 0, ac, "zoom_fit_text" );
- connect( d->aZoomFitText, SIGNAL( toggled( bool ) ), SLOT( slotFitToTextToggled( bool ) ) );
+ connect( d->aZoomFitText, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotFitToTextToggled( bool ) ) );
// rotate actions
KAction *action;
action = new KAction( i18n("Rotate Right"), "rotate_cw", KShortcut( "Ctrl+Shift++" ),
- this, SLOT( slotRotateRight() ), ac, "rotate_right" );
+ this, TQT_SLOT( slotRotateRight() ), ac, "rotate_right" );
action = new KAction( i18n("Rotate Left"), "rotate_ccw", KShortcut( "Ctrl+Shift+-" ),
- this, SLOT( slotRotateLeft() ), ac, "rotate_left" );
+ this, TQT_SLOT( slotRotateLeft() ), ac, "rotate_left" );
// View-Layout actions
d->aViewTwoPages = new KToggleAction( i18n("&Two Pages"), "view_left_right", 0, ac, "view_twopages" );
- connect( d->aViewTwoPages, SIGNAL( toggled( bool ) ), SLOT( slotTwoPagesToggled( bool ) ) );
+ connect( d->aViewTwoPages, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotTwoPagesToggled( bool ) ) );
d->aViewTwoPages->setChecked( KpdfSettings::viewColumns() > 1 );
d->aViewContinuous = new KToggleAction( i18n("&Continuous"), "view_text", 0, ac, "view_continuous" );
- connect( d->aViewContinuous, SIGNAL( toggled( bool ) ), SLOT( slotContinuousToggled( bool ) ) );
+ connect( d->aViewContinuous, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotContinuousToggled( bool ) ) );
d->aViewContinuous->setChecked( KpdfSettings::viewContinuous() );
// Mouse-Mode actions
- d->aMouseNormal = new KRadioAction( i18n("&Browse Tool"), "mouse", 0, this, SLOT( slotSetMouseNormal() ), ac, "mouse_drag" );
+ d->aMouseNormal = new KRadioAction( i18n("&Browse Tool"), "mouse", 0, 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, SLOT( slotSetMouseZoom() ), ac, "mouse_zoom" );
+ KToggleAction * mz = new KRadioAction( i18n("&Zoom Tool"), "viewmag", 0, this, TQT_SLOT( slotSetMouseZoom() ), ac, "mouse_zoom" );
mz->setExclusiveGroup( "MouseType" );
- d->aMouseSelect = new KRadioAction( i18n("&Select Tool"), "frame_edit", 0, this, SLOT( slotSetMouseSelect() ), ac, "mouse_select" );
+ d->aMouseSelect = new KRadioAction( i18n("&Select Tool"), "frame_edit", 0, this, TQT_SLOT( slotSetMouseSelect() ), ac, "mouse_select" );
d->aMouseSelect->setExclusiveGroup( "MouseType" );
-/* d->aMouseEdit = new KRadioAction( i18n("Draw"), "edit", 0, this, SLOT( slotSetMouseDraw() ), ac, "mouse_draw" );
+/* d->aMouseEdit = new KRadioAction( i18n("Draw"), "edit", 0, 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, SLOT( slotScrollUp() ), ac, "view_scroll_up" );
+ KAction * su = new KAction( i18n("Scroll Up"), 0, this, TQT_SLOT( slotScrollUp() ), ac, "view_scroll_up" );
su->setShortcut( "Shift+Up" );
- KAction * sd = new KAction( i18n("Scroll Down"), 0, this, SLOT( slotScrollDown() ), ac, "view_scroll_down" );
+ KAction * sd = new KAction( i18n("Scroll Down"), 0, this, TQT_SLOT( slotScrollDown() ), ac, "view_scroll_down" );
sd->setShortcut( "Shift+Down" );
}
@@ -317,7 +317,7 @@ void PageView::fitPageWidth( int /*page*/ )
}
//BEGIN DocumentObserver inherited methods
-void PageView::notifySetup( const QValueVector< KPDFPage * > & pageSet, bool documentChanged )
+void PageView::notifySetup( const TQValueVector< KPDFPage * > & pageSet, bool documentChanged )
{
// reuse current pages if nothing new
if ( ( pageSet.count() == d->items.count() ) && !documentChanged )
@@ -331,14 +331,14 @@ void PageView::notifySetup( const QValueVector< KPDFPage * > & pageSet, bool doc
}
// delete all widgets (one for each page in pageSet)
- QValueVector< PageViewItem * >::iterator dIt = d->items.begin(), dEnd = d->items.end();
+ TQValueVector< PageViewItem * >::iterator dIt = d->items.begin(), dEnd = d->items.end();
for ( ; dIt != dEnd; ++dIt )
delete *dIt;
d->items.clear();
d->visibleItems.clear();
// create children widgets
- QValueVector< KPDFPage * >::const_iterator setIt = pageSet.begin(), setEnd = pageSet.end();
+ TQValueVector< KPDFPage * >::const_iterator setIt = pageSet.begin(), setEnd = pageSet.end();
for ( ; setIt != setEnd; ++setIt )
d->items.push_back( new PageViewItem( *setIt ) );
@@ -348,12 +348,12 @@ void PageView::notifySetup( const QValueVector< KPDFPage * > & pageSet, bool doc
// Need slotRelayoutPages() here instead of d->dirtyLayout = true
// because opening a pdf from another pdf will not trigger a viewportchange
// so pages are never relayouted
- QTimer::singleShot(0, this, SLOT(slotRelayoutPages()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotRelayoutPages()));
else
{
// update the mouse cursor when closing because we may have close through a link and
// want the cursor to come back to the normal cursor
- updateCursor( viewportToContents( mapFromGlobal( QCursor::pos() ) ) );
+ updateCursor( viewportToContents( mapFromGlobal( TQCursor::pos() ) ) );
resizeContents( 0, 0 );
}
@@ -378,7 +378,7 @@ void PageView::notifyViewportChanged( bool smoothMove )
// find PageViewItem matching the viewport description
const DocumentViewport & vp = d->document->viewport();
PageViewItem * item = 0;
- QValueVector< PageViewItem * >::iterator iIt = d->items.begin(), iEnd = d->items.end();
+ TQValueVector< PageViewItem * >::iterator iIt = d->items.begin(), iEnd = d->items.end();
for ( ; iIt != iEnd; ++iIt )
if ( (*iIt)->pageNumber() == vp.pageNumber )
{
@@ -398,7 +398,7 @@ void PageView::notifyViewportChanged( bool smoothMove )
slotRelayoutPages();
// restore viewport center or use default {x-center,v-top} alignment
- const QRect & r = item->geometry();
+ const TQRect & r = item->geometry();
int newCenterX = r.left(),
newCenterY = r.top();
if ( vp.rePos.enabled )
@@ -430,9 +430,9 @@ void PageView::notifyViewportChanged( bool smoothMove )
d->viewportMoveDest.setY( newCenterY );
if ( !d->viewportMoveTimer )
{
- d->viewportMoveTimer = new QTimer( this );
- connect( d->viewportMoveTimer, SIGNAL( timeout() ),
- this, SLOT( slotMoveViewport() ) );
+ d->viewportMoveTimer = new TQTimer( this );
+ connect( d->viewportMoveTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotMoveViewport() ) );
}
d->viewportMoveTimer->start( 25 );
verticalScrollBar()->setEnabled( false );
@@ -453,7 +453,7 @@ void PageView::notifyViewportChanged( bool smoothMove )
updateZoomText();
// since the page has moved below cursor, update it
- updateCursor( viewportToContents( mapFromGlobal( QCursor::pos() ) ) );
+ updateCursor( viewportToContents( mapFromGlobal( TQCursor::pos() ) ) );
}
void PageView::notifyPageChanged( int pageNumber, int changedFlags )
@@ -463,12 +463,12 @@ void PageView::notifyPageChanged( int pageNumber, int changedFlags )
return;
// iterate over visible items: if page(pageNumber) is one of them, repaint it
- QValueList< PageViewItem * >::iterator iIt = d->visibleItems.begin(), iEnd = d->visibleItems.end();
+ 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
- QRect expandedRect = (*iIt)->geometry();
+ TQRect expandedRect = (*iIt)->geometry();
expandedRect.addCoords( -1, -1, 3, 3 );
updateContents( expandedRect );
@@ -476,7 +476,7 @@ void PageView::notifyPageChanged( int pageNumber, int changedFlags )
if ( cursor().shape() != Qt::SizeVerCursor )
{
// since the page has been regenerated below cursor, update it
- updateCursor( viewportToContents( mapFromGlobal( QCursor::pos() ) ) );
+ updateCursor( viewportToContents( mapFromGlobal( TQCursor::pos() ) ) );
}
break;
}
@@ -492,7 +492,7 @@ void PageView::notifyContentsCleared( int changedFlags )
bool PageView::canUnloadPixmap( int pageNumber )
{
// if the item is visible, forbid unloading
- QValueList< PageViewItem * >::iterator vIt = d->visibleItems.begin(), vEnd = d->visibleItems.end();
+ TQValueList< PageViewItem * >::iterator vIt = d->visibleItems.begin(), vEnd = d->visibleItems.end();
for ( ; vIt != vEnd; ++vIt )
if ( (*vIt)->pageNumber() == pageNumber )
return false;
@@ -502,47 +502,47 @@ bool PageView::canUnloadPixmap( int pageNumber )
//END DocumentObserver inherited methods
-void PageView::showText( const QString &text, int ms )
+void PageView::showText( const TQString &text, int ms )
{
d->messageWindow->display(text, PageViewMessage::Info, ms );
}
//BEGIN widget events
-void PageView::viewportPaintEvent( QPaintEvent * pe )
+void PageView::viewportPaintEvent( TQPaintEvent * pe )
{
// create the rect into contents from the clipped screen rect
- QRect viewportRect = viewport()->rect();
- QRect contentsRect = pe->rect().intersect( viewportRect );
+ TQRect viewportRect = viewport()->rect();
+ TQRect contentsRect = pe->rect().intersect( viewportRect );
contentsRect.moveBy( contentsX(), contentsY() );
if ( !contentsRect.isValid() )
return;
// create the screen painter. a pixel painted ar contentsX,contentsY
// appears to the top-left corner of the scrollview.
- QPainter screenPainter( viewport(), true );
+ TQPainter screenPainter( viewport(), true );
screenPainter.translate( -contentsX(), -contentsY() );
// selectionRect is the normalized mouse selection rect
- QRect selectionRect = d->mouseSelectionRect;
+ TQRect selectionRect = d->mouseSelectionRect;
if ( !selectionRect.isNull() )
selectionRect = selectionRect.normalize();
// selectionRectInternal without the border
- QRect selectionRectInternal = selectionRect;
+ TQRect selectionRectInternal = selectionRect;
selectionRectInternal.addCoords( 1, 1, -1, -1 );
// color for blending
- QColor selBlendColor = (selectionRect.width() > 8 || selectionRect.height() > 8) ?
+ TQColor selBlendColor = (selectionRect.width() > 8 || selectionRect.height() > 8) ?
d->selectionRectColor : Qt::red;
// subdivide region into rects
- QMemArray<QRect> allRects = pe->region().rects();
+ TQMemArray<TQRect> allRects = pe->region().rects();
uint numRects = allRects.count();
// preprocess rects area to see if it worths or not using subdivision
uint summedArea = 0;
for ( uint i = 0; i < numRects; i++ )
{
- const QRect & r = allRects[i];
+ const TQRect & r = allRects[i];
summedArea += r.width() * r.height();
}
// very elementary check: SUMj(Region[j].area) is less than boundingRect.area
@@ -568,8 +568,8 @@ void PageView::viewportPaintEvent( QPaintEvent * pe )
if ( wantCompositing && KpdfSettings::enableCompositing() )
{
// create pixmap and open a painter over it (contents{left,top} becomes pixmap {0,0})
- QPixmap doubleBuffer( contentsRect.size() );
- QPainter pixmapPainter( &doubleBuffer );
+ TQPixmap doubleBuffer( contentsRect.size() );
+ TQPainter pixmapPainter( &doubleBuffer );
pixmapPainter.translate( -contentsRect.left(), -contentsRect.top() );
// 1) Layer 0: paint items and clear bg on unpainted rects
@@ -579,17 +579,17 @@ void PageView::viewportPaintEvent( QPaintEvent * pe )
if ( !selectionRect.isNull() && selectionRect.intersects( contentsRect ) &&
!selectionRectInternal.contains( contentsRect ) )
{
- QRect blendRect = selectionRectInternal.intersect( contentsRect );
+ TQRect blendRect = selectionRectInternal.intersect( contentsRect );
// skip rectangles covered by the selection's border
if ( blendRect.isValid() )
{
// grab current pixmap into a new one to colorize contents
- QPixmap blendedPixmap( blendRect.width(), blendRect.height() );
+ TQPixmap blendedPixmap( blendRect.width(), blendRect.height() );
copyBlt( &blendedPixmap, 0,0, &doubleBuffer,
blendRect.left() - contentsRect.left(), blendRect.top() - contentsRect.top(),
blendRect.width(), blendRect.height() );
// blend selBlendColor into the background pixmap
- QImage blendedImage = blendedPixmap.convertToImage();
+ 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 );
@@ -631,18 +631,18 @@ void PageView::viewportPaintEvent( QPaintEvent * pe )
}
}
-void PageView::viewportResizeEvent( QResizeEvent * )
+void PageView::viewportResizeEvent( TQResizeEvent * )
{
// start a timer that will refresh the pixmap after 0.5s
if ( !d->delayResizeTimer )
{
- d->delayResizeTimer = new QTimer( this );
- connect( d->delayResizeTimer, SIGNAL( timeout() ), this, SLOT( slotRelayoutPages() ) );
+ d->delayResizeTimer = new TQTimer( this );
+ connect( d->delayResizeTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotRelayoutPages() ) );
}
d->delayResizeTimer->start( 333, true );
}
-void PageView::keyPressEvent( QKeyEvent * e )
+void PageView::keyPressEvent( TQKeyEvent * e )
{
e->accept();
@@ -661,7 +661,7 @@ void PageView::keyPressEvent( QKeyEvent * 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 );
- QString status = found ? i18n("Text found: \"%1\".") : i18n("Text not found: \"%1\".");
+ TQString status = found ? i18n("Text found: \"%1\".") : i18n("Text not found: \"%1\".");
d->messageWindow->display( status.arg(d->typeAheadString.lower()),
found ? PageViewMessage::Find : PageViewMessage::Warning, 4000 );
d->findTimeoutTimer->start( 3000, true );
@@ -712,14 +712,14 @@ void PageView::keyPressEvent( QKeyEvent * e )
d->autoScrollTimer->stop();
}
// start type-adeas search
- d->typeAheadString = QString();
+ d->typeAheadString = TQString();
d->messageWindow->display( i18n("Starting -- find text as you type"), PageViewMessage::Find, 3000 );
d->typeAheadActive = true;
if ( !d->findTimeoutTimer )
{
// create the timer on demand
- d->findTimeoutTimer = new QTimer( this );
- connect( d->findTimeoutTimer, SIGNAL( timeout() ), this, SLOT( findAheadStop() ) );
+ d->findTimeoutTimer = new TQTimer( this );
+ connect( d->findTimeoutTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( findAheadStop() ) );
}
d->findTimeoutTimer->start( 3000, true );
// it is needed to grab the keyboard becase people may have Space assigned to a
@@ -786,7 +786,7 @@ void PageView::keyPressEvent( QKeyEvent * e )
break;
case Qt::Key_Escape:
selectionClear();
- d->mousePressPos = QPoint();
+ d->mousePressPos = TQPoint();
if ( d->aPrevAction )
{
d->aPrevAction->activate();
@@ -816,7 +816,7 @@ void PageView::keyPressEvent( QKeyEvent * e )
}
}
-void PageView::imEndEvent( QIMEvent * e )
+void PageView::imEndEvent( TQIMEvent * e )
{
if( d->typeAheadActive )
{
@@ -829,7 +829,7 @@ void PageView::imEndEvent( QIMEvent * e )
}
}
-void PageView::contentsMouseMoveEvent( QMouseEvent * e )
+void PageView::contentsMouseMoveEvent( TQMouseEvent * e )
{
// don't perform any mouse action when no document is shown
if ( d->items.isEmpty() )
@@ -862,7 +862,7 @@ void PageView::contentsMouseMoveEvent( QMouseEvent * e )
if ( !d->mouseGrabPos.isNull() )
{
// scroll page by position increment
- QPoint delta = d->mouseGrabPos - e->globalPos();
+ TQPoint delta = d->mouseGrabPos - e->globalPos();
scrollBy( delta.x(), delta.y() );
d->mouseGrabPos = e->globalPos();
}
@@ -876,7 +876,7 @@ void PageView::contentsMouseMoveEvent( QMouseEvent * e )
{
d->aPrevAction = d->aMouseNormal;
d->aMouseSelect->activate();
- QColor selColor = palette().active().highlight().light( 120 );
+ TQColor selColor = palette().active().highlight().light( 120 );
selectionStart( e->x() + deltaX, e->y() + deltaY, selColor, false );
selectionEndPoint( e->x(), e->y() );
break;
@@ -901,7 +901,7 @@ void PageView::contentsMouseMoveEvent( QMouseEvent * e )
}
}
-void PageView::contentsMousePressEvent( QMouseEvent * e )
+void PageView::contentsMousePressEvent( TQMouseEvent * e )
{
// don't perform any mouse action when no document is shown
if ( d->items.isEmpty() )
@@ -938,7 +938,7 @@ void PageView::contentsMousePressEvent( QMouseEvent * e )
case MouseNormal: // drag start / click / link following
if ( leftButton )
{
- d->mouseGrabPos = d->mouseOnRect ? QPoint() : d->mousePressPos;
+ d->mouseGrabPos = d->mouseOnRect ? TQPoint() : d->mousePressPos;
if ( !d->mouseOnRect )
setCursor( KCursor::sizeAllCursor() );
}
@@ -954,7 +954,7 @@ void PageView::contentsMousePressEvent( QMouseEvent * e )
case MouseSelect: // set first corner of the selection rect
if ( leftButton )
{
- QColor selColor = palette().active().highlight().light( 120 );
+ TQColor selColor = palette().active().highlight().light( 120 );
selectionStart( e->x(), e->y(), selColor, false );
}
break;
@@ -964,7 +964,7 @@ void PageView::contentsMousePressEvent( QMouseEvent * e )
}
}
-void PageView::contentsMouseReleaseEvent( QMouseEvent * e )
+void PageView::contentsMouseReleaseEvent( TQMouseEvent * e )
{
// stop the drag scrolling
d->dragScrollTimer.stop();
@@ -1044,7 +1044,7 @@ void PageView::contentsMouseReleaseEvent( QMouseEvent * e )
// if a selection rect has been defined, zoom into it
if ( leftButton && !d->mouseSelectionRect.isNull() )
{
- QRect selRect = d->mouseSelectionRect.normalize();
+ TQRect selRect = d->mouseSelectionRect.normalize();
if ( selRect.width() <= 8 && selRect.height() <= 8 )
{
selectionClear();
@@ -1087,7 +1087,7 @@ void PageView::contentsMouseReleaseEvent( QMouseEvent * e )
d->mouseSelectionRect.isNull() )
break;
- QRect selectionRect = d->mouseSelectionRect.normalize();
+ TQRect selectionRect = d->mouseSelectionRect.normalize();
if ( selectionRect.width() <= 8 && selectionRect.height() <= 8 )
{
selectionClear();
@@ -1100,12 +1100,12 @@ void PageView::contentsMouseReleaseEvent( QMouseEvent * e )
}
// grab text in selection by extracting it from all intersected pages
- QString selectedText;
- QValueVector< PageViewItem * >::iterator iIt = d->items.begin(), iEnd = d->items.end();
+ TQString selectedText;
+ TQValueVector< PageViewItem * >::iterator iIt = d->items.begin(), iEnd = d->items.end();
for ( ; iIt != iEnd; ++iIt )
{
PageViewItem * item = *iIt;
- const QRect & itemRect = item->geometry();
+ const TQRect & itemRect = item->geometry();
if ( selectionRect.intersects( itemRect ) )
{
// request the textpage if there isn't one
@@ -1113,7 +1113,7 @@ void PageView::contentsMouseReleaseEvent( QMouseEvent * e )
if ( !kpdfPage->hasSearchPage() )
d->document->requestTextPage( kpdfPage->number() );
// grab text in the rect that intersects itemRect
- QRect relativeRect = selectionRect.intersect( itemRect );
+ TQRect relativeRect = selectionRect.intersect( itemRect );
relativeRect.moveBy( -itemRect.left(), -itemRect.top() );
NormalizedRect normRect( relativeRect, item->width(), item->height() );
selectedText += kpdfPage->getText( normRect );
@@ -1139,15 +1139,15 @@ void PageView::contentsMouseReleaseEvent( QMouseEvent * e )
if ( choice > 2 )
{
// renders page into a pixmap
- QPixmap copyPix( selectionRect.width(), selectionRect.height() );
- QPainter copyPainter( &copyPix );
+ TQPixmap copyPix( selectionRect.width(), selectionRect.height() );
+ TQPainter copyPainter( &copyPix );
copyPainter.translate( -selectionRect.left(), -selectionRect.top() );
paintItems( &copyPainter, selectionRect );
if ( choice == 3 )
{
// [2] copy pixmap to clipboard
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
cb->setPixmap( copyPix, QClipboard::Clipboard );
if ( cb->supportsSelection() )
cb->setPixmap( copyPix, QClipboard::Selection );
@@ -1156,12 +1156,12 @@ void PageView::contentsMouseReleaseEvent( QMouseEvent * e )
else if ( choice == 4 )
{
// [3] save pixmap to file
- QString fileName = KFileDialog::getSaveFileName( QString::null, "image/png image/jpeg", this );
+ TQString fileName = KFileDialog::getSaveFileName( TQString::null, "image/png image/jpeg", this );
if ( fileName.isNull() )
d->messageWindow->display( i18n( "File not saved." ), PageViewMessage::Warning );
else
{
- QString type( KImageIO::type( fileName ) );
+ TQString type( KImageIO::type( fileName ) );
if ( type.isNull() )
type = "PNG";
copyPix.save( fileName, type.latin1() );
@@ -1175,7 +1175,7 @@ void PageView::contentsMouseReleaseEvent( QMouseEvent * e )
if ( choice == 1 )
{
// [1] copy text to clipboard
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
cb->setText( selectedText, QClipboard::Clipboard );
if ( cb->supportsSelection() )
cb->setText( selectedText, QClipboard::Selection );
@@ -1191,8 +1191,8 @@ void PageView::contentsMouseReleaseEvent( QMouseEvent * e )
// If KTTSD not running, start it.
if (!client->isApplicationRegistered("kttsd"))
{
- QString error;
- if (KApplication::startServiceByDesktopName("kttsd", QStringList(), &error))
+ TQString error;
+ if (KApplication::startServiceByDesktopName("kttsd", TQStringList(), &error))
{
d->messageWindow->display( i18n("Starting KTTSD Failed: %1").arg(error) );
KpdfSettings::setUseKTTSD(false);
@@ -1203,17 +1203,17 @@ void PageView::contentsMouseReleaseEvent( QMouseEvent * e )
{
// serialize the text to speech (selectedText) and the
// preferred reader ("" is the default voice) ...
- QByteArray data;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream arg( data, IO_WriteOnly );
arg << selectedText;
- arg << QString();
- QCString replyType;
- QByteArray replyData;
+ arg << TQString();
+ TQCString replyType;
+ TQByteArray replyData;
// ..and send it to KTTSD
- if (client->call( "kttsd", "KSpeech", "setText(QString,QString)", data, replyType, replyData, true ))
+ if (client->call( "kttsd", "KSpeech", "setText(TQString,TQString)", data, replyType, replyData, true ))
{
- QByteArray data2;
- QDataStream arg2(data2, IO_WriteOnly);
+ TQByteArray data2;
+ TQDataStream arg2(data2, IO_WriteOnly);
arg2 << 0;
client->send("kttsd", "KSpeech", "startText(uint)", data2 );
}
@@ -1237,10 +1237,10 @@ void PageView::contentsMouseReleaseEvent( QMouseEvent * e )
}
// reset mouse press / 'drag start' position
- d->mousePressPos = QPoint();
+ d->mousePressPos = TQPoint();
}
-void PageView::wheelEvent( QWheelEvent *e )
+void PageView::wheelEvent( TQWheelEvent *e )
{
// don't perform any mouse action when viewport is autoscrolling
if ( d->viewportMoveActive )
@@ -1248,7 +1248,7 @@ void PageView::wheelEvent( QWheelEvent *e )
if ( !d->document->isOpened() )
{
- QScrollView::wheelEvent( e );
+ TQScrollView::wheelEvent( e );
return;
}
@@ -1288,18 +1288,18 @@ void PageView::wheelEvent( QWheelEvent *e )
}
}
else
- QScrollView::wheelEvent( e );
+ TQScrollView::wheelEvent( e );
- QPoint cp = viewportToContents(e->pos());
+ TQPoint cp = viewportToContents(e->pos());
updateCursor(cp);
}
-void PageView::dragEnterEvent( QDragEnterEvent * ev )
+void PageView::dragEnterEvent( TQDragEnterEvent * ev )
{
ev->accept();
}
-void PageView::dropEvent( QDropEvent * ev )
+void PageView::dropEvent( TQDropEvent * ev )
{
KURL::List lst;
if ( KURLDrag::decode( ev, lst ) )
@@ -1307,19 +1307,19 @@ void PageView::dropEvent( QDropEvent * ev )
}
//END widget events
-void PageView::paintItems( QPainter * p, const QRect & contentsRect )
+void PageView::paintItems( TQPainter * p, const TQRect & contentsRect )
{
// when checking if an Item is contained in contentsRect, instead of
// growing PageViewItems rects (for keeping outline into account), we
// grow the contentsRect
- QRect checkRect = contentsRect;
+ TQRect checkRect = contentsRect;
checkRect.addCoords( -3, -3, 1, 1 );
// create a region from wich we'll subtract painted rects
- QRegion remainingArea( contentsRect );
+ TQRegion remainingArea( contentsRect );
- //QValueVector< PageViewItem * >::iterator iIt = d->visibleItems.begin(), iEnd = d->visibleItems.end();
- QValueVector< PageViewItem * >::iterator iIt = d->items.begin(), iEnd = d->items.end();
+ //TQValueVector< PageViewItem * >::iterator iIt = d->visibleItems.begin(), iEnd = d->visibleItems.end();
+ TQValueVector< PageViewItem * >::iterator iIt = d->items.begin(), iEnd = d->items.end();
for ( ; iIt != iEnd; ++iIt )
{
// check if a piece of the page intersects the contents rect
@@ -1327,14 +1327,14 @@ void PageView::paintItems( QPainter * p, const QRect & contentsRect )
continue;
PageViewItem * item = *iIt;
- QRect pixmapGeometry = item->geometry();
+ TQRect pixmapGeometry = item->geometry();
// 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
- QRect outlineGeometry = pixmapGeometry;
+ TQRect outlineGeometry = pixmapGeometry;
outlineGeometry.addCoords( -1, -1, 3, 3 );
// draw the page outline (little black border and 2px shadow)
@@ -1352,7 +1352,7 @@ void PageView::paintItems( QPainter * p, const QRect & contentsRect )
b = Qt::gray.blue() / (levels + 2);
for ( int i = 0; i < levels; i++ )
{
- p->setPen( QColor( r * (i+2), g * (i+2), b * (i+2) ) );
+ 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 );
@@ -1364,7 +1364,7 @@ void PageView::paintItems( QPainter * p, const QRect & contentsRect )
// draw the pixmap (note: this modifies the painter)
if ( contentsRect.intersects( pixmapGeometry ) )
{
- QRect pixmapRect = contentsRect.intersect( pixmapGeometry );
+ TQRect pixmapRect = contentsRect.intersect( pixmapGeometry );
pixmapRect.moveBy( -pixmapGeometry.left(), -pixmapGeometry.top() );
int flags = PagePainter::Accessibility | PagePainter::EnhanceLinks |
PagePainter::EnhanceImages | PagePainter::Highlights;
@@ -1378,7 +1378,7 @@ void PageView::paintItems( QPainter * p, const QRect & contentsRect )
}
// paint with background color the unpainted area
- QMemArray<QRect> backRects = remainingArea.rects();
+ TQMemArray<TQRect> backRects = remainingArea.rects();
uint backRectsNumber = backRects.count();
for ( uint jr = 0; jr < backRectsNumber; jr++ )
p->fillRect( backRects[ jr ], Qt::gray );
@@ -1420,11 +1420,11 @@ void PageView::updateItemSize( PageViewItem * item, int colWidth, int rowHeight
PageViewItem * PageView::pickItemOnPoint( int x, int y )
{
PageViewItem * item = 0;
- QValueList< PageViewItem * >::iterator iIt = d->visibleItems.begin(), iEnd = d->visibleItems.end();
+ TQValueList< PageViewItem * >::iterator iIt = d->visibleItems.begin(), iEnd = d->visibleItems.end();
for ( ; iIt != iEnd; ++iIt )
{
PageViewItem * i = *iIt;
- const QRect & r = i->geometry();
+ const TQRect & r = i->geometry();
if ( x < r.right() && x > r.left() && y < r.bottom() )
{
if ( y > r.top() )
@@ -1435,7 +1435,7 @@ PageViewItem * PageView::pickItemOnPoint( int x, int y )
return item;
}
-void PageView::selectionStart( int x, int y, const QColor & color, bool /*aboveAll*/ )
+void PageView::selectionStart( int x, int y, const TQColor & color, bool /*aboveAll*/ )
{
d->mouseSelectionRect.setRect( x, y, 1, 1 );
d->selectionRectColor = color;
@@ -1457,35 +1457,35 @@ void PageView::selectionEndPoint( int x, int y )
else if (contentsY() + viewport()->height() < y) d->dragScrollVector.setY(y - contentsY() - viewport()->height());
else d->dragScrollVector.setY(0);
- if (d->dragScrollVector != QPoint(0, 0))
+ if (d->dragScrollVector != TQPoint(0, 0))
{
if (!d->dragScrollTimer.isActive()) d->dragScrollTimer.start(100);
}
else d->dragScrollTimer.stop();
// clip selection to the viewport
- QRect viewportRect( contentsX(), contentsY(), visibleWidth(), visibleHeight() );
+ TQRect viewportRect( contentsX(), contentsY(), visibleWidth(), visibleHeight() );
x = QMAX( QMIN( x, viewportRect.right() ), viewportRect.left() );
y = QMAX( QMIN( y, viewportRect.bottom() ), viewportRect.top() );
// if selection changed update rect
if ( d->mouseSelectionRect.right() != x || d->mouseSelectionRect.bottom() != y )
{
// send incremental paint events
- QRect oldRect = d->mouseSelectionRect.normalize();
+ TQRect oldRect = d->mouseSelectionRect.normalize();
d->mouseSelectionRect.setRight( x );
d->mouseSelectionRect.setBottom( y );
- QRect newRect = d->mouseSelectionRect.normalize();
+ TQRect newRect = d->mouseSelectionRect.normalize();
// generate diff region: [ OLD.unite(NEW) - OLD.intersect(NEW) ]
- QRegion compoundRegion = QRegion( oldRect ).unite( newRect );
+ TQRegion compoundRegion = TQRegion( oldRect ).unite( newRect );
if ( oldRect.intersects( newRect ) )
{
- QRect intersection = oldRect.intersect( newRect );
+ TQRect intersection = oldRect.intersect( newRect );
intersection.addCoords( 1, 1, -1, -1 );
if ( intersection.width() > 20 && intersection.height() > 20 )
compoundRegion -= intersection;
}
// tassellate region with rects and enqueue paint events
- QMemArray<QRect> rects = compoundRegion.rects();
+ TQMemArray<TQRect> rects = compoundRegion.rects();
for ( uint i = 0; i < rects.count(); i++ )
updateContents( rects[i] );
}
@@ -1512,7 +1512,7 @@ void PageView::updateZoom( ZoomMode newZoomMode )
switch ( newZoomMode )
{
case ZoomFixed:{ //ZoomFixed case
- QString z = d->aZoom->currentText();
+ TQString z = d->aZoom->currentText();
newFactor = KGlobal::locale()->readNumber( z.remove( z.find( '%' ), 1 ) ) / 100.0;
}break;
case ZoomIn:
@@ -1577,11 +1577,11 @@ void PageView::updateZoomText()
d->aZoom->clear();
// add items that describe fit actions
- QStringList translated;
+ TQStringList translated;
translated << i18n("Fit Width") << i18n("Fit Page"); // << i18n("Fit Text");
// add percent items
- QString double_oh( "00" );
+ TQString double_oh( "00" );
const float zoomValue[10] = { 0.125, 0.25, 0.333, 0.5, 0.667, 0.75, 1, 1.25, 1.50, 2 };
int idx = 0,
selIdx = 2; // use 3 if "fit text" present
@@ -1597,9 +1597,9 @@ void PageView::updateZoomText()
inserted = true;
if ( !inserted )
selIdx++;
- QString localValue( KGlobal::locale()->formatNumber( value * 100.0, 2 ) );
+ TQString localValue( KGlobal::locale()->formatNumber( value * 100.0, 2 ) );
localValue.remove( KGlobal::locale()->decimalSymbol() + double_oh );
- translated << QString( "%1%" ).arg( localValue );
+ translated << TQString( "%1%" ).arg( localValue );
}
d->aZoom->setItems( translated );
@@ -1613,7 +1613,7 @@ void PageView::updateZoomText()
d->aZoom->setCurrentItem( selIdx );
}
-void PageView::updateCursor( const QPoint &p )
+void PageView::updateCursor( const TQPoint &p )
{
// detect the underlaying page (if present)
PageViewItem * pageItem = pickItemOnPoint( p.x(), p.y() );
@@ -1642,7 +1642,7 @@ void PageView::doTypeAheadSearch()
{
bool found = d->document->searchText( PAGEVIEW_SEARCH_ID, d->typeAheadString, false, false,
KPDFDocument::NextMatch, true, qRgb( 128, 255, 128 ), true );
- QString status = found ? i18n("Text found: \"%1\".") : i18n("Text not found: \"%1\".");
+ TQString status = found ? i18n("Text found: \"%1\".") : i18n("Text not found: \"%1\".");
d->messageWindow->display( status.arg(d->typeAheadString.lower()),
found ? PageViewMessage::Find : PageViewMessage::Warning, 4000 );
d->findTimeoutTimer->start( 3000, true );
@@ -1670,12 +1670,12 @@ void PageView::slotRelayoutPages()
}
// common iterator used in this method and viewport parameters
- QValueVector< PageViewItem * >::iterator iIt, iEnd = d->items.end();
+ TQValueVector< PageViewItem * >::iterator iIt, iEnd = d->items.end();
int viewportWidth = visibleWidth(),
viewportHeight = visibleHeight(),
fullWidth = 0,
fullHeight = 0;
- QRect viewportRect( contentsX(), contentsY(), viewportWidth, viewportHeight );
+ TQRect viewportRect( contentsX(), contentsY(), viewportWidth, viewportHeight );
// set all items geometry and resize contents. handle 'continuous' and 'single' modes separately
if ( KpdfSettings::viewContinuous() )
@@ -1816,7 +1816,7 @@ void PageView::slotRelayoutPages()
{
int prevX = contentsX(),
prevY = contentsY();
- const QRect & geometry = d->items[ vp.pageNumber ]->geometry();
+ const TQRect & geometry = d->items[ vp.pageNumber ]->geometry();
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() ),
@@ -1846,7 +1846,7 @@ void PageView::slotRequestVisiblePixmaps( int newLeft, int newTop )
// precalc view limits for intersecting with page coords inside the lOOp
bool isEvent = newLeft != -1 && newTop != -1 && !d->blockViewport;
- QRect viewportRect( isEvent ? newLeft : contentsX(),
+ TQRect viewportRect( isEvent ? newLeft : contentsX(),
isEvent ? newTop : contentsY(),
visibleWidth(), visibleHeight() );
@@ -1860,8 +1860,8 @@ void PageView::slotRequestVisiblePixmaps( int newLeft, int newTop )
// iterate over all items
d->visibleItems.clear();
- QValueList< PixmapRequest * > requestedPixmaps;
- QValueVector< PageViewItem * >::iterator iIt = d->items.begin(), iEnd = d->items.end();
+ TQValueList< PixmapRequest * > requestedPixmaps;
+ TQValueVector< PageViewItem * >::iterator iIt = d->items.begin(), iEnd = d->items.end();
for ( ; iIt != iEnd; ++iIt )
{
PageViewItem * i = *iIt;
@@ -1885,7 +1885,7 @@ void PageView::slotRequestVisiblePixmaps( int newLeft, int newTop )
// position between the item and the viewport center
if ( isEvent )
{
- const QRect & geometry = i->geometry();
+ const TQRect & geometry = i->geometry();
// compute distance between item center and viewport center
double distance = hypot( (geometry.left() + geometry.right()) / 2 - viewportCenterX,
(geometry.top() + geometry.bottom()) / 2 - viewportCenterY );
@@ -1980,8 +1980,8 @@ void PageView::slotAutoScoll()
// the first time create the timer
if ( !d->autoScrollTimer )
{
- d->autoScrollTimer = new QTimer( this );
- connect( d->autoScrollTimer, SIGNAL( timeout() ), this, SLOT( slotAutoScoll() ) );
+ d->autoScrollTimer = new TQTimer( this );
+ connect( d->autoScrollTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAutoScoll() ) );
}
// if scrollIncrement is zero, stop the timer
@@ -2002,7 +2002,7 @@ void PageView::slotAutoScoll()
void PageView::slotDragScroll()
{
scrollBy(d->dragScrollVector.x(), d->dragScrollVector.y());
- QPoint p = viewportToContents( mapFromGlobal( QCursor::pos() ) );
+ TQPoint p = viewportToContents( mapFromGlobal( TQCursor::pos() ) );
selectionEndPoint( p.x(), p.y() );
}
@@ -2058,7 +2058,7 @@ void PageView::slotRotateRight()
{
d->rotation = ( d->rotation + 90 ) % 360;
- QValueVector< PageViewItem * >::iterator iIt = d->items.begin(), iEnd = d->items.end();
+ TQValueVector< PageViewItem * >::iterator iIt = d->items.begin(), iEnd = d->items.end();
for ( ; iIt != iEnd; ++iIt )
{
int r = const_cast<KPDFPage*>((*iIt)->page())->rotation();
@@ -2081,7 +2081,7 @@ void PageView::slotRotateLeft()
d->rotation -= 90;
if ( d->rotation < 0 ) d->rotation += 360;
- QValueVector< PageViewItem * >::iterator iIt = d->items.begin(), iEnd = d->items.end();
+ TQValueVector< PageViewItem * >::iterator iIt = d->items.begin(), iEnd = d->items.end();
for ( ; iIt != iEnd; ++iIt )
{
int r = const_cast<KPDFPage*>((*iIt)->page())->rotation();
diff --git a/kpdf/ui/pageview.h b/kpdf/ui/pageview.h
index be082bd4..3742e804 100644
--- a/kpdf/ui/pageview.h
+++ b/kpdf/ui/pageview.h
@@ -19,8 +19,8 @@
#ifndef _KPDF_PAGEVIEW_H_
#define _KPDF_PAGEVIEW_H_
-#include <qscrollview.h>
-#include <qvaluevector.h>
+#include <tqscrollview.h>
+#include <tqvaluevector.h>
#include "core/observer.h"
class KURL;
@@ -36,14 +36,14 @@ class PageViewTip;
* @short display of course :-)
* ...
*/
-class PageView : public QScrollView, public DocumentObserver
+class PageView : public TQScrollView, public DocumentObserver
{
Q_OBJECT
friend class PageViewTip;
public:
- PageView( QWidget *parent, KPDFDocument *document );
+ PageView( TQWidget *parent, KPDFDocument *document );
~PageView();
// Zoom mode ( last 4 are internally used only! )
@@ -60,44 +60,44 @@ class PageView : public QScrollView, public DocumentObserver
// inherited from DocumentObserver
uint observerId() const { return PAGEVIEW_ID; }
- void notifySetup( const QValueVector< KPDFPage * > & pages, bool documentChanged );
+ void notifySetup( const TQValueVector< KPDFPage * > & pages, bool documentChanged );
void notifyViewportChanged( bool smoothMove );
void notifyPageChanged( int pageNumber, int changedFlags );
void notifyContentsCleared( int changedFlags );
bool canUnloadPixmap( int pageNum );
- void showText( const QString &text, int ms );
+ void showText( const TQString &text, int ms );
signals:
void urlDropped( const KURL& );
- void rightClick( const KPDFPage *, const QPoint & );
+ void rightClick( const KPDFPage *, const TQPoint & );
protected:
// main draw loop, draws pageViews on viewport
- void viewportPaintEvent( QPaintEvent * pe );
- void viewportResizeEvent( QResizeEvent* );
+ void viewportPaintEvent( TQPaintEvent * pe );
+ void viewportResizeEvent( TQResizeEvent* );
// mouse / keyboard events
- void keyPressEvent( QKeyEvent* );
- void imEndEvent( QIMEvent * );
- void contentsMouseMoveEvent( QMouseEvent* );
- void contentsMousePressEvent( QMouseEvent* );
- void contentsMouseReleaseEvent( QMouseEvent* );
- void wheelEvent( QWheelEvent* );
+ void keyPressEvent( TQKeyEvent* );
+ void imEndEvent( TQIMEvent * );
+ void contentsMouseMoveEvent( TQMouseEvent* );
+ void contentsMousePressEvent( TQMouseEvent* );
+ void contentsMouseReleaseEvent( TQMouseEvent* );
+ void wheelEvent( TQWheelEvent* );
// drag and drop related events
- void dragEnterEvent( QDragEnterEvent* );
- void dropEvent( QDropEvent* );
+ void dragEnterEvent( TQDragEnterEvent* );
+ void dropEvent( TQDropEvent* );
private:
// draw items on the opened qpainter
- void paintItems( QPainter * p, const QRect & clipRect );
+ void paintItems( TQPainter * p, const TQRect & clipRect );
// update item width and height using current zoom parameters
void updateItemSize( PageViewItem * item, int columnWidth, int rowHeight );
// return the widget placed on a certain point or 0 if clicking on empty space
PageViewItem * pickItemOnPoint( int x, int y );
// start / modify / clear selection rectangle
- void selectionStart( int x, int y, const QColor & color, bool aboveAll = false );
+ 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();
@@ -105,7 +105,7 @@ class PageView : public QScrollView, public DocumentObserver
// update the text on the label using global zoom value or current page's one
void updateZoomText();
// updates cursor
- void updateCursor( const QPoint &p );
+ void updateCursor( const TQPoint &p );
// does the type ahead search
void doTypeAheadSearch();
@@ -113,7 +113,7 @@ class PageView : public QScrollView, public DocumentObserver
class PageViewPrivate * d;
private slots:
- // activated either directly or via QTimer on the viewportResizeEvent
+ // activated either directly or via TQTimer on the viewportResizeEvent
void slotRelayoutPages();
// activated either directly or via the contentsMoving(int,int) signal
void slotRequestVisiblePixmaps( int left = -1, int top = -1 );
diff --git a/kpdf/ui/pageviewutils.cpp b/kpdf/ui/pageviewutils.cpp
index b9d84137..eaf5fc95 100644
--- a/kpdf/ui/pageviewutils.cpp
+++ b/kpdf/ui/pageviewutils.cpp
@@ -8,10 +8,10 @@
***************************************************************************/
// qt/kde includes
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qtimer.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kimageeffect.h>
#include <kiconloader.h>
@@ -21,20 +21,20 @@
#include "core/page.h"
#include "conf/settings.h"
-PageViewMessage::PageViewMessage( QWidget * parent )
- : QWidget( parent, "pageViewMessage" ), m_timer( 0 )
+PageViewMessage::PageViewMessage( TQWidget * parent )
+ : TQWidget( parent, "pageViewMessage" ), m_timer( 0 )
{
setFocusPolicy( NoFocus );
setBackgroundMode( NoBackground );
- setPaletteBackgroundColor(kapp->palette().color(QPalette::Active, QColorGroup::Background));
+ setPaletteBackgroundColor(kapp->palette().color(TQPalette::Active, TQColorGroup::Background));
// if the layout is LtR, we can safely place it in the right position
- if ( !QApplication::reverseLayout() )
+ if ( !TQApplication::reverseLayout() )
move( 10, 10 );
resize( 0, 0 );
hide();
}
-void PageViewMessage::display( const QString & message, Icon icon, int durationMs )
+void PageViewMessage::display( const TQString & message, Icon icon, int durationMs )
// give to Caesar what Caesar owns: code taken from Amarok's osd.h/.cpp
// "redde (reddite, pl.) cesari quae sunt cesaris", just btw. ;)
{
@@ -45,7 +45,7 @@ void PageViewMessage::display( const QString & message, Icon icon, int durationM
}
// determine text rectangle
- QRect textRect = fontMetrics().boundingRect( message );
+ TQRect textRect = fontMetrics().boundingRect( message );
textRect.moveBy( -textRect.left(), -textRect.top() );
textRect.addCoords( 0, 0, 2, 2 );
int width = textRect.width(),
@@ -55,7 +55,7 @@ void PageViewMessage::display( const QString & message, Icon icon, int durationM
shadowOffset = 1;
// load icon (if set) and update geometry
- QPixmap symbol;
+ TQPixmap symbol;
if ( icon != None )
{
switch ( icon )
@@ -73,7 +73,7 @@ void PageViewMessage::display( const QString & message, Icon icon, int durationM
symbol = SmallIcon( "messagebox_info" );
break;
}
- if ( QApplication::reverseLayout() )
+ if ( TQApplication::reverseLayout() )
{
iconXOffset = 2 + textRect.width();
}
@@ -84,23 +84,23 @@ void PageViewMessage::display( const QString & message, Icon icon, int durationM
width += 2 + symbol.width();
height = QMAX( height, symbol.height() );
}
- QRect geometry( 0, 0, width + 10, height + 8 );
+ TQRect geometry( 0, 0, width + 10, height + 8 );
// resize pixmap, mask and widget
- static QBitmap mask;
+ static TQBitmap mask;
mask.resize( geometry.size() );
m_pixmap.resize( geometry.size() );
resize( geometry.size() );
// create and set transparency mask
- QPainter maskPainter( &mask);
+ TQPainter maskPainter( &mask);
mask.fill( Qt::black );
maskPainter.setBrush( Qt::white );
maskPainter.drawRoundRect( geometry, 1600 / geometry.width(), 1600 / geometry.height() );
setMask( mask );
// draw background
- QPainter bufferPainter( &m_pixmap );
+ TQPainter bufferPainter( &m_pixmap );
bufferPainter.setPen( Qt::black );
bufferPainter.setBrush( paletteBackgroundColor() );
bufferPainter.drawRoundRect( geometry, 1600 / geometry.width(), 1600 / geometry.height() );
@@ -118,7 +118,7 @@ void PageViewMessage::display( const QString & message, Icon icon, int durationM
// if the layout is RtL, we can move it to the right place only after we
// know how much size it will take
- if ( QApplication::reverseLayout() )
+ if ( TQApplication::reverseLayout() )
move( parentWidget()->width() - geometry.width() - 10, 10 );
// show widget and schedule a repaint
@@ -130,21 +130,21 @@ void PageViewMessage::display( const QString & message, Icon icon, int durationM
{
if ( !m_timer )
{
- m_timer = new QTimer( this );
- connect( m_timer, SIGNAL( timeout() ), SLOT( hide() ) );
+ m_timer = new TQTimer( this );
+ connect( m_timer, TQT_SIGNAL( timeout() ), TQT_SLOT( hide() ) );
}
m_timer->start( durationMs, true );
} else if ( m_timer )
m_timer->stop();
}
-void PageViewMessage::paintEvent( QPaintEvent * e )
+void PageViewMessage::paintEvent( TQPaintEvent * e )
{
- QPainter p( this );
+ TQPainter p( this );
p.drawPixmap( e->rect().topLeft(), m_pixmap, e->rect() );
}
-void PageViewMessage::mousePressEvent( QMouseEvent * /*e*/ )
+void PageViewMessage::mousePressEvent( TQMouseEvent * /*e*/ )
{
if ( m_timer )
m_timer->stop();
@@ -168,7 +168,7 @@ int PageViewItem::pageNumber() const
return m_page->number();
}
-const QRect& PageViewItem::geometry() const
+const TQRect& PageViewItem::geometry() const
{
return m_geometry;
}
diff --git a/kpdf/ui/pageviewutils.h b/kpdf/ui/pageviewutils.h
index bde9b8d3..d1e5cecf 100644
--- a/kpdf/ui/pageviewutils.h
+++ b/kpdf/ui/pageviewutils.h
@@ -10,12 +10,12 @@
#ifndef _PAGEVIEW_UTILS_H
#define _PAGEVIEW_UTILS_H
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qrect.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqrect.h>
-class QTimer;
+class TQTimer;
class PageView;
class KPDFPage;
@@ -33,7 +33,7 @@ class PageViewItem
const KPDFPage * page() const;
int pageNumber() const;
- const QRect& geometry() const;
+ const TQRect& geometry() const;
int width() const;
int height() const;
double zoomFactor() const;
@@ -45,7 +45,7 @@ class PageViewItem
private:
const KPDFPage * m_page;
double m_zoomFactor;
- QRect m_geometry;
+ TQRect m_geometry;
};
@@ -55,18 +55,18 @@ class PageViewItem
class PageViewMessage : public QWidget
{
public:
- PageViewMessage( QWidget * parent );
+ PageViewMessage( TQWidget * parent );
enum Icon { None, Info, Warning, Error, Find };
- void display( const QString & message, Icon icon = Info, int durationMs = 4000 );
+ void display( const TQString & message, Icon icon = Info, int durationMs = 4000 );
protected:
- void paintEvent( QPaintEvent * e );
- void mousePressEvent( QMouseEvent * e );
+ void paintEvent( TQPaintEvent * e );
+ void mousePressEvent( TQMouseEvent * e );
private:
- QPixmap m_pixmap;
- QTimer * m_timer;
+ TQPixmap m_pixmap;
+ TQTimer * m_timer;
};
#endif
diff --git a/kpdf/ui/presentationwidget.cpp b/kpdf/ui/presentationwidget.cpp
index c57e2f95..450f25df 100644
--- a/kpdf/ui/presentationwidget.cpp
+++ b/kpdf/ui/presentationwidget.cpp
@@ -8,12 +8,12 @@
***************************************************************************/
// qt/kde includes
-#include <qtimer.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qapplication.h>
-#include <qdesktopwidget.h>
-#include <qtooltip.h>
+#include <tqtimer.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
+#include <tqdesktopwidget.h>
+#include <tqtooltip.h>
#include <kaccel.h>
#include <kactioncollection.h>
#include <kapplication.h>
@@ -48,12 +48,12 @@
struct PresentationFrame
{
const KPDFPage * page;
- QRect geometry;
+ TQRect geometry;
};
-PresentationWidget::PresentationWidget( QWidget * parent, KPDFDocument * doc )
- : QDialog( parent, "presentationWidget", true, WDestructiveClose | WStyle_NoBorder),
+PresentationWidget::PresentationWidget( TQWidget * parent, KPDFDocument * doc )
+ : TQDialog( parent, "presentationWidget", true, WDestructiveClose | WStyle_NoBorder),
m_pressedLink( 0 ), m_handCursor( false ), m_document( doc ), m_frameIndex( -1 )
{
// set look and geometry
@@ -68,12 +68,12 @@ PresentationWidget::PresentationWidget( QWidget * parent, KPDFDocument * doc )
// misc stuff
setMouseTracking( true );
- m_transitionTimer = new QTimer( this );
- connect( m_transitionTimer, SIGNAL( timeout() ), this, SLOT( slotTransitionStep() ) );
- m_overlayHideTimer = new QTimer( this );
- connect( m_overlayHideTimer, SIGNAL( timeout() ), this, SLOT( slotHideOverlay() ) );
- m_nextPageTimer = new QTimer( this );
- connect( m_nextPageTimer, SIGNAL( timeout() ), this, SLOT( slotNextPage() ) );
+ m_transitionTimer = new TQTimer( this );
+ connect( m_transitionTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotTransitionStep() ) );
+ m_overlayHideTimer = new TQTimer( this );
+ connect( m_overlayHideTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotHideOverlay() ) );
+ m_nextPageTimer = new TQTimer( this );
+ connect( m_nextPageTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotNextPage() ) );
// handle cursor appearance as specified in configuration
if ( KpdfSettings::slidesCursor() == KpdfSettings::EnumSlidesCursor::HiddenDelay )
@@ -93,24 +93,24 @@ PresentationWidget::~PresentationWidget()
m_document->removeObserver( this );
// delete frames
- QValueVector< PresentationFrame * >::iterator fIt = m_frames.begin(), fEnd = m_frames.end();
+ TQValueVector< PresentationFrame * >::iterator fIt = m_frames.begin(), fEnd = m_frames.end();
for ( ; fIt != fEnd; ++fIt )
delete *fIt;
}
void PresentationWidget::setupActions( KActionCollection * ac )
{
- m_accel->insert( "previous_page", ac->action( "previous_page" )->shortcut(), this, SLOT( slotPrevPage() ), false, true );
- m_accel->insert( "next_page", ac->action( "next_page" )->shortcut(), this, SLOT( slotNextPage() ), false, true );
- m_accel->insert( "first_page", ac->action( "first_page" )->shortcut(), this, SLOT( slotFirstPage() ), false, true );
- m_accel->insert( "last_page", ac->action( "last_page" )->shortcut(), this, SLOT( slotLastPage() ), false, true );
- m_accel->insert( "presentation", ac->action( "presentation" )->shortcut(), this, SLOT( close() ), false, true );
+ 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 );
}
-void PresentationWidget::notifySetup( const QValueVector< KPDFPage * > & pageSet, bool /*documentChanged*/ )
+void PresentationWidget::notifySetup( const TQValueVector< KPDFPage * > & pageSet, bool /*documentChanged*/ )
{
// delete previous frames (if any (shouldn't be))
- QValueVector< PresentationFrame * >::iterator fIt = m_frames.begin(), fEnd = m_frames.end();
+ TQValueVector< PresentationFrame * >::iterator fIt = m_frames.begin(), fEnd = m_frames.end();
for ( ; fIt != fEnd; ++fIt )
delete *fIt;
if ( !m_frames.isEmpty() )
@@ -118,7 +118,7 @@ void PresentationWidget::notifySetup( const QValueVector< KPDFPage * > & pageSet
m_frames.clear();
// create the new frames
- QValueVector< KPDFPage * >::const_iterator setIt = pageSet.begin(), setEnd = pageSet.end();
+ TQValueVector< KPDFPage * >::const_iterator setIt = pageSet.begin(), setEnd = pageSet.end();
float screenRatio = (float)m_height / (float)m_width;
for ( ; setIt != setEnd; ++setIt )
{
@@ -183,15 +183,15 @@ bool PresentationWidget::canUnloadPixmap( int pageNumber )
// <widget events>
/* This hack was here to fix 103718 but it's no longer necessary on KDE 3.5 and Lubos asked me to remove it
-bool PresentationWidget::event ( QEvent * e )
+bool PresentationWidget::event ( TQEvent * e )
{
- if (e -> type() == QEvent::WindowDeactivate) KWin::clearState(winId(), NET::StaysOnTop);
- else if (e -> type() == QEvent::WindowActivate) KWin::setState(winId(), NET::StaysOnTop);
- return QDialog::event(e);
+ if (e -> type() == TQEvent::WindowDeactivate) KWin::clearState(winId(), NET::StaysOnTop);
+ else if (e -> type() == TQEvent::WindowActivate) KWin::setState(winId(), NET::StaysOnTop);
+ return TQDialog::event(e);
}
*/
-void PresentationWidget::keyPressEvent( QKeyEvent * e )
+void PresentationWidget::keyPressEvent( TQKeyEvent * e )
{
if (m_width == -1) return;
@@ -212,7 +212,7 @@ void PresentationWidget::keyPressEvent( QKeyEvent * e )
}
}
-void PresentationWidget::wheelEvent( QWheelEvent * e )
+void PresentationWidget::wheelEvent( TQWheelEvent * e )
{
// performance note: don't remove the clipping
int div = e->delta() / 120;
@@ -232,7 +232,7 @@ void PresentationWidget::wheelEvent( QWheelEvent * e )
}
}
-void PresentationWidget::mousePressEvent( QMouseEvent * e )
+void PresentationWidget::mousePressEvent( TQMouseEvent * e )
{
// pressing left button
if ( e->button() == Qt::LeftButton )
@@ -256,7 +256,7 @@ void PresentationWidget::mousePressEvent( QMouseEvent * e )
slotPrevPage();
}
-void PresentationWidget::mouseReleaseEvent( QMouseEvent * e )
+void PresentationWidget::mouseReleaseEvent( TQMouseEvent * e )
{
// if releasing on the same link we pressed over, execute it
if ( m_pressedLink && e->button() == Qt::LeftButton )
@@ -268,7 +268,7 @@ void PresentationWidget::mouseReleaseEvent( QMouseEvent * e )
}
}
-void PresentationWidget::mouseMoveEvent( QMouseEvent * e )
+void PresentationWidget::mouseMoveEvent( TQMouseEvent * e )
{
// safety check
if ( m_width == -1 )
@@ -295,11 +295,11 @@ void PresentationWidget::mouseMoveEvent( QMouseEvent * e )
}
}
-void PresentationWidget::paintEvent( QPaintEvent * pe )
+void PresentationWidget::paintEvent( TQPaintEvent * pe )
{
if (m_width == -1)
{
- QRect d = KGlobalSettings::desktopGeometry(this);
+ TQRect d = KGlobalSettings::desktopGeometry(this);
m_width = d.width();
m_height = d.height();
@@ -307,16 +307,16 @@ void PresentationWidget::paintEvent( QPaintEvent * pe )
m_topBar = new KToolBar( this, "presentationBar" );
m_topBar->setIconSize( 32 );
m_topBar->setMovingEnabled( false );
- m_topBar->insertButton( QApplication::reverseLayout() ? "1rightarrow" : "1leftarrow", 2, SIGNAL( clicked() ), this, SLOT( slotPrevPage() ) );
- m_topBar->insertButton( QApplication::reverseLayout() ? "1leftarrow" : "1rightarrow", 3, SIGNAL( clicked() ), this, SLOT( slotNextPage() ) );
- m_topBar->insertButton( "exit", 1, SIGNAL( clicked() ), this, SLOT( close() ) );
+ 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->setGeometry( 0, 0, m_width, 32 + 10 );
m_topBar->alignItemRight( 1 );
m_topBar->hide();
// change topbar background color
- QPalette p = m_topBar->palette();
- p.setColor( QPalette::Active, QColorGroup::Button, Qt::gray );
- p.setColor( QPalette::Active, QColorGroup::Background, Qt::darkGray );
+ TQPalette p = m_topBar->palette();
+ p.setColor( TQPalette::Active, TQColorGroup::Button, Qt::gray );
+ p.setColor( TQPalette::Active, TQColorGroup::Background, Qt::darkGray );
m_topBar->setPalette( p );
// register this observer in document. events will come immediately
@@ -326,34 +326,34 @@ void PresentationWidget::paintEvent( QPaintEvent * 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)"), QString::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::null, "presentationInfo");
}
// check painting rect consistancy
- QRect r = pe->rect().intersect( geometry() );
+ TQRect r = pe->rect().intersect( geometry() );
if ( r.isNull() || m_lastRenderedPixmap.isNull() )
return;
// blit the pixmap to the screen
- QMemArray<QRect> allRects = pe->region().rects();
+ TQMemArray<TQRect> allRects = pe->region().rects();
uint numRects = allRects.count();
for ( uint i = 0; i < numRects; i++ )
{
- const QRect & r = allRects[i];
+ const TQRect & r = allRects[i];
if ( !r.isValid() )
continue;
#ifdef ENABLE_PROGRESS_OVERLAY
if ( KpdfSettings::slidesShowProgress() && r.intersects( m_overlayGeometry ) )
{
// backbuffer the overlay operation
- QPixmap backPixmap( r.size() );
- QPainter pixPainter( &backPixmap );
+ TQPixmap backPixmap( r.size() );
+ TQPainter pixPainter( &backPixmap );
// first draw the background on the backbuffer
- pixPainter.drawPixmap( QPoint(0,0), m_lastRenderedPixmap, r );
+ pixPainter.drawPixmap( TQPoint(0,0), m_lastRenderedPixmap, r );
// then blend the overlay (a piece of) over the background
- QRect ovr = m_overlayGeometry.intersect( r );
+ TQRect ovr = m_overlayGeometry.intersect( r );
pixPainter.drawPixmap( ovr.left() - r.left(), ovr.top() - r.top(),
m_lastRenderedOverlay, ovr.left() - m_overlayGeometry.left(),
ovr.top() - m_overlayGeometry.top(), ovr.width(), ovr.height() );
@@ -370,7 +370,7 @@ void PresentationWidget::paintEvent( QPaintEvent * pe )
// </widget events>
-const KPDFLink * PresentationWidget::getLink( int x, int y, QRect * geometry ) const
+const KPDFLink * PresentationWidget::getLink( int x, int y, TQRect * geometry ) const
{
// no links on invalid pages
if ( geometry && !geometry->isNull() )
@@ -381,7 +381,7 @@ const KPDFLink * PresentationWidget::getLink( int x, int y, QRect * geometry ) c
// get frame, page and geometry
const PresentationFrame * frame = m_frames[ m_frameIndex ];
const KPDFPage * page = frame->page;
- const QRect & frameGeometry = frame->geometry;
+ const TQRect & frameGeometry = frame->geometry;
// compute normalized x and y
double nx = (double)(x - frameGeometry.left()) / (double)frameGeometry.width();
@@ -410,7 +410,7 @@ const KPDFLink * PresentationWidget::getLink( int x, int y, QRect * geometry ) c
void PresentationWidget::testCursorOnLink( int x, int y )
{
// get rect
- QRect linkRect;
+ TQRect linkRect;
const KPDFLink * link = getLink( x, y, &linkRect );
// only react on changes (in/out from a link)
@@ -421,13 +421,13 @@ void PresentationWidget::testCursorOnLink( int x, int y )
setCursor( m_handCursor ? KCursor::handCursor() : KCursor::arrowCursor());
// set tooltip over link's rect
- QString tip = link ? link->linkTip() : QString::null;
+ TQString tip = link ? link->linkTip() : TQString::null;
if ( m_handCursor && !tip.isEmpty() )
- QToolTip::add( this, linkRect, tip );
+ TQToolTip::add( this, linkRect, tip );
}
}
-void PresentationWidget::overlayClick( const QPoint & position )
+void PresentationWidget::overlayClick( const TQPoint & position )
{
// clicking the progress indicator
int xPos = position.x() - m_overlayGeometry.x() - m_overlayGeometry.width() / 2,
@@ -459,12 +459,12 @@ void PresentationWidget::changePage( int newPage )
if ( !frame->page->hasPixmap( PRESENTATION_ID, pixW, pixH ) )
{
// operation will take long: set busy cursor
- QApplication::setOverrideCursor( KCursor::workingCursor() );
+ TQApplication::setOverrideCursor( KCursor::workingCursor() );
// request the pixmap
- QValueList< PixmapRequest * > requests;
+ TQValueList< PixmapRequest * > requests;
requests.push_back( new PixmapRequest( PRESENTATION_ID, m_frameIndex, pixW, pixH, PRESENTATION_PRIO ) );
// restore cursor
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
// ask for next and previous page if not in low memory usage setting
if (KpdfSettings::memoryLevel() != KpdfSettings::EnumMemoryLevel::Low && KpdfSettings::enableThreading()) {
if (newPage + 1 < (int)m_document->pages())
@@ -503,7 +503,7 @@ void PresentationWidget::generatePage()
m_lastRenderedPixmap.resize( m_width, m_height );
// opens the painter over the pixmap
- QPainter pixmapPainter;
+ TQPainter pixmapPainter;
pixmapPainter.begin( &m_lastRenderedPixmap );
// generate welcome page
if ( m_frameIndex == -1 )
@@ -532,12 +532,12 @@ void PresentationWidget::generatePage()
// update cursor + tooltip
if ( KpdfSettings::slidesCursor() != KpdfSettings::EnumSlidesCursor::Hidden )
{
- QPoint p = mapFromGlobal( QCursor::pos() );
+ TQPoint p = mapFromGlobal( TQCursor::pos() );
testCursorOnLink( p.x(), p.y() );
}
}
-void PresentationWidget::generateIntroPage( QPainter & p )
+void PresentationWidget::generateIntroPage( TQPainter & p )
{
// use a vertical gray gradient background
int blend1 = m_height / 10,
@@ -550,11 +550,11 @@ void PresentationWidget::generateIntroPage( QPainter & p )
k -= (int)( baseTint * (i-blend1)*(i-blend1) / (float)(blend1 * blend1) );
if ( i > blend2 )
k += (int)( (255-baseTint) * (i-blend2)*(i-blend2) / (float)(blend1 * blend1) );
- p.fillRect( 0, i, m_width, 1, QColor( k, k, k ) );
+ p.fillRect( 0, i, m_width, 1, TQColor( k, k, k ) );
}
// draw kpdf logo in the four corners
- QPixmap logo = DesktopIcon( "kpdf", 64 );
+ TQPixmap logo = DesktopIcon( "kpdf", 64 );
if ( !logo.isNull() )
{
p.drawPixmap( 5, 5, logo );
@@ -567,14 +567,14 @@ void PresentationWidget::generateIntroPage( QPainter & p )
int strNum = m_metaStrings.count(),
strHeight = m_height / ( strNum + 4 ),
fontHeight = 2 * strHeight / 3;
- QFont font( p.font() );
+ TQFont font( p.font() );
font.setPixelSize( fontHeight );
- QFontMetrics metrics( font );
+ TQFontMetrics metrics( font );
for ( int i = 0; i < strNum; i++ )
{
// set a font to fit text width
float wScale = (float)metrics.boundingRect( m_metaStrings[i] ).width() / (float)m_width;
- QFont f( font );
+ TQFont f( font );
if ( wScale > 1.0 )
f.setPixelSize( (int)( (float)fontHeight / (float)wScale ) );
p.setFont( f );
@@ -590,12 +590,12 @@ void PresentationWidget::generateIntroPage( QPainter & p )
}
}
-void PresentationWidget::generateContentsPage( int pageNum, QPainter & p )
+void PresentationWidget::generateContentsPage( int pageNum, TQPainter & p )
{
PresentationFrame * frame = m_frames[ pageNum ];
// translate painter and contents rect
- QRect geom( frame->geometry );
+ TQRect geom( frame->geometry );
p.translate( geom.left(), geom.top() );
geom.moveBy( -geom.left(), -geom.top() );
@@ -608,11 +608,11 @@ void PresentationWidget::generateContentsPage( int pageNum, QPainter & p )
p.translate( -frame->geometry.left(), -frame->geometry.top() );
// fill unpainted areas with background color
- QRegion unpainted( QRect( 0, 0, m_width, m_height ) );
- QMemArray<QRect> rects = unpainted.subtract( frame->geometry ).rects();
+ TQRegion unpainted( TQRect( 0, 0, m_width, m_height ) );
+ TQMemArray<TQRect> rects = unpainted.subtract( frame->geometry ).rects();
for ( uint i = 0; i < rects.count(); i++ )
{
- const QRect & r = rects[i];
+ const TQRect & r = rects[i];
p.fillRect( r, KpdfSettings::slidesBackgroundColor() );
}
}
@@ -632,9 +632,9 @@ void PresentationWidget::generateOverlay()
// and the resulting image is smoothly scaled down. So here we open a
// painter on the double sized pixmap.
side *= 2;
- QPixmap doublePixmap( side, side );
+ TQPixmap doublePixmap( side, side );
doublePixmap.fill( Qt::black );
- QPainter pixmapPainter( &doublePixmap );
+ TQPainter pixmapPainter( &doublePixmap );
// draw PIE SLICES in blue levels (the levels will then be the alpha component)
int pages = m_document->pages();
@@ -667,16 +667,16 @@ void PresentationWidget::generateOverlay()
pixmapPainter.drawEllipse( circleOut, circleOut, side - 2*circleOut, side - 2*circleOut );
// draw TEXT using maximum opacity
- QFont f( pixmapPainter.font() );
+ TQFont f( pixmapPainter.font() );
f.setPixelSize( side / 4 );
pixmapPainter.setFont( f );
pixmapPainter.setPen( 0xFF );
// use a little offset to prettify output
- pixmapPainter.drawText( 2, 2, side, side, Qt::AlignCenter, QString::number( m_frameIndex + 1 ) );
+ pixmapPainter.drawText( 2, 2, side, side, Qt::AlignCenter, TQString::number( m_frameIndex + 1 ) );
// end drawing pixmap and halve image
pixmapPainter.end();
- QImage image( doublePixmap.convertToImage().smoothScale( side / 2, side / 2 ) );
+ TQImage image( doublePixmap.convertToImage().smoothScale( side / 2, side / 2 ) );
image.setAlphaBuffer( true );
// draw circular shadow using the same technique
@@ -686,11 +686,11 @@ void PresentationWidget::generateOverlay()
pixmapPainter.setBrush( 0x80 );
pixmapPainter.drawEllipse( 0, 0, side, side );
pixmapPainter.end();
- QImage shadow( doublePixmap.convertToImage().smoothScale( side / 2, side / 2 ) );
+ 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)
- QColor color = palette().active().highlightedText();
+ TQColor color = palette().active().highlightedText();
int red = color.red(), green = color.green(), blue = color.blue();
color = palette().active().highlight();
int sRed = color.red(), sGreen = color.green(), sBlue = color.blue();
@@ -802,7 +802,7 @@ void PresentationWidget::slotLastPage()
void PresentationWidget::slotHideOverlay()
{
- QRect geom( m_overlayGeometry );
+ TQRect geom( m_overlayGeometry );
m_overlayGeometry.setCoords( 0, 0, -1, -1 );
update( geom );
}
@@ -990,8 +990,8 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
for ( int i = 0; i < steps; i++ )
{
int xNext = ((i + 1) * m_width) / (2 * steps);
- m_transitionRects.push_back( QRect( xPosition, 0, xNext - xPosition, m_height ) );
- m_transitionRects.push_back( QRect( m_width - xNext, 0, xNext - xPosition, m_height ) );
+ m_transitionRects.push_back( TQRect( xPosition, 0, xNext - xPosition, m_height ) );
+ m_transitionRects.push_back( TQRect( m_width - xNext, 0, xNext - xPosition, m_height ) );
xPosition = xNext;
}
}
@@ -1001,8 +1001,8 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
for ( int i = 0; i < steps; i++ )
{
int xNext = ((steps - (i + 1)) * m_width) / (2 * steps);
- m_transitionRects.push_back( QRect( xNext, 0, xPosition - xNext, m_height ) );
- m_transitionRects.push_back( QRect( m_width - xPosition, 0, xPosition - xNext, m_height ) );
+ m_transitionRects.push_back( TQRect( xNext, 0, xPosition - xNext, m_height ) );
+ m_transitionRects.push_back( TQRect( m_width - xPosition, 0, xPosition - xNext, m_height ) );
xPosition = xNext;
}
}
@@ -1015,8 +1015,8 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
for ( int i = 0; i < steps; i++ )
{
int yNext = ((i + 1) * m_height) / (2 * steps);
- m_transitionRects.push_back( QRect( 0, yPosition, m_width, yNext - yPosition ) );
- m_transitionRects.push_back( QRect( 0, m_height - yNext, m_width, yNext - yPosition ) );
+ m_transitionRects.push_back( TQRect( 0, yPosition, m_width, yNext - yPosition ) );
+ m_transitionRects.push_back( TQRect( 0, m_height - yNext, m_width, yNext - yPosition ) );
yPosition = yNext;
}
}
@@ -1026,8 +1026,8 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
for ( int i = 0; i < steps; i++ )
{
int yNext = ((steps - (i + 1)) * m_height) / (2 * steps);
- m_transitionRects.push_back( QRect( 0, yNext, m_width, yPosition - yNext ) );
- m_transitionRects.push_back( QRect( 0, m_height - yPosition, m_width, yPosition - yNext ) );
+ m_transitionRects.push_back( TQRect( 0, yNext, m_width, yPosition - yNext ) );
+ m_transitionRects.push_back( TQRect( 0, m_height - yPosition, m_width, yPosition - yNext ) );
yPosition = yNext;
}
}
@@ -1052,7 +1052,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
int stepOffset = (int)( ((float)i * (float)m_width) / ((float)blinds * (float)steps) );
for ( int b = 0; b < blinds; b++ )
{
- m_transitionRects.push_back( QRect( xPosition[ b ], 0, stepOffset, m_height ) );
+ m_transitionRects.push_back( TQRect( xPosition[ b ], 0, stepOffset, m_height ) );
xPosition[ b ] = stepOffset + (b * m_width) / blinds;
}
}
@@ -1068,7 +1068,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
int stepOffset = (int)( ((float)i * (float)m_height) / ((float)blinds * (float)steps) );
for ( int b = 0; b < blinds; b++ )
{
- m_transitionRects.push_back( QRect( 0, yPosition[ b ], m_width, stepOffset ) );
+ m_transitionRects.push_back( TQRect( 0, yPosition[ b ], m_width, stepOffset ) );
yPosition[ b ] = stepOffset + (b * m_height) / blinds;
}
}
@@ -1092,10 +1092,10 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
int newR = m_width - newL;
int newB = m_height - newT;
// add left, right, topcenter, bottomcenter rects
- m_transitionRects.push_back( QRect( L, T, newL - L, B - T ) );
- m_transitionRects.push_back( QRect( newR, T, R - newR, B - T ) );
- m_transitionRects.push_back( QRect( newL, T, newR - newL, newT - T ) );
- m_transitionRects.push_back( QRect( newL, newB, newR - newL, B - newB ) );
+ m_transitionRects.push_back( TQRect( L, T, newL - L, B - T ) );
+ m_transitionRects.push_back( TQRect( newR, T, R - newR, B - T ) );
+ m_transitionRects.push_back( TQRect( newL, T, newR - newL, newT - T ) );
+ m_transitionRects.push_back( TQRect( newL, newB, newR - newL, B - newB ) );
L = newL; T = newT; R = newR, B = newB;
}
}
@@ -1110,10 +1110,10 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
int newR = m_width - newL;
int newB = m_height - newT;
// add left, right, topcenter, bottomcenter rects
- m_transitionRects.push_back( QRect( newL, newT, L - newL, newB - newT ) );
- m_transitionRects.push_back( QRect( R, newT, newR - R, newB - newT ) );
- m_transitionRects.push_back( QRect( L, newT, R - L, T - newT ) );
- m_transitionRects.push_back( QRect( L, B, R - L, newB - B ) );
+ m_transitionRects.push_back( TQRect( newL, newT, L - newL, newB - newT ) );
+ m_transitionRects.push_back( TQRect( R, newT, newR - R, newB - newT ) );
+ m_transitionRects.push_back( TQRect( L, newT, R - L, T - newT ) );
+ m_transitionRects.push_back( TQRect( L, B, R - L, newB - B ) );
L = newL; T = newT; R = newR, B = newB;
}
}
@@ -1132,7 +1132,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
for ( int i = 0; i < steps; i++ )
{
int xNext = ((i + 1) * m_width) / steps;
- m_transitionRects.push_back( QRect( xPosition, 0, xNext - xPosition, m_height ) );
+ m_transitionRects.push_back( TQRect( xPosition, 0, xNext - xPosition, m_height ) );
xPosition = xNext;
}
}
@@ -1142,7 +1142,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
for ( int i = 0; i < steps; i++ )
{
int yNext = ((steps - (i + 1)) * m_height) / steps;
- m_transitionRects.push_back( QRect( 0, yNext, m_width, yPosition - yNext ) );
+ m_transitionRects.push_back( TQRect( 0, yNext, m_width, yPosition - yNext ) );
yPosition = yNext;
}
}
@@ -1152,7 +1152,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
for ( int i = 0; i < steps; i++ )
{
int xNext = ((steps - (i + 1)) * m_width) / steps;
- m_transitionRects.push_back( QRect( xNext, 0, xPosition - xNext, m_height ) );
+ m_transitionRects.push_back( TQRect( xNext, 0, xPosition - xNext, m_height ) );
xPosition = xNext;
}
}
@@ -1162,7 +1162,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
for ( int i = 0; i < steps; i++ )
{
int yNext = ((i + 1) * m_height) / steps;
- m_transitionRects.push_back( QRect( 0, yPosition, m_width, yNext - yPosition ) );
+ m_transitionRects.push_back( TQRect( 0, yPosition, m_width, yNext - yPosition ) );
yPosition = yNext;
}
}
@@ -1190,7 +1190,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
for ( int x = 0; x < gridXsteps; x++ )
{
int newX = (int)( m_width * ((float)(x+1) / (float)gridXsteps) );
- m_transitionRects.push_back( QRect( oldX, oldY, newX - oldX, newY - oldY ) );
+ m_transitionRects.push_back( TQRect( oldX, oldY, newX - oldX, newY - oldY ) );
oldX = newX;
}
oldX = 0;
@@ -1204,7 +1204,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
// swap items if index differs
if ( n1 != n2 )
{
- QRect r = m_transitionRects[ n2 ];
+ TQRect r = m_transitionRects[ n2 ];
m_transitionRects[ n2 ] = m_transitionRects[ n1 ];
m_transitionRects[ n1 ] = r;
}
@@ -1232,7 +1232,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
for ( int j = 0; j < gridXsteps; j++ )
{
int xNext = ((j + 1) * m_width) / gridXsteps;
- m_transitionRects.push_back( QRect( xPosition, yNext, xNext - xPosition, yPosition - yNext ) );
+ m_transitionRects.push_back( TQRect( xPosition, yNext, xNext - xPosition, yPosition - yNext ) );
xPosition = xNext;
}
yPosition = yNext;
@@ -1248,7 +1248,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
for ( int j = 0; j < gridYsteps; j++ )
{
int yNext = ((j + 1) * m_height) / gridYsteps;
- m_transitionRects.push_back( QRect( xNext, yPosition, xPosition - xNext, yNext - yPosition ) );
+ m_transitionRects.push_back( TQRect( xNext, yPosition, xPosition - xNext, yNext - yPosition ) );
yPosition = yNext;
}
xPosition = xNext;
@@ -1264,7 +1264,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
for ( int j = 0; j < gridXsteps; j++ )
{
int xNext = ((j + 1) * m_width) / gridXsteps;
- m_transitionRects.push_back( QRect( xPosition, yPosition, xNext - xPosition, yNext - yPosition ) );
+ m_transitionRects.push_back( TQRect( xPosition, yPosition, xNext - xPosition, yNext - yPosition ) );
xPosition = xNext;
}
yPosition = yNext;
@@ -1280,7 +1280,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
for ( int j = 0; j < gridYsteps; j++ )
{
int yNext = ((j + 1) * m_height) / gridYsteps;
- m_transitionRects.push_back( QRect( xPosition, yPosition, xNext - xPosition, yNext - yPosition ) );
+ m_transitionRects.push_back( TQRect( xPosition, yPosition, xNext - xPosition, yNext - yPosition ) );
yPosition = yNext;
}
xPosition = xNext;
@@ -1295,7 +1295,7 @@ void PresentationWidget::initTransition( const KPDFPageTransition *transition )
// swap items if index differs
if ( n1 != n2 )
{
- QRect r = m_transitionRects[ n2 ];
+ TQRect r = m_transitionRects[ n2 ];
m_transitionRects[ n2 ] = m_transitionRects[ n1 ];
m_transitionRects[ n1 ] = r;
}
diff --git a/kpdf/ui/presentationwidget.h b/kpdf/ui/presentationwidget.h
index 4b0cdf19..00ff5b35 100644
--- a/kpdf/ui/presentationwidget.h
+++ b/kpdf/ui/presentationwidget.h
@@ -10,17 +10,17 @@
#ifndef _KPDF_PRESENTATIONWIDGET_H_
#define _KPDF_PRESENTATIONWIDGET_H_
-#include <qdialog.h>
-#include <qpixmap.h>
-#include <qstringlist.h>
-#include <qvaluevector.h>
+#include <tqdialog.h>
+#include <tqpixmap.h>
+#include <tqstringlist.h>
+#include <tqvaluevector.h>
#include "core/observer.h"
#include "core/pagetransition.h"
class KAccel;
class KActionCollection;
class KToolBar;
-class QTimer;
+class TQTimer;
class KPDFDocument;
class KPDFPage;
@@ -32,40 +32,40 @@ class PresentationFrame;
*
* This is a fullscreen widget that displays
*/
-class PresentationWidget : public QDialog, public DocumentObserver
+class PresentationWidget : public TQDialog, public DocumentObserver
{
Q_OBJECT
public:
- PresentationWidget( QWidget * parent, KPDFDocument * doc );
+ PresentationWidget( TQWidget * parent, KPDFDocument * doc );
~PresentationWidget();
void setupActions( KActionCollection * ac );
// inherited from DocumentObserver
uint observerId() const { return PRESENTATION_ID; }
- void notifySetup( const QValueVector< KPDFPage * > & pages, bool documentChanged );
+ void notifySetup( const TQValueVector< KPDFPage * > & pages, bool documentChanged );
void notifyViewportChanged( bool smoothMove );
void notifyPageChanged( int pageNumber, int changedFlags );
bool canUnloadPixmap( int pageNumber );
protected:
// widget events
-// bool event( QEvent * e );
- void keyPressEvent( QKeyEvent * e );
- void wheelEvent( QWheelEvent * e );
- void mousePressEvent( QMouseEvent * e );
- void mouseReleaseEvent( QMouseEvent * e );
- void mouseMoveEvent( QMouseEvent * e );
- void paintEvent( QPaintEvent * e );
+// bool event( TQEvent * e );
+ void keyPressEvent( TQKeyEvent * e );
+ void wheelEvent( TQWheelEvent * e );
+ void mousePressEvent( TQMouseEvent * e );
+ void mouseReleaseEvent( TQMouseEvent * e );
+ void mouseMoveEvent( TQMouseEvent * e );
+ void paintEvent( TQPaintEvent * e );
private:
- const KPDFLink * getLink( int x, int y, QRect * geometry = 0 ) const;
+ const KPDFLink * getLink( int x, int y, TQRect * geometry = 0 ) const;
void testCursorOnLink( int x, int y );
- void overlayClick( const QPoint & position );
+ void overlayClick( const TQPoint & position );
void changePage( int newPage );
void generatePage();
- void generateIntroPage( QPainter & p );
- void generateContentsPage( int page, QPainter & p );
+ void generateIntroPage( TQPainter & p );
+ void generateContentsPage( int page, TQPainter & p );
void generateOverlay();
void initTransition( const KPDFPageTransition *transition );
const KPDFPageTransition defaultTransition() const;
@@ -74,25 +74,25 @@ class PresentationWidget : public QDialog, public DocumentObserver
// cache stuff
int m_width;
int m_height;
- QPixmap m_lastRenderedPixmap;
- QPixmap m_lastRenderedOverlay;
- QRect m_overlayGeometry;
+ TQPixmap m_lastRenderedPixmap;
+ TQPixmap m_lastRenderedOverlay;
+ TQRect m_overlayGeometry;
const KPDFLink * m_pressedLink;
bool m_handCursor;
// transition related
- QTimer * m_transitionTimer;
- QTimer * m_overlayHideTimer;
- QTimer * m_nextPageTimer;
+ TQTimer * m_transitionTimer;
+ TQTimer * m_overlayHideTimer;
+ TQTimer * m_nextPageTimer;
int m_transitionDelay;
int m_transitionMul;
- QValueList< QRect > m_transitionRects;
+ TQValueList< TQRect > m_transitionRects;
// misc stuff
KPDFDocument * m_document;
- QValueVector< PresentationFrame * > m_frames;
+ TQValueVector< PresentationFrame * > m_frames;
int m_frameIndex;
- QStringList m_metaStrings;
+ TQStringList m_metaStrings;
KToolBar * m_topBar;
KAccel * m_accel;
diff --git a/kpdf/ui/propertiesdialog.cpp b/kpdf/ui/propertiesdialog.cpp
index d5810a07..df03422e 100644
--- a/kpdf/ui/propertiesdialog.cpp
+++ b/kpdf/ui/propertiesdialog.cpp
@@ -8,8 +8,8 @@
***************************************************************************/
// qt/kde includes
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klistview.h>
#include <klocale.h>
#include <ksqueezedtextlabel.h>
@@ -19,39 +19,39 @@
#include "propertiesdialog.h"
#include "core/document.h"
-PropertiesDialog::PropertiesDialog(QWidget *parent, KPDFDocument *doc)
+PropertiesDialog::PropertiesDialog(TQWidget *parent, KPDFDocument *doc)
: KDialogBase( Tabbed, i18n( "Unknown File" ), Ok, Ok, parent, 0, true, true )
{
// Properties
- QFrame *page = addPage(i18n("Properties"));
- QGridLayout *layout = new QGridLayout( page, 2, 2, marginHint(), spacingHint() );
+ TQFrame *page = addPage(i18n("Properties"));
+ TQGridLayout *layout = 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 QLabel( i18n( "No document opened." ), page ), 0, 0 );
+ layout->addWidget( new TQLabel( i18n( "No document opened." ), page ), 0, 0 );
return;
}
// mime name based on mimetype id
- QString mimeName = info->get( "mimeType" ).section( '/', -1 ).upper();
+ TQString mimeName = info->get( "mimeType" ).section( '/', -1 ).upper();
setCaption( i18n("%1 Properties").arg( mimeName ) );
- QDomElement docElement = info->documentElement();
+ TQDomElement docElement = info->documentElement();
int row = 0;
int valMaxWidth = 100;
- for ( QDomNode node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) {
- QDomElement element = node.toElement();
+ for ( TQDomNode node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) {
+ TQDomElement element = node.toElement();
- QString titleString = element.attribute( "title" );
- QString valueString = element.attribute( "value" );
+ TQString titleString = element.attribute( "title" );
+ TQString valueString = element.attribute( "value" );
if ( titleString.isEmpty() || valueString.isEmpty() )
continue;
// create labels and layout them
- QLabel *key = new QLabel( i18n( "%1:" ).arg( titleString ), page );
- QLabel *value = new KSqueezedTextLabel( valueString, page );
+ TQLabel *key = new TQLabel( i18n( "%1:" ).arg( titleString ), page );
+ TQLabel *value = new KSqueezedTextLabel( valueString, page );
layout->addWidget( key, row, 0, AlignRight );
layout->addWidget( value, row, 1 );
row++;
@@ -61,21 +61,21 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, KPDFDocument *doc)
}
// add the number of pages if the generator hasn't done it already
- QDomNodeList list = docElement.elementsByTagName( "pages" );
+ TQDomNodeList list = docElement.elementsByTagName( "pages" );
if ( list.count() == 0 ) {
- QLabel *key = new QLabel( i18n( "Pages:" ), page );
- QLabel *value = new QLabel( QString::number( doc->pages() ), page );
+ 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 );
}
// Fonts
- QVBoxLayout *page2Layout = 0;
+ TQVBoxLayout *page2Layout = 0;
if (doc->hasFonts())
{
- QFrame *page2 = addPage(i18n("Fonts"));
- page2Layout = new QVBoxLayout(page2, 0, KDialog::spacingHint());
+ TQFrame *page2 = addPage(i18n("Fonts"));
+ page2Layout = new TQVBoxLayout(page2, 0, KDialog::spacingHint());
KListView *lv = new KListView(page2);
page2Layout->add(lv);
doc->putFontInfo(lv);
@@ -88,7 +88,7 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, KPDFDocument *doc)
width = QMAX( width, page2Layout->sizeHint().width() + marginHint() + spacingHint() + 31 );
}
// stay inside the 2/3 of the screen width
- QRect screenContainer = KGlobalSettings::desktopGeometry( this );
+ TQRect screenContainer = KGlobalSettings::desktopGeometry( this );
width = QMIN( width, 2*screenContainer.width()/3 );
resize(width, 1);
}
diff --git a/kpdf/ui/propertiesdialog.h b/kpdf/ui/propertiesdialog.h
index 7bc39e5a..d5e3229a 100644
--- a/kpdf/ui/propertiesdialog.h
+++ b/kpdf/ui/propertiesdialog.h
@@ -17,7 +17,7 @@ class KPDFDocument;
class PropertiesDialog : public KDialogBase
{
public:
- PropertiesDialog( QWidget *parent, KPDFDocument *doc );
+ PropertiesDialog( TQWidget *parent, KPDFDocument *doc );
};
#endif
diff --git a/kpdf/ui/searchwidget.cpp b/kpdf/ui/searchwidget.cpp
index 30a5bcf2..36b8dd19 100644
--- a/kpdf/ui/searchwidget.cpp
+++ b/kpdf/ui/searchwidget.cpp
@@ -8,9 +8,9 @@
***************************************************************************/
// qt/kde includes
-#include <qtooltip.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqtooltip.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#include <kaction.h>
#include <kactioncollection.h>
#include <klocale.h>
@@ -28,7 +28,7 @@
#define LEDIT_ID 2
#define FIND_ID 3
-SearchWidget::SearchWidget( QWidget * parent, KPDFDocument * document )
+SearchWidget::SearchWidget( TQWidget * parent, KPDFDocument * document )
: KToolBar( parent, "iSearchBar" ), m_document( document ),
m_searchType( 0 ), m_caseSensitive( false )
{
@@ -39,19 +39,19 @@ SearchWidget::SearchWidget( QWidget * parent, KPDFDocument * document )
setMovingEnabled( false );
// a timer to ensure that we don't flood the document with requests to search
- m_inputDelayTimer = new QTimer(this);
- connect( m_inputDelayTimer, SIGNAL( timeout() ),
- this, SLOT( startSearch() ) );
+ m_inputDelayTimer = new TQTimer(this);
+ connect( m_inputDelayTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( startSearch() ) );
// 1. text line
- insertLined( QString::null, LEDIT_ID, SIGNAL( textChanged(const QString &) ),
- this, SLOT( slotTextChanged(const QString &) ), true,
+ insertLined( TQString::null, LEDIT_ID, TQT_SIGNAL( textChanged(const TQString &) ),
+ 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( QApplication::reverseLayout() ? "clear_left" : "locationbar_erase",
- CLEAR_ID, SIGNAL( clicked() ),
- getLined( LEDIT_ID ), SLOT( clear() ), true,
+ insertButton( TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase",
+ CLEAR_ID, TQT_SIGNAL( clicked() ),
+ getLined( LEDIT_ID ), TQT_SLOT( clear() ), true,
i18n( "Clear filter" ), 0/*index*/ );
// 3.1. create the popup menu for changing filtering features
@@ -62,7 +62,7 @@ SearchWidget::SearchWidget( QWidget * parent, KPDFDocument * document )
m_menu->insertItem( i18n("Match All Words"), 4 );
m_menu->insertItem( i18n("Match Any Word"), 5 );
m_menu->setItemChecked( 3, true );
- connect( m_menu, SIGNAL( activated(int) ), SLOT( slotMenuChaged(int) ) );
+ connect( m_menu, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotMenuChaged(int) ) );
// 3.2. create the toolbar button that spawns the popup menu
insertButton( "kpdf", FIND_ID, m_menu, true, i18n( "Filter Options" ), 2/*index*/ );
@@ -76,10 +76,10 @@ void SearchWidget::clearText()
getLined( LEDIT_ID )->clear();
}
-void SearchWidget::slotTextChanged( const QString & text )
+void SearchWidget::slotTextChanged( const TQString & text )
{
// if 0<length<3 set 'red' text and send a blank string to document
- QColor color = text.length() > 0 && text.length() < 3 ? Qt::darkRed : palette().active().text();
+ TQColor color = text.length() > 0 && text.length() < 3 ? Qt::darkRed : palette().active().text();
KLineEdit * lineEdit = getLined( LEDIT_ID );
lineEdit->setPaletteForegroundColor( color );
lineEdit->setPaletteBackgroundColor( palette().active().base() );
@@ -111,7 +111,7 @@ void SearchWidget::slotMenuChaged( int index )
void SearchWidget::startSearch()
{
// search text if have more than 3 chars or else clear search
- QString text = getLined( LEDIT_ID )->text();
+ TQString text = getLined( LEDIT_ID )->text();
bool ok = true;
if ( text.length() >= 3 )
{
diff --git a/kpdf/ui/searchwidget.h b/kpdf/ui/searchwidget.h
index 9f2a1e44..33fb1459 100644
--- a/kpdf/ui/searchwidget.h
+++ b/kpdf/ui/searchwidget.h
@@ -31,18 +31,18 @@ class SearchWidget : public KToolBar
{
Q_OBJECT
public:
- SearchWidget( QWidget *parent, KPDFDocument *document );
+ SearchWidget( TQWidget *parent, KPDFDocument *document );
void clearText();
private:
KPDFDocument * m_document;
KPopupMenu * m_menu;
- QTimer * m_inputDelayTimer;
+ TQTimer * m_inputDelayTimer;
int m_searchType;
bool m_caseSensitive;
private slots:
- void slotTextChanged( const QString & text );
+ void slotTextChanged( const TQString & text );
void slotMenuChaged( int index );
void startSearch();
};
diff --git a/kpdf/ui/thumbnaillist.cpp b/kpdf/ui/thumbnaillist.cpp
index 60324533..49d22ee3 100644
--- a/kpdf/ui/thumbnaillist.cpp
+++ b/kpdf/ui/thumbnaillist.cpp
@@ -8,8 +8,8 @@
***************************************************************************/
// qt/kde includes
-#include <qtimer.h>
-#include <qpainter.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kurl.h>
#include <kurldrag.h>
@@ -30,7 +30,7 @@
class ThumbnailWidget : public QWidget
{
public:
- ThumbnailWidget( QWidget * parent, const KPDFPage * page, ThumbnailList * tl );
+ ThumbnailWidget( TQWidget * parent, const KPDFPage * page, ThumbnailList * tl );
// set internal parameters to fit the page in the given width
void resizeFitWidth( int width );
@@ -45,8 +45,8 @@ class ThumbnailWidget : public QWidget
const KPDFPage * page() const { return m_page; }
protected:
- void mouseReleaseEvent( QMouseEvent * e );
- void paintEvent(QPaintEvent *);
+ void mouseReleaseEvent( TQMouseEvent * e );
+ void paintEvent(TQPaintEvent *);
private:
// the margin around the widget
@@ -63,13 +63,13 @@ class ThumbnailWidget : public QWidget
/** ThumbnailList implementation **/
-ThumbnailList::ThumbnailList( QWidget *parent, KPDFDocument *document )
- : QScrollView( parent, "KPDF::Thumbnails", WNoAutoErase | WStaticContents ),
+ThumbnailList::ThumbnailList( TQWidget *parent, KPDFDocument *document )
+ : TQScrollView( parent, "KPDF::Thumbnails", WNoAutoErase | WStaticContents ),
m_document( document ), m_selected( 0 ), m_delayTimer( 0 ), m_bookmarkOverlay( 0 )
{
// set scrollbars
- setHScrollBarMode( QScrollView::AlwaysOff );
- setVScrollBarMode( QScrollView::AlwaysOn );
+ setHScrollBarMode( TQScrollView::AlwaysOff );
+ setVScrollBarMode( TQScrollView::AlwaysOn );
// dealing with large areas so enable clipper
enableClipper( true );
@@ -85,7 +85,7 @@ ThumbnailList::ThumbnailList( QWidget *parent, KPDFDocument *document )
viewport()->setPaletteBackgroundColor( palette().active().base() );
setFrameStyle( StyledPanel | Raised );
- connect( this, SIGNAL(contentsMoving(int, int)), this, SLOT(slotRequestVisiblePixmaps(int, int)) );
+ connect( this, TQT_SIGNAL(contentsMoving(int, int)), this, TQT_SLOT(slotRequestVisiblePixmaps(int, int)) );
}
ThumbnailList::~ThumbnailList()
@@ -95,7 +95,7 @@ ThumbnailList::~ThumbnailList()
}
//BEGIN DocumentObserver inherited methods
-void ThumbnailList::notifySetup( const QValueVector< KPDFPage * > & pages, bool documentChanged )
+void ThumbnailList::notifySetup( const TQValueVector< KPDFPage * > & pages, bool documentChanged )
{
// if there was a widget selected, save its pagenumber to restore
// its selection (if available in the new set of pages)
@@ -106,7 +106,7 @@ void ThumbnailList::notifySetup( const QValueVector< KPDFPage * > & pages, bool
}
// delete all the Thumbnails
- QValueVector<ThumbnailWidget *>::iterator tIt = m_thumbnails.begin(), tEnd = m_thumbnails.end();
+ TQValueVector<ThumbnailWidget *>::iterator tIt = m_thumbnails.begin(), tEnd = m_thumbnails.end();
for ( ; tIt != tEnd; ++tIt )
delete *tIt;
m_thumbnails.clear();
@@ -123,7 +123,7 @@ void ThumbnailList::notifySetup( const QValueVector< KPDFPage * > & pages, bool
//RESTORE THIS int flags = Settings::filterBookmarks() ? KPDFPage::Bookmark : KPDFPage::Highlight;
// if no page matches filter rule, then display all pages
- QValueVector< KPDFPage * >::const_iterator pIt = pages.begin(), pEnd = pages.end();
+ TQValueVector< KPDFPage * >::const_iterator pIt = pages.begin(), pEnd = pages.end();
bool skipCheck = true;
for ( ; pIt != pEnd ; ++pIt )
//if ( (*pIt)->attributes() & flags )
@@ -175,7 +175,7 @@ void ThumbnailList::notifyViewportChanged( bool /*smoothMove*/ )
// select the page with viewport and ensure it's centered in the view
m_vectorIndex = 0;
- QValueVector<ThumbnailWidget *>::iterator tIt = m_thumbnails.begin(), tEnd = m_thumbnails.end();
+ TQValueVector<ThumbnailWidget *>::iterator tIt = m_thumbnails.begin(), tEnd = m_thumbnails.end();
for ( ; tIt != tEnd; ++tIt )
{
if ( (*tIt)->pageNumber() == newPage )
@@ -200,7 +200,7 @@ void ThumbnailList::notifyPageChanged( int pageNumber, int /*changedFlags*/ )
// return;
// iterate over visible items: if page(pageNumber) is one of them, repaint it
- QValueList<ThumbnailWidget *>::iterator vIt = m_visibleThumbnails.begin(), vEnd = m_visibleThumbnails.end();
+ TQValueList<ThumbnailWidget *>::iterator vIt = m_visibleThumbnails.begin(), vEnd = m_visibleThumbnails.end();
for ( ; vIt != vEnd; ++vIt )
if ( (*vIt)->pageNumber() == pageNumber )
{
@@ -219,7 +219,7 @@ void ThumbnailList::notifyContentsCleared( int changedFlags )
bool ThumbnailList::canUnloadPixmap( int pageNumber )
{
// if the thubnail 'pageNumber' is one of the visible ones, forbid unloading
- QValueList<ThumbnailWidget *>::iterator vIt = m_visibleThumbnails.begin(), vEnd = m_visibleThumbnails.end();
+ TQValueList<ThumbnailWidget *>::iterator vIt = m_visibleThumbnails.begin(), vEnd = m_visibleThumbnails.end();
for ( ; vIt != vEnd; ++vIt )
if ( (*vIt)->pageNumber() == pageNumber )
return false;
@@ -232,14 +232,14 @@ bool ThumbnailList::canUnloadPixmap( int pageNumber )
void ThumbnailList::updateWidgets()
{
// find all widgets that intersects the viewport and update them
- QRect viewportRect( contentsX(), contentsY(), visibleWidth(), visibleHeight() );
- QValueList<ThumbnailWidget *>::iterator vIt = m_visibleThumbnails.begin(), vEnd = m_visibleThumbnails.end();
+ TQRect viewportRect( contentsX(), contentsY(), visibleWidth(), visibleHeight() );
+ TQValueList<ThumbnailWidget *>::iterator vIt = m_visibleThumbnails.begin(), vEnd = m_visibleThumbnails.end();
for ( ; vIt != vEnd; ++vIt )
{
ThumbnailWidget * t = *vIt;
- QRect widgetRect( childX( t ), childY( t ), t->width(), t->height() );
+ TQRect widgetRect( childX( t ), childY( t ), t->width(), t->height() );
// update only the exposed area of the widget (saves pixels..)
- QRect relativeRect = viewportRect.intersect( widgetRect );
+ TQRect relativeRect = viewportRect.intersect( widgetRect );
if ( !relativeRect.isValid() )
continue;
relativeRect.moveBy( -widgetRect.left(), -widgetRect.top() );
@@ -247,12 +247,12 @@ void ThumbnailList::updateWidgets()
}
}
-void ThumbnailList::forwardRightClick( const KPDFPage * p, const QPoint & t )
+void ThumbnailList::forwardRightClick( const KPDFPage * p, const TQPoint & t )
{
emit rightClick( p, t );
}
-const QPixmap * ThumbnailList::getBookmarkOverlay() const
+const TQPixmap * ThumbnailList::getBookmarkOverlay() const
{
return m_bookmarkOverlay;
}
@@ -270,7 +270,7 @@ void ThumbnailList::slotFilterBookmarks( bool filterOn )
//BEGIN widget events
-void ThumbnailList::keyPressEvent( QKeyEvent * keyEvent )
+void ThumbnailList::keyPressEvent( TQKeyEvent * keyEvent )
{
if ( m_thumbnails.count() < 1 )
return keyEvent->ignore();
@@ -309,12 +309,12 @@ void ThumbnailList::keyPressEvent( QKeyEvent * keyEvent )
m_document->setViewportPage( nextPage );
}
-void ThumbnailList::contentsMousePressEvent( QMouseEvent * e )
+void ThumbnailList::contentsMousePressEvent( TQMouseEvent * e )
{
if ( e->button() != Qt::LeftButton )
return;
int clickY = e->y();
- QValueList<ThumbnailWidget *>::iterator vIt = m_visibleThumbnails.begin(), vEnd = m_visibleThumbnails.end();
+ TQValueList<ThumbnailWidget *>::iterator vIt = m_visibleThumbnails.begin(), vEnd = m_visibleThumbnails.end();
for ( ; vIt != vEnd; ++vIt )
{
ThumbnailWidget * t = *vIt;
@@ -328,7 +328,7 @@ void ThumbnailList::contentsMousePressEvent( QMouseEvent * e )
}
}
-void ThumbnailList::viewportResizeEvent( QResizeEvent * e )
+void ThumbnailList::viewportResizeEvent( TQResizeEvent * e )
{
if ( m_thumbnails.count() < 1 || width() < 1 )
return;
@@ -343,7 +343,7 @@ void ThumbnailList::viewportResizeEvent( QResizeEvent * e )
// resize and reposition items
int totalHeight = 0,
newWidth = e->size().width();
- QValueVector<ThumbnailWidget *>::iterator tIt = m_thumbnails.begin(), tEnd = m_thumbnails.end();
+ TQValueVector<ThumbnailWidget *>::iterator tIt = m_thumbnails.begin(), tEnd = m_thumbnails.end();
for ( ; tIt != tEnd; ++tIt )
{
ThumbnailWidget *t = *tIt;
@@ -373,12 +373,12 @@ void ThumbnailList::viewportResizeEvent( QResizeEvent * e )
delayedRequestVisiblePixmaps( 500 );
}
-void ThumbnailList::dragEnterEvent( QDragEnterEvent * ev )
+void ThumbnailList::dragEnterEvent( TQDragEnterEvent * ev )
{
ev->accept();
}
-void ThumbnailList::dropEvent( QDropEvent * ev )
+void ThumbnailList::dropEvent( TQDropEvent * ev )
{
KURL::List lst;
if ( KURLDrag::decode( ev, lst ) )
@@ -398,8 +398,8 @@ void ThumbnailList::slotRequestVisiblePixmaps( int /*newContentsX*/, int newCont
// scroll from the top to the last visible thumbnail
m_visibleThumbnails.clear();
- QValueList< PixmapRequest * > requestedPixmaps;
- QValueVector<ThumbnailWidget *>::iterator tIt = m_thumbnails.begin(), tEnd = m_thumbnails.end();
+ TQValueList< PixmapRequest * > requestedPixmaps;
+ TQValueVector<ThumbnailWidget *>::iterator tIt = m_thumbnails.begin(), tEnd = m_thumbnails.end();
for ( ; tIt != tEnd; ++tIt )
{
ThumbnailWidget * t = *tIt;
@@ -430,7 +430,7 @@ void ThumbnailList::slotDelayTimeout()
delete m_bookmarkOverlay;
int expectedWidth = contentsWidth() / 4;
if ( expectedWidth > 10 )
- m_bookmarkOverlay = new QPixmap( DesktopIcon( "attach", expectedWidth ) );
+ m_bookmarkOverlay = new TQPixmap( DesktopIcon( "attach", expectedWidth ) );
else
m_bookmarkOverlay = 0;
@@ -443,8 +443,8 @@ void ThumbnailList::delayedRequestVisiblePixmaps( int delayMs )
{
if ( !m_delayTimer )
{
- m_delayTimer = new QTimer( this );
- connect( m_delayTimer, SIGNAL( timeout() ), this, SLOT( slotDelayTimeout() ) );
+ m_delayTimer = new TQTimer( this );
+ connect( m_delayTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotDelayTimeout() ) );
}
m_delayTimer->start( delayMs, true );
}
@@ -452,12 +452,12 @@ void ThumbnailList::delayedRequestVisiblePixmaps( int delayMs )
/** ThumbnailWidget implementation **/
-ThumbnailWidget::ThumbnailWidget( QWidget * parent, const KPDFPage * kp, ThumbnailList * tl )
- : QWidget( parent, 0, WNoAutoErase ), m_tl( tl ), m_page( kp ),
+ThumbnailWidget::ThumbnailWidget( TQWidget * parent, const KPDFPage * kp, ThumbnailList * tl )
+ : TQWidget( parent, 0, WNoAutoErase ), m_tl( tl ), m_page( kp ),
m_selected( false ), m_pixmapWidth( 10 ), m_pixmapHeight( 10 )
{
m_labelNumber = m_page->number() + 1;
- m_labelHeight = QFontMetrics( font() ).height();
+ m_labelHeight = TQFontMetrics( font() ).height();
}
void ThumbnailWidget::resizeFitWidth( int width )
@@ -477,7 +477,7 @@ void ThumbnailWidget::setSelected( bool selected )
}
}
-void ThumbnailWidget::mouseReleaseEvent( QMouseEvent * e )
+void ThumbnailWidget::mouseReleaseEvent( TQMouseEvent * e )
{
if ( e->button() != Qt::RightButton )
return;
@@ -485,20 +485,20 @@ void ThumbnailWidget::mouseReleaseEvent( QMouseEvent * e )
m_tl->forwardRightClick( m_page, e->globalPos() );
}
-void ThumbnailWidget::paintEvent( QPaintEvent * e )
+void ThumbnailWidget::paintEvent( TQPaintEvent * e )
{
int width = m_pixmapWidth + m_margin;
int height = m_pixmapHeight + m_margin + m_labelHeight;
- QRect clipRect = e->rect();
+ TQRect clipRect = e->rect();
if ( !clipRect.isValid() )
return;
- QPainter p( this );
+ TQPainter p( this );
// draw the bottom label + highlight mark
- QColor fillColor = m_selected ? palette().active().highlight() : palette().active().base();
+ TQColor fillColor = m_selected ? palette().active().highlight() : palette().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, QString::number( m_labelNumber ) );
+ p.drawText( 0, m_pixmapHeight + m_margin, width, m_labelHeight, Qt::AlignCenter, TQString::number( m_labelNumber ) );
// draw page outline and pixmap
if ( clipRect.top() < m_pixmapHeight + m_margin )
@@ -506,10 +506,10 @@ void ThumbnailWidget::paintEvent( QPaintEvent * e )
// if page is bookmarked draw a colored border
bool isBookmarked = m_page->hasBookmark();
// draw the inner rect
- p.setPen( isBookmarked ? QColor( 0xFF8000 ) : Qt::black );
+ p.setPen( isBookmarked ? TQColor( 0xFF8000 ) : Qt::black );
p.drawRect( m_margin/2 - 1, m_margin/2 - 1, m_pixmapWidth + 2, m_pixmapHeight + 2 );
// draw the clear rect
- p.setPen( isBookmarked ? QColor( 0x804000 ) : palette().active().base() );
+ p.setPen( isBookmarked ? TQColor( 0x804000 ) : palette().active().base() );
// draw the bottom and right shadow edges
if ( !isBookmarked )
{
@@ -526,7 +526,7 @@ void ThumbnailWidget::paintEvent( QPaintEvent * e )
// draw the page using the shared PagePainter class
p.translate( m_margin/2, m_margin/2 );
clipRect.moveBy( -m_margin/2, -m_margin/2 );
- clipRect = clipRect.intersect( QRect( 0, 0, m_pixmapWidth, m_pixmapHeight ) );
+ clipRect = clipRect.intersect( TQRect( 0, 0, m_pixmapWidth, m_pixmapHeight ) );
if ( clipRect.isValid() )
{
int flags = PagePainter::Accessibility | PagePainter::Highlights;
@@ -535,12 +535,12 @@ void ThumbnailWidget::paintEvent( QPaintEvent * e )
}
// draw the bookmark overlay on the top-right corner
- const QPixmap * bookmarkPixmap = m_tl->getBookmarkOverlay();
+ const TQPixmap * bookmarkPixmap = m_tl->getBookmarkOverlay();
if ( isBookmarked && bookmarkPixmap )
{
int pixW = bookmarkPixmap->width(),
pixH = bookmarkPixmap->height();
- clipRect = clipRect.intersect( QRect( m_pixmapWidth - pixW, 0, pixW, pixH ) );
+ clipRect = clipRect.intersect( TQRect( m_pixmapWidth - pixW, 0, pixW, pixH ) );
if ( clipRect.isValid() )
p.drawPixmap( m_pixmapWidth - pixW, -pixH/8, *bookmarkPixmap );
}
@@ -552,7 +552,7 @@ void ThumbnailWidget::paintEvent( QPaintEvent * e )
#define FILTERB_ID 1
-ThumbnailController::ThumbnailController( QWidget * parent, ThumbnailList * list )
+ThumbnailController::ThumbnailController( TQWidget * parent, ThumbnailList * list )
: KToolBar( parent, "ThumbsControlBar" )
{
// change toolbar appearance
@@ -563,8 +563,8 @@ ThumbnailController::ThumbnailController( QWidget * parent, ThumbnailList * list
// insert a togglebutton [show only bookmarked pages]
//insertSeparator();
- insertButton( "bookmark", FILTERB_ID, SIGNAL( toggled( bool ) ),
- list, SLOT( slotFilterBookmarks( bool ) ),
+ insertButton( "bookmark", FILTERB_ID, TQT_SIGNAL( toggled( bool ) ),
+ 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 e0f84610..a3f81b11 100644
--- a/kpdf/ui/thumbnaillist.h
+++ b/kpdf/ui/thumbnaillist.h
@@ -10,13 +10,13 @@
#ifndef _KPDF_THUMBNAILLIST_H_
#define _KPDF_THUMBNAILLIST_H_
-#include <qscrollview.h>
-#include <qvaluevector.h>
-#include <qvbox.h>
+#include <tqscrollview.h>
+#include <tqvaluevector.h>
+#include <tqvbox.h>
#include <ktoolbar.h>
#include "core/observer.h"
-class QTimer;
+class TQTimer;
class KActionCollection;
class KPDFDocument;
@@ -27,17 +27,17 @@ class ThumbnailWidget;
*
* ...
*/
-class ThumbnailList : public QScrollView, public DocumentObserver
+class ThumbnailList : public TQScrollView, public DocumentObserver
{
Q_OBJECT
public:
- ThumbnailList(QWidget *parent, KPDFDocument *document);
+ ThumbnailList(TQWidget *parent, KPDFDocument *document);
~ThumbnailList();
// inherited: return thumbnails observer id
uint observerId() const { return THUMBNAILS_ID; }
// inherited: create thumbnails ( inherited as a DocumentObserver )
- void notifySetup( const QValueVector< KPDFPage * > & pages, bool documentChanged );
+ void notifySetup( const TQValueVector< KPDFPage * > & pages, bool documentChanged );
// inherited: hilihght current thumbnail ( inherited as DocumentObserver )
void notifyViewportChanged( bool smoothMove );
// inherited: redraw thumbnail ( inherited as DocumentObserver )
@@ -51,9 +51,9 @@ Q_OBJECT
void updateWidgets();
// called by ThumbnailWidgets to send (forward) rightClick signals
- void forwardRightClick( const KPDFPage *, const QPoint & );
+ void forwardRightClick( const KPDFPage *, const TQPoint & );
// called by ThumbnailWidgets to get the overlay bookmark pixmap
- const QPixmap * getBookmarkOverlay() const;
+ const TQPixmap * getBookmarkOverlay() const;
public slots:
// these are connected to ThumbnailController buttons
@@ -61,30 +61,30 @@ Q_OBJECT
protected:
// scroll up/down the view
- void keyPressEvent( QKeyEvent * e );
+ void keyPressEvent( TQKeyEvent * e );
// select a thumbnail by clicking on it
- void contentsMousePressEvent( QMouseEvent * );
+ void contentsMousePressEvent( TQMouseEvent * );
// resize thumbnails to fit the width
- void viewportResizeEvent( QResizeEvent * );
+ void viewportResizeEvent( TQResizeEvent * );
// file drop related events (an url may be dropped even here)
- void dragEnterEvent( QDragEnterEvent* );
- void dropEvent( QDropEvent* );
+ void dragEnterEvent( TQDragEnterEvent* );
+ void dropEvent( TQDropEvent* );
signals:
void urlDropped( const KURL& );
- void rightClick( const KPDFPage *, const QPoint & );
+ void rightClick( const KPDFPage *, const TQPoint & );
private:
void delayedRequestVisiblePixmaps( int delayMs = 0 );
KPDFDocument *m_document;
ThumbnailWidget *m_selected;
- QTimer *m_delayTimer;
- QPixmap *m_bookmarkOverlay;
- QValueVector<ThumbnailWidget *> m_thumbnails;
- QValueList<ThumbnailWidget *> m_visibleThumbnails;
+ TQTimer *m_delayTimer;
+ TQPixmap *m_bookmarkOverlay;
+ TQValueVector<ThumbnailWidget *> m_thumbnails;
+ TQValueList<ThumbnailWidget *> m_visibleThumbnails;
int m_vectorIndex;
private slots:
@@ -100,8 +100,8 @@ Q_OBJECT
class ThumbnailsBox : public QVBox
{
public:
- ThumbnailsBox( QWidget * parent ) : QVBox( parent ) {};
- QSize sizeHint() const { return QSize(); }
+ ThumbnailsBox( TQWidget * parent ) : TQVBox( parent ) {};
+ TQSize sizeHint() const { return TQSize(); }
};
/**
@@ -115,7 +115,7 @@ class ThumbnailsBox : public QVBox
class ThumbnailController : public KToolBar
{
public:
- ThumbnailController( QWidget * parent, ThumbnailList * thumbnailList );
+ ThumbnailController( TQWidget * parent, ThumbnailList * thumbnailList );
};
#endif
diff --git a/kpdf/ui/toc.cpp b/kpdf/ui/toc.cpp
index 6db19933..015ba313 100644
--- a/kpdf/ui/toc.cpp
+++ b/kpdf/ui/toc.cpp
@@ -8,8 +8,8 @@
***************************************************************************/
// qt/kde includes
-#include <qheader.h>
-#include <qvariant.h>
+#include <tqheader.h>
+#include <tqvariant.h>
#include <klocale.h>
// local includes
@@ -25,7 +25,7 @@
class TOCItem : public KListViewItem
{
public:
- TOCItem( KListView *parent, TOCItem *after, const QDomElement & e )
+ TOCItem( KListView *parent, TOCItem *after, const TQDomElement & e )
: KListViewItem( parent, after, e.tagName() ), m_element( e )
{
#ifdef TOC_ENABLE_PAGE_COLUMN
@@ -35,7 +35,7 @@ class TOCItem : public KListViewItem
setMultiLinesEnabled(true);
}
- TOCItem( KListViewItem *parent, TOCItem *after, const QDomElement & e )
+ TOCItem( KListViewItem *parent, TOCItem *after, const TQDomElement & e )
: KListViewItem( parent, after, e.tagName() ), m_element( e )
{
#ifdef TOC_ENABLE_PAGE_COLUMN
@@ -45,16 +45,16 @@ class TOCItem : public KListViewItem
setMultiLinesEnabled(true);
}
- const QDomElement & element() const
+ const TQDomElement & element() const
{
return m_element;
}
private:
- QDomElement m_element;
+ TQDomElement m_element;
};
-TOC::TOC(QWidget *parent, KPDFDocument *document) : KListView(parent), m_document(document)
+TOC::TOC(TQWidget *parent, KPDFDocument *document) : KListView(parent), m_document(document)
{
addColumn( i18n("Topic") );
#ifdef TOC_ENABLE_PAGE_COLUMN
@@ -67,8 +67,8 @@ TOC::TOC(QWidget *parent, KPDFDocument *document) : KListView(parent), m_documen
// the next line causes bug:147233
// setResizeMode(AllColumns);
setAllColumnsShowFocus(true);
- connect(this, SIGNAL(clicked(QListViewItem *)), this, SLOT(slotExecuted(QListViewItem *)));
- connect(this, SIGNAL(returnPressed(QListViewItem *)), this, SLOT(slotExecuted(QListViewItem *)));
+ connect(this, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(slotExecuted(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(returnPressed(TQListViewItem *)), this, TQT_SLOT(slotExecuted(TQListViewItem *)));
}
TOC::~TOC()
@@ -81,7 +81,7 @@ uint TOC::observerId() const
return TOC_ID;
}
-void TOC::notifySetup( const QValueVector< KPDFPage * > & /*pages*/, bool documentChanged )
+void TOC::notifySetup( const TQValueVector< KPDFPage * > & /*pages*/, bool documentChanged )
{
if ( !documentChanged )
return;
@@ -104,15 +104,15 @@ void TOC::notifySetup( const QValueVector< KPDFPage * > & /*pages*/, bool docume
emit hasTOC( true );
}
-void TOC::addChildren( const QDomNode & parentNode, KListViewItem * parentItem )
+void TOC::addChildren( const TQDomNode & parentNode, KListViewItem * parentItem )
{
// keep track of the current listViewItem
TOCItem * currentItem = 0;
- QDomNode n = parentNode.firstChild();
+ TQDomNode n = parentNode.firstChild();
while( !n.isNull() )
{
// convert the node to an element (sure it is)
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
// insert the entry as top level (listview parented) or 2nd+ level
if ( !parentItem )
@@ -127,22 +127,22 @@ void TOC::addChildren( const QDomNode & parentNode, KListViewItem * parentItem )
// open/keep close the item
bool isOpen = false;
if ( e.hasAttribute( "Open" ) )
- isOpen = QVariant( e.attribute( "Open" ) ).toBool();
+ isOpen = TQVariant( e.attribute( "Open" ) ).toBool();
currentItem->setOpen( isOpen );
n = n.nextSibling();
}
}
-void TOC::slotExecuted( QListViewItem *i )
+void TOC::slotExecuted( TQListViewItem *i )
{
TOCItem* tocItem = dynamic_cast<TOCItem*>( i );
// that filters clicks on [+] that for a strange reason don't seem to be TOCItem*
if (tocItem == NULL)
return;
- const QDomElement & e = tocItem->element();
+ const TQDomElement & e = tocItem->element();
- QString externalFileName = e.attribute( "ExternalFileName" );
+ TQString externalFileName = e.attribute( "ExternalFileName" );
if ( !externalFileName.isEmpty() )
{
KPDFLinkGoto link( externalFileName, getViewport( e ) );
@@ -154,7 +154,7 @@ void TOC::slotExecuted( QListViewItem *i )
}
}
-DocumentViewport TOC::getViewport( const QDomElement &e ) const
+DocumentViewport TOC::getViewport( const TQDomElement &e ) const
{
if ( e.hasAttribute( "Viewport" ) )
{
@@ -164,8 +164,8 @@ DocumentViewport TOC::getViewport( const QDomElement &e ) const
else if ( e.hasAttribute( "ViewportName" ) )
{
// if the node references a viewport, get the reference and set it
- const QString & page = e.attribute( "ViewportName" );
- const QString & viewport = m_document->getMetaData( "NamedViewport", page );
+ const TQString & page = e.attribute( "ViewportName" );
+ const TQString & viewport = m_document->getMetaData( "NamedViewport", page );
if ( !viewport.isNull() )
return DocumentViewport( viewport );
}
diff --git a/kpdf/ui/toc.h b/kpdf/ui/toc.h
index eaa398a5..0f2915fd 100644
--- a/kpdf/ui/toc.h
+++ b/kpdf/ui/toc.h
@@ -10,7 +10,7 @@
#ifndef _KPDF_TOC_H_
#define _KPDF_TOC_H_
-#include <qdom.h>
+#include <tqdom.h>
#include <klistview.h>
#include "core/document.h"
#include "core/observer.h"
@@ -21,22 +21,22 @@ class TOC : public KListView, public DocumentObserver
{
Q_OBJECT
public:
- TOC(QWidget *parent, KPDFDocument *document);
+ TOC(TQWidget *parent, KPDFDocument *document);
~TOC();
// inherited from DocumentObserver
uint observerId() const;
- void notifySetup( const QValueVector< KPDFPage * > & pages, bool documentChanged );
+ void notifySetup( const TQValueVector< KPDFPage * > & pages, bool documentChanged );
signals:
void hasTOC(bool has);
private slots:
- void slotExecuted(QListViewItem *i);
+ void slotExecuted(TQListViewItem *i);
private:
- void addChildren( const QDomNode & parentNode, KListViewItem * parentItem = 0 );
- DocumentViewport getViewport( const QDomElement &e ) const;
+ void addChildren( const TQDomNode & parentNode, KListViewItem * parentItem = 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 b1083777..519e81a4 100644
--- a/kpdf/xpdf/xpdf/GlobalParams.cc
+++ b/kpdf/xpdf/xpdf/GlobalParams.cc
@@ -15,9 +15,9 @@
#include <string.h>
#include <strings.h>
// KPDF: additional includes for Qt and Xft
-#include <qstring.h>
-#include <qregexp.h>
-#include <qwindowdefs.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqwindowdefs.h>
// -- gentoo compile fix (XFree 4.3.0, FC 2.2.3, FreeType 2.1.9) --
// on other distros these 2 lines should't harm
#include <ft2build.h>
@@ -57,8 +57,8 @@
#endif
#include "GlobalParams.h"
-#include <qstring.h>
-#include <qregexp.h>
+#include <tqstring.h>
+#include <tqregexp.h>
#include <fontconfig/fontconfig.h>
#ifdef WIN32
@@ -699,7 +699,7 @@ GlobalParams::GlobalParams(char *cfgFileName) {
psPreload = gFalse;
psOPI = gFalse;
psASCIIHex = gFalse;
- // KPDF: use always UTF-8 and QString::fromUtf
+ // KPDF: use always UTF-8 and TQString::fromUtf
textEncoding = new GString("UTF-8");
#if defined(WIN32)
textEOL = eolDOS;
@@ -1057,7 +1057,7 @@ void GlobalParams::parseLine(char *buf, GString *fileName, int line) {
} else if (!cmd->cmp("psASCIIHex")) {
parseYesNo("psASCIIHex", &psASCIIHex, tokens, fileName, line);
} else if (!cmd->cmp("textEncoding")) {
-// Always use UTF-8 and allow QString do the magic
+// Always use UTF-8 and allow TQString do the magic
// parseTextEncoding(tokens, fileName, line);
} else if (!cmd->cmp("textEOL")) {
parseTextEOL(tokens, fileName, line);
@@ -2055,13 +2055,13 @@ FILE *GlobalParams::findToUnicodeFile(GString *name) {
// KPDF: parse xpdf font name into family and style
// Helvetica-BoldOblique => name=Helvetica, weight=Bold, slant=Oblique
-void parseStyle(QString& name, int& weight, int& slant, int& width)
+void parseStyle(TQString& name, int& weight, int& slant, int& width)
{
if (name.find("MS-") == 0) name = "MS " + name.remove(0,3);
if (!name.contains('-') && !name.contains(',')) return;
- QString type = name.section(QRegExp("[-,]"),-1);
- name = name.section(QRegExp("[-,]"),0,-2);
+ TQString type = name.section(TQRegExp("[-,]"),-1);
+ name = name.section(TQRegExp("[-,]"),0,-2);
if (type.contains("Oblique")) slant=FC_SLANT_OBLIQUE;
if (type.contains("Italic")) slant=FC_SLANT_ITALIC;
if (type.contains("Bold")) weight=FC_WEIGHT_BOLD;
@@ -2081,7 +2081,7 @@ DisplayFontParam *GlobalParams::getDisplayFont(GString *fontName) {
// KPDF: try to find font using Xft
if (!dfp) {
int weight=FC_WEIGHT_MEDIUM, slant=FC_SLANT_ROMAN, width=FC_WIDTH_NORMAL;
- QString name(fontName->getCString());
+ TQString name(fontName->getCString());
parseStyle(name,weight,slant,width);
p = FcPatternBuild(0,FC_FAMILY,FcTypeString, name.ascii(),
diff --git a/kpovmodeler/pm2dcontrolpoint.cpp b/kpovmodeler/pm2dcontrolpoint.cpp
index 66e7a85a..f8450715 100644
--- a/kpovmodeler/pm2dcontrolpoint.cpp
+++ b/kpovmodeler/pm2dcontrolpoint.cpp
@@ -21,7 +21,7 @@
PM2DControlPoint::PM2DControlPoint( const PMVector& point,
PM2DControlPoint::CPType type, int id,
- const QString& description )
+ const TQString& description )
: PMControlPoint( id, description )
{
m_point = point;
@@ -34,7 +34,7 @@ PM2DControlPoint::PM2DControlPoint( const PMVector& point,
void PM2DControlPoint::graphicalChangeStarted( )
{
- QPtrListIterator<PM2DControlPoint> it( m_linkedPoints );
+ TQPtrListIterator<PM2DControlPoint> it( m_linkedPoints );
for( ; *it; ++it )
if( !( *it )->selected( ) )
( *it )->graphicalChangeStarted( );
@@ -63,7 +63,7 @@ void PM2DControlPoint::graphicalChange( const PMVector& startPoint,
m_point = op;
}
- QPtrListIterator<PM2DControlPoint> it( m_linkedPoints );
+ TQPtrListIterator<PM2DControlPoint> it( m_linkedPoints );
for( ; *it; ++it )
{
( *it )->m_point = m_point + ( *it )->m_original2DPoint
@@ -110,7 +110,7 @@ void PM2DControlPoint::snapToGrid( )
if( diff )
m_point += m_pBasePoint->m_point;
- QPtrListIterator<PM2DControlPoint> it( m_linkedPoints );
+ TQPtrListIterator<PM2DControlPoint> it( m_linkedPoints );
for( ; *it; ++it )
{
( *it )->m_point += change;
diff --git a/kpovmodeler/pm2dcontrolpoint.h b/kpovmodeler/pm2dcontrolpoint.h
index f949570b..40b26d85 100644
--- a/kpovmodeler/pm2dcontrolpoint.h
+++ b/kpovmodeler/pm2dcontrolpoint.h
@@ -25,7 +25,7 @@
#include "pmcontrolpoint.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
/**
* Class for free moveable control points
@@ -41,7 +41,7 @@ public:
* Creates a PM2DControlPoint with id. Point has to be a 2D vector.
*/
PM2DControlPoint( const PMVector& point, CPType type,
- int id, const QString& description );
+ int id, const TQString& description );
/**
* Deletes the PM2DControlPoint
*/
@@ -128,7 +128,7 @@ private:
double m_thirdCoordinate;
double m_scale;
PM2DControlPoint* m_pBasePoint;
- QPtrList<PM2DControlPoint> m_linkedPoints;
+ TQPtrList<PM2DControlPoint> m_linkedPoints;
PM2DControlPoint* m_pLatheLink;
};
diff --git a/kpovmodeler/pm3dcontrolpoint.cpp b/kpovmodeler/pm3dcontrolpoint.cpp
index 7bd4e10e..d430eac7 100644
--- a/kpovmodeler/pm3dcontrolpoint.cpp
+++ b/kpovmodeler/pm3dcontrolpoint.cpp
@@ -20,7 +20,7 @@
#include <math.h>
PM3DControlPoint::PM3DControlPoint( const PMVector& point, int id,
- const QString& description )
+ const TQString& description )
: PMControlPoint( id, description )
{
m_point = point;
diff --git a/kpovmodeler/pm3dcontrolpoint.h b/kpovmodeler/pm3dcontrolpoint.h
index 765c4e43..3af82a28 100644
--- a/kpovmodeler/pm3dcontrolpoint.h
+++ b/kpovmodeler/pm3dcontrolpoint.h
@@ -35,7 +35,7 @@ public:
/**
* Creates a PM3DControlPoint with id.
*/
- PM3DControlPoint( const PMVector& point, int id, const QString& description );
+ PM3DControlPoint( const PMVector& point, int id, const TQString& description );
/**
* Deletes the PM3DControlPoint
*/
diff --git a/kpovmodeler/pmactions.cpp b/kpovmodeler/pmactions.cpp
index b84e42da..12bb479b 100644
--- a/kpovmodeler/pmactions.cpp
+++ b/kpovmodeler/pmactions.cpp
@@ -17,12 +17,12 @@
#include "pmactions.h"
-#include <qcombobox.h>
-#include <qwhatsthis.h>
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <qstyle.h>
-#include <qpainter.h>
+#include <tqcombobox.h>
+#include <tqwhatsthis.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
+#include <tqstyle.h>
+#include <tqpainter.h>
#include <ktoolbar.h>
#include <ktoolbarbutton.h>
@@ -34,25 +34,25 @@
class PMComboBox : public QComboBox
{
public:
- PMComboBox( QWidget* parent, const char* name = 0 )
- : QComboBox( parent, name )
+ PMComboBox( TQWidget* parent, const char* name = 0 )
+ : TQComboBox( parent, name )
{
}
- virtual QSize minimumSizeHint( ) const
+ virtual TQSize minimumSizeHint( ) const
{
- QSize s = QComboBox::minimumSizeHint( );
+ TQSize s = TQComboBox::minimumSizeHint( );
return s.expandedTo( minimumSize( ) );
}
- virtual QSize sizeHint( ) const
+ virtual TQSize sizeHint( ) const
{
- QSize s = QComboBox::sizeHint( );
+ TQSize s = TQComboBox::sizeHint( );
return s.expandedTo( minimumSize( ) );
}
};
-PMComboAction::PMComboAction( const QString& text, int accel, const QObject* receiver, const char* member,
- QObject* parent, const char* name )
+PMComboAction::PMComboAction( const TQString& text, int accel, const TQObject* receiver, const char* member,
+ TQObject* parent, const char* name )
: KAction( text, accel, parent, name )
{
m_receiver = receiver;
@@ -65,7 +65,7 @@ PMComboAction::~PMComboAction( )
{
}
-int PMComboAction::plug( QWidget* w, int index )
+int PMComboAction::plug( TQWidget* w, int index )
{
if( !w->inherits( "KToolBar" ) )
return -1;
@@ -74,7 +74,7 @@ int PMComboAction::plug( QWidget* w, int index )
int id = KAction::getToolButtonID( );
- QComboBox* comboBox = new PMComboBox( toolBar );
+ TQComboBox* comboBox = new PMComboBox( toolBar );
if( m_minWidth > 0 )
comboBox->setMinimumWidth( m_minWidth );
if( m_maxWidth > 0 )
@@ -82,11 +82,11 @@ int PMComboAction::plug( QWidget* w, int index )
toolBar->insertWidget( id, m_minWidth > 0 ? m_minWidth : 300,
comboBox, index );
- connect( comboBox, SIGNAL( activated( int ) ), m_receiver, m_member );
+ connect( comboBox, TQT_SIGNAL( activated( int ) ), m_receiver, m_member );
addContainer( toolBar, id );
- connect( toolBar, SIGNAL( destroyed( ) ), this, SLOT( slotDestroyed( ) ) );
+ connect( toolBar, TQT_SIGNAL( destroyed( ) ), this, TQT_SLOT( slotDestroyed( ) ) );
//toolBar->setItemAutoSized( id, true );
@@ -94,12 +94,12 @@ int PMComboAction::plug( QWidget* w, int index )
emit plugged( );
- QWhatsThis::add( comboBox, whatsThis( ) );
+ TQWhatsThis::add( comboBox, whatsThis( ) );
return containerCount( ) - 1;
}
-void PMComboAction::unplug( QWidget *w )
+void PMComboAction::unplug( TQWidget *w )
{
if( !w->inherits( "KToolBar" ) )
return;
@@ -120,40 +120,40 @@ void PMComboAction::unplug( QWidget *w )
class PMToolBarLabel : public QToolButton
{
public:
- PMToolBarLabel( const QString& text, QWidget* parent = 0, const char* name = 0 )
- : QToolButton( parent, name )
+ PMToolBarLabel( const TQString& text, TQWidget* parent = 0, const char* name = 0 )
+ : TQToolButton( parent, name )
{
setText( text );
}
protected:
- QSize sizeHint( ) const
+ TQSize sizeHint( ) const
{
int w = fontMetrics( ).width( text( ) );
int h = fontMetrics( ).height( );
- return QSize( w, h );
+ return TQSize( w, h );
}
- void drawButton( QPainter* p )
+ void drawButton( TQPainter* p )
{
#if ( QT_VERSION >= 300 )
// Draw the background
- style( ).drawComplexControl( QStyle::CC_ToolButton, p, this, rect( ), colorGroup( ),
- QStyle::Style_Enabled, QStyle::SC_ToolButton );
+ style( ).drawComplexControl( TQStyle::CC_ToolButton, p, this, rect( ), colorGroup( ),
+ TQStyle::Style_Enabled, TQStyle::SC_ToolButton );
// Draw the label
- style( ).drawControl( QStyle::CE_ToolButtonLabel, p, this, rect( ), colorGroup( ),
- QStyle::Style_Enabled );
+ style( ).drawControl( TQStyle::CE_ToolButtonLabel, p, this, rect( ), colorGroup( ),
+ TQStyle::Style_Enabled );
#else
p->drawText( rect( ), Qt::AlignVCenter | Qt::AlignLeft, text( ) );
#endif
}
};
-PMLabelAction::PMLabelAction( const QString &text, QObject *parent, const char *name )
+PMLabelAction::PMLabelAction( const TQString &text, TQObject *parent, const char *name )
: KAction( text, 0, parent, name )
{
m_button = 0;
}
-int PMLabelAction::plug( QWidget *widget, int index )
+int PMLabelAction::plug( TQWidget *widget, int index )
{
//do not call the previous implementation here
@@ -168,7 +168,7 @@ int PMLabelAction::plug( QWidget *widget, int index )
addContainer( tb, id );
- connect( tb, SIGNAL( destroyed( ) ), this, SLOT( slotDestroyed( ) ) );
+ connect( tb, TQT_SIGNAL( destroyed( ) ), this, TQT_SLOT( slotDestroyed( ) ) );
return containerCount( ) - 1;
}
@@ -176,7 +176,7 @@ int PMLabelAction::plug( QWidget *widget, int index )
return -1;
}
-void PMLabelAction::unplug( QWidget *widget )
+void PMLabelAction::unplug( TQWidget *widget )
{
if( widget->inherits( "KToolBar" ) )
{
@@ -196,8 +196,8 @@ void PMLabelAction::unplug( QWidget *widget )
}
-PMSpinBoxAction::PMSpinBoxAction( const QString& text, int accel, const QObject* receiver, const char* member,
- QObject* parent, const char* name )
+PMSpinBoxAction::PMSpinBoxAction( const TQString& text, int accel, const TQObject* receiver, const char* member,
+ TQObject* parent, const char* name )
: KAction( text, accel, parent, name )
{
m_receiver = receiver;
@@ -208,7 +208,7 @@ PMSpinBoxAction::~PMSpinBoxAction( )
{
}
-int PMSpinBoxAction::plug( QWidget* w, int index )
+int PMSpinBoxAction::plug( TQWidget* w, int index )
{
if( !w->inherits( "KToolBar" ) )
return -1;
@@ -217,26 +217,26 @@ int PMSpinBoxAction::plug( QWidget* w, int index )
int id = KAction::getToolButtonID( );
- QSpinBox* spinBox = new QSpinBox( -1000, 1000, 1, w );
+ TQSpinBox* spinBox = new TQSpinBox( -1000, 1000, 1, w );
toolBar->insertWidget( id, 70, spinBox, index );
- connect( spinBox, SIGNAL( valueChanged( int ) ), m_receiver, m_member );
+ connect( spinBox, TQT_SIGNAL( valueChanged( int ) ), m_receiver, m_member );
addContainer( toolBar, id );
- connect( toolBar, SIGNAL( destroyed( ) ), this, SLOT( slotDestroyed( ) ) );
+ connect( toolBar, TQT_SIGNAL( destroyed( ) ), this, TQT_SLOT( slotDestroyed( ) ) );
//toolBar->setItemAutoSized( id, false );
m_spinBox = spinBox;
emit plugged( );
- QWhatsThis::add( spinBox, whatsThis( ) );
+ TQWhatsThis::add( spinBox, whatsThis( ) );
return containerCount( ) - 1;
}
-void PMSpinBoxAction::unplug( QWidget *w )
+void PMSpinBoxAction::unplug( TQWidget *w )
{
if( !w->inherits( "KToolBar" ) )
return;
diff --git a/kpovmodeler/pmactions.h b/kpovmodeler/pmactions.h
index f4f8e9e4..6575caa8 100644
--- a/kpovmodeler/pmactions.h
+++ b/kpovmodeler/pmactions.h
@@ -20,13 +20,13 @@
#ifndef PMACTIONS_H
#define PMACTIONS_H
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kaction.h>
-class QComboBox;
-class QSpinBox;
-class QLabel;
-class QToolButton;
+class TQComboBox;
+class TQSpinBox;
+class TQLabel;
+class TQToolButton;
/**
* Combobox action for the toolbar.
@@ -37,14 +37,14 @@ class PMComboAction : public KAction
{
Q_OBJECT
public:
- PMComboAction( const QString& text, int accel, const QObject* receiver, const char* member, QObject* parent, const char* name );
+ PMComboAction( const TQString& text, int accel, const TQObject* receiver, const char* member, TQObject* parent, const char* name );
~PMComboAction( );
- virtual int plug( QWidget* w, int index = -1 );
+ virtual int plug( TQWidget* w, int index = -1 );
- virtual void unplug( QWidget* w );
+ virtual void unplug( TQWidget* w );
- QGuardedPtr<QComboBox> combo( ) { return m_combo; }
+ TQGuardedPtr<TQComboBox> combo( ) { return m_combo; }
void setMaximumWidth( int w ) { m_maxWidth = w; }
void setMinimumWidth( int w ) { m_minWidth = w; }
@@ -53,8 +53,8 @@ signals:
void plugged( );
private:
- QGuardedPtr<QComboBox> m_combo;
- const QObject* m_receiver;
+ TQGuardedPtr<TQComboBox> m_combo;
+ const TQObject* m_receiver;
const char* m_member;
int m_minWidth, m_maxWidth;
};
@@ -68,14 +68,14 @@ class PMLabelAction : public KAction
{
Q_OBJECT
public:
- PMLabelAction( const QString &text, QObject *parent = 0, const char *name = 0 );
+ PMLabelAction( const TQString &text, TQObject *parent = 0, const char *name = 0 );
- virtual int plug( QWidget *widget, int index = -1 );
- virtual void unplug( QWidget *widget );
- QToolButton* button( ) { return m_button; }
+ virtual int plug( TQWidget *widget, int index = -1 );
+ virtual void unplug( TQWidget *widget );
+ TQToolButton* button( ) { return m_button; }
private:
- QToolButton* m_button;
+ TQToolButton* m_button;
};
/**
@@ -85,20 +85,20 @@ class PMSpinBoxAction : public KAction
{
Q_OBJECT
public:
- PMSpinBoxAction( const QString& text, int accel, const QObject* receiver, const char* member, QObject* parent, const char* name );
+ PMSpinBoxAction( const TQString& text, int accel, const TQObject* receiver, const char* member, TQObject* parent, const char* name );
~PMSpinBoxAction( );
- virtual int plug( QWidget* w, int index = -1 );
- virtual void unplug( QWidget* w );
+ virtual int plug( TQWidget* w, int index = -1 );
+ virtual void unplug( TQWidget* w );
- QGuardedPtr<QSpinBox> spinBox( ) { return m_spinBox; }
+ TQGuardedPtr<TQSpinBox> spinBox( ) { return m_spinBox; }
signals:
void plugged( );
private:
- QGuardedPtr<QSpinBox> m_spinBox;
- const QObject* m_receiver;
+ TQGuardedPtr<TQSpinBox> m_spinBox;
+ const TQObject* m_receiver;
const char* m_member;
};
diff --git a/kpovmodeler/pmbicubicpatch.cpp b/kpovmodeler/pmbicubicpatch.cpp
index cbc633a9..2c1c99dd 100644
--- a/kpovmodeler/pmbicubicpatch.cpp
+++ b/kpovmodeler/pmbicubicpatch.cpp
@@ -161,12 +161,12 @@ PMBicubicPatch::~PMBicubicPatch( )
{
}
-QString PMBicubicPatch::description( ) const
+TQString PMBicubicPatch::description( ) const
{
return i18n( "bicubic patch" );
}
-void PMBicubicPatch::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMBicubicPatch::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
int i;
@@ -177,10 +177,10 @@ void PMBicubicPatch::serialize( QDomElement& e, QDomDocument& doc ) const
e.setAttribute( "uvEnabled", m_uvEnabled );
for( i = 0; i < 16; i++ )
- e.setAttribute( QString( "cp%1" ).arg( i ), m_point[i].serializeXML( ) );
+ e.setAttribute( TQString( "cp%1" ).arg( i ), m_point[i].serializeXML( ) );
for( i = 0; i < 4; ++i )
- e.setAttribute( QString( "uv%1" ).arg( i ), m_uvVectors[i].serializeXML( ) );
+ e.setAttribute( TQString( "uv%1" ).arg( 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( QString( "cp%1" ).arg( u+v*4 ),
+ m_point[u+v*4] = h.vectorAttribute( TQString( "cp%1" ).arg( u+v*4 ),
PMVector( o + s * u, 0, o + s * v ) );
m_uvVectors[0] = h.vectorAttribute( "uv0", c_defaultUVVector0 );
@@ -365,7 +365,7 @@ PMVector PMBicubicPatch::uvVector( int i ) const
return PMVector( 0.0, 0.0 );
}
-PMDialogEditBase* PMBicubicPatch::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMBicubicPatch::editWidget( TQWidget* parent ) const
{
return new PMBicubicPatchEdit( parent );
}
diff --git a/kpovmodeler/pmbicubicpatch.h b/kpovmodeler/pmbicubicpatch.h
index c7ca6b3b..d14f7821 100644
--- a/kpovmodeler/pmbicubicpatch.h
+++ b/kpovmodeler/pmbicubicpatch.h
@@ -53,25 +53,25 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMBicubicPatch( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
/** */
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMBicubicPatchEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmbicubicpatch" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmbicubicpatch" ); }
/** */
virtual void restoreMemento( PMMemento* s );
diff --git a/kpovmodeler/pmbicubicpatchedit.cpp b/kpovmodeler/pmbicubicpatchedit.cpp
index 6ead96ae..8dff49b0 100644
--- a/kpovmodeler/pmbicubicpatchedit.cpp
+++ b/kpovmodeler/pmbicubicpatchedit.cpp
@@ -23,13 +23,13 @@
#include "pmvectorlistedit.h"
#include "pmpart.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
#include <klocale.h>
-PMBicubicPatchEdit::PMBicubicPatchEdit( QWidget* parent, const char* name )
+PMBicubicPatchEdit::PMBicubicPatchEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -39,54 +39,54 @@ void PMBicubicPatchEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* layout;
+ TQHBoxLayout* layout;
- m_pType = new QComboBox( false, this );
+ m_pType = new TQComboBox( false, this );
m_pType->insertItem( i18n( "Normal (type 0)" ) );
m_pType->insertItem( i18n( "Preprocessed (type 1)" ) );
- layout = new QHBoxLayout( topLayout( ) );
- layout->addWidget( new QLabel( i18n( "Type:" ), this ) );
+ layout = new TQHBoxLayout( topLayout( ) );
+ layout->addWidget( new TQLabel( i18n( "Type:" ), this ) );
layout->addWidget( m_pType );
layout->addStretch( 1 );
m_pUSteps = new PMIntEdit( this );
m_pUSteps->setValidation( true, 0, false, 0 );
- layout = new QHBoxLayout( topLayout( ) );
- layout->addWidget( new QLabel( i18n( "Steps:" ) + " u", this ) );
+ layout = new TQHBoxLayout( topLayout( ) );
+ layout->addWidget( new TQLabel( i18n( "Steps:" ) + " u", this ) );
layout->addWidget( m_pUSteps );
m_pVSteps = new PMIntEdit( this );
m_pVSteps->setValidation( true, 0, false, 0 );
- layout->addWidget( new QLabel( "v", this ) );
+ layout->addWidget( new TQLabel( "v", this ) );
layout->addWidget( m_pVSteps );
m_pFlatness = new PMFloatEdit( this );
m_pFlatness->setValidation( true, 0.0, false, 0.0 );
- layout = new QHBoxLayout( topLayout( ) );
- layout->addWidget( new QLabel( i18n( "Flatness:" ), this ) );
+ layout = new TQHBoxLayout( topLayout( ) );
+ layout->addWidget( new TQLabel( i18n( "Flatness:" ), this ) );
layout->addWidget( m_pFlatness );
layout->addStretch( 1 );
- topLayout( )->addWidget( new QLabel( i18n( "Points:" ), this ) );
+ topLayout( )->addWidget( new TQLabel( i18n( "Points:" ), this ) );
m_pPoints = new PMVectorListEdit( "x", "y", "z", this );
m_pPoints->setSize( 16 );
topLayout( )->addWidget( m_pPoints );
- m_pUVEnabled = new QCheckBox( i18n( "UV vectors" ), this );
+ m_pUVEnabled = new TQCheckBox( i18n( "UV vectors" ), this );
topLayout( )->addWidget( m_pUVEnabled );
m_pUVVectors = new PMVectorListEdit( "u", "v", this );
m_pUVVectors->setSize( 4 );
topLayout( )->addWidget( m_pUVVectors );
- connect( m_pType, SIGNAL( highlighted( int ) ), SLOT( slotTypeSelected( int ) ) );
- connect( m_pUSteps, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pVSteps, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pFlatness, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pPoints, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pPoints, SIGNAL( selectionChanged( ) ),
- SLOT( slotSelectionChanged( ) ) );
- connect( m_pUVEnabled, SIGNAL( clicked( ) ), SLOT( slotUVEnabledClicked( ) ) );
- connect( m_pUVVectors, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pType, TQT_SIGNAL( highlighted( int ) ), TQT_SLOT( slotTypeSelected( int ) ) );
+ connect( m_pUSteps, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pVSteps, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pFlatness, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pPoints, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pPoints, TQT_SIGNAL( selectionChanged( ) ),
+ TQT_SLOT( slotSelectionChanged( ) ) );
+ connect( m_pUVEnabled, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotUVEnabledClicked( ) ) );
+ connect( m_pUVVectors, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMBicubicPatchEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmbicubicpatchedit.h b/kpovmodeler/pmbicubicpatchedit.h
index 41d173c1..ac00f00a 100644
--- a/kpovmodeler/pmbicubicpatchedit.h
+++ b/kpovmodeler/pmbicubicpatchedit.h
@@ -30,8 +30,8 @@ class PMBicubicPatch;
class PMIntEdit;
class PMFloatEdit;
class PMVectorListEdit;
-class QComboBox;
-class QCheckBox;
+class TQComboBox;
+class TQCheckBox;
/**
* Dialog edit class for @ref PMBicubicPatch
@@ -44,7 +44,7 @@ public:
/**
* Creates a PMBicubicPatchEdit with parent and name
*/
- PMBicubicPatchEdit( QWidget* parent, const char* name = 0 );
+ PMBicubicPatchEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -65,12 +65,12 @@ protected:
virtual void saveContents( );
private:
- QComboBox* m_pType;
+ TQComboBox* m_pType;
PMIntEdit* m_pUSteps;
PMIntEdit* m_pVSteps;
PMFloatEdit* m_pFlatness;
PMVectorListEdit* m_pPoints;
- QCheckBox* m_pUVEnabled;
+ TQCheckBox* m_pUVEnabled;
PMVectorListEdit* m_pUVVectors;
PMBicubicPatch* m_pDisplayedObject;
diff --git a/kpovmodeler/pmblendmapmodifiers.cpp b/kpovmodeler/pmblendmapmodifiers.cpp
index 0259fb90..9d26419e 100644
--- a/kpovmodeler/pmblendmapmodifiers.cpp
+++ b/kpovmodeler/pmblendmapmodifiers.cpp
@@ -85,12 +85,12 @@ PMMetaObject* PMBlendMapModifiers::metaObject( ) const
PMWaveFormProperty* p = new PMWaveFormProperty(
"waveForm", &PMBlendMapModifiers::setWaveFormType,
&PMBlendMapModifiers::waveFormType );
- p->addEnumValue( QString( "RampWave" ), RampWave );
- p->addEnumValue( QString( "TriangleWave" ), TriangleWave );
- p->addEnumValue( QString( "SineWave" ), SineWave );
- p->addEnumValue( QString( "ScallopWave" ), ScallopWave );
- p->addEnumValue( QString( "CubicWave" ), CubicWave );
- p->addEnumValue( QString( "PolyWave" ), PolyWave );
+ p->addEnumValue( TQString( "RampWave" ), RampWave );
+ p->addEnumValue( TQString( "TriangleWave" ), TriangleWave );
+ p->addEnumValue( TQString( "SineWave" ), SineWave );
+ p->addEnumValue( TQString( "ScallopWave" ), ScallopWave );
+ p->addEnumValue( TQString( "CubicWave" ), CubicWave );
+ p->addEnumValue( TQString( "PolyWave" ), PolyWave );
s_pMetaObject->addProperty( p );
}
return s_pMetaObject;
@@ -106,12 +106,12 @@ void PMBlendMapModifiers::cleanUp( ) const
Base::cleanUp( );
}
-QString PMBlendMapModifiers::description( ) const
+TQString PMBlendMapModifiers::description( ) const
{
return i18n( "blend map modifiers" );
}
-void PMBlendMapModifiers::serialize( QDomElement& e, QDomDocument& ) const
+void PMBlendMapModifiers::serialize( TQDomElement& e, TQDomDocument& ) const
{
e.setAttribute( "frequency", m_frequency );
e.setAttribute( "phase", m_phase );
@@ -144,7 +144,7 @@ void PMBlendMapModifiers::serialize( QDomElement& e, QDomDocument& ) const
void PMBlendMapModifiers::readAttributes( const PMXMLHelper& h )
{
- QString str = h.stringAttribute( "waveform_type", "ramp" );
+ TQString str = h.stringAttribute( "waveform_type", "ramp" );
if( str == "ramp" )
m_waveFormType = RampWave;
@@ -236,7 +236,7 @@ void PMBlendMapModifiers::setWaveFormType( PMWaveFormType c )
}
}
-PMDialogEditBase* PMBlendMapModifiers::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMBlendMapModifiers::editWidget( TQWidget* parent ) const
{
return new PMBlendMapModifiersEdit( parent );
}
diff --git a/kpovmodeler/pmblendmapmodifiers.h b/kpovmodeler/pmblendmapmodifiers.h
index 1fa45528..ecf0bfed 100644
--- a/kpovmodeler/pmblendmapmodifiers.h
+++ b/kpovmodeler/pmblendmapmodifiers.h
@@ -54,7 +54,7 @@ public:
virtual PMObject* copy( ) const { return new PMBlendMapModifiers( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -62,16 +62,16 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMBlendMapModifiersEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmblendmapmodifiers" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmblendmapmodifiers" ); }
/** */
virtual void restoreMemento( PMMemento* s );
diff --git a/kpovmodeler/pmblendmapmodifiersedit.cpp b/kpovmodeler/pmblendmapmodifiersedit.cpp
index 8e8ff150..fd443623 100644
--- a/kpovmodeler/pmblendmapmodifiersedit.cpp
+++ b/kpovmodeler/pmblendmapmodifiersedit.cpp
@@ -24,20 +24,20 @@
#include "pmlineedits.h"
#include "pmvector.h"
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
#include <ktabctl.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kdialog.h>
#include <kfiledialog.h>
-PMBlendMapModifiersEdit::PMBlendMapModifiersEdit( QWidget* parent, const char* name )
+PMBlendMapModifiersEdit::PMBlendMapModifiersEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -45,27 +45,27 @@ PMBlendMapModifiersEdit::PMBlendMapModifiersEdit( QWidget* parent, const char* n
void PMBlendMapModifiersEdit::createTopWidgets( )
{
- QHBoxLayout* hl;
+ TQHBoxLayout* hl;
Base::createTopWidgets( );
- hl = new QHBoxLayout( topLayout( ) );
- m_pEnableFrequencyEdit = new QCheckBox( i18n( "Frequency:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ m_pEnableFrequencyEdit = new TQCheckBox( i18n( "Frequency:" ), this );
m_pFrequencyEdit = new PMFloatEdit( this );
hl->addWidget( m_pEnableFrequencyEdit );
hl->addWidget( m_pFrequencyEdit );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- m_pEnablePhaseEdit = new QCheckBox( i18n( "Phase:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ m_pEnablePhaseEdit = new TQCheckBox( i18n( "Phase:" ), this );
m_pPhaseEdit = new PMFloatEdit( this );
hl->addWidget( m_pEnablePhaseEdit );
hl->addWidget( m_pPhaseEdit );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- m_pEnableWaveFormEdit = new QCheckBox( i18n( "Wave form:" ), this );
- m_pWaveTypeCombo = new QComboBox( this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ m_pEnableWaveFormEdit = new TQCheckBox( i18n( "Wave form:" ), this );
+ m_pWaveTypeCombo = new TQComboBox( this );
m_pWaveTypeCombo->insertItem( i18n( "Ramp" ) );
m_pWaveTypeCombo->insertItem( i18n( "Triangle" ) );
m_pWaveTypeCombo->insertItem( i18n( "Sine" ) );
@@ -76,25 +76,25 @@ void PMBlendMapModifiersEdit::createTopWidgets( )
hl->addWidget( m_pWaveTypeCombo );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- m_pWaveExponentLabel = new QLabel( i18n( "Exponent:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ m_pWaveExponentLabel = new TQLabel( i18n( "Exponent:" ), this );
m_pWaveExponentEdit = new PMFloatEdit( this );
hl->addWidget( m_pWaveExponentLabel );
hl->addWidget( m_pWaveExponentEdit );
hl->addStretch( 1 );
- connect( m_pEnableFrequencyEdit, SIGNAL( clicked( ) ), SLOT( slotFrequencyClicked( ) ) );
- connect( m_pFrequencyEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pEnablePhaseEdit, SIGNAL( clicked( ) ), SLOT( slotPhaseClicked( ) ) );
- connect( m_pPhaseEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pEnableWaveFormEdit, SIGNAL( clicked( ) ), SLOT( slotWaveFormClicked( ) ) );
- connect( m_pWaveExponentEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pWaveTypeCombo, SIGNAL( activated( int ) ), SLOT( slotTypeComboChanged( int ) ) );
+ connect( m_pEnableFrequencyEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotFrequencyClicked( ) ) );
+ connect( m_pFrequencyEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pEnablePhaseEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotPhaseClicked( ) ) );
+ connect( m_pPhaseEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pEnableWaveFormEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotWaveFormClicked( ) ) );
+ connect( m_pWaveExponentEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pWaveTypeCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotTypeComboChanged( int ) ) );
}
void PMBlendMapModifiersEdit::displayObject( PMObject* o )
{
- QString str;
+ TQString str;
if( o->isA( "BlendMapModifiers" ) )
{
diff --git a/kpovmodeler/pmblendmapmodifiersedit.h b/kpovmodeler/pmblendmapmodifiersedit.h
index eb4e40b5..18f3fa87 100644
--- a/kpovmodeler/pmblendmapmodifiersedit.h
+++ b/kpovmodeler/pmblendmapmodifiersedit.h
@@ -28,14 +28,14 @@
class PMBlendMapModifiers;
class PMVectorEdit;
-class QComboBox;
+class TQComboBox;
class PMFloatEdit;
class PMIntEdit;
-class QLabel;
-class QCheckBox;
-class QWidget;
-class QLineEdit;
-class QPushButton;
+class TQLabel;
+class TQCheckBox;
+class TQWidget;
+class TQLineEdit;
+class TQPushButton;
/**
* Dialog edit class for @ref PMBlendMapModifiers.
@@ -48,7 +48,7 @@ public:
/**
* Creates a PMBlendMapModifiersEdit with parent and name
*/
- PMBlendMapModifiersEdit( QWidget* parent, const char* name = 0 );
+ PMBlendMapModifiersEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -86,14 +86,14 @@ private:
void setBlendMapModifiersType( int i );
PMBlendMapModifiers* m_pDisplayedObject;
- QComboBox* m_pWaveTypeCombo;
+ TQComboBox* m_pWaveTypeCombo;
PMFloatEdit* m_pFrequencyEdit;
PMFloatEdit* m_pPhaseEdit;
PMFloatEdit* m_pWaveExponentEdit;
- QLabel* m_pWaveExponentLabel;
- QCheckBox* m_pEnableFrequencyEdit;
- QCheckBox* m_pEnablePhaseEdit;
- QCheckBox* m_pEnableWaveFormEdit;
+ TQLabel* m_pWaveExponentLabel;
+ TQCheckBox* m_pEnableFrequencyEdit;
+ TQCheckBox* m_pEnablePhaseEdit;
+ TQCheckBox* m_pEnableWaveFormEdit;
};
diff --git a/kpovmodeler/pmblob.cpp b/kpovmodeler/pmblob.cpp
index 800c3b5a..6621cadf 100644
--- a/kpovmodeler/pmblob.cpp
+++ b/kpovmodeler/pmblob.cpp
@@ -56,12 +56,12 @@ PMBlob::~PMBlob( )
{
}
-QString PMBlob::description( ) const
+TQString PMBlob::description( ) const
{
return i18n( "blob" );
}
-void PMBlob::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMBlob::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "threshold", m_threshold );
e.setAttribute( "sturm", m_sturm );
@@ -139,7 +139,7 @@ void PMBlob::setHierarchy( bool h )
}
}
-PMDialogEditBase* PMBlob::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMBlob::editWidget( TQWidget* parent ) const
{
return new PMBlobEdit( parent );
}
diff --git a/kpovmodeler/pmblob.h b/kpovmodeler/pmblob.h
index 986cec8c..2c764590 100644
--- a/kpovmodeler/pmblob.h
+++ b/kpovmodeler/pmblob.h
@@ -50,25 +50,25 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMBlob( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
/** */
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMBlobEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmblob" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmblob" ); }
/**
* Returns the threshold
diff --git a/kpovmodeler/pmblobcylinder.cpp b/kpovmodeler/pmblobcylinder.cpp
index 687ce132..d166a6a3 100644
--- a/kpovmodeler/pmblobcylinder.cpp
+++ b/kpovmodeler/pmblobcylinder.cpp
@@ -70,12 +70,12 @@ PMBlobCylinder::~PMBlobCylinder( )
{
}
-QString PMBlobCylinder::description( ) const
+TQString PMBlobCylinder::description( ) const
{
return i18n( "blob cylinder" );
}
-void PMBlobCylinder::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMBlobCylinder::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "end_a", m_end1.serializeXML( ) );
e.setAttribute( "end_b", m_end2.serializeXML( ) );
@@ -160,7 +160,7 @@ void PMBlobCylinder::setStrength( double s )
}
}
-PMDialogEditBase* PMBlobCylinder::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMBlobCylinder::editWidget( TQWidget* parent ) const
{
return new PMBlobCylinderEdit( parent );
}
diff --git a/kpovmodeler/pmblobcylinder.h b/kpovmodeler/pmblobcylinder.h
index 80986cfe..1e9a10f1 100644
--- a/kpovmodeler/pmblobcylinder.h
+++ b/kpovmodeler/pmblobcylinder.h
@@ -54,23 +54,23 @@ public:
virtual PMObject* copy( ) const { return new PMBlobCylinder( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMBlobCylinderEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmblobcylinder" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmblobcylinder" ); }
/**
* Return the end_1
diff --git a/kpovmodeler/pmblobcylinderedit.cpp b/kpovmodeler/pmblobcylinderedit.cpp
index 9313b8af..34910df0 100644
--- a/kpovmodeler/pmblobcylinderedit.cpp
+++ b/kpovmodeler/pmblobcylinderedit.cpp
@@ -21,12 +21,12 @@
#include "pmvectoredit.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
-PMBlobCylinderEdit::PMBlobCylinderEdit( QWidget* parent, const char* name )
+PMBlobCylinderEdit::PMBlobCylinderEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -36,32 +36,32 @@ void PMBlobCylinderEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* layout;
- QGridLayout* gl;
+ TQHBoxLayout* layout;
+ TQGridLayout* gl;
m_pEnd1 = new PMVectorEdit( "x", "y", "z", this );
m_pEnd2 = new PMVectorEdit( "x", "y", "z", this );
m_pRadius = new PMFloatEdit( this );
m_pStrength = new PMFloatEdit( this );
- gl = new QGridLayout( topLayout( ), 2, 2 );
- gl->addWidget( new QLabel( i18n( "End 1:" ), this ), 0, 0 );
+ gl = new TQGridLayout( topLayout( ), 2, 2 );
+ gl->addWidget( new TQLabel( i18n( "End 1:" ), this ), 0, 0 );
gl->addWidget( m_pEnd1, 0, 1 );
- gl->addWidget( new QLabel( i18n( "End 2:" ), this ), 1, 0 );
+ gl->addWidget( new TQLabel( i18n( "End 2:" ), this ), 1, 0 );
gl->addWidget( m_pEnd2, 1, 1 );
- layout = new QHBoxLayout( topLayout( ) );
- gl = new QGridLayout( layout, 2, 2 );
- gl->addWidget( new QLabel( i18n( "Radius:" ), this ), 0, 0 );
+ layout = new TQHBoxLayout( topLayout( ) );
+ gl = new TQGridLayout( layout, 2, 2 );
+ gl->addWidget( new TQLabel( i18n( "Radius:" ), this ), 0, 0 );
gl->addWidget( m_pRadius, 0, 1 );
- gl->addWidget( new QLabel( i18n( "Strength:" ), this ), 1, 0 );
+ gl->addWidget( new TQLabel( i18n( "Strength:" ), this ), 1, 0 );
gl->addWidget( m_pStrength, 1, 1 );
layout->addStretch( 1 );
- connect( m_pEnd1, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pEnd2, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pStrength, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pEnd1, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pEnd2, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pStrength, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMBlobCylinderEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmblobcylinderedit.h b/kpovmodeler/pmblobcylinderedit.h
index d156e412..b9ab169e 100644
--- a/kpovmodeler/pmblobcylinderedit.h
+++ b/kpovmodeler/pmblobcylinderedit.h
@@ -38,7 +38,7 @@ public:
/**
* Creates a PMBlobCylinderEdit with parent and name
*/
- PMBlobCylinderEdit( QWidget* parent, const char* name = 0 );
+ PMBlobCylinderEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmblobedit.cpp b/kpovmodeler/pmblobedit.cpp
index 80ebd510..a38d9639 100644
--- a/kpovmodeler/pmblobedit.cpp
+++ b/kpovmodeler/pmblobedit.cpp
@@ -20,12 +20,12 @@
#include "pmblob.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
#include <klocale.h>
-PMBlobEdit::PMBlobEdit( QWidget* parent, const char* name )
+PMBlobEdit::PMBlobEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -35,8 +35,8 @@ void PMBlobEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Threshold:" ), this ) );
+ TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Threshold:" ), this ) );
m_pThreshold = new PMFloatEdit( this );
hl->addWidget( m_pThreshold );
m_pThreshold->setValidation( true, 0.0, false, 0 );
@@ -44,14 +44,14 @@ void PMBlobEdit::createTopWidgets( )
PMFloatEdit::OpLess );
hl->addStretch( 1 );
- m_pSturm = new QCheckBox( i18n( "Sturm" ), this );
+ m_pSturm = new TQCheckBox( i18n( "Sturm" ), this );
topLayout( )->addWidget( m_pSturm );
- m_pHierarchy = new QCheckBox( i18n( "Hierarchy" ), this );
+ m_pHierarchy = new TQCheckBox( i18n( "Hierarchy" ), this );
topLayout( )->addWidget( m_pHierarchy );
- connect( m_pThreshold, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pHierarchy, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pSturm, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pThreshold, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pHierarchy, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pSturm, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMBlobEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmblobedit.h b/kpovmodeler/pmblobedit.h
index df07ba30..5677fb9b 100644
--- a/kpovmodeler/pmblobedit.h
+++ b/kpovmodeler/pmblobedit.h
@@ -28,7 +28,7 @@
class PMBlob;
class PMFloatEdit;
-class QCheckBox;
+class TQCheckBox;
/**
* Dialog edit class for @ref PMBlob
@@ -41,7 +41,7 @@ public:
/**
* Creates a PMBlobEdit with parent and name
*/
- PMBlobEdit( QWidget* parent, const char* name = 0 );
+ PMBlobEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -57,8 +57,8 @@ protected:
private:
PMBlob* m_pDisplayedObject;
PMFloatEdit* m_pThreshold;
- QCheckBox* m_pSturm;
- QCheckBox* m_pHierarchy;
+ TQCheckBox* m_pSturm;
+ TQCheckBox* m_pHierarchy;
};
diff --git a/kpovmodeler/pmblobsphere.cpp b/kpovmodeler/pmblobsphere.cpp
index 6ca96769..cbcd33a4 100644
--- a/kpovmodeler/pmblobsphere.cpp
+++ b/kpovmodeler/pmblobsphere.cpp
@@ -67,7 +67,7 @@ PMBlobSphere::~PMBlobSphere( )
}
-QString PMBlobSphere::description( ) const
+TQString PMBlobSphere::description( ) const
{
return i18n( "blob sphere" );
}
@@ -91,7 +91,7 @@ PMMetaObject* PMBlobSphere::metaObject( ) const
return s_pMetaObject;
}
-void PMBlobSphere::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMBlobSphere::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "centre", m_centre.serializeXML( ) );
e.setAttribute( "radius", m_radius );
@@ -107,7 +107,7 @@ void PMBlobSphere::readAttributes( const PMXMLHelper& h )
Base::readAttributes( h );
}
-PMDialogEditBase* PMBlobSphere::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMBlobSphere::editWidget( TQWidget* parent ) const
{
return new PMBlobSphereEdit( parent );
}
diff --git a/kpovmodeler/pmblobsphere.h b/kpovmodeler/pmblobsphere.h
index bb75b856..0abe983e 100644
--- a/kpovmodeler/pmblobsphere.h
+++ b/kpovmodeler/pmblobsphere.h
@@ -52,24 +52,24 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMBlobSphere( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMBlobSphereEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmblobsphere" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmblobsphere" ); }
/**
* Returns the centre of the sphere
diff --git a/kpovmodeler/pmblobsphereedit.cpp b/kpovmodeler/pmblobsphereedit.cpp
index 26291248..ba4e226b 100644
--- a/kpovmodeler/pmblobsphereedit.cpp
+++ b/kpovmodeler/pmblobsphereedit.cpp
@@ -20,11 +20,11 @@
#include "pmvectoredit.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
-PMBlobSphereEdit::PMBlobSphereEdit( QWidget* parent, const char* name )
+PMBlobSphereEdit::PMBlobSphereEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -34,27 +34,27 @@ void PMBlobSphereEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* layout;
+ TQHBoxLayout* layout;
m_pCentre = new PMVectorEdit( "x", "y", "z", this );
m_pRadius = new PMFloatEdit( this );
m_pStrength = new PMFloatEdit( this );
- layout = new QHBoxLayout( topLayout( ) );
- layout->addWidget( new QLabel( i18n( "Center:" ), this ) );
+ layout = new TQHBoxLayout( topLayout( ) );
+ layout->addWidget( new TQLabel( i18n( "Center:" ), this ) );
layout->addWidget( m_pCentre );
- layout = new QHBoxLayout( topLayout( ) );
- QGridLayout* gl = new QGridLayout( layout, 2, 2 );
- gl->addWidget( new QLabel( i18n( "Radius:" ), this ), 0, 0 );
+ layout = new TQHBoxLayout( topLayout( ) );
+ TQGridLayout* gl = new TQGridLayout( layout, 2, 2 );
+ gl->addWidget( new TQLabel( i18n( "Radius:" ), this ), 0, 0 );
gl->addWidget( m_pRadius, 0, 1 );
- gl->addWidget( new QLabel( i18n( "Strength:" ), this ), 1, 0 );
+ gl->addWidget( new TQLabel( i18n( "Strength:" ), this ), 1, 0 );
gl->addWidget( m_pStrength, 1, 1 );
layout->addStretch( 1 );
- connect( m_pCentre, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pStrength, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pCentre, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pStrength, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMBlobSphereEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmblobsphereedit.h b/kpovmodeler/pmblobsphereedit.h
index 08f0f1d4..53b65ab2 100644
--- a/kpovmodeler/pmblobsphereedit.h
+++ b/kpovmodeler/pmblobsphereedit.h
@@ -39,7 +39,7 @@ public:
/**
* Creates a PMBlobSphereEdit with parent and name
*/
- PMBlobSphereEdit( QWidget* parent, const char* name = 0 );
+ PMBlobSphereEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmboundedby.cpp b/kpovmodeler/pmboundedby.cpp
index 127a05f8..5cc66e55 100644
--- a/kpovmodeler/pmboundedby.cpp
+++ b/kpovmodeler/pmboundedby.cpp
@@ -62,7 +62,7 @@ void PMBoundedBy::cleanUp( ) const
Base::cleanUp( );
}
-QString PMBoundedBy::description( ) const
+TQString PMBoundedBy::description( ) const
{
return i18n( "bounded by" );
}
@@ -79,7 +79,7 @@ bool PMBoundedBy::clippedBy( ) const
return cb;
}
-void PMBoundedBy::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMBoundedBy::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
// no extra data at the moment
Base::serialize( e, doc );
@@ -91,7 +91,7 @@ void PMBoundedBy::readAttributes( const PMXMLHelper& h )
Base::readAttributes( h );
}
-PMDialogEditBase* PMBoundedBy::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMBoundedBy::editWidget( TQWidget* parent ) const
{
return new PMBoundedByEdit( parent );
}
diff --git a/kpovmodeler/pmboundedby.h b/kpovmodeler/pmboundedby.h
index 22ac3fb4..7c88a6aa 100644
--- a/kpovmodeler/pmboundedby.h
+++ b/kpovmodeler/pmboundedby.h
@@ -46,7 +46,7 @@ public:
virtual PMObject* copy( ) const { return new PMBoundedBy( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -57,19 +57,19 @@ public:
virtual bool dataChangeOnInsertRemove( ) const { return true; }
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMBoundedByEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmboundedby" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmboundedby" ); }
/** */
virtual void childRemoved( PMObject* );
diff --git a/kpovmodeler/pmboundedbyedit.cpp b/kpovmodeler/pmboundedbyedit.cpp
index 2bf1409e..8a41fa52 100644
--- a/kpovmodeler/pmboundedbyedit.cpp
+++ b/kpovmodeler/pmboundedbyedit.cpp
@@ -19,11 +19,11 @@
#include "pmboundedbyedit.h"
#include "pmboundedby.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
-PMBoundedByEdit::PMBoundedByEdit( QWidget* parent, const char* name )
+PMBoundedByEdit::PMBoundedByEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -33,9 +33,9 @@ void PMBoundedByEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- m_pChildLabel = new QLabel( i18n( "No child objects" ), this );
+ m_pChildLabel = new TQLabel( i18n( "No child objects" ), this );
topLayout( )->addWidget( m_pChildLabel );
- m_pClippedByLabel = new QLabel( i18n( "(= clipped by)" ), this );
+ m_pClippedByLabel = new TQLabel( i18n( "(= clipped by)" ), this );
topLayout( )->addWidget( m_pClippedByLabel );
}
diff --git a/kpovmodeler/pmboundedbyedit.h b/kpovmodeler/pmboundedbyedit.h
index f4d24a41..53da66f2 100644
--- a/kpovmodeler/pmboundedbyedit.h
+++ b/kpovmodeler/pmboundedbyedit.h
@@ -27,7 +27,7 @@
#include "pmdialogeditbase.h"
class PMBoundedBy;
-class QLabel;
+class TQLabel;
/**
* Dialog edit class for @ref PMBoundedBy
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMBoundedByEdit with parent and name
*/
- PMBoundedByEdit( QWidget* parent, const char* name = 0 );
+ PMBoundedByEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -51,8 +51,8 @@ protected:
private:
PMBoundedBy* m_pDisplayedObject;
- QLabel* m_pChildLabel;
- QLabel* m_pClippedByLabel;
+ TQLabel* m_pChildLabel;
+ TQLabel* m_pClippedByLabel;
};
diff --git a/kpovmodeler/pmbox.cpp b/kpovmodeler/pmbox.cpp
index 045389bb..155ebc68 100644
--- a/kpovmodeler/pmbox.cpp
+++ b/kpovmodeler/pmbox.cpp
@@ -57,12 +57,12 @@ PMBox::~PMBox( )
{
}
-QString PMBox::description( ) const
+TQString PMBox::description( ) const
{
return i18n( "box" );
}
-void PMBox::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMBox::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "corner_a", m_corner1.serializeXML( ) );
e.setAttribute( "corner_b", m_corner2.serializeXML( ) );
@@ -114,7 +114,7 @@ void PMBox::setCorner2( const PMVector& p )
}
}
-PMDialogEditBase* PMBox::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMBox::editWidget( TQWidget* parent ) const
{
return new PMBoxEdit( parent );
}
diff --git a/kpovmodeler/pmbox.h b/kpovmodeler/pmbox.h
index d6627ffe..e6abcf75 100644
--- a/kpovmodeler/pmbox.h
+++ b/kpovmodeler/pmbox.h
@@ -53,24 +53,24 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMBox( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMBoxEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmbox" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmbox" ); }
/**
* Returns Corner_1
diff --git a/kpovmodeler/pmboxedit.cpp b/kpovmodeler/pmboxedit.cpp
index 2db1eb79..6b6a2f2a 100644
--- a/kpovmodeler/pmboxedit.cpp
+++ b/kpovmodeler/pmboxedit.cpp
@@ -20,11 +20,11 @@
#include "pmbox.h"
#include "pmvectoredit.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
-PMBoxEdit::PMBoxEdit( QWidget* parent, const char* name )
+PMBoxEdit::PMBoxEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -37,14 +37,14 @@ void PMBoxEdit::createTopWidgets( )
m_pCorner1 = new PMVectorEdit( "x", "y", "z", this );
m_pCorner2 = new PMVectorEdit( "x", "y", "z", this );
- QGridLayout* gl = new QGridLayout( topLayout( ), 2, 2 );
- gl->addWidget( new QLabel( i18n( "Corner 1:" ), this ), 0, 0 );
+ TQGridLayout* gl = new TQGridLayout( topLayout( ), 2, 2 );
+ gl->addWidget( new TQLabel( i18n( "Corner 1:" ), this ), 0, 0 );
gl->addWidget( m_pCorner1, 0, 1 );
- gl->addWidget( new QLabel( i18n( "Corner 2:" ), this ), 1, 0 );
+ gl->addWidget( new TQLabel( i18n( "Corner 2:" ), this ), 1, 0 );
gl->addWidget( m_pCorner2, 1, 1 );
- connect( m_pCorner1, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pCorner2, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pCorner1, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pCorner2, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMBoxEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmboxedit.h b/kpovmodeler/pmboxedit.h
index 4f87ceac..7fd6fadc 100644
--- a/kpovmodeler/pmboxedit.h
+++ b/kpovmodeler/pmboxedit.h
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMBoxEdit with parent and name
*/
- PMBoxEdit( QWidget* parent, const char* name = 0 );
+ PMBoxEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmbumpmap.cpp b/kpovmodeler/pmbumpmap.cpp
index e9549bd9..21fb29a3 100644
--- a/kpovmodeler/pmbumpmap.cpp
+++ b/kpovmodeler/pmbumpmap.cpp
@@ -82,7 +82,7 @@ PMBumpMap::~PMBumpMap( )
{
}
-void PMBumpMap::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMBumpMap::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
switch( m_bitmapType )
{
@@ -151,7 +151,7 @@ void PMBumpMap::serialize( QDomElement& e, QDomDocument& doc ) const
void PMBumpMap::readAttributes( const PMXMLHelper& h )
{
- QString str;
+ TQString str;
str = h.stringAttribute( "bitmap_type", "sys" );
if( str == "gif" )
@@ -261,7 +261,7 @@ void PMBumpMap::cleanUp( ) const
}
-QString PMBumpMap::description( ) const
+TQString PMBumpMap::description( ) const
{
return i18n( "bump map" );
}
@@ -276,7 +276,7 @@ void PMBumpMap::setBitmapType( PMBitmapType c )
}
}
-void PMBumpMap::setBitmapFileName( const QString& c )
+void PMBumpMap::setBitmapFileName( const TQString& c )
{
if( c != m_bitmapFile )
{
@@ -336,7 +336,7 @@ void PMBumpMap::setBumpSize( double c )
}
}
-PMDialogEditBase* PMBumpMap::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMBumpMap::editWidget( TQWidget* parent ) const
{
return new PMBumpMapEdit( parent );
}
diff --git a/kpovmodeler/pmbumpmap.h b/kpovmodeler/pmbumpmap.h
index 69bf53a3..ccdf5b98 100644
--- a/kpovmodeler/pmbumpmap.h
+++ b/kpovmodeler/pmbumpmap.h
@@ -69,7 +69,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMBumpMap( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -77,17 +77,17 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmbumpmap" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmbumpmap" ); }
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMBumpMapEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Gets the bitmap type
@@ -96,7 +96,7 @@ public:
/**
* Gets the bitmap file name
*/
- QString bitmapFile( ) const { return m_bitmapFile; }
+ TQString bitmapFile( ) const { return m_bitmapFile; }
/**
* Returns true if use_index is enabled
*/
@@ -125,7 +125,7 @@ public:
void setBitmapType( PMBitmapType c );
/**
* Sets the bitmap file name*/
- void setBitmapFileName( const QString& c );
+ void setBitmapFileName( const TQString& c );
/**
* Sets if use_index is enabled
*/
@@ -159,7 +159,7 @@ private:
* BumpMap type
*/
PMBitmapType m_bitmapType;
- QString m_bitmapFile;
+ TQString m_bitmapFile;
bool m_once;
PMMapType m_mapType;
PMInterpolateType m_interpolateType;
diff --git a/kpovmodeler/pmbumpmapedit.cpp b/kpovmodeler/pmbumpmapedit.cpp
index d792cec2..f5de7a55 100644
--- a/kpovmodeler/pmbumpmapedit.cpp
+++ b/kpovmodeler/pmbumpmapedit.cpp
@@ -23,14 +23,14 @@
#include "pmpalettevalueedit.h"
#include "pmvector.h"
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
#include <ktabctl.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -38,7 +38,7 @@
#include <kfiledialog.h>
#include <kiconloader.h>
-PMBumpMapEdit::PMBumpMapEdit( QWidget* parent, const char* name )
+PMBumpMapEdit::PMBumpMapEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -46,14 +46,14 @@ PMBumpMapEdit::PMBumpMapEdit( QWidget* parent, const char* name )
void PMBumpMapEdit::createTopWidgets( )
{
- QLabel* lbl;
- QHBoxLayout* hl;
+ TQLabel* lbl;
+ TQHBoxLayout* hl;
Base::createTopWidgets( );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "File type:" ), this );
- m_pImageFileTypeEdit = new QComboBox( this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "File type:" ), this );
+ m_pImageFileTypeEdit = new TQComboBox( this );
m_pImageFileTypeEdit->insertItem( "gif" );
m_pImageFileTypeEdit->insertItem( "tga" );
m_pImageFileTypeEdit->insertItem( "iff" );
@@ -66,22 +66,22 @@ void PMBumpMapEdit::createTopWidgets( )
hl->addWidget( lbl );
hl->addWidget( m_pImageFileTypeEdit );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "File name:" ), this );
- m_pImageFileNameEdit = new QLineEdit( this );
- m_pImageFileNameBrowse = new QPushButton( this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "File name:" ), this );
+ m_pImageFileNameEdit = new TQLineEdit( this );
+ m_pImageFileNameBrowse = new TQPushButton( this );
m_pImageFileNameBrowse->setPixmap( SmallIcon( "fileopen" ) );
hl->addWidget( lbl );
hl->addWidget( m_pImageFileNameEdit );
hl->addWidget( m_pImageFileNameBrowse );
hl->addStretch( 1 );
- m_pOnceEdit = new QCheckBox( i18n( "Once" ), this );
+ m_pOnceEdit = new TQCheckBox( i18n( "Once" ), this );
topLayout( )->addWidget( m_pOnceEdit );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "Interpolate:" ), this );
- m_pInterpolateTypeEdit = new QComboBox( this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "Interpolate:" ), this );
+ m_pInterpolateTypeEdit = new TQComboBox( this );
m_pInterpolateTypeEdit->insertItem( i18n( "None" ) );
m_pInterpolateTypeEdit->insertItem( i18n( "Bilinear" ) );
m_pInterpolateTypeEdit->insertItem( i18n( "Normalized" ) );
@@ -89,9 +89,9 @@ void PMBumpMapEdit::createTopWidgets( )
hl->addWidget( m_pInterpolateTypeEdit );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "Map type:" ), this );
- m_pMapTypeEdit = new QComboBox( this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "Map type:" ), this );
+ m_pMapTypeEdit = new TQComboBox( this );
m_pMapTypeEdit->insertItem( i18n( "Planar" ) );
m_pMapTypeEdit->insertItem( i18n( "Spherical" ) );
m_pMapTypeEdit->insertItem( i18n( "Cylindrical" ) );
@@ -100,24 +100,24 @@ void PMBumpMapEdit::createTopWidgets( )
hl->addWidget( m_pMapTypeEdit );
hl->addStretch( 1 );
- m_pUseIndexEdit = new QCheckBox( i18n( "Use index" ), this );
+ m_pUseIndexEdit = new TQCheckBox( i18n( "Use index" ), this );
topLayout( )->addWidget( m_pUseIndexEdit );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "Bump size:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "Bump size:" ), this );
m_pBumpSizeEdit = new PMFloatEdit( this );
hl->addWidget( lbl );
hl->addWidget( m_pBumpSizeEdit );
hl->addStretch( 1 );
- connect( m_pImageFileTypeEdit, SIGNAL( activated( int ) ), SLOT( slotImageFileTypeChanged( int ) ) );
- connect( m_pMapTypeEdit, SIGNAL( activated( int ) ), SLOT( slotMapTypeChanged( int ) ) );
- connect( m_pInterpolateTypeEdit, SIGNAL( activated( int ) ), SLOT( slotInterpolateTypeChanged( int ) ) );
- connect( m_pImageFileNameBrowse, SIGNAL( clicked( ) ), SLOT( slotImageFileBrowseClicked( ) ) );
- connect( m_pImageFileNameEdit, SIGNAL( textChanged( const QString& ) ), SLOT( slotImageFileNameChanged( const QString& ) ) );
- connect( m_pOnceEdit, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pUseIndexEdit, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pBumpSizeEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pImageFileTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotImageFileTypeChanged( int ) ) );
+ connect( m_pMapTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotMapTypeChanged( int ) ) );
+ connect( m_pInterpolateTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotInterpolateTypeChanged( int ) ) );
+ connect( m_pImageFileNameBrowse, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotImageFileBrowseClicked( ) ) );
+ connect( m_pImageFileNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotImageFileNameChanged( const TQString& ) ) );
+ connect( m_pOnceEdit, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pUseIndexEdit, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pBumpSizeEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMBumpMapEdit::displayObject( PMObject* o )
@@ -300,14 +300,14 @@ void PMBumpMapEdit::slotMapTypeChanged( const int /*a*/ )
emit dataChanged( );
}
-void PMBumpMapEdit::slotImageFileNameChanged( const QString& /*a*/ )
+void PMBumpMapEdit::slotImageFileNameChanged( const TQString& /*a*/ )
{
emit dataChanged( );
}
void PMBumpMapEdit::slotImageFileBrowseClicked( )
{
- QString str = KFileDialog::getOpenFileName( QString::null, QString::null );
+ TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null );
if( !str.isEmpty() )
{
diff --git a/kpovmodeler/pmbumpmapedit.h b/kpovmodeler/pmbumpmapedit.h
index cceb2b84..109128d6 100644
--- a/kpovmodeler/pmbumpmapedit.h
+++ b/kpovmodeler/pmbumpmapedit.h
@@ -30,14 +30,14 @@
class PMBumpMap;
class PMPaletteValue;
class PMVectorEdit;
-class QComboBox;
+class TQComboBox;
class PMFloatEdit;
class PMIntEdit;
-class QLabel;
-class QCheckBox;
-class QWidget;
-class QLineEdit;
-class QPushButton;
+class TQLabel;
+class TQCheckBox;
+class TQWidget;
+class TQLineEdit;
+class TQPushButton;
/**
* Dialog edit class for @ref PMBumpMap.
@@ -50,7 +50,7 @@ public:
/**
* Creates a PMBumpMapEdit with parent and name
*/
- PMBumpMapEdit( QWidget* parent, const char* name = 0 );
+ PMBumpMapEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
/** */
@@ -68,18 +68,18 @@ private slots:
/** */
void slotInterpolateTypeChanged( int a );
/** */
- void slotImageFileNameChanged( const QString& a );
+ void slotImageFileNameChanged( const TQString& a );
/** */
void slotImageFileBrowseClicked( );
private:
PMBumpMap* m_pDisplayedObject;
- QComboBox* m_pImageFileTypeEdit;
- QLineEdit* m_pImageFileNameEdit;
- QPushButton* m_pImageFileNameBrowse;
- QCheckBox* m_pOnceEdit;
- QComboBox* m_pMapTypeEdit;
- QComboBox* m_pInterpolateTypeEdit;
- QCheckBox* m_pUseIndexEdit;
+ TQComboBox* m_pImageFileTypeEdit;
+ TQLineEdit* m_pImageFileNameEdit;
+ TQPushButton* m_pImageFileNameBrowse;
+ TQCheckBox* m_pOnceEdit;
+ TQComboBox* m_pMapTypeEdit;
+ TQComboBox* m_pInterpolateTypeEdit;
+ TQCheckBox* m_pUseIndexEdit;
PMFloatEdit* m_pBumpSizeEdit;
};
diff --git a/kpovmodeler/pmcamera.cpp b/kpovmodeler/pmcamera.cpp
index b224f340..ca37f751 100644
--- a/kpovmodeler/pmcamera.cpp
+++ b/kpovmodeler/pmcamera.cpp
@@ -114,12 +114,12 @@ PMCamera::~PMCamera( )
{
}
-QString PMCamera::description( ) const
+TQString PMCamera::description( ) const
{
return i18n( "camera" );
}
-void PMCamera::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMCamera::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "camera_type", cameraTypeToString( m_cameraType ) );
e.setAttribute( "cylinder_type", m_cylinderType );
@@ -443,7 +443,7 @@ void PMCamera::setExportPovray( bool ex )
}
}
-PMDialogEditBase* PMCamera::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMCamera::editWidget( TQWidget* parent ) const
{
return new PMCameraEdit( parent );
}
@@ -699,9 +699,9 @@ void PMCamera::calculateLookAtAngle( PMVector& right, PMVector& up, PMVector& di
up *= upLen;
}
-QString PMCamera::cameraTypeToString( PMCamera::CameraType t )
+TQString PMCamera::cameraTypeToString( PMCamera::CameraType t )
{
- QString str( "perspective" );
+ TQString str( "perspective" );
switch( t )
{
case Perspective:
@@ -728,7 +728,7 @@ QString PMCamera::cameraTypeToString( PMCamera::CameraType t )
return str;
}
-PMCamera::CameraType PMCamera::stringToCameraType( const QString& str )
+PMCamera::CameraType PMCamera::stringToCameraType( const TQString& str )
{
CameraType t = Perspective;
diff --git a/kpovmodeler/pmcamera.h b/kpovmodeler/pmcamera.h
index 9f09ee58..7d385909 100644
--- a/kpovmodeler/pmcamera.h
+++ b/kpovmodeler/pmcamera.h
@@ -57,22 +57,22 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMCamera( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMCameraEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmcamera" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmcamera" ); }
/**
* Returns the location
@@ -243,11 +243,11 @@ public:
/**
* Converts the camera type to a string
*/
- static QString cameraTypeToString( CameraType t );
+ static TQString cameraTypeToString( CameraType t );
/**
* Converts a string to the camera type
*/
- static CameraType stringToCameraType( const QString& s );
+ static CameraType stringToCameraType( const TQString& s );
/** */
virtual void cleanUp( ) const;
diff --git a/kpovmodeler/pmcameraedit.cpp b/kpovmodeler/pmcameraedit.cpp
index 676c9f8b..471fa19a 100644
--- a/kpovmodeler/pmcameraedit.cpp
+++ b/kpovmodeler/pmcameraedit.cpp
@@ -21,16 +21,16 @@
#include "pmvectoredit.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <kmessagebox.h>
-PMCameraEdit::PMCameraEdit( QWidget* parent, const char* name )
+PMCameraEdit::PMCameraEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -40,10 +40,10 @@ void PMCameraEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QGridLayout* layout;
- QLabel* label;
+ TQGridLayout* layout;
+ TQLabel* label;
- m_pCameraType = new QComboBox( false, this );
+ m_pCameraType = new TQComboBox( false, this );
m_pCameraType->insertItem( i18n( "Perspective" ) );
m_pCameraType->insertItem( i18n( "Orthographic" ) );
m_pCameraType->insertItem( i18n( "Fish Eye" ) );
@@ -52,7 +52,7 @@ void PMCameraEdit::createTopWidgets( )
m_pCameraType->insertItem( i18n( "Panoramic" ) );
m_pCameraType->insertItem( i18n( "Cylinder" ) );
- m_pCylinderType = new QComboBox( false, this );
+ 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" ) );
@@ -67,38 +67,38 @@ void PMCameraEdit::createTopWidgets( )
m_pAngle = new PMFloatEdit( this );
m_pAngle->setValidation( true, 0.0, true, 360.0 );
- QHBoxLayout* hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Camera type:" ), this ) );
+ TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Camera type:" ), this ) );
hl->addWidget( m_pCameraType );
- hl = new QHBoxLayout( topLayout( ) );
- m_pCylinderTypeLabel = new QLabel( i18n( "Cylinder type:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ m_pCylinderTypeLabel = new TQLabel( i18n( "Cylinder type:" ), this );
hl->addWidget( m_pCylinderTypeLabel );
hl->addWidget( m_pCylinderType );
- layout = new QGridLayout( topLayout( ), 7, 2 );
- layout->addWidget( new QLabel( i18n( "Location:" ), this ), 0, 0 );
+ layout = new TQGridLayout( topLayout( ), 7, 2 );
+ layout->addWidget( new TQLabel( i18n( "Location:" ), this ), 0, 0 );
layout->addWidget( m_pLocation, 0, 1 );
- layout->addWidget( new QLabel( i18n( "Sky:" ), this ), 1, 0 );
+ layout->addWidget( new TQLabel( i18n( "Sky:" ), this ), 1, 0 );
layout->addWidget( m_pSky, 1, 1 );
- layout->addWidget( new QLabel( i18n( "Direction:" ), this ), 2, 0 );
+ layout->addWidget( new TQLabel( i18n( "Direction:" ), this ), 2, 0 );
layout->addWidget( m_pDirection, 2, 1 );
- layout->addWidget( new QLabel( i18n( "Right:" ), this ), 3, 0 );
+ layout->addWidget( new TQLabel( i18n( "Right:" ), this ), 3, 0 );
layout->addWidget( m_pRight, 3, 1 );
- layout->addWidget( new QLabel( i18n( "Up:" ), this ), 4, 0 );
+ layout->addWidget( new TQLabel( i18n( "Up:" ), this ), 4, 0 );
layout->addWidget( m_pUp, 4, 1 );
- layout->addWidget( new QLabel( i18n( "Look at:" ), this ), 5, 0 );
+ layout->addWidget( new TQLabel( i18n( "Look at:" ), this ), 5, 0 );
layout->addWidget( m_pLookAt, 5, 1 );
- m_pEnableAngle = new QCheckBox( i18n( "Angle:" ), this );
+ m_pEnableAngle = new TQCheckBox( i18n( "Angle:" ), this );
layout->addWidget( m_pEnableAngle, 6, 0 );
layout->addWidget( m_pAngle, 6, 1, AlignLeft );
- m_pFocalBlur = new QCheckBox( i18n( "Focal blur" ), this );
+ m_pFocalBlur = new TQCheckBox( i18n( "Focal blur" ), this );
topLayout( )->addWidget( m_pFocalBlur );
m_pAperture = new PMFloatEdit( this );
@@ -116,54 +116,54 @@ void PMCameraEdit::createTopWidgets( )
m_pVariance->setValidation( true, 0, false, 0 );
m_focalWidgets.append( m_pVariance );
- layout = new QGridLayout( topLayout( ), 5, 2 );
- label = new QLabel( i18n( "Aperture:" ), this );
+ layout = 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 );
- label = new QLabel( i18n( "Blur samples:" ), this );
+ label = new TQLabel( i18n( "Blur samples:" ), this );
m_focalWidgets.append( label );
layout->addWidget( label, 1, 0 );
layout->addWidget( m_pBlurSamples, 1, 1 );
- label = new QLabel( i18n( "Focal point:" ), this );
+ label = new TQLabel( i18n( "Focal point:" ), this );
m_focalWidgets.append( label );
layout->addWidget( label, 2, 0 );
layout->addWidget( m_pFocalPoint, 2, 1 );
- label = new QLabel( i18n( "Confidence:" ), this );
+ label = new TQLabel( i18n( "Confidence:" ), this );
m_focalWidgets.append( label );
layout->addWidget( label, 3, 0 );
layout->addWidget( m_pConfidence, 3, 1 );
- label = new QLabel( i18n( "Variance:" ), this );
+ label = new TQLabel( i18n( "Variance:" ), this );
m_focalWidgets.append( label );
layout->addWidget( label, 4, 0 );
layout->addWidget( m_pVariance, 4, 1 );
- m_pExport = new QCheckBox( i18n( "Export to renderer" ), this );
+ m_pExport = new TQCheckBox( i18n( "Export to renderer" ), this );
topLayout( )->addWidget( m_pExport );
- connect( m_pLocation, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pDirection, SIGNAL( dataChanged( ) ), SLOT( slotDirectionChanged( ) ) );
- connect( m_pRight, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pRight, SIGNAL( dataChanged( ) ), SLOT( slotRightChanged( ) ) );
- connect( m_pUp, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pSky, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pLookAt, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pEnableAngle, SIGNAL( toggled( bool ) ),
- SLOT( slotAngleToggled( bool ) ) );
- connect( m_pAngle, SIGNAL( dataChanged( ) ), SLOT( slotAngleChanged( ) ) );
- connect( m_pCameraType, SIGNAL( activated( int ) ),
- SLOT( slotCameraTypeActivated( int ) ) );
- connect( m_pCylinderType, SIGNAL( activated( int ) ),
- SLOT( slotCylinderTypeActivated( int ) ) );
-
- connect( m_pFocalBlur, SIGNAL( toggled( bool ) ),
- SLOT( slotFocalBlurToggled( bool ) ) );
- connect( m_pAperture, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pBlurSamples, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pFocalPoint, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pVariance, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pConfidence, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pExport, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pLocation, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pDirection, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotDirectionChanged( ) ) );
+ connect( m_pRight, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pRight, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotRightChanged( ) ) );
+ connect( m_pUp, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pSky, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pLookAt, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pEnableAngle, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotAngleToggled( bool ) ) );
+ connect( m_pAngle, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotAngleChanged( ) ) );
+ connect( m_pCameraType, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotCameraTypeActivated( int ) ) );
+ connect( m_pCylinderType, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotCylinderTypeActivated( int ) ) );
+
+ connect( m_pFocalBlur, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotFocalBlurToggled( bool ) ) );
+ connect( m_pAperture, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pBlurSamples, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pFocalPoint, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pVariance, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pConfidence, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pExport, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMCameraEdit::displayObject( PMObject* o )
@@ -385,9 +385,9 @@ void PMCameraEdit::slotAngleChanged( )
if( ( m_pCameraType->currentItem( ) == 0 ) && m_pEnableAngle->isChecked( ) )
{
// Only change direction's value in perspective and with an enabled angle
- disconnect( m_pDirection, SIGNAL( dataChanged( ) ), 0, 0 );
+ disconnect( m_pDirection, TQT_SIGNAL( dataChanged( ) ), 0, 0 );
m_pDirection->setVector( 0.5 * m_pRight->vector( ) / tan( 2 * deg2Rad( m_pAngle->value( ) ) ) );
- connect( m_pDirection, SIGNAL( dataChanged( ) ), SLOT( slotDirectionChanged( ) ) );
+ connect( m_pDirection, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotDirectionChanged( ) ) );
}
*/
emit dataChanged( );
@@ -424,7 +424,7 @@ void PMCameraEdit::calculateCameraAngle( )
void PMCameraEdit::enableFocalWidgets( bool on )
{
- QPtrListIterator<QWidget> it( m_focalWidgets );
+ TQPtrListIterator<TQWidget> it( m_focalWidgets );
for( ; it.current( ); ++it )
{
diff --git a/kpovmodeler/pmcameraedit.h b/kpovmodeler/pmcameraedit.h
index 7b787683..a9ed5ee9 100644
--- a/kpovmodeler/pmcameraedit.h
+++ b/kpovmodeler/pmcameraedit.h
@@ -25,15 +25,15 @@
#endif
#include "pmnamedobjectedit.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
class PMCamera;
class PMVectorEdit;
class PMFloatEdit;
class PMIntEdit;
-class QComboBox;
-class QLabel;
-class QCheckBox;
+class TQComboBox;
+class TQLabel;
+class TQCheckBox;
/**
* Dialog edit class for @ref PMCamera
@@ -46,7 +46,7 @@ public:
/**
* Creates a PMCameraEdit with parent and name
*/
- PMCameraEdit( QWidget* parent, const char* name = 0 );
+ PMCameraEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -80,19 +80,19 @@ private:
PMVectorEdit* m_pUp;
PMVectorEdit* m_pSky;
PMVectorEdit* m_pLookAt;
- QCheckBox* m_pEnableAngle;
+ TQCheckBox* m_pEnableAngle;
PMFloatEdit* m_pAngle;
- QComboBox* m_pCameraType;
- QComboBox* m_pCylinderType;
- QLabel* m_pCylinderTypeLabel;
- QCheckBox* m_pFocalBlur;
+ TQComboBox* m_pCameraType;
+ TQComboBox* m_pCylinderType;
+ TQLabel* m_pCylinderTypeLabel;
+ TQCheckBox* m_pFocalBlur;
PMFloatEdit* m_pAperture;
PMIntEdit* m_pBlurSamples;
PMVectorEdit* m_pFocalPoint;
PMFloatEdit* m_pConfidence;
PMFloatEdit* m_pVariance;
- QPtrList<QWidget> m_focalWidgets;
- QCheckBox* m_pExport;
+ TQPtrList<TQWidget> m_focalWidgets;
+ TQCheckBox* m_pExport;
};
diff --git a/kpovmodeler/pmclippedby.cpp b/kpovmodeler/pmclippedby.cpp
index fc00bc51..24ea4e46 100644
--- a/kpovmodeler/pmclippedby.cpp
+++ b/kpovmodeler/pmclippedby.cpp
@@ -62,7 +62,7 @@ void PMClippedBy::cleanUp( ) const
Base::cleanUp( );
}
-QString PMClippedBy::description( ) const
+TQString PMClippedBy::description( ) const
{
return i18n( "clipped by" );
}
@@ -79,7 +79,7 @@ bool PMClippedBy::boundedBy( ) const
return cb;
}
-void PMClippedBy::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMClippedBy::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
// no extra data at the moment
Base::serialize( e, doc );
@@ -91,7 +91,7 @@ void PMClippedBy::readAttributes( const PMXMLHelper& h )
Base::readAttributes( h );
}
-PMDialogEditBase* PMClippedBy::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMClippedBy::editWidget( TQWidget* parent ) const
{
return new PMClippedByEdit( parent );
}
diff --git a/kpovmodeler/pmclippedby.h b/kpovmodeler/pmclippedby.h
index 39c5081a..0e76e2cf 100644
--- a/kpovmodeler/pmclippedby.h
+++ b/kpovmodeler/pmclippedby.h
@@ -45,7 +45,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMClippedBy( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -56,19 +56,19 @@ public:
virtual bool dataChangeOnInsertRemove( ) const { return true; }
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMClippedByEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmclippedby" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmclippedby" ); }
/** */
virtual void childRemoved( PMObject* );
diff --git a/kpovmodeler/pmclippedbyedit.cpp b/kpovmodeler/pmclippedbyedit.cpp
index 18a9d4db..8afa0285 100644
--- a/kpovmodeler/pmclippedbyedit.cpp
+++ b/kpovmodeler/pmclippedbyedit.cpp
@@ -19,11 +19,11 @@
#include "pmclippedbyedit.h"
#include "pmclippedby.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
-PMClippedByEdit::PMClippedByEdit( QWidget* parent, const char* name )
+PMClippedByEdit::PMClippedByEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -33,9 +33,9 @@ void PMClippedByEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- m_pChildLabel = new QLabel( i18n( "No child objects" ), this );
+ m_pChildLabel = new TQLabel( i18n( "No child objects" ), this );
topLayout( )->addWidget( m_pChildLabel );
- m_pBoundedByLabel = new QLabel( i18n( "(= bounded by)" ), this );
+ m_pBoundedByLabel = new TQLabel( i18n( "(= bounded by)" ), this );
topLayout( )->addWidget( m_pBoundedByLabel );
}
diff --git a/kpovmodeler/pmclippedbyedit.h b/kpovmodeler/pmclippedbyedit.h
index 3dc0c38f..5b22f564 100644
--- a/kpovmodeler/pmclippedbyedit.h
+++ b/kpovmodeler/pmclippedbyedit.h
@@ -27,7 +27,7 @@
#include "pmdialogeditbase.h"
class PMClippedBy;
-class QLabel;
+class TQLabel;
/**
* Dialog edit class for @ref PMClippedBy
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMClippedByEdit with parent and name
*/
- PMClippedByEdit( QWidget* parent, const char* name = 0 );
+ PMClippedByEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -51,8 +51,8 @@ protected:
private:
PMClippedBy* m_pDisplayedObject;
- QLabel* m_pChildLabel;
- QLabel* m_pBoundedByLabel;
+ TQLabel* m_pChildLabel;
+ TQLabel* m_pBoundedByLabel;
};
diff --git a/kpovmodeler/pmcolor.cpp b/kpovmodeler/pmcolor.cpp
index 0eb38b79..cac668e7 100644
--- a/kpovmodeler/pmcolor.cpp
+++ b/kpovmodeler/pmcolor.cpp
@@ -22,8 +22,8 @@
#include "pmdebug.h"
-#include <qtextstream.h>
-#include <qstring.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
PMColor::PMColor( )
{
@@ -67,7 +67,7 @@ PMColor::PMColor( const PMVector& v )
}
}
-PMColor::PMColor( const QColor& c )
+PMColor::PMColor( const TQColor& c )
{
m_colorValue[0] = c.red( ) / 255.0;
m_colorValue[1] = c.green( ) / 255.0;
@@ -76,7 +76,7 @@ PMColor::PMColor( const QColor& c )
m_colorValue[4] = 0.0;
}
-QColor PMColor::toQColor( ) const
+TQColor PMColor::toQColor( ) const
{
double r, g, b, max = 0;
r = red( );
@@ -99,14 +99,14 @@ QColor PMColor::toQColor( ) const
g /= max;
b /= max;
}
- return QColor( ( int ) ( r * 255 + 0.5 ), ( int ) ( g * 255 + 0.5 ),
+ return TQColor( ( int ) ( r * 255 + 0.5 ), ( int ) ( g * 255 + 0.5 ),
( int ) ( b * 255 + 0.5 ) );
}
-QString PMColor::serialize( bool addColorKeyword ) const
+TQString PMColor::serialize( bool addColorKeyword ) const
{
- QString result;
- QTextStream str( &result, IO_WriteOnly );
+ TQString result;
+ TQTextStream str( &result, IO_WriteOnly );
if( addColorKeyword )
str << "color ";
@@ -146,10 +146,10 @@ QString PMColor::serialize( bool addColorKeyword ) const
return result;
}
-QString PMColor::serializeXML( ) const
+TQString PMColor::serializeXML( ) const
{
- QString result;
- QTextStream str( &result, IO_WriteOnly );
+ TQString result;
+ TQTextStream str( &result, IO_WriteOnly );
int i;
for( i = 0; i < 5; i++ )
@@ -177,11 +177,11 @@ bool PMColor::operator== ( const PMColor& c ) const
return true;
}
-bool PMColor::loadXML( const QString& str )
+bool PMColor::loadXML( const TQString& str )
{
- QString tmp( str );
- QTextStream s( &tmp, IO_ReadOnly );
- QString val;
+ TQString tmp( str );
+ TQTextStream s( &tmp, IO_ReadOnly );
+ TQString val;
bool ok;
int i;
diff --git a/kpovmodeler/pmcolor.h b/kpovmodeler/pmcolor.h
index 7ae0eeab..5c3c4ec8 100644
--- a/kpovmodeler/pmcolor.h
+++ b/kpovmodeler/pmcolor.h
@@ -19,8 +19,8 @@
#ifndef PMCOLOR_H
#define PMCOLOR_H
-#include <qstring.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqcolor.h>
class PMVector;
@@ -48,10 +48,10 @@ public:
*/
PMColor( const PMVector& v );
/**
- * Creates a color from a @ref QColor object.
+ * Creates a color from a @ref TQColor object.
* filter and transmit are set to 0
*/
- PMColor( const QColor& c );
+ PMColor( const TQColor& c );
/**
* Sets the red value
@@ -97,20 +97,20 @@ public:
/**
* Returns the rgb value as QColor
*/
- QColor toQColor( ) const;
+ TQColor toQColor( ) const;
/**
* Returns a string for serialization
*/
- QString serialize( bool addColorKeyword = false ) const;
+ TQString serialize( bool addColorKeyword = false ) const;
/**
* Returns a string for xml output
*/
- QString serializeXML( ) const;
+ TQString serializeXML( ) const;
/**
* loads the color data from the xml string
*/
- bool loadXML( const QString& str );
+ bool loadXML( const TQString& str );
/**
* Returns true if the colors are equal*/
diff --git a/kpovmodeler/pmcoloredit.cpp b/kpovmodeler/pmcoloredit.cpp
index 06ac4d0f..9695f9eb 100644
--- a/kpovmodeler/pmcoloredit.cpp
+++ b/kpovmodeler/pmcoloredit.cpp
@@ -19,13 +19,13 @@
#include "pmlineedits.h"
#include <kcolorbutton.h>
#include <klocale.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcolor.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcolor.h>
#include <kdialog.h>
-PMColorEdit::PMColorEdit( bool filterAndTransmit, QWidget* parent, const char* name )
- : QWidget( parent, name )
+PMColorEdit::PMColorEdit( bool filterAndTransmit, TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
m_bFilterAndTransmit = filterAndTransmit;
@@ -44,35 +44,35 @@ PMColorEdit::PMColorEdit( bool filterAndTransmit, QWidget* parent, const char* n
}
m_pButton = new KColorButton( this );
- QVBoxLayout* topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) );
- QHBoxLayout* l = new QHBoxLayout( topLayout );
+ TQVBoxLayout* topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) );
+ TQHBoxLayout* l = new TQHBoxLayout( topLayout );
l->addWidget( m_pButton );
- l = new QHBoxLayout( topLayout );
- l->addWidget( new QLabel( i18n( "red:" ), this ) );
+ l = new TQHBoxLayout( topLayout );
+ l->addWidget( new TQLabel( i18n( "red:" ), this ) );
l->addWidget( m_edits[0] );
- l->addWidget( new QLabel( i18n( "green:" ), this ) );
+ l->addWidget( new TQLabel( i18n( "green:" ), this ) );
l->addWidget( m_edits[1] );
- l->addWidget( new QLabel( i18n( "blue:" ), this ) );
+ l->addWidget( new TQLabel( i18n( "blue:" ), this ) );
l->addWidget( m_edits[2] );
if( filterAndTransmit )
{
- l = new QHBoxLayout( topLayout );
- l->addWidget( new QLabel( i18n( "filter" ), this ) );
+ l = new TQHBoxLayout( topLayout );
+ l->addWidget( new TQLabel( i18n( "filter" ), this ) );
l->addWidget( m_edits[3] );
- l->addWidget( new QLabel( i18n( "transmit" ), this ) );
+ l->addWidget( new TQLabel( i18n( "transmit" ), this ) );
l->addWidget( m_edits[4] );
}
- connect( m_edits[0], SIGNAL( dataChanged( ) ), SLOT( slotEditChanged( ) ) );
- connect( m_edits[1], SIGNAL( dataChanged( ) ), SLOT( slotEditChanged( ) ) );
- connect( m_edits[2], SIGNAL( dataChanged( ) ), SLOT( slotEditChanged( ) ) );
+ connect( m_edits[0], TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotEditChanged( ) ) );
+ connect( m_edits[1], TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotEditChanged( ) ) );
+ connect( m_edits[2], TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotEditChanged( ) ) );
if( filterAndTransmit )
{
- connect( m_edits[3], SIGNAL( dataChanged( ) ), SLOT( slotEditChanged( ) ) );
- connect( m_edits[4], SIGNAL( dataChanged( ) ), SLOT( slotEditChanged( ) ) );
+ connect( m_edits[3], TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotEditChanged( ) ) );
+ connect( m_edits[4], TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotEditChanged( ) ) );
}
- connect( m_pButton, SIGNAL( changed( const QColor& ) ),
- SLOT( slotColorChanged( const QColor& ) ) );
+ connect( m_pButton, TQT_SIGNAL( changed( const TQColor& ) ),
+ TQT_SLOT( slotColorChanged( const TQColor& ) ) );
}
void PMColorEdit::setColor( const PMColor& c )
@@ -141,7 +141,7 @@ void PMColorEdit::setReadOnly( bool yes )
m_pButton->setEnabled( !yes );
}
-void PMColorEdit::slotColorChanged( const QColor& c )
+void PMColorEdit::slotColorChanged( const TQColor& c )
{
int i;
bool blocked[3];
diff --git a/kpovmodeler/pmcoloredit.h b/kpovmodeler/pmcoloredit.h
index 4b581a0f..a4be0083 100644
--- a/kpovmodeler/pmcoloredit.h
+++ b/kpovmodeler/pmcoloredit.h
@@ -24,12 +24,12 @@
#include <config.h>
#endif
-#include <qwidget.h>
+#include <tqwidget.h>
#include "pmcolor.h"
class KColorButton;
class PMFloatEdit;
-class QColor;
+class TQColor;
/**
* Edit widget for @ref PMColor
@@ -41,7 +41,7 @@ public:
/**
* Creates an edit widget for rgbft colors.
*/
- PMColorEdit( bool filterAndTransmit, QWidget* parent, const char* name = 0 );
+ PMColorEdit( bool filterAndTransmit, TQWidget* parent, const char* name = 0 );
/**
* Sets the displayed color
@@ -69,7 +69,7 @@ signals:
void dataChanged( );
protected slots:
- void slotColorChanged( const QColor& c );
+ void slotColorChanged( const TQColor& c );
void slotEditChanged( );
private:
void updateButton( );
diff --git a/kpovmodeler/pmcolorsettings.cpp b/kpovmodeler/pmcolorsettings.cpp
index d5924d4b..c0dafa37 100644
--- a/kpovmodeler/pmcolorsettings.cpp
+++ b/kpovmodeler/pmcolorsettings.cpp
@@ -20,64 +20,64 @@
#include "pmrendermanager.h"
#include "pmdefaults.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kcolorbutton.h>
#include <klocale.h>
-PMColorSettings::PMColorSettings( QWidget* parent, const char* name )
+PMColorSettings::PMColorSettings( TQWidget* parent, const char* name )
: PMSettingsDialogPage( parent, name )
{
- QHBoxLayout* hlayout;
- QVBoxLayout* vlayout;
- QGridLayout* grid;
+ TQHBoxLayout* hlayout;
+ TQVBoxLayout* vlayout;
+ TQGridLayout* grid;
- vlayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) );
- grid = new QGridLayout( vlayout, 6, 3 );
+ vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) );
+ grid = new TQGridLayout( vlayout, 6, 3 );
- grid->addWidget( new QLabel( i18n( "Background:" ), this ), 0, 0 );
- hlayout = new QHBoxLayout( );
+ grid->addWidget( new TQLabel( i18n( "Background:" ), this ), 0, 0 );
+ hlayout = new TQHBoxLayout( );
grid->addLayout( hlayout, 0, 2 );
m_pBackgroundColor = new KColorButton( this );
hlayout->addWidget( m_pBackgroundColor );
hlayout->addStretch( 1 );
- grid->addWidget( new QLabel( i18n( "Wire frame:" ), this ), 1, 0 );
- hlayout = new QHBoxLayout( );
+ grid->addWidget( new TQLabel( i18n( "Wire frame:" ), this ), 1, 0 );
+ hlayout = new TQHBoxLayout( );
grid->addLayout( hlayout, 1, 2 );
m_pGraphicalObjectsColor[0] = new KColorButton( this );
hlayout->addWidget( m_pGraphicalObjectsColor[0] );
- hlayout->addWidget( new QLabel( i18n( "Selected:" ), this ) );
+ hlayout->addWidget( new TQLabel( i18n( "Selected:" ), this ) );
m_pGraphicalObjectsColor[1] = new KColorButton( this );
hlayout->addWidget( m_pGraphicalObjectsColor[1] );
hlayout->addStretch( 1 );
- grid->addWidget( new QLabel( i18n( "Control points:" ), this ), 2, 0 );
- hlayout = new QHBoxLayout( );
+ grid->addWidget( new TQLabel( i18n( "Control points:" ), this ), 2, 0 );
+ hlayout = new TQHBoxLayout( );
grid->addLayout( hlayout, 2, 2 );
m_pControlPointsColor[0] = new KColorButton( this );
hlayout->addWidget( m_pControlPointsColor[0] );
- hlayout->addWidget( new QLabel( i18n( "Selected:" ), this ) );
+ hlayout->addWidget( new TQLabel( i18n( "Selected:" ), this ) );
m_pControlPointsColor[1] = new KColorButton( this );
hlayout->addWidget( m_pControlPointsColor[1] );
hlayout->addStretch( 1 );
- grid->addWidget( new QLabel( i18n( "Axes:" ), this ), 3, 0 );
- hlayout = new QHBoxLayout( );
+ grid->addWidget( new TQLabel( i18n( "Axes:" ), this ), 3, 0 );
+ hlayout = new TQHBoxLayout( );
grid->addLayout( hlayout, 3, 2 );
- grid->addWidget( new QLabel( "x", this ), 3, 1 );
+ grid->addWidget( new TQLabel( "x", this ), 3, 1 );
m_pAxesColor[0] = new KColorButton( this );
hlayout->addWidget( m_pAxesColor[0] );
- hlayout->addWidget( new QLabel( "y", this ) );
+ hlayout->addWidget( new TQLabel( "y", this ) );
m_pAxesColor[1] = new KColorButton( this );
hlayout->addWidget( m_pAxesColor[1] );
- hlayout->addWidget( new QLabel( "z", this ) );
+ hlayout->addWidget( new TQLabel( "z", this ) );
m_pAxesColor[2] = new KColorButton( this );
hlayout->addWidget( m_pAxesColor[2] );
hlayout->addStretch( 1 );
- grid->addWidget( new QLabel( i18n( "Field of view:" ), this ), 4, 0 );
- hlayout = new QHBoxLayout( );
+ grid->addWidget( new TQLabel( i18n( "Field of view:" ), this ), 4, 0 );
+ hlayout = new TQHBoxLayout( );
grid->addLayout( hlayout, 4, 2 );
m_pFieldOfViewColor = new KColorButton( this );
hlayout->addWidget( m_pFieldOfViewColor );
diff --git a/kpovmodeler/pmcolorsettings.h b/kpovmodeler/pmcolorsettings.h
index 9ad628e0..8b903d47 100644
--- a/kpovmodeler/pmcolorsettings.h
+++ b/kpovmodeler/pmcolorsettings.h
@@ -36,7 +36,7 @@ public:
/**
* Default constructor
*/
- PMColorSettings( QWidget* parent, const char* name = 0 );
+ PMColorSettings( TQWidget* parent, const char* name = 0 );
/** */
virtual void displaySettings( );
/** */
diff --git a/kpovmodeler/pmcommand.h b/kpovmodeler/pmcommand.h
index 9bdca16f..5d32b9d4 100644
--- a/kpovmodeler/pmcommand.h
+++ b/kpovmodeler/pmcommand.h
@@ -24,8 +24,8 @@
#include <config.h>
#endif
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include "pmmessage.h"
#include "pmerrorflags.h"
@@ -93,7 +93,7 @@ public:
/**
* Creates a command with command text text
*/
- PMCommand( const QString &text )
+ PMCommand( const TQString &text )
{ m_text = text; }
/**
* Deletes the command.
@@ -103,11 +103,11 @@ public:
/**
* Command text shown in the undo/redo menues
*/
- QString text( ) const { return m_text; }
+ TQString text( ) const { return m_text; }
/**
* Sets the command text
*/
- void setText( const QString& s ) { m_text = s; }
+ void setText( const TQString& s ) { m_text = s; }
/**
* Checks if the command is valid and sets the error message
@@ -138,9 +138,9 @@ private:
/**
* The command text.
*/
- QString m_text;
+ TQString m_text;
};
-typedef QPtrList<PMCommand> PMCommandList;
+typedef TQPtrList<PMCommand> PMCommandList;
#endif
diff --git a/kpovmodeler/pmcommandmanager.cpp b/kpovmodeler/pmcommandmanager.cpp
index 333468e3..f122a7a4 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( ), QString::null );
+ emit updateUndoRedo( cmd->text( ), TQString::null );
}
void PMCommandManager::undo( )
@@ -58,7 +58,7 @@ void PMCommandManager::undo( )
m_redoCommands.append( m_commands.take( ) );
if( m_commands.isEmpty( ) )
- emit updateUndoRedo( QString::null, last->text( ) );
+ emit updateUndoRedo( TQString::null, 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( ), QString::null );
+ emit updateUndoRedo( last->text( ), TQString::null );
else
emit updateUndoRedo( last->text( ), m_redoCommands.last( )->text( ) );
}
@@ -84,7 +84,7 @@ void PMCommandManager::clear( )
{
m_redoCommands.clear( );
m_commands.clear( );
- emit updateUndoRedo( QString::null, QString::null );
+ emit updateUndoRedo( TQString::null, TQString::null );
}
void PMCommandManager::cmdObjectChanged( PMObject* obj, const int mode )
@@ -92,7 +92,7 @@ void PMCommandManager::cmdObjectChanged( PMObject* obj, const int mode )
emit objectChanged( obj, mode, this );
}
-void PMCommandManager::cmdIDChanged( PMObject* obj, const QString& oldID )
+void PMCommandManager::cmdIDChanged( PMObject* obj, const TQString& oldID )
{
emit idChanged( obj, oldID );
}
diff --git a/kpovmodeler/pmcommandmanager.h b/kpovmodeler/pmcommandmanager.h
index 2ef2fbbc..5fc960d1 100644
--- a/kpovmodeler/pmcommandmanager.h
+++ b/kpovmodeler/pmcommandmanager.h
@@ -25,8 +25,8 @@
#endif
#include "pmcommand.h"
-#include <qptrstack.h>
-#include <qobject.h>
+#include <tqptrstack.h>
+#include <tqobject.h>
class PMPart;
@@ -80,7 +80,7 @@ public:
/**
* Called by an executed command. Will emit idChanged( )
*/
- void cmdIDChanged( PMObject* obj, const QString& oldID );
+ void cmdIDChanged( PMObject* obj, const TQString& oldID );
/**
* Returns a pointer to the part. For commands that need to access the
* part directly.
@@ -90,16 +90,16 @@ signals:
/**
* emmited, when the undo and redo command texts change
*/
- void updateUndoRedo( const QString& undo, const QString& redo );
+ void updateUndoRedo( const TQString& undo, const TQString& redo );
/**
* Signal that is emitted when an object is changed.
* Mode is a bit combination of @ref PMChange constants.
*/
- void objectChanged( PMObject* obj, const int mode, QObject* sender );
+ void objectChanged( PMObject* obj, const int mode, TQObject* sender );
/**
* Signal that is emitted when the id of the object is changed
*/
- void idChanged( PMObject* obj, const QString& oldID );
+ void idChanged( PMObject* obj, const TQString& oldID );
private:
/**
* The executed commands.
diff --git a/kpovmodeler/pmcomment.cpp b/kpovmodeler/pmcomment.cpp
index e4783ae5..90c817fd 100644
--- a/kpovmodeler/pmcomment.cpp
+++ b/kpovmodeler/pmcomment.cpp
@@ -22,7 +22,7 @@
#include "pmcommentedit.h"
#include "pmmemento.h"
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <klocale.h>
PMDefinePropertyClass( PMComment, PMCommentProperty );
@@ -40,7 +40,7 @@ PMComment::PMComment( PMPart* part )
{
}
-PMComment::PMComment( PMPart* part, const QString& t )
+PMComment::PMComment( PMPart* part, const TQString& t )
: Base( part )
{
m_text = t;
@@ -56,13 +56,13 @@ PMComment::~PMComment( )
{
}
-QString PMComment::description( ) const
+TQString PMComment::description( ) const
{
if( !m_text.isEmpty( ) )
{
- QString copy = m_text;
- QTextStream str( &copy, IO_ReadOnly );
- QString tmp, desc;
+ TQString copy = m_text;
+ TQTextStream str( &copy, IO_ReadOnly );
+ TQString tmp, desc;
bool stop = false;
bool truncated = false;
@@ -95,7 +95,7 @@ QString PMComment::description( ) const
return i18n( "comment" );
}
-void PMComment::setText( const QString& text )
+void PMComment::setText( const TQString& text )
{
if( text != m_text )
{
@@ -130,20 +130,20 @@ void PMComment::cleanUp( ) const
Base::cleanUp( );
}
-void PMComment::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMComment::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
- QDomText t = doc.createTextNode( m_text );
+ TQDomText t = doc.createTextNode( m_text );
e.appendChild( t );
}
void PMComment::readAttributes( const PMXMLHelper& h )
{
- QDomNode e = h.element( ).firstChild( );
+ TQDomNode e = h.element( ).firstChild( );
if( e.isText( ) )
m_text = e.toText( ).data( );
}
-PMDialogEditBase* PMComment::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMComment::editWidget( TQWidget* parent ) const
{
return new PMCommentEdit( parent );
}
diff --git a/kpovmodeler/pmcomment.h b/kpovmodeler/pmcomment.h
index 82c62fa8..d435423d 100644
--- a/kpovmodeler/pmcomment.h
+++ b/kpovmodeler/pmcomment.h
@@ -21,7 +21,7 @@
#define PMCOMMENT_H
#include "pmobject.h"
-#include <qstring.h>
+#include <tqstring.h>
/**
@@ -39,7 +39,7 @@ public:
/**
* Creates a comment with text t
*/
- PMComment( PMPart* part, const QString& t );
+ PMComment( PMPart* part, const TQString& t );
/**
* Copy constructor
*/
@@ -52,11 +52,11 @@ public:
/**
* Sets the comment text
*/
- void setText( const QString& text );
+ void setText( const TQString& text );
/**
* Returns the comment text
*/
- QString text( ) const { return m_text; }
+ TQString text( ) const { return m_text; }
/** */
virtual PMObject* copy( ) const { return new PMComment( *this ); }
@@ -67,17 +67,17 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/** */
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmcomment" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmcomment" ); }
/** */
virtual void restoreMemento( PMMemento* s );
private:
@@ -85,7 +85,7 @@ private:
* IDs for @ref PMMementoData
*/
enum PMCommentMementoID { PMTextID };
- QString m_text;
+ TQString m_text;
static PMMetaObject* s_pMetaObject;
};
diff --git a/kpovmodeler/pmcommentedit.cpp b/kpovmodeler/pmcommentedit.cpp
index 6fa5ba9e..28e98ed3 100644
--- a/kpovmodeler/pmcommentedit.cpp
+++ b/kpovmodeler/pmcommentedit.cpp
@@ -19,11 +19,11 @@
#include "pmcommentedit.h"
#include "pmcomment.h"
-#include <qlayout.h>
-#include <qmultilineedit.h>
+#include <tqlayout.h>
+#include <tqmultilineedit.h>
#include <kglobalsettings.h>
-PMCommentEdit::PMCommentEdit( QWidget* parent, const char* name )
+PMCommentEdit::PMCommentEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -33,15 +33,15 @@ void PMCommentEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- m_pEdit = new QMultiLineEdit( this );
+ m_pEdit = new TQMultiLineEdit( this );
#if ( QT_VERSION >= 300 )
m_pEdit->setTextFormat( Qt::PlainText );
- m_pEdit->setWordWrap( QTextEdit::NoWrap );
+ m_pEdit->setWordWrap( TQTextEdit::NoWrap );
#endif
m_pEdit->setFont( KGlobalSettings::fixedFont( ) );
topLayout( )->addWidget( m_pEdit, 2 );
- connect( m_pEdit, SIGNAL( textChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pEdit, TQT_SIGNAL( textChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMCommentEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmcommentedit.h b/kpovmodeler/pmcommentedit.h
index b3dc1d25..3d3fb0c1 100644
--- a/kpovmodeler/pmcommentedit.h
+++ b/kpovmodeler/pmcommentedit.h
@@ -27,7 +27,7 @@
#include "pmdialogeditbase.h"
class PMComment;
-class QMultiLineEdit;
+class TQMultiLineEdit;
/**
* Dialog edit class for @ref PMComment.
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMCommentEdit with parent and name
*/
- PMCommentEdit( QWidget* parent, const char* name = 0 );
+ PMCommentEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -55,7 +55,7 @@ protected:
private:
PMComment* m_pDisplayedObject;
- QMultiLineEdit* m_pEdit;
+ TQMultiLineEdit* m_pEdit;
};
diff --git a/kpovmodeler/pmcompositeobject.cpp b/kpovmodeler/pmcompositeobject.cpp
index c1ab704d..d8b61e8c 100644
--- a/kpovmodeler/pmcompositeobject.cpp
+++ b/kpovmodeler/pmcompositeobject.cpp
@@ -21,7 +21,7 @@
#include "pmmemento.h"
#include "pmviewstructure.h"
-#include <qdom.h>
+#include <tqdom.h>
PMMetaObject* PMCompositeObject::s_pMetaObject = 0;
@@ -279,7 +279,7 @@ bool PMCompositeObject::takeChild( uint i )
return false;
}
-void PMCompositeObject::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMCompositeObject::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
PMObject* tmp;
diff --git a/kpovmodeler/pmcompositeobject.h b/kpovmodeler/pmcompositeobject.h
index c2e2da58..350180db 100644
--- a/kpovmodeler/pmcompositeobject.h
+++ b/kpovmodeler/pmcompositeobject.h
@@ -109,7 +109,7 @@ public:
virtual bool takeChild( uint i );
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/**
* Returns the number of selected child items. All selected items in
diff --git a/kpovmodeler/pmcone.cpp b/kpovmodeler/pmcone.cpp
index 2772eda5..c6fd719e 100644
--- a/kpovmodeler/pmcone.cpp
+++ b/kpovmodeler/pmcone.cpp
@@ -75,12 +75,12 @@ PMCone::~PMCone( )
{
}
-QString PMCone::description( ) const
+TQString PMCone::description( ) const
{
return i18n( "cone" );
}
-void PMCone::serialize( QDomElement & e, QDomDocument & doc ) const
+void PMCone::serialize( TQDomElement & e, TQDomDocument & doc ) const
{
e.setAttribute( "end_a", m_end1.serializeXML( ) );
e.setAttribute( "end_b", m_end2.serializeXML( ) );
@@ -176,7 +176,7 @@ void PMCone::setOpen( bool op )
}
}
-PMDialogEditBase* PMCone::editWidget( QWidget * parent ) const
+PMDialogEditBase* PMCone::editWidget( TQWidget * parent ) const
{
return new PMConeEdit( parent );
}
diff --git a/kpovmodeler/pmcone.h b/kpovmodeler/pmcone.h
index 445846f3..c41f9325 100644
--- a/kpovmodeler/pmcone.h
+++ b/kpovmodeler/pmcone.h
@@ -59,23 +59,23 @@ public:
virtual PMObject* copy( ) const { return new PMCone( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMConeEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmcone" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmcone" ); }
/**
* Return the end_1
diff --git a/kpovmodeler/pmconeedit.cpp b/kpovmodeler/pmconeedit.cpp
index 2dbcfc7c..9969e4d7 100644
--- a/kpovmodeler/pmconeedit.cpp
+++ b/kpovmodeler/pmconeedit.cpp
@@ -21,12 +21,12 @@
#include "pmvectoredit.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
-PMConeEdit::PMConeEdit( QWidget* parent, const char* name )
+PMConeEdit::PMConeEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -36,36 +36,36 @@ void PMConeEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* layout;
- QGridLayout* gl;
+ TQHBoxLayout* layout;
+ TQGridLayout* gl;
m_pEnd1 = new PMVectorEdit( "x", "y", "z", this );
m_pEnd2 = new PMVectorEdit( "x", "y", "z", this );
m_pRadius1 = new PMFloatEdit( this );
m_pRadius2 = new PMFloatEdit( this );
- m_pOpen = new QCheckBox( i18n( "type of the object", "Open" ), this );
+ m_pOpen = new TQCheckBox( i18n( "type of the object", "Open" ), this );
- gl = new QGridLayout( topLayout( ), 2, 2 );
- gl->addWidget( new QLabel( i18n( "End 1:" ), this ), 0, 0 );
+ gl = new TQGridLayout( topLayout( ), 2, 2 );
+ gl->addWidget( new TQLabel( i18n( "End 1:" ), this ), 0, 0 );
gl->addWidget( m_pEnd1, 0, 1 );
- gl->addWidget( new QLabel( i18n( "End 2:" ), this ), 1, 0 );
+ gl->addWidget( new TQLabel( i18n( "End 2:" ), this ), 1, 0 );
gl->addWidget( m_pEnd2, 1, 1 );
- layout = new QHBoxLayout( topLayout( ) );
- gl = new QGridLayout( layout, 2, 2 );
- gl->addWidget( new QLabel( i18n( "Radius 1:" ), this ), 0, 0 );
+ layout = new TQHBoxLayout( topLayout( ) );
+ gl = new TQGridLayout( layout, 2, 2 );
+ gl->addWidget( new TQLabel( i18n( "Radius 1:" ), this ), 0, 0 );
gl->addWidget( m_pRadius1, 0, 1 );
- gl->addWidget( new QLabel( i18n( "Radius 2:" ), this ), 1, 0 );
+ gl->addWidget( new TQLabel( i18n( "Radius 2:" ), this ), 1, 0 );
gl->addWidget( m_pRadius2, 1, 1 );
layout->addStretch( 1 );
topLayout( )->addWidget( m_pOpen );
- connect( m_pEnd1, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pEnd2, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pRadius1, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pRadius2, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pOpen, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pEnd1, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pEnd2, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pRadius1, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pRadius2, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pOpen, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMConeEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmconeedit.h b/kpovmodeler/pmconeedit.h
index f39f95c6..f4e689fc 100644
--- a/kpovmodeler/pmconeedit.h
+++ b/kpovmodeler/pmconeedit.h
@@ -26,7 +26,7 @@
#include "pmsolidobjectedit.h"
-class QCheckBox;
+class TQCheckBox;
class PMVectorEdit;
class PMFloatEdit;
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMConeEdit with parent and name
*/
- PMConeEdit( QWidget* parent, const char* name = 0 );
+ PMConeEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -59,6 +59,6 @@ private:
PMVectorEdit* m_pEnd2;
PMFloatEdit* m_pRadius1;
PMFloatEdit* m_pRadius2;
- QCheckBox* m_pOpen;
+ TQCheckBox* m_pOpen;
};
#endif
diff --git a/kpovmodeler/pmcontrolpoint.cpp b/kpovmodeler/pmcontrolpoint.cpp
index 8617ae27..18e5953d 100644
--- a/kpovmodeler/pmcontrolpoint.cpp
+++ b/kpovmodeler/pmcontrolpoint.cpp
@@ -25,7 +25,7 @@ double PMControlPoint::s_moveGrid = c_defaultMoveGrid;
double PMControlPoint::s_scaleGrid = c_defaultScaleGrid;
double PMControlPoint::s_rotateGrid = c_defaultRotateGrid;
-PMControlPoint::PMControlPoint( int id, const QString& description )
+PMControlPoint::PMControlPoint( int id, const TQString& description )
{
m_id = id;
m_bChanged = false;
diff --git a/kpovmodeler/pmcontrolpoint.h b/kpovmodeler/pmcontrolpoint.h
index 8d3e9e66..dbc52c6d 100644
--- a/kpovmodeler/pmcontrolpoint.h
+++ b/kpovmodeler/pmcontrolpoint.h
@@ -25,8 +25,8 @@
#endif
#include "pmvector.h"
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
class KConfig;
@@ -50,7 +50,7 @@ public:
/**
* Creates a PMControlPoint with an id and a description.
*/
- PMControlPoint( int id, const QString& description );
+ PMControlPoint( int id, const TQString& description );
/**
* Deletes the PMControlPoint
*/
@@ -98,7 +98,7 @@ public:
/**
* Returns the description
*/
- QString description( ) const { return m_description; }
+ TQString description( ) const { return m_description; }
/**
* Selects/deselects the control point
*/
@@ -177,14 +177,14 @@ private:
PMVector m_normalVector;
bool m_bChanged;
bool m_bSelected;
- QString m_description;
+ TQString m_description;
static double s_moveGrid;
static double s_rotateGrid;
static double s_scaleGrid;
};
-typedef QPtrList<PMControlPoint> PMControlPointList;
-typedef QPtrListIterator<PMControlPoint> PMControlPointListIterator;
+typedef TQPtrList<PMControlPoint> PMControlPointList;
+typedef TQPtrListIterator<PMControlPoint> PMControlPointListIterator;
#endif
diff --git a/kpovmodeler/pmcsg.cpp b/kpovmodeler/pmcsg.cpp
index 3af76740..0ac7e58a 100644
--- a/kpovmodeler/pmcsg.cpp
+++ b/kpovmodeler/pmcsg.cpp
@@ -54,7 +54,7 @@ PMCSG::~PMCSG( )
{
}
-QString PMCSG::description( ) const
+TQString PMCSG::description( ) const
{
switch( m_type )
{
@@ -71,30 +71,30 @@ QString PMCSG::description( ) const
return i18n( "merge" );
break;
}
- return QString( "" );
+ return TQString( "" );
}
-QString PMCSG::pixmap( ) const
+TQString PMCSG::pixmap( ) const
{
switch( m_type )
{
case CSGUnion:
- return QString( "pmunion" );
+ return TQString( "pmunion" );
break;
case CSGIntersection:
- return QString( "pmintersection" );
+ return TQString( "pmintersection" );
break;
case CSGDifference:
- return QString( "pmdifference" );
+ return TQString( "pmdifference" );
break;
case CSGMerge:
- return QString( "pmmerge" );
+ return TQString( "pmmerge" );
break;
}
- return QString( "" );
+ return TQString( "" );
}
-void PMCSG::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMCSG::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
switch( m_type )
{
@@ -117,7 +117,7 @@ void PMCSG::serialize( QDomElement& e, QDomDocument& doc ) const
void PMCSG::readAttributes( const PMXMLHelper& h )
{
- QString str = h.stringAttribute( "csgtype", "union" );
+ TQString str = h.stringAttribute( "csgtype", "union" );
if( str == "union" )
m_type = CSGUnion;
else if( str == "intersection" )
@@ -169,7 +169,7 @@ void PMCSG::setCSGType( const PMCSGType t )
}
}
-PMDialogEditBase* PMCSG::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMCSG::editWidget( TQWidget* parent ) const
{
return new PMCSGEdit( parent );
}
diff --git a/kpovmodeler/pmcsg.h b/kpovmodeler/pmcsg.h
index e8ce741e..380bf0ef 100644
--- a/kpovmodeler/pmcsg.h
+++ b/kpovmodeler/pmcsg.h
@@ -59,7 +59,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMCSG( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -67,19 +67,19 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMCSGEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const;
+ virtual TQString pixmap( ) const;
/**
* Returns the type of the csg
diff --git a/kpovmodeler/pmcsgedit.cpp b/kpovmodeler/pmcsgedit.cpp
index 9a6e0a39..114e22f6 100644
--- a/kpovmodeler/pmcsgedit.cpp
+++ b/kpovmodeler/pmcsgedit.cpp
@@ -19,12 +19,12 @@
#include "pmcsgedit.h"
#include "pmcsg.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
#include <klocale.h>
-PMCSGEdit::PMCSGEdit( QWidget* parent, const char* name )
+PMCSGEdit::PMCSGEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -34,19 +34,19 @@ void PMCSGEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* layout;
- m_pTypeCombo = new QComboBox( false, this );
+ TQHBoxLayout* layout;
+ 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 QHBoxLayout( topLayout( ) );
- layout->addWidget( new QLabel( i18n( "Type:" ), this ) );
+ layout = new TQHBoxLayout( topLayout( ) );
+ layout->addWidget( new TQLabel( i18n( "Type:" ), this ) );
layout->addWidget( m_pTypeCombo );
layout->addStretch( 1 );
- connect( m_pTypeCombo, SIGNAL( activated( int ) ), SLOT( slotTypeSelected( int ) ) );
+ connect( m_pTypeCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotTypeSelected( int ) ) );
}
void PMCSGEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmcsgedit.h b/kpovmodeler/pmcsgedit.h
index 8aeaddc6..d7efc75d 100644
--- a/kpovmodeler/pmcsgedit.h
+++ b/kpovmodeler/pmcsgedit.h
@@ -27,7 +27,7 @@
#include "pmsolidobjectedit.h"
class PMCSG;
-class QComboBox;
+class TQComboBox;
/**
* Dialog edit class for @ref PMCSG
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMCSGEdit with parent and name
*/
- PMCSGEdit( QWidget* parent, const char* name = 0 );
+ PMCSGEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -56,7 +56,7 @@ protected slots:
void slotTypeSelected( int index );
private:
PMCSG* m_pDisplayedObject;
- QComboBox* m_pTypeCombo;
+ TQComboBox* m_pTypeCombo;
};
diff --git a/kpovmodeler/pmcylinder.cpp b/kpovmodeler/pmcylinder.cpp
index 1a119004..358cb542 100644
--- a/kpovmodeler/pmcylinder.cpp
+++ b/kpovmodeler/pmcylinder.cpp
@@ -74,12 +74,12 @@ PMCylinder::~PMCylinder( )
{
}
-QString PMCylinder::description( ) const
+TQString PMCylinder::description( ) const
{
return i18n( "cylinder" );
}
-void PMCylinder::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMCylinder::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "end_a", m_end1.serializeXML( ) );
e.setAttribute( "end_b", m_end2.serializeXML( ) );
@@ -160,7 +160,7 @@ void PMCylinder::setOpen( bool op )
}
}
-PMDialogEditBase* PMCylinder::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMCylinder::editWidget( TQWidget* parent ) const
{
return new PMCylinderEdit( parent );
}
diff --git a/kpovmodeler/pmcylinder.h b/kpovmodeler/pmcylinder.h
index ba98ae40..1bd10901 100644
--- a/kpovmodeler/pmcylinder.h
+++ b/kpovmodeler/pmcylinder.h
@@ -56,22 +56,22 @@ public:
virtual PMObject* copy( ) const { return new PMCylinder( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMCylinderEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmcylinder" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmcylinder" ); }
/**
* Return the end_1
diff --git a/kpovmodeler/pmcylinderedit.cpp b/kpovmodeler/pmcylinderedit.cpp
index 623b2b4f..b15a0d16 100644
--- a/kpovmodeler/pmcylinderedit.cpp
+++ b/kpovmodeler/pmcylinderedit.cpp
@@ -21,12 +21,12 @@
#include "pmvectoredit.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
-PMCylinderEdit::PMCylinderEdit( QWidget* parent, const char* name )
+PMCylinderEdit::PMCylinderEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -36,32 +36,32 @@ void PMCylinderEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* layout;
- QGridLayout* gl;
+ TQHBoxLayout* layout;
+ TQGridLayout* gl;
m_pEnd1 = new PMVectorEdit( "x", "y", "z", this );
m_pEnd2 = new PMVectorEdit( "x", "y", "z", this );
m_pRadius = new PMFloatEdit( this );
- m_pOpen = new QCheckBox( i18n( "type of the object", "Open" ), this );
+ m_pOpen = new TQCheckBox( i18n( "type of the object", "Open" ), this );
- gl = new QGridLayout( topLayout( ), 2, 2 );
- gl->addWidget( new QLabel( i18n( "End 1:" ), this ), 0, 0 );
+ gl = new TQGridLayout( topLayout( ), 2, 2 );
+ gl->addWidget( new TQLabel( i18n( "End 1:" ), this ), 0, 0 );
gl->addWidget( m_pEnd1, 0, 1 );
- gl->addWidget( new QLabel( i18n( "End 2:" ), this ), 1, 0 );
+ gl->addWidget( new TQLabel( i18n( "End 2:" ), this ), 1, 0 );
gl->addWidget( m_pEnd2, 1, 1 );
- layout = new QHBoxLayout( topLayout( ) );
- layout->addWidget( new QLabel( i18n( "Radius:" ), this ) );
+ layout = new TQHBoxLayout( topLayout( ) );
+ layout->addWidget( new TQLabel( i18n( "Radius:" ), this ) );
layout->addWidget( m_pRadius );
layout->addStretch( 1 );
- layout = new QHBoxLayout( topLayout( ) );
+ layout = new TQHBoxLayout( topLayout( ) );
layout->addWidget( m_pOpen );
- connect( m_pEnd1, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pEnd2, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pOpen, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pEnd1, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pEnd2, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pOpen, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMCylinderEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmcylinderedit.h b/kpovmodeler/pmcylinderedit.h
index aec05df5..9f2c0993 100644
--- a/kpovmodeler/pmcylinderedit.h
+++ b/kpovmodeler/pmcylinderedit.h
@@ -29,7 +29,7 @@
class PMVectorEdit;
class PMFloatEdit;
class PMCylinder;
-class QCheckBox;
+class TQCheckBox;
class PMCylinderEdit : public PMSolidObjectEdit
{
@@ -39,7 +39,7 @@ public:
/**
* Creates a PMCylinderEdit with parent and name
*/
- PMCylinderEdit( QWidget* parent, const char* name = 0 );
+ PMCylinderEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -57,7 +57,7 @@ private:
PMVectorEdit* m_pEnd1;
PMVectorEdit* m_pEnd2;
PMFloatEdit* m_pRadius;
- QCheckBox* m_pOpen;
+ TQCheckBox* m_pOpen;
};
#endif
diff --git a/kpovmodeler/pmdatachangecommand.cpp b/kpovmodeler/pmdatachangecommand.cpp
index 0793986e..99ac75d3 100644
--- a/kpovmodeler/pmdatachangecommand.cpp
+++ b/kpovmodeler/pmdatachangecommand.cpp
@@ -25,7 +25,7 @@
PMDataChangeCommand::PMDataChangeCommand( PMMemento* memento )
: PMCommand( )
{
- QString text = memento->originator( )->name( );
+ TQString text = memento->originator( )->name( );
if( text.isEmpty( ) )
text = memento->originator( )->description( );
setText( i18n( "Change %1" ).arg( text ) );
diff --git a/kpovmodeler/pmdeclare.cpp b/kpovmodeler/pmdeclare.cpp
index 2b698f0e..3f290e2f 100644
--- a/kpovmodeler/pmdeclare.cpp
+++ b/kpovmodeler/pmdeclare.cpp
@@ -22,7 +22,7 @@
#include "pmprototypemanager.h"
#include "pmpart.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <klocale.h>
PMDefinePropertyClass( PMDeclare, PMDeclareProperty );
@@ -73,16 +73,16 @@ PMDeclare::~PMDeclare( )
{
}
-QString PMDeclare::description( ) const
+TQString PMDeclare::description( ) const
{
PMPart* pPart = part( );
- QString d = i18n( "declaration" );
+ TQString d = i18n( "declaration" );
if( m_pDeclareType && pPart )
{
- const QValueList<PMDeclareDescription>& descriptions
+ const TQValueList<PMDeclareDescription>& descriptions
= pPart->prototypeManager( )->declarationTypes( );
- QValueList<PMDeclareDescription>::const_iterator it;
+ TQValueList<PMDeclareDescription>::const_iterator it;
bool found = false;
for( it = descriptions.begin( ); it != descriptions.end( ) && !found; ++it )
{
@@ -96,16 +96,16 @@ QString PMDeclare::description( ) const
return d;
}
-QString PMDeclare::pixmap( ) const
+TQString PMDeclare::pixmap( ) const
{
PMPart* pPart = part( );
- QString d = "pmdeclare";
+ TQString d = "pmdeclare";
if( m_pDeclareType && pPart )
{
- const QValueList<PMDeclareDescription>& descriptions
+ const TQValueList<PMDeclareDescription>& descriptions
= pPart->prototypeManager( )->declarationTypes( );
- QValueList<PMDeclareDescription>::const_iterator it;
+ TQValueList<PMDeclareDescription>::const_iterator it;
bool found = false;
for( it = descriptions.begin( ); it != descriptions.end( ) && !found; ++it )
{
@@ -119,7 +119,7 @@ QString PMDeclare::pixmap( ) const
return d;
}
-void PMDeclare::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMDeclare::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "id", m_id );
Base::serialize( e, doc );
@@ -131,12 +131,12 @@ void PMDeclare::readAttributes( const PMXMLHelper& h )
Base::readAttributes( h );
}
-PMDialogEditBase* PMDeclare::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMDeclare::editWidget( TQWidget* parent ) const
{
return new PMDeclareEdit( parent );
}
-void PMDeclare::setID( const QString& newID )
+void PMDeclare::setID( const TQString& newID )
{
if( newID != m_id )
{
@@ -150,10 +150,10 @@ void PMDeclare::setID( const QString& newID )
}
}
-QString PMDeclare::declareType( ) const
+TQString PMDeclare::declareType( ) const
{
if( !m_pDeclareType )
- return QString( "None" );
+ return TQString( "None" );
return m_pDeclareType->className( );
}
diff --git a/kpovmodeler/pmdeclare.h b/kpovmodeler/pmdeclare.h
index d466e60e..89468bf4 100644
--- a/kpovmodeler/pmdeclare.h
+++ b/kpovmodeler/pmdeclare.h
@@ -50,9 +50,9 @@ public:
virtual PMObject* copy( ) const { return new PMDeclare( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
- virtual QString pixmap( ) const;
+ virtual TQString pixmap( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -62,31 +62,31 @@ public:
/** */
virtual bool dataChangeOnInsertRemove( ) const { return true; }
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMDeclareEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the id of the declare
*/
- virtual QString name( ) const { return m_id; }
+ virtual TQString name( ) const { return m_id; }
/**
* Returns the id of the declare
*/
- QString id( ) const { return m_id; }
+ TQString id( ) const { return m_id; }
/**
* Returns the declare type
*/
- QString declareType( ) const;
+ TQString declareType( ) const;
/**
* Sets the id of the object.
*/
- void setID( const QString& id );
+ void setID( const TQString& id );
/** */
virtual bool canHaveName( ) const { return true; }
@@ -131,7 +131,7 @@ private:
/**
* id of the declare
*/
- QString m_id;
+ TQString m_id;
/**
* The linked objects
*/
diff --git a/kpovmodeler/pmdeclareedit.cpp b/kpovmodeler/pmdeclareedit.cpp
index 5f9e9c67..a461d710 100644
--- a/kpovmodeler/pmdeclareedit.cpp
+++ b/kpovmodeler/pmdeclareedit.cpp
@@ -23,17 +23,17 @@
#include "pmscanner.h"
#include "pmobjectselect.h"
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qtextstream.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqtextstream.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
#include <klocale.h>
#include <kmessagebox.h>
-PMDeclareEdit::PMDeclareEdit( QWidget* parent, const char* name )
+PMDeclareEdit::PMDeclareEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -44,34 +44,34 @@ void PMDeclareEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* layout = new QHBoxLayout( topLayout( ) );
- m_pNameEdit = new QLineEdit( this );
+ TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) );
+ m_pNameEdit = new TQLineEdit( this );
m_pNameEdit->setMaxLength( 40 );
- QLabel* label = new QLabel( i18n( "Identifier:" ), this );
+ TQLabel* label = new TQLabel( i18n( "Identifier:" ), this );
layout->addWidget( label );
layout->addWidget( m_pNameEdit );
- connect( m_pNameEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotNameChanged( const QString& ) ) );
+ connect( m_pNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotNameChanged( const TQString& ) ) );
}
void PMDeclareEdit::createBottomWidgets( )
{
- QLabel* l = new QLabel( i18n( "Linked objects:" ), this );
+ TQLabel* l = new TQLabel( i18n( "Linked objects:" ), this );
topLayout( )->addWidget( l );
- m_pLinkedObjects = new QListBox( this );
+ m_pLinkedObjects = new TQListBox( this );
m_pLinkedObjects->setMinimumHeight( 100 );
- connect( m_pLinkedObjects, SIGNAL( highlighted( QListBoxItem* ) ),
- SLOT( slotItemSelected( QListBoxItem* ) ) );
+ connect( m_pLinkedObjects, TQT_SIGNAL( highlighted( TQListBoxItem* ) ),
+ TQT_SLOT( slotItemSelected( TQListBoxItem* ) ) );
topLayout( )->addWidget( m_pLinkedObjects, 1 );
- QHBoxLayout* layout = new QHBoxLayout( topLayout( ) );
- m_pSelectButton = new QPushButton( i18n( "Select..." ), this );
+ TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) );
+ m_pSelectButton = new TQPushButton( i18n( "Select..." ), this );
m_pSelectButton->setEnabled( false );
- connect( m_pSelectButton, SIGNAL( clicked( ) ), SLOT( slotSelect( ) ) );
+ connect( m_pSelectButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotSelect( ) ) );
layout->addStretch( );
layout->addWidget( m_pSelectButton );
@@ -83,7 +83,7 @@ void PMDeclareEdit::displayObject( PMObject* o )
if( o->isA( "Declare" ) )
{
m_pDisplayedObject = ( PMDeclare* ) o;
- m_pNameEdit->setText( QString( m_pDisplayedObject->id( ) ) );
+ m_pNameEdit->setText( TQString( m_pDisplayedObject->id( ) ) );
m_pNameEdit->setReadOnly( m_pDisplayedObject->isReadOnly( ) );
@@ -117,7 +117,7 @@ bool PMDeclareEdit::isDataValid( )
if( !Base::isDataValid( ) )
return false;
- QString text = m_pNameEdit->text( );
+ TQString text = m_pNameEdit->text( );
if( text.length( ) == 0 )
{
KMessageBox::error( this, i18n( "Please enter an identifier!" ),
@@ -128,8 +128,8 @@ bool PMDeclareEdit::isDataValid( )
if( text == m_pDisplayedObject->id( ) )
return true;
- QTextStream str( &text, IO_ReadOnly );
- QChar c;
+ TQTextStream str( &text, IO_ReadOnly );
+ TQChar c;
int ac;
bool ok = true;
int i = 0;
@@ -137,7 +137,7 @@ bool PMDeclareEdit::isDataValid( )
{
str >> c;
ac = c.latin1( );
- // QChar::category can't be used because umlauts are not allowed
+ // TQChar::category can't be used because umlauts are not allowed
if( i == 0 )
ok = ( ( ( ac >= 'a' ) && ( ac <= 'z' ) ) ||
( ( ac >= 'A' ) && ( ac <= 'Z' ) ) ||
@@ -187,12 +187,12 @@ bool PMDeclareEdit::isDataValid( )
return true;
}
-void PMDeclareEdit::slotNameChanged( const QString& )
+void PMDeclareEdit::slotNameChanged( const TQString& )
{
emit dataChanged( );
}
-void PMDeclareEdit::slotItemSelected( QListBoxItem* item )
+void PMDeclareEdit::slotItemSelected( TQListBoxItem* item )
{
m_pSelectedObject = ( ( PMListBoxObject* ) item )->object( );
m_pSelectButton->setEnabled( true );
diff --git a/kpovmodeler/pmdeclareedit.h b/kpovmodeler/pmdeclareedit.h
index 9ee2fc83..2a40b869 100644
--- a/kpovmodeler/pmdeclareedit.h
+++ b/kpovmodeler/pmdeclareedit.h
@@ -27,10 +27,10 @@
#include "pmdialogeditbase.h"
class PMDeclare;
-class QLineEdit;
-class QListBox;
-class QPushButton;
-class QListBoxItem;
+class TQLineEdit;
+class TQListBox;
+class TQPushButton;
+class TQListBoxItem;
/**
* Dialog edit class for @ref PMDeclare.
@@ -43,7 +43,7 @@ public:
/**
* Creates a PMDeclareEdit with parent and name
*/
- PMDeclareEdit( QWidget* parent, const char* name = 0 );
+ PMDeclareEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -59,14 +59,14 @@ protected:
virtual void saveContents( );
private slots:
- void slotNameChanged( const QString& );
- void slotItemSelected( QListBoxItem* );
+ void slotNameChanged( const TQString& );
+ void slotItemSelected( TQListBoxItem* );
void slotSelect( );
private:
PMDeclare* m_pDisplayedObject;
- QLineEdit* m_pNameEdit;
- QListBox* m_pLinkedObjects;
- QPushButton* m_pSelectButton;
+ TQLineEdit* m_pNameEdit;
+ TQListBox* m_pLinkedObjects;
+ TQPushButton* m_pSelectButton;
PMObject* m_pSelectedObject;
};
diff --git a/kpovmodeler/pmdefaults.h b/kpovmodeler/pmdefaults.h
index 32c9675c..894433b3 100644
--- a/kpovmodeler/pmdefaults.h
+++ b/kpovmodeler/pmdefaults.h
@@ -22,29 +22,29 @@
#include <config.h>
#endif
-#include <qcolor.h>
+#include <tqcolor.h>
#include <math.h>
// PMRenderManager
-const QColor c_defaultGraphicalObjectColor0 = QColor( 148, 148, 148 );
-const QColor c_defaultGraphicalObjectColor1 = QColor( 255, 255, 128 );
-const QColor c_defaultTextureColor0 = QColor( 64, 192, 64 );
-const QColor c_defaultTextureColor1 = QColor( 192, 255, 128 );
-const QColor c_defaultAxesColorX = QColor( 255, 0, 0 );
-const QColor c_defaultAxesColorY = QColor( 0, 255, 0 );
-const QColor c_defaultAxesColorZ = QColor( 0, 0, 255 );
-const QColor c_defaultControlPointColor0 = QColor( 255, 255, 148 );
-const QColor c_defaultControlPointColor1 = QColor( 92, 255, 92 );
-const QColor c_defaultBackgroundColor = QColor( 0, 0, 0 );
-const QColor c_defaultFieldOfViewColor = QColor( 128, 128, 255 );
+const TQColor c_defaultGraphicalObjectColor0 = TQColor( 148, 148, 148 );
+const TQColor c_defaultGraphicalObjectColor1 = TQColor( 255, 255, 128 );
+const TQColor c_defaultTextureColor0 = TQColor( 64, 192, 64 );
+const TQColor c_defaultTextureColor1 = TQColor( 192, 255, 128 );
+const TQColor c_defaultAxesColorX = TQColor( 255, 0, 0 );
+const TQColor c_defaultAxesColorY = TQColor( 0, 255, 0 );
+const TQColor c_defaultAxesColorZ = TQColor( 0, 0, 255 );
+const TQColor c_defaultControlPointColor0 = TQColor( 255, 255, 148 );
+const TQColor c_defaultControlPointColor1 = TQColor( 92, 255, 92 );
+const TQColor c_defaultBackgroundColor = TQColor( 0, 0, 0 );
+const TQColor c_defaultFieldOfViewColor = TQColor( 128, 128, 255 );
const bool c_defaultHighDetailCameraView = true;
// PMGLView
const int c_defaultGridDistance = 50;
-const QColor c_defaultGridColor = QColor( 40, 120, 40 );
+const TQColor c_defaultGridColor = TQColor( 40, 120, 40 );
// PovrayRenderWidget
-const QString c_defaultPovrayCommand = QString( "povray" );
+const TQString c_defaultPovrayCommand = TQString( "povray" );
// PMDetailObject
const int c_defaultDetailObjectGlobalDetailLevel = 1;
@@ -112,10 +112,10 @@ const int c_defaultTPAADepth = 2;
const double c_defaultTPAAThreshold = 0.3;
const bool c_defaultTPShowFloor = true;
const bool c_defaultTPShowWall = true;
-const QColor c_defaultTPWallColor1 = QColor( 255, 255, 255 );
-const QColor c_defaultTPWallColor2 = QColor( 0, 0, 0 );
-const QColor c_defaultTPFloorColor1 = QColor( 192, 0, 0 );
-const QColor c_defaultTPFloorColor2 = QColor( 255, 255, 255 );
+const TQColor c_defaultTPWallColor1 = TQColor( 255, 255, 255 );
+const TQColor c_defaultTPWallColor2 = TQColor( 0, 0, 0 );
+const TQColor c_defaultTPFloorColor1 = TQColor( 192, 0, 0 );
+const TQColor c_defaultTPFloorColor2 = TQColor( 255, 255, 255 );
const double c_defaultTPGamma = 1.5;
// PM3DControlPoint
diff --git a/kpovmodeler/pmdeletecommand.cpp b/kpovmodeler/pmdeletecommand.cpp
index fa5ff47b..a4629728 100644
--- a/kpovmodeler/pmdeletecommand.cpp
+++ b/kpovmodeler/pmdeletecommand.cpp
@@ -24,7 +24,7 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qptrdict.h>
+#include <tqptrdict.h>
PMDeleteCommand::PMDeleteCommand( PMObject* obj )
: PMCommand( i18n( "Delete %1" ).arg( obj->name( ) ) )
@@ -140,7 +140,7 @@ void PMDeleteCommand::execute( PMCommandManager* theManager )
}
}
- QPtrListIterator<PMMemento> mit( m_dataChanges );
+ TQPtrListIterator<PMMemento> mit( m_dataChanges );
for( ; mit.current( ); ++mit )
{
PMObjectChangeListIterator change = mit.current( )->changedObjects( );
@@ -182,7 +182,7 @@ void PMDeleteCommand::undo( PMCommandManager* theManager )
for( ; dit.current( ); ++dit )
theManager->cmdObjectChanged( dit.current( ), PMCData );
- QPtrListIterator<PMMemento> mit( m_dataChanges );
+ TQPtrListIterator<PMMemento> mit( m_dataChanges );
for( ; mit.current( ); ++mit )
{
mit.current( )->originator( )->restoreMemento( mit.current( ) );
@@ -206,7 +206,7 @@ int PMDeleteCommand::errorFlags( PMPart* )
bool error = false;
// dictionary of deleted objects
- QPtrDict<bool> m_deletedObjects( 1009 );
+ TQPtrDict<bool> m_deletedObjects( 1009 );
m_deletedObjects.setAutoDelete( true );
PMDeleteInfoListIterator it( m_infoList );
for( ; it.current( ); ++it )
diff --git a/kpovmodeler/pmdeletecommand.h b/kpovmodeler/pmdeletecommand.h
index ff67c0bc..d11cf348 100644
--- a/kpovmodeler/pmdeletecommand.h
+++ b/kpovmodeler/pmdeletecommand.h
@@ -25,7 +25,7 @@
#endif
#include "pmcommand.h"
-#include <qstring.h>
+#include <tqstring.h>
#include "pmobject.h"
@@ -79,8 +79,8 @@ private:
bool m_insertError;
};
-typedef QPtrList<PMDeleteInfo> PMDeleteInfoList;
-typedef QPtrListIterator<PMDeleteInfo> PMDeleteInfoListIterator;
+typedef TQPtrList<PMDeleteInfo> PMDeleteInfoList;
+typedef TQPtrListIterator<PMDeleteInfo> PMDeleteInfoListIterator;
/**
* Command class for removing PMObjects
@@ -120,7 +120,7 @@ private:
PMObjectList m_links;
PMObjectList m_linkedDeclares;
bool m_linksCreated;
- QPtrList<PMMemento> m_dataChanges;
+ TQPtrList<PMMemento> m_dataChanges;
};
#endif
diff --git a/kpovmodeler/pmdensity.cpp b/kpovmodeler/pmdensity.cpp
index 1cc1d638..3935b6be 100644
--- a/kpovmodeler/pmdensity.cpp
+++ b/kpovmodeler/pmdensity.cpp
@@ -63,13 +63,13 @@ void PMDensity::cleanUp( ) const
Base::cleanUp( );
}
-QString PMDensity::description( ) const
+TQString PMDensity::description( ) const
{
return i18n( "density" );
}
-PMDialogEditBase* PMDensity::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMDensity::editWidget( TQWidget* parent ) const
{
return new PMDensityEdit( parent );
}
diff --git a/kpovmodeler/pmdensity.h b/kpovmodeler/pmdensity.h
index 72a76bb7..b1502fe2 100644
--- a/kpovmodeler/pmdensity.h
+++ b/kpovmodeler/pmdensity.h
@@ -49,7 +49,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMDensity( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -59,9 +59,9 @@ public:
/**
* Returns a new @ref PMDensityEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmdensity" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmdensity" ); }
private:
/**
diff --git a/kpovmodeler/pmdensityedit.cpp b/kpovmodeler/pmdensityedit.cpp
index 9c7ff732..407a4f80 100644
--- a/kpovmodeler/pmdensityedit.cpp
+++ b/kpovmodeler/pmdensityedit.cpp
@@ -20,12 +20,12 @@
#include "pmdensity.h"
#include "pmlinkedit.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
-PMDensityEdit::PMDensityEdit( QWidget* parent, const char* name )
+PMDensityEdit::PMDensityEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
diff --git a/kpovmodeler/pmdensityedit.h b/kpovmodeler/pmdensityedit.h
index 093a750c..a3963ca9 100644
--- a/kpovmodeler/pmdensityedit.h
+++ b/kpovmodeler/pmdensityedit.h
@@ -39,7 +39,7 @@ public:
/**
* Creates a PMDensityEdit with parent and name
*/
- PMDensityEdit( QWidget* parent, const char* name = 0 );
+ PMDensityEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmdetailobject.cpp b/kpovmodeler/pmdetailobject.cpp
index eae526cb..5abc7e22 100644
--- a/kpovmodeler/pmdetailobject.cpp
+++ b/kpovmodeler/pmdetailobject.cpp
@@ -70,7 +70,7 @@ void PMDetailObject::cleanUp( ) const
Base::cleanUp( );
}
-void PMDetailObject::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMDetailObject::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "global_detail", m_globalDetail );
e.setAttribute( "local_detail_level", m_localDetailLevel );
diff --git a/kpovmodeler/pmdetailobject.h b/kpovmodeler/pmdetailobject.h
index 7994cdff..846ef8c0 100644
--- a/kpovmodeler/pmdetailobject.h
+++ b/kpovmodeler/pmdetailobject.h
@@ -48,7 +48,7 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
diff --git a/kpovmodeler/pmdetailobjectedit.cpp b/kpovmodeler/pmdetailobjectedit.cpp
index d42c668c..661cd892 100644
--- a/kpovmodeler/pmdetailobjectedit.cpp
+++ b/kpovmodeler/pmdetailobjectedit.cpp
@@ -17,13 +17,13 @@
#include "pmdetailobjectedit.h"
#include "pmdetailobject.h"
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qcombobox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
#include <klocale.h>
-PMDetailObjectEdit::PMDetailObjectEdit( QWidget* parent, const char* name )
+PMDetailObjectEdit::PMDetailObjectEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -33,10 +33,10 @@ void PMDetailObjectEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* layout = new QHBoxLayout( topLayout( ) );
- m_pGlobalDetail = new QCheckBox( i18n( "Global detail" ), this );
- m_pLocalDetailLevelLabel = new QLabel( i18n( "Detail level:" ), this );
- m_pLocalDetailLevel = new QComboBox( this );
+ TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) );
+ m_pGlobalDetail = new TQCheckBox( i18n( "Global detail" ), this );
+ m_pLocalDetailLevelLabel = new TQLabel( i18n( "Detail level:" ), this );
+ m_pLocalDetailLevel = new TQComboBox( this );
m_pLocalDetailLevel->insertItem( i18n( "Very Low" ) );
m_pLocalDetailLevel->insertItem( i18n( "Low" ) );
m_pLocalDetailLevel->insertItem( i18n( "Medium" ) );
@@ -48,8 +48,8 @@ void PMDetailObjectEdit::createTopWidgets( )
layout->addWidget( m_pLocalDetailLevel );
layout->addStretch( );
- connect( m_pGlobalDetail, SIGNAL( clicked( ) ), SLOT( slotGlobalDetailClicked( ) ) );
- connect( m_pLocalDetailLevel, SIGNAL( activated( int ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pGlobalDetail, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotGlobalDetailClicked( ) ) );
+ connect( m_pLocalDetailLevel, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMDetailObjectEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmdetailobjectedit.h b/kpovmodeler/pmdetailobjectedit.h
index 7a585034..74aa3a29 100644
--- a/kpovmodeler/pmdetailobjectedit.h
+++ b/kpovmodeler/pmdetailobjectedit.h
@@ -25,9 +25,9 @@
#include "pmnamedobjectedit.h"
class PMDetailObject;
-class QCheckBox;
-class QLabel;
-class QComboBox;
+class TQCheckBox;
+class TQLabel;
+class TQComboBox;
/**
* Dialog edit class for @ref PMNamedObject.
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMNamedObjectEdit with parent and name
*/
- PMDetailObjectEdit( QWidget* parent, const char* name = 0 );
+ PMDetailObjectEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -59,9 +59,9 @@ private slots:
private:
PMDetailObject* m_pDisplayedObject;
- QCheckBox* m_pGlobalDetail;
- QLabel* m_pLocalDetailLevelLabel;
- QComboBox* m_pLocalDetailLevel;
+ TQCheckBox* m_pGlobalDetail;
+ TQLabel* m_pLocalDetailLevelLabel;
+ TQComboBox* m_pLocalDetailLevel;
};
diff --git a/kpovmodeler/pmdialogeditbase.cpp b/kpovmodeler/pmdialogeditbase.cpp
index 9defd762..ea601be3 100644
--- a/kpovmodeler/pmdialogeditbase.cpp
+++ b/kpovmodeler/pmdialogeditbase.cpp
@@ -18,13 +18,13 @@
#include "pmdialogeditbase.h"
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qbuffer.h>
-#include <qptrdict.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqbuffer.h>
+#include <tqptrdict.h>
#include <kdialog.h>
#include <kconfig.h>
#include <klocale.h>
@@ -51,52 +51,52 @@ int PMDialogEditBase::s_previewAADepth = c_defaultTPAADepth;
double PMDialogEditBase::s_previewAAThreshold = c_defaultTPAAThreshold;
bool PMDialogEditBase::s_showFloor = c_defaultTPShowFloor;
bool PMDialogEditBase::s_showWall = c_defaultTPShowWall;
-QColor PMDialogEditBase::s_wallColor1 = c_defaultTPWallColor1;
-QColor PMDialogEditBase::s_wallColor2 = c_defaultTPWallColor2;
-QColor PMDialogEditBase::s_floorColor1 = c_defaultTPFloorColor1;
-QColor PMDialogEditBase::s_floorColor2 = c_defaultTPFloorColor2;
+TQColor PMDialogEditBase::s_wallColor1 = c_defaultTPWallColor1;
+TQColor PMDialogEditBase::s_wallColor2 = c_defaultTPWallColor2;
+TQColor PMDialogEditBase::s_floorColor1 = c_defaultTPFloorColor1;
+TQColor PMDialogEditBase::s_floorColor2 = c_defaultTPFloorColor2;
bool PMDialogEditBase::s_previewLocal = false;
double PMDialogEditBase::s_previewGamma = c_defaultTPGamma;
/** Constants for texture preview */
-const QString c_wallCode = QString(
+const TQString c_wallCode = TQString(
"plane { <0, 0, -1>, -2\n"
" pigment { checker %1 %2\n"
" scale <0.5, 0.5, 0.5>\n"
" translate <0.5, 0, 0>\n"
" }\n"
"}\n" );
-const QString c_floorCode = QString(
+const TQString c_floorCode = TQString(
"plane { <0, 1, 0>, 0\n"
" pigment { checker %1 %2\n"
" scale <0.5, 0.5, 0.5>\n"
" }\n"
"}\n" );
-const QString c_lightCode = QString(
+const TQString c_lightCode = TQString(
"light_source { <-2.5, 3, -1.5>, rgb <1, 1, 1> }\n"
"light_source { <3, 3, -3>, rgb <0.6, 0.6, 0.6> shadowless }\n" );
-const QString c_cameraCode[3] = {
- QString( "camera { location <-1, 1.25, -2> right <1, 0, 0>\n"
+const TQString c_cameraCode[3] = {
+ TQString( "camera { location <-1, 1.25, -2> right <1, 0, 0>\n"
" look_at <0.0, 0.5, 0> angle 45 }\n" ),
- QString( "camera { location <-1, 2, -3> right <1, 0, 0>\n"
+ TQString( "camera { location <-1, 2, -3> right <1, 0, 0>\n"
" look_at <0.0, 1, 0> angle 45 }\n" ),
- QString( "camera { location <-2, 2.5, -4> right <1, 0, 0>\n"
+ TQString( "camera { location <-2, 2.5, -4> right <1, 0, 0>\n"
" look_at <0.0, 1.5, 0> angle 45 }\n" )
};
-const QString c_sphereCode = QString(
+const TQString c_sphereCode = TQString(
"sphere { <0, 0.5, 0>, 0.5 translate <0, %1, 0> }\n" );
-const QString c_cylinderCode = QString(
+const TQString c_cylinderCode = TQString(
"cylinder { <0, 0, 0>, <0, 1, 0>, 0.5 translate <0, %1, 0> }\n" );
-const QString c_boxCode = QString(
+const TQString c_boxCode = TQString(
"box { <-0.5, 0, -0.5>, <0.5, 1, 0.5> translate <0, %1, 0> }\n" );
-const QString c_globalSettingsCode = QString(
+const TQString c_globalSettingsCode = TQString(
"global_settings { assumed_gamma %1 }\n" );
-PMDialogEditBase::PMDialogEditBase( QWidget* parent, const char* name )
- : QWidget( parent, name )
+PMDialogEditBase::PMDialogEditBase( TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
m_pDisplayedObject = 0;
m_pPart = 0;
@@ -118,7 +118,7 @@ PMDialogEditBase::~PMDialogEditBase( )
void PMDialogEditBase::createWidgets( )
{
- m_pTopLayout = new QBoxLayout( this, QBoxLayout::TopToBottom,
+ m_pTopLayout = new TQBoxLayout( this, TQBoxLayout::TopToBottom,
KDialog::spacingHint( ) );
createTopWidgets( );
@@ -130,7 +130,7 @@ void PMDialogEditBase::createWidgets( )
void PMDialogEditBase::createBottomWidgets( )
{
- m_pTexturePreviewWidget = new QWidget( this );
+ m_pTexturePreviewWidget = new TQWidget( this );
m_pTexturePreviewWidget->hide( );
m_pTopLayout->addWidget( m_pTexturePreviewWidget );
}
@@ -163,43 +163,43 @@ void PMDialogEditBase::displayObject( PMObject* o )
// is the preview widget created?
if( !m_pRenderWidget )
{
- QVBoxLayout* vl = new QVBoxLayout( m_pTexturePreviewWidget, 0,
+ TQVBoxLayout* vl = new TQVBoxLayout( m_pTexturePreviewWidget, 0,
KDialog::spacingHint( ) );
vl->addSpacing( 10 );
- QFrame* hline = new QFrame( m_pTexturePreviewWidget );
- hline->setFrameStyle( QFrame::HLine | QFrame::Plain );
+ TQFrame* hline = new TQFrame( m_pTexturePreviewWidget );
+ hline->setFrameStyle( TQFrame::HLine | TQFrame::Plain );
hline->setLineWidth( 1 );
vl->addWidget( hline );
- vl->addWidget( new QLabel( i18n( "Texture preview:" ), m_pTexturePreviewWidget ) );
- m_pRenderFrame = new QVBox( m_pTexturePreviewWidget );
- m_pRenderFrame->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ vl->addWidget( new TQLabel( i18n( "Texture preview:" ), m_pTexturePreviewWidget ) );
+ m_pRenderFrame = new TQVBox( m_pTexturePreviewWidget );
+ m_pRenderFrame->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
m_pRenderFrame->setLineWidth( 2 );
m_pRenderFrame->hide( );
vl->addWidget( m_pRenderFrame );
m_pRenderWidget = new PMPovrayRenderWidget( m_pRenderFrame );
- connect( m_pRenderWidget, SIGNAL( finished( int ) ),
- SLOT( slotPreviewFinished( int ) ) );
- m_pPreviewLocalBox = new QCheckBox( i18n( "local" ), m_pTexturePreviewWidget );
+ connect( m_pRenderWidget, TQT_SIGNAL( finished( int ) ),
+ TQT_SLOT( slotPreviewFinished( int ) ) );
+ m_pPreviewLocalBox = new TQCheckBox( i18n( "local" ), m_pTexturePreviewWidget );
m_pPreviewLocalBox->setChecked( s_previewLocal );
- connect( m_pPreviewLocalBox, SIGNAL( toggled( bool ) ),
- SLOT( slotPreviewLocal( bool ) ) );
+ connect( m_pPreviewLocalBox, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotPreviewLocal( bool ) ) );
vl->addWidget( m_pPreviewLocalBox );
- QHBoxLayout* hl = new QHBoxLayout( vl );
- m_pPreviewButton = new QPushButton( i18n( "&Preview" ), m_pTexturePreviewWidget );
+ TQHBoxLayout* hl = new TQHBoxLayout( vl );
+ m_pPreviewButton = new TQPushButton( i18n( "&Preview" ), m_pTexturePreviewWidget );
hl->addWidget( m_pPreviewButton );
- connect( m_pPreviewButton, SIGNAL( clicked( ) ),
- SLOT( slotTexturePreview( ) ) );
- m_pOutputButton = new QPushButton( i18n( "Povray Output" ), m_pTexturePreviewWidget );
+ connect( m_pPreviewButton, TQT_SIGNAL( clicked( ) ),
+ TQT_SLOT( slotTexturePreview( ) ) );
+ m_pOutputButton = new TQPushButton( i18n( "Povray Output" ), m_pTexturePreviewWidget );
hl->addWidget( m_pOutputButton );
- connect( m_pOutputButton, SIGNAL( clicked( ) ),
- SLOT( slotPovrayOutput( ) ) );
+ connect( m_pOutputButton, TQT_SIGNAL( clicked( ) ),
+ TQT_SLOT( slotPovrayOutput( ) ) );
hl->addStretch( 1 );
m_pOutputWidget = new PMPovrayOutputWidget( );
- connect( m_pRenderWidget, SIGNAL( povrayMessage( const QString& ) ),
- m_pOutputWidget, SLOT( slotText( const QString& ) ) );
+ connect( m_pRenderWidget, TQT_SIGNAL( povrayMessage( const TQString& ) ),
+ m_pOutputWidget, TQT_SLOT( slotText( const TQString& ) ) );
}
m_pTexturePreviewWidget->show( );
@@ -217,7 +217,7 @@ void PMDialogEditBase::displayObject( PMObject* o )
}
}
-void PMDialogEditBase::setHelp( const QString& anchor )
+void PMDialogEditBase::setHelp( const TQString& anchor )
{
m_helpTopic = anchor;
}
@@ -228,7 +228,7 @@ void PMDialogEditBase::redisplay( )
displayObject( m_pDisplayedObject );
}
-void PMDialogEditBase::setCheckBox( QCheckBox* box, PMThreeState state )
+void PMDialogEditBase::setCheckBox( TQCheckBox* box, PMThreeState state )
{
switch( state )
{
@@ -244,18 +244,18 @@ void PMDialogEditBase::setCheckBox( QCheckBox* box, PMThreeState state )
}
}
-PMThreeState PMDialogEditBase::checkBoxState( QCheckBox* box )
+PMThreeState PMDialogEditBase::checkBoxState( TQCheckBox* box )
{
PMThreeState st = PMTrue;
switch( box->state( ) )
{
- case QCheckBox::On:
+ case TQCheckBox::On:
st = PMTrue;
break;
- case QCheckBox::Off:
+ case TQCheckBox::Off:
st = PMFalse;
break;
- case QCheckBox::NoChange:
+ case TQCheckBox::NoChange:
st = PMUnspecified;
break;
}
@@ -385,15 +385,15 @@ void PMDialogEditBase::slotTexturePreview( )
s_showSphere = true;
int numObjects = 0;
- QByteArray scene;
- QBuffer buffer( scene );
+ TQByteArray scene;
+ TQBuffer buffer( scene );
buffer.open( IO_WriteOnly );
- QTextStream str( &buffer );
+ TQTextStream str( &buffer );
PMPovray31Format format;
PMSerializer* dev = format.newSerializer( &buffer );
PMRenderMode mode;
PMObjectList neededDeclares, objectsToCheck;
- QPtrDict<PMObject> objectsToSerialize( 101 );
+ TQPtrDict<PMObject> objectsToSerialize( 101 );
PMObject* link;
// find needed declares
diff --git a/kpovmodeler/pmdialogeditbase.h b/kpovmodeler/pmdialogeditbase.h
index 547946f5..6057648e 100644
--- a/kpovmodeler/pmdialogeditbase.h
+++ b/kpovmodeler/pmdialogeditbase.h
@@ -24,16 +24,16 @@
#include <config.h>
#endif
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
#include "pmobject.h"
-class QBoxLayout;
-class QCheckBox;
-class QLayout;
-class QPushButton;
-class QVBox;
+class TQBoxLayout;
+class TQCheckBox;
+class TQLayout;
+class TQPushButton;
+class TQVBox;
class KConfig;
class PMPart;
class PMPovrayRenderWidget;
@@ -62,7 +62,7 @@ public:
* No widgets are created within the constructor! You have to call
* @ref createWidgets after creating a new edit widget.
*/
- PMDialogEditBase( QWidget* parent, const char* name = 0 );
+ PMDialogEditBase( TQWidget* parent, const char* name = 0 );
/**
* Destructor
*/
@@ -108,7 +108,7 @@ public:
/**
* Returns the help topic
*/
- const QString& helpTopic( ) { return m_helpTopic; }
+ const TQString& helpTopic( ) { return m_helpTopic; }
/**
* Discards changes and redisplays the object
@@ -123,11 +123,11 @@ public:
/**
* Sets the check box to state s
*/
- static void setCheckBox( QCheckBox* box, PMThreeState s );
+ static void setCheckBox( TQCheckBox* box, PMThreeState s );
/**
* Gets the state of the checkbox
*/
- static PMThreeState checkBoxState( QCheckBox* box );
+ static PMThreeState checkBoxState( TQCheckBox* box );
/**
* Sets the part
@@ -215,35 +215,35 @@ public:
/**
* Returns the first wall color
*/
- static QColor previewWallColor1( ) { return s_wallColor1; }
+ static TQColor previewWallColor1( ) { return s_wallColor1; }
/**
* Sets the first wall color
*/
- static void setPreviewWallColor1( const QColor& c ) { s_wallColor1 = c; }
+ static void setPreviewWallColor1( const TQColor& c ) { s_wallColor1 = c; }
/**
* Returns the second wall color
*/
- static QColor previewWallColor2( ) { return s_wallColor2; }
+ static TQColor previewWallColor2( ) { return s_wallColor2; }
/**
* Sets the second wall color
*/
- static void setPreviewWallColor2( const QColor& c ) { s_wallColor2 = c; }
+ static void setPreviewWallColor2( const TQColor& c ) { s_wallColor2 = c; }
/**
* Returns the first floor color
*/
- static QColor previewFloorColor1( ) { return s_floorColor1; }
+ static TQColor previewFloorColor1( ) { return s_floorColor1; }
/**
* Sets the first floor color
*/
- static void setPreviewFloorColor1( const QColor& c ) { s_floorColor1 = c; }
+ static void setPreviewFloorColor1( const TQColor& c ) { s_floorColor1 = c; }
/**
* Returns the second floor color
*/
- static QColor previewFloorColor2( ) { return s_floorColor2; }
+ static TQColor previewFloorColor2( ) { return s_floorColor2; }
/**
* Sets the second floor color
*/
- static void setPreviewFloorColor2( const QColor& c ) { s_floorColor2 = c; }
+ static void setPreviewFloorColor2( const TQColor& c ) { s_floorColor2 = c; }
/**
* Returns the local flag for texture preview
*/
@@ -268,7 +268,7 @@ protected:
* Sets the help topic
* @param anchor Defined anchor in your docbook sources
*/
- void setHelp( const QString& anchor );
+ void setHelp( const TQString& anchor );
/**
* Create widgets here, that should be placed on top of the widgets
@@ -297,7 +297,7 @@ protected:
/**
* Returns a pointer to the top layout
*/
- QBoxLayout* topLayout( ) const { return m_pTopLayout; }
+ TQBoxLayout* topLayout( ) const { return m_pTopLayout; }
protected slots:
void slotTexturePreview( );
@@ -326,16 +326,16 @@ private:
void findTextures( PMObject*& global, PMObject*& local ) const;
PMObject* m_pDisplayedObject;
- QBoxLayout* m_pTopLayout;
- QString m_helpTopic;
+ TQBoxLayout* m_pTopLayout;
+ TQString m_helpTopic;
PMPart* m_pPart;
- QWidget* m_pTexturePreviewWidget;
+ TQWidget* m_pTexturePreviewWidget;
PMPovrayRenderWidget* m_pRenderWidget;
PMPovrayOutputWidget* m_pOutputWidget;
- QVBox* m_pRenderFrame;
- QCheckBox* m_pPreviewLocalBox;
- QPushButton* m_pPreviewButton;
- QPushButton* m_pOutputButton;
+ TQVBox* m_pRenderFrame;
+ TQCheckBox* m_pPreviewLocalBox;
+ TQPushButton* m_pPreviewButton;
+ TQPushButton* m_pOutputButton;
static int s_previewSize;
static bool s_showSphere;
@@ -346,8 +346,8 @@ private:
static double s_previewAAThreshold;
static bool s_showFloor;
static bool s_showWall;
- static QColor s_wallColor1, s_wallColor2;
- static QColor s_floorColor1, s_floorColor2;
+ static TQColor s_wallColor1, s_wallColor2;
+ static TQColor s_floorColor1, s_floorColor2;
static bool s_previewLocal;
static double s_previewGamma;
};
diff --git a/kpovmodeler/pmdialogview.cpp b/kpovmodeler/pmdialogview.cpp
index f88a0272..243427b5 100644
--- a/kpovmodeler/pmdialogview.cpp
+++ b/kpovmodeler/pmdialogview.cpp
@@ -33,14 +33,14 @@
#include <krun.h>
#include <kstdguiitem.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
-#include <qscrollview.h>
-#include <qlabel.h>
-
-PMDialogEditContent::PMDialogEditContent( QWidget* parent, const char* name )
- : QScrollView( parent, name )
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
+#include <tqscrollview.h>
+#include <tqlabel.h>
+
+PMDialogEditContent::PMDialogEditContent( TQWidget* parent, const char* name )
+ : TQScrollView( parent, name )
{
m_pContents = 0;
setVScrollBarMode( AlwaysOff );
@@ -50,7 +50,7 @@ PMDialogEditContent::PMDialogEditContent( QWidget* parent, const char* name )
setResizePolicy( Manual );
}
-void PMDialogEditContent::setContents( QWidget* wid )
+void PMDialogEditContent::setContents( TQWidget* wid )
{
if( m_pContents )
removeChild( m_pContents );
@@ -69,7 +69,7 @@ void PMDialogEditContent::calculateSize( )
int fw = lineWidth( ) * 2;
if( m_pContents )
{
- QSize newSize = m_pContents->minimumSizeHint( );
+ TQSize newSize = m_pContents->minimumSizeHint( );
setVScrollBarMode( AlwaysOff );
setHScrollBarMode( AlwaysOff );
@@ -106,12 +106,12 @@ void PMDialogEditContent::calculateSize( )
}
}
-void PMDialogEditContent::resizeEvent( QResizeEvent* /* ev */ )
+void PMDialogEditContent::resizeEvent( TQResizeEvent* /* ev */ )
{
calculateSize( );
}
-PMDialogView::PMDialogView( PMPart* part, QWidget* parent, const char* name )
+PMDialogView::PMDialogView( PMPart* part, TQWidget* parent, const char* name )
: PMViewBase( parent, name )
{
m_pDisplayedWidget = 0;
@@ -120,12 +120,12 @@ PMDialogView::PMDialogView( PMPart* part, QWidget* parent, const char* name )
m_pHelper->show( );
m_pPart = part;
- m_pLayout = new QVBoxLayout( this, KDialog::marginHint( ),
+ m_pLayout = new TQVBoxLayout( this, KDialog::marginHint( ),
KDialog::spacingHint( ) );
- QHBoxLayout* labelLayout = new QHBoxLayout( m_pLayout );
- m_pPixmapLabel = new QLabel( this );
- m_pObjectTypeLabel = new QLabel( this );
+ TQHBoxLayout* labelLayout = new TQHBoxLayout( m_pLayout );
+ m_pPixmapLabel = new TQLabel( this );
+ m_pObjectTypeLabel = new TQLabel( this );
labelLayout->addWidget( m_pPixmapLabel );
labelLayout->addWidget( m_pObjectTypeLabel );
labelLayout->addStretch( );
@@ -133,34 +133,34 @@ PMDialogView::PMDialogView( PMPart* part, QWidget* parent, const char* name )
m_pLayout->addWidget( m_pHelper, 2 );
m_pLayout->addStretch( );
- QHBoxLayout* buttonLayout = new QHBoxLayout( m_pLayout );
+ TQHBoxLayout* buttonLayout = new TQHBoxLayout( m_pLayout );
m_pHelpButton = new KPushButton( KStdGuiItem::help(), this );
buttonLayout->addWidget( m_pHelpButton );
- connect( m_pHelpButton, SIGNAL( clicked( ) ), this, SLOT( slotHelp( ) ) );
+ connect( m_pHelpButton, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( slotHelp( ) ) );
m_pHelpButton->setEnabled( false );
m_pApplyButton = new KPushButton( KStdGuiItem::apply(), this );
buttonLayout->addWidget( m_pApplyButton );
- connect( m_pApplyButton, SIGNAL( clicked( ) ), this, SLOT( slotApply( ) ) );
+ connect( m_pApplyButton, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( slotApply( ) ) );
m_pApplyButton->setEnabled( false );
buttonLayout->addStretch( );
m_pCancelButton = new KPushButton( KStdGuiItem::cancel(), this );
buttonLayout->addWidget( m_pCancelButton );
- connect( m_pCancelButton, SIGNAL( clicked( ) ), this, SLOT( slotCancel( ) ) );
+ connect( m_pCancelButton, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( slotCancel( ) ) );
m_pCancelButton->setEnabled( false );
m_pLayout->activate( );
- connect( part, SIGNAL( refresh( ) ), SLOT( slotRefresh( ) ) );
- connect( part, SIGNAL( objectChanged( PMObject*, const int, QObject* ) ),
- SLOT( slotObjectChanged( PMObject*, const int, QObject* ) ) );
- connect( part, SIGNAL( clear( ) ), SLOT( slotClear( ) ) );
- connect( part, SIGNAL( aboutToRender( ) ), SLOT( slotAboutToRender( ) ) );
- connect( part, SIGNAL( aboutToSave( ) ), SLOT( slotAboutToRender( ) ) );
- connect( this, SIGNAL( objectChanged( PMObject*, const int, QObject* ) ),
- part, SLOT( slotObjectChanged( PMObject*, const int, QObject* ) ) );
+ connect( part, TQT_SIGNAL( refresh( ) ), TQT_SLOT( slotRefresh( ) ) );
+ connect( part, TQT_SIGNAL( objectChanged( PMObject*, const int, TQObject* ) ),
+ TQT_SLOT( slotObjectChanged( PMObject*, const int, TQObject* ) ) );
+ connect( part, TQT_SIGNAL( clear( ) ), TQT_SLOT( slotClear( ) ) );
+ connect( part, TQT_SIGNAL( aboutToRender( ) ), TQT_SLOT( slotAboutToRender( ) ) );
+ connect( part, TQT_SIGNAL( aboutToSave( ) ), TQT_SLOT( slotAboutToRender( ) ) );
+ connect( this, TQT_SIGNAL( objectChanged( PMObject*, const int, TQObject* ) ),
+ part, TQT_SLOT( slotObjectChanged( PMObject*, const int, TQObject* ) ) );
displayObject( m_pPart->activeObject( ) );
}
@@ -172,7 +172,7 @@ PMDialogView::~PMDialogView( )
emit destroyed( this );
}
-void PMDialogView::slotObjectChanged( PMObject* obj, const int mode, QObject* sender )
+void PMDialogView::slotObjectChanged( PMObject* obj, const int mode, TQObject* sender )
{
if( sender == this )
return;
@@ -275,7 +275,7 @@ void PMDialogView::slotHelp( )
{
if( m_pDisplayedWidget && m_pDisplayedWidget->displayedObject( ) )
{
- QString url = PMDocumentationMap::theMap( )->documentation(
+ TQString url = PMDocumentationMap::theMap( )->documentation(
m_pDisplayedWidget->displayedObject( )->className( ) );
if( !url.isEmpty( ) )
{
@@ -371,15 +371,15 @@ void PMDialogView::displayObject( PMObject* obj, bool updateDescription )
if( m_pDisplayedWidget )
{
- connect( m_pDisplayedWidget, SIGNAL( dataChanged( ) ),
- this, SLOT( slotDataChanged( ) ) );
- connect( m_pDisplayedWidget, SIGNAL( sizeChanged( ) ),
- this, SLOT( slotSizeChanged( ) ) );
- connect( m_pDisplayedWidget, SIGNAL( aboutToRender( ) ),
- this, SLOT( slotAboutToRender( ) ) );
+ connect( m_pDisplayedWidget, TQT_SIGNAL( dataChanged( ) ),
+ this, TQT_SLOT( slotDataChanged( ) ) );
+ connect( m_pDisplayedWidget, TQT_SIGNAL( sizeChanged( ) ),
+ this, TQT_SLOT( slotSizeChanged( ) ) );
+ connect( m_pDisplayedWidget, TQT_SIGNAL( aboutToRender( ) ),
+ this, TQT_SLOT( slotAboutToRender( ) ) );
connect( m_pDisplayedWidget,
- SIGNAL( controlPointSelectionChanged( ) ),
- SLOT( slotControlPointSelectionChanged( ) ) );
+ TQT_SIGNAL( controlPointSelectionChanged( ) ),
+ TQT_SLOT( slotControlPointSelectionChanged( ) ) );
}
}
@@ -415,7 +415,7 @@ void PMDialogView::displayObject( PMObject* obj, bool updateDescription )
m_unsavedData = false;
}
-void PMDialogView::keyPressEvent( QKeyEvent* ev )
+void PMDialogView::keyPressEvent( TQKeyEvent* ev )
{
if( ( ev->key( ) == Key_Return ) || ( ev->key( ) == Key_Enter ) )
slotApply( );
@@ -428,12 +428,12 @@ void PMDialogView::slotAboutToRender( )
slotApply( );
}
-QString PMDialogView::description( ) const
+TQString PMDialogView::description( ) const
{
return i18n( "Object Properties" );
}
-QString PMDialogViewFactory::description( ) const
+TQString PMDialogViewFactory::description( ) const
{
return i18n( "Object Properties" );
}
diff --git a/kpovmodeler/pmdialogview.h b/kpovmodeler/pmdialogview.h
index aef224eb..680cbbc9 100644
--- a/kpovmodeler/pmdialogview.h
+++ b/kpovmodeler/pmdialogview.h
@@ -23,8 +23,8 @@
#include <config.h>
#endif
-#include <qwidget.h>
-#include <qscrollview.h>
+#include <tqwidget.h>
+#include <tqscrollview.h>
#include <kpushbutton.h>
#include "pmviewbase.h"
@@ -33,9 +33,9 @@
class PMDialogEditBase;
class PMObject;
class PMPart;
-class QGroupBox;
-class QBoxLayout;
-class QLabel;
+class TQGroupBox;
+class TQBoxLayout;
+class TQLabel;
/**
* Helper class for @ref PMDialogView
@@ -44,13 +44,13 @@ class PMDialogEditContent : public QScrollView
{
Q_OBJECT
public:
- PMDialogEditContent( QWidget* parent, const char* name = 0 );
- void setContents( QWidget* wid );
+ PMDialogEditContent( TQWidget* parent, const char* name = 0 );
+ void setContents( TQWidget* wid );
void calculateSize( );
protected:
- void resizeEvent( QResizeEvent* );
+ void resizeEvent( TQResizeEvent* );
private:
- QWidget* m_pContents;
+ TQWidget* m_pContents;
};
/**
@@ -67,23 +67,23 @@ public:
/**
* Creates a new PMDialogView widget
*/
- PMDialogView( PMPart* part, QWidget* parent, const char* name = 0 );
+ PMDialogView( PMPart* part, TQWidget* parent, const char* name = 0 );
/**
* Deletes the widget
*/
~PMDialogView( );
/** */
- virtual QString viewType( ) const { return QString( "dialogview" ); }
+ virtual TQString viewType( ) const { return TQString( "dialogview" ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
public slots:
/**
* Called when an object is changed.
* Mode is a bit combination of @ref PMChange constants
*/
- void slotObjectChanged( PMObject* obj, const int mode, QObject* sender );
+ void slotObjectChanged( PMObject* obj, const int mode, TQObject* sender );
/**
* Called before the scene is rendered
*/
@@ -101,14 +101,14 @@ signals:
* Signal that is emitted when an object is changed.
* Mode is a bit combination of @ref PMChange constants.
*/
- void objectChanged( PMObject* obj, const int mode, QObject* sender );
+ void objectChanged( PMObject* obj, const int mode, TQObject* sender );
/**
* Emitted in the destructor
*/
void destroyed( PMDialogView* v );
protected:
- virtual void keyPressEvent( QKeyEvent* );
+ virtual void keyPressEvent( TQKeyEvent* );
private slots:
void slotApply( );
@@ -129,14 +129,14 @@ private:
void displayObject( PMObject* obj, bool updateDescription = true );
PMDialogEditBase* m_pDisplayedWidget;
- QBoxLayout* m_pLayout;
+ TQBoxLayout* m_pLayout;
KPushButton* m_pApplyButton;
KPushButton* m_pCancelButton;
KPushButton* m_pHelpButton;
- QLabel* m_pPixmapLabel;
- QLabel* m_pObjectTypeLabel;
+ TQLabel* m_pPixmapLabel;
+ TQLabel* m_pObjectTypeLabel;
PMDialogEditContent* m_pHelper;
@@ -151,10 +151,10 @@ class PMDialogViewFactory : public PMViewTypeFactory
{
public:
PMDialogViewFactory( ) { }
- virtual QString viewType( ) const { return QString( "dialogview" ); }
- virtual QString description( ) const;
- virtual QString iconName( ) const { return QString( "pmdialogview" ); }
- virtual PMViewBase* newInstance( QWidget* parent, PMPart* part ) const
+ 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
{
return new PMDialogView( part, parent );
}
diff --git a/kpovmodeler/pmdisc.cpp b/kpovmodeler/pmdisc.cpp
index d276e541..bda89579 100644
--- a/kpovmodeler/pmdisc.cpp
+++ b/kpovmodeler/pmdisc.cpp
@@ -73,12 +73,12 @@ PMDisc::~PMDisc( )
{
}
-QString PMDisc::description( ) const
+TQString PMDisc::description( ) const
{
return i18n( "disc" );
}
-void PMDisc::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMDisc::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "center", m_center.serializeXML( ) );
e.setAttribute( "normal", m_normal.serializeXML( ) );
@@ -176,7 +176,7 @@ void PMDisc::setHoleRadius( double hradius )
}
}
-PMDialogEditBase* PMDisc::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMDisc::editWidget( TQWidget* parent ) const
{
return new PMDiscEdit( parent );
}
diff --git a/kpovmodeler/pmdisc.h b/kpovmodeler/pmdisc.h
index 35cb0081..62201bcf 100644
--- a/kpovmodeler/pmdisc.h
+++ b/kpovmodeler/pmdisc.h
@@ -56,22 +56,22 @@ public:
virtual PMObject* copy( ) const { return new PMDisc( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMDiscEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmdisc" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmdisc" ); }
/**
* Return the center
diff --git a/kpovmodeler/pmdiscedit.cpp b/kpovmodeler/pmdiscedit.cpp
index 109c3d66..0197a806 100644
--- a/kpovmodeler/pmdiscedit.cpp
+++ b/kpovmodeler/pmdiscedit.cpp
@@ -21,13 +21,13 @@
#include "pmvectoredit.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <kmessagebox.h>
-PMDiscEdit::PMDiscEdit( QWidget* parent, const char* name )
+PMDiscEdit::PMDiscEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -37,8 +37,8 @@ void PMDiscEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* layout;
- QGridLayout* gl;
+ TQHBoxLayout* layout;
+ TQGridLayout* gl;
m_pCenter = new PMVectorEdit( "x", "y", "z", this );
m_pNormal = new PMVectorEdit( "x", "y", "z", this );
@@ -47,30 +47,30 @@ void PMDiscEdit::createTopWidgets( )
m_pRadius = new PMFloatEdit( this );
m_pRadius->setValidation( true, 0.0, false, 0.0 );
- gl = new QGridLayout( topLayout( ), 2, 2 );
- gl->addWidget( new QLabel( i18n( "Center:" ), this ), 0, 0 );
+ gl = new TQGridLayout( topLayout( ), 2, 2 );
+ gl->addWidget( new TQLabel( i18n( "Center:" ), this ), 0, 0 );
gl->addWidget( m_pCenter, 0, 1 );
- gl->addWidget( new QLabel( i18n( "Normal:" ), this ), 1, 0 );
+ gl->addWidget( new TQLabel( i18n( "Normal:" ), this ), 1, 0 );
gl->addWidget( m_pNormal, 1, 1 );
- layout = new QHBoxLayout( topLayout( ) );
- gl = new QGridLayout( layout, 2, 2 );
- gl->addWidget( new QLabel( i18n( "Radius:" ), this ), 0, 0 );
+ layout = new TQHBoxLayout( topLayout( ) );
+ gl = new TQGridLayout( layout, 2, 2 );
+ gl->addWidget( new TQLabel( i18n( "Radius:" ), this ), 0, 0 );
gl->addWidget( m_pRadius, 0, 1 );
- gl->addWidget( new QLabel( i18n( "Hole radius:" ), this ), 1, 0 );
+ gl->addWidget( new TQLabel( i18n( "Hole radius:" ), this ), 1, 0 );
gl->addWidget( m_pHRadius, 1, 1 );
layout->addStretch( 1 );
- QPushButton* nb = new QPushButton( i18n( "Normalize" ), this );
- layout = new QHBoxLayout( topLayout( ) );
+ TQPushButton* nb = new TQPushButton( i18n( "Normalize" ), this );
+ layout = new TQHBoxLayout( topLayout( ) );
layout->addWidget( nb );
layout->addStretch( 1 );
- connect( m_pCenter, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pNormal, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pHRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( nb, SIGNAL( clicked( ) ), SLOT( slotNormalize( ) ) );
+ connect( m_pCenter, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pNormal, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pHRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( nb, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotNormalize( ) ) );
}
void PMDiscEdit::slotNormalize( )
diff --git a/kpovmodeler/pmdiscedit.h b/kpovmodeler/pmdiscedit.h
index bc603ddc..5ce4d111 100644
--- a/kpovmodeler/pmdiscedit.h
+++ b/kpovmodeler/pmdiscedit.h
@@ -38,7 +38,7 @@ public:
/**
* Creates a PMPlaneEdit with parent and name
*/
- PMDiscEdit( QWidget* parent, const char* name = 0 );
+ PMDiscEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmdistancecontrolpoint.cpp b/kpovmodeler/pmdistancecontrolpoint.cpp
index dbd8b881..8f49bb18 100644
--- a/kpovmodeler/pmdistancecontrolpoint.cpp
+++ b/kpovmodeler/pmdistancecontrolpoint.cpp
@@ -23,7 +23,7 @@
PMDistanceControlPoint::PMDistanceControlPoint( PMControlPoint* base,
const PMVector& direction, double distance,
- int id, const QString& description,
+ int id, const TQString& description,
bool showExtraLine )
: PMControlPoint( id, description )
{
@@ -36,7 +36,7 @@ PMDistanceControlPoint::PMDistanceControlPoint( PMControlPoint* base,
PMDistanceControlPoint::PMDistanceControlPoint( const PMVector& base,
const PMVector& direction, double distance,
- int id, const QString& description,
+ int id, const TQString& description,
bool showExtraLine )
: PMControlPoint( id, description )
{
diff --git a/kpovmodeler/pmdistancecontrolpoint.h b/kpovmodeler/pmdistancecontrolpoint.h
index f5e28fff..afc39fbd 100644
--- a/kpovmodeler/pmdistancecontrolpoint.h
+++ b/kpovmodeler/pmdistancecontrolpoint.h
@@ -38,7 +38,7 @@ public:
* The base point of the vector is given by the control point location.
*/
PMDistanceControlPoint( PMControlPoint* location, const PMVector& direction,
- double distance, int id, const QString& description,
+ double distance, int id, const TQString& description,
bool extraLine = false );
/**
* Creates a PMDistanceControlPoint with id.
@@ -46,7 +46,7 @@ public:
* The base point of the vector is given by the vector p.
*/
PMDistanceControlPoint( const PMVector& location, const PMVector& direction,
- double distance, int id, const QString& description,
+ double distance, int id, const TQString& description,
bool extraLine = false );
/**
diff --git a/kpovmodeler/pmdockwidget.cpp b/kpovmodeler/pmdockwidget.cpp
index 625ea6bc..499d1cef 100644
--- a/kpovmodeler/pmdockwidget.cpp
+++ b/kpovmodeler/pmdockwidget.cpp
@@ -19,15 +19,15 @@
#include "pmdockwidget.h"
#include "pmdockwidget_private.h"
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qobjectlist.h>
-#include <qstrlist.h>
-#include <qcursor.h>
-#include <qwidgetlist.h>
-#include <qtabwidget.h>
-#include <qstyle.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqobjectlist.h>
+#include <tqstrlist.h>
+#include <tqcursor.h>
+#include <tqwidgetlist.h>
+#include <tqtabwidget.h>
+#include <tqstyle.h>
#ifndef NO_KDE2
#include <kconfig.h>
@@ -41,9 +41,9 @@
#include <X11/Xlib.h>
#endif
#else
-#include <qapplication.h>
-#include <qtoolbar.h>
-#include <qpopupmenu.h>
+#include <tqapplication.h>
+#include <tqtoolbar.h>
+#include <tqpopupmenu.h>
#endif
#include "pmdebug.h"
@@ -56,7 +56,7 @@
#include <kinstance.h>
#include <khelpmenu.h>
#include <kstandarddirs.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <kxmlguifactory.h>
@@ -119,7 +119,7 @@ public:
{
}
- QGuardedPtr<Part> m_activePart;
+ TQGuardedPtr<Part> m_activePart;
bool m_bShellGUIActivated;
KHelpMenu *m_helpMenu;
};
@@ -134,10 +134,10 @@ public:
*
* @author Max Judin.
*/
-PMDockMainWindow::PMDockMainWindow( QWidget* parent, const char *name, WFlags f)
+PMDockMainWindow::PMDockMainWindow( TQWidget* parent, const char *name, WFlags f)
:KMainWindow( parent, name, f )
{
- QString new_name = QString(name) + QString("_DockManager");
+ TQString new_name = TQString(name) + TQString("_DockManager");
dockManager = new PMDockManager( this, new_name.latin1() );
mainDockWidget = 0L;
@@ -154,27 +154,27 @@ PMDockMainWindow::~PMDockMainWindow()
// kparts/dockmainwindow stuff
void PMDockMainWindow::createGUI( Part * part )
{
- kdDebug(1000) << QString("DockMainWindow::createGUI for %1").arg(part?part->name():"0L") << endl;
+ kdDebug(1000) << TQString("DockMainWindow::createGUI for %1").arg(part?part->name():"0L") << endl;
KXMLGUIFactory *factory = guiFactory();
setUpdatesEnabled( false );
- QPtrList<Plugin> plugins;
+ TQPtrList<Plugin> plugins;
if ( d->m_activePart )
{
- kdDebug(1000) << QString("deactivating GUI for %1").arg(d->m_activePart->name()) << endl;
+ kdDebug(1000) << TQString("deactivating GUI for %1").arg(d->m_activePart->name()) << endl;
GUIActivateEvent ev( false );
- QApplication::sendEvent( d->m_activePart, &ev );
+ TQApplication::sendEvent( d->m_activePart, &ev );
factory->removeClient( d->m_activePart );
- disconnect( d->m_activePart, SIGNAL( setWindowCaption( const QString & ) ),
- this, SLOT( setCaption( const QString & ) ) );
- disconnect( d->m_activePart, SIGNAL( setStatusBarText( const QString & ) ),
- this, SLOT( slotSetStatusBarText( const QString & ) ) );
+ disconnect( d->m_activePart, TQT_SIGNAL( setWindowCaption( const TQString & ) ),
+ this, TQT_SLOT( setCaption( const TQString & ) ) );
+ disconnect( d->m_activePart, TQT_SIGNAL( setStatusBarText( const TQString & ) ),
+ this, TQT_SLOT( slotSetStatusBarText( const TQString & ) ) );
}
if( !d->m_bShellGUIActivated )
@@ -187,15 +187,15 @@ void PMDockMainWindow::createGUI( Part * part )
if ( part )
{
// do this before sending the activate event
- connect( part, SIGNAL( setWindowCaption( const QString & ) ),
- this, SLOT( setCaption( const QString & ) ) );
- connect( part, SIGNAL( setStatusBarText( const QString & ) ),
- this, SLOT( slotSetStatusBarText( const QString & ) ) );
+ connect( part, TQT_SIGNAL( setWindowCaption( const TQString & ) ),
+ this, TQT_SLOT( setCaption( const TQString & ) ) );
+ connect( part, TQT_SIGNAL( setStatusBarText( const TQString & ) ),
+ this, TQT_SLOT( slotSetStatusBarText( const TQString & ) ) );
factory->addClient( part );
GUIActivateEvent ev( true );
- QApplication::sendEvent( part, &ev );
+ TQApplication::sendEvent( part, &ev );
}
@@ -204,7 +204,7 @@ void PMDockMainWindow::createGUI( Part * part )
d->m_activePart = part;
}
-void PMDockMainWindow::slotSetStatusBarText( const QString & text )
+void PMDockMainWindow::slotSetStatusBarText( const TQString & text )
{
statusBar()->message( text );
}
@@ -220,18 +220,18 @@ void PMDockMainWindow::createShellGUI( bool create )
if ( isHelpMenuEnabled() && !d->m_helpMenu )
d->m_helpMenu = new KHelpMenu( this, instance()->aboutData(), true, actionCollection() );
- QString f = xmlFile();
+ TQString f = xmlFile();
setXMLFile( locate( "config", "ui/ui_standards.rc", instance() ) );
if ( !f.isEmpty() )
setXMLFile( f, true );
else
{
- QString auto_file( instance()->instanceName() + "ui.rc" );
+ TQString auto_file( instance()->instanceName() + "ui.rc" );
setXMLFile( auto_file, true );
}
GUIActivateEvent ev( true );
- QApplication::sendEvent( this, &ev );
+ TQApplication::sendEvent( this, &ev );
guiFactory()->addClient( this );
@@ -239,7 +239,7 @@ void PMDockMainWindow::createShellGUI( bool create )
else
{
GUIActivateEvent ev( false );
- QApplication::sendEvent( this, &ev );
+ TQApplication::sendEvent( this, &ev );
guiFactory()->removeClient( this );
}
@@ -253,7 +253,7 @@ void PMDockMainWindow::setMainDockWidget( PMDockWidget* mdw )
mainDockWidget = mdw;
}
-void PMDockMainWindow::setView( QWidget *view )
+void PMDockMainWindow::setView( TQWidget *view )
{
if ( view->isA("PMDockWidget") ){
if ( view->parent() != this ) ((PMDockWidget*)view)->applyToWidget( this );
@@ -262,11 +262,11 @@ void PMDockMainWindow::setView( QWidget *view )
#ifndef NO_KDE2
KMainWindow::setCentralWidget(view);
#else
- QMainWindow::setCentralWidget(view);
+ TQMainWindow::setCentralWidget(view);
#endif
}
-PMDockWidget* PMDockMainWindow::createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel)
+PMDockWidget* PMDockMainWindow::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel)
{
return new PMDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel );
}
@@ -283,28 +283,28 @@ void PMDockMainWindow::makeDockInvisible( PMDockWidget* dock )
dock->undock();
}
-void PMDockMainWindow::makeWidgetDockVisible( QWidget* widget )
+void PMDockMainWindow::makeWidgetDockVisible( TQWidget* widget )
{
makeDockVisible( dockManager->findWidgetParentDock(widget) );
}
-void PMDockMainWindow::writeDockConfig(QDomElement &base)
+void PMDockMainWindow::writeDockConfig(TQDomElement &base)
{
dockManager->writeConfig(base);
}
-void PMDockMainWindow::readDockConfig(QDomElement &base)
+void PMDockMainWindow::readDockConfig(TQDomElement &base)
{
dockManager->readConfig(base);
}
#ifndef NO_KDE2
-void PMDockMainWindow::writeDockConfig( KConfig* c, QString group )
+void PMDockMainWindow::writeDockConfig( KConfig* c, TQString group )
{
dockManager->writeConfig( c, group );
}
-void PMDockMainWindow::readDockConfig( KConfig* c, QString group )
+void PMDockMainWindow::readDockConfig( KConfig* c, TQString group )
{
dockManager->readConfig( c, group );
}
@@ -312,7 +312,7 @@ void PMDockMainWindow::readDockConfig( KConfig* c, QString group )
void PMDockMainWindow::slotDockWidgetUndocked()
{
- QObject* pSender = (QObject*) sender();
+ TQObject* pSender = (TQObject*) sender();
if (!pSender->inherits("PMDockWidget")) return;
PMDockWidget* pDW = (PMDockWidget*) pSender;
emit dockWidgetHasUndocked( pDW);
@@ -320,7 +320,7 @@ void PMDockMainWindow::slotDockWidgetUndocked()
/*************************************************************************/
PMDockWidgetAbstractHeaderDrag::PMDockWidgetAbstractHeaderDrag( PMDockWidgetAbstractHeader* parent, PMDockWidget* dock, const char* name )
-:QFrame( parent, name )
+:TQFrame( parent, name )
{
dw = dock;
installEventFilter( dock->dockManager() );
@@ -331,27 +331,27 @@ PMDockWidgetHeaderDrag::PMDockWidgetHeaderDrag( PMDockWidgetAbstractHeader* pare
{
}
-void PMDockWidgetHeaderDrag::paintEvent( QPaintEvent* )
+void PMDockWidgetHeaderDrag::paintEvent( TQPaintEvent* )
{
- QPainter paint;
+ TQPainter paint;
paint.begin( this );
- style().drawPrimitive (QStyle::PE_DockWindowHandle, &paint, QRect(0,0,width(), height()), colorGroup());
+ style().drawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), colorGroup());
paint.end();
}
/*************************************************************************/
PMDockWidgetAbstractHeader::PMDockWidgetAbstractHeader( PMDockWidget* parent, const char* name )
-:QFrame( parent, name )
+:TQFrame( parent, name )
{
}
/*************************************************************************/
PMDockWidgetHeader::PMDockWidgetHeader( PMDockWidget* parent, const char* name )
:PMDockWidgetAbstractHeader( parent, name )
{
- layout = new QHBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQHBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
drag = new PMDockWidgetHeaderDrag( this, parent );
@@ -359,24 +359,24 @@ PMDockWidgetHeader::PMDockWidgetHeader( PMDockWidget* parent, const char* name )
closeButton->setPixmap( const_cast< const char** >(close_xpm) );
int buttonWidth = 9, buttonHeight = 9;
closeButton->setFixedSize(buttonWidth,buttonHeight);
- connect( closeButton, SIGNAL(clicked()), parent, SIGNAL(headerCloseButtonClicked()));
+ connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerCloseButtonClicked()));
// MODIFICATION (zehender)
// The shell will delete the widget
// undock is unnecessary
- // connect( closeButton, SIGNAL(clicked()), parent, SLOT(undock()));
+ // connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(undock()));
stayButton = new PMDockButton_Private( this, "DockStayButton" );
stayButton->setToggleButton( true );
stayButton->setPixmap( const_cast< const char** >(not_close_xpm) );
stayButton->setFixedSize(buttonWidth,buttonHeight);
- connect( stayButton, SIGNAL(clicked()), this, SLOT(slotStayClicked()));
+ connect( stayButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStayClicked()));
stayButton->hide( );
dockbackButton = new PMDockButton_Private( this, "DockbackButton" );
dockbackButton->setPixmap( const_cast< const char** >(dockback_xpm));
dockbackButton->setFixedSize(buttonWidth,buttonHeight);
- connect( dockbackButton, SIGNAL(clicked()), parent, SIGNAL(headerDockbackButtonClicked()));
- connect( dockbackButton, SIGNAL(clicked()), parent, SLOT(dockBack()));
+ connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerDockbackButtonClicked()));
+ connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(dockBack()));
// MODIFICATION (zehender)
// Add a button to undock the widget and dock it as top level
@@ -384,7 +384,7 @@ 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, SIGNAL(clicked()), parent, SLOT(toDesktop()));
+ connect( toDesktopButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(toDesktop()));
layout->addWidget( drag );
layout->addWidget( dockbackButton );
@@ -424,8 +424,8 @@ void PMDockWidgetHeader::setDragPanel( PMDockWidgetHeaderDrag* nd )
if ( !nd ) return;
delete layout;
- layout = new QHBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQHBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
delete drag;
drag = nd;
@@ -459,30 +459,30 @@ void PMDockWidgetHeader::setDragEnabled(bool b)
#ifndef NO_KDE2
void PMDockWidgetHeader::saveConfig( KConfig* c )
{
- c->writeEntry( QString("%1%2").arg(parent()->name()).arg(":stayButton"), stayButton->isOn() );
+ c->writeEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), stayButton->isOn() );
}
void PMDockWidgetHeader::loadConfig( KConfig* c )
{
- setDragEnabled( !c->readBoolEntry( QString("%1%2").arg(parent()->name()).arg(":stayButton"), false ) );
+ setDragEnabled( !c->readBoolEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), false ) );
}
#endif
/*************************************************************************/
-PMDockWidget::PMDockWidget( PMDockManager* dockManager, const char* name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel, WFlags f)
-: QWidget( parent, name, f )
+PMDockWidget::PMDockWidget( PMDockManager* dockManager, const char* name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel, WFlags f)
+: TQWidget( parent, name, f )
,formerBrotherDockWidget(0L)
,currentDockPos(DockNone)
,formerDockPos(DockNone)
- ,pix(new QPixmap(pixmap))
+ ,pix(new TQPixmap(pixmap))
,prevSideDockPosBeforeDrag(DockNone)
{
d = new PMDockWidgetPrivate(); // create private data
d->_parent = parent;
- layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
manager = dockManager;
manager->childDock->append( this );
@@ -509,11 +509,11 @@ PMDockWidget::PMDockWidget( PMDockManager* dockManager, const char* name, const
setIcon( pixmap);
widget = 0L;
- QObject::connect(this, SIGNAL(hasUndocked()), manager->main, SLOT(slotDockWidgetUndocked()) );
- applyToWidget( parent, QPoint(0,0) );
+ TQObject::connect(this, TQT_SIGNAL(hasUndocked()), manager->main, TQT_SLOT(slotDockWidgetUndocked()) );
+ applyToWidget( parent, TQPoint(0,0) );
}
-void PMDockWidget::slotSetCaption( const QString& str )
+void PMDockWidget::slotSetCaption( const TQString& str )
{
setTabPageLabel( str );
setCaption( str );
@@ -540,8 +540,8 @@ void PMDockWidget::setHeader( PMDockWidgetAbstractHeader* h )
delete header;
delete layout;
header = h;
- layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
layout->addWidget( header );
setWidget( widget );
} else {
@@ -571,12 +571,12 @@ void PMDockWidget::updateHeader()
}
}
-void PMDockWidget::applyToWidget( QWidget* s, const QPoint& p )
+void PMDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
{
if ( parent() != s )
{
hide();
- reparent(s, 0, QPoint(0,0), false);
+ reparent(s, 0, TQPoint(0,0), false);
}
if ( s && s->inherits("PMDockMainWindow") ){
@@ -584,7 +584,7 @@ void PMDockWidget::applyToWidget( QWidget* s, const QPoint& p )
}
if ( s == manager->main ){
- setGeometry( QRect(QPoint(0,0), manager->main->geometry().size()) );
+ setGeometry( TQRect(TQPoint(0,0), manager->main->geometry().size()) );
}
if ( !s )
@@ -615,10 +615,10 @@ void PMDockWidget::show()
if ( parent() ){
makeDockVisible();
} else {
- QWidget::show();
+ TQWidget::show();
}
} else {
- QWidget::show();
+ TQWidget::show();
}
}
@@ -627,42 +627,42 @@ void PMDockWidget::show()
void PMDockWidget::setDockWindowType (NET::WindowType windowType)
{
d->windowType = windowType;
- applyToWidget( parentWidget(), QPoint(0,0) );
+ applyToWidget( parentWidget(), TQPoint(0,0) );
}
#endif
-void PMDockWidget::setDockWindowTransient (QWidget *parent, bool transientEnabled)
+void PMDockWidget::setDockWindowTransient (TQWidget *parent, bool transientEnabled)
{
d->_parent = parent;
d->transient = transientEnabled;
- applyToWidget( parentWidget(), QPoint(0,0) );
+ applyToWidget( parentWidget(), TQPoint(0,0) );
}
-bool PMDockWidget::event( QEvent* pevent )
+bool PMDockWidget::event( TQEvent* pevent )
{
switch ( pevent->type() )
{
#undef FocusIn
- case QEvent::FocusIn:
+ case TQEvent::FocusIn:
if (widget && !d->pendingFocusInEvent) {
d->pendingFocusInEvent = true;
widget->setFocus();
}
d->pendingFocusInEvent = false;
break;
- case QEvent::ChildRemoved:
- if ( widget == ((QChildEvent*)pevent)->child() ) widget = 0L;
+ case TQEvent::ChildRemoved:
+ if ( widget == ((TQChildEvent*)pevent)->child() ) widget = 0L;
break;
- case QEvent::Show:
+ case TQEvent::Show:
if ( widget ) widget->show();
emit manager->change();
break;
- case QEvent::Hide:
+ case TQEvent::Hide:
if ( widget ) widget->hide();
emit manager->change();
break;
- case QEvent::CaptionChange:
+ case TQEvent::CaptionChange:
if ( parentWidget() ){
if ( parent()->inherits("PMDockSplitter") ){
((PMDockSplitter*)(parent()))->updateName();
@@ -673,7 +673,7 @@ bool PMDockWidget::event( QEvent* pevent )
}
}
break;
- case QEvent::Close:
+ case TQEvent::Close:
// MODIFICATION (zehender)
// Top level widget is closed
// emit same signal as if the widget is docked and closed with
@@ -685,8 +685,8 @@ bool PMDockWidget::event( QEvent* pevent )
break;
}
#undef KeyPress
- bool processed = QWidget::event( pevent );
- if( pevent->type( ) == QEvent::AccelOverride && !processed && !parent( ) ){
+ bool processed = TQWidget::event( pevent );
+ if( pevent->type( ) == TQEvent::AccelOverride && !processed && !parent( ) ){
// MODIFICATION (zehender)
// floating widget, post event to main window
processed = qApp->sendEvent( manager->dockMainWidget( ), pevent );
@@ -694,7 +694,7 @@ bool PMDockWidget::event( QEvent* pevent )
return processed;
}
-PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockPos, int spliPos, QPoint pos, bool check, int tabIndex )
+PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockPos, int spliPos, TQPoint pos, bool check, int tabIndex )
{
if (this == target)
return 0L; // docking to itself not possible
@@ -724,7 +724,7 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP
if( target && ( dockPos != PMDockWidget::DockCenter )
&& ( dockPos != PMDockWidget::DockNone ) )
{
- QWidget* pdt = target->parentDockTabGroup( );
+ TQWidget* pdt = target->parentDockTabGroup( );
if( pdt )
return manualDock( ( PMDockWidget* ) ( pdt->parent( ) ),
dockPos, spliPos, pos, check, tabIndex );
@@ -763,7 +763,7 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP
if ( parentTab ){
// add to existing TabGroup
applyToWidget( parentTab );
- parentTab->insertTab( this, icon() ? *icon() : QPixmap(),
+ parentTab->insertTab( this, icon() ? *icon() : TQPixmap(),
tabPageLabel(), tabIndex );
setDockTabName( parentTab );
if( !toolTipStr.isEmpty())
@@ -785,14 +785,14 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP
{
PMDockWidget* newTarget = target;
bool found = false;
- QWidget* wtarget = target;
+ TQWidget* wtarget = target;
while( wtarget && !found )
{
if( wtarget->inherits( "PMDockWidget" ) )
{
PMDockWidget* dw = ( PMDockWidget* ) wtarget;
newTarget = dw;
- QWidget* pw = wtarget->parentWidget( );
+ TQWidget* pw = wtarget->parentWidget( );
if( pw )
{
if( pw->inherits( "PMDockSplitter" ) )
@@ -813,8 +813,8 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP
// END MODIFICATION
// create a new dockwidget that will contain the target and this
- QWidget* parentDock = target->parentWidget();
- PMDockWidget* newDock = new PMDockWidget( manager, "tempName", QPixmap(""), parentDock );
+ TQWidget* parentDock = target->parentWidget();
+ PMDockWidget* newDock = new PMDockWidget( manager, "tempName", TQPixmap(""), parentDock );
newDock->currentDockPos = target->currentDockPos;
if ( dockPos == PMDockWidget::DockCenter ){
@@ -837,8 +837,8 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP
if( target->formerBrotherDockWidget != 0L) {
newDock->formerBrotherDockWidget = target->formerBrotherDockWidget;
if( formerBrotherDockWidget != 0L)
- QObject::connect( newDock->formerBrotherDockWidget, SIGNAL(iMBeingClosed()),
- newDock, SLOT(loseFormerBrotherDockWidget()) );
+ TQObject::connect( newDock->formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()),
+ newDock, TQT_SLOT(loseFormerBrotherDockWidget()) );
target->loseFormerBrotherDockWidget();
}
newDock->formerDockPos = target->formerDockPos;
@@ -846,19 +846,19 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP
if ( dockPos == PMDockWidget::DockCenter )
{
PMDockTabGroup* tab = new PMDockTabGroup( newDock, "_dock_tab");
- QObject::connect(tab, SIGNAL(currentChanged(QWidget*)), d, SLOT(slotFocusEmbeddedWidget(QWidget*)));
+ TQObject::connect(tab, TQT_SIGNAL(currentChanged(TQWidget*)), d, TQT_SLOT(slotFocusEmbeddedWidget(TQWidget*)));
newDock->setWidget( tab );
target->applyToWidget( tab );
applyToWidget( tab );
- tab->insertTab( target, target->icon() ? *(target->icon()) : QPixmap(),
+ tab->insertTab( target, target->icon() ? *(target->icon()) : TQPixmap(),
target->tabPageLabel() );
if( !target->toolTipString().isEmpty())
tab->setTabToolTip( target, target->toolTipString());
- tab->insertTab( this, icon() ? *icon() : QPixmap(),
+ tab->insertTab( this, icon() ? *icon() : TQPixmap(),
tabPageLabel(), tabIndex );
if( !toolTipString().isEmpty())
tab->setTabToolTip( this, toolTipString());
@@ -931,14 +931,14 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP
PMDockTabGroup* PMDockWidget::parentDockTabGroup() const
{
if ( !parent() ) return 0L;
- QWidget* candidate = parentWidget()->parentWidget();
+ TQWidget* candidate = parentWidget()->parentWidget();
if ( candidate && candidate->inherits("PMDockTabGroup") ) return (PMDockTabGroup*)candidate;
return 0L;
}
void PMDockWidget::toDesktop()
{
- QPoint p = mapToGlobal( QPoint( -30, -30 ) );
+ TQPoint p = mapToGlobal( TQPoint( -30, -30 ) );
if( p.x( ) < 0 )
p.setX( 0 );
if( p.y( ) < 0 )
@@ -948,7 +948,7 @@ void PMDockWidget::toDesktop()
void PMDockWidget::undock()
{
- QWidget* parentW = parentWidget();
+ TQWidget* parentW = parentWidget();
if ( !parentW ){
hide();
if (!d->blockHasUndockedSignal)
@@ -969,8 +969,8 @@ void PMDockWidget::undock()
d->index = parentTab->indexOf( this); // memorize the page position in the tab widget
parentTab->removePage( this );
formerBrotherDockWidget = (PMDockWidget*)parentTab->page(0);
- QObject::connect( formerBrotherDockWidget, SIGNAL(iMBeingClosed()),
- this, SLOT(loseFormerBrotherDockWidget()) );
+ TQObject::connect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()),
+ this, TQT_SLOT(loseFormerBrotherDockWidget()) );
applyToWidget( 0L );
if ( parentTab->count() == 1 ){
@@ -984,7 +984,7 @@ void PMDockWidget::undock()
PMDockWidget* parentOfTab = (PMDockWidget*)parentTab->parent();
delete parentTab; // PMDockTabGroup
- QWidget* parentOfDockWidget = parentOfTab->parentWidget();
+ TQWidget* parentOfDockWidget = parentOfTab->parentWidget();
if ( parentOfDockWidget == 0L ){
if ( isV ) lastTab->show();
} else {
@@ -1034,14 +1034,14 @@ void PMDockWidget::undock()
group->hide();
if( formerBrotherDockWidget != 0L)
- QObject::connect( formerBrotherDockWidget, SIGNAL(iMBeingClosed()),
- this, SLOT(loseFormerBrotherDockWidget()) );
+ TQObject::connect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()),
+ this, TQT_SLOT(loseFormerBrotherDockWidget()) );
if ( !group->parentWidget() ){
secondWidget->applyToWidget( 0L, group->frameGeometry().topLeft() );
secondWidget->resize( group->width(), group->height() );
} else {
- QWidget* obj = group->parentWidget();
+ TQWidget* obj = group->parentWidget();
secondWidget->applyToWidget( obj );
if ( obj->inherits("PMDockSplitter") ){
PMDockSplitter* parentOfGroup = (PMDockSplitter*)obj;
@@ -1077,19 +1077,19 @@ void PMDockWidget::undock()
emit hasUndocked();
}
-void PMDockWidget::setWidget( QWidget* mw )
+void PMDockWidget::setWidget( TQWidget* mw )
{
if ( !mw ) return;
if ( mw->parent() != this ){
- mw->reparent(this, 0, QPoint(0,0), false);
+ mw->reparent(this, 0, TQPoint(0,0), false);
}
widget = mw;
delete layout;
- layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
layout->addWidget( header );
layout->addWidget( widget,1 );
@@ -1097,10 +1097,10 @@ void PMDockWidget::setWidget( QWidget* mw )
void PMDockWidget::setDockTabName( PMDockTabGroup* tab )
{
- QString listOfName;
- QString listOfCaption;
+ TQString listOfName;
+ TQString listOfCaption;
for ( int i = 0; i < tab->count(); ++i ) {
- QWidget *w = tab->page( i );
+ TQWidget *w = tab->page( i );
listOfCaption.append( w->caption() ).append(",");
listOfName.append( w->name() ).append(",");
}
@@ -1151,7 +1151,7 @@ void PMDockWidget::makeDockVisible()
}
if ( isVisible() ) return;
- QWidget* p = parentWidget();
+ TQWidget* p = parentWidget();
while ( p ){
if ( !p->isVisible() )
p->show();
@@ -1165,8 +1165,8 @@ void PMDockWidget::makeDockVisible()
void PMDockWidget::loseFormerBrotherDockWidget()
{
if( formerBrotherDockWidget != 0L)
- QObject::disconnect( formerBrotherDockWidget, SIGNAL(iMBeingClosed()),
- this, SLOT(loseFormerBrotherDockWidget()) );
+ TQObject::disconnect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()),
+ this, TQT_SLOT(loseFormerBrotherDockWidget()) );
formerBrotherDockWidget = 0L;
repaint();
}
@@ -1176,12 +1176,12 @@ void PMDockWidget::dockBack()
if( formerBrotherDockWidget) {
// search all children if it tries to dock back to a child
bool found = false;
- QObjectList* cl = queryList("PMDockWidget");
- QObjectListIt it( *cl );
- QObject * obj;
+ TQObjectList* cl = queryList("PMDockWidget");
+ TQObjectListIt it( *cl );
+ TQObject * obj;
while ( !found && (obj=it.current()) != 0 ) {
++it;
- QWidget* widg = (QWidget*)obj;
+ TQWidget* widg = (TQWidget*)obj;
if( widg == formerBrotherDockWidget)
found = true;
}
@@ -1189,7 +1189,7 @@ void PMDockWidget::dockBack()
if( !found) {
// can dock back to the former brother dockwidget
- manualDock( formerBrotherDockWidget, formerDockPos, d->splitPosInPercent, QPoint(0,0), false, d->index);
+ manualDock( formerBrotherDockWidget, formerDockPos, d->splitPosInPercent, TQPoint(0,0), false, d->index);
formerBrotherDockWidget = 0L;
makeDockVisible();
return;
@@ -1197,7 +1197,7 @@ void PMDockWidget::dockBack()
}
// else dockback to the dockmainwindow (default behaviour)
- manualDock( ((PMDockMainWindow*)manager->main)->getMainDockWidget(), formerDockPos, d->splitPosInPercent, QPoint(0,0), false, d->index);
+ manualDock( ((PMDockMainWindow*)manager->main)->getMainDockWidget(), formerDockPos, d->splitPosInPercent, TQPoint(0,0), false, d->index);
formerBrotherDockWidget = 0L;
if (parent())
makeDockVisible();
@@ -1219,12 +1219,12 @@ public:
/**
* This rectangle is used to highlight the current dockposition. It stores global screen coordinates.
*/
- QRect dragRect;
+ TQRect dragRect;
/**
* This rectangle is used to erase the previously highlighted dockposition. It stores global screen coordinates.
*/
- QRect oldDragRect;
+ TQRect oldDragRect;
/**
* This flag stores the information if dragging is ready to start. Used between mousePress and mouseMove event.
@@ -1234,7 +1234,7 @@ public:
/**
* This variable stores the offset of the mouse cursor to the upper left edge of the current drag widget.
*/
- QPoint dragOffset;
+ TQPoint dragOffset;
/**
* These flags store information about the splitter behaviour
@@ -1244,8 +1244,8 @@ public:
bool splitterHighResolution;
};
-PMDockManager::PMDockManager( QWidget* mainWindow , const char* name )
-:QObject( mainWindow, name )
+PMDockManager::PMDockManager( TQWidget* mainWindow , const char* name )
+:TQObject( mainWindow, name )
,main(mainWindow)
,currentDragWidget(0L)
,currentMoveWidget(0L)
@@ -1266,20 +1266,20 @@ PMDockManager::PMDockManager( QWidget* mainWindow , const char* name )
undockProcess = false;
- menuData = new QPtrList<MenuDockData>;
+ menuData = new TQPtrList<MenuDockData>;
menuData->setAutoDelete( true );
menuData->setAutoDelete( true );
#ifndef NO_KDE2
menu = new KPopupMenu();
#else
- menu = new QPopupMenu();
+ menu = new TQPopupMenu();
#endif
- connect( menu, SIGNAL(aboutToShow()), SLOT(slotMenuPopup()) );
- connect( menu, SIGNAL(activated(int)), SLOT(slotMenuActivated(int)) );
+ connect( menu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotMenuPopup()) );
+ connect( menu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotMenuActivated(int)) );
- childDock = new QObjectList();
+ childDock = new TQObjectList();
childDock->setAutoDelete( false );
}
@@ -1288,7 +1288,7 @@ PMDockManager::~PMDockManager()
delete menuData;
delete menu;
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
PMDockWidget * obj;
while ( (obj=(PMDockWidget*)it.current()) ) {
@@ -1300,7 +1300,7 @@ PMDockManager::~PMDockManager()
void PMDockManager::activate()
{
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
PMDockWidget * obj;
while ( (obj=(PMDockWidget*)it.current()) ) {
@@ -1310,27 +1310,27 @@ void PMDockManager::activate()
obj->show();
}
}
- if ( !main->inherits("QDialog") ) main->show();
+ if ( !main->inherits("TQDialog") ) main->show();
}
-bool PMDockManager::eventFilter( QObject *obj, QEvent *event )
+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
The first child of the mainwindow is not necessarily a meaningful
- content widget but in Qt3's QMainWindow it can easily be a QToolBar.
- In short: QMainWindow knows how to layout its children, no need to
+ 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
mess that up.
>>>>>I need this in the PMDockArea at the moment (JoWenn)
- if ( obj == main && event->type() == QEvent::Resize && dynamic_cast<PMDockArea*>(main) && main->children() ){
+ if ( obj == main && event->type() == TQEvent::Resize && dynamic_cast<PMDockArea*>(main) && main->children() ){
#ifndef NO_KDE2
kdDebug()<<"PMDockManager::eventFilter(): main is a PMDockArea and there are children"<<endl;
#endif
- QWidget* fc = (QWidget*)main->children()->getFirst();
+ TQWidget* fc = (TQWidget*)main->children()->getFirst();
if ( fc )
- fc->setGeometry( QRect(QPoint(0,0), main->geometry().size()) );
+ fc->setGeometry( TQRect(TQPoint(0,0), main->geometry().size()) );
}
*/
@@ -1338,12 +1338,12 @@ bool PMDockManager::eventFilter( QObject *obj, QEvent *event )
PMDockWidget* pDockWdgAtCursor = 0L;
PMDockWidget* curdw = ((PMDockWidgetAbstractHeaderDrag*)obj)->dockWidget();
switch ( event->type() ){
- case QEvent::MouseButtonDblClick:
+ case TQEvent::MouseButtonDblClick:
if (curdw->currentDockPos == PMDockWidget::DockDesktop) curdw->dockBack();
else curdw->toDesktop( );
break;
- case QEvent::MouseButtonPress:
- if ( ((QMouseEvent*)event)->button() == LeftButton ){
+ case TQEvent::MouseButtonPress:
+ if ( ((TQMouseEvent*)event)->button() == LeftButton ){
if ( curdw->eDocking != (int)PMDockWidget::DockNone ){
dropCancel = true;
curdw->setFocus();
@@ -1351,23 +1351,23 @@ bool PMDockManager::eventFilter( QObject *obj, QEvent *event )
currentDragWidget = curdw;
currentMoveWidget = 0L;
- childDockWidgetList = new QWidgetList();
+ childDockWidgetList = new TQWidgetList();
childDockWidgetList->append( curdw );
findChildDockWidget( curdw, *childDockWidgetList );
- d->oldDragRect = QRect();
- d->dragRect = QRect(curdw->geometry());
- QPoint p = curdw->mapToGlobal(QPoint(0,0));
+ d->oldDragRect = TQRect();
+ d->dragRect = TQRect(curdw->geometry());
+ TQPoint p = curdw->mapToGlobal(TQPoint(0,0));
d->dragRect.moveTopLeft(p);
drawDragRectangle();
d->readyToDrag = true;
- d->dragOffset = QCursor::pos()-currentDragWidget->mapToGlobal(QPoint(0,0));
+ d->dragOffset = TQCursor::pos()-currentDragWidget->mapToGlobal(TQPoint(0,0));
}
}
break;
- case QEvent::MouseButtonRelease:
- if ( ((QMouseEvent*)event)->button() == LeftButton ){
+ case TQEvent::MouseButtonRelease:
+ if ( ((TQMouseEvent*)event)->button() == LeftButton ){
if ( draging ){
if ( !dropCancel )
drop();
@@ -1376,9 +1376,9 @@ bool PMDockManager::eventFilter( QObject *obj, QEvent *event )
}
if (d->readyToDrag) {
d->readyToDrag = false;
- d->oldDragRect = QRect();
- d->dragRect = QRect(curdw->geometry());
- QPoint p = curdw->mapToGlobal(QPoint(0,0));
+ d->oldDragRect = TQRect();
+ d->dragRect = TQRect(curdw->geometry());
+ TQPoint p = curdw->mapToGlobal(TQPoint(0,0));
d->dragRect.moveTopLeft(p);
drawDragRectangle();
currentDragWidget = 0L;
@@ -1389,20 +1389,20 @@ bool PMDockManager::eventFilter( QObject *obj, QEvent *event )
dropCancel = true;
}
break;
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
if ( draging ) {
- pDockWdgAtCursor = findDockWidgetAt( QCursor::pos() );
+ pDockWdgAtCursor = findDockWidgetAt( TQCursor::pos() );
PMDockWidget* oldMoveWidget = currentMoveWidget;
if ( currentMoveWidget && pDockWdgAtCursor == currentMoveWidget ) { //move
- dragMove( currentMoveWidget, currentMoveWidget->mapFromGlobal( QCursor::pos() ) );
+ dragMove( currentMoveWidget, currentMoveWidget->mapFromGlobal( TQCursor::pos() ) );
break;
} else {
if (dropCancel && curdw) {
- d->dragRect = QRect(curdw->geometry());
- QPoint p = curdw->mapToGlobal(QPoint(0,0));
+ d->dragRect = TQRect(curdw->geometry());
+ TQPoint p = curdw->mapToGlobal(TQPoint(0,0));
d->dragRect.moveTopLeft(p);
}else
- d->dragRect = QRect();
+ d->dragRect = TQRect();
drawDragRectangle();
}
@@ -1426,7 +1426,7 @@ bool PMDockManager::eventFilter( QObject *obj, QEvent *event )
if (d->readyToDrag) {
d->readyToDrag = false;
}
- if ( (((QMouseEvent*)event)->state() == LeftButton) &&
+ if ( (((TQMouseEvent*)event)->state() == LeftButton) &&
(curdw->eDocking != (int)PMDockWidget::DockNone) ) {
startDrag( curdw);
}
@@ -1436,10 +1436,10 @@ bool PMDockManager::eventFilter( QObject *obj, QEvent *event )
break;
}
}
- return QObject::eventFilter( obj, event );
+ return TQObject::eventFilter( obj, event );
}
-PMDockWidget* PMDockManager::findDockWidgetAt( const QPoint& pos )
+PMDockWidget* PMDockManager::findDockWidgetAt( const TQPoint& pos )
{
dropCancel = true;
@@ -1448,7 +1448,7 @@ PMDockWidget* PMDockManager::findDockWidgetAt( const QPoint& pos )
if (currentDragWidget->eDocking == (int)PMDockWidget::DockNone ) return 0L;
- QWidget* p = QApplication::widgetAt( pos );
+ TQWidget* p = TQApplication::widgetAt( pos );
if ( !p ) {
dropCancel = false;
return 0L;
@@ -1456,7 +1456,7 @@ PMDockWidget* PMDockManager::findDockWidgetAt( const QPoint& pos )
#if defined(_OS_WIN32_) || defined(Q_OS_WIN32)
p = p->topLevelWidget();
#endif
- QWidget* w = 0L;
+ TQWidget* w = 0L;
findChildDockWidget( w, p, p->mapFromGlobal(pos) );
if ( !w ){
if ( !p->inherits("PMDockWidget") ) {
@@ -1474,7 +1474,7 @@ PMDockWidget* PMDockManager::findDockWidgetAt( const QPoint& pos )
if ( www->dockSite( ) == (int)PMDockWidget::DockNone ) return 0L;
PMDockWidget::DockPosition curPos = PMDockWidget::DockDesktop;
- QPoint cpos = www->mapFromGlobal( pos );
+ TQPoint cpos = www->mapFromGlobal( pos );
int ww = www->widget->width() / 3;
int hh = www->widget->height() / 3;
@@ -1501,15 +1501,15 @@ PMDockWidget* PMDockManager::findDockWidgetAt( const QPoint& pos )
return www;
}
-void PMDockManager::findChildDockWidget( QWidget*& ww, const QWidget* p, const QPoint& pos )
+void PMDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const TQPoint& pos )
{
if ( p->children() ) {
- QWidget *w;
- QObjectListIt it( *p->children() );
+ TQWidget *w;
+ TQObjectListIt it( *p->children() );
it.toLast();
while ( it.current() ) {
if ( it.current()->isWidgetType() ) {
- w = (QWidget*)it.current();
+ w = (TQWidget*)it.current();
if ( w->isVisible() && w->geometry().contains(pos) ) {
if ( w->inherits("PMDockWidget") ) ww = w;
findChildDockWidget( ww, w, w->mapFromParent(pos) );
@@ -1522,15 +1522,15 @@ void PMDockManager::findChildDockWidget( QWidget*& ww, const QWidget* p, const Q
return;
}
-void PMDockManager::findChildDockWidget( const QWidget* p, QWidgetList& list )
+void PMDockManager::findChildDockWidget( const TQWidget* p, TQWidgetList& list )
{
if ( p->children() ) {
- QWidget *w;
- QObjectListIt it( *p->children() );
+ TQWidget *w;
+ TQObjectListIt it( *p->children() );
it.toLast();
while ( it.current() ) {
if ( it.current()->isWidgetType() ) {
- w = (QWidget*)it.current();
+ w = (TQWidget*)it.current();
if ( w->isVisible() ) {
if ( w->inherits("PMDockWidget") ) list.append( w );
findChildDockWidget( w, list );
@@ -1542,9 +1542,9 @@ void PMDockManager::findChildDockWidget( const QWidget* p, QWidgetList& list )
return;
}
-void PMDockManager::findFloatingWidgets( QPtrList<PMDockWidget>& l )
+void PMDockManager::findFloatingWidgets( TQPtrList<PMDockWidget>& l )
{
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
for( ; it.current( ); ++it )
if( it.current( )->inherits( "PMDockWidget" ) &&
!it.current( )->parent( ) )
@@ -1566,15 +1566,15 @@ void PMDockManager::startDrag( PMDockWidget* w )
curPos = PMDockWidget::DockDesktop;
draging = true;
- QApplication::setOverrideCursor(QCursor(sizeAllCursor));
+ TQApplication::setOverrideCursor(TQCursor(sizeAllCursor));
}
-void PMDockManager::dragMove( PMDockWidget* dw, QPoint pos )
+void PMDockManager::dragMove( PMDockWidget* dw, TQPoint pos )
{
- QPoint p = dw->mapToGlobal( dw->widget->pos() );
+ TQPoint p = dw->mapToGlobal( dw->widget->pos() );
PMDockWidget::DockPosition oldPos = curPos;
- QSize r = dw->widget->size();
+ TQSize r = dw->widget->size();
if ( dw->parentDockTabGroup() ){
curPos = PMDockWidget::DockCenter;
if ( oldPos != curPos ) {
@@ -1587,8 +1587,8 @@ void PMDockManager::dragMove( PMDockWidget* dw, QPoint pos )
int h = r.height() / 3;
PMDockMainWindow* mw = ( PMDockMainWindow* ) parent( );
- QWidget* cw = mw->centralWidget( );
- QPoint cwp = cw->mapToGlobal( QPoint( 0, 0 ) );
+ TQWidget* cw = mw->centralWidget( );
+ TQPoint cwp = cw->mapToGlobal( TQPoint( 0, 0 ) );
int cwh = cw->height( );
if ( pos.y() <= h )
@@ -1632,34 +1632,34 @@ void PMDockManager::dragMove( PMDockWidget* dw, QPoint pos )
void PMDockManager::cancelDrop()
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
delete childDockWidgetList;
childDockWidgetList = 0L;
- d->dragRect = QRect(); // cancel drawing
+ d->dragRect = TQRect(); // cancel drawing
drawDragRectangle(); // only the old rect will be deleted
}
void PMDockManager::drop()
{
- d->dragRect = QRect(); // cancel drawing
+ d->dragRect = TQRect(); // cancel drawing
drawDragRectangle(); // only the old rect will be deleted
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
delete childDockWidgetList;
childDockWidgetList = 0L;
if ( dropCancel ) return;
if ( !currentMoveWidget && ((currentDragWidget->eDocking & (int)PMDockWidget::DockDesktop) == 0) ) {
- d->dragRect = QRect(); // cancel drawing
+ d->dragRect = TQRect(); // cancel drawing
drawDragRectangle(); // only the old rect will be deleted
return;
}
if ( !currentMoveWidget && !currentDragWidget->parent() ) {
- currentDragWidget->move( QCursor::pos() - d->dragOffset );
+ currentDragWidget->move( TQCursor::pos() - d->dragOffset );
}
else {
int splitPos = currentDragWidget->d->splitPosInPercent;
@@ -1673,63 +1673,63 @@ void PMDockManager::drop()
default: break;
}
}
- currentDragWidget->manualDock( currentMoveWidget, curPos , splitPos, QCursor::pos() - d->dragOffset );
+ currentDragWidget->manualDock( currentMoveWidget, curPos , splitPos, TQCursor::pos() - d->dragOffset );
currentDragWidget->makeDockVisible();
}
}
-static QDomElement createStringEntry(QDomDocument &doc, const QString &tagName, const QString &str)
+static TQDomElement createStringEntry(TQDomDocument &doc, const TQString &tagName, const TQString &str)
{
- QDomElement el = doc.createElement(tagName);
+ TQDomElement el = doc.createElement(tagName);
el.appendChild(doc.createTextNode(str));
return el;
}
-static QDomElement createBoolEntry(QDomDocument &doc, const QString &tagName, bool b)
+static TQDomElement createBoolEntry(TQDomDocument &doc, const TQString &tagName, bool b)
{
- return createStringEntry(doc, tagName, QString::fromLatin1(b? "true" : "false"));
+ return createStringEntry(doc, tagName, TQString::fromLatin1(b? "true" : "false"));
}
-static QDomElement createNumberEntry(QDomDocument &doc, const QString &tagName, int n)
+static TQDomElement createNumberEntry(TQDomDocument &doc, const TQString &tagName, int n)
{
- return createStringEntry(doc, tagName, QString::number(n));
+ return createStringEntry(doc, tagName, TQString::number(n));
}
-static QDomElement createRectEntry(QDomDocument &doc, const QString &tagName, const QRect &rect)
+static TQDomElement createRectEntry(TQDomDocument &doc, const TQString &tagName, const TQRect &rect)
{
- QDomElement el = doc.createElement(tagName);
+ TQDomElement el = doc.createElement(tagName);
- QDomElement xel = doc.createElement("x");
- xel.appendChild(doc.createTextNode(QString::number(rect.x())));
+ TQDomElement xel = doc.createElement("x");
+ xel.appendChild(doc.createTextNode(TQString::number(rect.x())));
el.appendChild(xel);
- QDomElement yel = doc.createElement("y");
- yel.appendChild(doc.createTextNode(QString::number(rect.y())));
+ TQDomElement yel = doc.createElement("y");
+ yel.appendChild(doc.createTextNode(TQString::number(rect.y())));
el.appendChild(yel);
- QDomElement wel = doc.createElement("width");
- wel.appendChild(doc.createTextNode(QString::number(rect.width())));
+ TQDomElement wel = doc.createElement("width");
+ wel.appendChild(doc.createTextNode(TQString::number(rect.width())));
el.appendChild(wel);
- QDomElement hel = doc.createElement("height");
- hel.appendChild(doc.createTextNode(QString::number(rect.height())));
+ TQDomElement hel = doc.createElement("height");
+ hel.appendChild(doc.createTextNode(TQString::number(rect.height())));
el.appendChild(hel);
return el;
}
-static QDomElement createListEntry(QDomDocument &doc, const QString &tagName,
- const QString &subTagName, const QStrList &list)
+static TQDomElement createListEntry(TQDomDocument &doc, const TQString &tagName,
+ const TQString &subTagName, const TQStrList &list)
{
- QDomElement el = doc.createElement(tagName);
+ TQDomElement el = doc.createElement(tagName);
- QStrListIterator it(list);
+ TQStrListIterator it(list);
for (; it.current(); ++it) {
- QDomElement subel = doc.createElement(subTagName);
- subel.appendChild(doc.createTextNode(QString::fromLatin1(it.current())));
+ TQDomElement subel = doc.createElement(subTagName);
+ subel.appendChild(doc.createTextNode(TQString::fromLatin1(it.current())));
el.appendChild(subel);
}
@@ -1737,42 +1737,42 @@ static QDomElement createListEntry(QDomDocument &doc, const QString &tagName,
}
-static QString stringEntry(QDomElement &base, const QString &tagName)
+static TQString stringEntry(TQDomElement &base, const TQString &tagName)
{
return base.namedItem(tagName).firstChild().toText().data();
}
-static bool boolEntry(QDomElement &base, const QString &tagName)
+static bool boolEntry(TQDomElement &base, const TQString &tagName)
{
return base.namedItem(tagName).firstChild().toText().data() == "true";
}
-static int numberEntry(QDomElement &base, const QString &tagName)
+static int numberEntry(TQDomElement &base, const TQString &tagName)
{
return stringEntry(base, tagName).toInt();
}
-static QRect rectEntry(QDomElement &base, const QString &tagName)
+static TQRect rectEntry(TQDomElement &base, const TQString &tagName)
{
- QDomElement el = base.namedItem(tagName).toElement();
+ TQDomElement el = base.namedItem(tagName).toElement();
int x = numberEntry(el, "x");
int y = numberEntry(el, "y");
int width = numberEntry(el, "width");
int height = numberEntry(el, "height");
- return QRect(x, y, width, height);
+ return TQRect(x, y, width, height);
}
-static QStrList listEntry(QDomElement &base, const QString &tagName, const QString &subTagName)
+static TQStrList listEntry(TQDomElement &base, const TQString &tagName, const TQString &subTagName)
{
- QStrList list;
+ TQStrList list;
- QDomElement subel = base.namedItem(tagName).firstChild().toElement();
+ TQDomElement subel = base.namedItem(tagName).firstChild().toElement();
while (!subel.isNull()) {
if (subel.tagName() == subTagName)
list.append(subel.firstChild().toText().data().latin1());
@@ -1783,23 +1783,23 @@ static QStrList listEntry(QDomElement &base, const QString &tagName, const QStri
}
-void PMDockManager::writeConfig(QDomElement &base)
+void PMDockManager::writeConfig(TQDomElement &base)
{
// First of all, clear the tree under base
while (!base.firstChild().isNull())
base.removeChild(base.firstChild());
- QDomDocument doc = base.ownerDocument();
+ TQDomDocument doc = base.ownerDocument();
- QStrList nameList;
- QString mainWidgetStr;
+ TQStrList nameList;
+ TQString mainWidgetStr;
// collect widget names
- QStrList nList;
- QObjectListIt it(*childDock);
+ TQStrList nList;
+ TQObjectListIt it(*childDock);
PMDockWidget *obj1;
while ( (obj1=(PMDockWidget*)it.current()) ) {
if ( obj1->parent() == main )
- mainWidgetStr = QString::fromLatin1(obj1->name());
+ mainWidgetStr = TQString::fromLatin1(obj1->name());
nList.append(obj1->name());
++it;
}
@@ -1815,7 +1815,7 @@ void PMDockManager::writeConfig(QDomElement &base)
continue;
}
- QDomElement groupEl;
+ TQDomElement groupEl;
if (obj->isGroup) {
//// Save a group
@@ -1829,7 +1829,7 @@ void PMDockManager::writeConfig(QDomElement &base)
//// Save a tab group
groupEl = doc.createElement("tabGroup");
- QStrList list;
+ TQStrList list;
for ( int i = 0; i < ((PMDockTabGroup*)obj->widget)->count(); ++i )
list.append( ((PMDockTabGroup*)obj->widget)->page( i )->name() );
groupEl.appendChild(createListEntry(doc, "tabs", "tab", list));
@@ -1839,10 +1839,10 @@ void PMDockManager::writeConfig(QDomElement &base)
groupEl = doc.createElement("dock");
}
- groupEl.appendChild(createStringEntry(doc, "name", QString::fromLatin1(obj->name())));
+ groupEl.appendChild(createStringEntry(doc, "name", TQString::fromLatin1(obj->name())));
groupEl.appendChild(createBoolEntry(doc, "hasParent", obj->parent()));
if ( !obj->parent() ) {
- groupEl.appendChild(createRectEntry(doc, "geometry", QRect(main->frameGeometry().topLeft(), main->size())));
+ groupEl.appendChild(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size())));
groupEl.appendChild(createBoolEntry(doc, "visible", obj->isVisible()));
}
if (obj->header && obj->header->inherits("PMDockWidgetHeader")) {
@@ -1858,19 +1858,19 @@ void PMDockManager::writeConfig(QDomElement &base)
if (main->inherits("PMDockMainWindow")) {
PMDockMainWindow *dmain = (PMDockMainWindow*)main;
- QString centralWidgetStr = QString(dmain->centralWidget()? dmain->centralWidget()->name() : "");
+ TQString centralWidgetStr = TQString(dmain->centralWidget()? dmain->centralWidget()->name() : "");
base.appendChild(createStringEntry(doc, "centralWidget", centralWidgetStr));
- QString mainDockWidgetStr = QString(dmain->getMainDockWidget()? dmain->getMainDockWidget()->name() : "");
+ TQString mainDockWidgetStr = TQString(dmain->getMainDockWidget()? dmain->getMainDockWidget()->name() : "");
base.appendChild(createStringEntry(doc, "mainDockWidget", mainDockWidgetStr));
} else {
base.appendChild(createStringEntry(doc, "mainWidget", mainWidgetStr));
}
- base.appendChild(createRectEntry(doc, "geometry", QRect(main->frameGeometry().topLeft(), main->size())));
+ base.appendChild(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size())));
}
-void PMDockManager::readConfig(QDomElement &base)
+void PMDockManager::readConfig(TQDomElement &base)
{
if (base.namedItem("group").isNull()
&& base.namedItem("tabgroup").isNull()
@@ -1879,13 +1879,13 @@ void PMDockManager::readConfig(QDomElement &base)
return;
}
- autoCreateDock = new QObjectList();
+ autoCreateDock = new TQObjectList();
autoCreateDock->setAutoDelete( true );
bool isMainVisible = main->isVisible();
main->hide();
- QObjectListIt it(*childDock);
+ TQObjectListIt it(*childDock);
PMDockWidget *obj1;
while ( (obj1=(PMDockWidget*)it.current()) ) {
if ( !obj1->isGroup && !obj1->isTabGroup ) {
@@ -1897,15 +1897,15 @@ void PMDockManager::readConfig(QDomElement &base)
++it;
}
- QDomElement childEl = base.firstChild().toElement();
+ TQDomElement childEl = base.firstChild().toElement();
while (!childEl.isNull() ) {
PMDockWidget *obj = 0;
if (childEl.tagName() == "splitGroup") {
// Read a group
- QString name = stringEntry(childEl, "name");
- QString firstName = stringEntry(childEl, "firstName");
- QString secondName = stringEntry(childEl, "secondName");
+ TQString name = stringEntry(childEl, "name");
+ TQString firstName = stringEntry(childEl, "firstName");
+ TQString secondName = stringEntry(childEl, "secondName");
int orientation = numberEntry(childEl, "orientation");
int separatorPos = numberEntry(childEl, "separatorPos");
@@ -1920,8 +1920,8 @@ void PMDockManager::readConfig(QDomElement &base)
}
} else if (childEl.tagName() == "tabGroup") {
// Read a tab group
- QString name = stringEntry(childEl, "name");
- QStrList list = listEntry(childEl, "tabs", "tab");
+ TQString name = stringEntry(childEl, "name");
+ TQStrList list = listEntry(childEl, "tabs", "tab");
PMDockWidget *d1 = getDockWidgetFromName( list.first() );
list.next();
@@ -1947,12 +1947,12 @@ void PMDockManager::readConfig(QDomElement &base)
}
if (!boolEntry(childEl, "hasParent")) {
- QRect r = rectEntry(childEl, "geometry");
+ TQRect r = rectEntry(childEl, "geometry");
obj = getDockWidgetFromName(stringEntry(childEl, "name"));
obj->applyToWidget(0);
obj->setGeometry(r);
if (boolEntry(childEl, "visible"))
- obj->QWidget::show();
+ obj->TQWidget::show();
}
if (obj && obj->header && obj->header->inherits("PMDockWidgetHeader")) {
@@ -1966,20 +1966,20 @@ void PMDockManager::readConfig(QDomElement &base)
if (main->inherits("PMDockMainWindow")) {
PMDockMainWindow *dmain = (PMDockMainWindow*)main;
- QString mv = stringEntry(base, "centralWidget");
+ TQString mv = stringEntry(base, "centralWidget");
if (!mv.isEmpty() && getDockWidgetFromName(mv) ) {
PMDockWidget *mvd = getDockWidgetFromName(mv);
mvd->applyToWidget(dmain);
mvd->show();
dmain->setCentralWidget(mvd);
}
- QString md = stringEntry(base, "mainDockWidget");
+ TQString md = stringEntry(base, "mainDockWidget");
if (!md.isEmpty() && getDockWidgetFromName(md)) {
PMDockWidget *mvd = getDockWidgetFromName(md);
dmain->setMainDockWidget(mvd);
}
} else {
- QString mv = stringEntry(base, "mainWidget");
+ TQString mv = stringEntry(base, "mainWidget");
if (!mv.isEmpty() && getDockWidgetFromName(mv)) {
PMDockWidget *mvd = getDockWidgetFromName(mv);
mvd->applyToWidget(main);
@@ -1987,7 +1987,7 @@ void PMDockManager::readConfig(QDomElement &base)
}
}
- QRect mr = rectEntry(base, "geometry");
+ TQRect mr = rectEntry(base, "geometry");
main->setGeometry(mr);
if (isMainVisible)
main->show();
@@ -1998,7 +1998,7 @@ void PMDockManager::readConfig(QDomElement &base)
#ifndef NO_KDE2
-void PMDockManager::writeConfig( KConfig* c, QString group )
+void PMDockManager::writeConfig( KConfig* c, TQString group )
{
//debug("BEGIN Write Config");
if ( !c ) c = KGlobal::config();
@@ -2007,13 +2007,13 @@ void PMDockManager::writeConfig( KConfig* c, QString group )
c->setGroup( group );
c->writeEntry( "Version", DOCK_CONFIG_VERSION );
- QStrList nameList;
- QStrList findList;
- QObjectListIt it( *childDock );
+ TQStrList nameList;
+ TQStrList findList;
+ TQObjectListIt it( *childDock );
PMDockWidget * obj;
// collect PMDockWidget's name
- QStrList nList;
+ TQStrList nList;
while ( (obj=(PMDockWidget*)it.current()) ) {
++it;
//debug(" +Add subdock %s", obj->name());
@@ -2026,7 +2026,7 @@ void PMDockManager::writeConfig( KConfig* c, QString group )
while ( nList.current() ){
//debug(" -Try to save %s", nList.current());
obj = getDockWidgetFromName( nList.current() );
- QString cname = obj->name();
+ TQString cname = obj->name();
if ( obj->header ){
obj->header->saveConfig( c );
}
@@ -2037,7 +2037,7 @@ void PMDockManager::writeConfig( KConfig* c, QString group )
c->writeEntry( cname+":type", "GROUP");
if ( !obj->parent() ){
c->writeEntry( cname+":parent", "___null___");
- c->writeEntry( cname+":geometry", QRect(obj->frameGeometry().topLeft(), obj->size()) );
+ c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
c->writeEntry( cname+":visible", obj->isVisible());
} else {
c->writeEntry( cname+":parent", "yes");
@@ -2068,12 +2068,12 @@ void PMDockManager::writeConfig( KConfig* c, QString group )
c->writeEntry( cname+":type", "TAB_GROUP");
if ( !obj->parent() ){
c->writeEntry( cname+":parent", "___null___");
- c->writeEntry( cname+":geometry", QRect(obj->frameGeometry().topLeft(), obj->size()) );
+ c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
c->writeEntry( cname+":visible", obj->isVisible());
} else {
c->writeEntry( cname+":parent", "yes");
}
- QStrList list;
+ TQStrList list;
for ( int i = 0; i < ((PMDockTabGroup*)obj->widget)->count(); ++i )
list.append( ((PMDockTabGroup*)obj->widget)->page( i )->name() );
c->writeEntry( cname+":tabNames", list );
@@ -2088,7 +2088,7 @@ void PMDockManager::writeConfig( KConfig* c, QString group )
/*************************************************************************************************/
if ( !obj->parent() ){
c->writeEntry( cname+":type", "NULL_DOCK");
- c->writeEntry( cname+":geometry", QRect(obj->frameGeometry().topLeft(), obj->size()) );
+ c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) );
c->writeEntry( cname+":visible", obj->isVisible());
} else {
c->writeEntry( cname+":type", "DOCK");
@@ -2103,7 +2103,7 @@ void PMDockManager::writeConfig( KConfig* c, QString group )
}
c->writeEntry( "NameList", nameList );
- c->writeEntry( "Main:Geometry", QRect(main->frameGeometry().topLeft(), main->size()) );
+ c->writeEntry( "Main:Geometry", TQRect(main->frameGeometry().topLeft(), main->size()) );
c->writeEntry( "Main:visible", main->isVisible()); // curently nou use
if ( main->inherits("PMDockMainWindow") ){
@@ -2116,31 +2116,31 @@ void PMDockManager::writeConfig( KConfig* c, QString group )
c->sync();
//debug("END Write Config");
}
-#include <qmessagebox.h>
-void PMDockManager::readConfig( KConfig* c, QString group )
+#include <tqmessagebox.h>
+void PMDockManager::readConfig( KConfig* c, TQString group )
{
if ( !c ) c = KGlobal::config();
if ( group.isEmpty() ) group = "dock_setting_default";
c->setGroup( group );
- QStrList nameList;
+ TQStrList nameList;
c->readListEntry( "NameList", nameList );
- QString ver = c->readEntry( "Version", "0.0.1" );
+ TQString ver = c->readEntry( "Version", "0.0.1" );
nameList.first();
if ( !nameList.current() || ver != DOCK_CONFIG_VERSION ){
activate();
return;
}
- autoCreateDock = new QObjectList();
+ autoCreateDock = new TQObjectList();
autoCreateDock->setAutoDelete( true );
bool isMainVisible = main->isVisible();
// if (isMainVisible) // CCC
- //QMessageBox::information(0,"","hallo");
+ //TQMessageBox::information(0,"","hallo");
//COMMENTED4TESTING main->hide();
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
PMDockWidget * obj;
while ( (obj=(PMDockWidget*)it.current()) ){
@@ -2153,9 +2153,9 @@ void PMDockManager::readConfig( KConfig* c, QString group )
nameList.first();
while ( nameList.current() ){
- QString oname = nameList.current();
+ TQString oname = nameList.current();
c->setGroup( group );
- QString type = c->readEntry( oname + ":type" );
+ TQString type = c->readEntry( oname + ":type" );
obj = 0L;
if ( type == "GROUP" ){
@@ -2173,7 +2173,7 @@ void PMDockManager::readConfig( KConfig* c, QString group )
}
if ( type == "TAB_GROUP" ){
- QStrList list;
+ TQStrList list;
PMDockWidget* tabDockGroup = 0L;
c->readListEntry( oname+":tabNames", list );
PMDockWidget* d1 = getDockWidgetFromName( list.first() );
@@ -2198,14 +2198,14 @@ void PMDockManager::readConfig( KConfig* c, QString group )
}
if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){
- QRect r = c->readRectEntry( oname + ":geometry" );
+ TQRect r = c->readRectEntry( oname + ":geometry" );
obj = getDockWidgetFromName( oname );
obj->applyToWidget( 0L );
obj->setGeometry(r);
c->setGroup( group );
if ( c->readBoolEntry( oname + ":visible" ) ){
- obj->QWidget::show();
+ obj->TQWidget::show();
}
}
@@ -2223,7 +2223,7 @@ void PMDockManager::readConfig( KConfig* c, QString group )
PMDockMainWindow* dmain = (PMDockMainWindow*)main;
c->setGroup( group );
- QString mv = c->readEntry( "Main:view" );
+ TQString mv = c->readEntry( "Main:view" );
if ( !mv.isEmpty() && getDockWidgetFromName( mv ) ){
PMDockWidget* mvd = getDockWidgetFromName( mv );
mvd->applyToWidget( dmain );
@@ -2231,14 +2231,14 @@ void PMDockManager::readConfig( KConfig* c, QString group )
dmain->setView( mvd );
}
c->setGroup( group );
- QString md = c->readEntry( "Main:dock" );
+ TQString md = c->readEntry( "Main:dock" );
if ( !md.isEmpty() && getDockWidgetFromName( md ) ){
PMDockWidget* mvd = getDockWidgetFromName( md );
dmain->setMainDockWidget( mvd );
}
} else {
c->setGroup( group );
- QString mv = c->readEntry( "Main:view" );
+ TQString mv = c->readEntry( "Main:view" );
if ( !mv.isEmpty() && getDockWidgetFromName( mv ) ){
PMDockWidget* mvd = getDockWidgetFromName( mv );
mvd->applyToWidget( main );
@@ -2251,24 +2251,24 @@ void PMDockManager::readConfig( KConfig* c, QString group )
autoCreateDock = 0L;
c->setGroup( group );
- QRect mr = c->readRectEntry("Main:Geometry");
+ TQRect mr = c->readRectEntry("Main:Geometry");
main->setGeometry(mr);
if ( isMainVisible ) main->show();
}
#endif
-PMDockWidget* PMDockManager::getDockWidgetFromName( const QString& dockName )
+PMDockWidget* PMDockManager::getDockWidgetFromName( const TQString& dockName )
{
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
PMDockWidget * obj;
while ( (obj=(PMDockWidget*)it.current()) ) {
++it;
- if ( QString(obj->name()) == dockName ) return obj;
+ if ( TQString(obj->name()) == dockName ) return obj;
}
PMDockWidget* autoCreate = 0L;
if ( autoCreateDock ){
- autoCreate = new PMDockWidget( this, dockName.latin1(), QPixmap("") );
+ autoCreate = new PMDockWidget( this, dockName.latin1(), TQPixmap("") );
autoCreateDock->append( autoCreate );
}
return autoCreate;
@@ -2308,20 +2308,20 @@ void PMDockManager::slotMenuPopup()
menu->clear();
menuData->clear();
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
PMDockWidget * obj;
int numerator = 0;
while ( (obj=(PMDockWidget*)it.current()) ) {
++it;
if ( obj->mayBeHide() )
{
- menu->insertItem( obj->icon() ? *(obj->icon()) : QPixmap(), QString("Hide ") + obj->caption(), numerator++ );
+ menu->insertItem( obj->icon() ? *(obj->icon()) : TQPixmap(), TQString("Hide ") + obj->caption(), numerator++ );
menuData->append( new MenuDockData( obj, true ) );
}
if ( obj->mayBeShow() )
{
- menu->insertItem( obj->icon() ? *(obj->icon()) : QPixmap(), QString("Show ") + obj->caption(), numerator++ );
+ menu->insertItem( obj->icon() ? *(obj->icon()) : TQPixmap(), TQString("Show ") + obj->caption(), numerator++ );
menuData->append( new MenuDockData( obj, false ) );
}
}
@@ -2333,9 +2333,9 @@ void PMDockManager::slotMenuActivated( int id )
data->dock->changeHideShowState();
}
-PMDockWidget* PMDockManager::findWidgetParentDock( QWidget* w ) const
+PMDockWidget* PMDockManager::findWidgetParentDock( TQWidget* w ) const
{
- QObjectListIt it( *childDock );
+ TQObjectListIt it( *childDock );
PMDockWidget * dock;
PMDockWidget * found = 0L;
@@ -2352,7 +2352,7 @@ void PMDockManager::drawDragRectangle()
return;
int i;
- QRect oldAndNewDragRect[2];
+ TQRect oldAndNewDragRect[2];
oldAndNewDragRect[0] = d->oldDragRect;
oldAndNewDragRect[1] = d->dragRect;
@@ -2361,7 +2361,7 @@ void PMDockManager::drawDragRectangle()
if (oldAndNewDragRect[i].isEmpty())
continue;
- PMDockWidget* pDockWdgAtRect = (PMDockWidget*) QApplication::widgetAt( oldAndNewDragRect[i].topLeft(), true );
+ PMDockWidget* pDockWdgAtRect = (PMDockWidget*) TQApplication::widgetAt( oldAndNewDragRect[i].topLeft(), true );
if (!pDockWdgAtRect)
continue;
@@ -2369,7 +2369,7 @@ void PMDockManager::drawDragRectangle()
bool unclipped;
PMDockMainWindow* pMain = 0L;
PMDockWidget* pTLDockWdg = 0L;
- QWidget* topWdg;
+ TQWidget* topWdg;
if (pDockWdgAtRect->topLevelWidget() == main) {
isOverMainWdg = true;
topWdg = pMain = (PMDockMainWindow*) main;
@@ -2383,7 +2383,7 @@ void PMDockManager::drawDragRectangle()
}
// draw the rectangle unclipped over the main dock window
- QPainter p;
+ TQPainter p;
p.begin( topWdg );
if ( !unclipped ) {
if (isOverMainWdg)
@@ -2393,8 +2393,8 @@ void PMDockManager::drawDragRectangle()
}
// draw the rectangle
p.setRasterOp(Qt::NotXorROP);
- QRect r = oldAndNewDragRect[i];
- r.moveTopLeft( r.topLeft() - topWdg->mapToGlobal(QPoint(0,0)) );
+ TQRect r = oldAndNewDragRect[i];
+ r.moveTopLeft( r.topLeft() - topWdg->mapToGlobal(TQPoint(0,0)) );
p.drawRect(r.x(), r.y(), r.width(), r.height());
p.end();
}
@@ -2406,10 +2406,10 @@ void PMDockManager::drawDragRectangle()
#ifdef _JOWENN_EXPERIMENTAL_
-PMDockArea::PMDockArea( QWidget* parent, const char *name)
-:QWidget( parent, name)
+PMDockArea::PMDockArea( TQWidget* parent, const char *name)
+:TQWidget( parent, name)
{
- QString new_name = QString(name) + QString("_DockManager");
+ TQString new_name = TQString(name) + TQString("_DockManager");
dockManager = new PMDockManager( this, new_name.latin1() );
mainDockWidget = 0L;
}
@@ -2419,7 +2419,7 @@ PMDockArea::~PMDockArea()
delete dockManager;
}
-PMDockWidget* PMDockArea::createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel)
+PMDockWidget* PMDockArea::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel)
{
return new PMDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel );
}
@@ -2436,44 +2436,44 @@ void PMDockArea::makeDockInvisible( PMDockWidget* dock )
dock->undock();
}
-void PMDockArea::makeWidgetDockVisible( QWidget* widget )
+void PMDockArea::makeWidgetDockVisible( TQWidget* widget )
{
makeDockVisible( dockManager->findWidgetParentDock(widget) );
}
-void PMDockArea::writeDockConfig(QDomElement &base)
+void PMDockArea::writeDockConfig(TQDomElement &base)
{
dockManager->writeConfig(base);
}
-void PMDockArea::readDockConfig(QDomElement &base)
+void PMDockArea::readDockConfig(TQDomElement &base)
{
dockManager->readConfig(base);
}
void PMDockArea::slotDockWidgetUndocked()
{
- QObject* pSender = (QObject*) sender();
+ TQObject* pSender = (TQObject*) sender();
if (!pSender->inherits("PMDockWidget")) return;
PMDockWidget* pDW = (PMDockWidget*) pSender;
emit dockWidgetHasUndocked( pDW);
}
-void PMDockArea::resizeEvent(QResizeEvent *rsize)
+void PMDockArea::resizeEvent(TQResizeEvent *rsize)
{
- QWidget::resizeEvent(rsize);
+ TQWidget::resizeEvent(rsize);
if (children()){
#ifndef NO_KDE2
kdDebug()<<"PMDockArea::resize"<<endl;
#endif
- QObjectList *list=queryList("QWidget",0,false);
+ TQObjectList *list=queryList("TQWidget",0,false);
- QObjectListIt it( *list ); // iterate over the buttons
- QObject *obj;
+ TQObjectListIt it( *list ); // iterate over the buttons
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
// for each found object...
- ((QWidget*)obj)->setGeometry(QRect(QPoint(0,0),size()));
+ ((TQWidget*)obj)->setGeometry(TQRect(TQPoint(0,0),size()));
break;
}
delete list;
@@ -2481,12 +2481,12 @@ void PMDockArea::resizeEvent(QResizeEvent *rsize)
PMDockSplitter *split;
// for (unsigned int i=0;i<children()->count();i++)
{
-// QPtrList<QObject> list(children());
-// QObject *obj=((QPtrList<QObject*>)children())->at(i);
- QObject *obj=children()->getFirst();
+// TQPtrList<TQObject> list(children());
+// TQObject *obj=((TQPtrList<TQObject*>)children())->at(i);
+ TQObject *obj=children()->getFirst();
if (split=dynamic_cast<PMDockSplitter*>(obj))
{
- split->setGeometry( QRect(QPoint(0,0), size() ));
+ split->setGeometry( TQRect(TQPoint(0,0), size() ));
// break;
}
}
@@ -2495,12 +2495,12 @@ void PMDockArea::resizeEvent(QResizeEvent *rsize)
}
#ifndef NO_KDE2
-void PMDockArea::writeDockConfig( KConfig* c, QString group )
+void PMDockArea::writeDockConfig( KConfig* c, TQString group )
{
dockManager->writeConfig( c, group );
}
-void PMDockArea::readDockConfig( KConfig* c, QString group )
+void PMDockArea::readDockConfig( KConfig* c, TQString group )
{
dockManager->readConfig( c, group );
}
diff --git a/kpovmodeler/pmdockwidget.h b/kpovmodeler/pmdockwidget.h
index 29f6c34f..d6c083f2 100644
--- a/kpovmodeler/pmdockwidget.h
+++ b/kpovmodeler/pmdockwidget.h
@@ -57,11 +57,11 @@
#define _KDOCKWIDGET_2_2_
-#include <qpoint.h>
-#include <qptrlist.h>
-#include <qframe.h>
-#include <qdom.h>
-#include <qtabwidget.h>
+#include <tqpoint.h>
+#include <tqptrlist.h>
+#include <tqframe.h>
+#include <tqdom.h>
+#include <tqtabwidget.h>
#ifndef NO_KDE2
#include <kmainwindow.h>
@@ -69,7 +69,7 @@
#undef EXPORT_DOCKCLASS
#define EXPORT_DOCKCLASS
#else
-#include <qmainwindow.h>
+#include <tqmainwindow.h>
#include "exportdockclass.h"
#include "dummykmainwindow.h"
#endif
@@ -86,17 +86,17 @@ class PMDockWidgetPrivate;
class PMDockArea;
class PMDockMainWindowPrivate;
-class QObjectList;
-class QPopupMenu;
-class QVBoxLayout;
-class QHBoxLayout;
-class QPixmap;
+class TQObjectList;
+class TQPopupMenu;
+class TQVBoxLayout;
+class TQHBoxLayout;
+class TQPixmap;
#ifndef NO_KDE2
class KToolBar;
class KConfig;
#else
-class QToolBar;
+class TQToolBar;
#endif
/**
@@ -225,7 +225,7 @@ protected:
/**
* Draws the drag panel (a double line)
*/
- virtual void paintEvent( QPaintEvent* );
+ virtual void paintEvent( TQPaintEvent* );
protected:
virtual void virtual_hook( int id, void* data );
@@ -303,7 +303,7 @@ protected:
/**
* A layout manager for placing the embedded buttons (close and stay)
*/
- QHBoxLayout* layout;
+ TQHBoxLayout* layout;
/**
* a little button for closing (undocking and hiding) the dockwidget
@@ -341,7 +341,7 @@ private:
/**
* It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget class set).
* An abstraction what it is currently.
- * In general it is like @ref QTabWidget but is more useful for the dockwidget class set.
+ * In general it is like @ref TQTabWidget but is more useful for the dockwidget class set.
* More or less a minor helper class for the dockwidget class set.
*
* @author Max Judin (documentation: Falk Brettschneider).
@@ -353,8 +353,8 @@ public:
/**
* Constructs this. It just calls the method of the base class.
*/
- PMDockTabGroup( QWidget *parent = 0, const char *name = 0 )
- :QTabWidget( parent, name ){};
+ PMDockTabGroup( TQWidget *parent = 0, const char *name = 0 )
+ :TQTabWidget( parent, name ){};
/**
* Destructs a PMDockTabGroup.
@@ -393,7 +393,7 @@ private:
* ...
* PMDockWidget* dock = 0L;
* dock = mainWidget->createDockWidget( "Any window caption", nicePixmap, 0L, i18n("window caption")); // 0L==no parent
- * QWidget* actualWidget = new QWidget( dock);
+ * TQWidget* actualWidget = new TQWidget( dock);
* dock->setWidget( actualWidget); // embed it
* dock->setToolTipString(i18n("That's me")); // available when appearing as tab page
* ...
@@ -428,8 +428,8 @@ public:
* @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 QPixmap &pixmap, QWidget* parent = 0L, const QString& strCaption = 0L,
- const QString& strTabPageLabel = " ", WFlags f = 0);
+ const TQPixmap &pixmap, TQWidget* parent = 0L, const TQString& strCaption = 0L,
+ const TQString& strTabPageLabel = " ", WFlags f = 0);
/**
* Destructs a dockwidget.
@@ -473,7 +473,7 @@ public:
* @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.
*/
- PMDockWidget* manualDock( PMDockWidget* target, DockPosition dockPos, int spliPos = 50, QPoint pos = QPoint(0,0), bool check = false, int tabIndex = -1);
+ PMDockWidget* manualDock( PMDockWidget* target, DockPosition dockPos, int spliPos = 50, TQPoint pos = TQPoint(0,0), bool check = false, int tabIndex = -1);
/**
* Specify where it is either possible or impossible for this to dock to another dockwidget.
@@ -508,23 +508,23 @@ public:
/**
* Sets the embedded widget.
*
- * A QLayout takes care about proper resizing, automatically.
+ * A TQLayout takes care about proper resizing, automatically.
*
* @param w The pointer to the dockwidget's child widget.
*/
- void setWidget( QWidget* w);
+ void setWidget( TQWidget* w);
/**
* Get the embedded widget.
*
* @return The pointer to the dockwidget's child widget, 0L if there's no such child.
*/
- QWidget* getWidget() const { return widget; };
+ TQWidget* getWidget() const { return widget; };
/**
* Sets the header of this dockwidget.
*
- * A @ref QLayout takes care about proper resizing, automatically.
+ * A @ref TQLayout takes care about proper resizing, automatically.
* The header contains the drag panel, the close button and the stay button.
*
* @param ah A base class pointer to the dockwidget header
@@ -573,12 +573,12 @@ public:
*
* @param ttStr A string for the tooltip on the tab.
*/
- void setToolTipString(const QString& ttStr) { toolTipStr = ttStr; };
+ void setToolTipString(const TQString& ttStr) { toolTipStr = ttStr; };
/**
* @return The tooltip string being shown on the appropriate tab page header when in dock-centered mode.
*/
- const QString& toolTipString() const { return toolTipStr; };
+ const TQString& toolTipString() const { return toolTipStr; };
/**
* @return result @p true, if a dockback is possible, otherwise @p false.
@@ -589,20 +589,20 @@ public:
* Sets a string that is used for the label of the tab page when in tab page mode
* @param label The new tab page label.
*/
- void setTabPageLabel( const QString& label) { tabPageTitle = label; };
+ void setTabPageLabel( const TQString& label) { tabPageTitle = label; };
/**
* @return A string that is used for the label of the tab page when in tab page mode.
*/
- const QString& tabPageLabel() const { return tabPageTitle; };
+ const TQString& tabPageLabel() const { return tabPageTitle; };
/**
- * Catches and processes some @ref QWidget events that are interesting for dockwidgets.
+ * Catches and processes some @ref TQWidget events that are interesting for dockwidgets.
*/
- virtual bool event( QEvent * );
+ virtual bool event( TQEvent * );
/**
- * Add dockwidget management actions to @ref QWidget::show.
+ * Add dockwidget management actions to @ref TQWidget::show.
*/
virtual void show();
/**
@@ -626,7 +626,7 @@ public:
*
* @param windowType is type of dock window
*/
- void setDockWindowTransient (QWidget *parent, bool transientEnabled);
+ void setDockWindowTransient (TQWidget *parent, bool transientEnabled);
// MODIFICATION (lpassos)
/**
@@ -662,7 +662,7 @@ public slots:
/**
* Sets the caption and tab label
*/
- void slotSetCaption( const QString& );
+ void slotSetCaption( const TQString& );
protected:
@@ -733,11 +733,11 @@ protected:
/**
* a string used as tooltip for the tab page header when in dock-centered mode.
*/
- QString toolTipStr;
+ TQString toolTipStr;
/**
* a string used as title of the tab page when in tab page mode
*/
- QString tabPageTitle;
+ TQString tabPageTitle;
private:
/**
@@ -754,7 +754,7 @@ private:
* @param s the target widget to reparent to
* @param p the point to move to (if it doesn't reparent)
*/
- void applyToWidget( QWidget* s, const QPoint& p = QPoint(0,0) );
+ void applyToWidget( TQWidget* s, const TQPoint& p = TQPoint(0,0) );
/**
* A base class pointer to the header of this dockwidget
@@ -764,12 +764,12 @@ private:
/**
* the embedded widget
*/
- QWidget* widget;
+ TQWidget* widget;
/**
* the layout manager that takes care about proper resizing and moving the embedded widget and the header
*/
- QVBoxLayout* layout;
+ TQVBoxLayout* layout;
/**
* the responsible dockmanager
@@ -779,7 +779,7 @@ private:
/**
* an icon for the tab widget header
*/
- QPixmap* pix;
+ TQPixmap* pix;
/**
* Information about the ability for docking to another dockwidget.
@@ -797,8 +797,8 @@ private:
PMDockWidget::DockPosition prevSideDockPosBeforeDrag;
// GROUP data
- QString firstName;
- QString lastName;
+ TQString firstName;
+ TQString lastName;
Orientation splitterOrientation;
bool isGroup;
bool isTabGroup;
@@ -838,7 +838,7 @@ public:
* @param mainWindow the main window controlled by this
* @param name the internal QOject name
*/
- PMDockManager( QWidget* mainWindow, const char* name = 0L );
+ PMDockManager( TQWidget* mainWindow, const char* name = 0L );
/**
* Destructs a dockmanager.
@@ -855,14 +855,14 @@ public:
* @param c the KDE configuration saver
* @param group the name of the section in KConfig
*/
- void writeConfig( KConfig* c = 0L, QString group = QString::null );
+ void writeConfig( KConfig* c = 0L, TQString group = TQString::null );
/**
* Like writeConfig but reads the whole stuff in.
*
* In order to restore a window configuration
* from a config file, it looks up widgets by name
- * (QObject::name) in the childDock variable of
+ * (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,
@@ -873,17 +873,17 @@ public:
* @param c the KDE configuration saver
* @param group the name of the section in KConfig
*/
- void readConfig ( KConfig* c = 0L, QString group = QString::null );
+ void readConfig ( KConfig* c = 0L, TQString group = TQString::null );
#endif
/**
* Saves the current dock window layout into a DOM tree below the given element.
*/
- void writeConfig(QDomElement &base);
+ void writeConfig(TQDomElement &base);
/**
* Reads the current dock window layout from a DOM tree below the given element.
*/
- void readConfig(QDomElement &base);
+ void readConfig(TQDomElement &base);
/**
* Shows all encapsulated widgets of all controlled dockwidgets and shows all dockwidgets which are
@@ -899,7 +899,7 @@ public:
* @param _ the event
* @return the return value of the method call of the base class method
*/
- virtual bool eventFilter( QObject *, QEvent * );
+ virtual bool eventFilter( TQObject *, TQEvent * );
/**
* This method finds out what a widgets' dockwidget is. That means the dockmanager has a look at all
@@ -908,25 +908,25 @@ public:
* @param w any widget that is supposed to be encapsulated by one of the controlled dockwidgets
* @return the dockwidget that encapsulates that widget, otherwise 0
*/
- PMDockWidget* findWidgetParentDock( QWidget* w) const;
+ PMDockWidget* findWidgetParentDock( TQWidget* w) const;
/**
* Works like makeDockVisible() but can be called for widgets that covered by a dockwidget.
*
* @param w the widget that is encapsulated by a dockwidget that turns to visible.
*/
- void makeWidgetDockVisible( QWidget* w ){ findWidgetParentDock(w)->makeDockVisible(); }
+ void makeWidgetDockVisible( TQWidget* w ){ findWidgetParentDock(w)->makeDockVisible(); }
/**
* @return the popupmenu for showing/hiding dockwidgets
*/
- QPopupMenu* dockHideShowMenu() const { return menu; }
+ TQPopupMenu* dockHideShowMenu() const { return menu; }
/**
- * @param dockName an internal QObject name
- * @return the dockwidget that has got that internal QObject name
+ * @param dockName an internal TQObject name
+ * @return the dockwidget that has got that internal TQObject name
*/
- PMDockWidget* getDockWidgetFromName( const QString& dockName );
+ PMDockWidget* getDockWidgetFromName( const TQString& dockName );
/**
* Enables opaque resizing. Opaque resizing is initially turned off.
@@ -941,7 +941,7 @@ public:
/**
* Try to preserve the widget's size. Works like KeepSize resize mode
- * of QSplitter. Off by default.
+ * of TQSplitter. Off by default.
* Call this method before you create any dock widgets!
*/
void setSplitterKeepSize(bool b=true);
@@ -967,7 +967,7 @@ public:
/**
* Returns the main dock widget
*/
- QWidget* dockMainWidget( ) const { return main; }
+ TQWidget* dockMainWidget( ) const { return main; }
signals:
@@ -1030,16 +1030,16 @@ private:
* @param pos global (desktop) position of the wanted dockwidget
* @return the dockwidget at that position
*/
- PMDockWidget* findDockWidgetAt( const QPoint& pos );
+ PMDockWidget* findDockWidgetAt( const TQPoint& pos );
/**
- * Finds the QWidget recursively at the position given as parameter
+ * Finds the TQWidget recursively at the position given as parameter
*
- * @param w a variable where the method puts the QWidget at that position (instead of a return value)
+ * @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 pos global (desktop) position of the wanted dockwidget
*/
- void findChildDockWidget( QWidget*& w, const QWidget* p, const QPoint& pos );
+ void findChildDockWidget( TQWidget*& w, const TQWidget* p, const TQPoint& pos );
// MODIFICATION (lpassos)
// Made findChildDockWidget public
public:
@@ -1049,11 +1049,11 @@ public:
* @param p the parent 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 QWidget* p, QWidgetList& l);
+ void findChildDockWidget( const TQWidget* p, TQWidgetList& l);
/**
* Returns all floating dock widgets
*/
- void findFloatingWidgets( QPtrList<PMDockWidget>& l );
+ void findFloatingWidgets( TQPtrList<PMDockWidget>& l );
private:
/**
@@ -1067,7 +1067,7 @@ private:
* @param d the dockwidget which is dragged
* @param pos the new position of the dragged dockwidget
*/
- void dragMove( PMDockWidget* d, QPoint pos );
+ void dragMove( PMDockWidget* d, TQPoint pos );
/**
* Aborts the drag mode. Restores the cursor and hides the drag indicator.
@@ -1085,7 +1085,7 @@ private:
/**
* Usually the PMDockMainWindow but not necessarily.
*/
- QWidget* main;
+ TQWidget* main;
/**
* The dockwidget that is being dragged at the moment
@@ -1100,7 +1100,7 @@ private:
/**
* It is of interest during the dock process. Then it contains all child dockwidgets.
*/
- QWidgetList* childDockWidgetList;
+ TQWidgetList* childDockWidgetList;
/**
* The dockposition where the dockwidget would be docked to, if we dropped it here.
@@ -1111,12 +1111,12 @@ private:
* A QList of all objects that are important for docking.
* Some serve as group widgets of dockwidgets, others encapsulate normal widgets.
*/
- QObjectList* childDock;
+ TQObjectList* childDock;
/**
* Contains dockwidgets that are created automatically by the dockmanager. For internal use.
*/
- QObjectList* autoCreateDock;
+ TQObjectList* autoCreateDock;
/**
* For storing the width during the dragging of a dockwidget.
@@ -1148,12 +1148,12 @@ private:
* A popup menu that contains one menuitem for each dockwidget that shows the current visibility state and
* to show or hide the appropriate dockwidget.
*/
- QPopupMenu* menu;
+ TQPopupMenu* menu;
/**
* An internal list containing data for the menuitems for the visibility popup menu.
*/
- QPtrList<MenuDockData> *menuData;
+ TQPtrList<MenuDockData> *menuData;
protected:
virtual void virtual_hook( int id, void* data );
@@ -1223,7 +1223,7 @@ public:
*
* @param name object name
*/
- PMDockMainWindow( QWidget* parent = 0L, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose );
+ PMDockMainWindow( TQWidget* parent = 0L, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose );
/**
* Destructs a dockmainwindow.
@@ -1256,23 +1256,23 @@ public:
* The PMDockMainWindow creates a new dockwidget object here that usually should encapsulate the user's widget.
* The new dockwidget is automatically taken under control by the dockmanager of the dockmainwindow.
*
- * @param name QObject name (default dockwidget caption)
+ * @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 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 QString& name, const QPixmap &pixmap, QWidget* parent = 0L, const QString& strCaption = 0L, const QString& strTabPageLabel = " ");
+ PMDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L, const TQString& strCaption = 0L, const TQString& strTabPageLabel = " ");
/**
* Saves the current dock window layout into a DOM tree below the given element.
*/
- void writeDockConfig(QDomElement &base);
+ void writeDockConfig(TQDomElement &base);
/**
* Reads the current dock window layout from a DOM tree below the given element.
*/
- void readDockConfig(QDomElement &base);
+ void readDockConfig(TQDomElement &base);
#ifndef NO_KDE2
/**
@@ -1281,7 +1281,7 @@ public:
* @param c KDE class for saving configurations
* @param group name of section to write to
*/
- void writeDockConfig( KConfig* c = 0L, QString group = QString::null );
+ void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null );
/**
* It reads the current dock state from the given section of KConfig.
@@ -1289,13 +1289,13 @@ public:
* @param c KDE class for saving configurations
* @param group name of section to read from
*/
- void readDockConfig ( KConfig* c = 0L, QString group = QString::null );
+ void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null );
#endif
/**
* It runs through all dockwidgets which are under control of the dockmanager and calls show() for every
* encapsulated widget and show() for the dockwidget itself if it is not in tab mode.
- * Additionally, if the main dockwidget is not a QDialog, it will be shown.
+ * Additionally, if the main dockwidget is not a TQDialog, it will be shown.
*/
void activateDock(){ dockManager->activate(); }
@@ -1305,7 +1305,7 @@ public:
*
* @return the wanted popup menu
*/
- QPopupMenu* dockHideShowMenu() const { return dockManager->dockHideShowMenu(); }
+ TQPopupMenu* dockHideShowMenu() const { return dockManager->dockHideShowMenu(); }
/**
* This method shows the given dockwidget.
@@ -1327,7 +1327,7 @@ public:
* This is an overloaded member function, provided for convenience.
* It differs from the above function only in what argument(s) it accepts.
*/
- void makeWidgetDockVisible( QWidget* widget );
+ void makeWidgetDockVisible( TQWidget* widget );
/**
* This method calls the base class method.
@@ -1335,7 +1335,7 @@ public:
*
* @param _ any widget that should become the main view
*/
- void setView( QWidget* );
+ void setView( TQWidget* );
signals:
/**
@@ -1379,7 +1379,7 @@ protected slots:
* Reimplement if your dock-mainwindow has a complex statusbar
* (with several items)
*/
- virtual void slotSetStatusBarText( const QString & );
+ virtual void slotSetStatusBarText( const TQString & );
protected:
virtual void createShellGUI( bool create = true );
@@ -1406,7 +1406,7 @@ private:
#ifdef _JOWENN_EXPERIMENTAL_
-/* Joseph Wenninger jowenn@kde.org Experimental (Just all KMainWindow references changed to QWidget, otherwise nearly exactly the
+/* 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
@@ -1418,7 +1418,7 @@ friend class PMDockManager;
public:
- PMDockArea( QWidget* parent = 0L, const char *name = 0L);
+ PMDockArea( TQWidget* parent = 0L, const char *name = 0L);
virtual ~PMDockArea();
@@ -1428,24 +1428,24 @@ public:
void setMainDockWidget( PMDockWidget* );
PMDockWidget* getMainDockWidget(){ return mainDockWidget; }
- PMDockWidget* createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent = 0L, const QString& strCaption = 0L, const QString& strTabPageLabel = " ");
+ PMDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L, const TQString& strCaption = 0L, const TQString& strTabPageLabel = " ");
- void writeDockConfig(QDomElement &base);
- void readDockConfig(QDomElement &base);
+ void writeDockConfig(TQDomElement &base);
+ void readDockConfig(TQDomElement &base);
#ifndef NO_KDE2
- void writeDockConfig( KConfig* c = 0L, QString group = QString::null );
- void readDockConfig ( KConfig* c = 0L, QString group = QString::null );
+ void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null );
+ void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null );
#endif
void activateDock(){ dockManager->activate(); }
- QPopupMenu* dockHideShowMenu(){ return dockManager->dockHideShowMenu(); }
+ TQPopupMenu* dockHideShowMenu(){ return dockManager->dockHideShowMenu(); }
void makeDockVisible( PMDockWidget* dock );
void makeDockInvisible( PMDockWidget* dock );
- void makeWidgetDockVisible( QWidget* widget );
- //void setView( QWidget* );
+ void makeWidgetDockVisible( TQWidget* widget );
+ //void setView( TQWidget* );
signals:
/**
@@ -1462,7 +1462,7 @@ protected slots:
void slotDockWidgetUndocked();
public:
- virtual void resizeEvent(QResizeEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kpovmodeler/pmdockwidget_private.cpp b/kpovmodeler/pmdockwidget_private.cpp
index cdf21930..7fd72420 100644
--- a/kpovmodeler/pmdockwidget_private.cpp
+++ b/kpovmodeler/pmdockwidget_private.cpp
@@ -19,11 +19,11 @@
#include "pmdockwidget.h"
#include "pmdockwidget_private.h"
-#include <qpainter.h>
-#include <qcursor.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
-PMDockSplitter::PMDockSplitter(QWidget *parent, const char *name, Orientation orient, int pos, bool highResolution)
-: QWidget(parent, name)
+PMDockSplitter::PMDockSplitter(TQWidget *parent, const char *name, Orientation orient, int pos, bool highResolution)
+: TQWidget(parent, name)
{
divider = 0L;
child0 = 0L;
@@ -36,7 +36,7 @@ PMDockSplitter::PMDockSplitter(QWidget *parent, const char *name, Orientation or
initialised = false;
}
-void PMDockSplitter::activate(QWidget *c0, QWidget *c1)
+void PMDockSplitter::activate(TQWidget *c0, TQWidget *c1)
{
if ( c0 ) child0 = c0;
if ( c1 ) child1 = c1;
@@ -44,15 +44,15 @@ void PMDockSplitter::activate(QWidget *c0, QWidget *c1)
setupMinMaxSize();
if (divider) delete divider;
- divider = new QFrame(this, "pannerdivider");
- divider->setFrameStyle(QFrame::Panel | QFrame::Raised);
+ divider = new TQFrame(this, "pannerdivider");
+ divider->setFrameStyle(TQFrame::Panel | TQFrame::Raised);
divider->setLineWidth(1);
divider->raise();
if (orientation == Horizontal)
- divider->setCursor(QCursor(sizeVerCursor));
+ divider->setCursor(TQCursor(sizeVerCursor));
else
- divider->setCursor(QCursor(sizeHorCursor));
+ divider->setCursor(TQCursor(sizeHorCursor));
divider->installEventFilter(this);
@@ -112,7 +112,7 @@ int PMDockSplitter::separatorPos() const
return xpos;
}
-void PMDockSplitter::resizeEvent(QResizeEvent *ev)
+void PMDockSplitter::resizeEvent(TQResizeEvent *ev)
{
if (initialised){
int factor = (mHighResolution)? 10000:100;
@@ -165,15 +165,15 @@ int PMDockSplitter::checkValue( int position ) const
return position;
}
-bool PMDockSplitter::eventFilter(QObject *o, QEvent *e)
+bool PMDockSplitter::eventFilter(TQObject *o, TQEvent *e)
{
- QMouseEvent *mev;
+ TQMouseEvent *mev;
bool handled = false;
int factor = (mHighResolution)? 10000:100;
switch (e->type()) {
- case QEvent::MouseMove:
- mev= (QMouseEvent*)e;
+ case TQEvent::MouseMove:
+ mev= (TQMouseEvent*)e;
child0->setUpdatesEnabled(mOpaqueResize);
child1->setUpdatesEnabled(mOpaqueResize);
if (orientation == Horizontal) {
@@ -187,7 +187,7 @@ bool PMDockSplitter::eventFilter(QObject *o, QEvent *e)
}
} else {
if (!mOpaqueResize) {
- int position = checkValue( mapFromGlobal(QCursor::pos()).x() );
+ int position = checkValue( mapFromGlobal(TQCursor::pos()).x() );
divider->move( position, 0 );
} else {
xpos = factor * checkValue( mapFromGlobal( mev->globalPos()).x() ) / width();
@@ -197,10 +197,10 @@ bool PMDockSplitter::eventFilter(QObject *o, QEvent *e)
}
handled= true;
break;
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
child0->setUpdatesEnabled(true);
child1->setUpdatesEnabled(true);
- mev= (QMouseEvent*)e;
+ mev= (TQMouseEvent*)e;
if (orientation == Horizontal){
xpos = factor* checkValue( mapFromGlobal(mev->globalPos()).y() ) / height();
resizeEvent(0);
@@ -215,20 +215,20 @@ bool PMDockSplitter::eventFilter(QObject *o, QEvent *e)
default:
break;
}
- return (handled) ? true : QWidget::eventFilter( o, e );
+ return (handled) ? true : TQWidget::eventFilter( o, e );
}
-bool PMDockSplitter::event( QEvent* e )
+bool PMDockSplitter::event( TQEvent* e )
{
- if ( e->type() == QEvent::LayoutHint ){
+ if ( e->type() == TQEvent::LayoutHint ){
// change children min/max size
setupMinMaxSize();
setSeparatorPos(xpos);
}
- return QWidget::event(e);
+ return TQWidget::event(e);
}
-QWidget* PMDockSplitter::getAnother( QWidget* w ) const
+TQWidget* PMDockSplitter::getAnother( TQWidget* w ) const
{
return ( w == child0 ) ? child1 : child0;
}
@@ -237,7 +237,7 @@ void PMDockSplitter::updateName()
{
if ( !initialised ) return;
- QString new_name = QString( child0->name() ) + "," + child1->name();
+ TQString new_name = TQString( child0->name() ) + "," + child1->name();
parentWidget()->setName( new_name.latin1() );
parentWidget()->setCaption( child0->caption() + "," + child1->caption() );
parentWidget()->repaint( false );
@@ -246,7 +246,7 @@ void PMDockSplitter::updateName()
((PMDockWidget*)parentWidget())->lastName = child1->name();
((PMDockWidget*)parentWidget())->splitterOrientation = orientation;
- QWidget* p = parentWidget()->parentWidget();
+ TQWidget* p = parentWidget()->parentWidget();
if ( p != 0L && p->inherits("PMDockSplitter" ) )
((PMDockSplitter*)p)->updateName();
}
@@ -288,8 +288,8 @@ bool PMDockSplitter::highResolution() const
/*************************************************************************/
-PMDockButton_Private::PMDockButton_Private( QWidget *parent, const char * name )
-:QPushButton( parent, name )
+PMDockButton_Private::PMDockButton_Private( TQWidget *parent, const char * name )
+:TQPushButton( parent, name )
{
moveMouse = false;
setFocusPolicy( NoFocus );
@@ -299,9 +299,9 @@ PMDockButton_Private::~PMDockButton_Private()
{
}
-void PMDockButton_Private::drawButton( QPainter* p )
+void PMDockButton_Private::drawButton( TQPainter* p )
{
- p->fillRect( 0,0, width(), height(), QBrush(colorGroup().brush(QColorGroup::Background)) );
+ p->fillRect( 0,0, width(), height(), TQBrush(colorGroup().brush(TQColorGroup::Background)) );
p->drawPixmap( (width() - pixmap()->width()) / 2, (height() - pixmap()->height()) / 2, *pixmap() );
if ( moveMouse && !isDown() ){
p->setPen( white );
@@ -325,13 +325,13 @@ void PMDockButton_Private::drawButton( QPainter* p )
}
}
-void PMDockButton_Private::enterEvent( QEvent * )
+void PMDockButton_Private::enterEvent( TQEvent * )
{
moveMouse = true;
repaint();
}
-void PMDockButton_Private::leaveEvent( QEvent * )
+void PMDockButton_Private::leaveEvent( TQEvent * )
{
moveMouse = false;
repaint();
@@ -339,7 +339,7 @@ void PMDockButton_Private::leaveEvent( QEvent * )
/*************************************************************************/
PMDockWidgetPrivate::PMDockWidgetPrivate()
- : QObject()
+ : TQObject()
,index(-1)
,splitPosInPercent(50)
,pendingFocusInEvent(false)
@@ -357,11 +357,11 @@ PMDockWidgetPrivate::~PMDockWidgetPrivate()
{
}
-void PMDockWidgetPrivate::slotFocusEmbeddedWidget(QWidget* w)
+void PMDockWidgetPrivate::slotFocusEmbeddedWidget(TQWidget* w)
{
if (w) {
- QWidget* embeddedWdg = ((PMDockWidget*)w)->getWidget();
- if (embeddedWdg && ((embeddedWdg->focusPolicy() == QWidget::ClickFocus) || (embeddedWdg->focusPolicy() == QWidget::StrongFocus))) {
+ TQWidget* embeddedWdg = ((PMDockWidget*)w)->getWidget();
+ if (embeddedWdg && ((embeddedWdg->focusPolicy() == TQWidget::ClickFocus) || (embeddedWdg->focusPolicy() == TQWidget::StrongFocus))) {
embeddedWdg->setFocus();
}
}
diff --git a/kpovmodeler/pmdockwidget_private.h b/kpovmodeler/pmdockwidget_private.h
index 353eb390..efd8cd14 100644
--- a/kpovmodeler/pmdockwidget_private.h
+++ b/kpovmodeler/pmdockwidget_private.h
@@ -24,17 +24,17 @@
#ifndef KDOCKWIDGET_PRIVATE_H
#define KDOCKWIDGET_PRIVATE_H
-#include <qwidget.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqpushbutton.h>
#ifndef NO_KDE2
#include <netwm_def.h>
#endif
-class QFrame;
+class TQFrame;
/**
- * Like QSplitter but specially designed for dockwidgets stuff.
+ * Like TQSplitter but specially designed for dockwidgets stuff.
* @internal
*
* @author Max Judin.
@@ -43,21 +43,21 @@ class PMDockSplitter : public QWidget
{
Q_OBJECT
public:
- PMDockSplitter(QWidget *parent= 0, const char *name= 0, Orientation orient= Vertical, int pos= 50, bool highResolution=false);
+ PMDockSplitter(TQWidget *parent= 0, const char *name= 0, Orientation orient= Vertical, int pos= 50, bool highResolution=false);
virtual ~PMDockSplitter(){};
- void activate(QWidget *c0, QWidget *c1 = 0L);
+ void activate(TQWidget *c0, TQWidget *c1 = 0L);
void deactivate();
int separatorPos() const;
void setSeparatorPos(int pos, bool do_resize = true);
- virtual bool eventFilter(QObject *, QEvent *);
- virtual bool event( QEvent * );
+ virtual bool eventFilter(TQObject *, TQEvent *);
+ virtual bool event( TQEvent * );
- QWidget* getFirst() const { return child0; }
- QWidget* getLast() const { return child1; }
- QWidget* getAnother( QWidget* ) const;
+ TQWidget* getFirst() const { return child0; }
+ TQWidget* getLast() const { return child1; }
+ TQWidget* getAnother( TQWidget* ) const;
void updateName();
void setOpaqueResize(bool b=true);
@@ -74,15 +74,15 @@ public:
protected:
int checkValue( int ) const;
- virtual void resizeEvent(QResizeEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
private:
void setupMinMaxSize();
- QWidget *child0, *child1;
+ TQWidget *child0, *child1;
Orientation orientation;
bool initialised;
- QFrame* divider;
+ TQFrame* divider;
int xpos;
bool mOpaqueResize, mKeepSize, mHighResolution;
};
@@ -97,13 +97,13 @@ class PMDockButton_Private : public QPushButton
{
Q_OBJECT
public:
- PMDockButton_Private( QWidget *parent=0, const char *name=0 );
+ PMDockButton_Private( TQWidget *parent=0, const char *name=0 );
~PMDockButton_Private();
protected:
- virtual void drawButton( QPainter * );
- virtual void enterEvent( QEvent * );
- virtual void leaveEvent( QEvent * );
+ virtual void drawButton( TQPainter * );
+ virtual void enterEvent( TQEvent * );
+ virtual void leaveEvent( TQEvent * );
private:
bool moveMouse;
@@ -123,7 +123,7 @@ public slots:
/**
* Especially used for Tab page docking. Switching the pages requires additional setFocus() for the embedded widget.
*/
- void slotFocusEmbeddedWidget(QWidget* w = 0L);
+ void slotFocusEmbeddedWidget(TQWidget* w = 0L);
public:
int index;
@@ -135,7 +135,7 @@ public:
NET::WindowType windowType;
#endif
- QWidget *_parent;
+ TQWidget *_parent;
bool transient;
};
diff --git a/kpovmodeler/pmdocumentationmap.cpp b/kpovmodeler/pmdocumentationmap.cpp
index 9c898c4c..df2bf620 100644
--- a/kpovmodeler/pmdocumentationmap.cpp
+++ b/kpovmodeler/pmdocumentationmap.cpp
@@ -20,35 +20,35 @@
#include <kconfig.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qdom.h>
+#include <tqfile.h>
+#include <tqdom.h>
#include "pmdebug.h"
PMDocumentationMap* PMDocumentationMap::s_pInstance = 0;
KStaticDeleter<PMDocumentationMap> PMDocumentationMap::s_staticDeleter;
-QString PMDocumentationVersion::documentation( const QString& className ) const
+TQString PMDocumentationVersion::documentation( const TQString& className ) const
{
if( m_map.contains( className ) )
return m_map[className];
return m_index;
}
-void PMDocumentationVersion::loadData( QDomElement& e )
+void PMDocumentationVersion::loadData( TQDomElement& e )
{
- QString className;
- QString target;
+ TQString className;
+ TQString target;
m_version = e.attribute( "number", "3.1" );
m_index = e.attribute( "index", "index.htm" );
- QDomNode m = e.firstChild( );
+ TQDomNode m = e.firstChild( );
while( !m.isNull( ) )
{
if( m.isElement( ) )
{
- QDomElement me = m.toElement( );
+ TQDomElement me = m.toElement( );
className = me.attribute( "className", "" );
target = me.attribute( "target", "" );
if( !className.isEmpty( ) && !target.isEmpty( ) )
@@ -84,20 +84,20 @@ void PMDocumentationMap::restoreConfig( KConfig* cfg )
m_currentVersion = cfg->readEntry( "DocumentationVersion", "3.1" );
}
-void PMDocumentationMap::setDocumentationVersion( const QString& v )
+void PMDocumentationMap::setDocumentationVersion( const TQString& v )
{
m_currentVersion = v;
if( m_mapLoaded )
findVersion( );
}
-QValueList<QString> PMDocumentationMap::availableVersions( )
+TQValueList<TQString> PMDocumentationMap::availableVersions( )
{
if( !m_mapLoaded )
loadMap( );
- QValueList<QString> result;
- QPtrListIterator<PMDocumentationVersion> it( m_maps );
+ TQValueList<TQString> result;
+ TQPtrListIterator<PMDocumentationVersion> it( m_maps );
for( ; it.current( ); ++it )
result.push_back( it.current( )->version( ) );
@@ -105,15 +105,15 @@ QValueList<QString> PMDocumentationMap::availableVersions( )
return result;
}
-QString PMDocumentationMap::documentation( const QString& objectName )
+TQString PMDocumentationMap::documentation( const TQString& objectName )
{
if( !m_mapLoaded )
loadMap( );
- QString url;
+ TQString url;
if( !m_documentationPath.isEmpty( ) )
- if( !m_documentationPath.endsWith( QString( "/" ) ) )
+ if( !m_documentationPath.endsWith( TQString( "/" ) ) )
m_documentationPath += "/";
if( !m_documentationPath.isEmpty( ) && m_pCurrentVersion )
@@ -129,14 +129,14 @@ void PMDocumentationMap::loadMap( )
{
m_mapLoaded = true;
- QString fileName = locate( "data", "kpovmodeler/povraydocmap.xml" );
+ TQString fileName = locate( "data", "kpovmodeler/povraydocmap.xml" );
if( fileName.isEmpty( ) )
{
kdError( PMArea ) << "Povray documentation map not found" << endl;
return;
}
- QFile file( fileName );
+ TQFile file( fileName );
if( !file.open( IO_ReadOnly ) )
{
kdError( PMArea ) << "Could not open the povray documentation map file"
@@ -144,19 +144,19 @@ void PMDocumentationMap::loadMap( )
return;
}
- QDomDocument doc( "DOCMAP" );
+ TQDomDocument doc( "DOCMAP" );
doc.setContent( &file );
- QDomElement e = doc.documentElement( );
- QDomNode c = e.firstChild( );
+ TQDomElement e = doc.documentElement( );
+ TQDomNode c = e.firstChild( );
- QString str;
+ TQString str;
while( !c.isNull( ) )
{
if( c.isElement( ) )
{
- QDomElement ce = c.toElement( );
+ TQDomElement ce = c.toElement( );
PMDocumentationVersion* v = new PMDocumentationVersion( );
m_maps.append( v );
v->loadData( ce );
@@ -170,7 +170,7 @@ void PMDocumentationMap::loadMap( )
void PMDocumentationMap::findVersion( )
{
- QPtrListIterator< PMDocumentationVersion > it( m_maps );
+ TQPtrListIterator< PMDocumentationVersion > it( m_maps );
bool found = false;
m_pCurrentVersion = 0;
diff --git a/kpovmodeler/pmdocumentationmap.h b/kpovmodeler/pmdocumentationmap.h
index 3027095c..19654089 100644
--- a/kpovmodeler/pmdocumentationmap.h
+++ b/kpovmodeler/pmdocumentationmap.h
@@ -23,14 +23,14 @@
#include <config.h>
#endif
-#include <qstring.h>
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
#include <kstaticdeleter.h>
class KConfig;
-class QDomElement;
+class TQDomElement;
/**
* Class used internally by @ref PMDocumentationMap
@@ -47,19 +47,19 @@ public:
*/
~PMDocumentationVersion( ) { }
- QString version( ) const { return m_version; }
- void setVersion( const QString& str ) { m_version = str; }
- QString index( ) const { return m_index; }
- void setIndex( const QString& str ) { m_index = str; }
+ TQString version( ) const { return m_version; }
+ void setVersion( const TQString& str ) { m_version = str; }
+ TQString index( ) const { return m_index; }
+ void setIndex( const TQString& str ) { m_index = str; }
- QString documentation( const QString& className ) const;
+ TQString documentation( const TQString& className ) const;
- void loadData( QDomElement& e );
+ void loadData( TQDomElement& e );
private:
- QString m_version;
- QString m_index;
- QMap< QString, QString > m_map;
+ TQString m_version;
+ TQString m_index;
+ TQMap< TQString, TQString > m_map;
};
/**
@@ -81,14 +81,14 @@ public:
/**
* Sets the path to the povray user documentation
*/
- void setPovrayDocumentationPath( const QString& s )
+ void setPovrayDocumentationPath( const TQString& s )
{
m_documentationPath = s;
}
/**
* Returns the path to the povray user documentation
*/
- QString povrayDocumentationPath( )
+ TQString povrayDocumentationPath( )
{
return m_documentationPath;
}
@@ -96,22 +96,22 @@ public:
/**
* Sets the povray documentation version
*/
- void setDocumentationVersion( const QString& str );
+ void setDocumentationVersion( const TQString& str );
/**
* Returns the povray documentation version
*/
- QString documentationVersion( ) const { return m_currentVersion; }
+ TQString documentationVersion( ) const { return m_currentVersion; }
/**
* Returns the list of available documentation versions
*/
- QValueList<QString> availableVersions( );
+ TQValueList<TQString> availableVersions( );
/**
* Returns the povray documentation file for the
* given object type
*/
- QString documentation( const QString& objectName );
+ TQString documentation( const TQString& objectName );
void saveConfig( KConfig* cfg );
void restoreConfig( KConfig* cfg );
@@ -125,11 +125,11 @@ private:
void loadMap( );
void findVersion( );
- QString m_documentationPath;
+ TQString m_documentationPath;
bool m_mapLoaded;
- QPtrList< PMDocumentationVersion > m_maps;
+ TQPtrList< PMDocumentationVersion > m_maps;
PMDocumentationVersion* m_pCurrentVersion;
- QString m_currentVersion;
+ TQString m_currentVersion;
static PMDocumentationMap* s_pInstance;
static KStaticDeleter<PMDocumentationMap> s_staticDeleter;
diff --git a/kpovmodeler/pmdragwidget.cpp b/kpovmodeler/pmdragwidget.cpp
index 7b63baf5..bc097c46 100644
--- a/kpovmodeler/pmdragwidget.cpp
+++ b/kpovmodeler/pmdragwidget.cpp
@@ -17,23 +17,23 @@
#include "pmdragwidget.h"
-PMDragWidget::PMDragWidget( QWidget* parent, const char* name, WFlags f )
- : QWidget( parent, name, f )
+PMDragWidget::PMDragWidget( TQWidget* parent, const char* name, WFlags f )
+ : TQWidget( parent, name, f )
{
dragging = false;
}
-void PMDragWidget::mousePressEvent( QMouseEvent* )
+void PMDragWidget::mousePressEvent( TQMouseEvent* )
{
dragging = true;
}
-void PMDragWidget::mouseReleaseEvent( QMouseEvent* )
+void PMDragWidget::mouseReleaseEvent( TQMouseEvent* )
{
dragging = false;
}
-void PMDragWidget::mouseMoveEvent( QMouseEvent* )
+void PMDragWidget::mouseMoveEvent( TQMouseEvent* )
{
if( dragging )
{
diff --git a/kpovmodeler/pmdragwidget.h b/kpovmodeler/pmdragwidget.h
index 30b15045..10c30e16 100644
--- a/kpovmodeler/pmdragwidget.h
+++ b/kpovmodeler/pmdragwidget.h
@@ -22,8 +22,8 @@
#include <config.h>
#endif
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
/**
* This class implements a widget that exposes a signal for drag
@@ -35,14 +35,14 @@ class PMDragWidget : public QWidget
{
Q_OBJECT
public:
- PMDragWidget( QWidget* parent = 0, const char* name = 0, WFlags f = 0 );
+ PMDragWidget( TQWidget* parent = 0, const char* name = 0, WFlags f = 0 );
virtual void startDrag( );
protected:
- void mousePressEvent( QMouseEvent* );
- void mouseReleaseEvent( QMouseEvent* );
- void mouseMoveEvent( QMouseEvent* );
+ void mousePressEvent( TQMouseEvent* );
+ void mouseReleaseEvent( TQMouseEvent* );
+ void mouseMoveEvent( TQMouseEvent* );
private:
bool dragging;
diff --git a/kpovmodeler/pmenumproperty.cpp b/kpovmodeler/pmenumproperty.cpp
index 72a03788..f82579ad 100644
--- a/kpovmodeler/pmenumproperty.cpp
+++ b/kpovmodeler/pmenumproperty.cpp
@@ -23,15 +23,15 @@ PMEnumProperty::PMEnumProperty( const char* name, bool readOnly,
{
}
-void PMEnumProperty::addEnumValue( const QString& str, int value )
+void PMEnumProperty::addEnumValue( const TQString& str, int value )
{
m_valueMap[value] = str;
m_stringMap[str] = value;
}
-QStringList PMEnumProperty::enumValues( ) const
+TQStringList PMEnumProperty::enumValues( ) const
{
- QStringList l;
+ TQStringList l;
PMEnumStringValueMap::const_iterator it;
for( it = m_stringMap.begin( ); it != m_stringMap.end( ); ++it )
l.append( it.key( ) );
@@ -52,6 +52,6 @@ PMVariant PMEnumProperty::getProtected( const PMObject* obj )
int v = getEnum( obj );
PMEnumValueStringMap::const_iterator it = m_valueMap.find( v );
if( it == m_valueMap.end( ) )
- return PMVariant( QString::null );
+ return PMVariant( TQString::null );
return it.data( );
}
diff --git a/kpovmodeler/pmenumproperty.h b/kpovmodeler/pmenumproperty.h
index a8d6085e..0de2efb3 100644
--- a/kpovmodeler/pmenumproperty.h
+++ b/kpovmodeler/pmenumproperty.h
@@ -20,10 +20,10 @@
#define PMENUMPROPERTY_H
#include "pmmetaobject.h"
-#include <qmap.h>
+#include <tqmap.h>
-typedef QMap<int, QString> PMEnumValueStringMap;
-typedef QMap<QString, int> PMEnumStringValueMap;
+typedef TQMap<int, TQString> PMEnumValueStringMap;
+typedef TQMap<TQString, int> PMEnumStringValueMap;
/**
* Base class for enum properties
@@ -41,7 +41,7 @@ public:
* Adds the string to the list of enum values and sets the enum flag
* to true
*/
- void addEnumValue( const QString& str, int value );
+ void addEnumValue( const TQString& str, int value );
/**
* Returns true if the property is an enum
@@ -50,7 +50,7 @@ public:
/**
* Returns the list of enum values
*/
- virtual QStringList enumValues( ) const;
+ virtual TQStringList enumValues( ) const;
protected:
/**
diff --git a/kpovmodeler/pmerrordialog.cpp b/kpovmodeler/pmerrordialog.cpp
index 721cd302..eb920fb0 100644
--- a/kpovmodeler/pmerrordialog.cpp
+++ b/kpovmodeler/pmerrordialog.cpp
@@ -20,24 +20,24 @@
#include "pmerrorflags.h"
#include <klocale.h>
-#include <qlabel.h>
-#include <qtextedit.h>
+#include <tqlabel.h>
+#include <tqtextedit.h>
#include <kconfig.h>
-QSize PMErrorDialog::s_size = QSize( 150, 200 );
+TQSize PMErrorDialog::s_size = TQSize( 150, 200 );
PMErrorDialog::PMErrorDialog( const PMMessageList& messages, int errorFlags,
- QWidget* parent, const char* name )
+ TQWidget* parent, const char* name )
: KDialogBase( parent, name, true, i18n( "Messages" ),
Ok | Cancel, Cancel )
{
- QVBox* page = makeVBoxMainWidget( );
- QLabel* text = new QLabel( QString( "" ), ( QWidget* )page );
+ TQVBox* page = makeVBoxMainWidget( );
+ TQLabel* text = new TQLabel( TQString( "" ), ( TQWidget* )page );
- m_pTextView = new QTextEdit( ( QWidget* )page );
+ m_pTextView = new TQTextEdit( ( TQWidget* )page );
m_pTextView->setReadOnly( true );
m_messageDict.setAutoDelete( true );
@@ -47,16 +47,16 @@ PMErrorDialog::PMErrorDialog( const PMMessageList& messages, int errorFlags,
for( it = messages.begin( ); it != messages.end( ); ++it )
m_messages.append( new PMMessage( *it ) );
- QPtrListIterator<PMMessage> pit( m_messages );
+ TQPtrListIterator<PMMessage> pit( m_messages );
for( ; pit.current( ); ++pit )
{
PMObject* obj = pit.current( )->linkedObject( );
for( ; obj; obj = obj->parent( ) )
{
- QPtrList<PMMessage>* pList = m_messageDict.find( obj );
+ TQPtrList<PMMessage>* pList = m_messageDict.find( obj );
if( !pList )
{
- pList = new QPtrList<PMMessage>;
+ pList = new TQPtrList<PMMessage>;
m_messageDict.insert( obj, pList );
}
pList->append( pit.current( ) );
@@ -95,15 +95,15 @@ PMErrorDialog::PMErrorDialog( const PMMessageList& messages, int errorFlags,
if( errorFlags & PMEFatal )
showButtonOK( false );
else
- new QLabel( i18n( "Still try to proceed?" ), ( QWidget* )page );
+ new TQLabel( i18n( "Still try to proceed?" ), ( TQWidget* )page );
resize( s_size );
}
void PMErrorDialog::displayMessages( )
{
- QPtrListIterator<PMMessage> pit( m_messages );
- QString text;
+ TQPtrListIterator<PMMessage> pit( m_messages );
+ TQString text;
text = "<qt>\n";
@@ -125,11 +125,11 @@ void PMErrorDialog::restoreConfig( KConfig* cfg )
{
cfg->setGroup( "Appearance" );
- QSize defaultSize( 150, 200 );
+ TQSize defaultSize( 150, 200 );
s_size = cfg->readSizeEntry( "ErrorDialogSize", &defaultSize );
}
-void PMErrorDialog::resizeEvent( QResizeEvent* ev )
+void PMErrorDialog::resizeEvent( TQResizeEvent* ev )
{
s_size = ev->size( );
}
diff --git a/kpovmodeler/pmerrordialog.h b/kpovmodeler/pmerrordialog.h
index 972d55ab..93981eab 100644
--- a/kpovmodeler/pmerrordialog.h
+++ b/kpovmodeler/pmerrordialog.h
@@ -25,12 +25,12 @@
#endif
#include <kdialogbase.h>
-#include <qvaluelist.h>
-#include <qptrdict.h>
-#include <qptrlist.h>
+#include <tqvaluelist.h>
+#include <tqptrdict.h>
+#include <tqptrlist.h>
class KConfig;
-class QTextEdit;
+class TQTextEdit;
class PMObject;
#include "pmmessage.h"
@@ -49,25 +49,25 @@ public:
* messages is the message list. If the list contains a message of type
* FatalError, the 'Proceed" button will not be shown.
*
- * PMErrorDialog::exec( ) returns QDialog::Accepted if the command
+ * PMErrorDialog::exec( ) returns TQDialog::Accepted if the command
* should be continued.
*/
PMErrorDialog( const PMMessageList& messages, int errorFlags,
- QWidget* parent = 0, const char* name = 0 );
+ TQWidget* parent = 0, const char* name = 0 );
static void saveConfig( KConfig* cfg );
static void restoreConfig( KConfig* cfg );
protected:
- virtual void resizeEvent( QResizeEvent* ev );
+ virtual void resizeEvent( TQResizeEvent* ev );
private:
void displayMessages( );
- static QSize s_size;
- QTextEdit* m_pTextView;
- QPtrDict< QPtrList<PMMessage> > m_messageDict;
- QPtrList<PMMessage> m_messages;
+ static TQSize s_size;
+ TQTextEdit* m_pTextView;
+ TQPtrDict< TQPtrList<PMMessage> > m_messageDict;
+ TQPtrList<PMMessage> m_messages;
};
#endif
diff --git a/kpovmodeler/pmface.h b/kpovmodeler/pmface.h
index 46da64bb..a93a4636 100644
--- a/kpovmodeler/pmface.h
+++ b/kpovmodeler/pmface.h
@@ -18,8 +18,8 @@
#ifndef PMFACE_H
#define PMFACE_H
-#include <qptrlist.h>
-#include <qvaluevector.h>
+#include <tqptrlist.h>
+#include <tqvaluevector.h>
#include <GL/gl.h>
#include "pmdebug.h"
#include "pmvector.h"
@@ -117,7 +117,7 @@ private:
static GLuint s_dummy;
};
-typedef QPtrListIterator<PMFace> PMFaceListIterator;
+typedef TQPtrListIterator<PMFace> PMFaceListIterator;
/**
* A list of @ref PMFace objects.
@@ -125,6 +125,6 @@ typedef QPtrListIterator<PMFace> PMFaceListIterator;
* This class stores all faces of a @ref PMViewStructure. Only the indices
* in a @ref PMPointArray are stored.
*/
-typedef QValueVector<PMFace> PMFaceArray;
+typedef TQValueVector<PMFace> PMFaceArray;
#endif
diff --git a/kpovmodeler/pmfactory.cpp b/kpovmodeler/pmfactory.cpp
index 4a3631ae..488db1ce 100644
--- a/kpovmodeler/pmfactory.cpp
+++ b/kpovmodeler/pmfactory.cpp
@@ -54,11 +54,11 @@ PMFactory::~PMFactory( )
s_aboutData = 0L;
}
-KParts::Part* PMFactory::createPartObject( QWidget* parentWidget,
+KParts::Part* PMFactory::createPartObject( TQWidget* parentWidget,
const char* widgetName,
- QObject* parent, const char* name,
+ TQObject* parent, const char* name,
const char* classname,
- const QStringList& /*args*/ )
+ const TQStringList& /*args*/ )
{
kdDebug( ) << "PMFactory: Created new part\n";
diff --git a/kpovmodeler/pmfactory.h b/kpovmodeler/pmfactory.h
index b44c6bd3..56797935 100644
--- a/kpovmodeler/pmfactory.h
+++ b/kpovmodeler/pmfactory.h
@@ -32,11 +32,11 @@ public:
PMFactory( );
virtual ~PMFactory( );
- virtual KParts::Part* createPartObject( QWidget* parentWidget,
+ virtual KParts::Part* createPartObject( TQWidget* parentWidget,
const char* widgetName,
- QObject* parent, const char* name,
+ TQObject* parent, const char* name,
const char* classname,
- const QStringList& args );
+ const TQStringList& args );
static KInstance* instance( );
static const KAboutData* aboutData( );
diff --git a/kpovmodeler/pmfiledialog.cpp b/kpovmodeler/pmfiledialog.cpp
index 68030f8c..d8da0f4d 100644
--- a/kpovmodeler/pmfiledialog.cpp
+++ b/kpovmodeler/pmfiledialog.cpp
@@ -22,26 +22,26 @@
#include <kfilefiltercombo.h>
-PMFileDialog::PMFileDialog( const QString& startDir, const QString& filter, QWidget* parent, const char* name, bool modal )
+PMFileDialog::PMFileDialog( const TQString& startDir, const TQString& filter, TQWidget* parent, const char* name, bool modal )
: KFileDialog( startDir, filter, parent, name, modal )
{
}
-QString PMFileDialog::getImportFileName( QWidget* parent, PMPart* part,
+TQString PMFileDialog::getImportFileName( TQWidget* parent, PMPart* part,
PMIOFormat*& format )
{
PMIOManager* manager = part->ioManager( );
- QString filter;
- QPtrListIterator<PMIOFormat> it( manager->formats( ) );
- QPtrList<PMIOFormat> formats;
+ TQString filter;
+ TQPtrListIterator<PMIOFormat> it( manager->formats( ) );
+ TQPtrList<PMIOFormat> formats;
for( ; it.current( ); ++it )
{
if( it.current( )->services( ) & PMIOFormat::Import )
{
- QStringList patterns = it.current( )->importPatterns( );
- QStringList::Iterator pit;
+ TQStringList patterns = it.current( )->importPatterns( );
+ TQStringList::Iterator pit;
for( pit = patterns.begin( ); pit != patterns.end( ); ++pit )
{
if( !filter.isEmpty( ) )
@@ -52,7 +52,7 @@ QString PMFileDialog::getImportFileName( QWidget* parent, PMPart* part,
}
}
- PMFileDialog dlg( QString::null, filter, parent, "import file dialog", true );
+ PMFileDialog dlg( TQString::null, filter, parent, "import file dialog", true );
dlg.setOperationMode( Opening );
dlg.setMode( KFile::File | KFile::LocalOnly );
dlg.setCaption( i18n( "Import" ) );
@@ -64,20 +64,20 @@ QString PMFileDialog::getImportFileName( QWidget* parent, PMPart* part,
return dlg.selectedFile( );
}
-QString PMFileDialog::getExportFileName( QWidget* parent, PMPart* part,
- PMIOFormat*& format, QString& selectedFilter )
+TQString PMFileDialog::getExportFileName( TQWidget* parent, PMPart* part,
+ PMIOFormat*& format, TQString& selectedFilter )
{
PMIOManager* manager = part->ioManager( );
- QString filter;
- QPtrListIterator<PMIOFormat> it( manager->formats( ) );
- QPtrList<PMIOFormat> formats;
+ TQString filter;
+ TQPtrListIterator<PMIOFormat> it( manager->formats( ) );
+ TQPtrList<PMIOFormat> formats;
for( ; it.current( ); ++it )
{
if( it.current( )->services( ) & PMIOFormat::Export )
{
- QStringList patterns = it.current( )->exportPatterns( );
- QStringList::Iterator pit;
+ TQStringList patterns = it.current( )->exportPatterns( );
+ TQStringList::Iterator pit;
for( pit = patterns.begin( ); pit != patterns.end( ); ++pit )
{
if( !filter.isEmpty( ) )
@@ -88,7 +88,7 @@ QString PMFileDialog::getExportFileName( QWidget* parent, PMPart* part,
}
}
- PMFileDialog dlg( QString::null, filter, parent, "export file dialog", true );
+ PMFileDialog dlg( TQString::null, filter, parent, "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 e98a84ab..7843b73d 100644
--- a/kpovmodeler/pmfiledialog.h
+++ b/kpovmodeler/pmfiledialog.h
@@ -43,18 +43,18 @@ public:
* Default constructor, use the static methods
* @ref getImportFileName or @ref getExportFileName instead
*/
- PMFileDialog( const QString& startDir, const QString& filter, QWidget* parent, const char* name, bool modal );
+ PMFileDialog( const TQString& startDir, const TQString& filter, TQWidget* parent, const char* name, bool modal );
/**
* Opens a modal file dialog and returns a selected file and the chosen
* file format.
*/
- static QString getImportFileName( QWidget* parent, PMPart* part, PMIOFormat*& format );
+ static TQString getImportFileName( TQWidget* parent, PMPart* part, PMIOFormat*& format );
/**
* Opens a modal file dialog and returns a selected file and the chosen
* file format and filter.
*/
- static QString getExportFileName( QWidget* parent, PMPart* part,
- PMIOFormat*& format, QString& filter );
+ static TQString getExportFileName( TQWidget* parent, PMPart* part,
+ PMIOFormat*& format, TQString& filter );
};
#endif
diff --git a/kpovmodeler/pmfinish.cpp b/kpovmodeler/pmfinish.cpp
index a98b9a2c..52bd92c8 100644
--- a/kpovmodeler/pmfinish.cpp
+++ b/kpovmodeler/pmfinish.cpp
@@ -214,12 +214,12 @@ void PMFinish::cleanUp( ) const
Base::cleanUp( );
}
-QString PMFinish::description( ) const
+TQString PMFinish::description( ) const
{
return i18n( "finish" );
}
-void PMFinish::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMFinish::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
Base::serialize( e, doc );
e.setAttribute( "enable_ambient", m_enableAmbient );
@@ -637,7 +637,7 @@ void PMFinish::setIridTurbulence( double c )
}
}
-PMDialogEditBase* PMFinish::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMFinish::editWidget( TQWidget* parent ) const
{
return new PMFinishEdit( parent );
}
diff --git a/kpovmodeler/pmfinish.h b/kpovmodeler/pmfinish.h
index 072a0f7c..c12f31b1 100644
--- a/kpovmodeler/pmfinish.h
+++ b/kpovmodeler/pmfinish.h
@@ -50,7 +50,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMFinish( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -58,16 +58,16 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMFinishEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmfinish" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmfinish" ); }
/** */
virtual void restoreMemento( PMMemento* s );
diff --git a/kpovmodeler/pmfinishedit.cpp b/kpovmodeler/pmfinishedit.cpp
index 809cbd66..38766f94 100644
--- a/kpovmodeler/pmfinishedit.cpp
+++ b/kpovmodeler/pmfinishedit.cpp
@@ -21,15 +21,15 @@
#include "pmlineedits.h"
#include "pmcoloredit.h"
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <kdialog.h>
-PMFinishEdit::PMFinishEdit( QWidget* parent, const char* name )
+PMFinishEdit::PMFinishEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -37,44 +37,44 @@ PMFinishEdit::PMFinishEdit( QWidget* parent, const char* name )
void PMFinishEdit::createTopWidgets( )
{
- QHBoxLayout* hl;
+ TQHBoxLayout* hl;
Base::createTopWidgets( );
- hl = new QHBoxLayout( topLayout( ) );
- QGridLayout* layout = new QGridLayout( hl, 2, 2 );
- m_pEnableAmbientEdit = new QCheckBox( i18n( "Ambient color" ), this );
- m_pAmbientColorLabel = new QLabel( i18n( "Color:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ TQGridLayout* layout = 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 );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- layout = new QGridLayout( hl, 4, 2 );
- m_pEnableDiffuseEdit = new QCheckBox( i18n( "Diffuse:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ layout = 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 );
- m_pEnableBrillianceEdit = new QCheckBox( i18n( "Brilliance:" ), this );
+ m_pEnableBrillianceEdit = new TQCheckBox( i18n( "Brilliance:" ), this );
m_pBrillianceEdit = new PMFloatEdit( this );
layout->addWidget( m_pEnableBrillianceEdit, 1, 0 );
layout->addWidget( m_pBrillianceEdit, 1, 1 );
- m_pEnableCrandEdit = new QCheckBox( i18n( "Crand:" ), this );
+ m_pEnableCrandEdit = new TQCheckBox( i18n( "Crand:" ), this );
m_pCrandEdit = new PMFloatEdit( this );
layout->addWidget( m_pEnableCrandEdit, 2, 0 );
layout->addWidget( m_pCrandEdit, 2, 1 );
- m_pConserveEnergyEdit = new QCheckBox(
+ m_pConserveEnergyEdit = new TQCheckBox(
i18n( "Conserve energy for reflection" ), this );
layout->addMultiCellWidget( m_pConserveEnergyEdit, 3, 3, 0, 1 );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- layout = new QGridLayout( hl, 2, 2 );
- m_pEnablePhongEdit = new QCheckBox( i18n( "Phong:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ layout = new TQGridLayout( hl, 2, 2 );
+ m_pEnablePhongEdit = new TQCheckBox( i18n( "Phong:" ), this );
m_pPhongEdit = new PMFloatEdit( this );
- m_pEnablePhongSizeEdit = new QCheckBox( i18n( "Phong size:" ), 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 );
@@ -82,70 +82,70 @@ void PMFinishEdit::createTopWidgets( )
layout->addWidget( m_pPhongSizeEdit, 1, 1 );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- layout = new QGridLayout( hl, 3, 2 );
- m_pEnableSpecularEdit = new QCheckBox( i18n( "Specular:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ layout = 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 );
- m_pEnableRoughnessEdit = new QCheckBox( i18n( "Roughness:" ), this );
+ m_pEnableRoughnessEdit = new TQCheckBox( i18n( "Roughness:" ), this );
m_pRoughnessEdit = new PMFloatEdit( this );
layout->addWidget( m_pEnableRoughnessEdit, 1, 0 );
layout->addWidget( m_pRoughnessEdit, 1, 1 );
- m_pEnableMetallicEdit = new QCheckBox( i18n( "Metallic:" ), this );
+ m_pEnableMetallicEdit = new TQCheckBox( i18n( "Metallic:" ), this );
m_pMetallicEdit = new PMFloatEdit( this );
layout->addWidget( m_pEnableMetallicEdit, 2, 0 );
layout->addWidget( m_pMetallicEdit, 2, 1 );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- layout = new QGridLayout( hl, 6, 2 );
- m_pIridEdit = new QCheckBox( i18n( "Iridiscence" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ layout = new TQGridLayout( hl, 6, 2 );
+ m_pIridEdit = new TQCheckBox( i18n( "Iridiscence" ), this );
layout->addMultiCellWidget( m_pIridEdit, 0, 0, 0, 1 );
- m_pIridAmountLabel = new QLabel( i18n( "Amount:" ), this );
+ m_pIridAmountLabel = new TQLabel( i18n( "Amount:" ), this );
m_pIridAmountEdit = new PMFloatEdit( this );
layout->addWidget( m_pIridAmountLabel, 1, 0 );
layout->addWidget( m_pIridAmountEdit, 1, 1 );
- m_pIridThicknessLabel = new QLabel( i18n( "Thickness:" ), this );
+ m_pIridThicknessLabel = new TQLabel( i18n( "Thickness:" ), this );
m_pIridThicknessEdit = new PMFloatEdit( this );
layout->addWidget( m_pIridThicknessLabel, 2, 0 );
layout->addWidget( m_pIridThicknessEdit, 2, 1 );
m_pIridTurbulenceEdit = new PMFloatEdit( this );
- m_pIridTurbulenceLabel = new QLabel( i18n( "Turbulence:" ), this );
+ m_pIridTurbulenceLabel = new TQLabel( i18n( "Turbulence:" ), this );
layout->addWidget( m_pIridTurbulenceLabel, 3, 0 );
layout->addWidget( m_pIridTurbulenceEdit, 3, 1 );
- m_pEnableReflectionEdit = new QCheckBox( i18n( "Reflection" ), this );
+ m_pEnableReflectionEdit = new TQCheckBox( i18n( "Reflection" ), this );
layout->addMultiCellWidget( m_pEnableReflectionEdit, 4, 4, 0, 1 );
hl->addStretch( 1 );
- m_pReflectionWidget = new QWidget( this );
- QVBoxLayout* vl = new QVBoxLayout( m_pReflectionWidget, 0, KDialog::spacingHint( ) );
- QGridLayout* gl = new QGridLayout( vl, 2, 2 );
- m_pEnableReflectionMinEdit = new QCheckBox( i18n( "Minimum:" ),
+ m_pReflectionWidget = new TQWidget( this );
+ TQVBoxLayout* vl = new TQVBoxLayout( m_pReflectionWidget, 0, KDialog::spacingHint( ) );
+ TQGridLayout* gl = new TQGridLayout( vl, 2, 2 );
+ m_pEnableReflectionMinEdit = new TQCheckBox( i18n( "Minimum:" ),
m_pReflectionWidget );
m_pReflectionMinColorEdit = new PMColorEdit( false, m_pReflectionWidget );
gl->addWidget( m_pEnableReflectionMinEdit, 0, 0, AlignTop );
gl->addWidget( m_pReflectionMinColorEdit, 0, 1 );
- QLabel* label = new QLabel( i18n( "Maximum:" ), m_pReflectionWidget );
+ TQLabel* label = new TQLabel( i18n( "Maximum:" ), m_pReflectionWidget );
m_pReflectionColorEdit = new PMColorEdit( false, m_pReflectionWidget );
gl->addWidget( label, 1, 0, AlignTop );
gl->addWidget( m_pReflectionColorEdit, 1, 1 );
- gl = new QGridLayout( vl, 4, 2 );
- m_pReflectionFresnelEdit = new QCheckBox( i18n( "Fresnel reflectivity" ),
+ gl = new TQGridLayout( vl, 4, 2 );
+ m_pReflectionFresnelEdit = new TQCheckBox( i18n( "Fresnel reflectivity" ),
m_pReflectionWidget );
gl->addMultiCellWidget( m_pReflectionFresnelEdit, 0, 0, 0, 1 );
- m_pEnableRefFalloffEdit = new QCheckBox( i18n( "Falloff:" ),
+ m_pEnableRefFalloffEdit = new TQCheckBox( i18n( "Falloff:" ),
m_pReflectionWidget );
m_pReflectionFalloffEdit = new PMFloatEdit( m_pReflectionWidget );
gl->addWidget( m_pEnableRefFalloffEdit, 1, 0 );
gl->addWidget( m_pReflectionFalloffEdit, 1, 1 );
- m_pEnableRefExponentEdit = new QCheckBox( i18n( "Exponent:" ),
+ m_pEnableRefExponentEdit = new TQCheckBox( i18n( "Exponent:" ),
m_pReflectionWidget );
m_pReflectionExponentEdit = new PMFloatEdit( m_pReflectionWidget );
gl->addWidget( m_pEnableRefExponentEdit, 2, 0 );
gl->addWidget( m_pReflectionExponentEdit, 2, 1 );
- m_pEnableRefMetallicEdit = new QCheckBox( i18n( "Metallic:" ),
+ m_pEnableRefMetallicEdit = new TQCheckBox( i18n( "Metallic:" ),
m_pReflectionWidget );
m_pReflectionMetallicEdit = new PMFloatEdit( m_pReflectionWidget );
gl->addWidget( m_pEnableRefMetallicEdit, 3, 0 );
@@ -154,41 +154,41 @@ void PMFinishEdit::createTopWidgets( )
layout->addMultiCellWidget( m_pReflectionWidget, 5, 5, 0, 1 );
- connect( m_pAmbientColorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pDiffuseEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pBrillianceEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pCrandEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pConserveEnergyEdit, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pPhongEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pPhongSizeEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pMetallicEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pSpecularEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pRoughnessEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pIridAmountEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pIridThicknessEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pIridTurbulenceEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pIridEdit, SIGNAL( clicked( ) ), SLOT( slotIridClicked( ) ) );
- connect( m_pReflectionColorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pReflectionMinColorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pReflectionFresnelEdit, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pReflectionFalloffEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pReflectionExponentEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pReflectionMetallicEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pAmbientColorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pDiffuseEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pBrillianceEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pCrandEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pConserveEnergyEdit, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pPhongEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pPhongSizeEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pMetallicEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pSpecularEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pRoughnessEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pIridAmountEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pIridThicknessEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pIridTurbulenceEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pIridEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotIridClicked( ) ) );
+ connect( m_pReflectionColorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pReflectionMinColorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pReflectionFresnelEdit, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pReflectionFalloffEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pReflectionExponentEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pReflectionMetallicEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
- connect( m_pEnableAmbientEdit, SIGNAL( clicked( ) ), SLOT( slotAmbientClicked( ) ) );
- connect( m_pEnablePhongEdit, SIGNAL( clicked( ) ), SLOT( slotPhongClicked( ) ) );
- connect( m_pEnablePhongSizeEdit, SIGNAL( clicked( ) ), SLOT( slotPhongSizeClicked( ) ) );
- connect( m_pEnableDiffuseEdit, SIGNAL( clicked( ) ), SLOT( slotDiffuseClicked( ) ) );
- connect( m_pEnableBrillianceEdit, SIGNAL( clicked( ) ), SLOT( slotBrillianceClicked( ) ) );
- connect( m_pEnableCrandEdit, SIGNAL( clicked( ) ), SLOT( slotCrandClicked( ) ) );
- connect( m_pEnableSpecularEdit, SIGNAL( clicked( ) ), SLOT( slotSpecularClicked( ) ) );
- connect( m_pEnableRoughnessEdit, SIGNAL( clicked( ) ), SLOT( slotRoughnessClicked( ) ) );
- connect( m_pEnableMetallicEdit, SIGNAL( clicked( ) ), SLOT( slotMetallicClicked( ) ) );
- connect( m_pEnableReflectionEdit, SIGNAL( clicked( ) ), SLOT( slotReflectionClicked( ) ) );
- connect( m_pEnableReflectionMinEdit, SIGNAL( clicked( ) ), SLOT( slotReflectionMinClicked( ) ) );
- connect( m_pEnableRefFalloffEdit, SIGNAL( clicked( ) ), SLOT( slotRefFalloffClicked( ) ) );
- connect( m_pEnableRefExponentEdit, SIGNAL( clicked( ) ), SLOT( slotRefExponentClicked( ) ) );
- connect( m_pEnableRefMetallicEdit, SIGNAL( clicked( ) ), SLOT( slotRefMetallicClicked( ) ) );
+ connect( m_pEnableAmbientEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAmbientClicked( ) ) );
+ connect( m_pEnablePhongEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotPhongClicked( ) ) );
+ connect( m_pEnablePhongSizeEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotPhongSizeClicked( ) ) );
+ connect( m_pEnableDiffuseEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotDiffuseClicked( ) ) );
+ connect( m_pEnableBrillianceEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotBrillianceClicked( ) ) );
+ connect( m_pEnableCrandEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotCrandClicked( ) ) );
+ connect( m_pEnableSpecularEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotSpecularClicked( ) ) );
+ connect( m_pEnableRoughnessEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRoughnessClicked( ) ) );
+ connect( m_pEnableMetallicEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotMetallicClicked( ) ) );
+ connect( m_pEnableReflectionEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotReflectionClicked( ) ) );
+ connect( m_pEnableReflectionMinEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotReflectionMinClicked( ) ) );
+ connect( m_pEnableRefFalloffEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRefFalloffClicked( ) ) );
+ connect( m_pEnableRefExponentEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRefExponentClicked( ) ) );
+ connect( m_pEnableRefMetallicEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRefMetallicClicked( ) ) );
}
void PMFinishEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmfinishedit.h b/kpovmodeler/pmfinishedit.h
index 313b35dc..e72aef73 100644
--- a/kpovmodeler/pmfinishedit.h
+++ b/kpovmodeler/pmfinishedit.h
@@ -29,9 +29,9 @@
class PMFinish;
class PMFloatEdit;
class PMColorEdit;
-class QCheckBox;
-class QLabel;
-class QWidget;
+class TQCheckBox;
+class TQLabel;
+class TQWidget;
/**
* Dialog edit class for @ref PMFinish
@@ -44,7 +44,7 @@ public:
/**
* Creates a PMFinishEdit with parent and name
*/
- PMFinishEdit( QWidget* parent, const char* name = 0 );
+ PMFinishEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -77,45 +77,45 @@ protected slots:
private:
PMFinish* m_pDisplayedObject;
PMColorEdit* m_pAmbientColorEdit;
- QLabel* m_pAmbientColorLabel;
+ TQLabel* m_pAmbientColorLabel;
PMFloatEdit* m_pDiffuseEdit;
PMFloatEdit* m_pBrillianceEdit;
PMFloatEdit* m_pCrandEdit;
- QCheckBox* m_pConserveEnergyEdit;
+ TQCheckBox* m_pConserveEnergyEdit;
PMFloatEdit* m_pPhongEdit;
PMFloatEdit* m_pPhongSizeEdit;
PMFloatEdit* m_pMetallicEdit;
PMFloatEdit* m_pSpecularEdit;
PMFloatEdit* m_pRoughnessEdit;
- QCheckBox* m_pIridEdit;
+ TQCheckBox* m_pIridEdit;
PMFloatEdit* m_pIridAmountEdit;
PMFloatEdit* m_pIridThicknessEdit;
PMFloatEdit* m_pIridTurbulenceEdit;
- QLabel* m_pIridAmountLabel;
- QLabel* m_pIridThicknessLabel;
- QLabel* m_pIridTurbulenceLabel;
- QCheckBox* m_pEnableAmbientEdit;
- QCheckBox* m_pEnablePhongEdit;
- QCheckBox* m_pEnablePhongSizeEdit;
- QCheckBox* m_pEnableDiffuseEdit;
- QCheckBox* m_pEnableBrillianceEdit;
- QCheckBox* m_pEnableCrandEdit;
- QCheckBox* m_pEnableSpecularEdit;
- QCheckBox* m_pEnableRoughnessEdit;
- QCheckBox* m_pEnableMetallicEdit;
+ TQLabel* m_pIridAmountLabel;
+ TQLabel* m_pIridThicknessLabel;
+ TQLabel* m_pIridTurbulenceLabel;
+ TQCheckBox* m_pEnableAmbientEdit;
+ TQCheckBox* m_pEnablePhongEdit;
+ TQCheckBox* m_pEnablePhongSizeEdit;
+ TQCheckBox* m_pEnableDiffuseEdit;
+ TQCheckBox* m_pEnableBrillianceEdit;
+ TQCheckBox* m_pEnableCrandEdit;
+ TQCheckBox* m_pEnableSpecularEdit;
+ TQCheckBox* m_pEnableRoughnessEdit;
+ TQCheckBox* m_pEnableMetallicEdit;
- QWidget* m_pReflectionWidget;
+ TQWidget* m_pReflectionWidget;
PMColorEdit* m_pReflectionColorEdit;
PMColorEdit* m_pReflectionMinColorEdit;
- QCheckBox* m_pReflectionFresnelEdit;
+ TQCheckBox* m_pReflectionFresnelEdit;
PMFloatEdit* m_pReflectionFalloffEdit;
PMFloatEdit* m_pReflectionExponentEdit;
PMFloatEdit* m_pReflectionMetallicEdit;
- QCheckBox* m_pEnableReflectionEdit;
- QCheckBox* m_pEnableReflectionMinEdit;
- QCheckBox* m_pEnableRefFalloffEdit;
- QCheckBox* m_pEnableRefExponentEdit;
- QCheckBox* m_pEnableRefMetallicEdit;
+ TQCheckBox* m_pEnableReflectionEdit;
+ TQCheckBox* m_pEnableReflectionMinEdit;
+ TQCheckBox* m_pEnableRefFalloffEdit;
+ TQCheckBox* m_pEnableRefExponentEdit;
+ TQCheckBox* m_pEnableRefMetallicEdit;
};
diff --git a/kpovmodeler/pmfog.cpp b/kpovmodeler/pmfog.cpp
index 5f2f1581..6af4a2cb 100644
--- a/kpovmodeler/pmfog.cpp
+++ b/kpovmodeler/pmfog.cpp
@@ -125,12 +125,12 @@ void PMFog::cleanUp( ) const
Base::cleanUp( );
}
-QString PMFog::description( ) const
+TQString PMFog::description( ) const
{
return i18n( "fog" );
}
-void PMFog::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMFog::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
Base::serialize( e, doc );
e.setAttribute( "fog_type", m_fogType );
@@ -284,7 +284,7 @@ void PMFog::setUp( const PMVector& c )
}
}
-PMDialogEditBase* PMFog::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMFog::editWidget( TQWidget* parent ) const
{
return new PMFogEdit( parent );
}
diff --git a/kpovmodeler/pmfog.h b/kpovmodeler/pmfog.h
index 444fa54a..fc6d7095 100644
--- a/kpovmodeler/pmfog.h
+++ b/kpovmodeler/pmfog.h
@@ -51,7 +51,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMFog( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -59,16 +59,16 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMFogEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmfog" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmfog" ); }
/** */
virtual void restoreMemento( PMMemento* s );
diff --git a/kpovmodeler/pmfogedit.cpp b/kpovmodeler/pmfogedit.cpp
index 64cb915e..ec9880c1 100644
--- a/kpovmodeler/pmfogedit.cpp
+++ b/kpovmodeler/pmfogedit.cpp
@@ -22,15 +22,15 @@
#include "pmvectoredit.h"
#include "pmcoloredit.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kdialog.h>
-PMFogEdit::PMFogEdit( QWidget* parent, const char* name )
+PMFogEdit::PMFogEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -38,73 +38,73 @@ PMFogEdit::PMFogEdit( QWidget* parent, const char* name )
void PMFogEdit::createTopWidgets( )
{
- QHBoxLayout* hl;
- QVBoxLayout* vl;
- QGridLayout* gl;
- QLabel* lbl;
+ TQHBoxLayout* hl;
+ TQVBoxLayout* vl;
+ TQGridLayout* gl;
+ TQLabel* lbl;
Base::createTopWidgets( );
- lbl = new QLabel( i18n( "Fog type:" ), this );
- m_pFogTypeEdit = new QComboBox( this );
+ lbl = new TQLabel( i18n( "Fog type:" ), this );
+ m_pFogTypeEdit = new TQComboBox( this );
m_pFogTypeEdit->insertItem( i18n( "Constant" ) );
m_pFogTypeEdit->insertItem( i18n( "Ground" ) );
- hl = new QHBoxLayout( topLayout( ) );
+ hl = new TQHBoxLayout( topLayout( ) );
hl->addWidget( lbl );
hl->addWidget( m_pFogTypeEdit );
hl->addStretch( 1 );
- lbl = new QLabel( i18n( "Distance:" ), this );
+ lbl = new TQLabel( i18n( "Distance:" ), this );
m_pDistance = new PMFloatEdit( this );
- hl = new QHBoxLayout( topLayout( ) );
+ hl = new TQHBoxLayout( topLayout( ) );
hl->addWidget( lbl );
hl->addWidget( m_pDistance );
hl->addStretch( 1 );
- lbl = new QLabel( i18n( "Color:" ), this );
+ lbl = new TQLabel( i18n( "Color:" ), this );
m_pColor = new PMColorEdit( false, this );
- hl = new QHBoxLayout( topLayout( ) );
+ hl = new TQHBoxLayout( topLayout( ) );
hl->addWidget( lbl );
hl->addWidget( m_pColor );
hl->addStretch( 1 );
- m_pTurbulenceCheck = new QCheckBox( i18n( "Turbulence" ), this );
+ m_pTurbulenceCheck = new TQCheckBox( i18n( "Turbulence" ), this );
topLayout( )->addWidget( m_pTurbulenceCheck );
- m_pTurbulenceWidget = new QWidget( this );
- vl = new QVBoxLayout( m_pTurbulenceWidget, 0, KDialog::spacingHint( ) );
- hl = new QHBoxLayout( vl );
- lbl = new QLabel( i18n( "Value: " ), m_pTurbulenceWidget );
+ m_pTurbulenceWidget = new TQWidget( this );
+ vl = new TQVBoxLayout( m_pTurbulenceWidget, 0, KDialog::spacingHint( ) );
+ hl = new TQHBoxLayout( vl );
+ lbl = new TQLabel( i18n( "Value: " ), m_pTurbulenceWidget );
m_pTurbulenceVector = new PMVectorEdit( "x", "y", "z", m_pTurbulenceWidget);
hl->addWidget( lbl );
hl->addWidget( m_pTurbulenceVector );
hl->addStretch( 1 );
- hl = new QHBoxLayout( vl );
- gl = new QGridLayout( hl, 4, 2 );
- lbl = new QLabel( i18n( "Octaves:" ), m_pTurbulenceWidget );
+ hl = new TQHBoxLayout( vl );
+ gl = new TQGridLayout( hl, 4, 2 );
+ lbl = new TQLabel( i18n( "Octaves:" ), m_pTurbulenceWidget );
m_pOctaves = new PMIntEdit( m_pTurbulenceWidget );
gl->addWidget( lbl, 0, 0 );
gl->addWidget( m_pOctaves, 0, 1 );
- lbl = new QLabel( i18n( "Omega:" ), m_pTurbulenceWidget );
+ lbl = new TQLabel( i18n( "Omega:" ), m_pTurbulenceWidget );
m_pOmega = new PMFloatEdit( m_pTurbulenceWidget );
gl->addWidget( lbl, 1, 0 );
gl->addWidget( m_pOmega, 1, 1 );
- lbl = new QLabel( i18n( "Lambda:" ), m_pTurbulenceWidget );
+ lbl = new TQLabel( i18n( "Lambda:" ), m_pTurbulenceWidget );
m_pLambda = new PMFloatEdit( m_pTurbulenceWidget );
gl->addWidget( lbl, 2, 0 );
gl->addWidget( m_pLambda, 2, 1 );
- lbl = new QLabel( i18n( "Depth:" ), m_pTurbulenceWidget );
+ lbl = new TQLabel( i18n( "Depth:" ), m_pTurbulenceWidget );
m_pDepth = new PMFloatEdit( m_pTurbulenceWidget );
gl->addWidget( lbl, 3, 0 );
gl->addWidget( m_pDepth, 3, 1 );
hl->addStretch( 1 );
topLayout( )->addWidget( m_pTurbulenceWidget );
- hl = new QHBoxLayout( topLayout( ) );
- gl = new QGridLayout( hl, 2, 2 );
- m_pFogOffsetLabel = new QLabel( i18n( "Offset: " ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ gl = new TQGridLayout( hl, 2, 2 );
+ m_pFogOffsetLabel = new TQLabel( i18n( "Offset: " ), this );
m_pFogOffset = new PMFloatEdit( this );
- m_pFogAltLabel = new QLabel( i18n( "Altitude: " ), this );
+ m_pFogAltLabel = new TQLabel( i18n( "Altitude: " ), this );
m_pFogAlt = new PMFloatEdit( this );
gl->addWidget( m_pFogOffsetLabel, 0, 0 );
gl->addWidget( m_pFogOffset, 0, 1 );
@@ -112,24 +112,24 @@ void PMFogEdit::createTopWidgets( )
gl->addWidget( m_pFogAlt, 1, 1 );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- m_pUpLabel = new QLabel( i18n( "Up: " ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ m_pUpLabel = new TQLabel( i18n( "Up: " ), this );
m_pUp = new PMVectorEdit( "x", "y", "z", this );
hl->addWidget( m_pUpLabel );
hl->addWidget( m_pUp );
- connect( m_pFogTypeEdit, SIGNAL( activated( int ) ), SLOT( slotFogTypeChanged( int ) ) );
- connect( m_pDistance, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pColor, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pTurbulenceCheck, SIGNAL( clicked( ) ), SLOT( slotTurbulenceClicked( ) ) );
- connect( m_pTurbulenceVector, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pOctaves, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pOmega, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pLambda, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pDepth, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pFogOffset, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pFogAlt, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pUp, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pFogTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotFogTypeChanged( int ) ) );
+ connect( m_pDistance, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pColor, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pTurbulenceCheck, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotTurbulenceClicked( ) ) );
+ connect( m_pTurbulenceVector, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pOctaves, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pOmega, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pLambda, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pDepth, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pFogOffset, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pFogAlt, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pUp, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMFogEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmfogedit.h b/kpovmodeler/pmfogedit.h
index 880b578c..5a33cf95 100644
--- a/kpovmodeler/pmfogedit.h
+++ b/kpovmodeler/pmfogedit.h
@@ -31,10 +31,10 @@ class PMVectorEdit;
class PMFloatEdit;
class PMIntEdit;
class PMColorEdit;
-class QCheckBox;
-class QComboBox;
-class QWidget;
-class QLabel;
+class TQCheckBox;
+class TQComboBox;
+class TQWidget;
+class TQLabel;
/**
* Dialog edit class for @ref PMFog
@@ -47,7 +47,7 @@ public:
/**
* Creates a PMFogEdit with parent and name
*/
- PMFogEdit( QWidget* parent, const char* name = 0 );
+ PMFogEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -73,21 +73,21 @@ protected slots:
private:
PMFog* m_pDisplayedObject;
- QComboBox* m_pFogTypeEdit;
+ TQComboBox* m_pFogTypeEdit;
PMFloatEdit* m_pDistance;
PMColorEdit* m_pColor;
- QCheckBox* m_pTurbulenceCheck;
- QWidget* m_pTurbulenceWidget;
+ TQCheckBox* m_pTurbulenceCheck;
+ TQWidget* m_pTurbulenceWidget;
PMVectorEdit* m_pTurbulenceVector;
PMIntEdit* m_pOctaves;
PMFloatEdit* m_pOmega;
PMFloatEdit* m_pLambda;
PMFloatEdit* m_pDepth;
- QLabel* m_pFogOffsetLabel;
+ TQLabel* m_pFogOffsetLabel;
PMFloatEdit* m_pFogOffset;
- QLabel* m_pFogAltLabel;
+ TQLabel* m_pFogAltLabel;
PMFloatEdit* m_pFogAlt;
- QLabel* m_pUpLabel;
+ TQLabel* m_pUpLabel;
PMVectorEdit* m_pUp;
};
diff --git a/kpovmodeler/pmformulalabel.cpp b/kpovmodeler/pmformulalabel.cpp
index ac2e98d3..71ba62b6 100644
--- a/kpovmodeler/pmformulalabel.cpp
+++ b/kpovmodeler/pmformulalabel.cpp
@@ -18,36 +18,36 @@
#include "pmformulalabel.h"
#include "pmpolynomexponents.h"
-#include <qapplication.h>
-#include <qsimplerichtext.h>
-#include <qpainter.h>
+#include <tqapplication.h>
+#include <tqsimplerichtext.h>
+#include <tqpainter.h>
const int c_indent = 3;
const int c_dotSize = 3;
-QString PMFormulaLabel::s_xyz[3] =
+TQString PMFormulaLabel::s_xyz[3] =
{
- QString( "x" ), QString( "y" ), QString( "z" )
+ TQString( "x" ), TQString( "y" ), TQString( "z" )
};
-QString PMFormulaLabel::s_digit[10] =
+TQString PMFormulaLabel::s_digit[10] =
{
- QString( "0" ),
- QString( "1" ),
- QString( "2" ),
- QString( "3" ),
- QString( "4" ),
- QString( "5" ),
- QString( "6" ),
- QString( "7" ),
- QString( "8" ),
- QString( "9" )
+ TQString( "0" ),
+ TQString( "1" ),
+ TQString( "2" ),
+ TQString( "3" ),
+ TQString( "4" ),
+ TQString( "5" ),
+ TQString( "6" ),
+ TQString( "7" ),
+ TQString( "8" ),
+ TQString( "9" )
};
-QString PMFormulaLabel::s_nullString = QString( "= 0" );
+TQString PMFormulaLabel::s_nullString = TQString( "= 0" );
-PMFormulaLabel::PMFormulaLabel( const PMPolynomExponents& exp, QWidget* parent, const char* name )
- : QWidget( parent, name )
+PMFormulaLabel::PMFormulaLabel( const PMPolynomExponents& exp, TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
m_exponents[0] = exp.exponent( 0 );
m_exponents[1] = exp.exponent( 1 );
@@ -56,8 +56,8 @@ PMFormulaLabel::PMFormulaLabel( const PMPolynomExponents& exp, QWidget* parent,
calculateSizeHint( );
}
-PMFormulaLabel::PMFormulaLabel( int x, int y, int z, QWidget* parent, const char* name )
- : QWidget( parent, name )
+PMFormulaLabel::PMFormulaLabel( int x, int y, int z, TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
m_exponents[0] = x;
m_exponents[1] = y;
@@ -70,9 +70,9 @@ PMFormulaLabel::~PMFormulaLabel( )
{
}
-void PMFormulaLabel::drawContents( QPainter* p )
+void PMFormulaLabel::drawContents( TQPainter* p )
{
- QRect cr = rect( );
+ TQRect cr = rect( );
int i;
cr.setLeft( cr.left( ) + c_indent );
@@ -84,13 +84,13 @@ void PMFormulaLabel::drawContents( QPainter* p )
// draw dot
int center = ( cr.top( ) + cr.bottom( ) ) / 2;
int rad = c_dotSize / 2;
- p->setBrush( QBrush( colorGroup( ).text( ) ) );
+ p->setBrush( TQBrush( colorGroup( ).text( ) ) );
p->drawEllipse( cr.left( ), center - rad, c_dotSize, c_dotSize );
cr.setLeft( cr.left( ) + c_dotSize + c_indent );
- QFontMetrics m1( font( ) );
- QFont f2 = exponentFont( );
- QFontMetrics m2( f2 );
+ TQFontMetrics m1( font( ) );
+ TQFont f2 = exponentFont( );
+ TQFontMetrics m2( f2 );
int up = m1.height( ) / 2;
for( i = 0; i < 3; i++ )
@@ -115,9 +115,9 @@ void PMFormulaLabel::drawContents( QPainter* p )
}
}
-void PMFormulaLabel::paintEvent( QPaintEvent* ev )
+void PMFormulaLabel::paintEvent( TQPaintEvent* ev )
{
- QPainter paint( this );
+ TQPainter paint( this );
if( ev->rect( ).intersects( rect( ) ) )
{
paint.setClipRegion( ev->region( ).intersect( rect( ) ) );
@@ -129,12 +129,12 @@ void PMFormulaLabel::calculateSizeHint( )
{
int sum = m_exponents[0] + m_exponents[1] + m_exponents[2];
- QFontMetrics m1( font( ) );
+ TQFontMetrics m1( font( ) );
if( sum == 0 )
m_sizeHint.setWidth( m1.width( s_nullString ) );
else
{
- QFontMetrics m2( exponentFont( ) );
+ TQFontMetrics m2( exponentFont( ) );
int width = c_indent * 3 + c_dotSize;
int i;
for( i = 0; i < 3; i++ )
@@ -151,25 +151,25 @@ void PMFormulaLabel::calculateSizeHint( )
m_sizeHint.setHeight( m1.height( ) + 7 );
}
-QSize PMFormulaLabel::sizeHint( ) const
+TQSize PMFormulaLabel::sizeHint( ) const
{
return minimumSizeHint( );
}
-QSize PMFormulaLabel::minimumSizeHint( ) const
+TQSize PMFormulaLabel::minimumSizeHint( ) const
{
return m_sizeHint;
}
-void PMFormulaLabel::fontChange( const QFont& )
+void PMFormulaLabel::fontChange( const TQFont& )
{
calculateSizeHint( );
}
-QFont PMFormulaLabel::exponentFont( ) const
+TQFont PMFormulaLabel::exponentFont( ) const
{
- QFont small = font( );
+ TQFont small = font( );
int fs = small.pointSize( );
if( fs > 0 )
{
diff --git a/kpovmodeler/pmformulalabel.h b/kpovmodeler/pmformulalabel.h
index 329ba639..ee2cace5 100644
--- a/kpovmodeler/pmformulalabel.h
+++ b/kpovmodeler/pmformulalabel.h
@@ -23,12 +23,12 @@
#include <config.h>
#endif
-#include <qwidget.h>
+#include <tqwidget.h>
class PMPolynomExponents;
/**
- * QLabel with a rich text to display a polynom for the quadric,
+ * TQLabel with a rich text to display a polynom for the quadric,
* cubic, quartic and polynom objects.
*/
class PMFormulaLabel : public QWidget
@@ -37,33 +37,33 @@ public:
/**
* Displays the exponents of the @ref PMPolynomExponents
*/
- PMFormulaLabel( const PMPolynomExponents& exp, QWidget* parent, const char* name = 0 );
+ PMFormulaLabel( const PMPolynomExponents& exp, TQWidget* parent, const char* name = 0 );
/**
* Displays the given exponents
*/
- PMFormulaLabel( int x, int y, int z, QWidget* parent, const char* name = 0 );
+ PMFormulaLabel( int x, int y, int z, TQWidget* parent, const char* name = 0 );
/**
* Destructor
*/
~PMFormulaLabel( );
- virtual QSize sizeHint( ) const;
- virtual QSize minimumSizeHint( ) const;
+ virtual TQSize sizeHint( ) const;
+ virtual TQSize minimumSizeHint( ) const;
protected:
- virtual void drawContents( QPainter* p );
- virtual void paintEvent( QPaintEvent* e );
- virtual void fontChange( const QFont& oldFont );
+ virtual void drawContents( TQPainter* p );
+ virtual void paintEvent( TQPaintEvent* e );
+ virtual void fontChange( const TQFont& oldFont );
private:
- QFont exponentFont( ) const;
+ TQFont exponentFont( ) const;
void calculateSizeHint( );
- QSize m_sizeHint;
+ TQSize m_sizeHint;
int m_exponents[3];
- static QString s_xyz[3];
- static QString s_digit[10];
- static QString s_nullString;
+ static TQString s_xyz[3];
+ static TQString s_digit[10];
+ static TQString s_nullString;
};
#endif
diff --git a/kpovmodeler/pmglobalphotons.cpp b/kpovmodeler/pmglobalphotons.cpp
index 4a24855f..ddf32258 100644
--- a/kpovmodeler/pmglobalphotons.cpp
+++ b/kpovmodeler/pmglobalphotons.cpp
@@ -164,12 +164,12 @@ void PMGlobalPhotons::cleanUp( ) const
Base::cleanUp( );
}
-QString PMGlobalPhotons::description( ) const
+TQString PMGlobalPhotons::description( ) const
{
return i18n( "global photons" );
}
-void PMGlobalPhotons::serialize( QDomElement& e, QDomDocument& ) const
+void PMGlobalPhotons::serialize( TQDomElement& e, TQDomDocument& ) const
{
if( m_numberType == Spacing )
{
@@ -202,7 +202,7 @@ void PMGlobalPhotons::serialize( QDomElement& e, QDomDocument& ) const
void PMGlobalPhotons::readAttributes( const PMXMLHelper& h )
{
- QString str;
+ TQString str;
str = h.stringAttribute( "number_type", "spacing" );
if( str == "count" )
@@ -437,7 +437,7 @@ void PMGlobalPhotons::setRadiusMediaMulti( double rmm )
}
}
-PMDialogEditBase* PMGlobalPhotons::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMGlobalPhotons::editWidget( TQWidget* parent ) const
{
return new PMGlobalPhotonsEdit( parent );
}
diff --git a/kpovmodeler/pmglobalphotons.h b/kpovmodeler/pmglobalphotons.h
index b56cc6b1..549e6efc 100644
--- a/kpovmodeler/pmglobalphotons.h
+++ b/kpovmodeler/pmglobalphotons.h
@@ -52,7 +52,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMGlobalPhotons( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -60,19 +60,19 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMGlobalPhotonsEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmglobalphotons" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmglobalphotons" ); }
/**
* Returns the number type
diff --git a/kpovmodeler/pmglobalphotonsedit.cpp b/kpovmodeler/pmglobalphotonsedit.cpp
index e241f597..5a4a5572 100644
--- a/kpovmodeler/pmglobalphotonsedit.cpp
+++ b/kpovmodeler/pmglobalphotonsedit.cpp
@@ -20,16 +20,16 @@
#include "pmglobalphotons.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
#include <klocale.h>
#include <kdialog.h>
#include <kmessagebox.h>
-PMGlobalPhotonsEdit::PMGlobalPhotonsEdit( QWidget* parent, const char* name )
+PMGlobalPhotonsEdit::PMGlobalPhotonsEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -37,15 +37,15 @@ PMGlobalPhotonsEdit::PMGlobalPhotonsEdit( QWidget* parent, const char* name )
void PMGlobalPhotonsEdit::createTopWidgets( )
{
- QHBoxLayout* hl;
- QGridLayout* gl;
- QLabel* lbl;
+ TQHBoxLayout* hl;
+ TQGridLayout* gl;
+ TQLabel* lbl;
Base::createTopWidgets( );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "Photon numbers" ), this );
- m_pNumberType = new QComboBox( false, this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "Photon numbers" ), this );
+ m_pNumberType = new TQComboBox( false, this );
m_pNumberType->insertItem( i18n( "Spacing" ) );
m_pNumberType->insertItem( i18n( "Count" ) );
m_pSpacing = new PMFloatEdit( this );
@@ -58,128 +58,128 @@ void PMGlobalPhotonsEdit::createTopWidgets( )
hl->addWidget( m_pCount );
hl->addStretch( 1 );
- gl = new QGridLayout( topLayout( ), 2, 5 );
- lbl = new QLabel( i18n( "Gather" ), this );
+ gl = new TQGridLayout( topLayout( ), 2, 5 );
+ lbl = new TQLabel( i18n( "Gather" ), this );
gl->addWidget( lbl, 0, 0 );
- lbl = new QLabel( i18n( "Min:" ), this );
+ lbl = new TQLabel( i18n( "Min:" ), this );
gl->addWidget( lbl, 0, 1 );
m_pGatherMin = new PMIntEdit( this );
m_pGatherMin->setValidation( true, 0, false, 0 );
gl->addWidget( m_pGatherMin, 0, 2 );
- lbl = new QLabel( i18n( "Max:" ), this );
+ lbl = new TQLabel( i18n( "Max:" ), this );
gl->addWidget( lbl, 0, 3 );
m_pGatherMax = new PMIntEdit( this );
m_pGatherMax->setValidation( true, 0, false, 0 );
gl->addWidget( m_pGatherMax, 0, 4 );
- lbl = new QLabel( i18n( "Media" ), this );
+ lbl = new TQLabel( i18n( "Media" ), this );
gl->addWidget( lbl, 1, 0 );
- lbl = new QLabel( i18n( "Max stop:" ), this );
+ lbl = new TQLabel( i18n( "Max stop:" ), this );
gl->addWidget( lbl, 1, 1 );
m_pMediaMaxSteps = new PMIntEdit( this );
m_pMediaMaxSteps->setValidation( true, 0, false, 0 );
gl->addWidget( m_pMediaMaxSteps, 1, 2 );
- lbl = new QLabel( i18n( "Factor:" ), this );
+ lbl = new TQLabel( i18n( "Factor:" ), this );
gl->addWidget( lbl,1, 3 );
m_pMediaFactor = new PMFloatEdit( this );
m_pMediaFactor->setValidation( true, 0, false, 0 );
gl->addWidget( m_pMediaFactor, 1, 4 );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "Jitter:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "Jitter:" ), this );
m_pJitter = new PMFloatEdit( this );
m_pJitter->setValidation ( true, 0, false, 0 );
hl->addWidget( lbl );
hl->addWidget( m_pJitter );
hl->addStretch( 1 );
- gl = new QGridLayout( topLayout( ), 2, 3 );
- lbl = new QLabel( i18n( "Max trace level:" ), this );
+ gl = new TQGridLayout( topLayout( ), 2, 3 );
+ lbl = new TQLabel( i18n( "Max trace level:" ), this );
m_pMaxTraceLevel = new PMIntEdit ( this );
m_pMaxTraceLevel->setValidation( true, 0, false, 0 );
- m_pMaxTraceLevelGlobal = new QCheckBox( i18n( "Use global" ), this );
+ m_pMaxTraceLevelGlobal = new TQCheckBox( i18n( "Use global" ), this );
gl->addWidget( lbl, 0, 0 );
gl->addWidget( m_pMaxTraceLevel, 0, 1 );
gl->addWidget( m_pMaxTraceLevelGlobal, 0, 2 );
- lbl = new QLabel( i18n( "Adc bailout:" ), this );
+ lbl = new TQLabel( i18n( "Adc bailout:" ), this );
m_pAdcBailout = new PMFloatEdit ( this );
m_pAdcBailout->setValidation( true, 0, true, 1 );
- m_pAdcBailoutGlobal = new QCheckBox( i18n( "Use global" ), this );
+ m_pAdcBailoutGlobal = new TQCheckBox( i18n( "Use global" ), this );
gl->addWidget( lbl, 1, 0 );
gl->addWidget( m_pAdcBailout, 1, 1 );
gl->addWidget( m_pAdcBailoutGlobal, 1, 2 );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "Autostop:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "Autostop:" ), this );
m_pAutostop = new PMFloatEdit ( this );
m_pAutostop->setValidation( true, 0, true, 1 );
hl->addWidget( lbl );
hl->addWidget( m_pAutostop );
hl->addStretch( 1 );
- gl = new QGridLayout( topLayout( ), 3, 5 );
- lbl = new QLabel( i18n( "Expand" ), this );
+ gl = new TQGridLayout( topLayout( ), 3, 5 );
+ lbl = new TQLabel( i18n( "Expand" ), this );
gl->addWidget( lbl, 0, 0 );
- lbl = new QLabel( i18n( "Increase:" ), this );
+ lbl = new TQLabel( i18n( "Increase:" ), this );
gl->addWidget( lbl, 0, 1 );
m_pExpandIncrease = new PMFloatEdit( this );
m_pExpandIncrease->setValidation( true, 0, true, 1 );
gl->addWidget( m_pExpandIncrease, 0, 2 );
- lbl = new QLabel( i18n( "Minimum:" ), this );
+ lbl = new TQLabel( i18n( "Minimum:" ), this );
gl->addWidget( lbl, 0, 3 );
m_pExpandMin = new PMIntEdit( this );
m_pExpandMin->setValidation( true, 0, false, 0 );
gl->addWidget( m_pExpandMin, 0, 4 );
- lbl = new QLabel( i18n( "Gather" ), this );
+ lbl = new TQLabel( i18n( "Gather" ), this );
gl->addWidget( lbl, 1, 0 );
- lbl = new QLabel( i18n( "Radius:" ), this );
+ lbl = new TQLabel( i18n( "Radius:" ), this );
gl->addWidget( lbl, 1, 1 );
m_pRadiusGather = new PMFloatEdit( this );
m_pRadiusGather->setValidation( true, 0, false, 0 );
gl->addWidget( m_pRadiusGather, 1, 2 );
- lbl = new QLabel( i18n( "Multiplier:" ), this );
+ lbl = new TQLabel( i18n( "Multiplier:" ), this );
gl->addWidget( lbl, 1, 3 );
m_pRadiusGatherMulti = new PMFloatEdit( this );
m_pRadiusGatherMulti->setValidation( true, 0, false, 0 );
gl->addWidget( m_pRadiusGatherMulti, 1, 4 );
- lbl = new QLabel( i18n( "Media" ), this );
+ lbl = new TQLabel( i18n( "Media" ), this );
gl->addWidget( lbl, 2, 0 );
- lbl = new QLabel( i18n( "Radius:" ), this );
+ lbl = new TQLabel( i18n( "Radius:" ), this );
gl->addWidget( lbl, 2, 1 );
m_pRadiusMedia = new PMFloatEdit( this );
m_pRadiusMedia->setValidation( true, 0, false, 0 );
gl->addWidget( m_pRadiusMedia, 2, 2 );
- lbl = new QLabel( i18n( "Multiplier:" ), this );
+ lbl = new TQLabel( i18n( "Multiplier:" ), this );
gl->addWidget( lbl, 2, 3 );
m_pRadiusMediaMulti = new PMFloatEdit( this );
m_pRadiusMediaMulti->setValidation( true, 0, false, 0 );
gl->addWidget( m_pRadiusMediaMulti, 2, 4 );
- connect( m_pNumberType, SIGNAL( activated( int ) ),
- SLOT( slotNumberTypeActivated( int ) ) );
- connect( m_pSpacing, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pCount, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pGatherMin, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pGatherMax, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pMediaMaxSteps, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pMediaFactor, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pJitter, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pMaxTraceLevelGlobal, SIGNAL( clicked( ) ),
- SLOT( slotMaxTraceLevelGlobalClicked( ) ) );
- connect( m_pMaxTraceLevel, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pAdcBailoutGlobal, SIGNAL( clicked( ) ),
- SLOT( slotAdcBailoutGlobalClicked( ) ) );
- connect( m_pAdcBailout, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pAutostop, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pExpandIncrease, SIGNAL( dataChanged( ) ), SIGNAL ( dataChanged( ) ) );
- connect( m_pExpandMin, SIGNAL( dataChanged( ) ), SIGNAL ( dataChanged( ) ) );
- connect( m_pRadiusGather, SIGNAL( dataChanged( ) ), SIGNAL ( dataChanged( ) ) );
- connect( m_pRadiusGatherMulti, SIGNAL( dataChanged( ) ), SIGNAL ( dataChanged( ) ) );
- connect( m_pRadiusMedia, SIGNAL( dataChanged( ) ), SIGNAL ( dataChanged( ) ) );
- connect( m_pRadiusMediaMulti, SIGNAL( dataChanged( ) ), SIGNAL ( dataChanged( ) ) );
+ connect( m_pNumberType, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotNumberTypeActivated( int ) ) );
+ connect( m_pSpacing, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pCount, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pGatherMin, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pGatherMax, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pMediaMaxSteps, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pMediaFactor, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pJitter, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pMaxTraceLevelGlobal, TQT_SIGNAL( clicked( ) ),
+ TQT_SLOT( slotMaxTraceLevelGlobalClicked( ) ) );
+ connect( m_pMaxTraceLevel, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pAdcBailoutGlobal, TQT_SIGNAL( clicked( ) ),
+ TQT_SLOT( slotAdcBailoutGlobalClicked( ) ) );
+ connect( m_pAdcBailout, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pAutostop, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pExpandIncrease, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL ( dataChanged( ) ) );
+ connect( m_pExpandMin, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL ( dataChanged( ) ) );
+ connect( m_pRadiusGather, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL ( dataChanged( ) ) );
+ connect( m_pRadiusGatherMulti, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL ( dataChanged( ) ) );
+ connect( m_pRadiusMedia, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL ( dataChanged( ) ) );
+ connect( m_pRadiusMediaMulti, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL ( dataChanged( ) ) );
}
void PMGlobalPhotonsEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmglobalphotonsedit.h b/kpovmodeler/pmglobalphotonsedit.h
index ec06f749..e2ae8f7b 100644
--- a/kpovmodeler/pmglobalphotonsedit.h
+++ b/kpovmodeler/pmglobalphotonsedit.h
@@ -29,8 +29,8 @@
class PMGlobalPhotons;
class PMFloatEdit;
class PMIntEdit;
-class QComboBox;
-class QCheckBox;
+class TQComboBox;
+class TQCheckBox;
/**
* Dialog edit class for @ref PMGlobalPhotons.
@@ -43,7 +43,7 @@ public:
/**
* Creates a PMGlobalPhotonsEdit with parent and name
*/
- PMGlobalPhotonsEdit( QWidget* parent, const char* name = 0 );
+ PMGlobalPhotonsEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -73,7 +73,7 @@ protected slots:
private:
PMGlobalPhotons* m_pDisplayedObject;
- QComboBox* m_pNumberType;
+ TQComboBox* m_pNumberType;
PMFloatEdit* m_pSpacing;
PMIntEdit* m_pCount;
PMIntEdit* m_pGatherMin;
@@ -81,9 +81,9 @@ private:
PMIntEdit* m_pMediaMaxSteps;
PMFloatEdit* m_pMediaFactor;
PMFloatEdit* m_pJitter;
- QCheckBox* m_pMaxTraceLevelGlobal;
+ TQCheckBox* m_pMaxTraceLevelGlobal;
PMIntEdit* m_pMaxTraceLevel;
- QCheckBox* m_pAdcBailoutGlobal;
+ TQCheckBox* m_pAdcBailoutGlobal;
PMFloatEdit* m_pAdcBailout;
PMFloatEdit* m_pAutostop;
PMFloatEdit* m_pExpandIncrease;
diff --git a/kpovmodeler/pmglobals.h b/kpovmodeler/pmglobals.h
index 0a50b2b6..4e59547c 100644
--- a/kpovmodeler/pmglobals.h
+++ b/kpovmodeler/pmglobals.h
@@ -19,8 +19,8 @@
#define PMGLOBALS_H
#ifdef PMEnableSimpleProfiling
-#include <qdatetime.h>
-extern QTime PMDebugTime;
+#include <tqdatetime.h>
+extern TQTime PMDebugTime;
#endif
#define PMArea 0 // no area for debug messages yet
diff --git a/kpovmodeler/pmglobalsettings.cpp b/kpovmodeler/pmglobalsettings.cpp
index a4740378..efa7db36 100644
--- a/kpovmodeler/pmglobalsettings.cpp
+++ b/kpovmodeler/pmglobalsettings.cpp
@@ -168,12 +168,12 @@ void PMGlobalSettings::cleanUp( ) const
Base::cleanUp( );
}
-QString PMGlobalSettings::description( ) const
+TQString PMGlobalSettings::description( ) const
{
return i18n( "global settings" );
}
-void PMGlobalSettings::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMGlobalSettings::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "adc_bailout", m_adcBailout );
e.setAttribute( "ambient_light", m_ambientLight.serializeXML( ) );
@@ -211,7 +211,7 @@ void PMGlobalSettings::serialize( QDomElement& e, QDomDocument& doc ) const
void PMGlobalSettings::readAttributes( const PMXMLHelper& h )
{
- QString str;
+ TQString str;
m_adcBailout = h.doubleAttribute( "adc_bailout", adcBailoutDefault );
m_ambientLight = h.colorAttribute( "ambient_light", ambientLightDefault );
@@ -432,7 +432,7 @@ void PMGlobalSettings::setRecursionLimit( int c )
}
}
-PMDialogEditBase* PMGlobalSettings::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMGlobalSettings::editWidget( TQWidget* parent ) const
{
return new PMGlobalSettingsEdit( parent );
}
diff --git a/kpovmodeler/pmglobalsettings.h b/kpovmodeler/pmglobalsettings.h
index e552293e..a95f86d7 100644
--- a/kpovmodeler/pmglobalsettings.h
+++ b/kpovmodeler/pmglobalsettings.h
@@ -53,7 +53,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMGlobalSettings( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -61,19 +61,19 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMGlobalSettingsEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmglobalsettings" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmglobalsettings" ); }
/**
* Returns the adc bailout
diff --git a/kpovmodeler/pmglobalsettingsedit.cpp b/kpovmodeler/pmglobalsettingsedit.cpp
index 8a297738..7c8eddad 100644
--- a/kpovmodeler/pmglobalsettingsedit.cpp
+++ b/kpovmodeler/pmglobalsettingsedit.cpp
@@ -21,15 +21,15 @@
#include "pmlineedits.h"
#include "pmcoloredit.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
#include <klocale.h>
#include <kdialog.h>
#include <kmessagebox.h>
-PMGlobalSettingsEdit::PMGlobalSettingsEdit( QWidget* parent, const char* name )
+PMGlobalSettingsEdit::PMGlobalSettingsEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -37,58 +37,58 @@ PMGlobalSettingsEdit::PMGlobalSettingsEdit( QWidget* parent, const char* name )
void PMGlobalSettingsEdit::createTopWidgets( )
{
- QHBoxLayout* hl;
- QLabel* lbl;
+ TQHBoxLayout* hl;
+ TQLabel* lbl;
Base::createTopWidgets( );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "Adc bailout:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "Adc bailout:" ), this );
m_pAdcBailoutEdit = new PMFloatEdit( this );
hl->addWidget( lbl );
hl->addWidget( m_pAdcBailoutEdit );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "Ambient light:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "Ambient light:" ), this );
m_pAmbientLightEdit = new PMColorEdit( false, this );
topLayout( )->addWidget( lbl );
topLayout( )->addWidget( m_pAmbientLightEdit );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "Assumed gamma:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "Assumed gamma:" ), this );
m_pAssumedGammaEdit = new PMFloatEdit( this );
hl->addWidget( lbl );
hl->addWidget( m_pAssumedGammaEdit );
hl->addStretch( 1 );
- m_pHfGray16Edit = new QCheckBox( i18n( "Hf gray 16" ), this );
+ m_pHfGray16Edit = new TQCheckBox( i18n( "Hf gray 16" ), this );
topLayout( )->addWidget( m_pHfGray16Edit );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "Iridiscence wave length:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "Iridiscence wave length:" ), this );
m_pIridWaveLengthEdit = new PMColorEdit( false, this );
topLayout( )->addWidget( lbl );
topLayout( )->addWidget( m_pIridWaveLengthEdit );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- QGridLayout* layout = new QGridLayout( hl, 4, 2 );
- lbl = new QLabel( i18n( "Maximum intersections:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ TQGridLayout* layout = 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 );
- lbl = new QLabel( i18n( "Maximum trace level:" ), this );
+ lbl = new TQLabel( i18n( "Maximum trace level:" ), this );
m_pMaxTraceLevelEdit = new PMIntEdit( this );
layout->addWidget( lbl, 1, 0 );
layout->addWidget( m_pMaxTraceLevelEdit, 1, 1 );
- lbl = new QLabel( i18n( "Number of waves:" ), this );
+ lbl = new TQLabel( i18n( "Number of waves:" ), this );
m_pNumberWavesEdit = new PMIntEdit( this );
layout->addWidget( lbl, 2, 0 );
layout->addWidget( m_pNumberWavesEdit, 2, 1 );
- lbl = new QLabel( i18n( "Noise generator:" ), this );
- m_pNoiseGeneratorEdit = new QComboBox( false, this );
+ 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" ) );
@@ -96,45 +96,45 @@ void PMGlobalSettingsEdit::createTopWidgets( )
layout->addWidget( m_pNoiseGeneratorEdit, 3, 1 );
hl->addStretch( 1 );
- m_pRadiosityEdit = new QCheckBox( i18n( "Radiosity (Povray 3.1)" ), this );
+ m_pRadiosityEdit = new TQCheckBox( i18n( "Radiosity (Povray 3.1)" ), this );
topLayout( )->addWidget( m_pRadiosityEdit );
- m_pRadiosityWidget = new QWidget( this );
- hl = new QHBoxLayout( m_pRadiosityWidget, 0, KDialog::spacingHint( ) );
- layout = new QGridLayout( hl, 7, 2 );
- lbl = new QLabel( i18n( "Brightness:" ), m_pRadiosityWidget );
+ m_pRadiosityWidget = new TQWidget( this );
+ hl = new TQHBoxLayout( m_pRadiosityWidget, 0, KDialog::spacingHint( ) );
+ layout = 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 );
- lbl = new QLabel( i18n( "Count:" ), m_pRadiosityWidget );
+ lbl = new TQLabel( i18n( "Count:" ), m_pRadiosityWidget );
m_pCountEdit = new PMIntEdit( m_pRadiosityWidget );
layout->addWidget( lbl, 1, 0 );
layout->addWidget( m_pCountEdit, 1, 1 );
- lbl = new QLabel( i18n( "Maximum distance:" ), m_pRadiosityWidget );
+ 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 );
- lbl = new QLabel( i18n( "Error boundary:" ), m_pRadiosityWidget );
+ 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 );
- lbl = new QLabel( i18n( "Gray threshold:" ), m_pRadiosityWidget );
+ 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 );
- lbl = new QLabel( i18n( "Low error factor:" ), m_pRadiosityWidget );
+ 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 );
- lbl = new QLabel( i18n( "Minimum reuse:" ), m_pRadiosityWidget );
+ 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 );
- lbl = new QLabel( i18n( "Nearest count:" ), m_pRadiosityWidget );
+ 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 );
- lbl = new QLabel( i18n( "Recursion limit:" ), m_pRadiosityWidget );
+ 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 );
@@ -142,25 +142,25 @@ void PMGlobalSettingsEdit::createTopWidgets( )
topLayout( )->addWidget( m_pRadiosityWidget );
- connect( m_pAdcBailoutEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pAmbientLightEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pAssumedGammaEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pHfGray16Edit, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pIridWaveLengthEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pMaxIntersectionsEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pMaxTraceLevelEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pNumberWavesEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pNoiseGeneratorEdit, SIGNAL( activated( int ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pRadiosityEdit, SIGNAL( clicked( ) ), SLOT( slotRadiosityClicked( ) ) );
- connect( m_pBrightnessEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pCountEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pDistanceMaximumEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pErrorBoundEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pGrayThresholdEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pLowErrorFactorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pMinimumReuseEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pNearestCountEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pRecursionLimitEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pAdcBailoutEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pAmbientLightEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pAssumedGammaEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pHfGray16Edit, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pIridWaveLengthEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pMaxIntersectionsEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pMaxTraceLevelEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pNumberWavesEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pNoiseGeneratorEdit, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pRadiosityEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRadiosityClicked( ) ) );
+ connect( m_pBrightnessEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pCountEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pDistanceMaximumEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pErrorBoundEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pGrayThresholdEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pLowErrorFactorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pMinimumReuseEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pNearestCountEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pRecursionLimitEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMGlobalSettingsEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmglobalsettingsedit.h b/kpovmodeler/pmglobalsettingsedit.h
index 2a439617..df0f99b0 100644
--- a/kpovmodeler/pmglobalsettingsedit.h
+++ b/kpovmodeler/pmglobalsettingsedit.h
@@ -30,8 +30,8 @@ class PMGlobalSettings;
class PMColorEdit;
class PMFloatEdit;
class PMIntEdit;
-class QCheckBox;
-class QComboBox;
+class TQCheckBox;
+class TQComboBox;
/**
* Dialog edit class for @ref PMGlobalSettings.
@@ -44,7 +44,7 @@ public:
/**
* Creates a PMGlobalSettingsEdit with parent and name
*/
- PMGlobalSettingsEdit( QWidget* parent, const char* name = 0 );
+ PMGlobalSettingsEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -70,14 +70,14 @@ private:
PMFloatEdit* m_pAdcBailoutEdit;
PMColorEdit* m_pAmbientLightEdit;
PMFloatEdit* m_pAssumedGammaEdit;
- QCheckBox* m_pHfGray16Edit;
+ TQCheckBox* m_pHfGray16Edit;
PMColorEdit* m_pIridWaveLengthEdit;
PMIntEdit* m_pMaxIntersectionsEdit;
PMIntEdit* m_pMaxTraceLevelEdit;
PMIntEdit* m_pNumberWavesEdit;
- QComboBox* m_pNoiseGeneratorEdit;
- QCheckBox* m_pRadiosityEdit;
- QWidget* m_pRadiosityWidget;
+ TQComboBox* m_pNoiseGeneratorEdit;
+ TQCheckBox* m_pRadiosityEdit;
+ TQWidget* m_pRadiosityWidget;
PMFloatEdit* m_pBrightnessEdit;
PMIntEdit* m_pCountEdit;
PMFloatEdit* m_pDistanceMaximumEdit;
diff --git a/kpovmodeler/pmglview.cpp b/kpovmodeler/pmglview.cpp
index 43102de9..e4a53088 100644
--- a/kpovmodeler/pmglview.cpp
+++ b/kpovmodeler/pmglview.cpp
@@ -25,16 +25,16 @@
#include "pmdefaults.h"
#include <math.h>
-#include <qpopupmenu.h>
-#include <qpainter.h>
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qcolor.h>
-#include <qglobal.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qdom.h>
+#include <tqpopupmenu.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqcolor.h>
+#include <tqglobal.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqdom.h>
#include <kxmlguifactory.h>
#include <kaction.h>
@@ -106,7 +106,7 @@ bool PMGLView::s_bDirect = true;
PMGLView::PMGLView( PMPart* part, PMViewType t,
- QWidget* parent, const char* name, WFlags f )
+ TQWidget* parent, const char* name, WFlags f )
: PMViewBase( parent, name, f | Qt::WWinOwnDC | Qt::WRepaintNoErase )
{
m_pPart = part;
@@ -150,33 +150,33 @@ PMGLView::PMGLView( PMPart* part, PMViewType t,
setMinimumSize( 50, 50 );
- connect( part, SIGNAL( refresh( ) ), SLOT( slotRefresh( ) ) );
- connect( part, SIGNAL( clear( ) ), SLOT( slotClear( ) ) );
+ connect( part, TQT_SIGNAL( refresh( ) ), TQT_SLOT( slotRefresh( ) ) );
+ connect( part, TQT_SIGNAL( clear( ) ), TQT_SLOT( slotClear( ) ) );
- connect( this, SIGNAL( objectChanged( PMObject*, const int, QObject* ) ),
- part, SLOT( slotObjectChanged( PMObject*, const int, QObject* ) ) );
- connect( part, SIGNAL( objectChanged( PMObject*, const int, QObject* ) ),
- SLOT( slotObjectChanged( PMObject*, const int, QObject* ) ) );
+ connect( this, TQT_SIGNAL( objectChanged( PMObject*, const int, TQObject* ) ),
+ part, TQT_SLOT( slotObjectChanged( PMObject*, const int, TQObject* ) ) );
+ connect( part, TQT_SIGNAL( objectChanged( PMObject*, const int, TQObject* ) ),
+ TQT_SLOT( slotObjectChanged( PMObject*, const int, TQObject* ) ) );
- connect( part, SIGNAL( activeRenderModeChanged( ) ),
- SLOT( slotActiveRenderModeChanged( ) ) );
+ connect( part, TQT_SIGNAL( activeRenderModeChanged( ) ),
+ TQT_SLOT( slotActiveRenderModeChanged( ) ) );
- connect( &m_startTimer, SIGNAL( timeout( ) ),
- SLOT( slotMouseChangeTimer( ) ) );
- connect( &m_autoScrollTimer, SIGNAL( timeout( ) ),
- SLOT( slotAutoScroll( ) ) );
+ connect( &m_startTimer, TQT_SIGNAL( timeout( ) ),
+ TQT_SLOT( slotMouseChangeTimer( ) ) );
+ connect( &m_autoScrollTimer, TQT_SIGNAL( timeout( ) ),
+ TQT_SLOT( slotAutoScroll( ) ) );
- connect( rm, SIGNAL( renderingStarted( PMGLView* ) ),
- SLOT( slotRenderingStarted( PMGLView* ) ) );
- connect( rm, SIGNAL( aboutToUpdate( PMGLView* ) ),
- SLOT( slotAboutToUpdate( PMGLView* ) ) );
- connect( rm, SIGNAL( renderingFinished( PMGLView* ) ),
- SLOT( slotRenderingFinished( PMGLView* ) ) );
- connect( rm, SIGNAL( renderingSettingsChanged( ) ),
- SLOT( slotRefresh( ) ) );
+ connect( rm, TQT_SIGNAL( renderingStarted( PMGLView* ) ),
+ TQT_SLOT( slotRenderingStarted( PMGLView* ) ) );
+ connect( rm, TQT_SIGNAL( aboutToUpdate( PMGLView* ) ),
+ TQT_SLOT( slotAboutToUpdate( PMGLView* ) ) );
+ connect( rm, TQT_SIGNAL( renderingFinished( PMGLView* ) ),
+ TQT_SLOT( slotRenderingFinished( PMGLView* ) ) );
+ connect( rm, TQT_SIGNAL( renderingSettingsChanged( ) ),
+ TQT_SLOT( slotRefresh( ) ) );
- connect( this, SIGNAL( controlPointMessage( const QString& ) ),
- m_pPart, SIGNAL( controlPointMessage( const QString& ) ) );
+ connect( this, TQT_SIGNAL( controlPointMessage( const TQString& ) ),
+ m_pPart, TQT_SIGNAL( controlPointMessage( const TQString& ) ) );
updateControlPoints( );
}
@@ -206,10 +206,10 @@ void PMGLView::initializeGL( )
// check if we can use the global colormap
// should be the default ?
if( vi->visualid ==
- XVisualIDFromVisual( ( Visual* ) QPaintDevice::x11AppVisual( ) ) )
+ XVisualIDFromVisual( ( Visual* ) TQPaintDevice::x11AppVisual( ) ) )
{
kdDebug( PMArea ) << "PMGLView: Default colormap used\n";
- s_pSharedData->m_colormap = QPaintDevice::x11AppColormap();
+ s_pSharedData->m_colormap = TQPaintDevice::x11AppColormap();
s_pSharedData->m_colormapAllocated = false;
}
@@ -312,7 +312,7 @@ void PMGLView::initializeGL( )
Window p;
p = RootWindow( display, vi->screen );
- QWidget* pw = parentWidget( );
+ TQWidget* pw = parentWidget( );
if( pw )
p = pw->winId( );
@@ -365,8 +365,8 @@ void PMGLView::initializeGL( )
}
else
{
- QVBoxLayout* topLayout = new QVBoxLayout( this );
- QLabel* label = new QLabel( i18n( "No OpenGL support" ), this );
+ TQVBoxLayout* topLayout = new TQVBoxLayout( this );
+ TQLabel* label = new TQLabel( i18n( "No OpenGL support" ), this );
label->setAlignment( Qt::AlignCenter );
topLayout->addWidget( label );
}
@@ -424,12 +424,12 @@ void PMGLView::setTranslationY( double d )
invalidateProjection( );
}
-void PMGLView::resizeEvent( QResizeEvent* )
+void PMGLView::resizeEvent( TQResizeEvent* )
{
invalidateProjection( );
}
-void PMGLView::paintEvent( QPaintEvent* )
+void PMGLView::paintEvent( TQPaintEvent* )
{
repaint( );
}
@@ -503,7 +503,7 @@ void PMGLView::enableScaleMode( bool yes )
}
}
-void PMGLView::mousePressEvent( QMouseEvent* e )
+void PMGLView::mousePressEvent( TQMouseEvent* e )
{
if( m_bScaleMode || m_bTranslateMode )
{
@@ -550,7 +550,7 @@ void PMGLView::mousePressEvent( QMouseEvent* e )
m_bGraphicalChangeMode = true;
m_bMementoCreated = false;
m_changeStartPos = e->pos( );
- m_changeStartTime = QTime::currentTime( );
+ m_changeStartTime = TQTime::currentTime( );
m_currentMousePos = m_changeStartPos;
m_startTimer.start( c_mouseChangeDelayMs, true );
}
@@ -606,7 +606,7 @@ void PMGLView::mousePressEvent( QMouseEvent* e )
}
}
-void PMGLView::mouseReleaseEvent( QMouseEvent* e )
+void PMGLView::mouseReleaseEvent( TQMouseEvent* e )
{
m_bMousePressed = false;
if( m_bGraphicalChangeMode )
@@ -640,7 +640,7 @@ void PMGLView::mouseReleaseEvent( QMouseEvent* e )
{
int sx, sy, ex, ey, w, h;
double isx, isy, iex, iey;
- QPtrListIterator<PMVector> pit( m_controlPointsPosition );
+ TQPtrListIterator<PMVector> pit( m_controlPointsPosition );
PMControlPointListIterator cit( m_controlPoints );
PMVector p;
@@ -677,14 +677,14 @@ void PMGLView::mouseReleaseEvent( QMouseEvent* e )
m_autoScrollTimer.stop( );
}
- if( e->button( ) & QEvent::MidButton )
+ if( e->button( ) & TQEvent::MidButton )
m_bMidMousePressed = false;
m_bSelectUnderMouse = false;
m_bDeselectUnderMouse = false;
}
-void PMGLView::mouseMoveEvent( QMouseEvent* e )
+void PMGLView::mouseMoveEvent( TQMouseEvent* e )
{
if( m_bMousePressed )
{
@@ -722,8 +722,8 @@ void PMGLView::mouseMoveEvent( QMouseEvent* e )
m_currentMousePos = e->pos( );
if( !m_bMementoCreated )
{
- QPoint movement = e->pos( ) - m_changeStartPos;
- if( ( m_changeStartTime.msecsTo( QTime::currentTime( ) ) > c_mouseChangeDelayMs )
+ TQPoint movement = e->pos( ) - m_changeStartPos;
+ if( ( m_changeStartTime.msecsTo( TQTime::currentTime( ) ) > c_mouseChangeDelayMs )
|| ( movement.manhattanLength( ) > c_mouseChangeDelayPixel ) )
{
m_startTimer.stop( );
@@ -780,7 +780,7 @@ void PMGLView::mouseMoveEvent( QMouseEvent* e )
if( m_bAutoScroll && !as )
{
- m_lastAutoScrollUpdate = QTime::currentTime( );
+ m_lastAutoScrollUpdate = TQTime::currentTime( );
m_autoScrollTimer.start( c_minAutoScrollUpdateTime, true );
}
if( !m_bAutoScroll && as )
@@ -788,7 +788,7 @@ void PMGLView::mouseMoveEvent( QMouseEvent* e )
}
}
-void PMGLView::wheelEvent( QWheelEvent* e )
+void PMGLView::wheelEvent( TQWheelEvent* e )
{
if( m_type != PMViewCamera )
{
@@ -803,7 +803,7 @@ void PMGLView::wheelEvent( QWheelEvent* e )
}
}
-void PMGLView::keyPressEvent( QKeyEvent* e )
+void PMGLView::keyPressEvent( TQKeyEvent* e )
{
bool accept = true;
@@ -867,7 +867,7 @@ void PMGLView::slotAutoScroll( )
{
if( m_bAutoScroll )
{
- QTime now = QTime::currentTime( );
+ TQTime now = TQTime::currentTime( );
int msecs = m_lastAutoScrollUpdate.msecsTo( now );
int pixels = ( int ) ( m_autoScrollSpeed * msecs / 1000.0 );
@@ -890,7 +890,7 @@ void PMGLView::slotAutoScroll( )
if( m_bGraphicalChangeMode )
if( m_bMultipleSelectionMode )
{
- m_selectionStart += QPoint( pixels * m_autoScrollDirectionX,
+ m_selectionStart += TQPoint( pixels * m_autoScrollDirectionX,
pixels * m_autoScrollDirectionY );
saveSelectionBox( );
@@ -898,7 +898,7 @@ void PMGLView::slotAutoScroll( )
}
if( m_bGraphicalChangeMode )
- graphicalChange( mapFromGlobal( QCursor::pos( ) ) );
+ graphicalChange( mapFromGlobal( TQCursor::pos( ) ) );
else
repaint( );
@@ -918,7 +918,7 @@ void PMGLView::slotMouseChangeTimer( )
}
}
-void PMGLView::startChange( const QPoint& mousePos )
+void PMGLView::startChange( const TQPoint& mousePos )
{
m_pActiveObject->createMemento( );
m_bMementoCreated = true;
@@ -937,7 +937,7 @@ void PMGLView::startChange( const QPoint& mousePos )
m_pUnderMouse->startChange( p, m_normal );
}
-void PMGLView::graphicalChange( const QPoint& mousePos )
+void PMGLView::graphicalChange( const TQPoint& mousePos )
{
PMVector p = mousePosition( m_pUnderMouse, mousePos.x( ), mousePos.y( ) );
p.transform( m_inversePointsTransformation );
@@ -1145,7 +1145,7 @@ void PMGLView::slotStopRendering( )
}
void PMGLView::slotObjectChanged( PMObject* obj, const int mode,
- QObject* sender )
+ TQObject* sender )
{
bool redraw = false;
@@ -1414,7 +1414,7 @@ void PMGLView::paintSelectionBox( )
{
int sx, sy, ex, ey, w, h;
calculateSelectionBox( sx, sy, ex, ey, w, h );
- QPainter p;
+ TQPainter p;
p.begin( this );
p.setPen( PMRenderManager::theManager( )->controlPointColor( 1 ) );
p.drawRect( sx, sy, w, h );
@@ -1484,7 +1484,7 @@ void PMGLView::slotRenderingFinished( PMGLView* view )
if( m_bAutoScroll )
{
- QTime now = QTime::currentTime( );
+ TQTime now = TQTime::currentTime( );
int msecs = m_lastAutoScrollUpdate.msecsTo( now );
if( msecs < c_minAutoScrollUpdateTime )
@@ -1495,9 +1495,9 @@ void PMGLView::slotRenderingFinished( PMGLView* view )
}
}
-QString PMGLView::viewTypeAsString( PMViewType t )
+TQString PMGLView::viewTypeAsString( PMViewType t )
{
- QString str;
+ TQString str;
switch( t )
{
@@ -1536,17 +1536,17 @@ void PMGLView::restoreConfig( KConfig* /*cfg*/ )
void PMGLView::contextMenu( )
{
- QPopupMenu* m = new QPopupMenu( );
- m->insertItem( i18n( "Left View" ), this, SLOT( slotSetTypePosX( ) ) );
- m->insertItem( i18n( "Right View" ), this, SLOT( slotSetTypeNegX( ) ) );
- m->insertItem( i18n( "Top View" ), this, SLOT( slotSetTypeNegY( ) ) );
- m->insertItem( i18n( "Bottom View" ), this, SLOT( slotSetTypePosY( ) ) );
- m->insertItem( i18n( "Front View" ), this, SLOT( slotSetTypePosZ( ) ) );
- m->insertItem( i18n( "Back View" ), this, SLOT( slotSetTypeNegZ( ) ) );
-
- QPopupMenu* cm = new QPopupMenu( m );
- QPtrListIterator<PMCamera> it = m_pPart->cameras( );
- QString name;
+ TQPopupMenu* m = new TQPopupMenu( );
+ m->insertItem( i18n( "Left View" ), this, TQT_SLOT( slotSetTypePosX( ) ) );
+ m->insertItem( i18n( "Right View" ), this, TQT_SLOT( slotSetTypeNegX( ) ) );
+ m->insertItem( i18n( "Top View" ), this, TQT_SLOT( slotSetTypeNegY( ) ) );
+ m->insertItem( i18n( "Bottom View" ), this, TQT_SLOT( slotSetTypePosY( ) ) );
+ m->insertItem( i18n( "Front View" ), this, TQT_SLOT( slotSetTypePosZ( ) ) );
+ m->insertItem( i18n( "Back View" ), this, TQT_SLOT( slotSetTypeNegZ( ) ) );
+
+ TQPopupMenu* cm = new TQPopupMenu( m );
+ TQPtrListIterator<PMCamera> it = m_pPart->cameras( );
+ TQString name;
if( !it.current( ) )
cm->insertItem( i18n( "No Cameras" ) );
else
@@ -1560,13 +1560,13 @@ void PMGLView::contextMenu( )
cm->insertItem( name, cnr );
}
}
- connect( cm, SIGNAL( activated( int ) ), SLOT( slotCameraView( int ) ) );
+ connect( cm, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotCameraView( int ) ) );
m->insertItem( SmallIconSet( "pmcamera" ), i18n( "Camera" ), cm );
m->insertSeparator( );
- m->insertItem( i18n( "Snap to Grid" ), this, SLOT( slotSnapToGrid( ) ) );
+ m->insertItem( i18n( "Snap to Grid" ), this, TQT_SLOT( slotSnapToGrid( ) ) );
m_objectActions.clear( );
if( m_pActiveObject )
{
@@ -1574,7 +1574,7 @@ void PMGLView::contextMenu( )
if( !m_objectActions.isEmpty( ) )
{
PMObjectAction* oa = 0;
- QPtrListIterator<PMObjectAction> ait( m_objectActions );
+ TQPtrListIterator<PMObjectAction> ait( m_objectActions );
for( ; ait.current( ); ++ait )
{
@@ -1583,11 +1583,11 @@ void PMGLView::contextMenu( )
}
}
}
- connect( m, SIGNAL( activated( int ) ), SLOT( slotObjectAction( int ) ) );
+ connect( m, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotObjectAction( int ) ) );
m->insertSeparator( );
- QPopupMenu* menu = new QPopupMenu( m );
+ TQPopupMenu* menu = new TQPopupMenu( m );
PMControlPointListIterator pit( m_controlPoints );
if( !pit.current( ) )
@@ -1598,18 +1598,18 @@ void PMGLView::contextMenu( )
for( ; pit.current( ); ++pit, ++cnr )
menu->insertItem( pit.current( )->description( ), cnr );
}
- connect( menu, SIGNAL( activated( int ) ), SLOT( slotControlPoint( int ) ) );
+ connect( menu, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotControlPoint( int ) ) );
m->insertItem( i18n( "Control Points" ), menu );
- m->exec( QCursor::pos( ) );
+ m->exec( TQCursor::pos( ) );
delete m;
}
void PMGLView::slotCameraView( int id )
{
int i;
- QPtrListIterator<PMCamera> it = m_pPart->cameras( );
+ TQPtrListIterator<PMCamera> it = m_pPart->cameras( );
for( i = 0; i < id; i++ )
++it;
@@ -1622,7 +1622,7 @@ void PMGLView::slotCameraView( int id )
void PMGLView::slotObjectAction( int id )
{
- QPtrListIterator<PMObjectAction> it( m_objectActions );
+ TQPtrListIterator<PMObjectAction> it( m_objectActions );
PMObjectAction* oa = 0;
for( ; it.current( ) && !oa; ++it )
@@ -1677,7 +1677,7 @@ void PMGLView::slotSnapToGrid( )
}
}
-QString PMGLView::description( ) const
+TQString PMGLView::description( ) const
{
return viewTypeAsString( m_type );
}
@@ -1700,9 +1700,9 @@ void PMGLView::saveViewConfig( PMViewOptions* vo ) const
}
}
-void PMGLViewOptions::loadData( QDomElement& e )
+void PMGLViewOptions::loadData( TQDomElement& e )
{
- QString s = e.attribute( "type", "Camera" );
+ TQString s = e.attribute( "type", "Camera" );
if( s == "Camera" ) m_glViewType = PMGLView::PMViewCamera;
else if( s == "X" ) m_glViewType = PMGLView::PMViewPosX;
else if( s == "Y" ) m_glViewType = PMGLView::PMViewPosY;
@@ -1712,7 +1712,7 @@ void PMGLViewOptions::loadData( QDomElement& e )
else if( s == "NegZ" ) m_glViewType = PMGLView::PMViewNegZ;
}
-void PMGLViewOptions::saveData( QDomElement& e )
+void PMGLViewOptions::saveData( TQDomElement& e )
{
switch( m_glViewType )
{
@@ -1744,12 +1744,12 @@ void PMGLViewOptions::saveData( QDomElement& e )
}
}
-QString PMGLViewFactory::description( ) const
+TQString PMGLViewFactory::description( ) const
{
return i18n( "3D View" );
}
-QString PMGLViewFactory::description( PMViewOptions* vo ) const
+TQString PMGLViewFactory::description( PMViewOptions* vo ) const
{
if( vo && vo->viewType( ) == "glview" )
{
@@ -1760,7 +1760,7 @@ QString PMGLViewFactory::description( PMViewOptions* vo ) const
return description( );
}
-PMViewOptionsWidget* PMGLViewFactory::newOptionsWidget( QWidget* parent,
+PMViewOptionsWidget* PMGLViewFactory::newOptionsWidget( TQWidget* parent,
PMViewOptions* o )
{
return new PMGLViewOptionsWidget( parent, o );
@@ -1772,17 +1772,17 @@ PMViewOptions* PMGLViewFactory::newOptionsInstance( ) const
return o;
}
-PMGLViewOptionsWidget::PMGLViewOptionsWidget( QWidget* parent,
+PMGLViewOptionsWidget::PMGLViewOptionsWidget( TQWidget* parent,
PMViewOptions* o )
: PMViewOptionsWidget( parent )
{
m_pOptions = ( PMGLViewOptions* ) o;
- QHBoxLayout* hl = new QHBoxLayout( this, 0, KDialog::spacingHint( ) );
- QLabel* l = new QLabel( i18n( "3D view type:" ), this );
+ TQHBoxLayout* hl = new TQHBoxLayout( this, 0, KDialog::spacingHint( ) );
+ TQLabel* l = new TQLabel( i18n( "3D view type:" ), this );
hl->addWidget( l );
- m_pGLViewType = new QComboBox( false, this );
+ m_pGLViewType = new TQComboBox( false, this );
m_pGLViewType->insertItem( i18n( "Top" ) );
m_pGLViewType->insertItem( i18n( "Bottom" ) );
m_pGLViewType->insertItem( i18n( "Left" ) );
@@ -1816,8 +1816,8 @@ PMGLViewOptionsWidget::PMGLViewOptionsWidget( QWidget* parent,
break;
}
- connect( m_pGLViewType, SIGNAL( activated( int ) ),
- SLOT( slotGLViewTypeChanged( int ) ) );
+ connect( m_pGLViewType, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotGLViewTypeChanged( int ) ) );
hl->addWidget( m_pGLViewType );
}
diff --git a/kpovmodeler/pmglview.h b/kpovmodeler/pmglview.h
index b33eeb2b..521d6911 100644
--- a/kpovmodeler/pmglview.h
+++ b/kpovmodeler/pmglview.h
@@ -24,11 +24,11 @@
#include <config.h>
#endif
-#include <qwidget.h>
-#include <qpoint.h>
-#include <qdatetime.h>
-#include <qtimer.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqpoint.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
+#include <tqpixmap.h>
#include "pmviewbase.h"
#include "pmviewfactory.h"
@@ -43,7 +43,7 @@ class PMObject;
class PMPart;
class PMCamera;
class KConfig;
-class QComboBox;
+class TQComboBox;
/**
* Widget for rendering the scene with OpenGL
@@ -61,16 +61,16 @@ public:
* Constructor
*/
PMGLView( PMPart* part, PMViewType t,
- QWidget* parent = 0, const char* name = 0, WFlags f = 0 );
+ TQWidget* parent = 0, const char* name = 0, WFlags f = 0 );
/**
* Destructor
*/
~PMGLView( );
/** */
- virtual QString viewType( ) const { return QString( "glview" ); }
+ virtual TQString viewType( ) const { return TQString( "glview" ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual void restoreViewConfig( PMViewOptions* );
/** */
@@ -122,7 +122,7 @@ public:
/**
* Returns the 2D control points position in the view
*/
- const QPtrList<PMVector>& controlPointsPosition( ) const
+ const TQPtrList<PMVector>& controlPointsPosition( ) const
{
return m_controlPointsPosition;
}
@@ -173,7 +173,7 @@ public:
/**
* Returns the view type as string
*/
- static QString viewTypeAsString( PMViewType t );
+ static TQString viewTypeAsString( PMViewType t );
/**
* Sets the direct rendering flag
*/
@@ -212,7 +212,7 @@ public slots:
* Called when an object is changed.
* @see PMPart::objectChanged( )
*/
- void slotObjectChanged( PMObject* obj, const int mode, QObject* sender );
+ void slotObjectChanged( PMObject* obj, const int mode, TQObject* sender );
/**
* Restarts rendering
*/
@@ -272,11 +272,11 @@ signals:
/**
* Emitted when an object is changed
*/
- void objectChanged( PMObject* obj, const int mode, QObject* sender );
+ void objectChanged( PMObject* obj, const int mode, TQObject* sender );
/**
* Emitted when the mouse is over a control point
*/
- void controlPointMessage( const QString& msg );
+ void controlPointMessage( const TQString& msg );
/**
* Emitted in the destructor
*/
@@ -284,7 +284,7 @@ signals:
/**
* Emitted when the view type changes
*/
- void viewTypeChanged( const QString& str );
+ void viewTypeChanged( const TQString& str );
protected:
/**
@@ -292,21 +292,21 @@ protected:
*/
virtual void initializeGL( );
/** */
- virtual void resizeEvent( QResizeEvent* e );
+ virtual void resizeEvent( TQResizeEvent* e );
/** */
- virtual void paintEvent( QPaintEvent* e );
+ virtual void paintEvent( TQPaintEvent* e );
/** */
- virtual void mousePressEvent( QMouseEvent* e );
+ virtual void mousePressEvent( TQMouseEvent* e );
/** */
- virtual void mouseReleaseEvent( QMouseEvent* e );
+ virtual void mouseReleaseEvent( TQMouseEvent* e );
/** */
- virtual void mouseMoveEvent( QMouseEvent* e );
+ virtual void mouseMoveEvent( TQMouseEvent* e );
/** */
- virtual void keyPressEvent( QKeyEvent* e );
+ virtual void keyPressEvent( TQKeyEvent* e );
/**
* Event to zoom in / zoom out the viewport by mouse wheel
*/
- virtual void wheelEvent( QWheelEvent* e );
+ virtual void wheelEvent( TQWheelEvent* e );
private:
/**
@@ -339,11 +339,11 @@ private:
/**
* Starts a graphical change
*/
- void startChange( const QPoint& mousePos );
+ void startChange( const TQPoint& mousePos );
/**
* Graphical Change
*/
- void graphicalChange( const QPoint& mousePos );
+ void graphicalChange( const TQPoint& mousePos );
/**
* Selects/deselecs the control point. If cp is 0, all control points are
* selected/deselected.
@@ -421,19 +421,19 @@ private:
/**
* The old mouse position
*/
- QPoint m_mousePos;
- QPoint m_changeStartPos;
- QPoint m_currentMousePos;
- QTimer m_startTimer;
- QTime m_changeStartTime;
+ TQPoint m_mousePos;
+ TQPoint m_changeStartPos;
+ TQPoint m_currentMousePos;
+ TQTimer m_startTimer;
+ TQTime m_changeStartTime;
bool m_bDeselectUnderMouse;
bool m_bSelectUnderMouse;
/**
* Member variables for multiple selection mode
*/
- QPixmap m_selectionPixmap[4];
- QPoint m_selectionStart, m_selectionEnd;
+ TQPixmap m_selectionPixmap[4];
+ TQPoint m_selectionStart, m_selectionEnd;
bool m_bMultipleSelectionMode;
bool m_bSelectionStarted;
@@ -442,8 +442,8 @@ private:
*/
bool m_bAutoScroll;
double m_autoScrollSpeed;
- QTimer m_autoScrollTimer;
- QTime m_lastAutoScrollUpdate;
+ TQTimer m_autoScrollTimer;
+ TQTime m_lastAutoScrollUpdate;
int m_autoScrollDirectionX, m_autoScrollDirectionY;
/**
* Rendering
@@ -474,7 +474,7 @@ private:
/**
* Position of the control points on the screen
*/
- QPtrList<PMVector> m_controlPointsPosition;
+ TQPtrList<PMVector> m_controlPointsPosition;
/**
* Position of the last right mouse click
*/
@@ -518,7 +518,7 @@ private:
/**
* The current object actions
*/
- QPtrList<PMObjectAction> m_objectActions;
+ TQPtrList<PMObjectAction> m_objectActions;
static bool s_bDirect;
};
@@ -537,11 +537,11 @@ public:
m_glViewType = t;
}
virtual PMViewOptions* copy( ) const { return new PMGLViewOptions( *this ); }
- virtual QString viewType( ) const { return QString( "glview" ); }
+ virtual TQString viewType( ) const { return TQString( "glview" ); }
PMGLView::PMViewType glViewType( ) const { return m_glViewType; }
void setGLViewType( PMGLView::PMViewType t ) { m_glViewType = t; }
- virtual void loadData( QDomElement& e );
- virtual void saveData( QDomElement& e );
+ virtual void loadData( TQDomElement& e );
+ virtual void saveData( TQDomElement& e );
private:
PMGLView::PMViewType m_glViewType;
@@ -554,16 +554,16 @@ class PMGLViewFactory : public PMViewTypeFactory
{
public:
PMGLViewFactory( ) { }
- virtual QString viewType( ) const { return QString( "glview" ); }
- virtual QString description( ) const;
- virtual QString description( PMViewOptions* ) const;
- virtual QString iconName( ) const { return QString( "pmglview" ); }
- virtual PMViewBase* newInstance( QWidget* parent, PMPart* part ) const
+ virtual TQString viewType( ) const { return TQString( "glview" ); }
+ virtual TQString description( ) const;
+ virtual TQString description( PMViewOptions* ) const;
+ virtual TQString iconName( ) const { return TQString( "pmglview" ); }
+ virtual PMViewBase* newInstance( TQWidget* parent, PMPart* part ) const
{
return new PMGLView( part, PMGLView::PMViewPosX, parent );
}
virtual PMViewOptions* newOptionsInstance( ) const;
- virtual PMViewOptionsWidget* newOptionsWidget( QWidget*, PMViewOptions* );
+ virtual PMViewOptionsWidget* newOptionsWidget( TQWidget*, PMViewOptions* );
};
/**
@@ -576,14 +576,14 @@ public:
/**
* Default constructor
*/
- PMGLViewOptionsWidget( QWidget* parent, PMViewOptions* o );
+ PMGLViewOptionsWidget( TQWidget* parent, PMViewOptions* o );
protected slots:
void slotGLViewTypeChanged( int );
private:
PMGLViewOptions* m_pOptions;
- QComboBox* m_pGLViewType;
+ TQComboBox* m_pGLViewType;
};
#endif
diff --git a/kpovmodeler/pmgraphicalobject.cpp b/kpovmodeler/pmgraphicalobject.cpp
index 85f4ad22..c60c40cb 100644
--- a/kpovmodeler/pmgraphicalobject.cpp
+++ b/kpovmodeler/pmgraphicalobject.cpp
@@ -100,7 +100,7 @@ void PMGraphicalObject::cleanUp( ) const
Base::cleanUp( );
}
-void PMGraphicalObject::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMGraphicalObject::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "no_shadow", m_noShadow );
e.setAttribute( "no_image", m_noImage );
diff --git a/kpovmodeler/pmgraphicalobject.h b/kpovmodeler/pmgraphicalobject.h
index f07ac46f..399e351d 100644
--- a/kpovmodeler/pmgraphicalobject.h
+++ b/kpovmodeler/pmgraphicalobject.h
@@ -56,7 +56,7 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
diff --git a/kpovmodeler/pmgraphicalobjectedit.cpp b/kpovmodeler/pmgraphicalobjectedit.cpp
index 2a06485c..c623c51f 100644
--- a/kpovmodeler/pmgraphicalobjectedit.cpp
+++ b/kpovmodeler/pmgraphicalobjectedit.cpp
@@ -19,16 +19,16 @@
#include "pmgraphicalobjectedit.h"
#include "pmgraphicalobject.h"
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qspinbox.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
#include <klocale.h>
const int c_minValue = -1000;
const int c_maxValue = 1000;
-PMGraphicalObjectEdit::PMGraphicalObjectEdit( QWidget* parent, const char* name )
+PMGraphicalObjectEdit::PMGraphicalObjectEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -36,38 +36,38 @@ PMGraphicalObjectEdit::PMGraphicalObjectEdit( QWidget* parent, const char* name
void PMGraphicalObjectEdit::createBottomWidgets( )
{
- QGridLayout* gl = new QGridLayout( topLayout( ), 2, 2 );
- m_pNoShadowButton = new QCheckBox( i18n( "No shadow" ), this );
+ TQGridLayout* gl = new TQGridLayout( topLayout( ), 2, 2 );
+ m_pNoShadowButton = new TQCheckBox( i18n( "No shadow" ), this );
gl->addWidget( m_pNoShadowButton, 0, 0 );
- m_pNoImageButton = new QCheckBox( i18n( "No image" ), this );
+ m_pNoImageButton = new TQCheckBox( i18n( "No image" ), this );
gl->addWidget( m_pNoImageButton, 0, 1 );
- m_pNoReflectionButton = new QCheckBox( i18n( "No reflection" ), this );
+ m_pNoReflectionButton = new TQCheckBox( i18n( "No reflection" ), this );
gl->addWidget( m_pNoReflectionButton, 1, 0 );
- m_pDoubleIlluminateButton = new QCheckBox( i18n( "Double illuminate" ), this );
+ m_pDoubleIlluminateButton = new TQCheckBox( i18n( "Double illuminate" ), this );
gl->addWidget( m_pDoubleIlluminateButton, 1, 1 );
- m_pExport = new QCheckBox( i18n( "Export to renderer" ), this );
+ m_pExport = new TQCheckBox( i18n( "Export to renderer" ), this );
topLayout( )->addWidget( m_pExport );
- QHBoxLayout* hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Visibility level: " ), this ) );
- m_pVisibilityLevel = new QSpinBox( c_minValue, c_maxValue, 1, this );
+ TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Visibility level: " ), this ) );
+ m_pVisibilityLevel = new TQSpinBox( c_minValue, c_maxValue, 1, this );
hl->addWidget( m_pVisibilityLevel );
- m_pResultingVisibility = new QLabel( QString( "( )" ), this );
+ m_pResultingVisibility = new TQLabel( TQString( "( )" ), this );
hl->addWidget( m_pResultingVisibility );
hl->addSpacing( 10 );
- m_pRelativeVisibility = new QCheckBox( i18n( "Relative" ), this );
+ m_pRelativeVisibility = new TQCheckBox( i18n( "Relative" ), this );
hl->addWidget( m_pRelativeVisibility );
hl->addStretch( 1 );
- connect( m_pNoShadowButton, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pNoImageButton, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pNoReflectionButton, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pDoubleIlluminateButton, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pRelativeVisibility, SIGNAL( clicked( ) ),
- SLOT( slotRelativeChanged( ) ) );
- connect( m_pVisibilityLevel, SIGNAL( valueChanged( int ) ),
- SLOT( slotLevelChanged( int ) ) );
- connect( m_pExport, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pNoShadowButton, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pNoImageButton, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pNoReflectionButton, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pDoubleIlluminateButton, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pRelativeVisibility, TQT_SIGNAL( clicked( ) ),
+ TQT_SLOT( slotRelativeChanged( ) ) );
+ connect( m_pVisibilityLevel, TQT_SIGNAL( valueChanged( int ) ),
+ TQT_SLOT( slotLevelChanged( int ) ) );
+ connect( m_pExport, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
Base::createBottomWidgets( );
@@ -162,7 +162,7 @@ void PMGraphicalObjectEdit::recalculateResultingVisibility( )
absoluteFound = true;
}
}
- m_pResultingVisibility->setText( QString( "(%1)" ).arg( level ) );
+ m_pResultingVisibility->setText( TQString( "(%1)" ).arg( level ) );
}
#include "pmgraphicalobjectedit.moc"
diff --git a/kpovmodeler/pmgraphicalobjectedit.h b/kpovmodeler/pmgraphicalobjectedit.h
index 3b31a794..29f53a0f 100644
--- a/kpovmodeler/pmgraphicalobjectedit.h
+++ b/kpovmodeler/pmgraphicalobjectedit.h
@@ -27,9 +27,9 @@
#include "pmdetailobjectedit.h"
class PMGraphicalObject;
-class QCheckBox;
-class QSpinBox;
-class QLabel;
+class TQCheckBox;
+class TQSpinBox;
+class TQLabel;
/**
* Dialog edit class for @ref PMGraphicalObject.
@@ -42,7 +42,7 @@ public:
/**
* Creates a PMGraphicalObjectEdit with parent and name
*/
- PMGraphicalObjectEdit( QWidget* parent, const char* name = 0 );
+ PMGraphicalObjectEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -64,14 +64,14 @@ private:
private:
PMGraphicalObject* m_pDisplayedObject;
- QCheckBox* m_pNoShadowButton;
- QCheckBox* m_pNoImageButton;
- QCheckBox* m_pNoReflectionButton;
- QCheckBox* m_pDoubleIlluminateButton;
- QSpinBox* m_pVisibilityLevel;
- QCheckBox* m_pRelativeVisibility;
- QLabel* m_pResultingVisibility;
- QCheckBox* m_pExport;
+ TQCheckBox* m_pNoShadowButton;
+ TQCheckBox* m_pNoImageButton;
+ TQCheckBox* m_pNoReflectionButton;
+ TQCheckBox* m_pDoubleIlluminateButton;
+ TQSpinBox* m_pVisibilityLevel;
+ TQCheckBox* m_pRelativeVisibility;
+ TQLabel* m_pResultingVisibility;
+ TQCheckBox* m_pExport;
};
diff --git a/kpovmodeler/pmgridsettings.cpp b/kpovmodeler/pmgridsettings.cpp
index 20973935..04bdbdd3 100644
--- a/kpovmodeler/pmgridsettings.cpp
+++ b/kpovmodeler/pmgridsettings.cpp
@@ -22,58 +22,58 @@
#include "pmcontrolpoint.h"
#include "pmdefaults.h"
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
#include <kcolorbutton.h>
#include <klocale.h>
-PMGridSettings::PMGridSettings( QWidget* parent, const char* name )
+PMGridSettings::PMGridSettings( TQWidget* parent, const char* name )
: PMSettingsDialogPage( parent, name )
{
- QHBoxLayout* hlayout;
- QVBoxLayout* vlayout;
- QVBoxLayout* gvl;
- QGridLayout* grid;
- QGroupBox* gb;
-
- vlayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) );
- gb = new QGroupBox( i18n( "Displayed Grid" ), this );
+ TQHBoxLayout* hlayout;
+ TQVBoxLayout* vlayout;
+ TQVBoxLayout* gvl;
+ TQGridLayout* grid;
+ TQGroupBox* gb;
+
+ vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) );
+ gb = new TQGroupBox( i18n( "Displayed Grid" ), this );
vlayout->addWidget( gb );
- gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
+ gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
gvl->addSpacing( 10 );
- hlayout = new QHBoxLayout( gvl );
- hlayout->addWidget( new QLabel( i18n( "Color:" ), gb ) );
+ hlayout = new TQHBoxLayout( gvl );
+ hlayout->addWidget( new TQLabel( i18n( "Color:" ), gb ) );
m_pGridColor = new KColorButton( gb );
hlayout->addWidget( m_pGridColor );
hlayout->addStretch( 1 );
- hlayout = new QHBoxLayout( gvl );
- hlayout->addWidget( new QLabel( i18n( "Distance:" ), gb ) );
+ hlayout = new TQHBoxLayout( gvl );
+ hlayout->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 );
- gb = new QGroupBox( i18n( "Control Point Grid" ), this );
+ gb = new TQGroupBox( i18n( "Control Point Grid" ), this );
vlayout->addWidget( gb );
- gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
+ gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
gvl->addSpacing( 10 );
- hlayout = new QHBoxLayout( gvl );
- grid = new QGridLayout( hlayout, 3, 2 );
- grid->addWidget( new QLabel( i18n( "2D/3D movement:" ), gb ), 0, 0 );
+ hlayout = new TQHBoxLayout( gvl );
+ grid = new TQGridLayout( hlayout, 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 );
grid->addWidget( m_pMoveGrid, 0, 1 );
- grid->addWidget( new QLabel( i18n( "Scale:" ), gb ), 1, 0 );
+ grid->addWidget( new TQLabel( i18n( "Scale:" ), gb ), 1, 0 );
m_pScaleGrid = new PMFloatEdit( gb );
m_pScaleGrid->setValidation( true, 0.001, true, 100 );
grid->addWidget( m_pScaleGrid, 1, 1 );
- grid->addWidget( new QLabel( i18n( "Rotation:" ), gb ), 2, 0 );
+ grid->addWidget( new TQLabel( i18n( "Rotation:" ), gb ), 2, 0 );
m_pRotateGrid = new PMFloatEdit( gb );
m_pRotateGrid->setValidation( true, 0.001, true, 180 );
grid->addWidget( m_pRotateGrid, 2, 1 );
diff --git a/kpovmodeler/pmgridsettings.h b/kpovmodeler/pmgridsettings.h
index 724ade35..214f3af3 100644
--- a/kpovmodeler/pmgridsettings.h
+++ b/kpovmodeler/pmgridsettings.h
@@ -38,7 +38,7 @@ public:
/**
* Default constructor
*/
- PMGridSettings( QWidget* parent, const char* name = 0 );
+ PMGridSettings( TQWidget* parent, const char* name = 0 );
/** */
virtual void displaySettings( );
/** */
diff --git a/kpovmodeler/pmheightfield.cpp b/kpovmodeler/pmheightfield.cpp
index e729282a..6806437a 100644
--- a/kpovmodeler/pmheightfield.cpp
+++ b/kpovmodeler/pmheightfield.cpp
@@ -29,8 +29,8 @@
#include <klocale.h>
const PMHeightField::HeightFieldType c_defaultType = PMHeightField::HFgif;
-const QString c_defaultTypeText = QString( "gif" );
-const QString c_defaultFileName = QString( "" );
+const TQString c_defaultTypeText = TQString( "gif" );
+const TQString c_defaultFileName = TQString( "" );
const bool c_defaultHierarchy = true;
const bool c_defaultSmooth = false;
const double c_defaultWaterLevel = 0.0;
@@ -82,12 +82,12 @@ PMHeightField::~PMHeightField( )
delete m_pROAM;
}
-QString PMHeightField::description( ) const
+TQString PMHeightField::description( ) const
{
return i18n( "height field" );
}
-void PMHeightField::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMHeightField::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "hf_type", typeToString( m_hfType ) );
e.setAttribute( "file_name", m_fileName );
@@ -146,7 +146,7 @@ void PMHeightField::setHeightFieldType( PMHeightField::HeightFieldType t )
}
}
-void PMHeightField::setFileName( const QString& f )
+void PMHeightField::setFileName( const TQString& f )
{
if( f != m_fileName )
{
@@ -200,7 +200,7 @@ void PMHeightField::setWaterLevel( double wl )
}
}
-PMDialogEditBase* PMHeightField::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMHeightField::editWidget( TQWidget* parent ) const
{
return new PMHeightFieldEdit( parent );
}
@@ -396,37 +396,37 @@ PMViewStructure* PMHeightField::defaultViewStructure( ) const
return s_pDefaultViewStructure;
}
-QString PMHeightField::typeToString( PMHeightField::HeightFieldType t )
+TQString PMHeightField::typeToString( PMHeightField::HeightFieldType t )
{
- QString s;
+ TQString s;
switch( t )
{
case HFgif:
- s = QString( "gif" );
+ s = TQString( "gif" );
break;
case HFtga:
- s = QString( "tga" );
+ s = TQString( "tga" );
break;
case HFpot:
- s = QString( "pot" );
+ s = TQString( "pot" );
break;
case HFpng:
- s = QString( "png" );
+ s = TQString( "png" );
break;
case HFpgm:
- s = QString( "pgm" );
+ s = TQString( "pgm" );
break;
case HFppm:
- s = QString( "ppm" );
+ s = TQString( "ppm" );
break;
case HFsys:
- s = QString( "sys" );
+ s = TQString( "sys" );
break;
}
return s;
}
-PMHeightField::HeightFieldType PMHeightField::stringToType( const QString &str )
+PMHeightField::HeightFieldType PMHeightField::stringToType( const TQString &str )
{
HeightFieldType t = HFgif;
if( str == "gif" )
diff --git a/kpovmodeler/pmheightfield.h b/kpovmodeler/pmheightfield.h
index 4ab961c8..443226ba 100644
--- a/kpovmodeler/pmheightfield.h
+++ b/kpovmodeler/pmheightfield.h
@@ -57,24 +57,24 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMHeightField( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMHeightFieldEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmheightfield" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmheightfield" ); }
/**
* Returns the height field type
@@ -87,11 +87,11 @@ public:
/**
* Returns the file name
*/
- QString fileName( ) const { return m_fileName; }
+ TQString fileName( ) const { return m_fileName; }
/**
* Sets the file name
*/
- void setFileName( const QString& name );
+ void setFileName( const TQString& name );
/**
* Returns the hierarchy flag
*/
@@ -133,8 +133,8 @@ public:
/** */
virtual void cleanUp( ) const;
- static QString typeToString( HeightFieldType t );
- static HeightFieldType stringToType( const QString &str );
+ static TQString typeToString( HeightFieldType t );
+ static HeightFieldType stringToType( const TQString &str );
protected:
/** */
@@ -159,7 +159,7 @@ private:
PMHierarchyID, PMSmoothID, PMWaterLevelID };
HeightFieldType m_hfType;
- QString m_fileName;
+ TQString m_fileName;
bool m_hierarchy;
bool m_smooth;
double m_waterLevel;
diff --git a/kpovmodeler/pmheightfieldedit.cpp b/kpovmodeler/pmheightfieldedit.cpp
index c5a65998..5f9346f0 100644
--- a/kpovmodeler/pmheightfieldedit.cpp
+++ b/kpovmodeler/pmheightfieldedit.cpp
@@ -20,18 +20,18 @@
#include "pmheightfield.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qslider.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqslider.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kfiledialog.h>
-PMHeightFieldEdit::PMHeightFieldEdit( QWidget* parent, const char* name )
+PMHeightFieldEdit::PMHeightFieldEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -41,9 +41,9 @@ void PMHeightFieldEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Type:" ), this ) );
- m_pHeightFieldType = new QComboBox( false, this );
+ TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Type:" ), this ) );
+ m_pHeightFieldType = new TQComboBox( false, this );
hl->addWidget( m_pHeightFieldType );
hl->addStretch( 0 );
m_pHeightFieldType->insertItem( "gif" );
@@ -54,36 +54,36 @@ void PMHeightFieldEdit::createTopWidgets( )
m_pHeightFieldType->insertItem( "ppm" );
m_pHeightFieldType->insertItem( "sys" );
- hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "File name:" ), this ) );
- m_pFileName = new QLineEdit( this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "File name:" ), this ) );
+ m_pFileName = new TQLineEdit( this );
hl->addWidget( m_pFileName );
- m_pChooseFileName = new QPushButton( this );
+ m_pChooseFileName = new TQPushButton( this );
m_pChooseFileName->setPixmap( SmallIcon( "fileopen" ) );
hl->addWidget( m_pChooseFileName );
- hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Water level:" ), this ) );
+ hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Water level:" ), this ) );
m_pWaterLevel = new PMFloatEdit( this );
m_pWaterLevel->setValidation( true, 0.0, true, 1.0 );
hl->addWidget( m_pWaterLevel );
hl->addStretch( 1 );
- m_pHierarchy = new QCheckBox( i18n( "Hierarchy" ), this );
+ m_pHierarchy = new TQCheckBox( i18n( "Hierarchy" ), this );
topLayout( )->addWidget( m_pHierarchy );
- m_pSmooth = new QCheckBox( i18n( "Smooth" ), this );
+ m_pSmooth = new TQCheckBox( i18n( "Smooth" ), this );
topLayout( )->addWidget( m_pSmooth );
- connect( m_pHeightFieldType, SIGNAL( activated( int ) ),
- SLOT( slotTypeChanged( int ) ) );
- connect( m_pFileName, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotFileNameChanged( const QString& ) ) );
- connect( m_pChooseFileName, SIGNAL( clicked( ) ),
- SLOT( slotFileNameClicked( ) ) );
- connect( m_pWaterLevel, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pHierarchy, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pSmooth, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pHeightFieldType, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotTypeChanged( int ) ) );
+ connect( m_pFileName, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotFileNameChanged( const TQString& ) ) );
+ connect( m_pChooseFileName, TQT_SIGNAL( clicked( ) ),
+ TQT_SLOT( slotFileNameClicked( ) ) );
+ connect( m_pWaterLevel, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pHierarchy, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pSmooth, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMHeightFieldEdit::displayObject( PMObject* o )
@@ -182,14 +182,14 @@ void PMHeightFieldEdit::slotTypeChanged( int )
emit dataChanged( );
}
-void PMHeightFieldEdit::slotFileNameChanged( const QString& )
+void PMHeightFieldEdit::slotFileNameChanged( const TQString& )
{
emit dataChanged( );
}
void PMHeightFieldEdit::slotFileNameClicked( )
{
- QString str = KFileDialog::getOpenFileName( QString::null, QString::null );
+ TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null );
if( !str.isEmpty() )
{
diff --git a/kpovmodeler/pmheightfieldedit.h b/kpovmodeler/pmheightfieldedit.h
index 24ea2e6e..8a32aa00 100644
--- a/kpovmodeler/pmheightfieldedit.h
+++ b/kpovmodeler/pmheightfieldedit.h
@@ -28,10 +28,10 @@
class PMHeightField;
class PMFloatEdit;
-class QCheckBox;
-class QComboBox;
-class QLineEdit;
-class QPushButton;
+class TQCheckBox;
+class TQComboBox;
+class TQLineEdit;
+class TQPushButton;
/**
* Dialog edit class for @ref PMHeightField
@@ -44,7 +44,7 @@ public:
/**
* Creates a PMHeightFieldEdit with parent and name
*/
- PMHeightFieldEdit( QWidget* parent, const char* name = 0 );
+ PMHeightFieldEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -60,7 +60,7 @@ protected slots:
/**
* Slot called when the file name is changed
*/
- void slotFileNameChanged( const QString& s );
+ void slotFileNameChanged( const TQString& s );
/**
* Slot called when the choose file button is pressed
*/
@@ -74,11 +74,11 @@ protected:
private:
PMHeightField* m_pDisplayedObject;
- QComboBox* m_pHeightFieldType;
- QLineEdit* m_pFileName;
- QPushButton* m_pChooseFileName;
- QCheckBox* m_pSmooth;
- QCheckBox* m_pHierarchy;
+ TQComboBox* m_pHeightFieldType;
+ TQLineEdit* m_pFileName;
+ TQPushButton* m_pChooseFileName;
+ TQCheckBox* m_pSmooth;
+ TQCheckBox* m_pHierarchy;
PMFloatEdit* m_pWaterLevel;
};
diff --git a/kpovmodeler/pmheightfieldroam.cpp b/kpovmodeler/pmheightfieldroam.cpp
index eb2790a5..d4809aac 100644
--- a/kpovmodeler/pmheightfieldroam.cpp
+++ b/kpovmodeler/pmheightfieldroam.cpp
@@ -19,13 +19,13 @@
#include <cstdlib>
#include <new>
-#include <qstring.h>
-#include <qimage.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqimage.h>
+#include <tqcolor.h>
#include <kdebug.h>
-PMHeightFieldROAM::PMHeightFieldROAM( const QString &fileName )
+PMHeightFieldROAM::PMHeightFieldROAM( const TQString &fileName )
{
m_size = 0;
m_numLines = m_usedPoints = 0;
@@ -142,10 +142,10 @@ bool PMHeightFieldROAM::lineExist( int x, int y, int line ) const
else return false;
}
-bool PMHeightFieldROAM::imageToData(const QString &fileName)
+bool PMHeightFieldROAM::imageToData(const TQString &fileName)
{
- QImage scaledMap;
- QImage mapFile( fileName );
+ TQImage scaledMap;
+ TQImage mapFile( fileName );
if ( mapFile.isNull( ) )
return false;
diff --git a/kpovmodeler/pmheightfieldroam.h b/kpovmodeler/pmheightfieldroam.h
index e2802c6b..3f21c630 100644
--- a/kpovmodeler/pmheightfieldroam.h
+++ b/kpovmodeler/pmheightfieldroam.h
@@ -18,7 +18,7 @@
#ifndef PMHEIGHTFIELDROAM_H
#define PMHEIGHTFIELDROAM_H
-class QString;
+class TQString;
/**
* ROAM display class for @ref PMHeightField
@@ -81,7 +81,7 @@ class PMHeightFieldROAM
* @param filename The name of the file to load
* @return true if succesful false it it fails
*/
- bool imageToData( const QString &fileName );
+ bool imageToData( const TQString &fileName );
/**
* Sets the Maximum Level of the tree.
@@ -174,7 +174,7 @@ public:
* Constructor for class
* @param fileName Source file for the map
*/
- PMHeightFieldROAM( const QString &fileName );
+ PMHeightFieldROAM( const TQString &fileName );
/**
* Class Destructor relases all the memory
*/
diff --git a/kpovmodeler/pmimagemap.cpp b/kpovmodeler/pmimagemap.cpp
index 7fcaeb64..5f28c49a 100644
--- a/kpovmodeler/pmimagemap.cpp
+++ b/kpovmodeler/pmimagemap.cpp
@@ -86,7 +86,7 @@ PMImageMap::~PMImageMap( )
{
}
-void PMImageMap::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMImageMap::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
switch( m_bitmapType )
{
@@ -125,12 +125,12 @@ void PMImageMap::serialize( QDomElement& e, QDomDocument& doc ) const
e.setAttribute( "transmit_all", m_transmitAll );
e.setAttribute( "once", m_once );
- QDomElement extra_data = doc.createElement( "extra_data" );
+ TQDomElement extra_data = doc.createElement( "extra_data" );
- QDomElement data = doc.createElement( "indexed_filters" );
- QDomElement p;
+ TQDomElement data = doc.createElement( "indexed_filters" );
+ TQDomElement p;
- QValueList<PMPaletteValue>::ConstIterator it;
+ TQValueList<PMPaletteValue>::ConstIterator it;
for( it = m_filters.begin( ); it != m_filters.end( ); ++it )
{
p = doc.createElement( "index_filter" );
@@ -182,7 +182,7 @@ void PMImageMap::serialize( QDomElement& e, QDomDocument& doc ) const
void PMImageMap::readAttributes( const PMXMLHelper& h )
{
- QString str;
+ TQString str;
str = h.stringAttribute( "bitmap_type", "sys" );
if( str == "gif" )
@@ -211,19 +211,19 @@ void PMImageMap::readAttributes( const PMXMLHelper& h )
m_transmitAll = h.doubleAttribute( "transmit_all", transmitAllDefault );
m_once = h.boolAttribute( "once", onceDefault );
- QDomElement e = h.extraData( );
+ TQDomElement e = h.extraData( );
if( !e.isNull( ) )
{
- QDomNode c = e.firstChild( );
+ TQDomNode c = e.firstChild( );
while( !c.isNull( ) )
{
if( c.isElement( ) )
{
- QDomElement ce = c.toElement( );
+ TQDomElement ce = c.toElement( );
if( ce.tagName( ) == "indexed_filters" )
{
m_filters.clear( );
- QDomNode cd = ce.firstChild( );
+ TQDomNode cd = ce.firstChild( );
while( !cd.isNull( ) )
{
if( cd.isElement( ) )
@@ -238,7 +238,7 @@ void PMImageMap::readAttributes( const PMXMLHelper& h )
if( ce.tagName( ) == "indexed_transmits" )
{
m_transmits.clear( );
- QDomNode cd = ce.firstChild( );
+ TQDomNode cd = ce.firstChild( );
while( !cd.isNull( ) )
{
if( cd.isElement( ) )
@@ -344,7 +344,7 @@ void PMImageMap::cleanUp( ) const
Base::cleanUp( );
}
-QString PMImageMap::description( ) const
+TQString PMImageMap::description( ) const
{
return i18n( "imagemap" );
}
@@ -359,7 +359,7 @@ void PMImageMap::setBitmapType( PMBitmapType c )
}
}
-void PMImageMap::setBitmapFileName( const QString& c )
+void PMImageMap::setBitmapFileName( const TQString& c )
{
if( c != m_bitmapFile )
{
@@ -439,7 +439,7 @@ void PMImageMap::setInterpolateType( PMInterpolateType c )
}
}
-void PMImageMap::setFilters( const QValueList<PMPaletteValue>& c )
+void PMImageMap::setFilters( const TQValueList<PMPaletteValue>& c )
{
if( m_filters != c )
{
@@ -449,7 +449,7 @@ void PMImageMap::setFilters( const QValueList<PMPaletteValue>& c )
}
}
-void PMImageMap::setTransmits( const QValueList<PMPaletteValue>& c )
+void PMImageMap::setTransmits( const TQValueList<PMPaletteValue>& c )
{
if( m_transmits != c )
{
@@ -459,7 +459,7 @@ void PMImageMap::setTransmits( const QValueList<PMPaletteValue>& c )
}
}
-PMDialogEditBase* PMImageMap::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMImageMap::editWidget( TQWidget* parent ) const
{
return new PMImageMapEdit( parent );
}
diff --git a/kpovmodeler/pmimagemap.h b/kpovmodeler/pmimagemap.h
index 3291994d..3a43d949 100644
--- a/kpovmodeler/pmimagemap.h
+++ b/kpovmodeler/pmimagemap.h
@@ -68,7 +68,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMImageMap( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -76,17 +76,17 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmimagemap" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmimagemap" ); }
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMImageMapEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Gets the bitmap type
@@ -95,7 +95,7 @@ public:
/**
* Gets the bitmap file name
*/
- QString bitmapFile( ) const { return m_bitmapFile; }
+ TQString bitmapFile( ) const { return m_bitmapFile; }
/**
* Returns true if filter all is enabled
*/
@@ -127,11 +127,11 @@ public:
/**
* Gets the list of indexed filters
*/
- QValueList<PMPaletteValue> filters( ) const { return m_filters; }
+ TQValueList<PMPaletteValue> filters( ) const { return m_filters; }
/**
* Gets the list of indexed transmits
*/
- QValueList<PMPaletteValue> transmits( ) const { return m_transmits; }
+ TQValueList<PMPaletteValue> transmits( ) const { return m_transmits; }
/**
* Sets the imagemap type
@@ -139,7 +139,7 @@ public:
void setBitmapType( PMBitmapType c );
/**
* Sets the bitmap file name*/
- void setBitmapFileName( const QString& c );
+ void setBitmapFileName( const TQString& c );
/**
* Enables/Disables Filter All
*/
@@ -171,11 +171,11 @@ public:
/**
* Set the list of indexed filters
*/
- void setFilters( const QValueList<PMPaletteValue>& filters );
+ void setFilters( const TQValueList<PMPaletteValue>& filters );
/**
* Set the list of indexed transmits
*/
- void setTransmits( const QValueList<PMPaletteValue>& transmits );
+ void setTransmits( const TQValueList<PMPaletteValue>& transmits );
/** */
virtual void restoreMemento( PMMemento* s );
private:
@@ -192,7 +192,7 @@ private:
* ImageMap type
*/
PMBitmapType m_bitmapType;
- QString m_bitmapFile;
+ TQString m_bitmapFile;
bool m_enableFilterAll;
float m_filterAll;
bool m_enableTransmitAll;
@@ -200,8 +200,8 @@ private:
bool m_once;
PMMapType m_mapType;
PMInterpolateType m_interpolateType;
- QValueList<PMPaletteValue> m_filters;
- QValueList<PMPaletteValue> m_transmits;
+ TQValueList<PMPaletteValue> m_filters;
+ TQValueList<PMPaletteValue> m_transmits;
static PMMetaObject* s_pMetaObject;
};
diff --git a/kpovmodeler/pmimagemapedit.cpp b/kpovmodeler/pmimagemapedit.cpp
index c43443df..09d5eb0a 100644
--- a/kpovmodeler/pmimagemapedit.cpp
+++ b/kpovmodeler/pmimagemapedit.cpp
@@ -23,14 +23,14 @@
#include "pmpalettevalueedit.h"
#include "pmvector.h"
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
#include <ktabctl.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -38,7 +38,7 @@
#include <kfiledialog.h>
#include <kiconloader.h>
-PMImageMapEdit::PMImageMapEdit( QWidget* parent, const char* name )
+PMImageMapEdit::PMImageMapEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -46,14 +46,14 @@ PMImageMapEdit::PMImageMapEdit( QWidget* parent, const char* name )
void PMImageMapEdit::createTopWidgets( )
{
- QLabel* lbl;
- QHBoxLayout* hl;
+ TQLabel* lbl;
+ TQHBoxLayout* hl;
Base::createTopWidgets( );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "File type:" ), this );
- m_pImageFileTypeEdit = new QComboBox( this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "File type:" ), this );
+ m_pImageFileTypeEdit = new TQComboBox( this );
m_pImageFileTypeEdit->insertItem( "gif" );
m_pImageFileTypeEdit->insertItem( "tga" );
m_pImageFileTypeEdit->insertItem( "iff" );
@@ -66,44 +66,44 @@ void PMImageMapEdit::createTopWidgets( )
hl->addWidget( lbl );
hl->addWidget( m_pImageFileTypeEdit );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "File name:" ), this );
- m_pImageFileNameEdit = new QLineEdit( this );
- m_pImageFileNameBrowse = new QPushButton( this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "File name:" ), this );
+ m_pImageFileNameEdit = new TQLineEdit( this );
+ m_pImageFileNameBrowse = new TQPushButton( this );
m_pImageFileNameBrowse->setPixmap( SmallIcon( "fileopen" ) );
hl->addWidget( lbl );
hl->addWidget( m_pImageFileNameEdit );
hl->addWidget( m_pImageFileNameBrowse );
- hl = new QHBoxLayout( topLayout( ) );
- m_pEnableFilterAllEdit = new QCheckBox( i18n( "Filter all" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ m_pEnableFilterAllEdit = new TQCheckBox( i18n( "Filter all" ), this );
m_pFilterAllEdit = new PMFloatEdit( this );
hl->addWidget( m_pEnableFilterAllEdit );
hl->addWidget( m_pFilterAllEdit );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- m_pEnableTransmitAllEdit = new QCheckBox( i18n( "Transmit all" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ m_pEnableTransmitAllEdit = new TQCheckBox( i18n( "Transmit all" ), this );
m_pTransmitAllEdit = new PMFloatEdit( this );
hl->addWidget( m_pEnableTransmitAllEdit );
hl->addWidget( m_pTransmitAllEdit );
hl->addStretch( 1 );
- m_pOnceEdit = new QCheckBox( i18n( "Once" ), this );
+ m_pOnceEdit = new TQCheckBox( i18n( "Once" ), this );
topLayout( )->addWidget( m_pOnceEdit );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "Interpolate:" ), this );
- m_pInterpolateTypeEdit = new QComboBox( this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "Interpolate:" ), this );
+ m_pInterpolateTypeEdit = new TQComboBox( this );
m_pInterpolateTypeEdit->insertItem( i18n( "None" ) );
m_pInterpolateTypeEdit->insertItem( i18n( "Bilinear" ) );
m_pInterpolateTypeEdit->insertItem( i18n( "Normalized" ) );
hl->addWidget( lbl );
hl->addWidget( m_pInterpolateTypeEdit );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "Map type:" ), this );
- m_pMapTypeEdit = new QComboBox( this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "Map type:" ), this );
+ m_pMapTypeEdit = new TQComboBox( this );
m_pMapTypeEdit->insertItem( i18n( "Planar" ) );
m_pMapTypeEdit->insertItem( i18n( "Spherical" ) );
m_pMapTypeEdit->insertItem( i18n( "Cylindrical" ) );
@@ -111,25 +111,25 @@ void PMImageMapEdit::createTopWidgets( )
hl->addWidget( lbl );
hl->addWidget( m_pMapTypeEdit );
- connect( m_pImageFileTypeEdit, SIGNAL( activated( int ) ), SLOT( slotImageFileTypeChanged( int ) ) );
- connect( m_pMapTypeEdit, SIGNAL( activated( int ) ), SLOT( slotMapTypeChanged( int ) ) );
- connect( m_pInterpolateTypeEdit, SIGNAL( activated( int ) ), SLOT( slotInterpolateTypeChanged( int ) ) );
- connect( m_pImageFileNameBrowse, SIGNAL( clicked( ) ), SLOT( slotImageFileBrowseClicked( ) ) );
- connect( m_pImageFileNameEdit, SIGNAL( textChanged( const QString& ) ), SLOT( slotImageFileNameChanged( const QString& ) ) );
- connect( m_pEnableFilterAllEdit, SIGNAL( clicked( ) ), SLOT( slotFilterAllClicked( ) ) );
- connect( m_pEnableTransmitAllEdit, SIGNAL( clicked( ) ), SLOT( slotTransmitAllClicked( ) ) );
- connect( m_pFilterAllEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pTransmitAllEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pOnceEdit, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pImageFileTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotImageFileTypeChanged( int ) ) );
+ connect( m_pMapTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotMapTypeChanged( int ) ) );
+ connect( m_pInterpolateTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotInterpolateTypeChanged( int ) ) );
+ connect( m_pImageFileNameBrowse, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotImageFileBrowseClicked( ) ) );
+ connect( m_pImageFileNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotImageFileNameChanged( const TQString& ) ) );
+ connect( m_pEnableFilterAllEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotFilterAllClicked( ) ) );
+ connect( m_pEnableTransmitAllEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotTransmitAllClicked( ) ) );
+ connect( m_pFilterAllEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pTransmitAllEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pOnceEdit, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMImageMapEdit::createBottomWidgets( )
{
- topLayout( )->addWidget( new QLabel( i18n( "Indexed filters" ), this ) );
- m_pFiltersWidget = new QWidget( this );
+ topLayout( )->addWidget( new TQLabel( i18n( "Indexed filters" ), this ) );
+ m_pFiltersWidget = new TQWidget( this );
topLayout( )->addWidget( m_pFiltersWidget );
- topLayout( )->addWidget( new QLabel( i18n( "Indexed transmits" ), this ) );
- m_pTransmitsWidget = new QWidget( this );
+ topLayout( )->addWidget( new TQLabel( i18n( "Indexed transmits" ), this ) );
+ m_pTransmitsWidget = new TQWidget( this );
topLayout( )->addWidget( m_pTransmitsWidget );
@@ -231,8 +231,8 @@ void PMImageMapEdit::displayObject( PMObject* o )
}
-void PMImageMapEdit::displayPaletteEntries( const QValueList<PMPaletteValue>& filters,
- const QValueList<PMPaletteValue>& transmits )
+void PMImageMapEdit::displayPaletteEntries( const TQValueList<PMPaletteValue>& filters,
+ const TQValueList<PMPaletteValue>& transmits )
{
bool readOnly = m_pDisplayedObject->isReadOnly( );
@@ -241,10 +241,10 @@ void PMImageMapEdit::displayPaletteEntries( const QValueList<PMPaletteValue>& fi
int i;
PMPaletteValueEdit* edit;
- QPushButton* button;
- QGridLayout* gl;
- QPixmap addButtonPixmap = SmallIcon( "pmaddpoint" );
- QPixmap removeButtonPixmap = SmallIcon( "pmremovepoint" );
+ TQPushButton* button;
+ TQGridLayout* gl;
+ TQPixmap addButtonPixmap = SmallIcon( "pmaddpoint" );
+ TQPixmap removeButtonPixmap = SmallIcon( "pmremovepoint" );
// First let's deal with the filter entries...
if( m_pFiltersWidget->layout( ) )
@@ -260,45 +260,45 @@ void PMImageMapEdit::displayPaletteEntries( const QValueList<PMPaletteValue>& fi
m_filterAddButtons.setAutoDelete( false );
m_filterRemoveButtons.setAutoDelete( false );
- gl = new QGridLayout( m_pFiltersWidget, nfilters + 1, 3, 0, KDialog::spacingHint( ) );
+ gl = new TQGridLayout( m_pFiltersWidget, nfilters + 1, 3, 0, KDialog::spacingHint( ) );
- button = new QPushButton( m_pFiltersWidget );
+ button = new TQPushButton( m_pFiltersWidget );
button->setPixmap( addButtonPixmap );
m_filterAddButtons.append( button );
- connect( button, SIGNAL( clicked( ) ), SLOT( slotAddFilterEntry( ) ) );
+ connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddFilterEntry( ) ) );
gl->addWidget( button, 0, 1 );
button->show( );
button->setEnabled( !readOnly );
- QToolTip::add( button, i18n( "Add new filter" ) );
+ TQToolTip::add( button, i18n( "Add new filter" ) );
for( i = 0; i < nfilters; i ++ )
{
edit = new PMPaletteValueEdit( m_pFiltersWidget );
m_filterEntries.append( edit );
- connect( edit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( edit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
gl->addWidget( edit, i+1, 0 );
edit->setIndex( filters[ i ].index( ) );
edit->setValue( filters[ i ].value( ) );
edit->show( );
edit->setReadOnly( readOnly );
- button = new QPushButton( m_pFiltersWidget );
+ button = new TQPushButton( m_pFiltersWidget );
button->setPixmap( addButtonPixmap );
m_filterAddButtons.append( button );
- connect( button, SIGNAL( clicked( ) ), SLOT( slotAddFilterEntry( ) ) );
+ connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddFilterEntry( ) ) );
gl->addWidget( button, i+1, 1 );
button->show( );
button->setEnabled( !readOnly );
- QToolTip::add( button, i18n( "Add new filter" ) );
+ TQToolTip::add( button, i18n( "Add new filter" ) );
- button = new QPushButton( m_pFiltersWidget );
+ button = new TQPushButton( m_pFiltersWidget );
button->setPixmap( removeButtonPixmap );
m_filterRemoveButtons.append( button );
- connect( button, SIGNAL( clicked( ) ), SLOT( slotRemoveFilterEntry( ) ) );
+ connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemoveFilterEntry( ) ) );
gl->addWidget( button, i+1, 2 );
button->show( );
button->setEnabled( !readOnly );
- QToolTip::add( button, i18n( "Remove filter" ) );
+ TQToolTip::add( button, i18n( "Remove filter" ) );
}
// ...next the transmit entries
@@ -316,45 +316,45 @@ void PMImageMapEdit::displayPaletteEntries( const QValueList<PMPaletteValue>& fi
if( m_pTransmitsWidget->layout( ) )
delete m_pTransmitsWidget->layout( );
- gl = new QGridLayout( m_pTransmitsWidget, ntransmits + 1, 3, 0, KDialog::spacingHint( ) );
+ gl = new TQGridLayout( m_pTransmitsWidget, ntransmits + 1, 3, 0, KDialog::spacingHint( ) );
- button = new QPushButton( m_pTransmitsWidget );
+ button = new TQPushButton( m_pTransmitsWidget );
button->setPixmap( addButtonPixmap );
m_transmitAddButtons.append( button );
- connect( button, SIGNAL( clicked( ) ), SLOT( slotAddTransmitEntry( ) ) );
+ connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddTransmitEntry( ) ) );
gl->addWidget( button, 0, 1 );
button->show( );
button->setEnabled( !readOnly );
- QToolTip::add( button, i18n( "Add new transmit" ) );
+ TQToolTip::add( button, i18n( "Add new transmit" ) );
for( i = 0; i < ntransmits; i ++ )
{
edit = new PMPaletteValueEdit( m_pTransmitsWidget );
m_transmitEntries.append( edit );
- connect( edit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( edit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
gl->addWidget( edit, i+1, 0 );
edit->setIndex( transmits[ i ].index( ) );
edit->setValue( transmits[ i ].value( ) );
edit->show( );
edit->setReadOnly( readOnly );
- button = new QPushButton( m_pTransmitsWidget );
+ button = new TQPushButton( m_pTransmitsWidget );
button->setPixmap( addButtonPixmap );
m_transmitAddButtons.append( button );
- connect( button, SIGNAL( clicked( ) ), SLOT( slotAddTransmitEntry( ) ) );
+ connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddTransmitEntry( ) ) );
gl->addWidget( button, i+1, 1 );
button->show( );
button->setEnabled( !readOnly );
- QToolTip::add( button, i18n( "Add new transmit" ) );
+ TQToolTip::add( button, i18n( "Add new transmit" ) );
- button = new QPushButton( m_pTransmitsWidget );
+ button = new TQPushButton( m_pTransmitsWidget );
button->setPixmap( removeButtonPixmap );
m_transmitRemoveButtons.append( button );
- connect( button, SIGNAL( clicked( ) ), SLOT( slotRemoveTransmitEntry( ) ) );
+ connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemoveTransmitEntry( ) ) );
gl->addWidget( button, i+1, 2 );
button->show( );
button->setEnabled( !readOnly );
- QToolTip::add( button, i18n( "Remove transmit" ) );
+ TQToolTip::add( button, i18n( "Remove transmit" ) );
}
}
@@ -440,12 +440,12 @@ bool PMImageMapEdit::isDataValid( )
if( !m_pFilterAllEdit->isDataValid( ) ) return false;
if( !m_pTransmitAllEdit->isDataValid( ) ) return false;
- QPtrListIterator<PMPaletteValueEdit> it_filters( m_filterEntries );
+ TQPtrListIterator<PMPaletteValueEdit> it_filters( m_filterEntries );
for( ; it_filters.current( ); ++it_filters )
if( !( it_filters.current( )->isDataValid( ) ) )
return false;
- QPtrListIterator<PMPaletteValueEdit> it_transmits( m_transmitEntries );
+ TQPtrListIterator<PMPaletteValueEdit> it_transmits( m_transmitEntries );
for( ; it_transmits.current( ); ++it_transmits )
if( !( it_transmits.current( )->isDataValid( ) ) )
return false;
@@ -468,14 +468,14 @@ void PMImageMapEdit::slotMapTypeChanged( const int /*a*/ )
emit dataChanged( );
}
-void PMImageMapEdit::slotImageFileNameChanged( const QString& /*a*/ )
+void PMImageMapEdit::slotImageFileNameChanged( const TQString& /*a*/ )
{
emit dataChanged( );
}
void PMImageMapEdit::slotImageFileBrowseClicked( )
{
- QString str = KFileDialog::getOpenFileName( QString::null, QString::null );
+ TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null );
if( !str.isEmpty() )
{
@@ -504,10 +504,10 @@ void PMImageMapEdit::slotTransmitAllClicked( )
emit dataChanged( );
}
-QValueList<PMPaletteValue> PMImageMapEdit::filters( )
+TQValueList<PMPaletteValue> PMImageMapEdit::filters( )
{
- QValueList<PMPaletteValue> entries;
- QPtrListIterator<PMPaletteValueEdit> it( m_filterEntries );
+ TQValueList<PMPaletteValue> entries;
+ TQPtrListIterator<PMPaletteValueEdit> it( m_filterEntries );
for( ; it.current( ); ++it )
entries.append( PMPaletteValue( it.current( )->index( ), it.current( )->value( ) ) );
@@ -515,10 +515,10 @@ QValueList<PMPaletteValue> PMImageMapEdit::filters( )
return entries;
}
-QValueList<PMPaletteValue> PMImageMapEdit::transmits( )
+TQValueList<PMPaletteValue> PMImageMapEdit::transmits( )
{
- QValueList<PMPaletteValue> entries;
- QPtrListIterator<PMPaletteValueEdit> it( m_transmitEntries );
+ TQValueList<PMPaletteValue> entries;
+ TQPtrListIterator<PMPaletteValueEdit> it( m_transmitEntries );
for( ; it.current( ); ++it )
entries.append( PMPaletteValue( it.current( )->index( ), it.current( )->value( ) ) );
@@ -528,10 +528,10 @@ QValueList<PMPaletteValue> PMImageMapEdit::transmits( )
void PMImageMapEdit::slotAddFilterEntry( )
{
- QValueList<PMPaletteValue> entriesFilters;
- QValueListIterator<PMPaletteValue> it;
+ TQValueList<PMPaletteValue> entriesFilters;
+ TQValueListIterator<PMPaletteValue> it;
PMPaletteValue newEntry;
- QPushButton* button = ( QPushButton* ) sender( );
+ TQPushButton* button = ( TQPushButton* ) sender( );
if( button )
{
@@ -555,9 +555,9 @@ void PMImageMapEdit::slotAddFilterEntry( )
void PMImageMapEdit::slotRemoveFilterEntry( )
{
- QValueList<PMPaletteValue> entriesFilters;
- QValueListIterator<PMPaletteValue> it;
- QPushButton* button = ( QPushButton* ) sender( );
+ TQValueList<PMPaletteValue> entriesFilters;
+ TQValueListIterator<PMPaletteValue> it;
+ TQPushButton* button = ( TQPushButton* ) sender( );
if( button )
{
@@ -576,10 +576,10 @@ void PMImageMapEdit::slotRemoveFilterEntry( )
void PMImageMapEdit::slotAddTransmitEntry( )
{
- QValueList<PMPaletteValue> entriesTransmits;
- QValueListIterator<PMPaletteValue> it;
+ TQValueList<PMPaletteValue> entriesTransmits;
+ TQValueListIterator<PMPaletteValue> it;
PMPaletteValue newEntry;
- QPushButton* button = ( QPushButton* ) sender( );
+ TQPushButton* button = ( TQPushButton* ) sender( );
if( button )
{
@@ -603,9 +603,9 @@ void PMImageMapEdit::slotAddTransmitEntry( )
void PMImageMapEdit::slotRemoveTransmitEntry( )
{
- QValueList<PMPaletteValue> entriesTransmits;
- QValueListIterator<PMPaletteValue> it;
- QPushButton* button = ( QPushButton* ) sender( );
+ TQValueList<PMPaletteValue> entriesTransmits;
+ TQValueListIterator<PMPaletteValue> it;
+ TQPushButton* button = ( TQPushButton* ) sender( );
if( button )
{
diff --git a/kpovmodeler/pmimagemapedit.h b/kpovmodeler/pmimagemapedit.h
index 86055ea2..49ce3d8c 100644
--- a/kpovmodeler/pmimagemapedit.h
+++ b/kpovmodeler/pmimagemapedit.h
@@ -30,14 +30,14 @@
class PMImageMap;
class PMPaletteValue;
class PMVectorEdit;
-class QComboBox;
+class TQComboBox;
class PMFloatEdit;
class PMIntEdit;
-class QLabel;
-class QCheckBox;
-class QWidget;
-class QLineEdit;
-class QPushButton;
+class TQLabel;
+class TQCheckBox;
+class TQWidget;
+class TQLineEdit;
+class TQPushButton;
/**
* Dialog edit class for @ref PMImageMap.
@@ -50,7 +50,7 @@ public:
/**
* Creates a PMImageMapEdit with parent and name
*/
- PMImageMapEdit( QWidget* parent, const char* name = 0 );
+ PMImageMapEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -65,12 +65,12 @@ protected:
/** */
virtual void saveContents( );
/** */
- QValueList<PMPaletteValue> filters( );
+ TQValueList<PMPaletteValue> filters( );
/** */
- QValueList<PMPaletteValue> transmits( );
+ TQValueList<PMPaletteValue> transmits( );
/** */
- void displayPaletteEntries( const QValueList<PMPaletteValue>& filters,
- const QValueList<PMPaletteValue>& transmits );
+ void displayPaletteEntries( const TQValueList<PMPaletteValue>& filters,
+ const TQValueList<PMPaletteValue>& transmits );
private slots:
/** */
@@ -80,7 +80,7 @@ private slots:
/** */
void slotInterpolateTypeChanged( int a );
/** */
- void slotImageFileNameChanged( const QString& a );
+ void slotImageFileNameChanged( const TQString& a );
/** */
void slotImageFileBrowseClicked( );
/** */
@@ -97,25 +97,25 @@ private slots:
void slotRemoveTransmitEntry( );
private:
PMImageMap* m_pDisplayedObject;
- QComboBox* m_pImageFileTypeEdit;
- QLineEdit* m_pImageFileNameEdit;
- QPushButton* m_pImageFileNameBrowse;
- QCheckBox* m_pOnceEdit;
- QComboBox* m_pMapTypeEdit;
- QComboBox* m_pInterpolateTypeEdit;
- QCheckBox* m_pEnableFilterAllEdit;
- QCheckBox* m_pEnableTransmitAllEdit;
+ TQComboBox* m_pImageFileTypeEdit;
+ TQLineEdit* m_pImageFileNameEdit;
+ TQPushButton* m_pImageFileNameBrowse;
+ TQCheckBox* m_pOnceEdit;
+ TQComboBox* m_pMapTypeEdit;
+ TQComboBox* m_pInterpolateTypeEdit;
+ TQCheckBox* m_pEnableFilterAllEdit;
+ TQCheckBox* m_pEnableTransmitAllEdit;
PMFloatEdit* m_pFilterAllEdit;
PMFloatEdit* m_pTransmitAllEdit;
- QWidget* m_pFiltersWidget;
- QWidget* m_pTransmitsWidget;
+ TQWidget* m_pFiltersWidget;
+ TQWidget* m_pTransmitsWidget;
- QPtrList<PMPaletteValueEdit> m_filterEntries;
- QPtrList<QPushButton> m_filterAddButtons;
- QPtrList<QPushButton> m_filterRemoveButtons;
- QPtrList<PMPaletteValueEdit> m_transmitEntries;
- QPtrList<QPushButton> m_transmitAddButtons;
- QPtrList<QPushButton> m_transmitRemoveButtons;
+ TQPtrList<PMPaletteValueEdit> m_filterEntries;
+ TQPtrList<TQPushButton> m_filterAddButtons;
+ TQPtrList<TQPushButton> m_filterRemoveButtons;
+ TQPtrList<PMPaletteValueEdit> m_transmitEntries;
+ TQPtrList<TQPushButton> m_transmitAddButtons;
+ TQPtrList<TQPushButton> m_transmitRemoveButtons;
};
#endif
diff --git a/kpovmodeler/pminserterrordialog.cpp b/kpovmodeler/pminserterrordialog.cpp
index 766db20a..9dd7867a 100644
--- a/kpovmodeler/pminserterrordialog.cpp
+++ b/kpovmodeler/pminserterrordialog.cpp
@@ -18,25 +18,25 @@
#include "pminserterrordialog.h"
#include <klocale.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qvbox.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
+#include <tqvbox.h>
PMInsertErrorDialog::PMInsertErrorDialog(
int numObj, int numErrors,
- const QStringList& details,
- QWidget* parent /*= 0*/, const char* name /*= 0*/ )
+ const TQStringList& details,
+ TQWidget* parent /*= 0*/, const char* name /*= 0*/ )
: KDialogBase( parent, name, true, i18n( "Insert Errors" ),
Help | Ok | User1, Ok, false, i18n( "Details" ) )
{
- QVBox* page = makeVBoxMainWidget( );
- new QLabel( i18n( "%1 of %2 objects couldn't be inserted." )
+ TQVBox* page = makeVBoxMainWidget( );
+ new TQLabel( i18n( "%1 of %2 objects couldn't be inserted." )
.arg( numErrors ).arg( numObj ), page );
- m_pDetailsLabel = new QLabel( i18n( "Objects not inserted:" ), page );
+ m_pDetailsLabel = new TQLabel( i18n( "Objects not inserted:" ), page );
m_pDetailsLabel->hide( );
- m_pDetails = new QListBox( page );
+ m_pDetails = new TQListBox( page );
m_pDetails->insertStringList( details, 0 );
m_pDetails->setMinimumHeight( 150 );
m_pDetails->hide( );
diff --git a/kpovmodeler/pminserterrordialog.h b/kpovmodeler/pminserterrordialog.h
index d94be0f6..9a2c1d2e 100644
--- a/kpovmodeler/pminserterrordialog.h
+++ b/kpovmodeler/pminserterrordialog.h
@@ -25,10 +25,10 @@
#endif
#include <kdialogbase.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
-class QListBox;
-class QLabel;
+class TQListBox;
+class TQLabel;
/**
* Dialog that is shown if not all objects could be inserted
@@ -41,14 +41,14 @@ public:
* Creates a modal PMInsertErrorDialog with parent and name.
*/
PMInsertErrorDialog( int NumberOfObjects, int NumberOfInsertErrors,
- const QStringList& details,
- QWidget* parent = 0, const char* name = 0 );
+ const TQStringList& details,
+ TQWidget* parent = 0, const char* name = 0 );
protected slots:
void slotUser1( );
private:
- QListBox* m_pDetails;
- QLabel* m_pDetailsLabel;
+ TQListBox* m_pDetails;
+ TQLabel* m_pDetailsLabel;
};
#endif
diff --git a/kpovmodeler/pminsertpopup.cpp b/kpovmodeler/pminsertpopup.cpp
index be6a527d..0f8ffb23 100644
--- a/kpovmodeler/pminsertpopup.cpp
+++ b/kpovmodeler/pminsertpopup.cpp
@@ -19,15 +19,15 @@
#include "pminsertpopup.h"
#include <klocale.h>
#include <kiconloader.h>
-#include <qcursor.h>
+#include <tqcursor.h>
-PMInsertPopup::PMInsertPopup( QWidget* parent, bool multipleObjects,
+PMInsertPopup::PMInsertPopup( TQWidget* parent, bool multipleObjects,
int items, bool canInsertAllAsFirstChildren,
bool canInsertAllAsLastChildren,
bool canInsertAllAsSiblings, const char* name )
: KPopupMenu( parent, name )
{
- QString itemText;
+ TQString itemText;
if( multipleObjects )
{
insertTitle( i18n( "Insert Objects As" ) );
@@ -71,7 +71,7 @@ PMInsertPopup::PMInsertPopup( QWidget* parent, bool multipleObjects,
}
}
-int PMInsertPopup::choosePlace( QWidget* parent, bool multipleObjects,
+int PMInsertPopup::choosePlace( TQWidget* parent, bool multipleObjects,
int items, bool canInsertAllAsFirstChildren,
bool canInsertAllAsLastChildren,
bool canInsertAllAsSiblings )
@@ -81,7 +81,7 @@ int PMInsertPopup::choosePlace( QWidget* parent, bool multipleObjects,
canInsertAllAsFirstChildren,
canInsertAllAsLastChildren,
canInsertAllAsSiblings );
- result = popup->exec( QCursor::pos( ) );
+ result = popup->exec( TQCursor::pos( ) );
if( result < 0 )
result = 0;
delete popup;
diff --git a/kpovmodeler/pminsertpopup.h b/kpovmodeler/pminsertpopup.h
index c5e99dac..09aa796a 100644
--- a/kpovmodeler/pminsertpopup.h
+++ b/kpovmodeler/pminsertpopup.h
@@ -45,7 +45,7 @@ public:
* of PMIFirstChild, PMILastChild, PMISibling.
* @param name Internal name of the popup menu
*/
- PMInsertPopup( QWidget* parent, bool multipleObjects,
+ PMInsertPopup( TQWidget* parent, bool multipleObjects,
int items = PMIFirstChild | PMILastChild | PMISibling,
bool canInsertAllAsFirstChildren = true,
bool canInsertAllAsLastChildren = true,
@@ -70,7 +70,7 @@ public:
*
* Returns the selected item or 0 if no item was selected.
*/
- static int choosePlace( QWidget* parent, bool multipleObjects,
+ static int choosePlace( TQWidget* parent, bool multipleObjects,
int items = PMIFirstChild | PMILastChild
| PMISibling,
bool canInsertAllAsFirstChildren = true,
diff --git a/kpovmodeler/pminsertrulesystem.cpp b/kpovmodeler/pminsertrulesystem.cpp
index 0e7b7be2..3c601df7 100644
--- a/kpovmodeler/pminsertrulesystem.cpp
+++ b/kpovmodeler/pminsertrulesystem.cpp
@@ -21,17 +21,17 @@
#include "pmvariant.h"
#include "pmdebug.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kstandarddirs.h>
-bool isCategory( QDomElement& e )
+bool isCategory( TQDomElement& e )
{
return( e.tagName( ) == "class" || e.tagName( ) == "group" );
}
-PMRuleCategory* newCategory( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups )
+PMRuleCategory* newCategory( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups )
{
if( e.tagName( ) == "class" )
return new PMRuleClass( e );
@@ -42,7 +42,7 @@ PMRuleCategory* newCategory( QDomElement& e,
PMPrototypeManager* PMRuleClass::s_pPrototypeManager = 0;
-PMRuleClass::PMRuleClass( QDomElement& e )
+PMRuleClass::PMRuleClass( TQDomElement& e )
: PMRuleCategory( )
{
m_pPrototypeManager = s_pPrototypeManager;
@@ -54,26 +54,26 @@ PMRuleClass::PMRuleClass( QDomElement& e )
<< m_className << endl;
}
-bool PMRuleClass::matches( const QString& className )
+bool PMRuleClass::matches( const TQString& className )
{
return m_pPrototypeManager->isA( className, m_className );
}
-PMRuleGroup::PMRuleGroup( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups )
+PMRuleGroup::PMRuleGroup( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups )
: PMRuleCategory( )
{
m_pGroup = 0;
- QString groupName = e.attribute( "name" );
+ TQString groupName = e.attribute( "name" );
if( groupName.isEmpty( ) )
kdError( PMArea ) << "RuleSystem: Invalid group name" << endl;
// find group
- QPtrListIterator<PMRuleDefineGroup> lit( localGroups );
+ TQPtrListIterator<PMRuleDefineGroup> lit( localGroups );
for( ; lit.current( ) && !m_pGroup; ++lit )
if( lit.current( )->name( ) == groupName )
m_pGroup = lit.current( );
- QPtrListIterator<PMRuleDefineGroup> git( globalGroups );
+ TQPtrListIterator<PMRuleDefineGroup> git( globalGroups );
for( ; git.current( ) && !m_pGroup; ++git )
if( git.current( )->name( ) == groupName )
m_pGroup = git.current( );
@@ -82,27 +82,27 @@ PMRuleGroup::PMRuleGroup( QDomElement& e,
<< groupName << endl;
}
-bool PMRuleGroup::matches( const QString& className )
+bool PMRuleGroup::matches( const TQString& className )
{
if( m_pGroup )
return m_pGroup->matches( className );
return false;
}
-PMRuleDefineGroup::PMRuleDefineGroup( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups )
+PMRuleDefineGroup::PMRuleDefineGroup( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups )
{
m_name = e.attribute( "name" );
if( m_name.isEmpty( ) )
kdError( PMArea ) << "RuleSystem: Invalid group name" << endl;
- QDomNode m = e.firstChild( );
+ TQDomNode m = e.firstChild( );
while( !m.isNull( ) )
{
if( m.isElement( ) )
{
- QDomElement me = m.toElement( );
+ TQDomElement me = m.toElement( );
if( isCategory( me ) )
m_categories.append( newCategory( me, globalGroups, localGroups ) );
}
@@ -116,23 +116,23 @@ PMRuleDefineGroup::~PMRuleDefineGroup( )
m_categories.clear( );
}
-bool PMRuleDefineGroup::matches( const QString& className )
+bool PMRuleDefineGroup::matches( const TQString& className )
{
bool m = false;
- QPtrListIterator<PMRuleCategory> it( m_categories );
+ TQPtrListIterator<PMRuleCategory> it( m_categories );
for( ; it.current( ) && !m; ++it )
m = it.current( )->matches( className );
return m;
}
-bool isValue( QDomElement& e )
+bool isValue( TQDomElement& e )
{
return( e.tagName( ) == "property" || e.tagName( ) == "const" ||
e.tagName( ) == "count" );
}
-bool isCondition( QDomElement& e )
+bool isCondition( TQDomElement& e )
{
return( e.tagName( ) == "not" || e.tagName( ) == "and" ||
e.tagName( ) == "or" || e.tagName( ) == "before" ||
@@ -141,9 +141,9 @@ bool isCondition( QDomElement& e )
e.tagName( ) == "equal" );
}
-PMRuleValue* newValue( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups )
+PMRuleValue* newValue( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups )
{
if( e.tagName( ) == "property" )
return new PMRuleProperty( e );
@@ -154,9 +154,9 @@ PMRuleValue* newValue( QDomElement& e,
return 0;
}
-PMRuleCondition* newCondition( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups )
+PMRuleCondition* newCondition( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups )
{
if( e.tagName( ) == "not" )
return new PMRuleNot( e, globalGroups, localGroups );
@@ -185,11 +185,11 @@ PMRuleBase::~PMRuleBase( )
m_children.clear( );
}
-void PMRuleBase::countChild( const QString& className, bool afterInsertPoint )
+void PMRuleBase::countChild( const TQString& className, bool afterInsertPoint )
{
countChildProtected( className, afterInsertPoint );
- QPtrListIterator<PMRuleBase> it( m_children );
+ TQPtrListIterator<PMRuleBase> it( m_children );
for( ; it.current( ); ++it )
it.current( )->countChild( className, afterInsertPoint );
}
@@ -198,12 +198,12 @@ void PMRuleBase::reset( )
{
resetProtected( );
- QPtrListIterator<PMRuleBase> it( m_children );
+ TQPtrListIterator<PMRuleBase> it( m_children );
for( ; it.current( ); ++it )
it.current( )->reset( );
}
-PMRuleProperty::PMRuleProperty( QDomElement& e )
+PMRuleProperty::PMRuleProperty( TQDomElement& e )
: PMRuleValue( )
{
m_property = e.attribute( "name" );
@@ -221,10 +221,10 @@ PMVariant PMRuleProperty::evaluate( const PMObject* o )
}
-PMRuleConstant::PMRuleConstant( QDomElement& e )
+PMRuleConstant::PMRuleConstant( TQDomElement& e )
: PMRuleValue( )
{
- QString v = e.attribute( "value" );
+ TQString v = e.attribute( "value" );
if( v.isNull( ) )
kdError( PMArea ) << "RuleSystem: Invalid value" << endl;
@@ -242,18 +242,18 @@ bool PMRuleConstant::convertTo( PMVariant::PMVariantDataType type )
}
-PMRuleCount::PMRuleCount( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups )
+PMRuleCount::PMRuleCount( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups )
: PMRuleValue( )
{
m_number = 0;
- QDomNode m = e.firstChild( );
+ TQDomNode m = e.firstChild( );
while( !m.isNull( ) )
{
if( m.isElement( ) )
{
- QDomElement me = m.toElement( );
+ TQDomElement me = m.toElement( );
if( isCategory( me ) )
m_categories.append( newCategory( me, globalGroups, localGroups ) );
}
@@ -272,10 +272,10 @@ PMVariant PMRuleCount::evaluate( const PMObject* )
return PMVariant( m_number );
}
-void PMRuleCount::countChildProtected( const QString& className, bool )
+void PMRuleCount::countChildProtected( const TQString& className, bool )
{
bool m = false;
- QPtrListIterator<PMRuleCategory> it( m_categories );
+ TQPtrListIterator<PMRuleCategory> it( m_categories );
for( ; it.current( ) && !m; ++it )
m = it.current( )->matches( className );
if( m )
@@ -287,18 +287,18 @@ void PMRuleCount::resetProtected( )
m_number = 0;
}
-PMRuleNot::PMRuleNot( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups )
+PMRuleNot::PMRuleNot( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups )
: PMRuleCondition( )
{
m_pChild = 0;
- QDomNode m = e.firstChild( );
+ TQDomNode m = e.firstChild( );
while( !m.isNull( ) && !m_pChild )
{
if( m.isElement( ) )
{
- QDomElement me = m.toElement( );
+ TQDomElement me = m.toElement( );
if( isCondition( me ) )
{
m_pChild = newCondition( me, globalGroups, localGroups );
@@ -316,17 +316,17 @@ bool PMRuleNot::evaluate( const PMObject* object )
return true;
}
-PMRuleAnd::PMRuleAnd( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups )
+PMRuleAnd::PMRuleAnd( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups )
: PMRuleCondition( )
{
- QDomNode m = e.firstChild( );
+ TQDomNode m = e.firstChild( );
while( !m.isNull( ) )
{
if( m.isElement( ) )
{
- QDomElement me = m.toElement( );
+ TQDomElement me = m.toElement( );
if( isCondition( me ) )
{
PMRuleCondition* c = newCondition( me, globalGroups, localGroups );
@@ -341,23 +341,23 @@ PMRuleAnd::PMRuleAnd( QDomElement& e,
bool PMRuleAnd::evaluate( const PMObject* object )
{
bool b = true;
- QPtrListIterator<PMRuleCondition> it( m_conditions );
+ TQPtrListIterator<PMRuleCondition> it( m_conditions );
for( ; it.current( ) && b; ++it )
b = it.current( )->evaluate( object );
return b;
}
-PMRuleOr::PMRuleOr( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups )
+PMRuleOr::PMRuleOr( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups )
: PMRuleCondition( )
{
- QDomNode m = e.firstChild( );
+ TQDomNode m = e.firstChild( );
while( !m.isNull( ) )
{
if( m.isElement( ) )
{
- QDomElement me = m.toElement( );
+ TQDomElement me = m.toElement( );
if( isCondition( me ) )
{
PMRuleCondition* c = newCondition( me, globalGroups, localGroups );
@@ -372,24 +372,24 @@ PMRuleOr::PMRuleOr( QDomElement& e,
bool PMRuleOr::evaluate( const PMObject* object )
{
bool b = false;
- QPtrListIterator<PMRuleCondition> it( m_conditions );
+ TQPtrListIterator<PMRuleCondition> it( m_conditions );
for( ; it.current( ) && !b; ++it )
b = it.current( )->evaluate( object );
return b;
}
-PMRuleBefore::PMRuleBefore( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups )
+PMRuleBefore::PMRuleBefore( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups )
: PMRuleCondition( )
{
m_contains = false;
- QDomNode m = e.firstChild( );
+ TQDomNode m = e.firstChild( );
while( !m.isNull( ) )
{
if( m.isElement( ) )
{
- QDomElement me = m.toElement( );
+ TQDomElement me = m.toElement( );
if( isCategory( me ) )
m_categories.append( newCategory( me, globalGroups, localGroups ) );
}
@@ -408,12 +408,12 @@ bool PMRuleBefore::evaluate( const PMObject* )
return m_contains;
}
-void PMRuleBefore::countChildProtected( const QString& className,
+void PMRuleBefore::countChildProtected( const TQString& className,
bool afterInsertPoint )
{
if( afterInsertPoint && !m_contains )
{
- QPtrListIterator<PMRuleCategory> it( m_categories );
+ TQPtrListIterator<PMRuleCategory> it( m_categories );
for( ; it.current( ) && !m_contains; ++it )
m_contains = it.current( )->matches( className );
}
@@ -424,18 +424,18 @@ void PMRuleBefore::resetProtected( )
m_contains = false;
}
-PMRuleAfter::PMRuleAfter( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups )
+PMRuleAfter::PMRuleAfter( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups )
: PMRuleCondition( )
{
m_contains = false;
- QDomNode m = e.firstChild( );
+ TQDomNode m = e.firstChild( );
while( !m.isNull( ) )
{
if( m.isElement( ) )
{
- QDomElement me = m.toElement( );
+ TQDomElement me = m.toElement( );
if( isCategory( me ) )
m_categories.append( newCategory( me, globalGroups, localGroups ) );
}
@@ -454,12 +454,12 @@ bool PMRuleAfter::evaluate( const PMObject* )
return m_contains;
}
-void PMRuleAfter::countChildProtected( const QString& className,
+void PMRuleAfter::countChildProtected( const TQString& className,
bool afterInsertPoint )
{
if( !afterInsertPoint && !m_contains )
{
- QPtrListIterator<PMRuleCategory> it( m_categories );
+ TQPtrListIterator<PMRuleCategory> it( m_categories );
for( ; it.current( ) && !m_contains; ++it )
m_contains = it.current( )->matches( className );
}
@@ -470,18 +470,18 @@ void PMRuleAfter::resetProtected( )
m_contains = false;
}
-PMRuleContains::PMRuleContains( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups )
+PMRuleContains::PMRuleContains( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups )
: PMRuleCondition( )
{
m_contains = false;
- QDomNode m = e.firstChild( );
+ TQDomNode m = e.firstChild( );
while( !m.isNull( ) )
{
if( m.isElement( ) )
{
- QDomElement me = m.toElement( );
+ TQDomElement me = m.toElement( );
if( isCategory( me ) )
m_categories.append( newCategory( me, globalGroups, localGroups ) );
}
@@ -500,11 +500,11 @@ bool PMRuleContains::evaluate( const PMObject* )
return m_contains;
}
-void PMRuleContains::countChildProtected( const QString& className, bool )
+void PMRuleContains::countChildProtected( const TQString& className, bool )
{
if( !m_contains )
{
- QPtrListIterator<PMRuleCategory> it( m_categories );
+ TQPtrListIterator<PMRuleCategory> it( m_categories );
for( ; it.current( ) && !m_contains; ++it )
m_contains = it.current( )->matches( className );
}
@@ -515,21 +515,21 @@ void PMRuleContains::resetProtected( )
m_contains = false;
}
-PMRuleCompare::PMRuleCompare( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups )
+PMRuleCompare::PMRuleCompare( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups )
: PMRuleCondition( )
{
m_pValue[0] = 0;
m_pValue[1] = 0;
int i = 0;
- QDomNode m = e.firstChild( );
+ TQDomNode m = e.firstChild( );
while( !m.isNull( ) && !m_pValue[1] )
{
if( m.isElement( ) )
{
- QDomElement me = m.toElement( );
+ TQDomElement me = m.toElement( );
if( isValue( me ) )
{
m_pValue[i] = newValue( me, globalGroups, localGroups );
@@ -585,9 +585,9 @@ bool PMRuleCompare::evaluate( const PMObject* object )
return compare( v[0], v[1] );
}
-PMRuleLess::PMRuleLess( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups )
+PMRuleLess::PMRuleLess( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups )
: PMRuleCompare( e, globalGroups, localGroups )
{
}
@@ -632,9 +632,9 @@ bool PMRuleLess::compare( const PMVariant& v1, const PMVariant& v2 )
return c;
}
-PMRuleGreater::PMRuleGreater( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups )
+PMRuleGreater::PMRuleGreater( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups )
: PMRuleCompare( e, globalGroups, localGroups )
{
}
@@ -679,9 +679,9 @@ bool PMRuleGreater::compare( const PMVariant& v1, const PMVariant& v2 )
return c;
}
-PMRuleEqual::PMRuleEqual( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups )
+PMRuleEqual::PMRuleEqual( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups )
: PMRuleCompare( e, globalGroups, localGroups )
{
}
@@ -727,19 +727,19 @@ bool PMRuleEqual::compare( const PMVariant& v1, const PMVariant& v2 )
}
-PMRule::PMRule( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups )
+PMRule::PMRule( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups )
: PMRuleBase( )
{
m_pCondition = 0;
- QDomNode m = e.firstChild( );
+ TQDomNode m = e.firstChild( );
while( !m.isNull( ) && !m_pCondition )
{
if( m.isElement( ) )
{
- QDomElement me = m.toElement( );
+ TQDomElement me = m.toElement( );
if( isCategory( me ) )
m_categories.append( newCategory( me, globalGroups, localGroups ) );
else if( isCondition( me ) )
@@ -758,10 +758,10 @@ PMRule::~PMRule( )
m_categories.clear( );
}
-bool PMRule::matches( const QString& className )
+bool PMRule::matches( const TQString& className )
{
bool m = false;
- QPtrListIterator<PMRuleCategory> it( m_categories );
+ TQPtrListIterator<PMRuleCategory> it( m_categories );
for( ; it.current( ) && !m; ++it )
m = it.current( )->matches( className );
return m;
@@ -775,8 +775,8 @@ bool PMRule::evaluate( const PMObject* parent )
return m_pCondition->evaluate( parent );
}
-PMRuleTargetClass::PMRuleTargetClass( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups )
+PMRuleTargetClass::PMRuleTargetClass( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups )
{
m_class = e.attribute( "name" );
if( m_class.isEmpty( ) )
@@ -785,15 +785,15 @@ PMRuleTargetClass::PMRuleTargetClass( QDomElement& e,
appendRules( e, globalGroups );
}
-void PMRuleTargetClass::appendRules( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups )
+void PMRuleTargetClass::appendRules( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups )
{
- QDomNode m = e.firstChild( );
+ TQDomNode m = e.firstChild( );
while( !m.isNull( ) )
{
if( m.isElement( ) )
{
- QDomElement me = m.toElement( );
+ TQDomElement me = m.toElement( );
if( me.tagName( ) == "definegroup" )
m_groups.append( new PMRuleDefineGroup( me, globalGroups, m_groups ) );
if( me.tagName( ) == "rule" )
@@ -826,7 +826,7 @@ PMInsertRuleSystem::~PMInsertRuleSystem( )
m_classRules.clear( );
}
-void PMInsertRuleSystem::loadRules( const QString& fileName )
+void PMInsertRuleSystem::loadRules( const TQString& fileName )
{
PMRuleClass::s_pPrototypeManager = m_pPart->prototypeManager( );
if( m_loadedFiles.find( fileName ) != m_loadedFiles.end( ) )
@@ -834,7 +834,7 @@ void PMInsertRuleSystem::loadRules( const QString& fileName )
m_loadedFiles.push_back( fileName );
- QString ruleFile = locate( "data", QString( "kpovmodeler/" + fileName ) );
+ TQString ruleFile = locate( "data", TQString( "kpovmodeler/" + fileName ) );
if( ruleFile.isEmpty( ) )
{
kdError( PMArea ) << "Rule file 'kpovmodeler/" << fileName
@@ -842,7 +842,7 @@ void PMInsertRuleSystem::loadRules( const QString& fileName )
return;
}
- QFile file( ruleFile );
+ TQFile file( ruleFile );
if( !file.open( IO_ReadOnly ) )
{
kdError( PMArea ) << "Could not open rule file 'kpovmodeler/" << fileName
@@ -850,29 +850,29 @@ void PMInsertRuleSystem::loadRules( const QString& fileName )
return;
}
- QDomDocument doc( "insertrules" );
+ TQDomDocument doc( "insertrules" );
doc.setContent( &file );
- QDomElement e = doc.documentElement( );
+ TQDomElement e = doc.documentElement( );
if( e.attribute( "format" ) != "1.0" )
kdError( PMArea ) << "Rule format " << e.attribute( "format" )
<< " not supported." << endl;
else
{
- QDomNode c = e.firstChild( );
- QPtrList<PMRuleDefineGroup> dummyLocalGroups;
+ TQDomNode c = e.firstChild( );
+ TQPtrList<PMRuleDefineGroup> dummyLocalGroups;
while( !c.isNull( ) )
{
if( c.isElement( ) )
{
- QDomElement ce = c.toElement( );
+ TQDomElement ce = c.toElement( );
if( ce.tagName( ) == "definegroup" )
m_groups.append( new PMRuleDefineGroup( ce, m_groups,
dummyLocalGroups ) );
else if( ce.tagName( ) == "targetclass" )
{
- QString className = ce.attribute( "name" );
+ TQString className = ce.attribute( "name" );
// find a target class with the same name
PMRuleTargetClass* target = 0;
@@ -898,7 +898,7 @@ void PMInsertRuleSystem::loadRules( const QString& fileName )
}
bool PMInsertRuleSystem::canInsert( const PMObject* parentObject,
- const QString& className,
+ const TQString& className,
const PMObject* after,
const PMObjectList* objectsBetween )
{
@@ -912,9 +912,9 @@ bool PMInsertRuleSystem::canInsert( const PMObject* parentObject,
if( tc )
{
// check the exception list
- QStringList exceptions = tc->exceptions( );
+ TQStringList exceptions = tc->exceptions( );
bool exceptionFound = false;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = exceptions.begin( );
it != exceptions.end( ) && !exceptionFound; ++it )
if( parentObject->isA( *it ) )
@@ -922,7 +922,7 @@ bool PMInsertRuleSystem::canInsert( const PMObject* parentObject,
if( !exceptionFound )
{
- QPtrListIterator<PMRule> rit = tc->rules( );
+ TQPtrListIterator<PMRule> rit = tc->rules( );
// find matching rules for class name
for( ; rit.current( ) && !possible; ++rit )
{
@@ -975,14 +975,14 @@ int PMInsertRuleSystem::canInsert( const PMObject* parentObject,
const PMObject* after )
{
PMObjectListIterator it( list );
- QStringList classes;
+ TQStringList classes;
for( ; it.current( ); ++it )
classes.append( it.current( )->type( ) );
return canInsert( parentObject, classes, after );
}
int PMInsertRuleSystem::canInsert( const PMObject* parentObject,
- const QStringList& list,
+ const TQStringList& list,
const PMObject* after )
{
if( list.size( ) == 1 )
@@ -995,7 +995,7 @@ int PMInsertRuleSystem::canInsert( const PMObject* parentObject,
}
// find rules for target class
- QPtrList<PMRuleTargetClass> targetClassList;
+ TQPtrList<PMRuleTargetClass> targetClassList;
PMMetaObject* meta = parentObject->metaObject( );
for( ; meta; meta = meta->superClass( ) )
{
@@ -1007,10 +1007,10 @@ int PMInsertRuleSystem::canInsert( const PMObject* parentObject,
return 0; // not rules found
// count already inserted children
- QPtrListIterator<PMRuleTargetClass> tit( targetClassList );
+ TQPtrListIterator<PMRuleTargetClass> tit( targetClassList );
for( ; tit.current( ); ++tit ) // ... for all target classes
{
- QPtrListIterator<PMRule> rit = tit.current( )->rules( );
+ TQPtrListIterator<PMRule> rit = tit.current( )->rules( );
for( ; rit.current( ); ++rit ) // ... and all rules
{
rit.current( )->reset( );
@@ -1028,14 +1028,14 @@ int PMInsertRuleSystem::canInsert( const PMObject* parentObject,
}
int number = 0;
- QStringList::const_iterator oit;
+ TQStringList::const_iterator oit;
for( oit = list.begin( ); oit != list.end( ); ++oit )
{
bool possible = false;
for( tit.toFirst( ); tit.current( ) && !possible; ++tit )
{
- QPtrListIterator<PMRule> rit = tit.current( )->rules( );
+ TQPtrListIterator<PMRule> rit = tit.current( )->rules( );
for( ; rit.current( ) && !possible; ++rit )
{
@@ -1049,7 +1049,7 @@ int PMInsertRuleSystem::canInsert( const PMObject* parentObject,
// object can be inserted, count it
for( ; tit.current( ); ++tit )
{
- QPtrListIterator<PMRule> rit = tit.current( )->rules( );
+ TQPtrListIterator<PMRule> rit = tit.current( )->rules( );
for( ; rit.current( ); ++rit )
rit.current( )->countChild( *oit, false );
}
diff --git a/kpovmodeler/pminsertrulesystem.h b/kpovmodeler/pminsertrulesystem.h
index 499cbc8e..69f78deb 100644
--- a/kpovmodeler/pminsertrulesystem.h
+++ b/kpovmodeler/pminsertrulesystem.h
@@ -25,10 +25,10 @@
#include "pmobject.h"
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qdict.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
+#include <tqdom.h>
class PMInsertRuleSystem;
class PMPrototypeManager;
@@ -51,7 +51,7 @@ public:
/**
* Returns true if the given class types matches the category.
*/
- virtual bool matches( const QString& className ) = 0;
+ virtual bool matches( const TQString& className ) = 0;
};
/**
@@ -66,13 +66,13 @@ public:
*/
static PMPrototypeManager* s_pPrototypeManager;
/**
- * Reads the data from the QDomElement.
+ * Reads the data from the TQDomElement.
*/
- PMRuleClass( QDomElement& e );
+ PMRuleClass( TQDomElement& e );
/** */
- virtual bool matches( const QString& className );
+ virtual bool matches( const TQString& className );
private:
- QString m_className;
+ TQString m_className;
PMPrototypeManager* m_pPrototypeManager;
};
@@ -84,10 +84,10 @@ class PMRuleDefineGroup
{
public:
/**
- * Reads the data from the QDomElement.
+ * Reads the data from the TQDomElement.
*/
- PMRuleDefineGroup( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups );
+ PMRuleDefineGroup( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups );
/**
* Destructor
*/
@@ -95,14 +95,14 @@ public:
/**
* Returns true if the given class types matches the category.
*/
- virtual bool matches( const QString& className );
+ virtual bool matches( const TQString& className );
/**
* Returns the group's name
*/
- QString name( ) const { return m_name; }
+ TQString name( ) const { return m_name; }
private:
- QPtrList<PMRuleCategory> m_categories;
- QString m_name;
+ TQPtrList<PMRuleCategory> m_categories;
+ TQString m_name;
};
/**
@@ -112,12 +112,12 @@ class PMRuleGroup : public PMRuleCategory
{
public:
/**
- * Reads the data from the QDomElement.
+ * Reads the data from the TQDomElement.
*/
- PMRuleGroup( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups );
+ PMRuleGroup( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups );
/** */
- bool matches( const QString& className );
+ bool matches( const TQString& className );
private:
PMRuleDefineGroup* m_pGroup;
};
@@ -140,11 +140,11 @@ public:
/**
* Returns the node type.
*/
- virtual QString type( ) const = 0;
+ virtual TQString type( ) const = 0;
/**
* Calls countChildProtected for this node and all child nodes
*/
- void countChild( const QString& className, bool afterInsertPoint );
+ void countChild( const TQString& className, bool afterInsertPoint );
/**
* Calls resetProtected for this node and all child nodes
*/
@@ -152,16 +152,16 @@ public:
/**
* Returns an iterator to all child nodes
*/
- QPtrListIterator<PMRuleBase> childIterator( ) const
+ TQPtrListIterator<PMRuleBase> childIterator( ) const
{
- return QPtrListIterator<PMRuleBase>( m_children );
+ return TQPtrListIterator<PMRuleBase>( m_children );
}
protected:
/**
* Reimplement this method if the nodes value depends
* on already inserted child objects.
*/
- virtual void countChildProtected( const QString&, bool ) { }
+ virtual void countChildProtected( const TQString&, bool ) { }
/**
* Reset all cached data (like counted child objects) here.
*/
@@ -170,7 +170,7 @@ protected:
/**
* Add all child nodes to this list.
*/
- QPtrList<PMRuleBase> m_children;
+ TQPtrList<PMRuleBase> m_children;
};
/**
@@ -199,15 +199,15 @@ class PMRuleProperty : public PMRuleValue
{
public:
/**
- * Reads the data from the QDomElement.
+ * Reads the data from the TQDomElement.
*/
- PMRuleProperty( QDomElement& e );
+ PMRuleProperty( TQDomElement& e );
/** */
- virtual QString type( ) const { return QString( "Property" ); }
+ virtual TQString type( ) const { return TQString( "Property" ); }
/** */
virtual PMVariant evaluate( const PMObject* o );
private:
- QString m_property;
+ TQString m_property;
};
@@ -218,11 +218,11 @@ class PMRuleConstant : public PMRuleValue
{
public:
/**
- * Reads the data from the QDomElement.
+ * Reads the data from the TQDomElement.
*/
- PMRuleConstant( QDomElement& e );
+ PMRuleConstant( TQDomElement& e );
/** */
- virtual QString type( ) const { return QString( "Constant" ); }
+ virtual TQString type( ) const { return TQString( "Constant" ); }
/** */
virtual PMVariant evaluate( const PMObject* );
/**
@@ -241,28 +241,28 @@ class PMRuleCount : public PMRuleValue
{
public:
/**
- * Reads the data from the QDomElement.
+ * Reads the data from the TQDomElement.
*/
- PMRuleCount( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups );
+ PMRuleCount( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups );
/**
* Destructor
*/
virtual ~PMRuleCount( );
/** */
- virtual QString type( ) const { return QString( "Count" ); }
+ virtual TQString type( ) const { return TQString( "Count" ); }
/** */
virtual PMVariant evaluate( const PMObject* );
protected:
/** */
- virtual void countChildProtected( const QString& className,
+ virtual void countChildProtected( const TQString& className,
bool afterInsertPoint );
/**
* Reset all cached data (like counted child objects) here.
*/
virtual void resetProtected( );
private:
- QPtrList<PMRuleCategory> m_categories;
+ TQPtrList<PMRuleCategory> m_categories;
int m_number;
};
@@ -292,12 +292,12 @@ class PMRuleNot : public PMRuleCondition
{
public:
/**
- * Reads the data from the QDomElement.
+ * Reads the data from the TQDomElement.
*/
- PMRuleNot( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups );
+ PMRuleNot( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups );
/** */
- virtual QString type( ) const { return QString( "Not" ); }
+ virtual TQString type( ) const { return TQString( "Not" ); }
/** */
virtual bool evaluate( const PMObject* object );
private:
@@ -312,16 +312,16 @@ class PMRuleAnd : public PMRuleCondition
{
public:
/**
- * Reads the data from the QDomElement.
+ * Reads the data from the TQDomElement.
*/
- PMRuleAnd( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups );
+ PMRuleAnd( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups );
/** */
- virtual QString type( ) const { return QString( "And" ); }
+ virtual TQString type( ) const { return TQString( "And" ); }
/** */
virtual bool evaluate( const PMObject* object );
private:
- QPtrList<PMRuleCondition> m_conditions;
+ TQPtrList<PMRuleCondition> m_conditions;
};
/**
@@ -331,16 +331,16 @@ class PMRuleOr : public PMRuleCondition
{
public:
/**
- * Reads the data from the QDomElement.
+ * Reads the data from the TQDomElement.
*/
- PMRuleOr( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups );
+ PMRuleOr( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups );
/** */
- virtual QString type( ) const { return QString( "Or" ); }
+ virtual TQString type( ) const { return TQString( "Or" ); }
/** */
virtual bool evaluate( const PMObject* object );
private:
- QPtrList<PMRuleCondition> m_conditions;
+ TQPtrList<PMRuleCondition> m_conditions;
};
/**
@@ -351,26 +351,26 @@ class PMRuleBefore : public PMRuleCondition
{
public:
/**
- * Reads the data from the QDomElement.
+ * Reads the data from the TQDomElement.
*/
- PMRuleBefore( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups );
+ PMRuleBefore( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups );
/**
* Destructor
*/
virtual ~PMRuleBefore( );
/** */
- virtual QString type( ) const { return QString( "Before" ); }
+ virtual TQString type( ) const { return TQString( "Before" ); }
/** */
virtual bool evaluate( const PMObject* object );
protected:
/** */
- virtual void countChildProtected( const QString& className,
+ virtual void countChildProtected( const TQString& className,
bool afterInsertPoint );
/** */
virtual void resetProtected( );
private:
- QPtrList<PMRuleCategory> m_categories;
+ TQPtrList<PMRuleCategory> m_categories;
bool m_contains;
};
@@ -382,26 +382,26 @@ class PMRuleAfter : public PMRuleCondition
{
public:
/**
- * Reads the data from the QDomElement.
+ * Reads the data from the TQDomElement.
*/
- PMRuleAfter( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups );
+ PMRuleAfter( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups );
/**
* Destructor
*/
virtual ~PMRuleAfter( );
/** */
- virtual QString type( ) const { return QString( "After" ); }
+ virtual TQString type( ) const { return TQString( "After" ); }
/** */
virtual bool evaluate( const PMObject* object );
protected:
/** */
- virtual void countChildProtected( const QString& className,
+ virtual void countChildProtected( const TQString& className,
bool afterInsertPoint );
/** */
virtual void resetProtected( );
private:
- QPtrList<PMRuleCategory> m_categories;
+ TQPtrList<PMRuleCategory> m_categories;
bool m_contains;
};
@@ -413,26 +413,26 @@ class PMRuleContains : public PMRuleCondition
{
public:
/**
- * Reads the data from the QDomElement.
+ * Reads the data from the TQDomElement.
*/
- PMRuleContains( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups );
+ PMRuleContains( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups );
/**
* Destructor
*/
virtual ~PMRuleContains( );
/** */
- virtual QString type( ) const { return QString( "Contains" ); }
+ virtual TQString type( ) const { return TQString( "Contains" ); }
/** */
virtual bool evaluate( const PMObject* object );
protected:
/** */
- virtual void countChildProtected( const QString& className,
+ virtual void countChildProtected( const TQString& className,
bool afterInsertPoint );
/** */
virtual void resetProtected( );
private:
- QPtrList<PMRuleCategory> m_categories;
+ TQPtrList<PMRuleCategory> m_categories;
bool m_contains;
};
@@ -443,10 +443,10 @@ class PMRuleCompare : public PMRuleCondition
{
public:
/**
- * Reads the data from the QDomElement.
+ * Reads the data from the TQDomElement.
*/
- PMRuleCompare( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups );
+ PMRuleCompare( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups );
/** */
virtual bool evaluate( const PMObject* object );
protected:
@@ -467,12 +467,12 @@ class PMRuleLess : public PMRuleCompare
{
public:
/**
- * Reads the data from the QDomElement.
+ * Reads the data from the TQDomElement.
*/
- PMRuleLess( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups );
+ PMRuleLess( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups );
/** */
- virtual QString type( ) const { return QString( "Less" ); }
+ virtual TQString type( ) const { return TQString( "Less" ); }
protected:
/** */
virtual bool compare( const PMVariant& v1, const PMVariant& v2 );
@@ -485,12 +485,12 @@ class PMRuleGreater : public PMRuleCompare
{
public:
/**
- * Reads the data from the QDomElement.
+ * Reads the data from the TQDomElement.
*/
- PMRuleGreater( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups );
+ PMRuleGreater( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups );
/** */
- virtual QString type( ) const { return QString( "Greater" ); }
+ virtual TQString type( ) const { return TQString( "Greater" ); }
protected:
/** */
virtual bool compare( const PMVariant& v1, const PMVariant& v2 );
@@ -503,12 +503,12 @@ class PMRuleEqual : public PMRuleCompare
{
public:
/**
- * Reads the data from the QDomElement.
+ * Reads the data from the TQDomElement.
*/
- PMRuleEqual( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups );
+ PMRuleEqual( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups );
/** */
- virtual QString type( ) const { return QString( "Equal" ); }
+ virtual TQString type( ) const { return TQString( "Equal" ); }
protected:
/** */
virtual bool compare( const PMVariant& v1, const PMVariant& v2 );
@@ -518,27 +518,27 @@ class PMRule : public PMRuleBase
{
public:
/**
- * Reads the data from the QDomElement.
+ * Reads the data from the TQDomElement.
*/
- PMRule( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups,
- QPtrList<PMRuleDefineGroup>& localGroups );
+ PMRule( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups,
+ TQPtrList<PMRuleDefineGroup>& localGroups );
/**
* Destructor
*/
virtual ~PMRule( );
/** */
- virtual QString type( ) const { return QString( "Rule" ); }
+ virtual TQString type( ) const { return TQString( "Rule" ); }
/**
* Returns true if this rule matches for the given class.
*/
- bool matches( const QString& className );
+ bool matches( const TQString& className );
/**
* Returns the conditions value.
*/
bool evaluate( const PMObject* parent );
private:
- QPtrList<PMRuleCategory> m_categories;
+ TQPtrList<PMRuleCategory> m_categories;
PMRuleCondition* m_pCondition;
};
@@ -551,10 +551,10 @@ class PMRuleTargetClass
{
public:
/**
- * Reads the data from the QDomElement.
+ * Reads the data from the TQDomElement.
*/
- PMRuleTargetClass( QDomElement& e,
- QPtrList<PMRuleDefineGroup>& globalGroups );
+ PMRuleTargetClass( TQDomElement& e,
+ TQPtrList<PMRuleDefineGroup>& globalGroups );
/**
* Destructor
*/
@@ -564,27 +564,27 @@ public:
* Reads rules and groups from the QDomELement and appends
* them to the local ones.
*/
- void appendRules( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups );
+ void appendRules( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups );
/**
* Returns an iterator to the rules
*/
- QPtrListIterator<PMRule> rules( ) const
+ TQPtrListIterator<PMRule> rules( ) const
{
- return QPtrListIterator<PMRule>( m_rules );
+ return TQPtrListIterator<PMRule>( m_rules );
}
/**
* Returns the class name
*/
- QString name( ) const { return m_class; }
+ TQString name( ) const { return m_class; }
/**
* Returns a list of exceptions for this rule.
*/
- QStringList exceptions( ) const { return m_exceptions; }
+ TQStringList exceptions( ) const { return m_exceptions; }
private:
- QPtrList<PMRuleDefineGroup> m_groups;
- QPtrList<PMRule> m_rules;
- QString m_class;
- QStringList m_exceptions;
+ TQPtrList<PMRuleDefineGroup> m_groups;
+ TQPtrList<PMRule> m_rules;
+ TQString m_class;
+ TQStringList m_exceptions;
};
/**
@@ -615,7 +615,7 @@ public:
* Rules are never loaded twice for the same file. It is save
* to call this method twice for the same file.
*/
- void loadRules( const QString& fileName );
+ void loadRules( const TQString& fileName );
/**
* Returns true if an object of the given class can be inserted as child
@@ -624,7 +624,7 @@ public:
* The parser uses the third parameter for top level objects. These objects
* have to be treated as if they are inserted after the object after.
*/
- bool canInsert( const PMObject* parentObject, const QString& className,
+ bool canInsert( const PMObject* parentObject, const TQString& className,
const PMObject* after, const PMObjectList* objectsBetween = 0 );
/**
@@ -647,7 +647,7 @@ public:
/**
* Returns the number of objects that can be inserted at that position
*/
- int canInsert( const PMObject* parentObject, const QStringList& listOfClasses,
+ int canInsert( const PMObject* parentObject, const TQStringList& listOfClasses,
const PMObject* after );
/**
* Returns a pointer to the part
@@ -658,20 +658,20 @@ private:
/**
* List of all rules.
*/
- QPtrList<PMRuleTargetClass> m_classRules;
+ TQPtrList<PMRuleTargetClass> m_classRules;
/**
* List of global groups
*/
- QPtrList<PMRuleDefineGroup> m_groups;
+ TQPtrList<PMRuleDefineGroup> m_groups;
/**
* Dictionary that maps from the class name
* to a list of rules that match.
*/
- QDict<PMRuleTargetClass> m_rulesDict;
+ TQDict<PMRuleTargetClass> m_rulesDict;
/**
* List of already loaded files
*/
- QStringList m_loadedFiles;
+ TQStringList m_loadedFiles;
PMPart* m_pPart;
};
diff --git a/kpovmodeler/pminterior.cpp b/kpovmodeler/pminterior.cpp
index 31d7bf5d..53a69f79 100644
--- a/kpovmodeler/pminterior.cpp
+++ b/kpovmodeler/pminterior.cpp
@@ -120,12 +120,12 @@ void PMInterior::cleanUp( ) const
Base::cleanUp( );
}
-QString PMInterior::description( ) const
+TQString PMInterior::description( ) const
{
return i18n( "interior" );
}
-void PMInterior::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMInterior::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
Base::serialize( e, doc );
e.setAttribute( "enable_ior", m_enableIor );
@@ -281,7 +281,7 @@ void PMInterior::enableFadePower( bool c )
}
}
-PMDialogEditBase* PMInterior::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMInterior::editWidget( TQWidget* parent ) const
{
return new PMInteriorEdit( parent );
}
diff --git a/kpovmodeler/pminterior.h b/kpovmodeler/pminterior.h
index 159b6b64..8e3c9172 100644
--- a/kpovmodeler/pminterior.h
+++ b/kpovmodeler/pminterior.h
@@ -50,7 +50,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMInterior( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -58,16 +58,16 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMInteriorEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pminterior" ); }
+ virtual TQString pixmap( ) const { return TQString( "pminterior" ); }
/** */
virtual void restoreMemento( PMMemento* s );
diff --git a/kpovmodeler/pminterioredit.cpp b/kpovmodeler/pminterioredit.cpp
index b5df1825..4b8b2381 100644
--- a/kpovmodeler/pminterioredit.cpp
+++ b/kpovmodeler/pminterioredit.cpp
@@ -21,13 +21,13 @@
#include "pmlineedits.h"
#include "pmcoloredit.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
#include <klocale.h>
-PMInteriorEdit::PMInteriorEdit( QWidget* parent, const char* name )
+PMInteriorEdit::PMInteriorEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -37,48 +37,48 @@ void PMInteriorEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* hl = new QHBoxLayout( topLayout( ) );
- QGridLayout* layout = new QGridLayout( hl ,17 ,6);
- m_pEnableIorEdit = new QCheckBox( i18n( "Refraction:" ), this );
+ TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) );
+ TQGridLayout* layout = new TQGridLayout( hl ,17 ,6);
+ m_pEnableIorEdit = new TQCheckBox( i18n( "Refraction:" ), this );
m_pIorEdit = new PMFloatEdit( this );
layout->addWidget( m_pEnableIorEdit, 0, 0 );
layout->addWidget( m_pIorEdit, 0, 1 );
- m_pEnableCausticsEdit = new QCheckBox( i18n( "Caustics:" ), this );
+ m_pEnableCausticsEdit = new TQCheckBox( i18n( "Caustics:" ), this );
m_pCausticsEdit = new PMFloatEdit( this );
layout->addWidget( m_pEnableCausticsEdit, 1, 0 );
layout->addWidget( m_pCausticsEdit, 1, 1 );
- m_pEnableDispersionEdit = new QCheckBox( i18n( "Dispersion:" ), this );
+ m_pEnableDispersionEdit = new TQCheckBox( i18n( "Dispersion:" ), this );
m_pDispersionEdit = new PMFloatEdit( this );
m_pDispersionEdit->setValidation( true, 0, false, 0 );
layout->addWidget( m_pEnableDispersionEdit, 2, 0 );
layout->addWidget( m_pDispersionEdit, 2, 1 );
- m_pEnableDispSamplesEdit = new QCheckBox( i18n( "Dispersion samples:" ), this );
+ m_pEnableDispSamplesEdit = new TQCheckBox( i18n( "Dispersion samples:" ), this );
m_pDispSamplesEdit = new PMIntEdit( this );
m_pDispSamplesEdit->setValidation( true, 2, false, 0 );
layout->addWidget( m_pEnableDispSamplesEdit, 3, 0 );
layout->addWidget( m_pDispSamplesEdit, 3, 1 );
- m_pEnableFadeDistanceEdit = new QCheckBox( i18n( "Fade distance:" ), this );
+ m_pEnableFadeDistanceEdit = new TQCheckBox( i18n( "Fade distance:" ), this );
m_pFadeDistanceEdit = new PMFloatEdit( this );
layout->addWidget( m_pEnableFadeDistanceEdit, 4, 0 );
layout->addWidget( m_pFadeDistanceEdit, 4, 1 );
- m_pEnableFadePowerEdit = new QCheckBox( i18n( "Fade power:" ), this );
+ m_pEnableFadePowerEdit = new TQCheckBox( i18n( "Fade power:" ), this );
m_pFadePowerEdit = new PMFloatEdit( this );
layout->addWidget( m_pEnableFadePowerEdit, 5, 0 );
layout->addWidget( m_pFadePowerEdit, 5, 1 );
hl->addStretch( 1 );
- connect( m_pIorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pCausticsEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pDispersionEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pDispSamplesEdit, SIGNAL( dataChanged( ) ), SIGNAL ( dataChanged( ) ) );
- connect( m_pFadeDistanceEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pFadePowerEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pEnableIorEdit, SIGNAL( clicked( ) ), SLOT( slotIorClicked( ) ) );
- connect( m_pEnableCausticsEdit, SIGNAL( clicked( ) ), SLOT( slotCausticsClicked( ) ) );
- connect( m_pEnableDispersionEdit, SIGNAL( clicked( ) ), SLOT( slotDispersionClicked( ) ) );
- connect( m_pEnableDispSamplesEdit, SIGNAL( clicked( ) ), SLOT( slotDispSamplesClicked( ) ) );
- connect( m_pEnableFadeDistanceEdit, SIGNAL( clicked( ) ), SLOT( slotFadeDistanceClicked( ) ) );
- connect( m_pEnableFadePowerEdit, SIGNAL( clicked( ) ), SLOT( slotFadePowerClicked( ) ) );
+ connect( m_pIorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pCausticsEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pDispersionEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pDispSamplesEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL ( dataChanged( ) ) );
+ connect( m_pFadeDistanceEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pFadePowerEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pEnableIorEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotIorClicked( ) ) );
+ connect( m_pEnableCausticsEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotCausticsClicked( ) ) );
+ connect( m_pEnableDispersionEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotDispersionClicked( ) ) );
+ connect( m_pEnableDispSamplesEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotDispSamplesClicked( ) ) );
+ connect( m_pEnableFadeDistanceEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotFadeDistanceClicked( ) ) );
+ connect( m_pEnableFadePowerEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotFadePowerClicked( ) ) );
}
void PMInteriorEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pminterioredit.h b/kpovmodeler/pminterioredit.h
index 93564bcb..d8512d5e 100644
--- a/kpovmodeler/pminterioredit.h
+++ b/kpovmodeler/pminterioredit.h
@@ -30,8 +30,8 @@ class PMInterior;
class PMIntEdit;
class PMFloatEdit;
class PMColorEdit;
-class QCheckBox;
-class QLabel;
+class TQCheckBox;
+class TQLabel;
/**
* Dialog edit class for @ref PMInterior
@@ -44,7 +44,7 @@ public:
/**
* Creates a PMInteriorEdit with parent and name
*/
- PMInteriorEdit( QWidget* parent, const char* name = 0 );
+ PMInteriorEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -73,12 +73,12 @@ private:
PMIntEdit* m_pDispSamplesEdit;
PMFloatEdit* m_pFadeDistanceEdit;
PMFloatEdit* m_pFadePowerEdit;
- QCheckBox* m_pEnableIorEdit;
- QCheckBox* m_pEnableCausticsEdit;
- QCheckBox* m_pEnableDispersionEdit;
- QCheckBox* m_pEnableDispSamplesEdit;
- QCheckBox* m_pEnableFadeDistanceEdit;
- QCheckBox* m_pEnableFadePowerEdit;
+ TQCheckBox* m_pEnableIorEdit;
+ TQCheckBox* m_pEnableCausticsEdit;
+ TQCheckBox* m_pEnableDispersionEdit;
+ TQCheckBox* m_pEnableDispSamplesEdit;
+ TQCheckBox* m_pEnableFadeDistanceEdit;
+ TQCheckBox* m_pEnableFadePowerEdit;
};
diff --git a/kpovmodeler/pminteriortexture.cpp b/kpovmodeler/pminteriortexture.cpp
index f379e4b6..92950050 100644
--- a/kpovmodeler/pminteriortexture.cpp
+++ b/kpovmodeler/pminteriortexture.cpp
@@ -63,12 +63,12 @@ void PMInteriorTexture::cleanUp( ) const
Base::cleanUp( );
}
-QString PMInteriorTexture::description( ) const
+TQString PMInteriorTexture::description( ) const
{
return i18n( "interior texture" );
}
-PMDialogEditBase* PMInteriorTexture::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMInteriorTexture::editWidget( TQWidget* parent ) const
{
return new PMInteriorTextureEdit( parent );
}
diff --git a/kpovmodeler/pminteriortexture.h b/kpovmodeler/pminteriortexture.h
index 8682e69d..0711b5c9 100644
--- a/kpovmodeler/pminteriortexture.h
+++ b/kpovmodeler/pminteriortexture.h
@@ -49,7 +49,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMInteriorTexture( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -59,9 +59,9 @@ public:
/**
* Returns a new @ref PMTextureEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pminteriortexture" ); }
+ virtual TQString pixmap( ) const { return TQString( "pminteriortexture" ); }
private:
static PMMetaObject* s_pMetaObject;
diff --git a/kpovmodeler/pminteriortextureedit.cpp b/kpovmodeler/pminteriortextureedit.cpp
index 47fe6f38..73f1e7e9 100644
--- a/kpovmodeler/pminteriortextureedit.cpp
+++ b/kpovmodeler/pminteriortextureedit.cpp
@@ -20,12 +20,12 @@
#include "pminteriortexture.h"
#include "pmlinkedit.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
-PMInteriorTextureEdit::PMInteriorTextureEdit( QWidget* parent, const char* name )
+PMInteriorTextureEdit::PMInteriorTextureEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
diff --git a/kpovmodeler/pminteriortextureedit.h b/kpovmodeler/pminteriortextureedit.h
index 1594ef6e..ab46142d 100644
--- a/kpovmodeler/pminteriortextureedit.h
+++ b/kpovmodeler/pminteriortextureedit.h
@@ -39,7 +39,7 @@ public:
/**
* Creates a PMTextureEdit with parent and name
*/
- PMInteriorTextureEdit( QWidget* parent, const char* name = 0 );
+ PMInteriorTextureEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmiomanager.cpp b/kpovmodeler/pmiomanager.cpp
index 72a081d2..946f2bc5 100644
--- a/kpovmodeler/pmiomanager.cpp
+++ b/kpovmodeler/pmiomanager.cpp
@@ -61,7 +61,7 @@ void PMIOManager::addFormat( PMIOFormat* format )
kdError( PMArea ) << "Format " << format->name( ) << "already registered" << endl;
}
-void PMIOManager::removeFormat( const QString& name )
+void PMIOManager::removeFormat( const TQString& name )
{
PMIOFormat* pFormat = format( name );
if( pFormat )
@@ -71,14 +71,14 @@ void PMIOManager::removeFormat( const QString& name )
}
}
-PMIOFormat* PMIOManager::format( const QString& name ) const
+PMIOFormat* PMIOManager::format( const TQString& name ) const
{
return m_dict.find( name );
}
-PMIOFormat* PMIOManager::formatForMimeType( const QString& mime ) const
+PMIOFormat* PMIOManager::formatForMimeType( const TQString& mime ) const
{
- QPtrListIterator<PMIOFormat> it( m_formats );
+ TQPtrListIterator<PMIOFormat> it( m_formats );
bool found = false;
PMIOFormat* pFormat = 0;
diff --git a/kpovmodeler/pmiomanager.h b/kpovmodeler/pmiomanager.h
index ac3b78eb..f167068f 100644
--- a/kpovmodeler/pmiomanager.h
+++ b/kpovmodeler/pmiomanager.h
@@ -22,17 +22,17 @@
#include <config.h>
#endif
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qdict.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
class PMParser;
class PMSerializer;
class PMRenderer;
class PMPart;
-class QIODevice;
+class TQIODevice;
/**
* Description class for input and output formats.
@@ -68,11 +68,11 @@ public:
/**
* Returns an unique name of this format.
*/
- virtual QString name( ) const = 0;
+ virtual TQString name( ) const = 0;
/**
* Returns a translated description of this format
*/
- virtual QString description( ) const = 0;
+ virtual TQString description( ) const = 0;
/**
* Returns the supported services
* (a bitwise combination of the Services enum values)
@@ -83,7 +83,7 @@ public:
*
* The caller is responsible to delete the returned parser.
*/
- virtual PMParser* newParser( PMPart*, QIODevice* ) const
+ virtual PMParser* newParser( PMPart*, TQIODevice* ) const
{
return 0;
};
@@ -92,7 +92,7 @@ public:
*
* The caller is responsible to delete the returned parser.
*/
- virtual PMParser* newParser( PMPart*, const QByteArray& ) const
+ virtual PMParser* newParser( PMPart*, const TQByteArray& ) const
{
return 0;
};
@@ -102,7 +102,7 @@ public:
*
* The caller is responsible to delete the returned device
*/
- virtual PMSerializer* newSerializer( QIODevice* )
+ virtual PMSerializer* newSerializer( TQIODevice* )
{
return 0;
}
@@ -116,23 +116,23 @@ public:
/**
* Returns the mime type for this format
*/
- virtual QString mimeType( ) const
+ virtual TQString mimeType( ) const
{
- return QString::null;
+ return TQString::null;
}
/**
* Returns a list of patterns for the import file dialog
*/
- virtual QStringList importPatterns( ) const
+ virtual TQStringList importPatterns( ) const
{
- return QStringList( );
+ return TQStringList( );
}
/**
* Returns a list of patterns for the export file dialog
*/
- virtual QStringList exportPatterns( ) const
+ virtual TQStringList exportPatterns( ) const
{
- return QStringList( );
+ return TQStringList( );
}
};
@@ -159,25 +159,25 @@ public:
/**
* Removes a format by name
*/
- void removeFormat( const QString& name );
+ void removeFormat( const TQString& name );
/**
* Returns the list of registered io formats
*/
- const QPtrList<PMIOFormat>& formats( ) const { return m_formats; }
+ const TQPtrList<PMIOFormat>& formats( ) const { return m_formats; }
/**
* Returns a view type by name
*/
- PMIOFormat* format( const QString& name ) const;
+ PMIOFormat* format( const TQString& name ) const;
/**
* Returns the first io format that can handle the mime type
* or 0 if there is none
*/
- PMIOFormat* formatForMimeType( const QString& mime ) const;
+ PMIOFormat* formatForMimeType( const TQString& mime ) const;
private:
- QPtrList<PMIOFormat> m_formats;
- QDict<PMIOFormat> m_dict;
+ TQPtrList<PMIOFormat> m_formats;
+ TQDict<PMIOFormat> m_dict;
PMPart* m_pPart;
};
diff --git a/kpovmodeler/pmisosurface.cpp b/kpovmodeler/pmisosurface.cpp
index 16e5e247..c32c0683 100644
--- a/kpovmodeler/pmisosurface.cpp
+++ b/kpovmodeler/pmisosurface.cpp
@@ -96,14 +96,14 @@ PMIsoSurface::~PMIsoSurface( )
{
}
-QString PMIsoSurface::description( ) const
+TQString PMIsoSurface::description( ) const
{
return i18n( "isosurface" );
}
-void PMIsoSurface::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMIsoSurface::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
- QDomText t = doc.createTextNode( m_function );
+ TQDomText t = doc.createTextNode( m_function );
e.appendChild( t );
if( m_containedBy == Box )
@@ -129,11 +129,11 @@ void PMIsoSurface::serialize( QDomElement& e, QDomDocument& doc ) const
void PMIsoSurface::readAttributes( const PMXMLHelper& h )
{
- QDomNode e = h.element( ).firstChild( );
+ TQDomNode e = h.element( ).firstChild( );
if( e.isText( ) )
m_function = e.toText( ).data( );
- QString str = h.stringAttribute( "contained_by", "" );
+ TQString str = h.stringAttribute( "contained_by", "" );
if( str == "sphere" )
m_containedBy = Sphere;
else
@@ -174,7 +174,7 @@ PMMetaObject* PMIsoSurface::metaObject( ) const
return s_pMetaObject;
}
-void PMIsoSurface::setFunction( const QString& f )
+void PMIsoSurface::setFunction( const TQString& f )
{
if( f != m_function )
{
@@ -333,7 +333,7 @@ void PMIsoSurface::setAllIntersections( bool yes )
}
}
-PMDialogEditBase* PMIsoSurface::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMIsoSurface::editWidget( TQWidget* parent ) const
{
return new PMIsoSurfaceEdit( parent );
}
diff --git a/kpovmodeler/pmisosurface.h b/kpovmodeler/pmisosurface.h
index 0646aff3..2a2fb358 100644
--- a/kpovmodeler/pmisosurface.h
+++ b/kpovmodeler/pmisosurface.h
@@ -57,34 +57,34 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMIsoSurface( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMIsoSurfaceEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmisosurface" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmisosurface" ); }
/**
* Sets the isosurface function
*/
- void setFunction( const QString& f );
+ void setFunction( const TQString& f );
/**
* Returns the isosurface function
*/
- QString function( ) const { return m_function; }
+ TQString function( ) const { return m_function; }
/**
* Sets the type of the contained_by object
*/
@@ -214,7 +214,7 @@ private:
Evaluate0ID, Evaluate1ID, Evaluate2ID,
OpenID, MaxTraceID, AllIntersectionsID };
- QString m_function;
+ TQString m_function;
ContainedByType m_containedBy;
PMVector m_corner1, m_corner2, m_center;
double m_radius, m_threshold, m_accuracy, m_maxGradient;
diff --git a/kpovmodeler/pmisosurfaceedit.cpp b/kpovmodeler/pmisosurfaceedit.cpp
index b4eb0216..752331b6 100644
--- a/kpovmodeler/pmisosurfaceedit.cpp
+++ b/kpovmodeler/pmisosurfaceedit.cpp
@@ -21,14 +21,14 @@
#include "pmvectoredit.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
#include <klocale.h>
-PMIsoSurfaceEdit::PMIsoSurfaceEdit( QWidget* parent, const char* name )
+PMIsoSurfaceEdit::PMIsoSurfaceEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -37,13 +37,13 @@ PMIsoSurfaceEdit::PMIsoSurfaceEdit( QWidget* parent, const char* name )
void PMIsoSurfaceEdit::createTopWidgets( )
{
int i;
- QGridLayout* gl;
- QHBoxLayout* hl;
+ TQGridLayout* gl;
+ TQHBoxLayout* hl;
Base::createTopWidgets( );
- m_pFunction = new QLineEdit( this );
- m_pContainedBy = new QComboBox( false, this );
+ m_pFunction = new TQLineEdit( this );
+ m_pContainedBy = new TQComboBox( false, this );
m_pContainedBy->insertItem( i18n( "Box" ) );
m_pContainedBy->insertItem( i18n( "Sphere" ) );
@@ -51,28 +51,28 @@ void PMIsoSurfaceEdit::createTopWidgets( )
m_pCorner2 = new PMVectorEdit( "x", "y", "z", this );
m_pCenter = new PMVectorEdit( "x", "y", "z", this );
m_pRadius = new PMFloatEdit( this );
- m_pCorner1Label = new QLabel( i18n( "Corner1:" ), this );
- m_pCorner2Label = new QLabel( i18n( "Corner2:" ), this );
- m_pCenterLabel = new QLabel( i18n( "Center:" ), this );
- m_pRadiusLabel = new QLabel( i18n( "Radius:" ), this );
+ m_pCorner1Label = new TQLabel( i18n( "Corner1:" ), this );
+ m_pCorner2Label = new TQLabel( i18n( "Corner2:" ), this );
+ m_pCenterLabel = new TQLabel( i18n( "Center:" ), this );
+ m_pRadiusLabel = new TQLabel( i18n( "Radius:" ), this );
m_pThreshold = new PMFloatEdit( this );
m_pAccuracy = new PMFloatEdit( this );
m_pAccuracy->setValidation( true, 1e-8, false, 0 );
m_pMaxGradient = new PMFloatEdit( this );
m_pMaxGradient->setValidation( true, 1e-8, false, 0 );
- m_pEvaluate = new QCheckBox( i18n( "Adapt maximum gradient" ), this );
+ m_pEvaluate = new TQCheckBox( i18n( "Adapt maximum gradient" ), this );
for( i = 0; i < 3; i++ )
m_pEvaluateValue[i] = new PMFloatEdit( this );
m_pMaxTrace = new PMIntEdit( this );
m_pMaxTrace->setValidation( true, 1, false, 0 );
- m_pAllIntersections = new QCheckBox( i18n( "All intersections" ), this );
- m_pOpen = new QCheckBox( i18n( "type of the object", "Open" ), this );
+ m_pAllIntersections = new TQCheckBox( i18n( "All intersections" ), this );
+ m_pOpen = new TQCheckBox( i18n( "type of the object", "Open" ), this );
- gl = new QGridLayout( topLayout( ), 8, 2 );
- gl->addWidget( new QLabel( i18n( "Function:" ), this ), 0, 0 );
+ gl = new TQGridLayout( topLayout( ), 8, 2 );
+ gl->addWidget( new TQLabel( i18n( "Function:" ), this ), 0, 0 );
gl->addWidget( m_pFunction, 0, 1 );
- gl->addWidget( new QLabel( i18n( "Container:" ), this ), 1, 0 );
+ gl->addWidget( new TQLabel( i18n( "Container:" ), this ), 1, 0 );
gl->addWidget( m_pContainedBy, 1, 1 );
gl->addWidget( m_pCorner1Label, 2, 0 );
gl->addWidget( m_pCorner1, 2, 1 );
@@ -82,49 +82,49 @@ void PMIsoSurfaceEdit::createTopWidgets( )
gl->addWidget( m_pCenter, 4, 1 );
gl->addWidget( m_pRadiusLabel, 5, 0 );
gl->addWidget( m_pRadius, 5, 1 );
- gl->addWidget( new QLabel( i18n( "Threshold:" ), this ), 6, 0 );
+ gl->addWidget( new TQLabel( i18n( "Threshold:" ), this ), 6, 0 );
gl->addWidget( m_pThreshold, 6, 1 );
- gl->addWidget( new QLabel( i18n( "Accuracy:" ), this ), 7, 0 );
+ gl->addWidget( new TQLabel( i18n( "Accuracy:" ), this ), 7, 0 );
gl->addWidget( m_pAccuracy, 7, 1 );
- hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Maximum gradient:" ), this ) );
+ hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Maximum gradient:" ), this ) );
hl->addWidget( m_pMaxGradient );
topLayout( )->addWidget( m_pEvaluate );
- hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Values:" ), this ) );
+ hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Values:" ), this ) );
for( i = 0; i < 3; i++ )
{
- hl->addWidget( new QLabel( QString( "P%1" ).arg( i ), this ) );
+ hl->addWidget( new TQLabel( TQString( "P%1" ).arg( i ), this ) );
hl->addWidget( m_pEvaluateValue[i] );
}
- hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Maximum traces:" ), this ) );
+ hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Maximum traces:" ), this ) );
hl->addWidget( m_pMaxTrace );
topLayout( )->addWidget( m_pAllIntersections );
topLayout( )->addWidget( m_pOpen );
- connect( m_pFunction, SIGNAL( textChanged( const QString& ) ),
- SLOT( textChanged( const QString& ) ) );
- connect( m_pContainedBy, SIGNAL( activated( int ) ),
- SLOT( currentChanged( int ) ) );
- connect( m_pCorner1, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pCorner2, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pCenter, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pThreshold, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pAccuracy, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pMaxGradient, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pEvaluate, SIGNAL( toggled( bool ) ),
- SLOT( evaluateToggled( bool ) ) );
- connect( m_pMaxTrace, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pFunction, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( textChanged( const TQString& ) ) );
+ connect( m_pContainedBy, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( currentChanged( int ) ) );
+ connect( m_pCorner1, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pCorner2, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pCenter, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pThreshold, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pAccuracy, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pMaxGradient, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pEvaluate, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( evaluateToggled( bool ) ) );
+ connect( m_pMaxTrace, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
for( i = 0; i < 3; i++ )
- connect( m_pEvaluateValue[i], SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pOpen, SIGNAL( toggled( bool ) ), SLOT( toggled( bool ) ) );
- connect( m_pAllIntersections, SIGNAL( toggled( bool ) ),
- SLOT( allToggled( bool ) ) );
+ connect( m_pEvaluateValue[i], TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pOpen, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( toggled( bool ) ) );
+ connect( m_pAllIntersections, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( allToggled( bool ) ) );
}
void PMIsoSurfaceEdit::displayObject( PMObject* o )
@@ -272,7 +272,7 @@ bool PMIsoSurfaceEdit::isDataValid( )
return Base::isDataValid( );
}
-void PMIsoSurfaceEdit::textChanged( const QString& )
+void PMIsoSurfaceEdit::textChanged( const TQString& )
{
emit dataChanged( );
}
diff --git a/kpovmodeler/pmisosurfaceedit.h b/kpovmodeler/pmisosurfaceedit.h
index 9ee6e872..09798c0d 100644
--- a/kpovmodeler/pmisosurfaceedit.h
+++ b/kpovmodeler/pmisosurfaceedit.h
@@ -30,10 +30,10 @@ class PMIsoSurface;
class PMVectorEdit;
class PMFloatEdit;
class PMIntEdit;
-class QCheckBox;
-class QComboBox;
-class QLabel;
-class QLineEdit;
+class TQCheckBox;
+class TQComboBox;
+class TQLabel;
+class TQLineEdit;
/**
* Dialog edit class for @ref PMIsoSurface
@@ -46,7 +46,7 @@ public:
/**
* Creates a PMIsoSurfaceEdit with parent and name
*/
- PMIsoSurfaceEdit( QWidget* parent, const char* name = 0 );
+ PMIsoSurfaceEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -60,7 +60,7 @@ protected:
virtual void saveContents( );
private slots:
- void textChanged( const QString& );
+ void textChanged( const TQString& );
void currentChanged( int i );
void evaluateToggled( bool );
void allToggled( bool );
@@ -68,24 +68,24 @@ private slots:
private:
PMIsoSurface* m_pDisplayedObject;
- QLineEdit* m_pFunction;
- QComboBox* m_pContainedBy;
+ TQLineEdit* m_pFunction;
+ TQComboBox* m_pContainedBy;
PMVectorEdit* m_pCorner1;
PMVectorEdit* m_pCorner2;
PMVectorEdit* m_pCenter;
PMFloatEdit* m_pRadius;
- QLabel* m_pCorner1Label;
- QLabel* m_pCorner2Label;
- QLabel* m_pCenterLabel;
- QLabel* m_pRadiusLabel;
+ TQLabel* m_pCorner1Label;
+ TQLabel* m_pCorner2Label;
+ TQLabel* m_pCenterLabel;
+ TQLabel* m_pRadiusLabel;
PMFloatEdit* m_pThreshold;
PMFloatEdit* m_pAccuracy;
PMFloatEdit* m_pMaxGradient;
- QCheckBox* m_pEvaluate;
+ TQCheckBox* m_pEvaluate;
PMFloatEdit* m_pEvaluateValue[3];
- QCheckBox* m_pOpen;
+ TQCheckBox* m_pOpen;
PMIntEdit* m_pMaxTrace;
- QCheckBox* m_pAllIntersections;
+ TQCheckBox* m_pAllIntersections;
};
diff --git a/kpovmodeler/pmjuliafractal.cpp b/kpovmodeler/pmjuliafractal.cpp
index 49ca9de5..5929a058 100644
--- a/kpovmodeler/pmjuliafractal.cpp
+++ b/kpovmodeler/pmjuliafractal.cpp
@@ -32,9 +32,9 @@ const PMVector c_defaultSliceNormal = PMVector( 0.0, 0.0, 0.0, 1.0 );
const double c_defaultSliceDistance = 0.0;
const int c_defaultMaxIterations = 20;
const PMJuliaFractal::AlgebraType c_defaultAlgebraType = PMJuliaFractal::Quaternion;
-const QString c_defaultAlgebraString = "quaternion";
+const TQString c_defaultAlgebraString = "quaternion";
const PMJuliaFractal::FunctionType c_defaultFunctionType = PMJuliaFractal::FTsqr;
-const QString c_defaultFunctionString = "sqr";
+const TQString c_defaultFunctionString = "sqr";
const PMVector c_defaultExponent = PMVector( 0.0, 0.0 );
const double c_defaultPrecision = 20.0;
@@ -81,12 +81,12 @@ PMJuliaFractal::~PMJuliaFractal( )
{
}
-QString PMJuliaFractal::description( ) const
+TQString PMJuliaFractal::description( ) const
{
return i18n( "julia fractal" );
}
-void PMJuliaFractal::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMJuliaFractal::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "julia_parameter", m_juliaParameter.serializeXML( ) );
e.setAttribute( "algebra_type", algebraTypeToString( m_algebraType ) );
@@ -272,7 +272,7 @@ void PMJuliaFractal::setExponent( const PMVector& e )
}
}
-PMDialogEditBase* PMJuliaFractal::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMJuliaFractal::editWidget( TQWidget* parent ) const
{
return new PMJuliaFractalEdit( parent );
}
@@ -322,9 +322,9 @@ void PMJuliaFractal::restoreMemento( PMMemento* s )
Base::restoreMemento( s );
}
-QString PMJuliaFractal::functionTypeToString( PMJuliaFractal::FunctionType t )
+TQString PMJuliaFractal::functionTypeToString( PMJuliaFractal::FunctionType t )
{
- QString result = "sqr";
+ TQString result = "sqr";
switch( t )
{
case FTsqr:
@@ -385,7 +385,7 @@ QString PMJuliaFractal::functionTypeToString( PMJuliaFractal::FunctionType t )
return result;
}
-PMJuliaFractal::FunctionType PMJuliaFractal::stringToFunctionType( const QString& str )
+PMJuliaFractal::FunctionType PMJuliaFractal::stringToFunctionType( const TQString& str )
{
FunctionType t = c_defaultFunctionType;
@@ -428,9 +428,9 @@ PMJuliaFractal::FunctionType PMJuliaFractal::stringToFunctionType( const QString
return t;
}
-QString PMJuliaFractal::algebraTypeToString( PMJuliaFractal::AlgebraType t )
+TQString PMJuliaFractal::algebraTypeToString( PMJuliaFractal::AlgebraType t )
{
- QString result;
+ TQString result;
if( t == Quaternion )
result = "quaternion";
else
@@ -438,7 +438,7 @@ QString PMJuliaFractal::algebraTypeToString( PMJuliaFractal::AlgebraType t )
return result;
}
-PMJuliaFractal::AlgebraType PMJuliaFractal::stringToAlgebraType( const QString& str )
+PMJuliaFractal::AlgebraType PMJuliaFractal::stringToAlgebraType( const TQString& str )
{
AlgebraType t = c_defaultAlgebraType;
if( str == "quaternion" )
diff --git a/kpovmodeler/pmjuliafractal.h b/kpovmodeler/pmjuliafractal.h
index 1e93a46c..1a113aa4 100644
--- a/kpovmodeler/pmjuliafractal.h
+++ b/kpovmodeler/pmjuliafractal.h
@@ -58,7 +58,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMJuliaFractal( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -66,18 +66,18 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMJuliaFractalEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmjuliafractal" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmjuliafractal" ); }
/** */
virtual void restoreMemento( PMMemento* s );
@@ -146,10 +146,10 @@ public:
*/
void setExponent( const PMVector& p );
- static QString functionTypeToString( FunctionType t );
- static FunctionType stringToFunctionType( const QString& str );
- static QString algebraTypeToString( AlgebraType t );
- static AlgebraType stringToAlgebraType( const QString& str );
+ static TQString functionTypeToString( FunctionType t );
+ static FunctionType stringToFunctionType( const TQString& str );
+ static TQString algebraTypeToString( AlgebraType t );
+ static AlgebraType stringToAlgebraType( const TQString& str );
private:
/**
diff --git a/kpovmodeler/pmjuliafractaledit.cpp b/kpovmodeler/pmjuliafractaledit.cpp
index 43f351c5..4f595b0e 100644
--- a/kpovmodeler/pmjuliafractaledit.cpp
+++ b/kpovmodeler/pmjuliafractaledit.cpp
@@ -21,13 +21,13 @@
#include "pmvectoredit.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
#include <klocale.h>
#include <kmessagebox.h>
-PMJuliaFractalEdit::PMJuliaFractalEdit( QWidget* parent, const char* name )
+PMJuliaFractalEdit::PMJuliaFractalEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -37,24 +37,24 @@ void PMJuliaFractalEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* hl;
- QGridLayout* gl;
+ TQHBoxLayout* hl;
+ TQGridLayout* gl;
- topLayout( )->addWidget( new QLabel( i18n( "Julia parameter:" ), this ) );
+ topLayout( )->addWidget( new TQLabel( i18n( "Julia parameter:" ), this ) );
m_pJuliaParameter = new PMVectorEdit( "", "i", "j", "k", this );
topLayout( )->addWidget( m_pJuliaParameter );
- hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Algebra type:" ), this ) );
- m_pAlgebraType = new QComboBox( false, this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Algebra type:" ), this ) );
+ m_pAlgebraType = new TQComboBox( false, this );
m_pAlgebraType->insertItem( i18n( "Quaternion" ) );
m_pAlgebraType->insertItem( i18n( "Hypercomplex" ) );
hl->addWidget( m_pAlgebraType );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Function type:" ), this ) );
- m_pFunctionType = new QComboBox( false, this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Function type:" ), this ) );
+ m_pFunctionType = new TQComboBox( false, this );
m_pFunctionType->insertItem( "sqr" );
m_pFunctionType->insertItem( "cube" );
m_pFunctionType->insertItem( "exp" );
@@ -76,45 +76,45 @@ void PMJuliaFractalEdit::createTopWidgets( )
hl->addWidget( m_pFunctionType );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- m_pExponentsLabel = new QLabel( i18n( "Exponent:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ m_pExponentsLabel = new TQLabel( i18n( "Exponent:" ), this );
hl->addWidget( m_pExponentsLabel );
m_pExponents = new PMVectorEdit( "", "i", this );
hl->addWidget( m_pExponents );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- gl = new QGridLayout( hl, 2, 2 );
- gl->addWidget( new QLabel( i18n( "Maximum iterations:" ), this ), 0, 0 );
+ hl = new TQHBoxLayout( topLayout( ) );
+ gl = new TQGridLayout( hl, 2, 2 );
+ gl->addWidget( new TQLabel( i18n( "Maximum iterations:" ), this ), 0, 0 );
m_pMaxIterations = new PMIntEdit( this );
m_pMaxIterations->setValidation( true, 1, false, 0 );
gl->addWidget( m_pMaxIterations, 0, 1 );
- gl->addWidget( new QLabel( i18n( "Precision:" ), this ), 1, 0 );
+ gl->addWidget( new TQLabel( i18n( "Precision:" ), this ), 1, 0 );
m_pPrecision = new PMFloatEdit( this );
m_pPrecision->setValidation( true, 1.0, false, 0.0 );
gl->addWidget( m_pPrecision, 1, 1 );
hl->addStretch( 1 );
- topLayout( )->addWidget( new QLabel( i18n( "Slice normal:" ), this ) );
+ topLayout( )->addWidget( new TQLabel( i18n( "Slice normal:" ), this ) );
m_pSliceNormal = new PMVectorEdit( "", "i", "j", "k", this );
topLayout( )->addWidget( m_pSliceNormal );
- hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Slice distance:" ), this ) );
+ hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Slice distance:" ), this ) );
m_pSliceDistance = new PMFloatEdit( this );
hl->addWidget( m_pSliceDistance );
hl->addStretch( 1 );
- connect( m_pJuliaParameter, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pAlgebraType, SIGNAL( activated( int ) ),
- SLOT( slotAlgebraTypeSelected( int ) ) );
- connect( m_pFunctionType, SIGNAL( activated( int ) ),
- SLOT( slotFunctionTypeSelected( int ) ) );
- connect( m_pExponents, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pMaxIterations, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pPrecision, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pSliceNormal, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pSliceDistance, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pJuliaParameter, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pAlgebraType, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotAlgebraTypeSelected( int ) ) );
+ connect( m_pFunctionType, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotFunctionTypeSelected( int ) ) );
+ connect( m_pExponents, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pMaxIterations, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pPrecision, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pSliceNormal, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pSliceDistance, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMJuliaFractalEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmjuliafractaledit.h b/kpovmodeler/pmjuliafractaledit.h
index 598ea144..f2acb8f3 100644
--- a/kpovmodeler/pmjuliafractaledit.h
+++ b/kpovmodeler/pmjuliafractaledit.h
@@ -30,8 +30,8 @@ class PMJuliaFractal;
class PMVectorEdit;
class PMIntEdit;
class PMFloatEdit;
-class QComboBox;
-class QLabel;
+class TQComboBox;
+class TQLabel;
/**
* Dialog edit class for @ref PMJuliaFractal
@@ -44,7 +44,7 @@ public:
/**
* Creates a PMJuliaFractalEdit with parent and name
*/
- PMJuliaFractalEdit( QWidget* parent, const char* name = 0 );
+ PMJuliaFractalEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -65,10 +65,10 @@ protected slots:
private:
PMJuliaFractal* m_pDisplayedObject;
PMVectorEdit* m_pJuliaParameter;
- QComboBox* m_pAlgebraType;
- QComboBox* m_pFunctionType;
+ TQComboBox* m_pAlgebraType;
+ TQComboBox* m_pFunctionType;
PMVectorEdit* m_pExponents;
- QLabel* m_pExponentsLabel;
+ TQLabel* m_pExponentsLabel;
PMIntEdit* m_pMaxIterations;
PMFloatEdit* m_pPrecision;
PMVectorEdit* m_pSliceNormal;
diff --git a/kpovmodeler/pmlathe.cpp b/kpovmodeler/pmlathe.cpp
index f6c3c3c3..9f6a00ff 100644
--- a/kpovmodeler/pmlathe.cpp
+++ b/kpovmodeler/pmlathe.cpp
@@ -73,8 +73,8 @@ protected:
virtual bool setProtected( PMObject* obj, const PMVariant& var )
{
PMLathe* p = ( PMLathe* ) obj;
- QValueList<PMVector> list = p->points( );
- QValueList<PMVector>::Iterator it = list.begin( );
+ TQValueList<PMVector> list = p->points( );
+ TQValueList<PMVector>::Iterator it = list.begin( );
int i;
PMVector v = var.vectorData( );
v.resize( 2 );
@@ -95,8 +95,8 @@ protected:
virtual PMVariant getProtected( const PMObject* obj )
{
PMLathe* p = ( PMLathe* ) obj;
- QValueList<PMVector> list = p->points( );
- QValueList<PMVector>::ConstIterator it = list.at( m_index );
+ TQValueList<PMVector> list = p->points( );
+ TQValueList<PMVector>::ConstIterator it = list.at( m_index );
if( it == list.end( ) )
{
@@ -139,20 +139,20 @@ PMLathe::~PMLathe( )
{
}
-QString PMLathe::description( ) const
+TQString PMLathe::description( ) const
{
return i18n( "lathe" );
}
-void PMLathe::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMLathe::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
- QDomElement data = doc.createElement( "extra_data" );
- QDomElement p;
+ TQDomElement data = doc.createElement( "extra_data" );
+ TQDomElement p;
e.setAttribute( "spline_type", m_splineType );
e.setAttribute( "sturm", m_sturm );
- QValueList<PMVector>::ConstIterator it;
+ TQValueList<PMVector>::ConstIterator it;
for( it = m_points.begin( ); it != m_points.end( ); ++it )
{
p = doc.createElement( "point" );
@@ -172,18 +172,18 @@ void PMLathe::readAttributes( const PMXMLHelper& h )
m_points.clear( );
PMVector v( 2 );
- QDomElement e = h.extraData( );
+ TQDomElement e = h.extraData( );
if( !e.isNull( ) )
{
- QDomNode c = e.firstChild( );
+ TQDomNode c = e.firstChild( );
while( !c.isNull( ) )
{
if( c.isElement( ) )
{
- QDomElement ce = c.toElement( );
+ TQDomElement ce = c.toElement( );
if( ce.tagName( ) == "point" )
{
- QString str = ce.attribute( "vector" );
+ TQString str = ce.attribute( "vector" );
if( !str.isNull( ) )
{
v.loadXML( str );
@@ -249,7 +249,7 @@ void PMLathe::setSturm( bool s )
}
}
-void PMLathe::setPoints( const QValueList<PMVector>& points )
+void PMLathe::setPoints( const TQValueList<PMVector>& points )
{
if( m_points != points )
{
@@ -261,7 +261,7 @@ void PMLathe::setPoints( const QValueList<PMVector>& points )
}
}
-PMDialogEditBase* PMLathe::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMLathe::editWidget( TQWidget* parent ) const
{
return new PMLatheEdit( parent );
}
@@ -363,8 +363,8 @@ void PMLathe::createViewStructure( )
// calculate the spline segments
- QValueList<PMSplineSegment> segments;
- QValueList<PMVector>::Iterator it1, it2, it3, it4;
+ TQValueList<PMSplineSegment> segments;
+ TQValueList<PMVector>::Iterator it1, it2, it3, it4;
it1 = m_points.begin( );
it2 = it1; ++it2;
it3 = it2; ++it3;
@@ -463,7 +463,7 @@ void PMLathe::createViewStructure( )
}
// calculate the points
PMVector point2, point3;
- QValueList<PMSplineSegment>::Iterator sit = segments.begin( );
+ TQValueList<PMSplineSegment>::Iterator sit = segments.begin( );
int pi = 0;
double poffset = 1.0 / sSteps;
@@ -531,11 +531,11 @@ void PMLathe::createViewStructure( )
void PMLathe::controlPoints( PMControlPointList& list )
{
- QValueList<PMVector>::Iterator it;
+ TQValueList<PMVector>::Iterator it;
int i, d;
PM2DControlPoint* cp = 0;
- QPtrList<PM2DControlPoint> tmp[2];
+ TQPtrList<PM2DControlPoint> tmp[2];
for( d = 0; d < 2; ++d )
{
@@ -600,7 +600,7 @@ void PMLathe::controlPoints( PMControlPointList& list )
}
}
- QPtrListIterator<PM2DControlPoint> cit1( tmp[0] ), cit2( tmp[1] );
+ TQPtrListIterator<PM2DControlPoint> cit1( tmp[0] ), cit2( tmp[1] );
for( ; cit1.current( ) && cit2.current( ); ++cit1, ++cit2 )
{
@@ -616,7 +616,7 @@ void PMLathe::controlPoints( PMControlPointList& list )
void PMLathe::controlPointsChanged( PMControlPointList& list )
{
PMControlPointListIterator it1( list ), it2( list );
- QValueList<PMVector>::Iterator pit = m_points.begin( );
+ TQValueList<PMVector>::Iterator pit = m_points.begin( );
PM2DControlPoint* p1;
PM2DControlPoint* p2;
bool firstChange = true;
@@ -662,7 +662,7 @@ void PMLathe::controlPointsChanged( PMControlPointList& list )
}
void PMLathe::addObjectActions( const PMControlPointList& /*cp*/,
- QPtrList<PMObjectAction>& actions )
+ TQPtrList<PMObjectAction>& actions )
{
PMObjectAction* a;
@@ -697,7 +697,7 @@ void PMLathe::addObjectActions( const PMControlPointList& /*cp*/,
void PMLathe::objectActionCalled( const PMObjectAction* action,
const PMControlPointList& cp,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition )
{
if( action->objectType( ) == s_pMetaObject )
@@ -720,7 +720,7 @@ void PMLathe::objectActionCalled( const PMObjectAction* action,
}
void PMLathe::splitSegment( const PMControlPointList& /*cp*/,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition )
{
// find nearest segment
@@ -730,8 +730,8 @@ void PMLathe::splitSegment( const PMControlPointList& /*cp*/,
int i, j;
PMVector mid( 3 ), dist( 2 );
- QPtrListIterator<PMVector> it1( cpViewPosition );
- QPtrListIterator<PMVector> it2( cpViewPosition );
+ TQPtrListIterator<PMVector> it1( cpViewPosition );
+ TQPtrListIterator<PMVector> it2( cpViewPosition );
++it2;
for( j = 0; j < 2; ++j )
@@ -776,16 +776,16 @@ void PMLathe::splitSegment( const PMControlPointList& /*cp*/,
}
// add a new segment
- QValueList<PMVector> newPoints = m_points;
+ TQValueList<PMVector> newPoints = m_points;
if( m_splineType == BezierSpline )
{
ns /= 4;
ns *= 4;
}
- QValueList<PMVector>::Iterator it = newPoints.at( ( unsigned ) ns );
+ TQValueList<PMVector>::Iterator it = newPoints.at( ( unsigned ) ns );
PMVector p[4];
- QValueList<PMVector>::Iterator hit = it;
+ TQValueList<PMVector>::Iterator hit = it;
// calculate the spline segment
PMSplineSegment segment;
@@ -844,7 +844,7 @@ void PMLathe::splitSegment( const PMControlPointList& /*cp*/,
}
void PMLathe::joinSegments( const PMControlPointList& /*cp*/,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition )
{
// find nearest point
@@ -879,7 +879,7 @@ void PMLathe::joinSegments( const PMControlPointList& /*cp*/,
PMVector* p;
PMVector dist( 2 );
- QPtrListIterator<PMVector> it1( cpViewPosition );
+ TQPtrListIterator<PMVector> it1( cpViewPosition );
for( j = 0; j < 2; ++j )
{
@@ -901,8 +901,8 @@ void PMLathe::joinSegments( const PMControlPointList& /*cp*/,
}
// join two segments
- QValueList<PMVector> newPoints = m_points;
- QValueList<PMVector>::Iterator it;
+ TQValueList<PMVector> newPoints = m_points;
+ TQValueList<PMVector>::Iterator it;
if( m_splineType != BezierSpline )
{
diff --git a/kpovmodeler/pmlathe.h b/kpovmodeler/pmlathe.h
index 99986a6f..20fa55b3 100644
--- a/kpovmodeler/pmlathe.h
+++ b/kpovmodeler/pmlathe.h
@@ -26,8 +26,8 @@
#include "pmsolidobject.h"
#include "pmvector.h"
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
#include <math.h>
class PMViewStructure;
@@ -60,7 +60,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMLathe( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -68,18 +68,18 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMLatheEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmlathe" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmlathe" ); }
/** */
virtual void createMemento( );
@@ -95,21 +95,21 @@ public:
virtual bool multipleSelectControlPoints( ) const { return true; }
/** */
virtual void addObjectActions( const PMControlPointList&,
- QPtrList<PMObjectAction>& );
+ TQPtrList<PMObjectAction>& );
/** */
virtual void objectActionCalled( const PMObjectAction*,
const PMControlPointList&,
- const QPtrList<PMVector>&,
+ const TQPtrList<PMVector>&,
const PMVector& );
/**
* Returns the spline points
*/
- QValueList<PMVector> points( ) const { return m_points; }
+ TQValueList<PMVector> points( ) const { return m_points; }
/**
* Sets the spline points
*/
- void setPoints( const QValueList<PMVector>& points );
+ void setPoints( const TQValueList<PMVector>& points );
/**
* Returns the number of spline points
*/
@@ -159,17 +159,17 @@ private:
* Object action. Adds a spline point
*/
void splitSegment( const PMControlPointList& cp,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition );
/**
* Object action. Removes a spline point
*/
void joinSegments( const PMControlPointList& cp,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition );
- void stringToValues( const QString& str );
- QString valuesToString( ) const;
+ void stringToValues( const TQString& str );
+ TQString valuesToString( ) const;
/**
* IDs for @ref PMMementoData
@@ -180,7 +180,7 @@ private:
*/
enum PMLatheActionID { PMSplitSegmentID, PMJoinSegmentsID };
SplineType m_splineType;
- QValueList<PMVector> m_points;
+ TQValueList<PMVector> m_points;
bool m_sturm;
static int s_rSteps;
diff --git a/kpovmodeler/pmlatheedit.cpp b/kpovmodeler/pmlatheedit.cpp
index 970cc2f5..e90a4397 100644
--- a/kpovmodeler/pmlatheedit.cpp
+++ b/kpovmodeler/pmlatheedit.cpp
@@ -22,18 +22,18 @@
#include "pmvectorlistedit.h"
#include "pmpart.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <kdialog.h>
#include <kiconloader.h>
#include <kmessagebox.h>
-PMLatheEdit::PMLatheEdit( QWidget* parent, const char* name )
+PMLatheEdit::PMLatheEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -43,9 +43,9 @@ void PMLatheEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Spline type:" ), this ) );
- m_pSplineType = new QComboBox( false, this );
+ TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Spline type:" ), this ) );
+ m_pSplineType = new TQComboBox( false, this );
m_pSplineType->insertItem( i18n( "Linear Spline" ) );
m_pSplineType->insertItem( i18n( "Quadratic Spline" ) );
m_pSplineType->insertItem( i18n( "Cubic Spline" ) );
@@ -53,40 +53,40 @@ void PMLatheEdit::createTopWidgets( )
hl->addWidget( m_pSplineType );
hl->addStretch( 1 );
- connect( m_pSplineType, SIGNAL( activated( int ) ),
- SLOT( slotTypeChanged( int ) ) );
+ connect( m_pSplineType, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotTypeChanged( int ) ) );
}
void PMLatheEdit::createBottomWidgets( )
{
- topLayout( )->addWidget( new QLabel( i18n( "Spline points:" ), this ) );
+ topLayout( )->addWidget( new TQLabel( i18n( "Spline points:" ), this ) );
m_pPoints = new PMVectorListEdit( "u", "v", this );
- connect( m_pPoints, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pPoints, SIGNAL( selectionChanged( ) ),
- SLOT( slotSelectionChanged( ) ) );
- QHBoxLayout* hl = new QHBoxLayout( topLayout( ) );
+ connect( m_pPoints, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pPoints, TQT_SIGNAL( selectionChanged( ) ),
+ TQT_SLOT( slotSelectionChanged( ) ) );
+ TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) );
hl->addWidget( m_pPoints, 2 );
- m_pAddAbove = new QPushButton( this );
+ m_pAddAbove = new TQPushButton( this );
m_pAddAbove->setPixmap( SmallIcon( "pmaddpointabove" ) );
- m_pAddBelow = new QPushButton( this );
+ m_pAddBelow = new TQPushButton( this );
m_pAddBelow->setPixmap( SmallIcon( "pmaddpoint" ) );
- m_pRemove = new QPushButton( this );
+ m_pRemove = new TQPushButton( this );
m_pRemove->setPixmap( SmallIcon( "pmremovepoint" ) );
- connect( m_pAddAbove, SIGNAL( clicked( ) ), SLOT( slotAddPointAbove( ) ) );
- connect( m_pAddBelow, SIGNAL( clicked( ) ), SLOT( slotAddPointBelow( ) ) );
- connect( m_pRemove, SIGNAL( clicked( ) ), SLOT( slotRemovePoint( ) ) );
+ connect( m_pAddAbove, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPointAbove( ) ) );
+ connect( m_pAddBelow, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPointBelow( ) ) );
+ connect( m_pRemove, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemovePoint( ) ) );
- QVBoxLayout* bl = new QVBoxLayout( hl );
+ TQVBoxLayout* bl = new TQVBoxLayout( hl );
bl->addWidget( m_pAddAbove );
bl->addWidget( m_pAddBelow );
bl->addWidget( m_pRemove );
bl->addStretch( 1 );
- m_pSturm = new QCheckBox( i18n( "Sturm" ), this );
+ m_pSturm = new TQCheckBox( i18n( "Sturm" ), this );
topLayout( )->addWidget( m_pSturm );
- connect( m_pSturm, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pSturm, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
Base::createBottomWidgets( );
}
@@ -234,12 +234,12 @@ void PMLatheEdit::slotAddPointAbove( )
int index = m_pPoints->currentRow( );
if( index >= 0 )
{
- QValueList<PMVector> points = m_pPoints->vectors( );
- QValueListIterator<PMVector> it = points.at( index );
+ TQValueList<PMVector> points = m_pPoints->vectors( );
+ TQValueListIterator<PMVector> it = points.at( index );
if( it != points.end( ) )
{
- QValueListIterator<PMVector> it2 = it;
+ TQValueListIterator<PMVector> it2 = it;
it2--;
PMVector v;
if( it2 == points.end( ) )
@@ -261,12 +261,12 @@ void PMLatheEdit::slotAddPointBelow( )
int index = m_pPoints->currentRow( );
if( index >= 0 )
{
- QValueList<PMVector> points = m_pPoints->vectors( );
- QValueListIterator<PMVector> it = points.at( index );
+ TQValueList<PMVector> points = m_pPoints->vectors( );
+ TQValueListIterator<PMVector> it = points.at( index );
if( it != points.end( ) )
{
- QValueListIterator<PMVector> it2 = it;
+ TQValueListIterator<PMVector> it2 = it;
it2++;
PMVector v;
if( it2 == points.end( ) )
@@ -290,8 +290,8 @@ void PMLatheEdit::slotRemovePoint( )
if( row >= 0 )
{
- QValueList<PMVector> points = m_pPoints->vectors( );
- QValueListIterator<PMVector> it = points.at( row );
+ TQValueList<PMVector> points = m_pPoints->vectors( );
+ TQValueListIterator<PMVector> it = points.at( row );
if( it != points.end( ) && points.size( ) > 1 )
{
diff --git a/kpovmodeler/pmlatheedit.h b/kpovmodeler/pmlatheedit.h
index ad8cf835..92e92950 100644
--- a/kpovmodeler/pmlatheedit.h
+++ b/kpovmodeler/pmlatheedit.h
@@ -26,16 +26,16 @@
#include "pmsolidobjectedit.h"
#include "pmvectoredit.h"
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
class PMLathe;
class PMVectorListEdit;
-class QVBoxLayout;
-class QComboBox;
-class QCheckBox;
-class QPushButton;
-class QLabel;
+class TQVBoxLayout;
+class TQComboBox;
+class TQCheckBox;
+class TQPushButton;
+class TQLabel;
/**
* Dialog edit class for @ref PMLathe
@@ -48,7 +48,7 @@ public:
/**
* Creates a PMLatheEdit with parent and name
*/
- PMLatheEdit( QWidget* parent, const char* name = 0 );
+ PMLatheEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -77,12 +77,12 @@ private:
void updatePointButtons( );
PMLathe* m_pDisplayedObject;
- QComboBox* m_pSplineType;
- QCheckBox* m_pSturm;
+ TQComboBox* m_pSplineType;
+ TQCheckBox* m_pSturm;
PMVectorListEdit* m_pPoints;
- QPushButton* m_pAddAbove;
- QPushButton* m_pAddBelow;
- QPushButton* m_pRemove;
+ TQPushButton* m_pAddAbove;
+ TQPushButton* m_pAddBelow;
+ TQPushButton* m_pRemove;
};
diff --git a/kpovmodeler/pmlayoutsettings.cpp b/kpovmodeler/pmlayoutsettings.cpp
index 398e5354..1e20e326 100644
--- a/kpovmodeler/pmlayoutsettings.cpp
+++ b/kpovmodeler/pmlayoutsettings.cpp
@@ -21,150 +21,150 @@
#include "pmviewfactory.h"
#include "pmdebug.h"
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
#include <klocale.h>
#include <kmessagebox.h>
-PMLayoutSettings::PMLayoutSettings( QWidget* parent, const char* name )
+PMLayoutSettings::PMLayoutSettings( TQWidget* parent, const char* name )
: PMSettingsDialogPage( parent, name )
{
- QHBoxLayout* hlayout;
- QVBoxLayout* vlayout;
- QVBoxLayout* gvl;
- QGridLayout* grid;
- QGroupBox* gb;
- QGroupBox* gbe;
- QHBoxLayout* ghe;
- QVBoxLayout* gvle;
-
- vlayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) );
-
- hlayout = new QHBoxLayout( vlayout );
- hlayout->addWidget( new QLabel( i18n( "Default view layout:" ), this ) );
- m_pDefaultLayout = new QComboBox( this );
+ TQHBoxLayout* hlayout;
+ TQVBoxLayout* vlayout;
+ TQVBoxLayout* gvl;
+ TQGridLayout* grid;
+ TQGroupBox* gb;
+ TQGroupBox* gbe;
+ TQHBoxLayout* ghe;
+ TQVBoxLayout* gvle;
+
+ vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) );
+
+ hlayout = new TQHBoxLayout( vlayout );
+ hlayout->addWidget( new TQLabel( i18n( "Default view layout:" ), this ) );
+ m_pDefaultLayout = new TQComboBox( this );
hlayout->addWidget( m_pDefaultLayout, 1 );
hlayout->addStretch( 1 );
- gb = new QGroupBox( i18n( "Available View Layouts" ), this );
+ gb = new TQGroupBox( i18n( "Available View Layouts" ), this );
vlayout->addWidget( gb );
- gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
+ gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
gvl->addSpacing( 10 );
- grid = new QGridLayout( gvl, 3, 2 );
- m_pViewLayouts = new QListBox( gb );
- connect( m_pViewLayouts, SIGNAL( highlighted( int ) ),
- SLOT( slotLayoutSelected( int ) ) );
+ grid = new TQGridLayout( gvl, 3, 2 );
+ m_pViewLayouts = new TQListBox( gb );
+ connect( m_pViewLayouts, TQT_SIGNAL( highlighted( int ) ),
+ TQT_SLOT( slotLayoutSelected( int ) ) );
grid->addMultiCellWidget( m_pViewLayouts, 0, 2, 0, 0 );
- m_pAddLayout = new QPushButton( i18n( "Add" ), gb );
- connect( m_pAddLayout, SIGNAL( clicked( ) ), SLOT( slotAddLayout( ) ) );
+ m_pAddLayout = new TQPushButton( i18n( "Add" ), gb );
+ connect( m_pAddLayout, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddLayout( ) ) );
grid->addWidget( m_pAddLayout, 0, 1 );
- m_pRemoveLayout = new QPushButton( i18n( "Remove" ), gb );
- connect( m_pRemoveLayout, SIGNAL( clicked( ) ), SLOT( slotRemoveLayout( ) ) );
+ m_pRemoveLayout = new TQPushButton( i18n( "Remove" ), gb );
+ connect( m_pRemoveLayout, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemoveLayout( ) ) );
grid->addWidget( m_pRemoveLayout, 1, 1 );
grid->setRowStretch( 2, 1 );
- gbe = new QGroupBox( i18n( "View Layout" ), gb );
+ gbe = new TQGroupBox( i18n( "View Layout" ), gb );
gvl->addWidget( gbe );
- gvle = new QVBoxLayout( gbe, KDialog::marginHint( ), KDialog::spacingHint( ) );
+ gvle = new TQVBoxLayout( gbe, KDialog::marginHint( ), KDialog::spacingHint( ) );
gvle->addSpacing( 10 );
- ghe = new QHBoxLayout( gvle );
- ghe->addWidget( new QLabel( i18n( "Name:" ), gbe ) );
- m_pViewLayoutName = new QLineEdit( gbe );
- connect( m_pViewLayoutName, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotLayoutNameChanged( const QString& ) ) );
+ ghe = new TQHBoxLayout( gvle );
+ ghe->addWidget( new TQLabel( i18n( "Name:" ), gbe ) );
+ m_pViewLayoutName = new TQLineEdit( gbe );
+ connect( m_pViewLayoutName, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotLayoutNameChanged( const TQString& ) ) );
ghe->addWidget( m_pViewLayoutName );
- grid = new QGridLayout( gvle, 4, 2 );
- m_pViewEntries = new QListView( gbe );
+ grid = new TQGridLayout( gvle, 4, 2 );
+ m_pViewEntries = new TQListView( gbe );
m_pViewEntries->setAllColumnsShowFocus( true );
m_pViewEntries->addColumn( " " ); // This column is for the view entry number
m_pViewEntries->addColumn( i18n( "Type" ) );
m_pViewEntries->addColumn( i18n( "Position" ) );
m_pViewEntries->setSorting( -1 );
m_pViewEntries->setMaximumHeight( 150 );
- connect( m_pViewEntries, SIGNAL( selectionChanged( QListViewItem* ) ),
- SLOT( slotViewEntrySelected( QListViewItem* ) ) );
+ connect( m_pViewEntries, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ),
+ TQT_SLOT( slotViewEntrySelected( TQListViewItem* ) ) );
grid->addMultiCellWidget( m_pViewEntries, 0, 3, 0, 0 );
- m_pAddEntry = new QPushButton( i18n( "Add" ), gbe );
- connect( m_pAddEntry, SIGNAL( clicked( ) ), SLOT( slotAddViewEntryClicked( ) ) );
+ m_pAddEntry = new TQPushButton( i18n( "Add" ), gbe );
+ connect( m_pAddEntry, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddViewEntryClicked( ) ) );
grid->addWidget( m_pAddEntry, 0, 1 );
- m_pRemoveEntry = new QPushButton( i18n( "Remove" ), gbe );
- connect( m_pRemoveEntry, SIGNAL( clicked( ) ), SLOT( slotRemoveViewEntryClicked( ) ) );
+ m_pRemoveEntry = new TQPushButton( i18n( "Remove" ), gbe );
+ connect( m_pRemoveEntry, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemoveViewEntryClicked( ) ) );
grid->addWidget( m_pRemoveEntry, 1, 1 );
/* //TODO
- m_pMoveUpEntry = new QPushButton( i18n( "Move Up" ), gbe );
- connect( m_pMoveUpEntry, SIGNAL( clicked( ) ), SLOT( slotMoveUpViewEntryClicked( ) ) );
+ m_pMoveUpEntry = new TQPushButton( i18n( "Move Up" ), gbe );
+ connect( m_pMoveUpEntry, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotMoveUpViewEntryClicked( ) ) );
grid->addWidget( m_pMoveUpEntry, 2, 1 );
- m_pMoveDownEntry = new QPushButton( i18n( "Move Down" ), gbe );
- connect( m_pMoveDownEntry, SIGNAL( clicked( ) ), SLOT( slotMoveDownViewEntryClicked( ) ) );
+ m_pMoveDownEntry = new TQPushButton( i18n( "Move Down" ), gbe );
+ connect( m_pMoveDownEntry, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotMoveDownViewEntryClicked( ) ) );
grid->addWidget( m_pMoveDownEntry, 3, 1 );
*/
- QHBoxLayout* ghl = new QHBoxLayout( gvle );
- grid = new QGridLayout( ghl, 7, 4 );
- grid->addWidget( new QLabel( i18n( "Type:" ), gbe ), 0, 0 );
- grid->addWidget( new QLabel( i18n( "Dock position:" ), gbe ), 2, 0 );
- m_pColumnWidthLabel = new QLabel( i18n( "Column width:" ), gbe );
+ TQHBoxLayout* ghl = new TQHBoxLayout( gvle );
+ grid = new TQGridLayout( ghl, 7, 4 );
+ grid->addWidget( new TQLabel( i18n( "Type:" ), gbe ), 0, 0 );
+ grid->addWidget( new TQLabel( i18n( "Dock position:" ), gbe ), 2, 0 );
+ m_pColumnWidthLabel = new TQLabel( i18n( "Column width:" ), gbe );
grid->addWidget( m_pColumnWidthLabel, 3, 0 );
- m_pViewHeightLabel = new QLabel( i18n( "View height:" ), gbe );
+ m_pViewHeightLabel = new TQLabel( i18n( "View height:" ), gbe );
grid->addWidget( m_pViewHeightLabel, 4, 0 );
- m_pViewTypeEdit = new QComboBox( gbe );
+ m_pViewTypeEdit = new TQComboBox( gbe );
// insert all view types
- const QPtrList<PMViewTypeFactory>& types =
+ const TQPtrList<PMViewTypeFactory>& types =
PMViewFactory::theFactory( )->viewTypes( );
- QPtrListIterator<PMViewTypeFactory> it( types );
+ TQPtrListIterator<PMViewTypeFactory> it( types );
for( ; *it; ++it )
m_pViewTypeEdit->insertItem( ( *it )->description( ) );
- connect( m_pViewTypeEdit, SIGNAL( activated( int ) ),
- SLOT( slotViewTypeChanged( int ) ) );
+ connect( m_pViewTypeEdit, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotViewTypeChanged( int ) ) );
grid->addWidget( m_pViewTypeEdit, 0, 1 );
- m_pDockPositionEdit = new QComboBox( gbe );
+ m_pDockPositionEdit = new TQComboBox( gbe );
m_pDockPositionEdit->insertItem( i18n( "New Column" ) );
m_pDockPositionEdit->insertItem( i18n( "Below" ) );
m_pDockPositionEdit->insertItem( i18n( "Tabbed" ) );
m_pDockPositionEdit->insertItem( i18n( "Floating" ) );
- connect( m_pDockPositionEdit, SIGNAL( activated( int ) ),
- SLOT( slotDockPositionChanged( int ) ) );
+ connect( m_pDockPositionEdit, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotDockPositionChanged( int ) ) );
grid->addWidget( m_pDockPositionEdit, 2, 1 );
m_pColumnWidthEdit = new PMIntEdit( gbe );
- connect( m_pColumnWidthEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotColumnWidthChanged( const QString& ) ) );
+ connect( m_pColumnWidthEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotColumnWidthChanged( const TQString& ) ) );
grid->addWidget( m_pColumnWidthEdit, 3, 1 );
m_pViewHeightEdit = new PMIntEdit( gbe );
- connect( m_pViewHeightEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotViewHeightChanged( const QString& ) ) );
+ connect( m_pViewHeightEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotViewHeightChanged( const TQString& ) ) );
grid->addWidget( m_pViewHeightEdit, 4, 1 );
- m_pFloatingWidthLabel = new QLabel( i18n( "Width:" ), gbe );
- m_pFloatingHeightLabel = new QLabel( i18n( "Height:" ), gbe );
- m_pFloatingPosXLabel = new QLabel( i18n( "Position x:" ), gbe );
- m_pFloatingPosYLabel = new QLabel( QString( "y:" ), gbe );
+ m_pFloatingWidthLabel = new TQLabel( i18n( "Width:" ), gbe );
+ m_pFloatingHeightLabel = new TQLabel( i18n( "Height:" ), gbe );
+ m_pFloatingPosXLabel = new TQLabel( i18n( "Position x:" ), gbe );
+ m_pFloatingPosYLabel = new TQLabel( TQString( "y:" ), gbe );
grid->addWidget( m_pFloatingWidthLabel, 5, 0 );
grid->addWidget( m_pFloatingHeightLabel, 5, 2 );
grid->addWidget( m_pFloatingPosXLabel, 6, 0 );
grid->addWidget( m_pFloatingPosYLabel, 6, 2 );
m_pFloatingWidth = new PMIntEdit( gbe );
- connect( m_pFloatingWidth, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotFloatingWidthChanged( const QString& ) ) );
+ connect( m_pFloatingWidth, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotFloatingWidthChanged( const TQString& ) ) );
m_pFloatingHeight = new PMIntEdit( gbe );
- connect( m_pFloatingHeight, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotFloatingHeightChanged( const QString& ) ) );
+ connect( m_pFloatingHeight, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotFloatingHeightChanged( const TQString& ) ) );
m_pFloatingPosX = new PMIntEdit( gbe );
- connect( m_pFloatingPosX, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotFloatingPosXChanged( const QString& ) ) );
+ connect( m_pFloatingPosX, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotFloatingPosXChanged( const TQString& ) ) );
m_pFloatingPosY = new PMIntEdit( gbe );
- connect( m_pFloatingPosY, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotFloatingPosYChanged( const QString& ) ) );
+ connect( m_pFloatingPosY, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotFloatingPosYChanged( const TQString& ) ) );
grid->addWidget( m_pFloatingWidth, 5, 1 );
grid->addWidget( m_pFloatingHeight, 5, 3 );
grid->addWidget( m_pFloatingPosX, 6, 1 );
@@ -172,9 +172,9 @@ PMLayoutSettings::PMLayoutSettings( QWidget* parent, const char* name )
// create a holder widget for custom options widgets
m_pCustomOptionsWidget = 0;
- m_pCustomOptionsHolder = new QWidget( gbe );
+ m_pCustomOptionsHolder = new TQWidget( gbe );
- QVBoxLayout* covl = new QVBoxLayout( ghl );
+ TQVBoxLayout* covl = new TQVBoxLayout( ghl );
covl->addWidget( m_pCustomOptionsHolder );
covl->addStretch( 1 );
@@ -204,7 +204,7 @@ void PMLayoutSettings::displayDefaults( )
bool PMLayoutSettings::validateData( )
{
- QValueListIterator<PMViewLayout> lit;
+ TQValueListIterator<PMViewLayout> lit;
for( lit = m_viewLayouts.begin( ); lit != m_viewLayouts.end( ); ++lit )
{
if( ( *lit ).name( ).isEmpty( ) )
@@ -214,7 +214,7 @@ bool PMLayoutSettings::validateData( )
i18n( "Error" ) );
return false;
}
- QValueListIterator<PMViewLayoutEntry> eit = ( *lit ).begin( );
+ TQValueListIterator<PMViewLayoutEntry> eit = ( *lit ).begin( );
if( eit != ( *lit ).end( ) )
{
if( ( *eit ).dockPosition( ) != PMDockWidget::DockRight )
@@ -231,7 +231,7 @@ bool PMLayoutSettings::validateData( )
void PMLayoutSettings::applySettings( )
{
- QValueListIterator<PMViewLayout> lit;
+ TQValueListIterator<PMViewLayout> lit;
for( lit = m_viewLayouts.begin( ); lit != m_viewLayouts.end( ); ++lit )
( *lit ).normalize( );
PMViewLayoutManager::theManager( )->setDefaultLayout( m_pDefaultLayout->currentText( ) );
@@ -241,7 +241,7 @@ void PMLayoutSettings::applySettings( )
void PMLayoutSettings::displayLayoutList( )
{
- QValueListIterator<PMViewLayout> it;
+ TQValueListIterator<PMViewLayout> it;
m_pViewLayouts->clear( );
m_pDefaultLayout->clear( );
@@ -256,9 +256,9 @@ void PMLayoutSettings::displayLayoutList( )
void PMLayoutSettings::slotAddLayout( )
{
- QString new_name;
+ TQString new_name;
int i = 1;
- QString str;
+ TQString str;
new_name = i18n( "Unnamed" );
str.setNum( i );
@@ -301,7 +301,7 @@ void PMLayoutSettings::slotRemoveLayout( )
void PMLayoutSettings::slotLayoutSelected( int index )
{
int i;
- QString str;
+ TQString str;
bool sb;
m_currentViewLayout = m_viewLayouts.at( index );
@@ -313,14 +313,14 @@ void PMLayoutSettings::slotLayoutSelected( int index )
m_pViewLayoutName->blockSignals( sb );
PMViewLayout::iterator it;
- QListViewItem* previous = NULL;
+ TQListViewItem* previous = NULL;
m_pViewEntries->clear( );
i = 0;
for( it = ( *m_currentViewLayout ).begin( );
it != ( *m_currentViewLayout ).end( ); ++it )
{
i++; str.setNum( i );
- previous = new QListViewItem( m_pViewEntries, previous, str,
+ previous = new TQListViewItem( m_pViewEntries, previous, str,
( *it ).viewTypeAsString( ),
( *it ).dockPositionAsString( ) );
if( i == 1 )
@@ -330,7 +330,7 @@ void PMLayoutSettings::slotLayoutSelected( int index )
slotViewEntrySelected( 0 );
}
-void PMLayoutSettings::slotLayoutNameChanged( const QString& text )
+void PMLayoutSettings::slotLayoutNameChanged( const TQString& text )
{
int n_item = m_pViewLayouts->currentItem( );
bool sb = m_pViewLayouts->signalsBlocked( );
@@ -342,7 +342,7 @@ void PMLayoutSettings::slotLayoutNameChanged( const QString& text )
( *m_currentViewLayout ).setName( text );
- QValueListIterator<PMViewLayout> it;
+ TQValueListIterator<PMViewLayout> it;
m_pDefaultLayout->clear( );
for( it = m_viewLayouts.begin( ); it != m_viewLayouts.end( ); ++it )
{
@@ -352,7 +352,7 @@ void PMLayoutSettings::slotLayoutNameChanged( const QString& text )
}
}
-void PMLayoutSettings::slotViewEntrySelected( QListViewItem *item )
+void PMLayoutSettings::slotViewEntrySelected( TQListViewItem *item )
{
if( item )
{
@@ -362,14 +362,14 @@ void PMLayoutSettings::slotViewEntrySelected( QListViewItem *item )
int n_item = item->text( 0 ).toInt( ) - 1;
m_currentViewEntry = ( *m_currentViewLayout ).at( n_item );
- QString vt = ( *m_currentViewEntry ).viewType( );
+ TQString vt = ( *m_currentViewEntry ).viewType( );
// find the view type
int index = 0;
bool found = false;
- const QPtrList<PMViewTypeFactory>& types =
+ const TQPtrList<PMViewTypeFactory>& types =
PMViewFactory::theFactory( )->viewTypes( );
- QPtrListIterator<PMViewTypeFactory> it( types );
+ TQPtrListIterator<PMViewTypeFactory> it( types );
for( ; *it && !found; ++it )
{
@@ -506,9 +506,9 @@ void PMLayoutSettings::slotViewEntrySelected( QListViewItem *item )
void PMLayoutSettings::slotViewTypeChanged( int index )
{
- const QPtrList<PMViewTypeFactory>& types =
+ const TQPtrList<PMViewTypeFactory>& types =
PMViewFactory::theFactory( )->viewTypes( );
- QPtrListIterator<PMViewTypeFactory> it( types );
+ TQPtrListIterator<PMViewTypeFactory> it( types );
it += index;
const PMViewTypeFactory* factory = *it;
PMViewLayoutEntry& ve = ( *m_currentViewEntry );
@@ -518,7 +518,7 @@ void PMLayoutSettings::slotViewTypeChanged( int index )
ve.setViewType( factory->viewType( ) );
ve.setCustomOptions( factory->newOptionsInstance( ) );
- QListViewItem* item = m_pViewEntries->currentItem( );
+ TQListViewItem* item = m_pViewEntries->currentItem( );
if( item )
{
if( ve.customOptions( ) )
@@ -595,37 +595,37 @@ void PMLayoutSettings::slotDockPositionChanged( int index )
m_pFloatingPosYLabel->show( );
break;
}
- QListViewItem* item = m_pViewEntries->currentItem( );
+ TQListViewItem* item = m_pViewEntries->currentItem( );
if( item )
item->setText( 2, ( *m_currentViewEntry ).dockPositionAsString( ) );
}
-void PMLayoutSettings::slotViewHeightChanged( const QString& text )
+void PMLayoutSettings::slotViewHeightChanged( const TQString& text )
{
( *m_currentViewEntry ).setHeight( text.toInt( ) );
}
-void PMLayoutSettings::slotColumnWidthChanged( const QString& text )
+void PMLayoutSettings::slotColumnWidthChanged( const TQString& text )
{
( *m_currentViewEntry ).setColumnWidth( text.toInt( ) );
}
-void PMLayoutSettings::slotFloatingWidthChanged( const QString& text )
+void PMLayoutSettings::slotFloatingWidthChanged( const TQString& text )
{
( *m_currentViewEntry ).setFloatingWidth( text.toInt( ) );
}
-void PMLayoutSettings::slotFloatingHeightChanged( const QString& text )
+void PMLayoutSettings::slotFloatingHeightChanged( const TQString& text )
{
( *m_currentViewEntry ).setFloatingHeight( text.toInt( ) );
}
-void PMLayoutSettings::slotFloatingPosXChanged( const QString& text )
+void PMLayoutSettings::slotFloatingPosXChanged( const TQString& text )
{
( *m_currentViewEntry ).setFloatingPositionX( text.toInt( ) );
}
-void PMLayoutSettings::slotFloatingPosYChanged( const QString& text )
+void PMLayoutSettings::slotFloatingPosYChanged( const TQString& text )
{
( *m_currentViewEntry ).setFloatingPositionY( text.toInt( ) );
}
@@ -633,8 +633,8 @@ void PMLayoutSettings::slotFloatingPosYChanged( const QString& text )
void PMLayoutSettings::slotAddViewEntryClicked( )
{
PMViewLayoutEntry p;
- QString str;
- QListViewItem* temp;
+ TQString str;
+ TQListViewItem* temp;
temp = m_pViewEntries->currentItem( );
if( temp )
@@ -643,7 +643,7 @@ void PMLayoutSettings::slotAddViewEntryClicked( )
( *m_currentViewLayout ).addEntry( p, n_item );
n_item++;
str.setNum( n_item );
- QListViewItem* a = new QListViewItem( m_pViewEntries, temp,
+ TQListViewItem* a = new TQListViewItem( m_pViewEntries, temp,
str, p.viewTypeAsString( ),
p.dockPositionAsString( ) );
m_pViewEntries->setSelected( a, true );
@@ -661,7 +661,7 @@ void PMLayoutSettings::slotAddViewEntryClicked( )
// If there is no selected the list must be empty
( *m_currentViewLayout ).addEntry( p );
str.setNum( 1 );
- QListViewItem* a = new QListViewItem( m_pViewEntries, NULL,
+ TQListViewItem* a = new TQListViewItem( m_pViewEntries, NULL,
str, p.viewTypeAsString( ),
p.dockPositionAsString( ) );
m_pViewEntries->setSelected( a, true );
@@ -670,10 +670,10 @@ void PMLayoutSettings::slotAddViewEntryClicked( )
void PMLayoutSettings::slotRemoveViewEntryClicked( )
{
- QListViewItem* temp;
- QString str;
+ TQListViewItem* temp;
+ TQString str;
- QListViewItem* current = m_pViewEntries->currentItem( );
+ TQListViewItem* current = m_pViewEntries->currentItem( );
if( current )
{
int n_item = current->text( 0 ).toInt( ) - 1;
@@ -741,9 +741,9 @@ void PMLayoutSettings::displayCustomOptions( )
( *m_currentViewEntry ).customOptions( ) );
if( m_pCustomOptionsWidget )
{
- connect( m_pCustomOptionsWidget, SIGNAL( viewTypeDescriptionChanged( ) ),
- SLOT( slotViewTypeDescriptionChanged( ) ) );
- QHBoxLayout* hl = new QHBoxLayout( m_pCustomOptionsHolder,
+ connect( m_pCustomOptionsWidget, TQT_SIGNAL( viewTypeDescriptionChanged( ) ),
+ TQT_SLOT( slotViewTypeDescriptionChanged( ) ) );
+ TQHBoxLayout* hl = new TQHBoxLayout( m_pCustomOptionsHolder,
0, KDialog::spacingHint( ) );
hl->addWidget( m_pCustomOptionsWidget );
m_pCustomOptionsWidget->show( );
@@ -760,7 +760,7 @@ void PMLayoutSettings::slotViewTypeDescriptionChanged( )
if( factory )
{
- QListViewItem* item = m_pViewEntries->currentItem( );
+ TQListViewItem* item = m_pViewEntries->currentItem( );
if( item )
{
if( ve.customOptions( ) )
diff --git a/kpovmodeler/pmlayoutsettings.h b/kpovmodeler/pmlayoutsettings.h
index 4bca52e3..9671d38a 100644
--- a/kpovmodeler/pmlayoutsettings.h
+++ b/kpovmodeler/pmlayoutsettings.h
@@ -25,14 +25,14 @@
#include "pmsettingsdialog.h"
#include "pmviewlayoutmanager.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class PMIntEdit;
class PMViewOptionsWidget;
-class QComboBox;
-class QListBox;
-class QPushButton;
-class QLabel;
+class TQComboBox;
+class TQListBox;
+class TQPushButton;
+class TQLabel;
/**
* View layout configuration dialog page
@@ -44,7 +44,7 @@ public:
/**
* Default constructor
*/
- PMLayoutSettings( QWidget* parent, const char* name = 0 );
+ PMLayoutSettings( TQWidget* parent, const char* name = 0 );
/** */
virtual void displaySettings( );
/** */
@@ -70,11 +70,11 @@ protected slots:
/**
* Called when the layout name changes
*/
- void slotLayoutNameChanged( const QString& text );
+ void slotLayoutNameChanged( const TQString& text );
/**
* Called when the selected view entry changes
*/
- void slotViewEntrySelected( QListViewItem* text );
+ void slotViewEntrySelected( TQListViewItem* text );
/**
* Called when the view type field changes value
*/
@@ -90,27 +90,27 @@ protected slots:
/**
* Called when the view height field changes value
*/
- void slotViewHeightChanged( const QString& text );
+ void slotViewHeightChanged( const TQString& text );
/**
* Called when the column width field changes value
*/
- void slotColumnWidthChanged( const QString& text );
+ void slotColumnWidthChanged( const TQString& text );
/**
* Called when the floating height changes value
*/
- void slotFloatingHeightChanged( const QString& text );
+ void slotFloatingHeightChanged( const TQString& text );
/**
* Called when the floating width changes value
*/
- void slotFloatingWidthChanged( const QString& text );
+ void slotFloatingWidthChanged( const TQString& text );
/**
* Called when the floating position x changes value
*/
- void slotFloatingPosXChanged( const QString& text );
+ void slotFloatingPosXChanged( const TQString& text );
/**
* Called when the floating position y changes value
*/
- void slotFloatingPosYChanged( const QString& text );
+ void slotFloatingPosYChanged( const TQString& text );
/**
* Called when the add view entry button is clicked
*/
@@ -136,39 +136,39 @@ private:
void displayLayoutList( );
void displayCustomOptions( );
- QComboBox* m_pDefaultLayout;
- QListBox* m_pViewLayouts;
- QPushButton* m_pAddLayout;
- QPushButton* m_pRemoveLayout;
- QLineEdit* m_pViewLayoutName;
- QListView* m_pViewEntries;
- QPushButton* m_pAddEntry;
- QPushButton* m_pRemoveEntry;
- QPushButton* m_pMoveUpEntry;
- QPushButton* m_pMoveDownEntry;
- QComboBox* m_pViewTypeEdit;
- QComboBox* m_pDockPositionEdit;
+ TQComboBox* m_pDefaultLayout;
+ TQListBox* m_pViewLayouts;
+ TQPushButton* m_pAddLayout;
+ TQPushButton* m_pRemoveLayout;
+ TQLineEdit* m_pViewLayoutName;
+ TQListView* m_pViewEntries;
+ TQPushButton* m_pAddEntry;
+ TQPushButton* m_pRemoveEntry;
+ TQPushButton* m_pMoveUpEntry;
+ TQPushButton* m_pMoveDownEntry;
+ TQComboBox* m_pViewTypeEdit;
+ TQComboBox* m_pDockPositionEdit;
PMIntEdit* m_pColumnWidthEdit;
- QLabel* m_pColumnWidthLabel;
+ TQLabel* m_pColumnWidthLabel;
PMIntEdit* m_pViewHeightEdit;
- QLabel* m_pViewHeightLabel;
+ TQLabel* m_pViewHeightLabel;
PMIntEdit* m_pFloatingHeight;
PMIntEdit* m_pFloatingWidth;
- QLabel* m_pFloatingHeightLabel;
- QLabel* m_pFloatingWidthLabel;
+ TQLabel* m_pFloatingHeightLabel;
+ TQLabel* m_pFloatingWidthLabel;
PMIntEdit* m_pFloatingPosX;
PMIntEdit* m_pFloatingPosY;
- QLabel* m_pFloatingPosXLabel;
- QLabel* m_pFloatingPosYLabel;
+ TQLabel* m_pFloatingPosXLabel;
+ TQLabel* m_pFloatingPosYLabel;
PMViewOptionsWidget* m_pCustomOptionsWidget;
- QWidget* m_pCustomOptionsHolder;
+ TQWidget* m_pCustomOptionsHolder;
- QValueList<PMViewLayout> m_viewLayouts;
- QValueListIterator<PMViewLayout> m_currentViewLayout;
- QValueListIterator<PMViewLayout> m_defaultViewLayout;
- QValueListIterator<PMViewLayoutEntry> m_currentViewEntry;
+ TQValueList<PMViewLayout> m_viewLayouts;
+ TQValueListIterator<PMViewLayout> m_currentViewLayout;
+ TQValueListIterator<PMViewLayout> m_defaultViewLayout;
+ TQValueListIterator<PMViewLayoutEntry> m_currentViewEntry;
};
#endif
diff --git a/kpovmodeler/pmlibrarybrowser.cpp b/kpovmodeler/pmlibrarybrowser.cpp
index e133f08c..bc7e1af7 100644
--- a/kpovmodeler/pmlibrarybrowser.cpp
+++ b/kpovmodeler/pmlibrarybrowser.cpp
@@ -18,12 +18,12 @@
#include "pmlibrarybrowser.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qsplitter.h>
-#include <qtimer.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqsplitter.h>
+#include <tqtimer.h>
+#include <tqpushbutton.h>
#include <kio/job.h>
#include <kurl.h>
@@ -47,39 +47,39 @@
// ************** PMLibraryBrowser **************************
-PMLibraryBrowserView::PMLibraryBrowserView( PMPart* /*part*/, QWidget* parent /*= 0*/,
+PMLibraryBrowserView::PMLibraryBrowserView( PMPart* /*part*/, TQWidget* parent /*= 0*/,
const char* name /*=0*/ )
: PMViewBase( parent, name )
{
- QHBoxLayout* hl = new QHBoxLayout( this );
+ TQHBoxLayout* hl = new TQHBoxLayout( this );
PMLibraryBrowserViewWidget* tv = new PMLibraryBrowserViewWidget( this );
hl->addWidget( tv );
}
-QString PMLibraryBrowserView::description( ) const
+TQString PMLibraryBrowserView::description( ) const
{
return i18n( "Library View" );
}
-PMLibraryBrowserViewWidget::PMLibraryBrowserViewWidget( QWidget* parent, const char* name )
- : QWidget( parent, name )
+PMLibraryBrowserViewWidget::PMLibraryBrowserViewWidget( TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
setCaption( i18n( "Library Objects" ) );
- QVBoxLayout* vl = new QVBoxLayout( this, KDialog::spacingHint( ) );
+ TQVBoxLayout* vl = new TQVBoxLayout( this, KDialog::spacingHint( ) );
- QHBoxLayout* hl = new QHBoxLayout( vl );
+ TQHBoxLayout* hl = new TQHBoxLayout( vl );
- m_pUpButton = new QPushButton( this );
+ m_pUpButton = new TQPushButton( this );
m_pUpButton->setPixmap( SmallIcon( "up" ) );
- m_pNewSubLibraryButton = new QPushButton( this );
+ m_pNewSubLibraryButton = new TQPushButton( this );
m_pNewSubLibraryButton->setPixmap( SmallIcon( "folder_new" ) );
- m_pNewObjectButton = new QPushButton( this );
+ m_pNewObjectButton = new TQPushButton( this );
m_pNewObjectButton->setPixmap( SmallIcon( "filenew" ) );
- m_pDeleteObjectButton = new QPushButton( this );
+ m_pDeleteObjectButton = new TQPushButton( this );
m_pDeleteObjectButton->setPixmap( SmallIcon( "editdelete" ) );
- QLabel* lbl = new QLabel( i18n( "Library: " ), this );
- m_pLibraryComboBox = new QComboBox( this );
+ TQLabel* lbl = new TQLabel( i18n( "Library: " ), this );
+ m_pLibraryComboBox = new TQComboBox( this );
m_pLibraryComboBox->insertStringList( PMLibraryManager::theManager( )->availableLibraries( ) );
m_pLibraryComboBox->setDuplicatesEnabled( false );
m_pLibraryComboBox->setCurrentItem( 0 );
@@ -91,34 +91,34 @@ PMLibraryBrowserViewWidget::PMLibraryBrowserViewWidget( QWidget* parent, const c
hl->addWidget( m_pLibraryComboBox );
hl->addStretch( 1 );
- QSplitter *splitv = new QSplitter( this );
+ TQSplitter *splitv = new TQSplitter( this );
m_pLibraryIconView = new PMLibraryIconView( splitv );
m_pLibraryIconView->setMinimumSize( PMDialogEditBase::previewSize( )+20, PMDialogEditBase::previewSize( ) );
m_pLibraryEntryPreview = new PMLibraryEntryPreview( splitv );
vl->addWidget( splitv, 99 );
// Connect all the objects
- connect( m_pUpButton, SIGNAL( clicked( ) ), SLOT( slotUpButtonClicked( ) ) );
- connect( m_pNewSubLibraryButton, SIGNAL( clicked( ) ), SLOT( slotNewSubLibraryClicked( ) ) );
- connect( m_pNewObjectButton, SIGNAL( clicked( ) ), SLOT( slotNewObjectClicked( ) ) );
- connect( m_pDeleteObjectButton, SIGNAL( clicked( ) ), SLOT( slotDeleteClicked( ) ) );
- connect( m_pLibraryComboBox, SIGNAL( highlighted( const QString& ) ),
- SLOT( slotPathSelected( const QString& ) ) );
- connect( m_pLibraryIconView, SIGNAL( selectionChanged( QIconViewItem* ) ),
- SLOT( slotSelectionChanged( QIconViewItem* ) ) );
- connect( m_pLibraryIconView, SIGNAL( executed( QIconViewItem* ) ),
- SLOT( slotSelectionExecuted( QIconViewItem* ) ) );
- connect( m_pLibraryEntryPreview, SIGNAL( objectChanged( ) ), SLOT( slotIconViewRefresh( ) ) );
+ connect( m_pUpButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotUpButtonClicked( ) ) );
+ connect( m_pNewSubLibraryButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotNewSubLibraryClicked( ) ) );
+ connect( m_pNewObjectButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotNewObjectClicked( ) ) );
+ connect( m_pDeleteObjectButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotDeleteClicked( ) ) );
+ connect( m_pLibraryComboBox, TQT_SIGNAL( highlighted( const TQString& ) ),
+ TQT_SLOT( slotPathSelected( const TQString& ) ) );
+ connect( m_pLibraryIconView, TQT_SIGNAL( selectionChanged( TQIconViewItem* ) ),
+ TQT_SLOT( slotSelectionChanged( TQIconViewItem* ) ) );
+ connect( m_pLibraryIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ),
+ TQT_SLOT( slotSelectionExecuted( TQIconViewItem* ) ) );
+ connect( m_pLibraryEntryPreview, TQT_SIGNAL( objectChanged( ) ), TQT_SLOT( slotIconViewRefresh( ) ) );
// Set the selected library
slotPathSelected( m_pLibraryComboBox->currentText( ) );
}
-void PMLibraryBrowserViewWidget::resizeEvent( QResizeEvent* /*ev*/ )
+void PMLibraryBrowserViewWidget::resizeEvent( TQResizeEvent* /*ev*/ )
{
}
-void PMLibraryBrowserViewWidget::slotPathSelected( const QString& str )
+void PMLibraryBrowserViewWidget::slotPathSelected( const TQString& str )
{
PMLibraryHandle* h = PMLibraryManager::theManager( )->getLibraryHandle( str );
if( h )
@@ -154,28 +154,28 @@ void PMLibraryBrowserViewWidget::slotIconViewSetLibrary( )
m_pFutureLibrary = NULL;
}
-void PMLibraryBrowserViewWidget::slotSelectionChanged( QIconViewItem* item )
+void PMLibraryBrowserViewWidget::slotSelectionChanged( TQIconViewItem* item )
{
PMLibraryIconViewItem* sel = static_cast<PMLibraryIconViewItem*>( item );
m_pLibraryIconView->setCurrentItem( sel );
if( sel->isSubLibrary( ) )
{
if( m_pLibraryEntryPreview->saveIfNeeded( ) )
- QTimer::singleShot( 100, this, SLOT( slotIconViewRefresh( ) ) );
+ TQTimer::singleShot( 100, this, TQT_SLOT( slotIconViewRefresh( ) ) );
else
m_pLibraryEntryPreview->showPreview( sel->path( ), m_topLibraryReadOnly, true );
}
else
{
if( m_pLibraryEntryPreview->saveIfNeeded( ) )
- QTimer::singleShot( 100, this, SLOT( slotIconViewRefresh( ) ) );
+ TQTimer::singleShot( 100, this, TQT_SLOT( slotIconViewRefresh( ) ) );
else
m_pLibraryEntryPreview->showPreview( sel->path( ), m_topLibraryReadOnly, false );
}
m_pLibraryIconView->setFocus();
}
-void PMLibraryBrowserViewWidget::slotSelectionExecuted( QIconViewItem* item )
+void PMLibraryBrowserViewWidget::slotSelectionExecuted( TQIconViewItem* item )
{
PMLibraryIconViewItem* sel = static_cast<PMLibraryIconViewItem*>( item );
m_pLibraryIconView->setCurrentItem( sel );
@@ -184,14 +184,14 @@ void PMLibraryBrowserViewWidget::slotSelectionExecuted( QIconViewItem* item )
// It's a sub library
m_pFutureLibrary = new PMLibraryHandle( sel->path( ) );
m_pLibraryEntryPreview->clearPreview( );
- QTimer::singleShot( 100, this, SLOT( slotIconViewSetLibrary( ) ) );
+ TQTimer::singleShot( 100, this, TQT_SLOT( slotIconViewSetLibrary( ) ) );
m_pUpButton->setEnabled( true );
}
else
{
// It's an object
if( m_pLibraryEntryPreview->saveIfNeeded( ) )
- QTimer::singleShot( 100, this, SLOT( slotIconViewRefresh( ) ) );
+ TQTimer::singleShot( 100, this, TQT_SLOT( slotIconViewRefresh( ) ) );
else
m_pLibraryEntryPreview->showPreview( sel->path( ), m_topLibraryReadOnly, false );
}
@@ -200,13 +200,13 @@ void PMLibraryBrowserViewWidget::slotSelectionExecuted( QIconViewItem* item )
void PMLibraryBrowserViewWidget::slotUpButtonClicked( )
{
- QDir pathManipulator( m_pCurrentLibrary->path( ) );
+ TQDir pathManipulator( m_pCurrentLibrary->path( ) );
pathManipulator.cdUp( );
m_pFutureLibrary = new PMLibraryHandle( pathManipulator.path( ) );
if( !m_pFutureLibrary->isSubLibrary( ) )
m_pUpButton->setEnabled( false );
- QTimer::singleShot( 100, this, SLOT( slotIconViewSetLibrary( ) ) );
+ TQTimer::singleShot( 100, this, TQT_SLOT( slotIconViewSetLibrary( ) ) );
// Release the current Library
delete m_pCurrentLibrary;
@@ -228,7 +228,7 @@ void PMLibraryBrowserViewWidget::slotDeleteClicked( )
case PMLibraryHandle::Ok:
{
KIO::Job *job = KIO::del( sel->path() );
- connect( job, SIGNAL( result( KIO::Job * ) ), SLOT( slotJobResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), TQT_SLOT( slotJobResult( KIO::Job * ) ) );
}
break;
case PMLibraryHandle::ReadOnlyLib:
@@ -250,7 +250,7 @@ void PMLibraryBrowserViewWidget::slotNewObjectClicked( )
switch( m_pCurrentLibrary->createNewObject( ) )
{
case PMLibraryHandle::Ok:
- QTimer::singleShot( 100, this, SLOT( slotIconViewRefresh( ) ) );
+ TQTimer::singleShot( 100, this, TQT_SLOT( slotIconViewRefresh( ) ) );
break;
case PMLibraryHandle::ReadOnlyLib:
KMessageBox::error( this, i18n( "This library is read only." ), i18n( "Error" ) );
@@ -265,7 +265,7 @@ void PMLibraryBrowserViewWidget::slotNewSubLibraryClicked( )
bool result = false;
m_pLibraryEntryPreview->saveIfNeeded( );
- QString subLibraryName = KInputDialog::getText( i18n( "Create Sub-Library" ),
+ TQString subLibraryName = KInputDialog::getText( i18n( "Create Sub-Library" ),
i18n( "Enter the sub-library name: " ),
i18n( "Unknown" ),
&result );
@@ -293,10 +293,10 @@ void PMLibraryBrowserViewWidget::slotJobResult( KIO::Job * job )
{
if( job->error( ) )
job->showErrorDialog( this );
- QTimer::singleShot( 100, this, SLOT( slotIconViewRefresh( ) ) );
+ TQTimer::singleShot( 100, this, TQT_SLOT( slotIconViewRefresh( ) ) );
}
-QString PMLibraryBrowserViewFactory::description( ) const
+TQString PMLibraryBrowserViewFactory::description( ) const
{
return i18n( "Library View" );
}
diff --git a/kpovmodeler/pmlibrarybrowser.h b/kpovmodeler/pmlibrarybrowser.h
index 3d5af6ff..b7a2d881 100644
--- a/kpovmodeler/pmlibrarybrowser.h
+++ b/kpovmodeler/pmlibrarybrowser.h
@@ -23,15 +23,15 @@
#include <config.h>
#endif
-#include <qwidget.h>
-#include <qdict.h>
+#include <tqwidget.h>
+#include <tqdict.h>
#include "pmviewbase.h"
#include "pmviewfactory.h"
-class QComboBox;
-class QIconViewItem;
-class QPushButton;
+class TQComboBox;
+class TQIconViewItem;
+class TQPushButton;
class KConfig;
class KDirOperator;
class PMLibraryIconView;
@@ -40,7 +40,7 @@ class PMLibraryHandle;
class PMPart;
namespace KIO{ class Job; }
-typedef QDict<QString> QStringDict;
+typedef TQDict<TQString> QStringDict;
/**
* Wrapper class for the treeview/dock widget
@@ -52,12 +52,12 @@ public:
/**
* Default constructor
*/
- PMLibraryBrowserView( PMPart* part, QWidget* parent, const char* name = 0 );
+ PMLibraryBrowserView( PMPart* part, TQWidget* parent, const char* name = 0 );
/** */
- virtual QString viewType( ) const { return QString( "librarybrowserview" ); }
+ virtual TQString viewType( ) const { return TQString( "librarybrowserview" ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
};
/**
@@ -67,13 +67,13 @@ class PMLibraryBrowserViewWidget: public QWidget
{
Q_OBJECT
public:
- PMLibraryBrowserViewWidget( QWidget *parent, const char* name = NULL );
+ PMLibraryBrowserViewWidget( TQWidget *parent, const char* name = NULL );
private slots:
- void resizeEvent( QResizeEvent* ev );
- void slotPathSelected( const QString& str );
- void slotSelectionChanged( QIconViewItem* item );
- void slotSelectionExecuted( QIconViewItem* item );
+ void resizeEvent( TQResizeEvent* ev );
+ void slotPathSelected( const TQString& str );
+ void slotSelectionChanged( TQIconViewItem* item );
+ void slotSelectionExecuted( TQIconViewItem* item );
void slotUpButtonClicked( );
void slotDeleteClicked( );
void slotNewObjectClicked( );
@@ -88,11 +88,11 @@ private slots:
private:
- QPushButton* m_pUpButton;
- QPushButton* m_pNewSubLibraryButton;
- QPushButton* m_pNewObjectButton;
- QPushButton* m_pDeleteObjectButton;
- QComboBox* m_pLibraryComboBox;
+ TQPushButton* m_pUpButton;
+ TQPushButton* m_pNewSubLibraryButton;
+ TQPushButton* m_pNewObjectButton;
+ TQPushButton* m_pDeleteObjectButton;
+ TQComboBox* m_pLibraryComboBox;
PMLibraryIconView* m_pLibraryIconView;
PMLibraryEntryPreview* m_pLibraryEntryPreview;
PMLibraryHandle* m_pCurrentLibrary;
@@ -107,10 +107,10 @@ class PMLibraryBrowserViewFactory : public PMViewTypeFactory
{
public:
PMLibraryBrowserViewFactory( ) { }
- virtual QString viewType( ) const { return QString( "librarybrowserview" ); }
- virtual QString description( ) const;
- virtual QString iconName( ) const { return QString( "pmlibrarybrowserview" ); }
- virtual PMViewBase* newInstance( QWidget* parent, PMPart* part ) const
+ virtual TQString viewType( ) const { return TQString( "librarybrowserview" ); }
+ virtual TQString description( ) const;
+ virtual TQString iconName( ) const { return TQString( "pmlibrarybrowserview" ); }
+ virtual PMViewBase* newInstance( TQWidget* parent, PMPart* part ) const
{
return new PMLibraryBrowserView( part, parent );
}
diff --git a/kpovmodeler/pmlibraryentrypreview.cpp b/kpovmodeler/pmlibraryentrypreview.cpp
index b7232cdd..4fbde752 100644
--- a/kpovmodeler/pmlibraryentrypreview.cpp
+++ b/kpovmodeler/pmlibraryentrypreview.cpp
@@ -26,12 +26,12 @@
#include "pmscene.h"
#include "pmobjectdrag.h"
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qmultilineedit.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qdragobject.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqmultilineedit.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqdragobject.h>
#include <kurl.h>
#include <klocale.h>
@@ -39,8 +39,8 @@
#include <kmessagebox.h>
#include <kfiledialog.h>
-PMLibraryEntryPreview::PMLibraryEntryPreview( QWidget* parent ) :
- QWidget( parent )
+PMLibraryEntryPreview::PMLibraryEntryPreview( TQWidget* parent ) :
+ TQWidget( parent )
{
setAcceptDrops( true );
m_pPart = new PMPart( this, "treeview", NULL, "part", false, true );
@@ -50,71 +50,71 @@ PMLibraryEntryPreview::PMLibraryEntryPreview( QWidget* parent ) :
m_subLib = false;
setMaximumSize( 1000, 1000 );
- QVBoxLayout* vl = new QVBoxLayout( this, KDialog::spacingHint( ) );
+ TQVBoxLayout* vl = new TQVBoxLayout( this, KDialog::spacingHint( ) );
- QHBoxLayout* hl = new QHBoxLayout( vl );
+ TQHBoxLayout* hl = new TQHBoxLayout( vl );
hl->addStretch( 1 );
- QGridLayout* gl = new QGridLayout( vl, 4, 2 );
+ TQGridLayout* gl = new TQGridLayout( vl, 4, 2 );
gl->setColStretch( 1, 1 );
- QLabel* lbl = new QLabel( i18n( "Name: " ), this );
- m_pName = new QLineEdit( this );
+ TQLabel* lbl = new TQLabel( i18n( "Name: " ), this );
+ m_pName = new TQLineEdit( this );
m_pName->setAlignment( Qt::AlignLeft );
m_pName->setReadOnly( true );
gl->addWidget( lbl, 0, 0 );
gl->addWidget( m_pName, 0, 1 );
- lbl = new QLabel( i18n( "Description:" ), this );
+ lbl = new TQLabel( i18n( "Description:" ), this );
lbl->setAlignment( Qt::AlignTop );
- m_pDescription = new QMultiLineEdit( this );
+ m_pDescription = new TQMultiLineEdit( this );
m_pDescription->setAlignment( Qt::AlignTop | Qt::AlignLeft |
Qt::WordBreak | Qt::DontClip );
m_pDescription->setReadOnly( true );
gl->addWidget( lbl, 1, 0 );
gl->addWidget( m_pDescription, 1, 1 );
- m_pKeywordsLabel = new QLabel( i18n( "Keywords:" ), this );
+ m_pKeywordsLabel = new TQLabel( i18n( "Keywords:" ), this );
m_pKeywordsLabel->setAlignment( Qt::AlignTop );
- m_pKeywords = new QMultiLineEdit( this );
+ m_pKeywords = new TQMultiLineEdit( this );
m_pKeywords->setAlignment( Qt::AlignTop | Qt::AlignLeft |
Qt::WordBreak | Qt::DontClip );
m_pKeywords->setReadOnly( true );
gl->addWidget( m_pKeywordsLabel, 2, 0 );
gl->addWidget( m_pKeywords, 2, 1 );
- m_pContentsLabel = new QLabel( i18n( "Contents:" ), this );
+ m_pContentsLabel = new TQLabel( i18n( "Contents:" ), this );
m_pContentsPreview = new PMTreeView( m_pPart, this );
gl->addMultiCellWidget( m_pContentsLabel, 3, 3, 0, 1 );
gl->addMultiCellWidget( m_pContentsPreview, 4, 4, 0, 1 );
gl->setRowStretch(4, 1);
- hl = new QHBoxLayout( vl );
+ hl = new TQHBoxLayout( vl );
hl->addStretch( 1 );
- m_pSetPreviewImageButton = new QPushButton( i18n( "Change Preview Image" ), this );
+ m_pSetPreviewImageButton = new TQPushButton( i18n( "Change Preview Image" ), this );
m_pSetPreviewImageButton->setEnabled( false );
hl->addWidget( m_pSetPreviewImageButton );
- hl = new QHBoxLayout( vl );
+ hl = new TQHBoxLayout( vl );
hl->addStretch( 1 );
- m_pApplyChanges = new QPushButton( i18n( "&Apply" ), this );
+ m_pApplyChanges = new TQPushButton( i18n( "&Apply" ), this );
m_pApplyChanges->setEnabled( false );
hl->addWidget( m_pApplyChanges );
- m_pCancelChanges = new QPushButton( i18n( "&Cancel" ), this );
+ m_pCancelChanges = new TQPushButton( i18n( "&Cancel" ), this );
m_pCancelChanges->setEnabled( false );
hl->addWidget( m_pCancelChanges );
- connect( m_pName, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotTextChanged( const QString& ) ) );
- connect( m_pDescription, SIGNAL( textChanged( ) ),
- SLOT( slotTextChanged( ) ) );
- connect( m_pKeywords, SIGNAL( textChanged( ) ),
- SLOT( slotTextChanged( ) ) );
- connect( m_pSetPreviewImageButton, SIGNAL( clicked( ) ),
- SLOT( slotPreviewClicked( ) ) );
- connect( m_pPart, SIGNAL( modified( ) ),
- SLOT( slotTextChanged( ) ) );
- connect( m_pApplyChanges, SIGNAL( clicked( ) ), SLOT( slotApplyClicked( ) ) );
- connect( m_pCancelChanges, SIGNAL( clicked( ) ), SLOT( slotCancelClicked( ) ) );
+ connect( m_pName, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotTextChanged( const TQString& ) ) );
+ connect( m_pDescription, TQT_SIGNAL( textChanged( ) ),
+ TQT_SLOT( slotTextChanged( ) ) );
+ connect( m_pKeywords, TQT_SIGNAL( textChanged( ) ),
+ TQT_SLOT( slotTextChanged( ) ) );
+ connect( m_pSetPreviewImageButton, TQT_SIGNAL( clicked( ) ),
+ TQT_SLOT( slotPreviewClicked( ) ) );
+ connect( m_pPart, TQT_SIGNAL( modified( ) ),
+ TQT_SLOT( slotTextChanged( ) ) );
+ connect( m_pApplyChanges, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotApplyClicked( ) ) );
+ connect( m_pCancelChanges, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotCancelClicked( ) ) );
vl->addStretch( 1 );
}
@@ -172,7 +172,7 @@ bool PMLibraryEntryPreview::showPreview( KURL u, bool readOnly, bool subLib )
return result;
}
-void PMLibraryEntryPreview::loadObjects( QByteArray* obj )
+void PMLibraryEntryPreview::loadObjects( TQByteArray* obj )
{
m_pPart->setReadWrite( true );
@@ -236,17 +236,17 @@ void PMLibraryEntryPreview::slotTextChanged( )
setModified( true );
}
-void PMLibraryEntryPreview::slotTextChanged( const QString& /* s */)
+void PMLibraryEntryPreview::slotTextChanged( const TQString& /* s */)
{
setModified( true );
}
void PMLibraryEntryPreview::slotPreviewClicked( )
{
- KFileDialog dlg( QString::null, "", NULL, "", false );
+ KFileDialog dlg( TQString::null, "", NULL, "", false );
dlg.setFilter( "image/jpeg image/gif image/tiff image/png image/x-bmp" );
- if( dlg.exec( ) == QDialog::Accepted )
+ if( dlg.exec( ) == TQDialog::Accepted )
{
m_image.load( dlg.selectedFile( ) );
setModified( true );
@@ -319,15 +319,15 @@ bool PMLibraryEntryPreview::saveIfNeeded( bool forceSave )
return false;
}
-void PMLibraryEntryPreview::dragEnterEvent( QDragEnterEvent* event )
+void PMLibraryEntryPreview::dragEnterEvent( TQDragEnterEvent* event )
{
- event->accept( !m_readOnly && QImageDrag::canDecode( event ) );
+ event->accept( !m_readOnly && TQImageDrag::canDecode( event ) );
}
-void PMLibraryEntryPreview::dropEvent( QDropEvent* event )
+void PMLibraryEntryPreview::dropEvent( TQDropEvent* event )
{
- QImage img;
- if( QImageDrag::decode( event, img ) )
+ TQImage img;
+ if( TQImageDrag::decode( event, img ) )
{
m_image = img;
setModified( true );
diff --git a/kpovmodeler/pmlibraryentrypreview.h b/kpovmodeler/pmlibraryentrypreview.h
index 95077299..18736458 100644
--- a/kpovmodeler/pmlibraryentrypreview.h
+++ b/kpovmodeler/pmlibraryentrypreview.h
@@ -23,16 +23,16 @@
#include <config.h>
#endif
-#include <qwidget.h>
-#include <qimage.h>
+#include <tqwidget.h>
+#include <tqimage.h>
#include <kurl.h>
-class QLabel;
-class QLineEdit;
-class QMultiLineEdit;
-class QPushButton;
-class QFrame;
+class TQLabel;
+class TQLineEdit;
+class TQMultiLineEdit;
+class TQPushButton;
+class TQFrame;
class PMPart;
class PMTreeView;
@@ -44,7 +44,7 @@ class PMLibraryEntryPreview: public QWidget
Q_OBJECT
public:
/** Constructor */
- PMLibraryEntryPreview( QWidget *parent );
+ PMLibraryEntryPreview( TQWidget *parent );
/** Destructor */
~PMLibraryEntryPreview( );
@@ -73,15 +73,15 @@ signals:
void objectChanged( );
protected:
- virtual void dragEnterEvent( QDragEnterEvent* event );
+ virtual void dragEnterEvent( TQDragEnterEvent* event );
- virtual void dropEvent( QDropEvent* event );
+ virtual void dropEvent( TQDropEvent* event );
private slots:
/** Called when description or keywords are changed */
void slotTextChanged( );
/** Called when the name is changed */
- void slotTextChanged( const QString& s );
+ void slotTextChanged( const TQString& s );
/** Called when the set preview button is clicked */
void slotPreviewClicked( );
/** Called when the apply button is clicked */
@@ -91,24 +91,24 @@ private slots:
private:
/** Called to load the object tree. */
- void loadObjects( QByteArray* obj );
+ void loadObjects( TQByteArray* obj );
/** Sets whether the object is read only or not */
void setReadOnly( bool b );
/** Sets whether the object is modified or not */
void setModified( bool modified );
PMPart* m_pPart;
- QLineEdit* m_pName;
- QMultiLineEdit* m_pDescription;
- QLabel* m_pKeywordsLabel;
- QMultiLineEdit* m_pKeywords;
- QLabel* m_pContentsLabel;
+ TQLineEdit* m_pName;
+ TQMultiLineEdit* m_pDescription;
+ TQLabel* m_pKeywordsLabel;
+ TQMultiLineEdit* m_pKeywords;
+ TQLabel* m_pContentsLabel;
PMTreeView* m_pContentsPreview;
- QPushButton* m_pSetPreviewImageButton;
- QPushButton* m_pApplyChanges;
- QPushButton* m_pCancelChanges;
+ TQPushButton* m_pSetPreviewImageButton;
+ TQPushButton* m_pApplyChanges;
+ TQPushButton* m_pCancelChanges;
- QImage m_image;
+ TQImage m_image;
KURL m_currentURL;
bool m_modified;
diff --git a/kpovmodeler/pmlibraryhandle.cpp b/kpovmodeler/pmlibraryhandle.cpp
index 7902f789..8ba0f387 100644
--- a/kpovmodeler/pmlibraryhandle.cpp
+++ b/kpovmodeler/pmlibraryhandle.cpp
@@ -21,11 +21,11 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qdom.h>
-#include <qtextstream.h>
-#include <qimage.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
+#include <tqimage.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -43,7 +43,7 @@ PMLibraryHandle::PMLibraryHandle( )
m_libraries.setAutoDelete( true );
}
-PMLibraryHandle::PMLibraryHandle( const QString& path )
+PMLibraryHandle::PMLibraryHandle( const TQString& path )
{
setPath( path );
setAuthor( i18n( "Unknown" ) );
@@ -57,23 +57,23 @@ PMLibraryHandle::~PMLibraryHandle( )
{
}
-void PMLibraryHandle::setName( const QString& name )
+void PMLibraryHandle::setName( const TQString& name )
{
m_name = name;
}
-void PMLibraryHandle::setPath( const QString& path )
+void PMLibraryHandle::setPath( const TQString& path )
{
m_objects.clear( );
m_path = path;
}
-void PMLibraryHandle::setAuthor( const QString& author )
+void PMLibraryHandle::setAuthor( const TQString& author )
{
m_author = author;
}
-void PMLibraryHandle::setDescription( const QString& description )
+void PMLibraryHandle::setDescription( const TQString& description )
{
m_description = description;
}
@@ -86,7 +86,7 @@ void PMLibraryHandle::setReadOnly( const bool rdOnly )
void PMLibraryHandle::loadLibraryInfo( )
{
// 1. Open the information file (library_index.xml)
- QFile file( m_path + "/library_index.xml" );
+ TQFile file( m_path + "/library_index.xml" );
if( !file.open( IO_ReadOnly ) )
{
@@ -95,10 +95,10 @@ void PMLibraryHandle::loadLibraryInfo( )
}
// 2. Read the information
- QDomDocument doc( "KPOVLIBINDEX" );
+ TQDomDocument doc( "KPOVLIBINDEX" );
doc.setContent( &file );
- QDomElement e = doc.documentElement( );
+ TQDomElement e = doc.documentElement( );
if( e.tagName( ) != "library" )
{
@@ -121,12 +121,12 @@ void PMLibraryHandle::loadLibraryInfo( )
m_subLibrary = true;
// 4. The object entries
- QDomNode n = e.firstChild( );
+ TQDomNode n = e.firstChild( );
if( !n.isNull( ) )
{
if( n.isElement( ) )
{
- QDomElement c = n.toElement( );
+ TQDomElement c = n.toElement( );
if( c.tagName( ) == "object_list" )
{
n = n.firstChild( );
@@ -136,12 +136,12 @@ void PMLibraryHandle::loadLibraryInfo( )
if( c.tagName( ) == "object_entry" )
{
m_objects.insert( c.attribute( "name", i18n( "Unknown" ) ),
- new QString( c.attribute( "file", "" ) ) );
+ new TQString( c.attribute( "file", "" ) ) );
}
else if( c.tagName( ) == "library_entry" )
{
m_libraries.insert( c.attribute( "name", i18n( "Unknown" ) ),
- new QString( c.attribute( "file", "" ) ) );
+ new TQString( c.attribute( "file", "" ) ) );
}
n = n.nextSibling( );
}
@@ -153,7 +153,7 @@ void PMLibraryHandle::loadLibraryInfo( )
PMLibraryHandle::PMResult PMLibraryHandle::createLibrary( )
{
// Test if the library exists.
- QDir d( m_path );
+ TQDir d( m_path );
if( !d.exists( ) )
{
@@ -174,15 +174,15 @@ PMLibraryHandle::PMResult PMLibraryHandle::createLibrary( )
PMLibraryHandle::PMResult PMLibraryHandle::saveLibraryInfo( )
{
// Save the information to the index
- QFile file( m_path + "/library_index.xml" );
+ TQFile file( m_path + "/library_index.xml" );
if( !file.open( IO_WriteOnly ) )
{
return PMLibraryHandle::CouldNotCreateInfo;
}
// Create the XML DOM tree
- QDomDocument doc( "KPOVLIBINDEX" );
- QDomElement e = doc.createElement( "library" );
+ TQDomDocument doc( "KPOVLIBINDEX" );
+ TQDomElement e = doc.createElement( "library" );
e.setAttribute( "name", name( ) );
e.setAttribute( "author", author( ) );
e.setAttribute( "description", description( ) );
@@ -197,17 +197,17 @@ PMLibraryHandle::PMResult PMLibraryHandle::saveLibraryInfo( )
e.setAttribute( "sublibrary", "false" );
// Add the object list to the tree
- QDomElement l = doc.createElement( "object_list" );
- for(QDictIterator<QString> it( m_objects ); it.current( ); ++it )
+ TQDomElement l = doc.createElement( "object_list" );
+ for(TQDictIterator<TQString> it( m_objects ); it.current( ); ++it )
{
- QDomElement n = doc.createElement( "object_entry" );
+ TQDomElement n = doc.createElement( "object_entry" );
n.setAttribute( "name", it.currentKey( ) );
n.setAttribute( "file", *( it.current( ) ) );
l.appendChild( n );
}
- for(QDictIterator<QString> it( m_libraries ); it.current( ); ++it )
+ for(TQDictIterator<TQString> it( m_libraries ); it.current( ); ++it )
{
- QDomElement n = doc.createElement( "library_entry" );
+ TQDomElement n = doc.createElement( "library_entry" );
n.setAttribute( "name", it.currentKey( ) );
n.setAttribute( "file", *( it.current( ) ) );
l.appendChild( n );
@@ -216,8 +216,8 @@ PMLibraryHandle::PMResult PMLibraryHandle::saveLibraryInfo( )
doc.appendChild( e );
// Save to the file
- QTextStream str( &file );
- str.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream str( &file );
+ str.setEncoding( TQTextStream::UnicodeUTF8 );
str << doc.toString( );
file.close( );
@@ -230,16 +230,16 @@ PMLibraryHandle::PMResult PMLibraryHandle::createNewObject( )
return PMLibraryHandle::CouldNotCreateFile;
/*
PMLibraryObject aux;
- QCString s = m_path.latin1( );
- QString unknownIcon = locate( "data" , "kpovmodeler/questionmark.png" );
- QImage img;
+ TQCString s = m_path.latin1( );
+ TQString unknownIcon = locate( "data" , "kpovmodeler/questionmark.png" );
+ TQImage img;
int fh;
if( m_readOnly )
return PMLibraryHandle::ReadOnlyLib;
aux.setName( i18n( "Empty" ) );
- aux.setObjects( QByteArray( ) );
+ aux.setObjects( TQByteArray( ) );
img.load( unknownIcon, "PNG" );
aux.setPreview( img );
@@ -252,24 +252,24 @@ PMLibraryHandle::PMResult PMLibraryHandle::createNewObject( )
// Success creating the file
close( fh );
- m_objects.insert( i18n( "Empty" ), new QString( s ) );
+ m_objects.insert( i18n( "Empty" ), new TQString( s ) );
aux.save( s );
saveLibraryInfo( );
return PMLibraryHandle::Ok;
*/
}
-PMLibraryHandle::PMResult PMLibraryHandle::addObject( const QString& path, const QString& name )
+PMLibraryHandle::PMResult PMLibraryHandle::addObject( const TQString& path, const TQString& name )
{
if( m_readOnly )
return PMLibraryHandle::ReadOnlyLib;
- m_objects.insert( name, new QString( path ) );
+ m_objects.insert( name, new TQString( path ) );
saveLibraryInfo( );
return PMLibraryHandle::Ok;
}
-PMLibraryHandle::PMResult PMLibraryHandle::deleteObject( const QString& objectName )
+PMLibraryHandle::PMResult PMLibraryHandle::deleteObject( const TQString& objectName )
{
if( m_readOnly )
return PMLibraryHandle::ReadOnlyLib;
@@ -290,13 +290,13 @@ PMLibraryHandle::PMResult PMLibraryHandle::deleteObject( const QString& objectNa
return PMLibraryHandle::NotInLib;
}
-PMLibraryHandle::PMResult PMLibraryHandle::createNewSubLibrary( const QString /*subLibName*/ )
+PMLibraryHandle::PMResult PMLibraryHandle::createNewSubLibrary( const TQString /*subLibName*/ )
{
/// @todo Need to replace mkdtemp and mkstemps before enabling libs
return PMLibraryHandle::CouldNotCreateFile;
/*
char* dirname;
- QCString s = m_path.latin1( );
+ TQCString s = m_path.latin1( );
PMLibraryHandle aux;
if( m_readOnly )
@@ -316,23 +316,23 @@ PMLibraryHandle::PMResult PMLibraryHandle::createNewSubLibrary( const QString /*
aux.setAuthor( author( ) );
aux.setPath( dirname );
aux.saveLibraryInfo( );
- m_libraries.insert( subLibName, new QString( dirname ) );
+ m_libraries.insert( subLibName, new TQString( dirname ) );
saveLibraryInfo( );
return PMLibraryHandle::Ok;
*/
}
-PMLibraryHandle::PMResult PMLibraryHandle::addSubLibrary( const QString& path, const QString& subLibName )
+PMLibraryHandle::PMResult PMLibraryHandle::addSubLibrary( const TQString& path, const TQString& subLibName )
{
if( m_readOnly )
return PMLibraryHandle::ReadOnlyLib;
- m_libraries.insert( subLibName, new QString( path ) );
+ m_libraries.insert( subLibName, new TQString( path ) );
saveLibraryInfo( );
return PMLibraryHandle::Ok;
}
-PMLibraryHandle::PMResult PMLibraryHandle::deleteSubLibrary( const QString& subLibName )
+PMLibraryHandle::PMResult PMLibraryHandle::deleteSubLibrary( const TQString& subLibName )
{
if( m_readOnly )
return PMLibraryHandle::ReadOnlyLib;
@@ -353,25 +353,25 @@ PMLibraryHandle::PMResult PMLibraryHandle::deleteSubLibrary( const QString& subL
return PMLibraryHandle::NotInLib;
}
-PMLibraryHandle::PMResult PMLibraryHandle::changeParentLibrary( const QString& parentPath )
+PMLibraryHandle::PMResult PMLibraryHandle::changeParentLibrary( const TQString& parentPath )
{
if( m_readOnly )
return PMLibraryHandle::ReadOnlyLib;
- QString newPath = parentPath + "/" + m_path.section( '/', -1 );
+ TQString newPath = parentPath + "/" + m_path.section( '/', -1 );
PMLibraryHandle::EntryIterator itr( m_libraries );
for( ; itr.current( ); ++itr )
{
PMLibraryHandle lib = PMLibraryHandle( *itr.current( ) );
lib.changeParentLibrary( newPath );
- m_libraries.replace( itr.currentKey( ), new QString( newPath + "/" + lib.path( ) ) );
+ m_libraries.replace( itr.currentKey( ), new TQString( newPath + "/" + lib.path( ) ) );
}
PMLibraryHandle::EntryIterator objItr( m_objects );
for( ; objItr.current( ); ++objItr )
{
- QString test = newPath + "/" + objItr.current( )->section( '/', -1 );
- m_objects.replace( objItr.currentKey( ), new QString( newPath + "/" + objItr.current( )->section( '/', -1 ) ) );
+ TQString test = newPath + "/" + objItr.current( )->section( '/', -1 );
+ m_objects.replace( objItr.currentKey( ), new TQString( newPath + "/" + objItr.current( )->section( '/', -1 ) ) );
}
saveLibraryInfo( );
diff --git a/kpovmodeler/pmlibraryhandle.h b/kpovmodeler/pmlibraryhandle.h
index e906fd11..353b7b53 100644
--- a/kpovmodeler/pmlibraryhandle.h
+++ b/kpovmodeler/pmlibraryhandle.h
@@ -23,10 +23,10 @@
#include <config.h>
#endif
-#include <qstring.h>
-#include <qdict.h>
+#include <tqstring.h>
+#include <tqdict.h>
-class QDomElement;
+class TQDomElement;
/**
* Class that holds all the information about a specific library.
@@ -49,7 +49,7 @@ public:
/**
* Iterator for the objects in the library
*/
- typedef QDictIterator<QString> EntryIterator;
+ typedef TQDictIterator<TQString> EntryIterator;
/**
* Constructor for an empty library
@@ -59,7 +59,7 @@ public:
/**
* Constructor for a given directory.
*/
- PMLibraryHandle( const QString& path );
+ PMLibraryHandle( const TQString& path );
/**
* Destructor
@@ -68,42 +68,42 @@ public:
/**
* Returns the library's name
*/
- QString name( ) const { return m_name; }
+ TQString name( ) const { return m_name; }
/**
* Returns the library's path
*/
- QString path( ) const { return m_path; }
+ TQString path( ) const { return m_path; }
/**
* Returns the library's author
*/
- QString author( ) const { return m_author; }
+ TQString author( ) const { return m_author; }
/**
* Returns the library's description
*/
- QString description( ) const { return m_description; }
+ TQString description( ) const { return m_description; }
/**
* Sets the library's name
*/
- void setName( const QString& name );
+ void setName( const TQString& name );
/**
* Sets the library's path
*/
- void setPath( const QString& path );
+ void setPath( const TQString& path );
/**
* Sets the library's author
*/
- void setAuthor( const QString& author );
+ void setAuthor( const TQString& author );
/**
* Sets the library's description
*/
- void setDescription( const QString& description );
+ void setDescription( const TQString& description );
/**
* Sets the library's erad only status
@@ -131,33 +131,33 @@ public:
* @param name The name of the object
* @return PMLibraryHandle::Ok if successful or the reason of failure
*/
- PMLibraryHandle::PMResult addObject( const QString& path, const QString& name );
+ PMLibraryHandle::PMResult addObject( const TQString& path, const TQString& name );
/**
* Deletes an object out of the library. Only removes the entry from the library
* doesn't delete the objects file
* @param objectName The name of the object ( or objects path ) to delete
* @return PMLibraryHandle::Ok if successul or the reason of failure
*/
- PMLibraryHandle::PMResult deleteObject( const QString& objectName );
+ PMLibraryHandle::PMResult deleteObject( const TQString& objectName );
/**
* Create a new sub library.
*/
- PMLibraryHandle::PMResult createNewSubLibrary( const QString subLibName );
+ PMLibraryHandle::PMResult createNewSubLibrary( const TQString subLibName );
/**
* Adds an already existing sub-library to the library
* @param path The path for the sub library
* @param subLibName The name of the sub library
* @return PMLibraryHandle::Ok if successful or the reason of failure
*/
- PMLibraryHandle::PMResult addSubLibrary( const QString& path, const QString& name );
+ PMLibraryHandle::PMResult addSubLibrary( const TQString& path, const TQString& name );
/**
* Deletes a sub library. Only removes the entry from the library
* doesn't delete the objects file
* @param subLibName The name of the sub library ( or sub libraries path ) to delete
* @return PMLibraryHandle::Ok if successul or the reason of failure
*/
- PMLibraryHandle::PMResult deleteSubLibrary( const QString& subLibName );
+ PMLibraryHandle::PMResult deleteSubLibrary( const TQString& subLibName );
/**
* Returns true if the library is set read-only
@@ -184,7 +184,7 @@ public:
* @param parentPath The new parent path for this library
* @return PMLibraryHandle::Ok if successful or the reason for failure
*/
- PMLibraryHandle::PMResult changeParentLibrary( const QString& parentPath );
+ PMLibraryHandle::PMResult changeParentLibrary( const TQString& parentPath );
private:
@@ -196,15 +196,15 @@ private:
void loadLibraryInfo( );
- QString m_name;
- QString m_path;
- QString m_author;
- QString m_description;
+ TQString m_name;
+ TQString m_path;
+ TQString m_author;
+ TQString m_description;
bool m_readOnly;
bool m_subLibrary;
- QDict<QString> m_objects;
- QDict<QString> m_libraries;
+ TQDict<TQString> m_objects;
+ TQDict<TQString> m_libraries;
};
#endif
diff --git a/kpovmodeler/pmlibraryhandleedit.cpp b/kpovmodeler/pmlibraryhandleedit.cpp
index 8c26682d..e991af6e 100644
--- a/kpovmodeler/pmlibraryhandleedit.cpp
+++ b/kpovmodeler/pmlibraryhandleedit.cpp
@@ -17,13 +17,13 @@
#include "pmlibraryhandleedit.h"
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qtextedit.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqtextedit.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kconfig.h>
@@ -34,38 +34,38 @@
#include "pmdialogeditbase.h"
#include "pmlibraryhandle.h"
-QSize PMLibraryHandleEdit::s_size = QSize( 600, 400 );
+TQSize PMLibraryHandleEdit::s_size = TQSize( 600, 400 );
-PMLibraryHandleEdit::PMLibraryHandleEdit( PMLibraryHandle* lib, QWidget* parent, const char* name )
+PMLibraryHandleEdit::PMLibraryHandleEdit( PMLibraryHandle* lib, TQWidget* parent, const char* name )
: KDialogBase( parent, name, true, i18n( "Create Library" ),
Ok | Cancel, Ok )
{
m_pLibrary = lib;
resize( s_size );
- QWidget* page = new QWidget( this );
+ TQWidget* page = new TQWidget( this );
setMainWidget( page );
- QVBoxLayout* vl = new QVBoxLayout( page, KDialog::spacingHint( ) );
+ TQVBoxLayout* vl = new TQVBoxLayout( page, KDialog::spacingHint( ) );
- QGridLayout* grid = new QGridLayout( vl, 5, 2 );
- QLabel* lbl = new QLabel( i18n( "Name: " ), page );
- m_pNameEdit = new QLineEdit( page );
+ TQGridLayout* grid = new TQGridLayout( vl, 5, 2 );
+ TQLabel* lbl = new TQLabel( i18n( "Name: " ), page );
+ m_pNameEdit = new TQLineEdit( page );
grid->addWidget( lbl, 0, 0 );
grid->addWidget( m_pNameEdit, 0, 1 );
- lbl = new QLabel( i18n( "Author: " ), page );
- m_pAuthorEdit = new QLineEdit( page );
+ lbl = new TQLabel( i18n( "Author: " ), page );
+ m_pAuthorEdit = new TQLineEdit( page );
grid->addWidget( lbl, 1, 0 );
grid->addWidget( m_pAuthorEdit, 1, 1 );
- lbl = new QLabel( i18n( "Description: " ), page );
- m_pDescriptionEdit = new QTextEdit( page );
+ lbl = new TQLabel( i18n( "Description: " ), page );
+ m_pDescriptionEdit = new TQTextEdit( page );
m_pDescriptionEdit->setMaximumHeight( 120 );
grid->addWidget( lbl, 2, 0 );
grid->addMultiCellWidget( m_pDescriptionEdit, 2, 3, 1, 1 );
grid->setRowStretch( 3, 1 );
- m_pReadOnlyEdit = new QCheckBox( i18n( "Allow changes to the library?" ), page );
+ m_pReadOnlyEdit = new TQCheckBox( i18n( "Allow changes to the library?" ), page );
grid->addMultiCellWidget( m_pReadOnlyEdit, 4, 4, 0, 1 );
// Load the fields with values
@@ -75,10 +75,10 @@ PMLibraryHandleEdit::PMLibraryHandleEdit( PMLibraryHandle* lib, QWidget* parent,
m_pReadOnlyEdit->setChecked( !lib->isReadOnly( ) );
// Setup the signals
- connect( m_pNameEdit, SIGNAL( textChanged( const QString& ) ), SLOT( slotEditsChanged( const QString& ) ) );
- connect( m_pAuthorEdit, SIGNAL( textChanged( const QString& ) ), SLOT( slotEditsChanged( const QString& ) ) );
- connect( m_pDescriptionEdit, SIGNAL( textChanged( ) ), SLOT( slotDescriptionChanged( ) ) );
- connect( m_pReadOnlyEdit, SIGNAL( clicked( ) ), SLOT( slotReadOnlyChanged( ) ) );
+ connect( m_pNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotEditsChanged( const TQString& ) ) );
+ connect( m_pAuthorEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotEditsChanged( const TQString& ) ) );
+ connect( m_pDescriptionEdit, TQT_SIGNAL( textChanged( ) ), TQT_SLOT( slotDescriptionChanged( ) ) );
+ connect( m_pReadOnlyEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotReadOnlyChanged( ) ) );
// On startup you can only cancel
enableButtonOK( false );
@@ -89,7 +89,7 @@ void PMLibraryHandleEdit::slotReadOnlyChanged( )
enableButtonOK( true );
}
-void PMLibraryHandleEdit::slotEditsChanged( const QString& /*str*/ )
+void PMLibraryHandleEdit::slotEditsChanged( const TQString& /*str*/ )
{
enableButtonOK( true );
}
@@ -109,11 +109,11 @@ void PMLibraryHandleEdit::restoreConfig( KConfig* cfg )
{
cfg->setGroup( "Appearance" );
- QSize defaultSize( 300, 200 );
+ TQSize defaultSize( 300, 200 );
s_size = cfg->readSizeEntry( "LibraryHandleEditSize", &defaultSize );
}
-void PMLibraryHandleEdit::resizeEvent( QResizeEvent* ev )
+void PMLibraryHandleEdit::resizeEvent( TQResizeEvent* ev )
{
s_size = ev->size( );
}
diff --git a/kpovmodeler/pmlibraryhandleedit.h b/kpovmodeler/pmlibraryhandleedit.h
index d0f53bb2..d57b8e5e 100644
--- a/kpovmodeler/pmlibraryhandleedit.h
+++ b/kpovmodeler/pmlibraryhandleedit.h
@@ -25,10 +25,10 @@
#include <kdialogbase.h>
-class QLineEdit;
-class QTextEdit;
-class QListBox;
-class QCheckBox;
+class TQLineEdit;
+class TQTextEdit;
+class TQListBox;
+class TQCheckBox;
class PMLibraryHandle;
/**
@@ -42,25 +42,25 @@ public:
* Construct a dialog to edit the properties of lib. The library will be
* modified only if Ok is pressed.
*/
- PMLibraryHandleEdit( PMLibraryHandle* lib, QWidget *parent = NULL, const char* name = NULL );
+ PMLibraryHandleEdit( PMLibraryHandle* lib, TQWidget *parent = NULL, const char* name = NULL );
static void saveConfig( KConfig* cfg );
static void restoreConfig( KConfig* cfg );
- static QSize s_size;
+ static TQSize s_size;
private slots:
void slotOk( );
- void slotEditsChanged( const QString& );
+ void slotEditsChanged( const TQString& );
void slotDescriptionChanged( );
void slotReadOnlyChanged( );
- void resizeEvent( QResizeEvent *ev );
+ void resizeEvent( TQResizeEvent *ev );
private:
PMLibraryHandle* m_pLibrary;
- QLineEdit* m_pNameEdit;
- QLineEdit* m_pAuthorEdit;
- QTextEdit* m_pDescriptionEdit;
- QCheckBox* m_pReadOnlyEdit;
+ TQLineEdit* m_pNameEdit;
+ TQLineEdit* m_pAuthorEdit;
+ TQTextEdit* m_pDescriptionEdit;
+ TQCheckBox* m_pReadOnlyEdit;
};
#endif
diff --git a/kpovmodeler/pmlibraryiconview.cpp b/kpovmodeler/pmlibraryiconview.cpp
index 9a59fcda..d2588dca 100644
--- a/kpovmodeler/pmlibraryiconview.cpp
+++ b/kpovmodeler/pmlibraryiconview.cpp
@@ -20,8 +20,8 @@
#include <unistd.h>
-#include <qstring.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqdir.h>
#include <kurl.h>
#include <kio/job.h>
@@ -50,14 +50,14 @@ const char* PMLibraryIconDrag::format( int i ) const
}
}
-QByteArray PMLibraryIconDrag::encodedData( const char* mime ) const
+TQByteArray PMLibraryIconDrag::encodedData( const char* mime ) const
{
- QByteArray a;
- if ( QString( mime ) == "application/x-qiconlist" )
- a = QIconDrag::encodedData( mime );
- else if ( QString( mime ) == "text/sublib-list" )
+ TQByteArray a;
+ if ( TQString( mime ) == "application/x-qiconlist" )
+ a = TQIconDrag::encodedData( mime );
+ else if ( TQString( mime ) == "text/sublib-list" )
{
- QString s , l;
+ TQString s , l;
for( unsigned i = 0; i < m_paths.count( ); ++i )
{
if( m_subLibs[i] )
@@ -72,19 +72,19 @@ QByteArray PMLibraryIconDrag::encodedData( const char* mime ) const
return a;
}
-bool PMLibraryIconDrag::canDecode( QMimeSource* e )
+bool PMLibraryIconDrag::canDecode( TQMimeSource* e )
{
return e->provides( "application/x-qiconlist" ) ||
e->provides( "text/sublib-list" );
}
-bool PMLibraryIconDrag::decode( QMimeSource* e, QStringList& strList, QValueList<bool>& subLibList )
+bool PMLibraryIconDrag::decode( TQMimeSource* e, TQStringList& strList, TQValueList<bool>& subLibList )
{
- QByteArray a = e->encodedData( "text/sublib-list" );
+ TQByteArray a = e->encodedData( "text/sublib-list" );
if( a.isEmpty( ) )
return false;
- QStringList list = QStringList::split( "\n", QString( a ) );
+ TQStringList list = TQStringList::split( "\n", TQString( a ) );
for( unsigned i = 0; i < list.count( ); ++i )
{
strList.append( list[i].section( "\r", 0, 0 ) );
@@ -96,15 +96,15 @@ bool PMLibraryIconDrag::decode( QMimeSource* e, QStringList& strList, QValueList
return true;
}
-void PMLibraryIconDrag::append( const QIconDragItem &item, const QRect &pr,
- const QRect &tr, const QString &path, bool isSubLibrary )
+void PMLibraryIconDrag::append( const TQIconDragItem &item, const TQRect &pr,
+ const TQRect &tr, const TQString &path, bool isSubLibrary )
{
- QIconDrag::append( item, pr, tr );
+ TQIconDrag::append( item, pr, tr );
m_paths << path;
m_subLibs.append( isSubLibrary );
}
-PMLibraryIconView::PMLibraryIconView( QWidget* parent, const char* name )
+PMLibraryIconView::PMLibraryIconView( TQWidget* parent, const char* name )
: KIconView( parent, name )
{
m_pLibrary = NULL;
@@ -131,7 +131,7 @@ void PMLibraryIconView::refresh( )
it = m_pLibrary->createSubLibraryIterator( );
for( ; it->current( ); ++(*it) )
{
- QString f_name = *( it->current( ) );
+ TQString f_name = *( it->current( ) );
PMLibraryHandle h( f_name );
new PMLibraryIconViewItem( this, h.name( ), f_name, true );
@@ -142,7 +142,7 @@ void PMLibraryIconView::refresh( )
it = m_pLibrary->createObjectIterator( );
for( ; it->current( ); ++(*it) )
{
- QString f_name = *( it->current( ) );
+ TQString f_name = *( it->current( ) );
PMLibraryObject obj( f_name );
if( obj.preview( ) )
@@ -153,20 +153,20 @@ void PMLibraryIconView::refresh( )
delete it;
}
-void PMLibraryIconView::slotDropped( QDropEvent *e, const QValueList<QIconDragItem> & )
+void PMLibraryIconView::slotDropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & )
{
e->ignore( );
}
-QDragObject* PMLibraryIconView::dragObject( )
+TQDragObject* PMLibraryIconView::dragObject( )
{
if ( !currentItem( ) )
return 0;
- QPoint orig = viewportToContents( viewport( )->mapFromGlobal( QCursor::pos( ) ) );
+ TQPoint orig = viewportToContents( viewport( )->mapFromGlobal( TQCursor::pos( ) ) );
PMLibraryIconDrag *drag = new PMLibraryIconDrag( viewport( ) );
drag->setPixmap( *currentItem( )->pixmap( ),
- QPoint( currentItem( )->pixmapRect( ).width( ) / 2,
+ TQPoint( currentItem( )->pixmapRect( ).width( ) / 2,
currentItem( )->pixmapRect( ).height( ) / 2 ) );
for ( PMLibraryIconViewItem *item = (PMLibraryIconViewItem*)firstItem( );
@@ -174,14 +174,14 @@ QDragObject* PMLibraryIconView::dragObject( )
{
if ( item->isSelected( ) )
{
- QIconDragItem id;
- id.setData( QCString( item->path( ).latin1( ) ) );
+ TQIconDragItem id;
+ id.setData( TQCString( item->path( ).latin1( ) ) );
drag->append( id,
- QRect( item->pixmapRect( FALSE ).x( ) - orig.x( ),
+ TQRect( item->pixmapRect( FALSE ).x( ) - orig.x( ),
item->pixmapRect( FALSE ).y( ) - orig.y( ),
item->pixmapRect( ).width( ),
item->pixmapRect( ).height( ) ),
- QRect( item->textRect( FALSE ).x( ) - orig.x( ),
+ TQRect( item->textRect( FALSE ).x( ) - orig.x( ),
item->textRect( FALSE ).y( ) - orig.y( ),
item->textRect().width( ),
item->textRect( ).height( ) ),
@@ -192,21 +192,21 @@ QDragObject* PMLibraryIconView::dragObject( )
return drag;
}
-PMLibraryIconViewItem::PMLibraryIconViewItem( QIconView *parent, const QString &text, const QString& path, bool isSubLibrary )
+PMLibraryIconViewItem::PMLibraryIconViewItem( TQIconView *parent, const TQString &text, const TQString& path, bool isSubLibrary )
: KIconViewItem( parent, text )
{
m_path = path;
m_isSubLibrary = isSubLibrary;
}
-PMLibraryIconViewItem::PMLibraryIconViewItem( QIconView *parent, const QString &text, const QImage& image, const QString& path, bool isSubLibrary )
+PMLibraryIconViewItem::PMLibraryIconViewItem( TQIconView *parent, const TQString &text, const TQImage& image, const TQString& path, bool isSubLibrary )
: KIconViewItem( parent, text, image )
{
m_path = path;
m_isSubLibrary = isSubLibrary;
}
-bool PMLibraryIconViewItem::acceptDrop( const QMimeSource *e ) const
+bool PMLibraryIconViewItem::acceptDrop( const TQMimeSource *e ) const
{
if ( m_isSubLibrary && e->provides( "text/sublib-list" ) )
return true;
@@ -214,10 +214,10 @@ bool PMLibraryIconViewItem::acceptDrop( const QMimeSource *e ) const
return false;
}
-void PMLibraryIconViewItem::dropped( QDropEvent *e, const QValueList<QIconDragItem> & )
+void PMLibraryIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & )
{
- QStringList pathList;
- QValueList<bool> subLibList;
+ TQStringList pathList;
+ TQValueList<bool> subLibList;
if( m_isSubLibrary && PMLibraryIconDrag::decode( e, pathList, subLibList ) )
{
PMLibraryIconView* source = static_cast<PMLibraryIconView*>( e->source( )->parentWidget( ) );
@@ -232,12 +232,12 @@ void PMLibraryIconViewItem::dropped( QDropEvent *e, const QValueList<QIconDragIt
for( unsigned i = 0; i < pathList.count( ); ++i )
{
bool success = true;
- QString path = pathList[i];
+ TQString path = pathList[i];
if( path != ( m_path +"/" + path.section( '/', -1 ) ) )
{
if( subLibList[i] )
{
- QString newpath = newPath( path, true );
+ TQString newpath = newPath( path, true );
if( parentLib->deleteSubLibrary( path ) == PMLibraryHandle::Ok )
{
PMLibraryHandle lib = PMLibraryHandle( path );
@@ -257,7 +257,7 @@ void PMLibraryIconViewItem::dropped( QDropEvent *e, const QValueList<QIconDragIt
}
else
{
- QString newpath = newPath( path, false );
+ TQString newpath = newPath( path, false );
if( parentLib->deleteObject( path ) == PMLibraryHandle::Ok )
{
PMLibraryObject obj = PMLibraryObject( path );
@@ -292,28 +292,28 @@ void PMLibraryIconViewItem::dropped( QDropEvent *e, const QValueList<QIconDragIt
}
}
-QString PMLibraryIconViewItem::newPath( const QString oldPath, bool /*subLib*/ )
+TQString PMLibraryIconViewItem::newPath( const TQString oldPath, bool /*subLib*/ )
{
/// @todo Need to replace mkdtemp and mkstemps before enabling libs
return oldPath;
/*
- QString path = m_path + "/" + oldPath.section( '/', -1 );
+ TQString path = m_path + "/" + oldPath.section( '/', -1 );
if( subLib )
{
- QString test = path + "/library_index.xml";
- if( QFile::exists( test ) )
+ TQString test = path + "/library_index.xml";
+ if( TQFile::exists( test ) )
{
- QCString s = m_path.latin1();
+ TQCString s = m_path.latin1();
s+= "/libXXXXXX";
char* dirname = mkdtemp( s.data() );
rmdir( dirname );
path = dirname;
}
}
- else if( QFile::exists( path ) )
+ else if( TQFile::exists( path ) )
{
// we need to rename it.
- QCString s = m_path.latin1();
+ TQCString s = m_path.latin1();
s += "/objXXXXXX.kpml";
int fh = mkstemps( s.data( ), 5 );
close( fh );
diff --git a/kpovmodeler/pmlibraryiconview.h b/kpovmodeler/pmlibraryiconview.h
index a30ef529..87b90ffb 100644
--- a/kpovmodeler/pmlibraryiconview.h
+++ b/kpovmodeler/pmlibraryiconview.h
@@ -35,25 +35,25 @@ class PMLibraryIconDrag : public QIconDrag
Q_OBJECT
public:
/** Constructor */
- PMLibraryIconDrag( QWidget * dragSource, const char* name = 0 ) : QIconDrag( dragSource, name ) {}
+ PMLibraryIconDrag( TQWidget * dragSource, const char* name = 0 ) : TQIconDrag( dragSource, name ) {}
/** @return The ith format, or NULL. */
const char* format( int i ) const;
/** @return The encoded payload of this object, in the specified MIME format. */
- QByteArray encodedData( const char* mime ) const;
+ TQByteArray encodedData( const char* mime ) const;
/** @return True if the information in e can be decoded */
- static bool canDecode( QMimeSource* e );
+ static bool canDecode( TQMimeSource* e );
/**
* Attempts to decode the data in e
* @return True if successful otherwise returns false
*/
- static bool decode( QMimeSource* e, QStringList& StrList, QValueList<bool>& subLibList );
+ static bool decode( TQMimeSource* e, TQStringList& StrList, TQValueList<bool>& subLibList );
/** Adds a item to the object */
- void append( const QIconDragItem &item, const QRect &pr, const QRect &tr, const QString &path, bool subLib );
+ void append( const TQIconDragItem &item, const TQRect &pr, const TQRect &tr, const TQString &path, bool subLib );
private:
- QStringList m_paths;
- QValueList<bool> m_subLibs;
+ TQStringList m_paths;
+ TQValueList<bool> m_subLibs;
};
/**
@@ -63,7 +63,7 @@ class PMLibraryIconView: public KIconView
{
Q_OBJECT
public:
- PMLibraryIconView( QWidget *parent, const char* name = NULL );
+ PMLibraryIconView( TQWidget *parent, const char* name = NULL );
/**
* Set the library base path
@@ -81,11 +81,11 @@ public slots:
void refresh( );
/** called when an Item is dropped onto the view */
- void slotDropped( QDropEvent *e, const QValueList<QIconDragItem>& );
+ void slotDropped( TQDropEvent *e, const TQValueList<TQIconDragItem>& );
protected:
- /** @return a QDragObject for drag and drop */
- virtual QDragObject* dragObject( );
+ /** @return a TQDragObject for drag and drop */
+ virtual TQDragObject* dragObject( );
private:
PMLibraryHandle *m_pLibrary;
@@ -99,24 +99,24 @@ private:
class PMLibraryIconViewItem: public KIconViewItem
{
public:
- PMLibraryIconViewItem( QIconView *parent, const QString& text, const QString& path, bool isSubLibrary );
- PMLibraryIconViewItem( QIconView *parent, const QString& text, const QImage& image, const QString& path, bool isSubLibrary );
+ PMLibraryIconViewItem( TQIconView *parent, const TQString& text, const TQString& path, bool isSubLibrary );
+ PMLibraryIconViewItem( TQIconView *parent, const TQString& text, const TQImage& image, const TQString& path, bool isSubLibrary );
/** Get the path of the entry */
- QString path( ) const { return m_path; }
+ TQString path( ) const { return m_path; }
/** Is the entry a sublib library? */
bool isSubLibrary( ) const { return m_isSubLibrary; }
/** Reimplement accept drop to take items */
- virtual bool acceptDrop( const QMimeSource *mime ) const;
+ virtual bool acceptDrop( const TQMimeSource *mime ) const;
protected:
/** Tokes a dropped item */
- void dropped( QDropEvent *evt, const QValueList<QIconDragItem>& );
+ void dropped( TQDropEvent *evt, const TQValueList<TQIconDragItem>& );
/** Checks for the existance of oldpath and generates a new path as required */
- QString newPath( const QString oldPath, bool subLib );
+ TQString newPath( const TQString oldPath, bool subLib );
private:
- QString m_path;
+ TQString m_path;
bool m_isSubLibrary;
};
diff --git a/kpovmodeler/pmlibrarymanager.cpp b/kpovmodeler/pmlibrarymanager.cpp
index 2caeb6e3..9683064a 100644
--- a/kpovmodeler/pmlibrarymanager.cpp
+++ b/kpovmodeler/pmlibrarymanager.cpp
@@ -21,17 +21,17 @@
#include <kstandarddirs.h>
#include <kglobal.h>
-#include <qfile.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqdir.h>
#include "pmdebug.h"
PMLibraryManager* PMLibraryManager::s_pInstance = 0;
KStaticDeleter<PMLibraryManager> PMLibraryManager::s_staticDeleter;
-PMLibraryHandle* PMLibraryManager::getLibraryHandle( const QString& libraryName )
+PMLibraryHandle* PMLibraryManager::getLibraryHandle( const TQString& libraryName )
{
- QPtrListIterator<PMLibraryHandle> it( m_libraries );
+ TQPtrListIterator<PMLibraryHandle> it( m_libraries );
for( ; it.current( ); ++it )
if( it.current( )->name( ) == libraryName )
@@ -59,10 +59,10 @@ void PMLibraryManager::restoreConfig( KConfig* /*cfg*/ )
{
}
-QValueList<QString> PMLibraryManager::availableLibraries( )
+TQValueList<TQString> PMLibraryManager::availableLibraries( )
{
- QValueList<QString> result;
- QPtrListIterator<PMLibraryHandle> it( m_libraries );
+ TQValueList<TQString> result;
+ TQPtrListIterator<PMLibraryHandle> it( m_libraries );
for( ; it.current( ); ++it )
result.push_back( it.current( )->name( ) );
@@ -79,24 +79,24 @@ PMLibraryManager* PMLibraryManager::theManager( )
void PMLibraryManager::scanLibraries( )
{
- QStringList libraryDirectories;
+ TQStringList libraryDirectories;
// Search for sub directories in /usr/share/kpovmodeler/library
libraryDirectories = KGlobal::dirs( )->findDirs( "data", "kpovmodeler/library" );
- for( QStringList::Iterator i = libraryDirectories.begin( ); i != libraryDirectories.end( ); ++i )
+ for( TQStringList::Iterator i = libraryDirectories.begin( ); i != libraryDirectories.end( ); ++i )
{
- QDir curDir( *i );
- curDir.setFilter( QDir::Dirs );
+ TQDir curDir( *i );
+ curDir.setFilter( TQDir::Dirs );
QFileInfoListIterator it( *( curDir.entryInfoList( ) ) );
// For each sub directory
- QFileInfo* fi;
+ TQFileInfo* fi;
for( ; ( fi = it.current( ) ) != NULL; ++it )
{
// check for the existance of library_index.xml
// If it's there it's a library
- if( QFile::exists( fi->absFilePath( ) + "/library_index.xml" ) )
+ if( TQFile::exists( fi->absFilePath( ) + "/library_index.xml" ) )
{
// Create the corresponding PMLibraryHandle
PMLibraryHandle* h;
diff --git a/kpovmodeler/pmlibrarymanager.h b/kpovmodeler/pmlibrarymanager.h
index 8221ba19..1ced4d0b 100644
--- a/kpovmodeler/pmlibrarymanager.h
+++ b/kpovmodeler/pmlibrarymanager.h
@@ -23,16 +23,16 @@
#include <config.h>
#endif
-#include <qstring.h>
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
#include <kstaticdeleter.h>
#include "pmlibraryhandle.h"
class KConfig;
-class QDomElement;
+class TQDomElement;
/**
* Class that maintains the list of available libraries for kpovmodeler
@@ -63,12 +63,12 @@ public:
/**
* Returns the list of available libraries
*/
- QValueList<QString> availableLibraries( );
+ TQValueList<TQString> availableLibraries( );
/**
* Returns the handle for the indicated library
*/
- PMLibraryHandle* getLibraryHandle( const QString& libraryName );
+ PMLibraryHandle* getLibraryHandle( const TQString& libraryName );
/**
* Refreshes the list of libraries.
@@ -88,7 +88,7 @@ private:
void scanLibraries( );
- QPtrList< PMLibraryHandle > m_libraries;
+ TQPtrList< PMLibraryHandle > m_libraries;
static PMLibraryManager* s_pInstance;
static KStaticDeleter<PMLibraryManager> s_staticDeleter;
diff --git a/kpovmodeler/pmlibraryobject.cpp b/kpovmodeler/pmlibraryobject.cpp
index e84ba9e1..d89edbec 100644
--- a/kpovmodeler/pmlibraryobject.cpp
+++ b/kpovmodeler/pmlibraryobject.cpp
@@ -18,11 +18,11 @@
#include "pmlibraryobject.h"
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qdom.h>
-#include <qbuffer.h>
-#include <qimage.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqdom.h>
+#include <tqbuffer.h>
+#include <tqimage.h>
#include <karchive.h>
#include <kurl.h>
@@ -40,9 +40,9 @@ PMLibraryObject::PMLibraryObject( )
m_preview = NULL;
m_objects = NULL;
m_data = NULL;
- m_name = QString::null;
- m_description = QString::null;
- m_keywords = QString::null;
+ m_name = TQString::null;
+ m_description = TQString::null;
+ m_keywords = TQString::null;
}
PMLibraryObject::PMLibraryObject( KURL u )
@@ -78,40 +78,40 @@ void PMLibraryObject::loadLibraryInfo( )
const KArchiveEntry* entry = root->entry( "objectinfo.xml" );
if( entry && entry->isFile( ) )
{
- QBuffer buffer( ( ( KArchiveFile* )entry )->data( ) );
+ TQBuffer buffer( ( ( KArchiveFile* )entry )->data( ) );
buffer.open( IO_ReadOnly );
- QDomDocument doc( "OBJECTINFO" );
+ TQDomDocument doc( "OBJECTINFO" );
doc.setContent( &buffer );
- QDomElement e = doc.documentElement( );
+ TQDomElement e = doc.documentElement( );
m_name = e.attribute( "name", "empty" );
- QDomNode c = e.firstChild( );
+ TQDomNode c = e.firstChild( );
while( !c.isNull( ) )
{
if( c.isElement( ) )
{
- QDomElement ce = c.toElement( );
+ TQDomElement ce = c.toElement( );
// Description information
if( ce.tagName( ) == "description" )
{
- QDomText te = ce.firstChild( ).toText( );
+ TQDomText te = ce.firstChild( ).toText( );
m_description = te.nodeValue( );
}
// Keywords information
else if( ce.tagName( ) == "keywords" )
{
- QDomText te = ce.firstChild( ).toText( );
+ TQDomText te = ce.firstChild( ).toText( );
m_keywords = te.nodeValue( );
}
// Extra files list
else if( ce.tagName( ) == "file_entries" )
{
- QDomNode entry = ce.firstChild( );
+ TQDomNode entry = ce.firstChild( );
while( !entry.isNull( ) )
{
- QDomElement entryElement = entry.toElement( );
+ TQDomElement entryElement = entry.toElement( );
if( entryElement.tagName( ) == "file" )
m_extraFiles.append( entryElement.attribute( "name", "" ) );
entry = entry.nextSibling( );
@@ -125,7 +125,7 @@ void PMLibraryObject::loadLibraryInfo( )
}
}
-QImage* PMLibraryObject::preview( )
+TQImage* PMLibraryObject::preview( )
{
if( !m_previewLoaded )
{
@@ -141,9 +141,9 @@ QImage* PMLibraryObject::preview( )
const KArchiveEntry* entry = root->entry( "preview.png" );
if( entry && entry->isFile( ) )
{
- QBuffer buffer( ( ( KArchiveFile* )entry )->data( ) );
+ TQBuffer buffer( ( ( KArchiveFile* )entry )->data( ) );
buffer.open( IO_ReadOnly );
- m_preview = new QImage( buffer.readAll( ) );
+ m_preview = new TQImage( buffer.readAll( ) );
m_previewLoaded = true;
}
@@ -153,7 +153,7 @@ QImage* PMLibraryObject::preview( )
return m_preview;
}
-QByteArray* PMLibraryObject::objects( )
+TQByteArray* PMLibraryObject::objects( )
{
if( !m_objectsLoaded )
{
@@ -169,14 +169,14 @@ QByteArray* PMLibraryObject::objects( )
const KArchiveEntry* entry = root->entry( "objectdata.kpm" );
if( entry && entry->isFile( ) )
{
- // Transfer the file contents to a QByteArray.
+ // Transfer the file contents to a TQByteArray.
// TODO Maybe there is a smarter way of doing this.
char buf[256];
int nbytes;
- QIODevice* aux_in = ( ( KArchiveFile* )entry )->device( );
+ TQIODevice* aux_in = ( ( KArchiveFile* )entry )->device( );
- m_objects = new QByteArray( );
- QBuffer aux_out( *m_objects );
+ m_objects = new TQByteArray( );
+ TQBuffer aux_out( *m_objects );
aux_in->open( IO_ReadOnly );
aux_out.open( IO_WriteOnly );
@@ -199,41 +199,41 @@ QByteArray* PMLibraryObject::objects( )
return m_objects;
}
-void PMLibraryObject::setName( const QString& str )
+void PMLibraryObject::setName( const TQString& str )
{
m_name = str;
}
-void PMLibraryObject::setDescription( const QString& str )
+void PMLibraryObject::setDescription( const TQString& str )
{
m_description = str;
}
-void PMLibraryObject::setKeywords( const QString& str )
+void PMLibraryObject::setKeywords( const TQString& str )
{
m_keywords = str;
}
-void PMLibraryObject::setPreview( const QImage& img )
+void PMLibraryObject::setPreview( const TQImage& img )
{
if( m_previewLoaded )
delete m_preview;
- m_preview = new QImage( img );
+ m_preview = new TQImage( img );
m_previewLoaded = true;
}
-void PMLibraryObject::setObjects( const QByteArray& obj )
+void PMLibraryObject::setObjects( const TQByteArray& obj )
{
if( m_objectsLoaded )
delete m_objects;
- m_objects = new QByteArray( obj );
+ m_objects = new TQByteArray( obj );
m_objects->detach( );
m_objectsLoaded = true;
}
-void PMLibraryObject::save( const QString& fileName )
+void PMLibraryObject::save( const TQString& fileName )
{
// create the library file
m_data = new KTar( fileName, "application/x-gzip" );
@@ -256,41 +256,41 @@ void PMLibraryObject::saveLibraryInfo( )
exit( 1 );
}
- QBuffer buf;
+ TQBuffer buf;
// Document type
- QDomDocument doc( "OBJECTINFO" );
+ TQDomDocument doc( "OBJECTINFO" );
// The root element for the document has one attribute: name
- QDomElement root = doc.createElement( "object" );
+ TQDomElement root = doc.createElement( "object" );
doc.appendChild( root );
root.setAttribute( "name", m_name );
// Inside the root element we add the description node ...
- QDomElement description = doc.createElement( "description" );
+ TQDomElement description = doc.createElement( "description" );
root.appendChild( description );
description.appendChild( doc.createTextNode( m_description ) );
// ... and the keywords node ...
- QDomElement keywords = doc.createElement( "keywords" );
+ TQDomElement keywords = doc.createElement( "keywords" );
root.appendChild( keywords );
keywords.appendChild( doc.createTextNode( m_keywords ) );
// ... and finally the extra files information
- QDomElement file_list = doc.createElement( "file_list" );
+ TQDomElement file_list = doc.createElement( "file_list" );
root.appendChild( file_list );
- QStringList::Iterator it = m_extraFiles.begin( );
+ TQStringList::Iterator it = m_extraFiles.begin( );
for( ; it != m_extraFiles.end( ); ++it )
{
- QDomElement entry = doc.createElement( "file" );
+ TQDomElement entry = doc.createElement( "file" );
entry.setAttribute( "name", *it );
file_list.appendChild( entry );
}
// Write the document to the buffer
- QByteArray array;
- QTextStream str( array, IO_WriteOnly );
- str.setEncoding( QTextStream::UnicodeUTF8 );
+ TQByteArray array;
+ TQTextStream str( array, IO_WriteOnly );
+ str.setEncoding( TQTextStream::UnicodeUTF8 );
str << doc.toString( );
m_data->writeFile( "objectinfo.xml", "user", "group", array.size( ), array.data( ) );
}
@@ -304,9 +304,9 @@ void PMLibraryObject::savePreview( )
exit( 1 );
}
- QByteArray array;
- QBuffer iods( array );
- QImageIO img_io( &iods, "PNG" );
+ TQByteArray array;
+ TQBuffer iods( array );
+ TQImageIO img_io( &iods, "PNG" );
if( m_previewLoaded )
{
diff --git a/kpovmodeler/pmlibraryobject.h b/kpovmodeler/pmlibraryobject.h
index e3699c8f..070b5c99 100644
--- a/kpovmodeler/pmlibraryobject.h
+++ b/kpovmodeler/pmlibraryobject.h
@@ -23,16 +23,16 @@
#include <config.h>
#endif
-#include <qstring.h>
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#include <kstaticdeleter.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KURL;
class KArchive;
class KTar;
-class QImage;
+class TQImage;
/**
* This class implements a library object.
@@ -67,19 +67,19 @@ public:
/**
* Name of the library object.
*/
- QString name( ) const { return m_name; }
+ TQString name( ) const { return m_name; }
/**
* Textual description of the library object.
*/
- QString description( ) const { return m_description; }
+ TQString description( ) const { return m_description; }
/**
* List of keywords for search of the library object.
*/
- QString keywords( ) const { return m_keywords; }
+ TQString keywords( ) const { return m_keywords; }
/**
* Graphical Preview.
*/
- QImage* preview( );
+ TQImage* preview( );
/**
* True is the preview has been loaded.
*/
@@ -87,34 +87,34 @@ public:
/**
* Objects for the scene
*/
- QByteArray* objects( );
+ TQByteArray* objects( );
bool areObjectsLoaded( ) const { return m_objectsLoaded; }
/**
* Set the library object name
*/
- void setName( const QString& str );
+ void setName( const TQString& str );
/**
* Set the library object description
*/
- void setDescription( const QString& str );
+ void setDescription( const TQString& str );
/**
* Set the library object keywords
*/
- void setKeywords( const QString& str );
+ void setKeywords( const TQString& str );
/**
* Set the preview image
*/
- void setPreview( const QImage& img );
+ void setPreview( const TQImage& img );
/**
* Set the object data
*/
- void setObjects( const QByteArray& obj );
+ void setObjects( const TQByteArray& obj );
/**
* Save the library object to a file
*/
- void save( const QString& fileName );
+ void save( const TQString& fileName );
private:
void loadLibraryInfo( );
@@ -124,13 +124,13 @@ private:
bool m_previewLoaded;
bool m_objectsLoaded;
- QString m_name;
- QString m_description;
- QString m_keywords;
+ TQString m_name;
+ TQString m_description;
+ TQString m_keywords;
KTar* m_data;
- QImage* m_preview;
- QByteArray* m_objects;
- QStringList m_extraFiles;
+ TQImage* m_preview;
+ TQByteArray* m_objects;
+ TQStringList m_extraFiles;
};
#endif
diff --git a/kpovmodeler/pmlibraryobjectsearch.cpp b/kpovmodeler/pmlibraryobjectsearch.cpp
index 428da887..30e5be5c 100644
--- a/kpovmodeler/pmlibraryobjectsearch.cpp
+++ b/kpovmodeler/pmlibraryobjectsearch.cpp
@@ -21,45 +21,45 @@
#include "pmlibraryobjectsearch.h"
#include "pmdialogeditbase.h"
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qframe.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqframe.h>
#include <kurl.h>
#include <klocale.h>
#include <kdialog.h>
#include <klistview.h>
-PMLibraryObjectSearch::PMLibraryObjectSearch( QWidget* parent ) :
- QWidget( parent, "" )
+PMLibraryObjectSearch::PMLibraryObjectSearch( TQWidget* parent ) :
+ TQWidget( parent, "" )
{
setMinimumSize( 780, 300 );
setMaximumSize( 800, 400 );
- QVBoxLayout* vl = new QVBoxLayout( this, KDialog::spacingHint( ) );
+ TQVBoxLayout* vl = new TQVBoxLayout( this, KDialog::spacingHint( ) );
// Search parameters
- QFrame* frame = new QFrame( this );
- QHBoxLayout* fhl = new QHBoxLayout( frame, KDialog::spacingHint( ) );
- QGridLayout* grid = new QGridLayout( fhl, 3, 2 );
- QLabel *lbl = new QLabel( i18n( "Search for:" ), frame );
- m_pSearch = new QLineEdit( frame );
+ TQFrame* frame = new TQFrame( this );
+ TQHBoxLayout* fhl = new TQHBoxLayout( frame, KDialog::spacingHint( ) );
+ TQGridLayout* grid = new TQGridLayout( fhl, 3, 2 );
+ TQLabel *lbl = new TQLabel( i18n( "Search for:" ), frame );
+ m_pSearch = new TQLineEdit( frame );
grid->addWidget( lbl, 0, 0 );
grid->addWidget( m_pSearch, 0, 1 );
- QVBoxLayout* fvl = new QVBoxLayout( fhl );
- m_pSearchButton = new QPushButton( i18n( "&Search" ), frame );
+ TQVBoxLayout* fvl = new TQVBoxLayout( fhl );
+ m_pSearchButton = new TQPushButton( i18n( "&Search" ), frame );
fvl->addWidget( m_pSearchButton );
fvl->addStretch( 1 );
vl->addWidget( frame );
// Search results
- frame = new QFrame( this );
- QHBoxLayout* hl = new QHBoxLayout( frame, KDialog::spacingHint( ) );
+ frame = new TQFrame( this );
+ TQHBoxLayout* hl = new TQHBoxLayout( frame, KDialog::spacingHint( ) );
m_pFileList = new KListView( frame );
m_pFileList->addColumn( i18n( "File" ) );
m_pFileList->addColumn( i18n( "Path" ) );
@@ -70,12 +70,12 @@ PMLibraryObjectSearch::PMLibraryObjectSearch( QWidget* parent ) :
vl->addWidget( frame );
// Connect signals and slots
- connect( m_pSearchButton, SIGNAL( clicked( ) ), SLOT( slotSearchButtonPressed( ) ) );
+ connect( m_pSearchButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotSearchButtonPressed( ) ) );
}
void PMLibraryObjectSearch::slotSearchButtonPressed( )
{
-// QStringList::Iterator it( s_libraryPath );
+// TQStringList::Iterator it( s_libraryPath );
// For each of the defined libraries
//
// Open recursively each library file
diff --git a/kpovmodeler/pmlibraryobjectsearch.h b/kpovmodeler/pmlibraryobjectsearch.h
index 2ef5b07a..55d44233 100644
--- a/kpovmodeler/pmlibraryobjectsearch.h
+++ b/kpovmodeler/pmlibraryobjectsearch.h
@@ -23,11 +23,11 @@
#include <config.h>
#endif
-#include <qwidget.h>
+#include <tqwidget.h>
-class QLineEdit;
-class QListBox;
-class QPushButton;
+class TQLineEdit;
+class TQListBox;
+class TQPushButton;
class PMLibraryEntryPreview;
class KListView;
@@ -40,14 +40,14 @@ class PMLibraryObjectSearch: public QWidget
{
Q_OBJECT
public:
- PMLibraryObjectSearch( QWidget *parent );
+ PMLibraryObjectSearch( TQWidget *parent );
private slots:
void slotSearchButtonPressed( );
private:
- QLineEdit* m_pSearch;
- QPushButton* m_pSearchButton;
+ TQLineEdit* m_pSearch;
+ TQPushButton* m_pSearchButton;
KListView* m_pFileList;
PMLibraryEntryPreview* m_pPreview;
};
diff --git a/kpovmodeler/pmlight.cpp b/kpovmodeler/pmlight.cpp
index b715c7ee..554a09c2 100644
--- a/kpovmodeler/pmlight.cpp
+++ b/kpovmodeler/pmlight.cpp
@@ -122,12 +122,12 @@ PMLight::~PMLight( )
{
}
-QString PMLight::description( ) const
+TQString PMLight::description( ) const
{
return i18n( "light" );
}
-void PMLight::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMLight::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "location", m_location.serializeXML( ) );
e.setAttribute( "color", m_color.serializeXML( ) );
@@ -212,7 +212,7 @@ void PMLight::serialize( QDomElement& e, QDomDocument& doc ) const
void PMLight::readAttributes( const PMXMLHelper& h )
{
- QString str;
+ TQString str;
m_location = h.vectorAttribute( "location", locationDefault );
m_color = h.colorAttribute( "color", colorDefault );
@@ -564,7 +564,7 @@ void PMLight::setMediaAttenuation( bool y )
}
}
-PMDialogEditBase* PMLight::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMLight::editWidget( TQWidget* parent ) const
{
return new PMLightEdit( parent );
}
diff --git a/kpovmodeler/pmlight.h b/kpovmodeler/pmlight.h
index df40ec0a..4fafb2b0 100644
--- a/kpovmodeler/pmlight.h
+++ b/kpovmodeler/pmlight.h
@@ -56,25 +56,25 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMLight( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMLightEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmlight" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmlight" ); }
/**
* Returns the type
diff --git a/kpovmodeler/pmlightedit.cpp b/kpovmodeler/pmlightedit.cpp
index 23f5aa9d..e652d0a2 100644
--- a/kpovmodeler/pmlightedit.cpp
+++ b/kpovmodeler/pmlightedit.cpp
@@ -22,14 +22,14 @@
#include "pmlineedits.h"
#include "pmcoloredit.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
#include <klocale.h>
-PMLightEdit::PMLightEdit( QWidget* parent, const char* name )
+PMLightEdit::PMLightEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -41,7 +41,7 @@ void PMLightEdit::createTopWidgets( )
m_pLocation = new PMVectorEdit( "x", "y", "z", this );
m_pColor = new PMColorEdit( false, this );
- m_pType = new QComboBox( false, this );
+ m_pType = new TQComboBox( false, this );
m_pType->insertItem( i18n( "Point Light" ) );
m_pType->insertItem( i18n( "Spot Light" ) );
m_pType->insertItem( i18n( "Cylindrical Light" ) );
@@ -49,74 +49,74 @@ void PMLightEdit::createTopWidgets( )
m_pRadius = new PMFloatEdit( this );
m_pRadius->setValidation( false, 0, true, 90 );
- m_pRadiusLabel = new QLabel( i18n( "Radius:" ), this );
+ m_pRadiusLabel = new TQLabel( i18n( "Radius:" ), this );
m_pFalloff = new PMFloatEdit( this );
m_pFalloff->setValidation( false, 0, true, 90 );
- m_pFalloffLabel = new QLabel( i18n( "Falloff:" ), this );
+ m_pFalloffLabel = new TQLabel( i18n( "Falloff:" ), this );
m_pTightness = new PMFloatEdit( this );
m_pTightness->setValidation( false, 0, true, 90 );
- m_pTightnessLabel = new QLabel( i18n( "Tightness:" ), this );
+ m_pTightnessLabel = new TQLabel( i18n( "Tightness:" ), this );
m_pPointAt = new PMVectorEdit( "x", "y", "z", this );
- m_pPointAtLabel = new QLabel( i18n( "Point at:" ), this );
+ m_pPointAtLabel = new TQLabel( i18n( "Point at:" ), this );
- m_pParallel = new QCheckBox( i18n( "Parallel" ), this );
+ m_pParallel = new TQCheckBox( i18n( "Parallel" ), this );
- m_pAreaLight = new QCheckBox( i18n( "Area light" ), this );
+ m_pAreaLight = new TQCheckBox( i18n( "Area light" ), this );
- m_pAreaTypeLabel = new QLabel( i18n ( "Area type:" ), this );
- m_pAreaType = new QComboBox( false, this );
+ m_pAreaTypeLabel = new TQLabel( i18n ( "Area type:" ), this );
+ m_pAreaType = new TQComboBox( false, this );
m_pAreaType->insertItem( i18n( "Rectangular" ) );
m_pAreaType->insertItem( i18n( "Circular" ) );
m_pAxis1 = new PMVectorEdit( "x", "y", "z", this );
- m_pAxis1Label = new QLabel( i18n( "Axis 1:" ), this );
+ m_pAxis1Label = new TQLabel( i18n( "Axis 1:" ), this );
m_pAxis2 = new PMVectorEdit( "x", "y", "z", this );
- m_pAxis2Label = new QLabel( i18n( "Axis 2:" ), this );
+ m_pAxis2Label = new TQLabel( i18n( "Axis 2:" ), this );
m_pSize1 = new PMIntEdit( this );
m_pSize1->setValidation( true, 1, true, 50 );
- m_pSize1Label = new QLabel( i18n( "Size 1:" ), this );
+ m_pSize1Label = new TQLabel( i18n( "Size 1:" ), this );
m_pSize2 = new PMIntEdit( this );
m_pSize2->setValidation( true, 1, true, 50 );
- m_pSize2Label = new QLabel( i18n( "Size 2:" ), this );
+ m_pSize2Label = new TQLabel( i18n( "Size 2:" ), this );
m_pAdaptive = new PMIntEdit( this );
m_pAdaptive->setValidation( true, 0, false, 0 );
- m_pAdaptiveLabel = new QLabel( i18n( "Adaptive:" ), this );
- m_pOrient = new QCheckBox( i18n( "Orient" ), this );
- m_pJitter = new QCheckBox( i18n( "Jitter" ), this );
+ m_pAdaptiveLabel = new TQLabel( i18n( "Adaptive:" ), this );
+ m_pOrient = new TQCheckBox( i18n( "Orient" ), this );
+ m_pJitter = new TQCheckBox( i18n( "Jitter" ), this );
- m_pFading = new QCheckBox( i18n( "Fading" ), this );
+ m_pFading = new TQCheckBox( i18n( "Fading" ), this );
m_pFadeDistance = new PMFloatEdit( this );
m_pFadeDistance->setValidation( true, 0, false, 0 );
- m_pFadeDistanceLabel = new QLabel( i18n( "Fade distance:" ), this );
+ m_pFadeDistanceLabel = new TQLabel( i18n( "Fade distance:" ), this );
m_pFadePower = new PMIntEdit( this );
m_pFadePower->setValidation( true, 0, false, 0 );
- m_pFadePowerLabel = new QLabel( i18n( "Fade power:" ), this );
+ m_pFadePowerLabel = new TQLabel( i18n( "Fade power:" ), this );
- m_pMediaInteraction = new QCheckBox( i18n( "Media interaction" ), this );
- m_pMediaAttenuation = new QCheckBox( i18n( "Media attenuation" ), this );
+ m_pMediaInteraction = new TQCheckBox( i18n( "Media interaction" ), this );
+ m_pMediaAttenuation = new TQCheckBox( i18n( "Media attenuation" ), this );
- QHBoxLayout* hl;
- QGridLayout* gl;
+ TQHBoxLayout* hl;
+ TQGridLayout* gl;
- gl = new QGridLayout( topLayout( ), 3, 2 );
- gl->addWidget( new QLabel( i18n( "Location:" ), this ), 0, 0 );
+ gl = new TQGridLayout( topLayout( ), 3, 2 );
+ gl->addWidget( new TQLabel( i18n( "Location:" ), this ), 0, 0 );
gl->addWidget( m_pLocation, 0, 1 );
- gl->addWidget( new QLabel( i18n( "Color:" ), this ), 1, 0, AlignTop );
+ gl->addWidget( new TQLabel( i18n( "Color:" ), this ), 1, 0, AlignTop );
gl->addWidget( m_pColor, 1, 1 );
- gl->addWidget( new QLabel( i18n( "Type:" ), this ), 2, 0 );
- hl = new QHBoxLayout( );
+ gl->addWidget( new TQLabel( i18n( "Type:" ), this ), 2, 0 );
+ hl = new TQHBoxLayout( );
gl->addLayout( hl, 2, 1 );
hl->addWidget( m_pType );
hl->addStretch( 1 );
- gl = new QGridLayout( topLayout( ), 4, 2 );
+ gl = new TQGridLayout( topLayout( ), 4, 2 );
gl->addWidget( m_pRadiusLabel, 0, 0 );
gl->addWidget( m_pRadius, 0, 1, AlignLeft );
gl->addWidget( m_pFalloffLabel, 1, 0 );
@@ -128,8 +128,8 @@ void PMLightEdit::createTopWidgets( )
topLayout( )->addWidget( m_pParallel );
- hl = new QHBoxLayout( topLayout( ) );
- gl = new QGridLayout( hl, 7, 2 );
+ hl = new TQHBoxLayout( topLayout( ) );
+ gl = new TQGridLayout( hl, 7, 2 );
gl->addMultiCellWidget( m_pAreaLight, 0, 0, 0, 1 );
gl->addWidget( m_pAreaTypeLabel, 1, 0 );
gl->addWidget( m_pAreaType, 1, 1 );
@@ -148,8 +148,8 @@ void PMLightEdit::createTopWidgets( )
topLayout( )->addWidget( m_pOrient );
topLayout( )->addWidget( m_pJitter );
- hl = new QHBoxLayout( topLayout( ) );
- gl = new QGridLayout( hl, 3, 2 );
+ hl = new TQHBoxLayout( topLayout( ) );
+ gl = new TQGridLayout( hl, 3, 2 );
gl->addMultiCellWidget( m_pFading, 0, 0, 0, 1 );
gl->addWidget( m_pFadeDistanceLabel, 1, 0 );
gl->addWidget( m_pFadeDistance, 1, 1 );
@@ -160,33 +160,33 @@ void PMLightEdit::createTopWidgets( )
topLayout( )->addWidget( m_pMediaInteraction );
topLayout( )->addWidget( m_pMediaAttenuation );
- connect( m_pLocation, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pColor, SIGNAL( dataChanged( ) ),
- SIGNAL( dataChanged( ) ) );
- connect( m_pType, SIGNAL( activated( int ) ),
- SLOT( slotTypeActivated( int ) ) );
- connect( m_pRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pFalloff, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pTightness, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pPointAt, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pParallel, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pAreaLight, SIGNAL( clicked( ) ), SLOT( slotAreaClicked( ) ) );
- connect( m_pAreaType, SIGNAL( activated ( int ) ), SLOT( slotOrientCheck( ) ) );
- connect( m_pAxis1, SIGNAL( dataChanged( ) ), SLOT( slotOrientCheck( ) ) );
- connect( m_pAxis2, SIGNAL( dataChanged( ) ), SLOT( slotOrientCheck( ) ) );
- connect( m_pSize1, SIGNAL( dataChanged( ) ), SLOT( slotOrientCheck( ) ) );
- connect( m_pSize2, SIGNAL( dataChanged( ) ), SLOT( slotOrientCheck( ) ) );
- connect( m_pAdaptive, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pOrient, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pJitter, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pFading, SIGNAL( clicked( ) ), SLOT( slotFadingClicked( ) ) );
- connect( m_pFadeDistance, SIGNAL( dataChanged( ) ),
- SIGNAL( dataChanged( ) ) );
- connect( m_pFadePower, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pMediaInteraction, SIGNAL( clicked( ) ),
- SIGNAL( dataChanged( ) ) );
- connect( m_pMediaAttenuation, SIGNAL( clicked( ) ),
- SIGNAL( dataChanged( ) ) );
+ connect( m_pLocation, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pColor, TQT_SIGNAL( dataChanged( ) ),
+ TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pType, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotTypeActivated( int ) ) );
+ connect( m_pRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pFalloff, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pTightness, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pPointAt, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pParallel, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pAreaLight, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAreaClicked( ) ) );
+ connect( m_pAreaType, TQT_SIGNAL( activated ( int ) ), TQT_SLOT( slotOrientCheck( ) ) );
+ connect( m_pAxis1, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotOrientCheck( ) ) );
+ connect( m_pAxis2, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotOrientCheck( ) ) );
+ connect( m_pSize1, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotOrientCheck( ) ) );
+ connect( m_pSize2, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotOrientCheck( ) ) );
+ connect( m_pAdaptive, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pOrient, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pJitter, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pFading, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotFadingClicked( ) ) );
+ connect( m_pFadeDistance, TQT_SIGNAL( dataChanged( ) ),
+ TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pFadePower, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pMediaInteraction, TQT_SIGNAL( clicked( ) ),
+ TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pMediaAttenuation, TQT_SIGNAL( clicked( ) ),
+ TQT_SIGNAL( dataChanged( ) ) );
}
void PMLightEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmlightedit.h b/kpovmodeler/pmlightedit.h
index 0b9b5ffb..62451ed3 100644
--- a/kpovmodeler/pmlightedit.h
+++ b/kpovmodeler/pmlightedit.h
@@ -29,11 +29,11 @@
class PMLight;
class PMVectorEdit;
class PMColorEdit;
-class QComboBox;
+class TQComboBox;
class PMFloatEdit;
class PMIntEdit;
-class QLabel;
-class QCheckBox;
+class TQLabel;
+class TQCheckBox;
/**
* Dialog edit class for @ref PMLight
@@ -46,7 +46,7 @@ public:
/**
* Creates a PMLightEdit with parent and name
*/
- PMLightEdit( QWidget* parent, const char* name = 0 );
+ PMLightEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -73,42 +73,42 @@ private:
PMLight* m_pDisplayedObject;
PMVectorEdit* m_pLocation;
PMColorEdit* m_pColor;
- QComboBox* m_pType;
+ TQComboBox* m_pType;
PMFloatEdit* m_pRadius;
- QLabel* m_pRadiusLabel;
+ TQLabel* m_pRadiusLabel;
PMFloatEdit* m_pFalloff;
- QLabel* m_pFalloffLabel;
+ TQLabel* m_pFalloffLabel;
PMFloatEdit* m_pTightness;
- QLabel* m_pTightnessLabel;
+ TQLabel* m_pTightnessLabel;
PMVectorEdit* m_pPointAt;
- QLabel* m_pPointAtLabel;
- QCheckBox* m_pParallel;
+ TQLabel* m_pPointAtLabel;
+ TQCheckBox* m_pParallel;
- QCheckBox* m_pAreaLight;
- QLabel* m_pAreaTypeLabel;
- QComboBox* m_pAreaType;
+ TQCheckBox* m_pAreaLight;
+ TQLabel* m_pAreaTypeLabel;
+ TQComboBox* m_pAreaType;
PMVectorEdit* m_pAxis1;
PMIntEdit* m_pSize1;
PMVectorEdit* m_pAxis2;
PMIntEdit* m_pSize2;
- QLabel* m_pAxis1Label;
- QLabel* m_pAxis2Label;
- QLabel* m_pSize1Label;
- QLabel* m_pSize2Label;
+ TQLabel* m_pAxis1Label;
+ TQLabel* m_pAxis2Label;
+ TQLabel* m_pSize1Label;
+ TQLabel* m_pSize2Label;
PMIntEdit* m_pAdaptive;
- QLabel* m_pAdaptiveLabel;
- QCheckBox* m_pOrient;
- QCheckBox* m_pJitter;
+ TQLabel* m_pAdaptiveLabel;
+ TQCheckBox* m_pOrient;
+ TQCheckBox* m_pJitter;
- QCheckBox* m_pFading;
+ TQCheckBox* m_pFading;
PMFloatEdit* m_pFadeDistance;
- QLabel* m_pFadeDistanceLabel;
+ TQLabel* m_pFadeDistanceLabel;
PMIntEdit* m_pFadePower;
- QLabel* m_pFadePowerLabel;
- QCheckBox* m_pMediaInteraction;
- QCheckBox* m_pMediaAttenuation;
+ TQLabel* m_pFadePowerLabel;
+ TQCheckBox* m_pMediaInteraction;
+ TQCheckBox* m_pMediaAttenuation;
};
diff --git a/kpovmodeler/pmlightgroup.cpp b/kpovmodeler/pmlightgroup.cpp
index e53e0e3b..acf655e4 100644
--- a/kpovmodeler/pmlightgroup.cpp
+++ b/kpovmodeler/pmlightgroup.cpp
@@ -47,12 +47,12 @@ PMLightGroup::~PMLightGroup( )
{
}
-QString PMLightGroup::description( ) const
+TQString PMLightGroup::description( ) const
{
- return QString( i18n( "light group" ) );
+ return TQString( i18n( "light group" ) );
}
-void PMLightGroup::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMLightGroup::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
if( m_globalLights )
e.setAttribute( "global_lights", "1" );
@@ -103,7 +103,7 @@ void PMLightGroup::setGlobalLights( bool gl )
}
}
-PMDialogEditBase* PMLightGroup::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMLightGroup::editWidget( TQWidget* parent ) const
{
return new PMLightGroupEdit( parent );
}
diff --git a/kpovmodeler/pmlightgroup.h b/kpovmodeler/pmlightgroup.h
index f488eaf2..9fdf8d6b 100644
--- a/kpovmodeler/pmlightgroup.h
+++ b/kpovmodeler/pmlightgroup.h
@@ -51,7 +51,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMLightGroup( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -59,19 +59,19 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMLightGroupEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmlightgroup" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmlightgroup" ); }
/**
* Returns the global lights flag
diff --git a/kpovmodeler/pmlightgroupedit.cpp b/kpovmodeler/pmlightgroupedit.cpp
index 18feffbe..c1e21024 100644
--- a/kpovmodeler/pmlightgroupedit.cpp
+++ b/kpovmodeler/pmlightgroupedit.cpp
@@ -19,12 +19,12 @@
#include "pmlightgroupedit.h"
#include "pmlightgroup.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
#include <klocale.h>
-PMLightGroupEdit::PMLightGroupEdit( QWidget* parent, const char* name )
+PMLightGroupEdit::PMLightGroupEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -34,14 +34,14 @@ void PMLightGroupEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* layout;
- m_pGlobalLights = new QCheckBox( i18n( "Global lights" ), this );
+ TQHBoxLayout* layout;
+ m_pGlobalLights = new TQCheckBox( i18n( "Global lights" ), this );
- layout = new QHBoxLayout( topLayout( ) );
+ layout = new TQHBoxLayout( topLayout( ) );
layout->addWidget( m_pGlobalLights );
layout->addStretch( 1 );
- connect( m_pGlobalLights, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pGlobalLights, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMLightGroupEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmlightgroupedit.h b/kpovmodeler/pmlightgroupedit.h
index 2701d681..fa090f97 100644
--- a/kpovmodeler/pmlightgroupedit.h
+++ b/kpovmodeler/pmlightgroupedit.h
@@ -27,7 +27,7 @@
#include "pmsolidobjectedit.h"
class PMLightGroup;
-class QCheckBox;
+class TQCheckBox;
/**
* Dialog edit class for @ref PMLightGroup
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMLightGroupEdit with parent and name
*/
- PMLightGroupEdit( QWidget* parent, const char* name = 0 );
+ PMLightGroupEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -57,7 +57,7 @@ protected slots:
private:
PMLightGroup* m_pDisplayedObject;
- QCheckBox* m_pGlobalLights;
+ TQCheckBox* m_pGlobalLights;
};
diff --git a/kpovmodeler/pmline.h b/kpovmodeler/pmline.h
index 399555ea..c20b9355 100644
--- a/kpovmodeler/pmline.h
+++ b/kpovmodeler/pmline.h
@@ -20,7 +20,7 @@
#ifndef PMLINES_H
#define PMLINES_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <GL/gl.h>
#include "pmdebug.h"
@@ -88,7 +88,7 @@ private:
GLuint m_start, m_end;
};
-typedef QPtrListIterator<PMLine> PMLineListIterator;
+typedef TQPtrListIterator<PMLine> PMLineListIterator;
/**
* A list of @ref PMLine objects.
@@ -97,6 +97,6 @@ typedef QPtrListIterator<PMLine> PMLineListIterator;
* described by a start and end point. Only the indices in a @ref PMPointArray
* are stored.
*/
-typedef QMemArray<PMLine> PMLineArray;
+typedef TQMemArray<PMLine> PMLineArray;
#endif
diff --git a/kpovmodeler/pmlineedits.cpp b/kpovmodeler/pmlineedits.cpp
index 05124d75..19391338 100644
--- a/kpovmodeler/pmlineedits.cpp
+++ b/kpovmodeler/pmlineedits.cpp
@@ -19,8 +19,8 @@
#include <kmessagebox.h>
#include <klocale.h>
-PMFloatEdit::PMFloatEdit( QWidget* parent, const char* name /*= 0*/ )
- : QLineEdit( parent, name )
+PMFloatEdit::PMFloatEdit( TQWidget* parent, const char* name /*= 0*/ )
+ : TQLineEdit( parent, name )
{
m_bCheckLower = false;
m_bCheckUpper = false;
@@ -29,8 +29,8 @@ PMFloatEdit::PMFloatEdit( QWidget* parent, const char* name /*= 0*/ )
m_lowerOp = OpGreaterEqual;
m_upperOp = OpLessEqual;
- connect( this, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotEditTextChanged( const QString& ) ) );
+ connect( this, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotEditTextChanged( const TQString& ) ) );
}
void PMFloatEdit::setValidation( bool checkLower, double lowerValue,
@@ -114,13 +114,13 @@ double PMFloatEdit::value( ) const
void PMFloatEdit::setValue( double d, int precision )
{
- QString str;
+ TQString str;
str.setNum( d, 'g', precision );
setText( str );
}
-void PMFloatEdit::slotEditTextChanged( const QString& /*t*/ )
+void PMFloatEdit::slotEditTextChanged( const TQString& /*t*/ )
{
emit dataChanged( );
}
@@ -129,16 +129,16 @@ void PMFloatEdit::slotEditTextChanged( const QString& /*t*/ )
-PMIntEdit::PMIntEdit( QWidget* parent, const char* name /*= 0*/ )
- : QLineEdit( parent, name )
+PMIntEdit::PMIntEdit( TQWidget* parent, const char* name /*= 0*/ )
+ : TQLineEdit( parent, name )
{
m_bCheckLower = false;
m_bCheckUpper = false;
m_lowerValue = 0;
m_upperValue = 0;
- connect( this, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotEditTextChanged( const QString& ) ) );
+ connect( this, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotEditTextChanged( const TQString& ) ) );
}
void PMIntEdit::setValidation( bool checkLower, int lowerValue,
@@ -163,7 +163,7 @@ bool PMIntEdit::isDataValid( )
if( ok )
{
i = ( int ) d;
- QString str;
+ TQString str;
bool b = signalsBlocked( );
blockSignals( true );
str.setNum( i );
@@ -216,13 +216,13 @@ int PMIntEdit::value( ) const
void PMIntEdit::setValue( int i )
{
- QString str;
+ TQString str;
str.setNum( i );
setText( str );
}
-void PMIntEdit::slotEditTextChanged( const QString& /*t*/ )
+void PMIntEdit::slotEditTextChanged( const TQString& /*t*/ )
{
emit dataChanged( );
}
diff --git a/kpovmodeler/pmlineedits.h b/kpovmodeler/pmlineedits.h
index 9a12c384..43256818 100644
--- a/kpovmodeler/pmlineedits.h
+++ b/kpovmodeler/pmlineedits.h
@@ -23,7 +23,7 @@
#include <config.h>
#endif
-#include <qlineedit.h>
+#include <tqlineedit.h>
/**
* Lineedit for float input
@@ -38,7 +38,7 @@ public:
/**
* Simple constructor
*/
- PMFloatEdit( QWidget* parent, const char* name = 0 );
+ PMFloatEdit( TQWidget* parent, const char* name = 0 );
/**
* Sets the validation for the lineedit.
*
@@ -75,7 +75,7 @@ signals:
*/
void dataChanged( );
public slots:
- void slotEditTextChanged( const QString& t );
+ void slotEditTextChanged( const TQString& t );
private:
bool m_bCheckLower, m_bCheckUpper;
double m_lowerValue, m_upperValue;
@@ -94,7 +94,7 @@ public:
/**
* Simple constructor
*/
- PMIntEdit( QWidget* parent, const char* name = 0 );
+ PMIntEdit( TQWidget* parent, const char* name = 0 );
/**
* Sets the validation for the lineedit.
*
@@ -124,7 +124,7 @@ signals:
*/
void dataChanged( );
public slots:
- void slotEditTextChanged( const QString& t );
+ void slotEditTextChanged( const TQString& t );
private:
bool m_bCheckLower, m_bCheckUpper;
int m_lowerValue, m_upperValue;
diff --git a/kpovmodeler/pmlinkedit.cpp b/kpovmodeler/pmlinkedit.cpp
index a878e02e..8ebca5c6 100644
--- a/kpovmodeler/pmlinkedit.cpp
+++ b/kpovmodeler/pmlinkedit.cpp
@@ -16,9 +16,9 @@
**************************************************************************/
#include "pmlinkedit.h"
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kdialog.h>
#include <kpushbutton.h>
@@ -27,24 +27,24 @@
#include "pmdeclare.h"
#include "pmobjectselect.h"
-PMLinkEdit::PMLinkEdit( const QString& declareType,
- QWidget* parent, const char* name )
- : QWidget( parent, name )
+PMLinkEdit::PMLinkEdit( const TQString& declareType,
+ TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
m_declareTypes.append( declareType );
init( );
}
-PMLinkEdit::PMLinkEdit( const QStringList& declareTypes,
- QWidget* parent, const char* name )
- : QWidget( parent, name )
+PMLinkEdit::PMLinkEdit( const TQStringList& declareTypes,
+ TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
m_declareTypes = declareTypes;
init( );
}
-PMLinkEdit::PMLinkEdit( QWidget* parent, const char* name )
- : QWidget( parent, name )
+PMLinkEdit::PMLinkEdit( TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
init( );
}
@@ -55,24 +55,24 @@ void PMLinkEdit::init( )
m_pDisplayedObject = 0;
m_bReadOnly = false;
- QGridLayout* grid = new QGridLayout( this, 2, 2, 0, KDialog::spacingHint( ) );
+ TQGridLayout* grid = new TQGridLayout( this, 2, 2, 0, KDialog::spacingHint( ) );
- grid->addWidget( new QLabel( i18n( "Prototype:" ), this ), 0, 0 );
+ grid->addWidget( new TQLabel( i18n( "Prototype:" ), this ), 0, 0 );
grid->setColStretch( 0, 0 );
grid->setColStretch( 1, 1 );
- m_pIDEdit = new QLineEdit( this );
+ m_pIDEdit = new TQLineEdit( this );
m_pIDEdit->setReadOnly( true );
grid->addWidget( m_pIDEdit, 0, 1 );
- QHBoxLayout* layout = new QHBoxLayout( );
+ TQHBoxLayout* layout = new TQHBoxLayout( );
grid->addLayout( layout, 1, 1 );
- m_pSelectButton = new QPushButton( i18n( "Select..." ), this );
+ m_pSelectButton = new TQPushButton( i18n( "Select..." ), this );
layout->addWidget( m_pSelectButton );
m_pClearButton = new KPushButton( KStdGuiItem::clear(), this );
layout->addWidget( m_pClearButton );
- connect( m_pSelectButton, SIGNAL( clicked( ) ), SLOT( slotSelectClicked( ) ) );
- connect( m_pClearButton, SIGNAL( clicked( ) ), SLOT( slotClearClicked( ) ) );
+ connect( m_pSelectButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotSelectClicked( ) ) );
+ connect( m_pClearButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotClearClicked( ) ) );
}
void PMLinkEdit::setDisplayedObject( PMObject* obj )
@@ -93,14 +93,14 @@ void PMLinkEdit::setDisplayedObject( PMObject* obj )
}
}
-void PMLinkEdit::setLinkPossibility( const QString& t )
+void PMLinkEdit::setLinkPossibility( const TQString& t )
{
m_declareTypes.clear( );
m_declareTypes.append( t );
}
-void PMLinkEdit::setLinkPossibilities( const QStringList& t )
+void PMLinkEdit::setLinkPossibilities( const TQStringList& t )
{
m_declareTypes = t;
}
@@ -126,7 +126,7 @@ void PMLinkEdit::slotSelectClicked( )
result = PMObjectSelect::selectDeclare(
m_pDisplayedObject, m_declareTypes, obj, this );
- if( ( result == QDialog::Accepted ) && obj )
+ if( ( result == TQDialog::Accepted ) && obj )
{
m_pDeclare = ( PMDeclare* ) obj;
m_pIDEdit->setText( m_pDeclare->id( ) );
diff --git a/kpovmodeler/pmlinkedit.h b/kpovmodeler/pmlinkedit.h
index f5abe182..4462393c 100644
--- a/kpovmodeler/pmlinkedit.h
+++ b/kpovmodeler/pmlinkedit.h
@@ -18,18 +18,18 @@
#ifndef PMLINKEDIT_H
#define PMLINKEDIT_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "pmobject.h"
#include "pmdeclare.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
-class QString;
-class QLineEdit;
-class QPushButton;
+class TQString;
+class TQLineEdit;
+class TQPushButton;
/**
- * Edit widget for links with a QLineEdit, a select and a clear button.
+ * Edit widget for links with a TQLineEdit, a select and a clear button.
*/
class PMLinkEdit : public QWidget
{
@@ -40,17 +40,17 @@ public:
*
* Allows the selection of declares of type declareType.
*/
- PMLinkEdit( const QString& declareType, QWidget* parent, const char* name = 0 );
+ PMLinkEdit( const TQString& declareType, TQWidget* parent, const char* name = 0 );
/**
* Creates a link edit widget with parent and name.
*
* Allows the selection of declares of type declares.
*/
- PMLinkEdit( const QStringList& declares, QWidget* parent, const char* name = 0 );
+ PMLinkEdit( const TQStringList& declares, TQWidget* parent, const char* name = 0 );
/**
* Creates a link edit widget with parent and name.
*/
- PMLinkEdit( QWidget* parent, const char* name = 0 );
+ PMLinkEdit( TQWidget* parent, const char* name = 0 );
/**
* Sets the displayed object and displays the link
@@ -64,11 +64,11 @@ public:
/**
* Sets the selection possibilities
*/
- void setLinkPossibility( const QString& t );
+ void setLinkPossibility( const TQString& t );
/**
* Sets the selection possibilities
*/
- void setLinkPossibilities( const QStringList& t );
+ void setLinkPossibilities( const TQStringList& t );
/**
* Enables or disables read only mode
@@ -94,11 +94,11 @@ private:
void init( );
PMDeclare* m_pDeclare;
PMObject* m_pDisplayedObject;
- QStringList m_declareTypes;
+ TQStringList m_declareTypes;
- QLineEdit* m_pIDEdit;
- QPushButton* m_pSelectButton;
- QPushButton* m_pClearButton;
+ TQLineEdit* m_pIDEdit;
+ TQPushButton* m_pSelectButton;
+ TQPushButton* m_pClearButton;
bool m_bReadOnly;
};
diff --git a/kpovmodeler/pmlistpattern.cpp b/kpovmodeler/pmlistpattern.cpp
index 299ab4fb..721369d2 100644
--- a/kpovmodeler/pmlistpattern.cpp
+++ b/kpovmodeler/pmlistpattern.cpp
@@ -81,7 +81,7 @@ PMListPattern::~PMListPattern( )
{
}
-void PMListPattern::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMListPattern::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
switch( m_listType )
{
@@ -102,7 +102,7 @@ void PMListPattern::serialize( QDomElement& e, QDomDocument& doc ) const
void PMListPattern::readAttributes( const PMXMLHelper& h )
{
- QString str = h.stringAttribute( "listtype", "checker" );
+ TQString str = h.stringAttribute( "listtype", "checker" );
if( str == "checker" )
m_listType = ListPatternChecker;
else if( str == "brick" )
@@ -123,9 +123,9 @@ PMMetaObject* PMListPattern::metaObject( ) const
PMListTypeProperty* p = new PMListTypeProperty(
"listType", &PMListPattern::setListType,
&PMListPattern::listType );
- p->addEnumValue( QString( "Checker" ), ListPatternChecker );
- p->addEnumValue( QString( "Brick" ), ListPatternBrick );
- p->addEnumValue( QString( "Hexagon" ), ListPatternHexagon );
+ p->addEnumValue( TQString( "Checker" ), ListPatternChecker );
+ p->addEnumValue( TQString( "Brick" ), ListPatternBrick );
+ p->addEnumValue( TQString( "Hexagon" ), ListPatternHexagon );
s_pMetaObject->addProperty( p );
s_pMetaObject->addProperty(
@@ -178,7 +178,7 @@ void PMListPattern::setMortar( double n )
}
}
-PMDialogEditBase* PMListPattern::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMListPattern::editWidget( TQWidget* parent ) const
{
return new PMListPatternEdit( parent );
}
@@ -248,7 +248,7 @@ void PMTextureList::cleanUp( ) const
Base::cleanUp( );
}
-QString PMTextureList::description( ) const
+TQString PMTextureList::description( ) const
{
return i18n( "texture list" );
}
@@ -287,7 +287,7 @@ void PMPigmentList::cleanUp( ) const
Base::cleanUp( );
}
-QString PMPigmentList::description( ) const
+TQString PMPigmentList::description( ) const
{
return i18n( "pigment list" );
}
@@ -326,7 +326,7 @@ void PMColorList::cleanUp( ) const
Base::cleanUp( );
}
-QString PMColorList::description( ) const
+TQString PMColorList::description( ) const
{
return i18n( "color list" );
}
@@ -365,7 +365,7 @@ void PMDensityList::cleanUp( ) const
Base::cleanUp( );
}
-QString PMDensityList::description( ) const
+TQString PMDensityList::description( ) const
{
return i18n( "density list" );
}
@@ -411,7 +411,7 @@ void PMNormalList::cleanUp( ) const
Base::cleanUp( );
}
-QString PMNormalList::description( ) const
+TQString PMNormalList::description( ) const
{
return i18n( "normal list" );
}
@@ -450,7 +450,7 @@ void PMNormalList::restoreMemento( PMMemento* s )
Base::restoreMemento( s );
}
-void PMNormalList::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMNormalList::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "depth", m_depth );
Base::serialize( e, doc );
@@ -462,7 +462,7 @@ void PMNormalList::readAttributes( const PMXMLHelper& h )
Base::readAttributes( h );
}
-PMDialogEditBase* PMNormalList::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMNormalList::editWidget( TQWidget* parent ) const
{
return new PMListPatternEdit( parent );
}
diff --git a/kpovmodeler/pmlistpattern.h b/kpovmodeler/pmlistpattern.h
index f646d8ab..6716dadb 100644
--- a/kpovmodeler/pmlistpattern.h
+++ b/kpovmodeler/pmlistpattern.h
@@ -55,21 +55,21 @@ public:
/**
* Returns the list pattern object type
*/
- virtual QString listObjectType( ) const = 0;
+ virtual TQString listObjectType( ) const = 0;
/** */
virtual PMMetaObject* metaObject( ) const;
/** */
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMListPatternEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the color list type
@@ -145,9 +145,9 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMTextureList( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
- virtual QString listObjectType( ) const { return QString( "Texture" ); }
+ virtual TQString listObjectType( ) const { return TQString( "Texture" ); }
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -155,7 +155,7 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmtexturelist" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmtexturelist" ); }
static PMMetaObject* s_pMetaObject;
};
@@ -184,9 +184,9 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMPigmentList( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
- virtual QString listObjectType( ) const { return QString( "Pigment" ); }
+ virtual TQString listObjectType( ) const { return TQString( "Pigment" ); }
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -194,7 +194,7 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmpigmentlist" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmpigmentlist" ); }
static PMMetaObject* s_pMetaObject;
};
@@ -223,9 +223,9 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMColorList( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
- virtual QString listObjectType( ) const { return QString( "SolidColor" ); }
+ virtual TQString listObjectType( ) const { return TQString( "SolidColor" ); }
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -233,7 +233,7 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmcolorlist" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmcolorlist" ); }
static PMMetaObject* s_pMetaObject;
};
@@ -262,9 +262,9 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMDensityList( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
- virtual QString listObjectType( ) const { return QString( "Density" ); }
+ virtual TQString listObjectType( ) const { return TQString( "Density" ); }
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -272,7 +272,7 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmdensitylist" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmdensitylist" ); }
static PMMetaObject* s_pMetaObject;
};
@@ -301,9 +301,9 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMNormalList( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
- virtual QString listObjectType( ) const { return QString( "Normal" ); }
+ virtual TQString listObjectType( ) const { return TQString( "Normal" ); }
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -313,13 +313,13 @@ public:
/**
* Returns a new @ref PMListPatternEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmnormallist" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmnormallist" ); }
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
diff --git a/kpovmodeler/pmlistpatternedit.cpp b/kpovmodeler/pmlistpatternedit.cpp
index f9eb3cf7..dec87cb7 100644
--- a/kpovmodeler/pmlistpatternedit.cpp
+++ b/kpovmodeler/pmlistpatternedit.cpp
@@ -21,17 +21,17 @@
#include "pmvectoredit.h"
#include "pmvector.h"
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qlabel.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
#include "pmlineedits.h"
#include <ktabctl.h>
#include <klocale.h>
#include <kmessagebox.h>
-PMListPatternEdit::PMListPatternEdit( QWidget* parent, const char* name )
+PMListPatternEdit::PMListPatternEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -41,12 +41,12 @@ void PMListPatternEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QVBoxLayout* vlayout = new QVBoxLayout( topLayout( ) );
+ TQVBoxLayout* vlayout = new TQVBoxLayout( topLayout( ) );
/* Field for Pattern List type */
- QHBoxLayout* layout = new QHBoxLayout( vlayout );
- QLabel* label = new QLabel( i18n( "Type:" ), this );
- m_pTypeCombo = new QComboBox( false, this );
+ TQHBoxLayout* layout = new TQHBoxLayout( vlayout );
+ TQLabel* label = new TQLabel( i18n( "Type:" ), this );
+ m_pTypeCombo = new TQComboBox( false, this );
m_pTypeCombo->insertItem( i18n( "Checkers" ) );
m_pTypeCombo->insertItem( i18n( "Brick" ) );
m_pTypeCombo->insertItem( i18n( "Hexagon" ) );
@@ -55,36 +55,36 @@ void PMListPatternEdit::createTopWidgets( )
layout->addStretch( 1 );
/* The depth field */
- layout = new QHBoxLayout( vlayout );
- m_pDepthLabel = new QLabel( i18n( "Depth:" ), this );
+ layout = new TQHBoxLayout( vlayout );
+ m_pDepthLabel = new TQLabel( i18n( "Depth:" ), this );
m_pDepth = new PMFloatEdit( this );
layout->addWidget( m_pDepthLabel );
layout->addWidget( m_pDepth );
layout->addStretch( 1 );
/* The brick information */
- QHBoxLayout* bricklayout = new QHBoxLayout( vlayout );
- m_pBrickSizeLabel = new QLabel( i18n( "Brick size:" ), this );
+ TQHBoxLayout* bricklayout = new TQHBoxLayout( vlayout );
+ m_pBrickSizeLabel = new TQLabel( i18n( "Brick size:" ), this );
m_pBrickSize = new PMVectorEdit( "x", "y", "z", this );
bricklayout->addWidget( m_pBrickSizeLabel );
bricklayout->addWidget( m_pBrickSize );
- layout = new QHBoxLayout( vlayout );
- m_pMortarLabel = new QLabel( i18n( "Mortar:" ), this );
+ layout = new TQHBoxLayout( vlayout );
+ m_pMortarLabel = new TQLabel( i18n( "Mortar:" ), this );
m_pMortar = new PMFloatEdit( this );
layout->addWidget( m_pMortarLabel );
layout->addWidget( m_pMortar );
layout->addStretch( 1 );
/* connect all signals to slots/signals */
- connect( m_pBrickSize, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pTypeCombo, SIGNAL( activated( int ) ), SLOT( slotComboChanged( int ) ) );
- connect( m_pMortar, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pDepth, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pBrickSize, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pTypeCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotComboChanged( int ) ) );
+ connect( m_pMortar, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pDepth, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMListPatternEdit::displayObject( PMObject* o )
{
- QString str;
+ TQString str;
if( o->isA( "ListPattern" ) )
{
diff --git a/kpovmodeler/pmlistpatternedit.h b/kpovmodeler/pmlistpatternedit.h
index 8ebd5e5b..703a5944 100644
--- a/kpovmodeler/pmlistpatternedit.h
+++ b/kpovmodeler/pmlistpatternedit.h
@@ -28,9 +28,9 @@
class PMListPattern;
class PMVectorEdit;
-class QComboBox;
+class TQComboBox;
class PMFloatEdit;
-class QLabel;
+class TQLabel;
/**
* Dialog edit class for @ref PMListPattern.
@@ -43,7 +43,7 @@ public:
/**
* Creates a PMListPatternEdit with parent and name
*/
- PMListPatternEdit( QWidget* parent, const char* name = 0 );
+ PMListPatternEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -64,13 +64,13 @@ protected slots:
private:
PMListPattern* m_pDisplayedObject;
- QComboBox* m_pTypeCombo;
+ TQComboBox* m_pTypeCombo;
PMFloatEdit* m_pMortar;
PMVectorEdit* m_pBrickSize;
- QLabel* m_pBrickSizeLabel;
- QLabel* m_pMortarLabel;
+ TQLabel* m_pBrickSizeLabel;
+ TQLabel* m_pMortarLabel;
- QLabel* m_pDepthLabel;
+ TQLabel* m_pDepthLabel;
PMFloatEdit* m_pDepth;
};
diff --git a/kpovmodeler/pmlookslike.cpp b/kpovmodeler/pmlookslike.cpp
index 7e810605..270292e2 100644
--- a/kpovmodeler/pmlookslike.cpp
+++ b/kpovmodeler/pmlookslike.cpp
@@ -44,7 +44,7 @@ PMLooksLike::~PMLooksLike( )
}
-QString PMLooksLike::description( ) const
+TQString PMLooksLike::description( ) const
{
return i18n( "looks like" );
}
@@ -70,7 +70,7 @@ void PMLooksLike::cleanUp( ) const
Base::cleanUp( );
}
-void PMLooksLike::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMLooksLike::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
Base::serialize( e, doc );
}
@@ -80,7 +80,7 @@ void PMLooksLike::readAttributes( const PMXMLHelper& h )
Base::readAttributes( h );
}
-PMDialogEditBase* PMLooksLike::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMLooksLike::editWidget( TQWidget* parent ) const
{
return new PMNamedObjectEdit( parent );
}
diff --git a/kpovmodeler/pmlookslike.h b/kpovmodeler/pmlookslike.h
index 971519e0..4a191422 100644
--- a/kpovmodeler/pmlookslike.h
+++ b/kpovmodeler/pmlookslike.h
@@ -50,7 +50,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMLooksLike( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -58,18 +58,18 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMLooksLikeEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmlookslike" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmlookslike" ); }
/** */
virtual void restoreMemento( PMMemento* s );
diff --git a/kpovmodeler/pmmapmemento.cpp b/kpovmodeler/pmmapmemento.cpp
index 5b4e9aaa..92f3a2e0 100644
--- a/kpovmodeler/pmmapmemento.cpp
+++ b/kpovmodeler/pmmapmemento.cpp
@@ -28,7 +28,7 @@ PMMapMemento::~PMMapMemento( )
{
}
-void PMMapMemento::setMapValues( const QValueList<double>& v )
+void PMMapMemento::setMapValues( const TQValueList<double>& v )
{
if( !m_bMapValuesSaved )
{
@@ -38,7 +38,7 @@ void PMMapMemento::setMapValues( const QValueList<double>& v )
}
}
-void PMMapMemento::setRemovedValues( const QValueList<double>& v )
+void PMMapMemento::setRemovedValues( const TQValueList<double>& v )
{
if( !m_bRemovedValuesSaved )
{
diff --git a/kpovmodeler/pmmapmemento.h b/kpovmodeler/pmmapmemento.h
index e2f1fa0a..73dc8ce7 100644
--- a/kpovmodeler/pmmapmemento.h
+++ b/kpovmodeler/pmmapmemento.h
@@ -25,7 +25,7 @@
#endif
#include "pmmemento.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
/**
@@ -46,11 +46,11 @@ public:
/**
* Saves the map values
*/
- void setMapValues( const QValueList<double>& v );
+ void setMapValues( const TQValueList<double>& v );
/**
* Returns the map values
*/
- QValueList<double> mapValues( ) const { return m_mapValues; }
+ TQValueList<double> mapValues( ) const { return m_mapValues; }
/**
* Returns true if the map values were saved
*/
@@ -59,11 +59,11 @@ public:
/**
* Saves the removed values
*/
- void setRemovedValues( const QValueList<double>& v );
+ void setRemovedValues( const TQValueList<double>& v );
/**
* Returns the removed values
*/
- QValueList<double> removedValues( ) const { return m_removedValues; }
+ TQValueList<double> removedValues( ) const { return m_removedValues; }
/**
* Returns true if the removed values were saved
*/
@@ -73,8 +73,8 @@ private:
/**
* The stored values
*/
- QValueList<double> m_mapValues;
- QValueList<double> m_removedValues;
+ TQValueList<double> m_mapValues;
+ TQValueList<double> m_removedValues;
bool m_bMapValuesSaved, m_bRemovedValuesSaved;
};
diff --git a/kpovmodeler/pmmaterial.cpp b/kpovmodeler/pmmaterial.cpp
index d50f0ed1..66f11f94 100644
--- a/kpovmodeler/pmmaterial.cpp
+++ b/kpovmodeler/pmmaterial.cpp
@@ -63,12 +63,12 @@ void PMMaterial::cleanUp( ) const
Base::cleanUp( );
}
-QString PMMaterial::description( ) const
+TQString PMMaterial::description( ) const
{
return i18n( "material" );
}
-PMDialogEditBase* PMMaterial::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMMaterial::editWidget( TQWidget* parent ) const
{
return new PMMaterialEdit( parent );
}
diff --git a/kpovmodeler/pmmaterial.h b/kpovmodeler/pmmaterial.h
index 40891f1e..7e790be4 100644
--- a/kpovmodeler/pmmaterial.h
+++ b/kpovmodeler/pmmaterial.h
@@ -49,7 +49,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMMaterial( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -59,9 +59,9 @@ public:
/**
* Returns a new @ref PMMaterialEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmmaterial" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmmaterial" ); }
private:
/**
diff --git a/kpovmodeler/pmmaterialedit.cpp b/kpovmodeler/pmmaterialedit.cpp
index ba63f579..f03fcd43 100644
--- a/kpovmodeler/pmmaterialedit.cpp
+++ b/kpovmodeler/pmmaterialedit.cpp
@@ -20,12 +20,12 @@
#include "pmmaterial.h"
#include "pmlinkedit.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
-PMMaterialEdit::PMMaterialEdit( QWidget* parent, const char* name )
+PMMaterialEdit::PMMaterialEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
diff --git a/kpovmodeler/pmmaterialedit.h b/kpovmodeler/pmmaterialedit.h
index d273a72e..d9d6cf8f 100644
--- a/kpovmodeler/pmmaterialedit.h
+++ b/kpovmodeler/pmmaterialedit.h
@@ -39,7 +39,7 @@ public:
/**
* Creates a PMMaterialEdit with parent and name
*/
- PMMaterialEdit( QWidget* parent, const char* name = 0 );
+ PMMaterialEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmmaterialmap.cpp b/kpovmodeler/pmmaterialmap.cpp
index c70d85c9..28b2c849 100644
--- a/kpovmodeler/pmmaterialmap.cpp
+++ b/kpovmodeler/pmmaterialmap.cpp
@@ -74,7 +74,7 @@ PMMaterialMap::~PMMaterialMap( )
{
}
-void PMMaterialMap::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMMaterialMap::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
switch( m_bitmapType )
{
@@ -140,7 +140,7 @@ void PMMaterialMap::serialize( QDomElement& e, QDomDocument& doc ) const
void PMMaterialMap::readAttributes( const PMXMLHelper& h )
{
- QString str;
+ TQString str;
str = h.stringAttribute( "bitmap_type", "sys" );
if( str == "gif" )
@@ -241,7 +241,7 @@ void PMMaterialMap::cleanUp( ) const
Base::cleanUp( );
}
-QString PMMaterialMap::description( ) const
+TQString PMMaterialMap::description( ) const
{
return i18n( "material map" );
}
@@ -256,7 +256,7 @@ void PMMaterialMap::setBitmapType( PMBitmapType c )
}
}
-void PMMaterialMap::setBitmapFileName( const QString& c )
+void PMMaterialMap::setBitmapFileName( const TQString& c )
{
if( c != m_bitmapFile )
{
@@ -296,7 +296,7 @@ void PMMaterialMap::enableOnce( bool c )
}
}
-PMDialogEditBase* PMMaterialMap::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMMaterialMap::editWidget( TQWidget* parent ) const
{
return new PMMaterialMapEdit( parent );
}
diff --git a/kpovmodeler/pmmaterialmap.h b/kpovmodeler/pmmaterialmap.h
index c6713e9f..6377c7bd 100644
--- a/kpovmodeler/pmmaterialmap.h
+++ b/kpovmodeler/pmmaterialmap.h
@@ -69,7 +69,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMMaterialMap( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -77,17 +77,17 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmmaterialmap" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmmaterialmap" ); }
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMMaterialMapEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Gets the bitmap type
@@ -96,7 +96,7 @@ public:
/**
* Gets the bitmap file name
*/
- QString bitmapFile( ) const { return m_bitmapFile; }
+ TQString bitmapFile( ) const { return m_bitmapFile; }
/**
* Returns true if once is enabled
*/
@@ -117,7 +117,7 @@ public:
void setBitmapType( PMBitmapType c );
/**
* Sets the bitmap file name*/
- void setBitmapFileName( const QString& c );
+ void setBitmapFileName( const TQString& c );
/**
* Sets if the bitmap should be mapped once
*/
@@ -142,7 +142,7 @@ private:
* MaterialMap type
*/
PMBitmapType m_bitmapType;
- QString m_bitmapFile;
+ TQString m_bitmapFile;
bool m_once;
PMMapType m_mapType;
PMInterpolateType m_interpolateType;
diff --git a/kpovmodeler/pmmaterialmapedit.cpp b/kpovmodeler/pmmaterialmapedit.cpp
index d50e3d7b..03d28146 100644
--- a/kpovmodeler/pmmaterialmapedit.cpp
+++ b/kpovmodeler/pmmaterialmapedit.cpp
@@ -23,14 +23,14 @@
#include "pmpalettevalueedit.h"
#include "pmvector.h"
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
#include <ktabctl.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -38,7 +38,7 @@
#include <kfiledialog.h>
#include <kiconloader.h>
-PMMaterialMapEdit::PMMaterialMapEdit( QWidget* parent, const char* name )
+PMMaterialMapEdit::PMMaterialMapEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -46,14 +46,14 @@ PMMaterialMapEdit::PMMaterialMapEdit( QWidget* parent, const char* name )
void PMMaterialMapEdit::createTopWidgets( )
{
- QLabel* lbl;
- QHBoxLayout* hl;
+ TQLabel* lbl;
+ TQHBoxLayout* hl;
Base::createTopWidgets( );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "File type:" ), this );
- m_pImageFileTypeEdit = new QComboBox( this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "File type:" ), this );
+ m_pImageFileTypeEdit = new TQComboBox( this );
m_pImageFileTypeEdit->insertItem( "gif" );
m_pImageFileTypeEdit->insertItem( "tga" );
m_pImageFileTypeEdit->insertItem( "iff" );
@@ -66,22 +66,22 @@ void PMMaterialMapEdit::createTopWidgets( )
hl->addWidget( lbl );
hl->addWidget( m_pImageFileTypeEdit );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "File name:" ), this );
- m_pImageFileNameEdit = new QLineEdit( this );
- m_pImageFileNameBrowse = new QPushButton( this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "File name:" ), this );
+ m_pImageFileNameEdit = new TQLineEdit( this );
+ m_pImageFileNameBrowse = new TQPushButton( this );
m_pImageFileNameBrowse->setPixmap( SmallIcon( "fileopen" ) );
hl->addWidget( lbl );
hl->addWidget( m_pImageFileNameEdit );
hl->addWidget( m_pImageFileNameBrowse );
hl->addStretch( 1 );
- m_pOnceEdit = new QCheckBox( i18n( "Once" ), this );
+ m_pOnceEdit = new TQCheckBox( i18n( "Once" ), this );
topLayout( )->addWidget( m_pOnceEdit );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "Interpolate:" ), this );
- m_pInterpolateTypeEdit = new QComboBox( this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "Interpolate:" ), this );
+ m_pInterpolateTypeEdit = new TQComboBox( this );
m_pInterpolateTypeEdit->insertItem( i18n( "None" ) );
m_pInterpolateTypeEdit->insertItem( i18n( "Bilinear" ) );
m_pInterpolateTypeEdit->insertItem( i18n( "Normalized" ) );
@@ -89,9 +89,9 @@ void PMMaterialMapEdit::createTopWidgets( )
hl->addWidget( m_pInterpolateTypeEdit );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- lbl = new QLabel( i18n( "Map type:" ), this );
- m_pMapTypeEdit = new QComboBox( this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ lbl = new TQLabel( i18n( "Map type:" ), this );
+ m_pMapTypeEdit = new TQComboBox( this );
m_pMapTypeEdit->insertItem( i18n( "Planar" ) );
m_pMapTypeEdit->insertItem( i18n( "Spherical" ) );
m_pMapTypeEdit->insertItem( i18n( "Cylindrical" ) );
@@ -100,12 +100,12 @@ void PMMaterialMapEdit::createTopWidgets( )
hl->addWidget( m_pMapTypeEdit );
hl->addStretch( 1 );
- connect( m_pImageFileTypeEdit, SIGNAL( activated( int ) ), SLOT( slotImageFileTypeChanged( int ) ) );
- connect( m_pMapTypeEdit, SIGNAL( activated( int ) ), SLOT( slotMapTypeChanged( int ) ) );
- connect( m_pInterpolateTypeEdit, SIGNAL( activated( int ) ), SLOT( slotInterpolateTypeChanged( int ) ) );
- connect( m_pImageFileNameBrowse, SIGNAL( clicked( ) ), SLOT( slotImageFileBrowseClicked( ) ) );
- connect( m_pImageFileNameEdit, SIGNAL( textChanged( const QString& ) ), SLOT( slotImageFileNameChanged( const QString& ) ) );
- connect( m_pOnceEdit, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pImageFileTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotImageFileTypeChanged( int ) ) );
+ connect( m_pMapTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotMapTypeChanged( int ) ) );
+ connect( m_pInterpolateTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotInterpolateTypeChanged( int ) ) );
+ connect( m_pImageFileNameBrowse, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotImageFileBrowseClicked( ) ) );
+ connect( m_pImageFileNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotImageFileNameChanged( const TQString& ) ) );
+ connect( m_pOnceEdit, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMMaterialMapEdit::displayObject( PMObject* o )
@@ -280,14 +280,14 @@ void PMMaterialMapEdit::slotMapTypeChanged( const int /*a*/ )
emit dataChanged( );
}
-void PMMaterialMapEdit::slotImageFileNameChanged( const QString& /*a*/ )
+void PMMaterialMapEdit::slotImageFileNameChanged( const TQString& /*a*/ )
{
emit dataChanged( );
}
void PMMaterialMapEdit::slotImageFileBrowseClicked( )
{
- QString str = KFileDialog::getOpenFileName( QString::null, QString::null );
+ TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null );
if( !str.isEmpty() )
{
diff --git a/kpovmodeler/pmmaterialmapedit.h b/kpovmodeler/pmmaterialmapedit.h
index f6ffa7f0..e10f3dfb 100644
--- a/kpovmodeler/pmmaterialmapedit.h
+++ b/kpovmodeler/pmmaterialmapedit.h
@@ -27,14 +27,14 @@
#include "pmdialogeditbase.h"
class PMMaterialMap;
-class QComboBox;
+class TQComboBox;
class PMFloatEdit;
class PMIntEdit;
-class QLabel;
-class QCheckBox;
-class QWidget;
-class QLineEdit;
-class QPushButton;
+class TQLabel;
+class TQCheckBox;
+class TQWidget;
+class TQLineEdit;
+class TQPushButton;
/**
* Dialog edit class for @ref PMMaterialMap.
@@ -47,7 +47,7 @@ public:
/**
* Creates a PMMaterialMapEdit with parent and name
*/
- PMMaterialMapEdit( QWidget* parent, const char* name = 0 );
+ PMMaterialMapEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
/** */
@@ -65,17 +65,17 @@ private slots:
/** */
void slotInterpolateTypeChanged( int a );
/** */
- void slotImageFileNameChanged( const QString& a );
+ void slotImageFileNameChanged( const TQString& a );
/** */
void slotImageFileBrowseClicked( );
private:
PMMaterialMap* m_pDisplayedObject;
- QComboBox* m_pImageFileTypeEdit;
- QLineEdit* m_pImageFileNameEdit;
- QPushButton* m_pImageFileNameBrowse;
- QCheckBox* m_pOnceEdit;
- QComboBox* m_pMapTypeEdit;
- QComboBox* m_pInterpolateTypeEdit;
+ TQComboBox* m_pImageFileTypeEdit;
+ TQLineEdit* m_pImageFileNameEdit;
+ TQPushButton* m_pImageFileNameBrowse;
+ TQCheckBox* m_pOnceEdit;
+ TQComboBox* m_pMapTypeEdit;
+ TQComboBox* m_pInterpolateTypeEdit;
};
#endif
diff --git a/kpovmodeler/pmmatrix.cpp b/kpovmodeler/pmmatrix.cpp
index 217672e5..bda58a28 100644
--- a/kpovmodeler/pmmatrix.cpp
+++ b/kpovmodeler/pmmatrix.cpp
@@ -22,7 +22,7 @@
#include "pmvector.h"
#include "pmdebug.h"
-#include <qtextstream.h>
+#include <tqtextstream.h>
PMMatrix::PMMatrix( )
{
@@ -407,10 +407,10 @@ void PMMatrix::testOutput( )
}
}
-QString PMMatrix::serializeXML( ) const
+TQString PMMatrix::serializeXML( ) const
{
- QString result;
- QTextStream str( &result, IO_WriteOnly );
+ TQString result;
+ TQTextStream str( &result, IO_WriteOnly );
int i;
for( i = 0; i < 16; i++ )
@@ -423,12 +423,12 @@ QString PMMatrix::serializeXML( ) const
return result;
}
-bool PMMatrix::loadXML( const QString& str )
+bool PMMatrix::loadXML( const TQString& str )
{
int i;
- QString tmp( str );
- QTextStream s( &tmp, IO_ReadOnly );
- QString val;
+ TQString tmp( str );
+ TQTextStream s( &tmp, IO_ReadOnly );
+ TQString val;
bool ok;
for( i = 0; i < 16; i++ )
diff --git a/kpovmodeler/pmmatrix.h b/kpovmodeler/pmmatrix.h
index 62747aea..a3691602 100644
--- a/kpovmodeler/pmmatrix.h
+++ b/kpovmodeler/pmmatrix.h
@@ -27,7 +27,7 @@
#include "pmmath.h"
#include "math.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <GL/gl.h>
@@ -164,11 +164,11 @@ public:
/**
* Returns a string for xml output
*/
- QString serializeXML( ) const;
+ TQString serializeXML( ) const;
/**
* loads the vector data from the xml string
*/
- bool loadXML( const QString& str );
+ bool loadXML( const TQString& str );
private:
/**
* Exchanges two rows
diff --git a/kpovmodeler/pmmedia.cpp b/kpovmodeler/pmmedia.cpp
index e5229d47..c5e32d6e 100644
--- a/kpovmodeler/pmmedia.cpp
+++ b/kpovmodeler/pmmedia.cpp
@@ -154,12 +154,12 @@ void PMMedia::cleanUp( ) const
Base::cleanUp( );
}
-QString PMMedia::description( ) const
+TQString PMMedia::description( ) const
{
return i18n( "media" );
}
-void PMMedia::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMMedia::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
Base::serialize( e, doc );
e.setAttribute( "enable_absorption", m_enableAbsorption );
@@ -399,7 +399,7 @@ void PMMedia::enableScattering( bool c )
}
}
-PMDialogEditBase* PMMedia::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMMedia::editWidget( TQWidget* parent ) const
{
return new PMMediaEdit( parent );
}
diff --git a/kpovmodeler/pmmedia.h b/kpovmodeler/pmmedia.h
index 3bf6705b..4836bf37 100644
--- a/kpovmodeler/pmmedia.h
+++ b/kpovmodeler/pmmedia.h
@@ -50,7 +50,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMMedia( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -58,16 +58,16 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMMediaEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmmedia" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmmedia" ); }
/** */
virtual void restoreMemento( PMMemento* s );
diff --git a/kpovmodeler/pmmediaedit.cpp b/kpovmodeler/pmmediaedit.cpp
index 2806eff8..f89f7d10 100644
--- a/kpovmodeler/pmmediaedit.cpp
+++ b/kpovmodeler/pmmediaedit.cpp
@@ -21,15 +21,15 @@
#include "pmlineedits.h"
#include "pmcoloredit.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kdialog.h>
-PMMediaEdit::PMMediaEdit( QWidget* parent, const char* name )
+PMMediaEdit::PMMediaEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -37,94 +37,94 @@ PMMediaEdit::PMMediaEdit( QWidget* parent, const char* name )
void PMMediaEdit::createTopWidgets( )
{
- QHBoxLayout* hl;
- QGridLayout* gl;
+ TQHBoxLayout* hl;
+ TQGridLayout* gl;
Base::createTopWidgets( );
- hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Method:" ), this ) );
- m_pMethodEdit = new QComboBox( this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Method:" ), this ) );
+ m_pMethodEdit = new TQComboBox( this );
m_pMethodEdit->insertItem( i18n( "1 (Monte Carlo)" ) );
m_pMethodEdit->insertItem( i18n( "2 (Smooth)" ) );
m_pMethodEdit->insertItem( i18n( "3 (Adaptive sampling)" ) );
hl->addWidget( m_pMethodEdit );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Intervals:" ), this ) );
+ hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Intervals:" ), this ) );
m_pIntervalsEdit = new PMIntEdit( this );
m_pIntervalsEdit->setValidation( true, 1, false, 0 );
hl->addWidget( m_pIntervalsEdit );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Samples" ), this ) );
- hl->addWidget( new QLabel( i18n( "Min:" ), this ) );
+ hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Samples" ), this ) );
+ hl->addWidget( new TQLabel( i18n( "Min:" ), this ) );
m_pSamplesMinEdit = new PMIntEdit( this );
m_pSamplesMinEdit->setValidation( true, 1, false, 0 );
hl->addWidget( m_pSamplesMinEdit );
- m_pSamplesMaxLabel = new QLabel( i18n( "Max:" ), this );
+ m_pSamplesMaxLabel = new TQLabel( i18n( "Max:" ), this );
hl->addWidget( m_pSamplesMaxLabel );
m_pSamplesMaxEdit = new PMIntEdit( this );
hl->addWidget( m_pSamplesMaxEdit );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- gl = new QGridLayout( hl, 3, 2 );
- gl->addWidget( new QLabel( i18n( "Confidence:" ), this ), 0, 0 );
+ hl = new TQHBoxLayout( topLayout( ) );
+ gl = new TQGridLayout( hl, 3, 2 );
+ gl->addWidget( new TQLabel( i18n( "Confidence:" ), this ), 0, 0 );
m_pConfidenceEdit = new PMFloatEdit( this );
m_pConfidenceEdit->setValidation( true, 0, true, 1 );
gl->addWidget( m_pConfidenceEdit, 0, 1 );
- gl->addWidget( new QLabel( i18n( "Variance:" ), this ), 1, 0 );
+ gl->addWidget( new TQLabel( i18n( "Variance:" ), this ), 1, 0 );
m_pVarianceEdit = new PMFloatEdit( this );
gl->addWidget( m_pVarianceEdit, 1, 1 );
- gl->addWidget( new QLabel( i18n( "Ratio:" ), this ), 2, 0 );
+ gl->addWidget( new TQLabel( i18n( "Ratio:" ), this ), 2, 0 );
m_pRatioEdit = new PMFloatEdit( this );
gl->addWidget( m_pRatioEdit, 2, 1 );
hl->addStretch( 1 );
- m_pAAWidget = new QWidget( this );
- hl = new QHBoxLayout( m_pAAWidget, KDialog::spacingHint( ) );
- hl->addWidget( new QLabel( i18n( "Anti-aliasing" ), m_pAAWidget ) );
- hl->addWidget( new QLabel( i18n( "Level:" ), m_pAAWidget ) );
+ m_pAAWidget = new TQWidget( this );
+ hl = new TQHBoxLayout( m_pAAWidget, KDialog::spacingHint( ) );
+ hl->addWidget( new TQLabel( i18n( "Anti-aliasing" ), m_pAAWidget ) );
+ hl->addWidget( new TQLabel( i18n( "Level:" ), m_pAAWidget ) );
m_pAALevelEdit = new PMIntEdit( m_pAAWidget );
m_pAALevelEdit->setValidation( true, 1, false, 0 );
hl->addWidget( m_pAALevelEdit );
- hl->addWidget( new QLabel( i18n( "Threshold:" ), m_pAAWidget ) );
+ hl->addWidget( new TQLabel( i18n( "Threshold:" ), m_pAAWidget ) );
m_pAAThresholdEdit = new PMFloatEdit( m_pAAWidget );
m_pAAThresholdEdit->setValidation( true, 0.0, false, 0.0 );
hl->addWidget( m_pAAThresholdEdit );
hl->addStretch( 1 );
topLayout( )->addWidget( m_pAAWidget );
- hl = new QHBoxLayout( topLayout( ) );
- gl = new QGridLayout( hl, 2, 2 );
- m_pEnableAbsorptionEdit = new QCheckBox( i18n( "Absorption" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ gl = new TQGridLayout( hl, 2, 2 );
+ m_pEnableAbsorptionEdit = new TQCheckBox( i18n( "Absorption" ), this );
gl->addMultiCellWidget( m_pEnableAbsorptionEdit, 0, 0, 0, 1 );
m_pAbsorptionEdit = new PMColorEdit( false, this );
- m_pAbsorptionLabel = new QLabel( i18n( "Color:" ), this );
+ m_pAbsorptionLabel = new TQLabel( i18n( "Color:" ), this );
gl->addWidget( m_pAbsorptionLabel, 1, 0, AlignTop );
gl->addWidget( m_pAbsorptionEdit, 1, 1 );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- gl = new QGridLayout( hl, 2, 2 );
- m_pEnableEmissionEdit = new QCheckBox( i18n( "Emission" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ gl = new TQGridLayout( hl, 2, 2 );
+ m_pEnableEmissionEdit = new TQCheckBox( i18n( "Emission" ), this );
gl->addMultiCellWidget( m_pEnableEmissionEdit, 0, 0, 0, 1 );
m_pEmissionEdit = new PMColorEdit( false, this );
- m_pEmissionLabel = new QLabel( i18n( "Color:" ), this );
+ m_pEmissionLabel = new TQLabel( i18n( "Color:" ), this );
gl->addWidget( m_pEmissionLabel, 1, 0, AlignTop );
gl->addWidget( m_pEmissionEdit, 1, 1 );
hl->addStretch( 1 );
- m_pEnableScatteringEdit = new QCheckBox( i18n( "Scattering" ), this );
+ m_pEnableScatteringEdit = new TQCheckBox( i18n( "Scattering" ), this );
topLayout( )->addWidget( m_pEnableScatteringEdit );
- m_pScatteringWidget = new QWidget( this );
- QVBoxLayout* vl = new QVBoxLayout( m_pScatteringWidget, KDialog::spacingHint( ) );
- hl = new QHBoxLayout( vl );
- hl->addWidget( new QLabel( i18n( "Type:" ), m_pScatteringWidget ) );
- m_pScatteringTypeEdit = new QComboBox( m_pScatteringWidget );
+ m_pScatteringWidget = new TQWidget( this );
+ TQVBoxLayout* vl = new TQVBoxLayout( m_pScatteringWidget, KDialog::spacingHint( ) );
+ hl = new TQHBoxLayout( vl );
+ hl->addWidget( new TQLabel( i18n( "Type:" ), m_pScatteringWidget ) );
+ m_pScatteringTypeEdit = new TQComboBox( m_pScatteringWidget );
m_pScatteringTypeEdit->insertItem( i18n( "Isotropic" ) );
m_pScatteringTypeEdit->insertItem( i18n( "Mie Haze" ) );
m_pScatteringTypeEdit->insertItem( i18n( "Mie Murky" ) );
@@ -132,40 +132,40 @@ void PMMediaEdit::createTopWidgets( )
m_pScatteringTypeEdit->insertItem( i18n( "Henyey-Greenstein" ) );
hl->addWidget( m_pScatteringTypeEdit );
hl->addStretch( 1 );
- hl = new QHBoxLayout( vl );
- hl->addWidget( new QLabel( i18n( "Color:" ), m_pScatteringWidget ), 0, AlignTop );
+ hl = new TQHBoxLayout( vl );
+ hl->addWidget( new TQLabel( i18n( "Color:" ), m_pScatteringWidget ), 0, AlignTop );
m_pScatteringColorEdit = new PMColorEdit( false, m_pScatteringWidget );
hl->addWidget( m_pScatteringColorEdit );
- hl = new QHBoxLayout( vl );
- gl = new QGridLayout( hl, 2, 2 );
- m_pScatteringEccentricityLabel = new QLabel( i18n( "Eccentricity:" ), m_pScatteringWidget );
+ hl = new TQHBoxLayout( vl );
+ gl = new TQGridLayout( hl, 2, 2 );
+ m_pScatteringEccentricityLabel = new TQLabel( i18n( "Eccentricity:" ), m_pScatteringWidget );
gl->addWidget( m_pScatteringEccentricityLabel, 0, 0 );
m_pScatteringEccentricityEdit = new PMFloatEdit( m_pScatteringWidget );
gl->addWidget( m_pScatteringEccentricityEdit, 0, 1 );
- gl->addWidget( new QLabel( i18n( "Extinction:" ), m_pScatteringWidget ), 1, 0 );
+ gl->addWidget( new TQLabel( i18n( "Extinction:" ), m_pScatteringWidget ), 1, 0 );
m_pScatteringExtinctionEdit = new PMFloatEdit( m_pScatteringWidget );
gl->addWidget( m_pScatteringExtinctionEdit, 1, 1 );
hl->addStretch( 1 );
topLayout( )->addWidget( m_pScatteringWidget );
- connect( m_pMethodEdit, SIGNAL( activated( int ) ), SLOT( slotMethodChanged( int ) ) );
- connect( m_pIntervalsEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pSamplesMinEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pSamplesMaxEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pConfidenceEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pVarianceEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pRatioEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pAALevelEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pAAThresholdEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pAbsorptionEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pEmissionEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pEnableAbsorptionEdit, SIGNAL( clicked( ) ), SLOT( slotAbsorptionClicked( ) ) );
- connect( m_pEnableEmissionEdit, SIGNAL( clicked( ) ), SLOT( slotEmissionClicked( ) ) );
- connect( m_pEnableScatteringEdit, SIGNAL( clicked( ) ), SLOT( slotScatteringClicked( ) ) );
- connect( m_pScatteringTypeEdit, SIGNAL( activated( int ) ), SLOT( slotScatteringTypeChanged( int ) ) );
- connect( m_pScatteringColorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pScatteringEccentricityEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pScatteringExtinctionEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pMethodEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotMethodChanged( int ) ) );
+ connect( m_pIntervalsEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pSamplesMinEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pSamplesMaxEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pConfidenceEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pVarianceEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pRatioEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pAALevelEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pAAThresholdEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pAbsorptionEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pEmissionEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pEnableAbsorptionEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAbsorptionClicked( ) ) );
+ connect( m_pEnableEmissionEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotEmissionClicked( ) ) );
+ connect( m_pEnableScatteringEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotScatteringClicked( ) ) );
+ connect( m_pScatteringTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotScatteringTypeChanged( int ) ) );
+ connect( m_pScatteringColorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pScatteringEccentricityEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pScatteringExtinctionEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMMediaEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmmediaedit.h b/kpovmodeler/pmmediaedit.h
index 866e706d..6e481a87 100644
--- a/kpovmodeler/pmmediaedit.h
+++ b/kpovmodeler/pmmediaedit.h
@@ -30,9 +30,9 @@ class PMMedia;
class PMIntEdit;
class PMFloatEdit;
class PMColorEdit;
-class QCheckBox;
-class QLabel;
-class QComboBox;
+class TQCheckBox;
+class TQLabel;
+class TQComboBox;
/**
* Dialog edit class for @ref PMMedia
@@ -45,7 +45,7 @@ public:
/**
* Creates a PMMediaEdit with parent and name
*/
- PMMediaEdit( QWidget* parent, const char* name = 0 );
+ PMMediaEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -68,32 +68,32 @@ protected slots:
private:
PMMedia* m_pDisplayedObject;
- QComboBox* m_pMethodEdit;
+ TQComboBox* m_pMethodEdit;
PMIntEdit* m_pIntervalsEdit;
PMIntEdit* m_pSamplesMinEdit;
- QLabel* m_pSamplesMaxLabel;
+ TQLabel* m_pSamplesMaxLabel;
PMIntEdit* m_pSamplesMaxEdit;
PMFloatEdit* m_pConfidenceEdit;
PMFloatEdit* m_pVarianceEdit;
PMFloatEdit* m_pRatioEdit;
- QWidget* m_pAAWidget;
+ TQWidget* m_pAAWidget;
PMIntEdit* m_pAALevelEdit;
PMFloatEdit* m_pAAThresholdEdit;
- QCheckBox* m_pEnableAbsorptionEdit;
+ TQCheckBox* m_pEnableAbsorptionEdit;
PMColorEdit* m_pAbsorptionEdit;
- QLabel* m_pAbsorptionLabel;
+ TQLabel* m_pAbsorptionLabel;
- QCheckBox* m_pEnableEmissionEdit;
+ TQCheckBox* m_pEnableEmissionEdit;
PMColorEdit* m_pEmissionEdit;
- QLabel* m_pEmissionLabel;
+ TQLabel* m_pEmissionLabel;
- QCheckBox* m_pEnableScatteringEdit;
- QWidget* m_pScatteringWidget;
- QComboBox* m_pScatteringTypeEdit;
+ TQCheckBox* m_pEnableScatteringEdit;
+ TQWidget* m_pScatteringWidget;
+ TQComboBox* m_pScatteringTypeEdit;
PMColorEdit* m_pScatteringColorEdit;
- QLabel* m_pScatteringEccentricityLabel;
+ TQLabel* m_pScatteringEccentricityLabel;
PMFloatEdit* m_pScatteringEccentricityEdit;
PMFloatEdit* m_pScatteringExtinctionEdit;
};
diff --git a/kpovmodeler/pmmemento.cpp b/kpovmodeler/pmmemento.cpp
index 84f52a6e..f417e575 100644
--- a/kpovmodeler/pmmemento.cpp
+++ b/kpovmodeler/pmmemento.cpp
@@ -56,7 +56,7 @@ PMMementoData::PMMementoData( PMMetaObject* classType, int vID, PMThreeState dat
}
-PMMementoData::PMMementoData( PMMetaObject* classType, int vID, const QString& data )
+PMMementoData::PMMementoData( PMMetaObject* classType, int vID, const TQString& data )
: PMVariant( data )
{
m_objectType = classType;
@@ -149,13 +149,13 @@ void PMMemento::addData( PMMetaObject* classType, int vID, const PMThreeState da
addData( new PMMementoData( classType, vID, data ) );
}
-void PMMemento::addData( PMMetaObject* classType, int vID, const QString& data )
+void PMMemento::addData( PMMetaObject* classType, int vID, const TQString& data )
{
if( !findData( classType, vID ) )
addData( new PMMementoData( classType, vID, data ) );
}
-void PMMemento::addIDChange( PMMetaObject* classType, int vID, const QString& data )
+void PMMemento::addIDChange( PMMetaObject* classType, int vID, const TQString& data )
{
if( !findData( classType, vID ) )
{
@@ -183,11 +183,11 @@ void PMMemento::addData( PMMetaObject* classType, int vID, PMObject* obj )
addData( new PMMementoData( classType, vID, obj ) );
}
-QString PMMemento::oldID( ) const
+TQString PMMemento::oldID( ) const
{
if( m_pIDData )
return m_pIDData->stringData( );
- return QString::null;
+ return TQString::null;
}
void PMMemento::addChangedObject( PMObject* obj, int mode )
diff --git a/kpovmodeler/pmmemento.h b/kpovmodeler/pmmemento.h
index a3ea9c98..cdbab2d2 100644
--- a/kpovmodeler/pmmemento.h
+++ b/kpovmodeler/pmmemento.h
@@ -27,8 +27,8 @@
#include "pmvariant.h"
#include "pmcommand.h"
#include "pmmetaobject.h"
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
/**
* Class used by @ref PMObjectMemento to store one value.
@@ -65,7 +65,7 @@ public:
/**
* Stores a string
*/
- PMMementoData( PMMetaObject* classType, int vID, const QString& data );
+ PMMementoData( PMMetaObject* classType, int vID, const TQString& data );
/**
* Stores a @ref PMVector
*/
@@ -99,7 +99,7 @@ private:
int m_valueID;
};
-typedef QPtrList<PMMementoData> PMMementoDataList;
+typedef TQPtrList<PMMementoData> PMMementoDataList;
/**
@@ -126,8 +126,8 @@ private:
int m_mode;
};
-typedef QPtrList<PMObjectChange> PMObjectChangeList;
-typedef QPtrListIterator<PMObjectChange> PMObjectChangeListIterator;
+typedef TQPtrList<PMObjectChange> PMObjectChangeList;
+typedef TQPtrListIterator<PMObjectChange> PMObjectChangeListIterator;
/**
* Class that stores the data of povray objects for undo/redo information
@@ -202,10 +202,10 @@ public:
void addData( PMMetaObject* classType, int vID, const PMThreeState data );
/**
- * Adds an @ref QString data object. Will be ignored if the memento
+ * Adds an @ref TQString data object. Will be ignored if the memento
* already contains this data
*/
- void addData( PMMetaObject* classType, int vID, const QString& data );
+ void addData( PMMetaObject* classType, int vID, const TQString& data );
/**
* Adds an @ref PMVector data object. Will be ignored if the memento
@@ -228,7 +228,7 @@ public:
/**
* Call this to store an id change
*/
- void addIDChange( PMMetaObject* classType, int vID, const QString& data );
+ void addIDChange( PMMetaObject* classType, int vID, const TQString& data );
/**
* Returns true if the memento contains changed data
@@ -253,7 +253,7 @@ public:
/**
* Returns the old id
*/
- QString oldID( ) const;
+ TQString oldID( ) const;
/**
* If one object is changed, other objects can be changed as well.
*
@@ -289,7 +289,7 @@ private:
/**
* List of changes
*/
- QPtrList<PMObjectChange> m_changedObjects;
+ TQPtrList<PMObjectChange> m_changedObjects;
PMObjectChange* m_pOriginatorChange;
PMObject* m_pOriginator;
};
@@ -298,19 +298,19 @@ private:
/**
* Iterator for memento data
*/
-class PMMementoDataIterator : public QPtrListIterator<PMMementoData>
+class PMMementoDataIterator : public TQPtrListIterator<PMMementoData>
{
public:
PMMementoDataIterator( const PMMemento& m )
- : QPtrListIterator<PMMementoData>( m.m_data )
+ : TQPtrListIterator<PMMementoData>( m.m_data )
{
}
PMMementoDataIterator( const PMMemento* m )
- : QPtrListIterator<PMMementoData>( m->m_data )
+ : TQPtrListIterator<PMMementoData>( m->m_data )
{
}
PMMementoDataIterator( const PMMementoDataList& l )
- : QPtrListIterator<PMMementoData>( l )
+ : TQPtrListIterator<PMMementoData>( l )
{
}
};
diff --git a/kpovmodeler/pmmesh.cpp b/kpovmodeler/pmmesh.cpp
index 571170a9..d143edf4 100644
--- a/kpovmodeler/pmmesh.cpp
+++ b/kpovmodeler/pmmesh.cpp
@@ -52,11 +52,11 @@ public:
/**
* Saves the triangles memento data
*/
- void setTriangleMementos( const QPtrList<PMMemento>& list )
+ void setTriangleMementos( const TQPtrList<PMMemento>& list )
{
if ( !m_bTriangleMementosSaved )
{
- QPtrListIterator<PMMemento> Itr( list );
+ TQPtrListIterator<PMMemento> Itr( list );
PMMemento* m;
while( ( m = Itr.current( ) ) != 0 )
{
@@ -71,7 +71,7 @@ public:
/**
* Returns the triangles memento data
*/
- QPtrList<PMMemento> triangleMementos( ) const
+ TQPtrList<PMMemento> triangleMementos( ) const
{
if ( !m_bTriangleMementosSaved )
kdError( PMArea ) << "Triangles mementos not saved in PMMeshMemento::triangleMementos\n";
@@ -82,7 +82,7 @@ public:
*/
bool triangleMementosSaved( ) const { return m_bTriangleMementosSaved; }
private:
- QPtrList<PMMemento> m_triangleMementos;
+ TQPtrList<PMMemento> m_triangleMementos;
bool m_bTriangleMementosSaved;
};
@@ -112,12 +112,12 @@ PMMesh::~PMMesh( )
{
}
-QString PMMesh::description( ) const
+TQString PMMesh::description( ) const
{
return i18n( "mesh" );
}
-void PMMesh::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMMesh::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "hierarchy", m_hierarchy );
e.setAttribute( "enable_inside_vector", m_enableInsideVector );
@@ -189,7 +189,7 @@ void PMMesh::setInsideVector( const PMVector& iv )
}
}
-PMDialogEditBase* PMMesh::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMMesh::editWidget( TQWidget* parent ) const
{
return new PMMeshEdit( parent );
}
@@ -233,8 +233,8 @@ void PMMesh::restoreMemento( PMMemento* s )
{
int numChildren = countChildren( );
PMMemento* tm;
- QPtrList<PMMemento> list = m->triangleMementos( );
- QPtrListIterator<PMMemento> Itr( list );
+ TQPtrList<PMMemento> list = m->triangleMementos( );
+ TQPtrListIterator<PMMemento> Itr( list );
for ( int i = 0; i < numChildren && ( tm = Itr.current( ) ) != 0; ++i, ++Itr )
childAt( i )->restoreMemento( tm );
}
@@ -331,8 +331,8 @@ void PMMesh::controlPointsChangedList( PMControlPointList& list, PMObjectList& o
{
int numChildren = countChildren( );
PMControlPoint* p;
- QValueList<pointToPoint>::ConstIterator ptpItr = m_pointToPointList.begin( );
- QPtrList<PMMemento> mementoList;
+ TQValueList<pointToPoint>::ConstIterator ptpItr = m_pointToPointList.begin( );
+ TQPtrList<PMMemento> mementoList;
PMTriangle *obj;
PMVector p0, p1, p2;
PM3DControlPoint* cp0, * cp1, * cp2;
@@ -346,7 +346,7 @@ void PMMesh::controlPointsChangedList( PMControlPointList& list, PMObjectList& o
int listID, pointID, numCP;
// have to cache changed values because checking once changes them to false
- QMemArray<bool> changed( list.count( ) );
+ TQMemArray<bool> changed( list.count( ) );
p = list.first( );
for ( int i = 0; p; ++i, p = list.next( ) )
changed[i] = p->changed( );
diff --git a/kpovmodeler/pmmesh.h b/kpovmodeler/pmmesh.h
index 4045d3ab..a6fe0089 100644
--- a/kpovmodeler/pmmesh.h
+++ b/kpovmodeler/pmmesh.h
@@ -53,7 +53,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMMesh( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -61,19 +61,19 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMMeshEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmmesh" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmmesh" ); }
/**
* Returns the hierarchy flag
@@ -136,7 +136,7 @@ private:
/**
* List of point to point structures
*/
- QValueList<pointToPoint> m_pointToPointList;
+ TQValueList<pointToPoint> m_pointToPointList;
};
#endif
diff --git a/kpovmodeler/pmmeshedit.cpp b/kpovmodeler/pmmeshedit.cpp
index 0b0e2269..6ddf9679 100644
--- a/kpovmodeler/pmmeshedit.cpp
+++ b/kpovmodeler/pmmeshedit.cpp
@@ -20,12 +20,12 @@
#include "pmmesh.h"
#include "pmvectoredit.h"
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include <klocale.h>
-PMMeshEdit::PMMeshEdit( QWidget* parent, const char* name )
+PMMeshEdit::PMMeshEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -35,21 +35,21 @@ void PMMeshEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* layout;
- m_pHierarchy = new QCheckBox( i18n( "Hierarchy" ), this );
- m_pEnableInsideVector = new QCheckBox( i18n( "Inside vector:" ), this );
+ TQHBoxLayout* layout;
+ m_pHierarchy = new TQCheckBox( i18n( "Hierarchy" ), this );
+ m_pEnableInsideVector = new TQCheckBox( i18n( "Inside vector:" ), this );
m_pInsideVector = new PMVectorEdit( "x", "y", "z", this );
- layout = new QHBoxLayout( topLayout( ) );
+ layout = new TQHBoxLayout( topLayout( ) );
layout->addWidget( m_pHierarchy );
layout->addStretch( 1 );
- layout = new QHBoxLayout( topLayout( ) );
+ layout = new TQHBoxLayout( topLayout( ) );
layout->addWidget( m_pEnableInsideVector );
layout->addWidget( m_pInsideVector );
layout->addStretch( 1 );
- connect( m_pHierarchy, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pEnableInsideVector, SIGNAL( clicked( ) ), SLOT( slotInsideVectorClicked( ) ) );
- connect( m_pInsideVector, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pHierarchy, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pEnableInsideVector, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotInsideVectorClicked( ) ) );
+ connect( m_pInsideVector, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMMeshEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmmeshedit.h b/kpovmodeler/pmmeshedit.h
index 1a778ac8..dc4dc4ae 100644
--- a/kpovmodeler/pmmeshedit.h
+++ b/kpovmodeler/pmmeshedit.h
@@ -27,7 +27,7 @@
#include "pmsolidobjectedit.h"
class PMMesh;
-class QCheckBox;
+class TQCheckBox;
class PMVectorEdit;
/**
@@ -41,7 +41,7 @@ public:
/**
* Creates a PMMeshEdit with parent and name
*/
- PMMeshEdit( QWidget* parent, const char* name = 0 );
+ PMMeshEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -58,8 +58,8 @@ protected slots:
private:
PMMesh* m_pDisplayedObject;
- QCheckBox* m_pHierarchy;
- QCheckBox* m_pEnableInsideVector;
+ TQCheckBox* m_pHierarchy;
+ TQCheckBox* m_pEnableInsideVector;
PMVectorEdit* m_pInsideVector;
};
diff --git a/kpovmodeler/pmmessage.cpp b/kpovmodeler/pmmessage.cpp
index 5587181f..8e024a18 100644
--- a/kpovmodeler/pmmessage.cpp
+++ b/kpovmodeler/pmmessage.cpp
@@ -22,7 +22,7 @@ PMMessage::PMMessage( )
m_pObject = 0;
}
-PMMessage::PMMessage( const QString& text, PMObject* object )
+PMMessage::PMMessage( const TQString& text, PMObject* object )
{
m_sText = text;
m_pObject = object;
diff --git a/kpovmodeler/pmmessage.h b/kpovmodeler/pmmessage.h
index 1247ccb0..86404104 100644
--- a/kpovmodeler/pmmessage.h
+++ b/kpovmodeler/pmmessage.h
@@ -25,8 +25,8 @@
#include "pmobject.h"
-#include <qvaluelist.h>
-#include <qstring.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
/**
* Class for messages in the @ref PMErrorDialog
@@ -42,7 +42,7 @@ public:
* Creates a message with a text and optionally with
* a link to an object
*/
- PMMessage( const QString& text, PMObject* object = 0 );
+ PMMessage( const TQString& text, PMObject* object = 0 );
/**
* Copy constructor
*/
@@ -55,11 +55,11 @@ public:
/**
* Returns the message text
*/
- QString text( ) const { return m_sText; }
+ TQString text( ) const { return m_sText; }
/**
* Sets the message text
*/
- void setText( const QString& text ) { m_sText = text; }
+ void setText( const TQString& text ) { m_sText = text; }
/**
* Returns the linked object or 0
*/
@@ -70,10 +70,10 @@ public:
void setLinkedObject( PMObject* o ) { m_pObject = o; }
private:
- QString m_sText;
+ TQString m_sText;
PMObject* m_pObject;
};
-typedef QValueList<PMMessage> PMMessageList;
+typedef TQValueList<PMMessage> PMMessageList;
#endif
diff --git a/kpovmodeler/pmmetaobject.cpp b/kpovmodeler/pmmetaobject.cpp
index a7e98b9b..0163e1fc 100644
--- a/kpovmodeler/pmmetaobject.cpp
+++ b/kpovmodeler/pmmetaobject.cpp
@@ -17,7 +17,7 @@
#include "pmmetaobject.h"
-PMPropertyBase::PMPropertyBase( const QString& name,
+PMPropertyBase::PMPropertyBase( const TQString& name,
PMVariant::PMVariantDataType t,
bool readOnly, bool writeOnly )
{
@@ -36,7 +36,7 @@ PMPropertyBase::PMPropertyBase( const PMPropertyBase& p )
m_writeOnly = p.m_writeOnly;
if( p.m_pEnumList )
- m_pEnumList = new QStringList( *( p.m_pEnumList ) );
+ m_pEnumList = new TQStringList( *( p.m_pEnumList ) );
else
m_pEnumList = 0;
}
@@ -63,7 +63,7 @@ PMVariant PMPropertyBase::getProperty( const PMObject* obj )
return getProtected( obj );
}
-PMMetaObject::PMMetaObject( const QString& className, PMMetaObject* superClass,
+PMMetaObject::PMMetaObject( const TQString& className, PMMetaObject* superClass,
PMObjectFactoryMethod factory )
{
m_className = className;
diff --git a/kpovmodeler/pmmetaobject.h b/kpovmodeler/pmmetaobject.h
index f8daf2eb..95822fc9 100644
--- a/kpovmodeler/pmmetaobject.h
+++ b/kpovmodeler/pmmetaobject.h
@@ -19,10 +19,10 @@
#ifndef PMMETAOBJECT_H
#define PMMETAOBJECT_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qdict.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
#include "pmvariant.h"
class PMPart;
@@ -36,7 +36,7 @@ public:
/**
* Default constructor
*/
- PMPropertyBase( const QString& name, PMVariant::PMVariantDataType t,
+ PMPropertyBase( const TQString& name, PMVariant::PMVariantDataType t,
bool readOnly = false, bool writeOnly = false );
/**
* Copy constructor
@@ -50,7 +50,7 @@ public:
/**
* Returns the properties name
*/
- QString name( ) const { return m_name; }
+ TQString name( ) const { return m_name; }
/**
* Returns the data type
*/
@@ -95,7 +95,7 @@ public:
/**
* Returns the list of enum values
*/
- virtual QStringList enumValues( ) const { return QStringList( ); }
+ virtual TQStringList enumValues( ) const { return TQStringList( ); }
/**
* Returns true if the property is read-only. False by default
@@ -121,15 +121,15 @@ protected:
private:
PMVariant::PMVariantDataType m_type;
- QString m_name;
- QStringList* m_pEnumList;
+ TQString m_name;
+ TQStringList* m_pEnumList;
bool m_readOnly;
bool m_writeOnly;
};
-typedef QPtrList<PMPropertyBase> PMPropertyList;
-typedef QDict<PMPropertyBase> PMPropertyDict;
-typedef QDictIterator<PMPropertyBase> PMPropertyIterator;
+typedef TQPtrList<PMPropertyBase> PMPropertyList;
+typedef TQDict<PMPropertyBase> PMPropertyDict;
+typedef TQDictIterator<PMPropertyBase> PMPropertyIterator;
/**
* Macro that defines a property class for a PMObject class
@@ -150,7 +150,7 @@ public: \
typedef void ( ObjectClass::*SetDoublePtr ) ( double ); \
typedef void ( ObjectClass::*SetBoolPtr ) ( bool ); \
typedef void ( ObjectClass::*SetThreeStatePtr )( PMThreeState ); \
- typedef void ( ObjectClass::*SetStringPtr ) ( const QString& ); \
+ typedef void ( ObjectClass::*SetStringPtr ) ( const TQString& ); \
typedef void ( ObjectClass::*SetVectorPtr ) ( const PMVector& ); \
typedef void ( ObjectClass::*SetColorPtr ) ( const PMColor& ); \
typedef void ( ObjectClass::*SetObjectPtr ) ( PMObject* ); \
@@ -160,68 +160,68 @@ public: \
typedef double ( ObjectClass::*GetDoublePtr ) ( void ) const; \
typedef bool ( ObjectClass::*GetBoolPtr ) ( void ) const; \
typedef PMThreeState ( ObjectClass::*GetThreeStatePtr ) ( void ) const; \
- typedef QString ( ObjectClass::*GetStringPtr ) ( void ) const; \
+ typedef TQString ( ObjectClass::*GetStringPtr ) ( void ) const; \
typedef PMVector ( ObjectClass::*GetVectorPtr ) ( void ) const; \
typedef PMColor ( ObjectClass::*GetColorPtr ) ( void ) const; \
typedef PMObject* ( ObjectClass::*GetObjectPtr ) ( void ) const; \
\
- PropertyClass( const QString& name, SetIntPtr setFktn, GetIntPtr getFktn ) \
+ PropertyClass( const TQString& name, SetIntPtr setFktn, GetIntPtr getFktn ) \
: PMPropertyBase( name, PMVariant::Integer, \
setFktn == 0, getFktn == 0 ) \
{ \
m_setFunction.setInt = setFktn; \
m_getFunction.getInt = getFktn; \
} \
- PropertyClass( const QString& name, SetUnsignedPtr setFktn, GetUnsignedPtr getFktn ) \
+ PropertyClass( const TQString& name, SetUnsignedPtr setFktn, GetUnsignedPtr getFktn ) \
: PMPropertyBase( name, PMVariant::Unsigned, \
setFktn == 0, getFktn == 0 ) \
{ \
m_setFunction.setUnsigned = setFktn; \
m_getFunction.getUnsigned = getFktn; \
} \
- PropertyClass( const QString& name, SetDoublePtr setFktn, GetDoublePtr getFktn ) \
+ PropertyClass( const TQString& name, SetDoublePtr setFktn, GetDoublePtr getFktn ) \
: PMPropertyBase( name, PMVariant::Double, \
setFktn == 0, getFktn == 0 ) \
{ \
m_setFunction.setDouble = setFktn; \
m_getFunction.getDouble = getFktn; \
} \
- PropertyClass( const QString& name, SetBoolPtr setFktn, GetBoolPtr getFktn ) \
+ PropertyClass( const TQString& name, SetBoolPtr setFktn, GetBoolPtr getFktn ) \
: PMPropertyBase( name, PMVariant::Bool, \
setFktn == 0, getFktn == 0 ) \
{ \
m_setFunction.setBool = setFktn; \
m_getFunction.getBool = getFktn; \
} \
- PropertyClass( const QString& name, SetThreeStatePtr setFktn, GetThreeStatePtr getFktn ) \
+ PropertyClass( const TQString& name, SetThreeStatePtr setFktn, GetThreeStatePtr getFktn ) \
: PMPropertyBase( name, PMVariant::ThreeState, \
setFktn == 0, getFktn == 0 ) \
{ \
m_setFunction.setThreeState = setFktn; \
m_getFunction.getThreeState = getFktn; \
} \
- PropertyClass( const QString& name, SetStringPtr setFktn, GetStringPtr getFktn ) \
+ PropertyClass( const TQString& name, SetStringPtr setFktn, GetStringPtr getFktn ) \
: PMPropertyBase( name, PMVariant::String, \
setFktn == 0, getFktn == 0 ) \
{ \
m_setFunction.setString = setFktn; \
m_getFunction.getString = getFktn; \
} \
- PropertyClass( const QString& name, SetVectorPtr setFktn, GetVectorPtr getFktn ) \
+ PropertyClass( const TQString& name, SetVectorPtr setFktn, GetVectorPtr getFktn ) \
: PMPropertyBase( name, PMVariant::Vector, \
setFktn == 0, getFktn == 0 ) \
{ \
m_setFunction.setVector = setFktn; \
m_getFunction.getVector = getFktn; \
} \
- PropertyClass( const QString& name, SetColorPtr setFktn, GetColorPtr getFktn ) \
+ PropertyClass( const TQString& name, SetColorPtr setFktn, GetColorPtr getFktn ) \
: PMPropertyBase( name, PMVariant::Color, \
setFktn == 0, getFktn == 0 ) \
{ \
m_setFunction.setColor = setFktn; \
m_getFunction.getColor = getFktn; \
} \
- PropertyClass( const QString& name, SetObjectPtr setFktn, GetObjectPtr getFktn ) \
+ PropertyClass( const TQString& name, SetObjectPtr setFktn, GetObjectPtr getFktn ) \
: PMPropertyBase( name, PMVariant::ObjectPointer, \
setFktn == 0, getFktn == 0 ) \
{ \
@@ -358,7 +358,7 @@ public:
* a new object of that type. factoryMethod may be 0 for
* abstract classes.
*/
- PMMetaObject( const QString& className, PMMetaObject* superClass = 0,
+ PMMetaObject( const TQString& className, PMMetaObject* superClass = 0,
PMObjectFactoryMethod factoryMethod = 0 );
/**
* Destructor
@@ -368,7 +368,7 @@ public:
/**
* Returns the class name
*/
- QString className( ) const { return m_className; }
+ TQString className( ) const { return m_className; }
/**
* Returns the meta object of the super class
*/
@@ -400,13 +400,13 @@ public:
* Returns a property by name or 0 if a property with the name
* doesn't exist.
*/
- PMPropertyBase* property( const QString& name ) const
+ PMPropertyBase* property( const TQString& name ) const
{
return m_propertiesDict.find( name );
}
private:
- QString m_className;
+ TQString m_className;
PMMetaObject* m_pSuperClass;
PMPropertyList m_properties;
PMPropertyDict m_propertiesDict;
diff --git a/kpovmodeler/pmmovecommand.cpp b/kpovmodeler/pmmovecommand.cpp
index 1d70f3e0..bb75b0e4 100644
--- a/kpovmodeler/pmmovecommand.cpp
+++ b/kpovmodeler/pmmovecommand.cpp
@@ -27,7 +27,7 @@
#include "pmdebug.h"
#include <klocale.h>
-#include <qptrdict.h>
+#include <tqptrdict.h>
PMMoveCommand::PMMoveCommand( PMObject* obj, PMObject* parent, PMObject* after )
: PMCommand( i18n( "Move %1" ).arg( obj->description( ) ) )
@@ -172,7 +172,7 @@ void PMMoveCommand::execute( PMCommandManager* theManager )
}
}
- QPtrListIterator<PMMemento> mit( m_dataChanges );
+ TQPtrListIterator<PMMemento> mit( m_dataChanges );
for( ; mit.current( ); ++mit )
{
PMObjectChangeListIterator change = mit.current( )->changedObjects( );
@@ -212,7 +212,7 @@ void PMMoveCommand::undo( PMCommandManager* theManager )
theManager->cmdObjectChanged( obj, PMCAdd );
}
- QPtrListIterator<PMMemento> mit( m_dataChanges );
+ TQPtrListIterator<PMMemento> mit( m_dataChanges );
for( ; mit.current( ); ++mit )
{
mit.current( )->originator( )->restoreMemento( mit.current( ) );
@@ -238,11 +238,11 @@ int PMMoveCommand::errorFlags( PMPart* )
bool stop;
// dictionary of deleted objects
- QPtrDict<bool> deletedObjects( 1009 );
+ TQPtrDict<bool> deletedObjects( 1009 );
deletedObjects.setAutoDelete( true );
- QPtrDict<bool> objectsAfterInsertPosition( 1009 );
+ TQPtrDict<bool> objectsAfterInsertPosition( 1009 );
objectsAfterInsertPosition.setAutoDelete( true );
- QPtrDict<bool> declaresBeforeInsertPosition( 199 );
+ TQPtrDict<bool> declaresBeforeInsertPosition( 199 );
declaresBeforeInsertPosition.setAutoDelete( true );
@@ -441,7 +441,7 @@ int PMMoveCommand::errorFlags( PMPart* )
if( linked )
{
obj = info->deletedObject( );
- QString name = obj->name( );
+ TQString name = obj->name( );
decl = ( PMDeclare* ) linked;
if( name.isEmpty( ) )
diff --git a/kpovmodeler/pmmovecommand.h b/kpovmodeler/pmmovecommand.h
index 75250fd2..5aac246d 100644
--- a/kpovmodeler/pmmovecommand.h
+++ b/kpovmodeler/pmmovecommand.h
@@ -82,7 +82,7 @@ private:
PMObjectList m_insertErrors;
bool m_executed;
bool m_firstExecution;
- QPtrList<PMMemento> m_dataChanges;
+ TQPtrList<PMMemento> m_dataChanges;
};
#endif
diff --git a/kpovmodeler/pmnamedobject.cpp b/kpovmodeler/pmnamedobject.cpp
index d6d6ab09..72553cd4 100644
--- a/kpovmodeler/pmnamedobject.cpp
+++ b/kpovmodeler/pmnamedobject.cpp
@@ -60,7 +60,7 @@ void PMNamedObject::cleanUp( ) const
Base::cleanUp( );
}
-void PMNamedObject::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMNamedObject::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "name", m_name );
Base::serialize( e, doc );
@@ -72,7 +72,7 @@ void PMNamedObject::readAttributes( const PMXMLHelper& h )
Base::readAttributes( h );
}
-void PMNamedObject::setName( const QString& newName )
+void PMNamedObject::setName( const TQString& newName )
{
if( newName != m_name )
{
diff --git a/kpovmodeler/pmnamedobject.h b/kpovmodeler/pmnamedobject.h
index d4cdee2c..8b7b0b62 100644
--- a/kpovmodeler/pmnamedobject.h
+++ b/kpovmodeler/pmnamedobject.h
@@ -53,18 +53,18 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns the name of the object. This is the name that helps
* the user to identify a object (like "south_wall", "floor" ...) */
- virtual QString name( ) const { return m_name; }
+ virtual TQString name( ) const { return m_name; }
/**
* Sets the name of the object.
*/
- virtual void setName( const QString& newName );
+ virtual void setName( const TQString& newName );
/**
* Returns true if the object can have a name
*/
@@ -81,7 +81,7 @@ private:
/**
* Name of the object
*/
- QString m_name;
+ TQString m_name;
static PMMetaObject* s_pMetaObject;
};
diff --git a/kpovmodeler/pmnamedobjectedit.cpp b/kpovmodeler/pmnamedobjectedit.cpp
index 35a6c96c..8f590982 100644
--- a/kpovmodeler/pmnamedobjectedit.cpp
+++ b/kpovmodeler/pmnamedobjectedit.cpp
@@ -19,12 +19,12 @@
#include "pmnamedobjectedit.h"
#include "pmnamedobject.h"
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
#include <klocale.h>
-PMNamedObjectEdit::PMNamedObjectEdit( QWidget* parent, const char* name )
+PMNamedObjectEdit::PMNamedObjectEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -34,15 +34,15 @@ void PMNamedObjectEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* layout = new QHBoxLayout( topLayout( ) );
- m_pNameEdit = new QLineEdit( this );
- QLabel* label = new QLabel( i18n( "Name:" ), this );
+ TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) );
+ m_pNameEdit = new TQLineEdit( this );
+ TQLabel* label = new TQLabel( i18n( "Name:" ), this );
layout->addWidget( label );
layout->addWidget( m_pNameEdit );
- connect( m_pNameEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotNameChanged( const QString& ) ) );
+ connect( m_pNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotNameChanged( const TQString& ) ) );
}
void PMNamedObjectEdit::displayObject( PMObject* o )
@@ -74,7 +74,7 @@ bool PMNamedObjectEdit::isDataValid( )
return Base::isDataValid( );
}
-void PMNamedObjectEdit::slotNameChanged( const QString& )
+void PMNamedObjectEdit::slotNameChanged( const TQString& )
{
emit dataChanged( );
}
diff --git a/kpovmodeler/pmnamedobjectedit.h b/kpovmodeler/pmnamedobjectedit.h
index 8d9dff40..dcf8cb07 100644
--- a/kpovmodeler/pmnamedobjectedit.h
+++ b/kpovmodeler/pmnamedobjectedit.h
@@ -27,7 +27,7 @@
#include "pmdialogeditbase.h"
class PMNamedObject;
-class QLineEdit;
+class TQLineEdit;
/**
* Dialog edit class for @ref PMNamedObject.
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMNamedObjectEdit with parent and name
*/
- PMNamedObjectEdit( QWidget* parent, const char* name = 0 );
+ PMNamedObjectEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -54,10 +54,10 @@ protected:
virtual void saveContents( );
private slots:
- void slotNameChanged( const QString& );
+ void slotNameChanged( const TQString& );
private:
PMNamedObject* m_pDisplayedObject;
- QLineEdit* m_pNameEdit;
+ TQLineEdit* m_pNameEdit;
};
diff --git a/kpovmodeler/pmnormal.cpp b/kpovmodeler/pmnormal.cpp
index 77fdddd1..722a8fc4 100644
--- a/kpovmodeler/pmnormal.cpp
+++ b/kpovmodeler/pmnormal.cpp
@@ -86,12 +86,12 @@ void PMNormal::cleanUp( ) const
Base::cleanUp( );
}
-QString PMNormal::description( ) const
+TQString PMNormal::description( ) const
{
return i18n( "normal" );
}
-void PMNormal::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMNormal::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
Base::serialize( e, doc );
e.setAttribute( "enable_bump_size", m_enableBumpSize );
@@ -109,7 +109,7 @@ void PMNormal::readAttributes( const PMXMLHelper& h )
m_uvMapping = h.boolAttribute( "uv_mapping", false );
}
-PMDialogEditBase* PMNormal::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMNormal::editWidget( TQWidget* parent ) const
{
return new PMNormalEdit( parent );
}
diff --git a/kpovmodeler/pmnormal.h b/kpovmodeler/pmnormal.h
index 81ec0547..c798d039 100644
--- a/kpovmodeler/pmnormal.h
+++ b/kpovmodeler/pmnormal.h
@@ -49,7 +49,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMNormal( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -57,16 +57,16 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMNormalEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmnormal" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmnormal" ); }
/** */
virtual void restoreMemento( PMMemento* s );
diff --git a/kpovmodeler/pmnormaledit.cpp b/kpovmodeler/pmnormaledit.cpp
index 161f2b0b..68d6f1f3 100644
--- a/kpovmodeler/pmnormaledit.cpp
+++ b/kpovmodeler/pmnormaledit.cpp
@@ -21,13 +21,13 @@
#include "pmlinkedit.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
#include <klocale.h>
-PMNormalEdit::PMNormalEdit( QWidget* parent, const char* name )
+PMNormalEdit::PMNormalEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -35,31 +35,31 @@ PMNormalEdit::PMNormalEdit( QWidget* parent, const char* name )
void PMNormalEdit::createTopWidgets( )
{
- QHBoxLayout* hl;
+ TQHBoxLayout* hl;
Base::createTopWidgets( );
- hl = new QHBoxLayout( topLayout( ) );
- m_pBumpSizeCheck = new QCheckBox( i18n( "Bump size" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ m_pBumpSizeCheck = new TQCheckBox( i18n( "Bump size" ), this );
m_pBumpSizeEdit = new PMFloatEdit( this );
hl->addWidget( m_pBumpSizeCheck );
hl->addWidget( m_pBumpSizeEdit );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- QLabel* lbl = new QLabel( i18n( "Accuracy" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ TQLabel* lbl = new TQLabel( i18n( "Accuracy" ), this );
m_pAccuracy = new PMFloatEdit( this );
hl->addWidget( lbl );
hl->addWidget( m_pAccuracy );
hl->addStretch( 1 );
- m_pUVMapping = new QCheckBox( i18n( "UV mapping" ), this );
+ m_pUVMapping = new TQCheckBox( i18n( "UV mapping" ), this );
topLayout( )->addWidget( m_pUVMapping );
- connect( m_pBumpSizeCheck, SIGNAL( clicked( ) ), SLOT( slotBumpSizeClicked( )) );
- connect( m_pBumpSizeEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( )) );
- connect( m_pAccuracy, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pUVMapping, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pBumpSizeCheck, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotBumpSizeClicked( )) );
+ connect( m_pBumpSizeEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( )) );
+ connect( m_pAccuracy, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pUVMapping, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMNormalEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmnormaledit.h b/kpovmodeler/pmnormaledit.h
index 631db778..72ca9d12 100644
--- a/kpovmodeler/pmnormaledit.h
+++ b/kpovmodeler/pmnormaledit.h
@@ -27,7 +27,7 @@
#include "pmtexturebaseedit.h"
class PMNormal;
-class QCheckBox;
+class TQCheckBox;
class PMFloatEdit;
/**
@@ -41,7 +41,7 @@ public:
/**
* Creates a PMNormalEdit with parent and name
*/
- PMNormalEdit( QWidget* parent, const char* name = 0 );
+ PMNormalEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -60,10 +60,10 @@ protected slots:
private:
PMNormal* m_pDisplayedObject;
- QCheckBox* m_pBumpSizeCheck;
+ TQCheckBox* m_pBumpSizeCheck;
PMFloatEdit* m_pBumpSizeEdit;
PMFloatEdit* m_pAccuracy;
- QCheckBox* m_pUVMapping;
+ TQCheckBox* m_pUVMapping;
};
diff --git a/kpovmodeler/pmobject.cpp b/kpovmodeler/pmobject.cpp
index d6bb94b3..94907482 100644
--- a/kpovmodeler/pmobject.cpp
+++ b/kpovmodeler/pmobject.cpp
@@ -142,7 +142,7 @@ bool PMObject::takeChild( uint )
return false;
}
-PMDialogEditBase* PMObject::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMObject::editWidget( TQWidget* parent ) const
{
return new PMDialogEditBase( parent );
// return 0;
@@ -193,9 +193,9 @@ PMMatrix PMObject::transformedWith( ) const
return result;
}
-QDomElement PMObject::serialize( QDomDocument& doc ) const
+TQDomElement PMObject::serialize( TQDomDocument& doc ) const
{
- QDomElement e = doc.createElement( className( ).lower( ) );
+ TQDomElement e = doc.createElement( className( ).lower( ) );
serialize( e, doc );
return e;
}
@@ -213,7 +213,7 @@ void PMObject::cleanUp( ) const
}
}
-bool PMObject::setProperty( const QString& name, const PMVariant& v )
+bool PMObject::setProperty( const TQString& name, const PMVariant& v )
{
PMPropertyBase* p = metaObject( )->property( name );
if( !p )
@@ -221,9 +221,9 @@ bool PMObject::setProperty( const QString& name, const PMVariant& v )
return p->setProperty( this, v );
}
-QStringList PMObject::properties( ) const
+TQStringList PMObject::properties( ) const
{
- QStringList lst;
+ TQStringList lst;
PMPropertyIterator it = metaObject( )->properties( );
for( ; it.current( ); ++it )
@@ -232,7 +232,7 @@ QStringList PMObject::properties( ) const
return lst;
}
-PMVariant PMObject::property( const QString& name ) const
+PMVariant PMObject::property( const TQString& name ) const
{
PMPropertyBase* p = metaObject( )->property( name );
if( !p )
@@ -240,19 +240,19 @@ PMVariant PMObject::property( const QString& name ) const
return p->getProperty( this );
}
-bool PMObject::isA( const QString& className ) const
+bool PMObject::isA( const TQString& className ) const
{
if( !m_pPart )
return false;
return m_pPart->prototypeManager( )->isA( metaObject( ), className );
}
-QString PMObject::type( ) const
+TQString PMObject::type( ) const
{
return metaObject( )->className( );
}
-bool PMObject::canInsert( const QString& className, const PMObject* after,
+bool PMObject::canInsert( const TQString& className, const PMObject* after,
const PMObjectList* objectsBetween ) const
{
if( !m_pPart )
@@ -275,7 +275,7 @@ int PMObject::canInsert( const PMObjectList& list, const PMObject* after ) const
return m_pPart->insertRuleSystem( )->canInsert( this, list, after );
}
-int PMObject::canInsert( const QStringList& classes, const PMObject* after ) const
+int PMObject::canInsert( const TQStringList& classes, const PMObject* after ) const
{
if( !m_pPart )
return false;
diff --git a/kpovmodeler/pmobject.h b/kpovmodeler/pmobject.h
index 0c11008b..fcf67466 100644
--- a/kpovmodeler/pmobject.h
+++ b/kpovmodeler/pmobject.h
@@ -24,12 +24,12 @@
#include <config.h>
#endif
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdebug.h>
-#include <qdom.h>
+#include <tqdom.h>
#include "pmmatrix.h"
#include "pmcontrolpoint.h"
@@ -45,8 +45,8 @@ class PMObjectAction;
class PMPart;
class PMObject;
-typedef QPtrList<PMObject> PMObjectList;
-typedef QPtrListIterator<PMObject> PMObjectListIterator;
+typedef TQPtrList<PMObject> PMObjectList;
+typedef TQPtrListIterator<PMObject> PMObjectListIterator;
/**
* Base class for all povray objects
@@ -91,26 +91,26 @@ public:
* Returns true if the object is of type t or inherits the object
* class with type t
*/
- bool isA( const QString& className ) const;
+ bool isA( const TQString& className ) const;
/**
* Returns the class name (not i18n'ed, without the PM prefix)
*/
- QString type( ) const;
+ TQString type( ) const;
/**
* same as @ref type( )
*/
- QString className( ) const { return type( ); }
+ TQString className( ) const { return type( ); }
/**
* Returns the class name of the object (povray name).
* This is the name that is showed in dialogs and menus.
*/
- virtual QString description( ) const = 0;
+ virtual TQString description( ) const = 0;
/**
* Returns the name of the object. This is the name that helps
* the user to identify a object (like "south wall", "floor" ...)
*/
- virtual QString name( ) const { return QString::null; }
+ virtual TQString name( ) const { return TQString::null; }
/**
* Returns true if the object can have a name
*/
@@ -136,7 +136,7 @@ public:
* The parser uses the third parameter for top level objects. These objects
* have to be treated as if they are inserted after the object after.
*/
- bool canInsert( const QString& className, const PMObject* after,
+ bool canInsert( const TQString& className, const PMObject* after,
const PMObjectList* objectsBetween = 0 ) const;
/**
* Returns true if the object o can be inserted as child after the object
@@ -154,7 +154,7 @@ public:
/**
* Returns the number of objects that can be inserted at that position
*/
- int canInsert( const QStringList& classes, const PMObject* after ) const;
+ int canInsert( const TQStringList& classes, const PMObject* after ) const;
/**
* Returns true if an insert or remove operation of children will
@@ -251,7 +251,7 @@ public:
/**
* Returns a list of auxiliary files
*/
- virtual QStringList auxiliaryFiles( ) const { return QStringList( ); }
+ virtual TQStringList auxiliaryFiles( ) const { return TQStringList( ); }
/**
* Returns true if the object has a (povray) transformation matrix.
@@ -332,7 +332,7 @@ public:
* @see PMObjectAction
*/
virtual void addObjectActions( const PMControlPointList&,
- QPtrList<PMObjectAction>& ) { }
+ TQPtrList<PMObjectAction>& ) { }
/**
* This member is called when the user selects an object action
@@ -344,17 +344,17 @@ public:
*/
virtual void objectActionCalled( const PMObjectAction*,
const PMControlPointList&,
- const QPtrList<PMVector>&,
+ const TQPtrList<PMVector>&,
const PMVector& ) { };
/**
* Saves the object as kpovmodeler xml code.
*/
- QDomElement serialize( QDomDocument& doc ) const;
+ TQDomElement serialize( TQDomDocument& doc ) const;
/**
* Adds the objects attributes and child objects to the element
*/
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const = 0;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const = 0;
/**
* Reads the attributes from the QDomElement
*/
@@ -363,16 +363,16 @@ public:
/**
* Returns the list of known properties
*/
- QStringList properties( ) const;
+ TQStringList properties( ) const;
/**
* Sets a property and returns true if successful
*/
- bool setProperty( const QString&, const PMVariant& v );
+ bool setProperty( const TQString&, const PMVariant& v );
/**
* Returns a property
*/
- PMVariant property( const QString& ) const;
+ PMVariant property( const TQString& ) const;
/**
* Returns true if the object is selected
@@ -413,12 +413,12 @@ public:
*
* The widget will be created as a child of parent.
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const = 0;
+ virtual TQString pixmap( ) const = 0;
/**
* Returns a pointer to the @ref PMDeclare object, that is linked to
* that object, or 0, if this object contains no link
diff --git a/kpovmodeler/pmobjectaction.h b/kpovmodeler/pmobjectaction.h
index e9a843ce..5397759c 100644
--- a/kpovmodeler/pmobjectaction.h
+++ b/kpovmodeler/pmobjectaction.h
@@ -27,8 +27,8 @@
#include "pmvector.h"
#include "pmcontrolpoint.h"
#include "pmmetaobject.h"
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
class KAction;
@@ -49,7 +49,7 @@ public:
* Constructor
*/
PMObjectAction( PMMetaObject* objectType, int actionID,
- const QString& description, bool enabled = true )
+ const TQString& description, bool enabled = true )
{
m_class = objectType;
m_actionID = actionID;
@@ -69,7 +69,7 @@ public:
/**
* Returns the description
*/
- QString description( ) const { return m_description; }
+ TQString description( ) const { return m_description; }
/**
* Returns the enabled flag
@@ -92,7 +92,7 @@ public:
private:
PMMetaObject* m_class;
int m_actionID;
- QString m_description;
+ TQString m_description;
bool m_enabled;
int m_menuID;
};
diff --git a/kpovmodeler/pmobjectdrag.cpp b/kpovmodeler/pmobjectdrag.cpp
index 6bebfc8e..cd1ee6da 100644
--- a/kpovmodeler/pmobjectdrag.cpp
+++ b/kpovmodeler/pmobjectdrag.cpp
@@ -26,20 +26,20 @@
#include "pmiomanager.h"
#include "pmserializer.h"
-#include <qbuffer.h>
+#include <tqbuffer.h>
#include <string.h>
const char* const c_kpmDocumentMimeFormat = "application/x-kpovmodeler";
-PMObjectDrag::PMObjectDrag( PMPart* part, PMObject* object, QWidget* dragSource,
+PMObjectDrag::PMObjectDrag( PMPart* part, PMObject* object, TQWidget* dragSource,
const char* name )
- : QDragObject( dragSource, name )
+ : TQDragObject( dragSource, name )
{
- QByteArray modelerData;
+ TQByteArray modelerData;
- QTextStream s2( modelerData, IO_WriteOnly );
- QDomDocument doc( "KPOVMODELER" );
- QDomElement top = doc.createElement( "objects" );
+ TQTextStream s2( modelerData, IO_WriteOnly );
+ TQDomDocument doc( "KPOVMODELER" );
+ TQDomElement top = doc.createElement( "objects" );
doc.appendChild( top );
top.setAttribute( "majorFormat", c_majorDocumentFormat );
top.setAttribute( "minorFormat", c_minorDocumentFormat );
@@ -49,13 +49,13 @@ PMObjectDrag::PMObjectDrag( PMPart* part, PMObject* object, QWidget* dragSource,
PMObject* o = object->firstChild( );
for( ; o; o = o->nextSibling( ) )
{
- QDomElement e = o->serialize( doc );
+ TQDomElement e = o->serialize( doc );
top.appendChild( e );
}
}
else
{
- QDomElement e = object->serialize( doc );
+ TQDomElement e = object->serialize( doc );
top.appendChild( e );
}
s2 << doc;
@@ -63,14 +63,14 @@ PMObjectDrag::PMObjectDrag( PMPart* part, PMObject* object, QWidget* dragSource,
m_data.push_back( modelerData );
m_mimeTypes.push_back( c_kpmDocumentMimeFormat );
- const QPtrList<PMIOFormat>& formats = part->ioManager( )->formats( );
- QPtrListIterator<PMIOFormat> it( formats );
+ const TQPtrList<PMIOFormat>& formats = part->ioManager( )->formats( );
+ TQPtrListIterator<PMIOFormat> it( formats );
for( ; it.current( ); ++it )
{
if( it.current( )->services( ) & PMIOFormat::Export )
{
- QByteArray data;
- QBuffer buffer( data );
+ TQByteArray data;
+ TQBuffer buffer( data );
buffer.open( IO_WriteOnly );
PMSerializer* ser = it.current( )->newSerializer( &buffer );
@@ -96,15 +96,15 @@ PMObjectDrag::PMObjectDrag( PMPart* part, PMObject* object, QWidget* dragSource,
}
}
-PMObjectDrag::PMObjectDrag( PMPart* part, const PMObjectList& objList, QWidget* dragSource,
+PMObjectDrag::PMObjectDrag( PMPart* part, const PMObjectList& objList, TQWidget* dragSource,
const char* name )
- : QDragObject( dragSource, name )
+ : TQDragObject( dragSource, name )
{
- QByteArray modelerData;
+ TQByteArray modelerData;
- QTextStream s2( modelerData, IO_WriteOnly );
- QDomDocument doc( "KPOVMODELER" );
- QDomElement top = doc.createElement( "objects" );
+ TQTextStream s2( modelerData, IO_WriteOnly );
+ TQDomDocument doc( "KPOVMODELER" );
+ TQDomElement top = doc.createElement( "objects" );
doc.appendChild( top );
top.setAttribute( "majorFormat", c_majorDocumentFormat );
top.setAttribute( "minorFormat", c_minorDocumentFormat );
@@ -117,13 +117,13 @@ PMObjectDrag::PMObjectDrag( PMPart* part, const PMObjectList& objList, QWidget*
PMObject* o = it.current( )->firstChild( );
for( ; o; o = o->nextSibling( ) )
{
- QDomElement e = o->serialize( doc );
+ TQDomElement e = o->serialize( doc );
top.appendChild( e );
}
}
else
{
- QDomElement e = it.current( )->serialize( doc );
+ TQDomElement e = it.current( )->serialize( doc );
top.appendChild( e );
}
}
@@ -133,14 +133,14 @@ PMObjectDrag::PMObjectDrag( PMPart* part, const PMObjectList& objList, QWidget*
m_data.push_back( modelerData );
m_mimeTypes.push_back( c_kpmDocumentMimeFormat );
- const QPtrList<PMIOFormat>& formats = part->ioManager( )->formats( );
- QPtrListIterator<PMIOFormat> fit( formats );
+ const TQPtrList<PMIOFormat>& formats = part->ioManager( )->formats( );
+ TQPtrListIterator<PMIOFormat> fit( formats );
for( ; fit.current( ); ++fit )
{
if( fit.current( )->services( ) & PMIOFormat::Export )
{
- QByteArray data;
- QBuffer buffer( data );
+ TQByteArray data;
+ TQBuffer buffer( data );
buffer.open( IO_WriteOnly );
PMSerializer* ser = fit.current( )->newSerializer( &buffer );
@@ -170,10 +170,10 @@ PMObjectDrag::~PMObjectDrag( )
{
}
-QByteArray PMObjectDrag::encodedData( const char* format ) const
+TQByteArray PMObjectDrag::encodedData( const char* format ) const
{
- QValueList<QByteArray>::ConstIterator dit;
- QStringList::ConstIterator sit;
+ TQValueList<TQByteArray>::ConstIterator dit;
+ TQStringList::ConstIterator sit;
for( dit = m_data.begin( ), sit = m_mimeTypes.begin( );
dit != m_data.end( ) && sit != m_mimeTypes.end( ); ++dit, ++sit )
@@ -182,7 +182,7 @@ QByteArray PMObjectDrag::encodedData( const char* format ) const
return *dit;
}
- QByteArray empty;
+ TQByteArray empty;
return empty;
}
@@ -193,13 +193,13 @@ const char* PMObjectDrag::format( int i /*=0*/ ) const
return 0;
}
-bool PMObjectDrag::canDecode( const QMimeSource* e, PMPart* part )
+bool PMObjectDrag::canDecode( const TQMimeSource* e, PMPart* part )
{
if( e->provides( c_kpmDocumentMimeFormat ) )
return true;
- const QPtrList<PMIOFormat>& formats = part->ioManager( )->formats( );
- QPtrListIterator<PMIOFormat> fit( formats );
+ const TQPtrList<PMIOFormat>& formats = part->ioManager( )->formats( );
+ TQPtrListIterator<PMIOFormat> fit( formats );
for( ; fit.current( ); ++fit )
if( fit.current( )->services( ) & PMIOFormat::Import &&
e->provides( fit.current( )->mimeType( ).latin1( ) ) )
@@ -208,17 +208,17 @@ bool PMObjectDrag::canDecode( const QMimeSource* e, PMPart* part )
return false;
}
-PMParser* PMObjectDrag::newParser( const QMimeSource* e, PMPart* part )
+PMParser* PMObjectDrag::newParser( const TQMimeSource* e, PMPart* part )
{
if( e->provides( c_kpmDocumentMimeFormat ) )
return new PMXMLParser( part, e->encodedData( c_kpmDocumentMimeFormat ) );
- const QPtrList<PMIOFormat>& formats = part->ioManager( )->formats( );
- QPtrListIterator<PMIOFormat> fit( formats );
+ const TQPtrList<PMIOFormat>& formats = part->ioManager( )->formats( );
+ TQPtrListIterator<PMIOFormat> fit( formats );
for( ; fit.current( ); ++fit )
{
PMIOFormat* f = fit.current( );
- QString str = f->mimeType( );
+ TQString str = f->mimeType( );
const char* lat = str.latin1( );
if( f->services( ) & PMIOFormat::Import && e->provides( lat ) )
return f->newParser( part, e->encodedData( lat ) );
diff --git a/kpovmodeler/pmobjectdrag.h b/kpovmodeler/pmobjectdrag.h
index a8f4daf3..757eae8d 100644
--- a/kpovmodeler/pmobjectdrag.h
+++ b/kpovmodeler/pmobjectdrag.h
@@ -20,8 +20,8 @@
#ifndef PMOBJECTDRAG_H
#define PMOBJECTDRAG_H
-#include <qdragobject.h>
-#include <qstringlist.h>
+#include <tqdragobject.h>
+#include <tqstringlist.h>
#include "pmobject.h"
class PMParser;
@@ -41,12 +41,12 @@ public:
* by the part.
* @see PMIOManager
*/
- PMObjectDrag( PMPart* part, PMObject* object, QWidget* dragSource = 0,
+ PMObjectDrag( PMPart* part, PMObject* object, TQWidget* dragSource = 0,
const char* name = 0 );
/**
* Creates a drag object for all objects in objList
*/
- PMObjectDrag( PMPart* part, const PMObjectList& objList, QWidget* dragSource = 0,
+ PMObjectDrag( PMPart* part, const PMObjectList& objList, TQWidget* dragSource = 0,
const char* name = 0 );
/**
* Deletes the drag object
@@ -56,7 +56,7 @@ public:
* Returns the encoded payload of this object, in the
* specified MIME format.
*/
- virtual QByteArray encodedData( const char* ) const;
+ virtual TQByteArray encodedData( const char* ) const;
/**
* Returns the ith format, or NULL.
*/
@@ -64,18 +64,18 @@ public:
/**
* Returns true if the information in e can be decoded
*/
- static bool canDecode( const QMimeSource* e, PMPart* part );
+ static bool canDecode( const TQMimeSource* e, PMPart* part );
/**
* Returns a pointer to a parser for this drag object or 0, if the data
* can't be decoded.
*
* The caller is responsible to delete the parser.
*/
- static PMParser* newParser( const QMimeSource* e, PMPart* part );
+ static PMParser* newParser( const TQMimeSource* e, PMPart* part );
private:
- QValueList<QByteArray> m_data;
- QStringList m_mimeTypes;
+ TQValueList<TQByteArray> m_data;
+ TQStringList m_mimeTypes;
};
#endif
diff --git a/kpovmodeler/pmobjectlibrarysettings.cpp b/kpovmodeler/pmobjectlibrarysettings.cpp
index ce80f77c..47a38435 100644
--- a/kpovmodeler/pmobjectlibrarysettings.cpp
+++ b/kpovmodeler/pmobjectlibrarysettings.cpp
@@ -24,54 +24,54 @@
#include "pmlibraryhandleedit.h"
#include "pmdebug.h"
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>
-PMObjectLibrarySettings::PMObjectLibrarySettings( QWidget* parent, const char* name )
+PMObjectLibrarySettings::PMObjectLibrarySettings( TQWidget* parent, const char* name )
: PMSettingsDialogPage( parent, name )
{
- QVBoxLayout* vlayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) );
+ TQVBoxLayout* vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) );
- QGroupBox* gb = new QGroupBox( i18n( "Libraries" ), this );
+ TQGroupBox* gb = new TQGroupBox( i18n( "Libraries" ), this );
vlayout->addWidget( gb );
- QHBoxLayout* hlayout = new QHBoxLayout( gb, KDialog::marginHint( ) + 5, KDialog::spacingHint( ) );
- m_pObjectLibraries = new QListBox( gb );
- connect( m_pObjectLibraries, SIGNAL( selectionChanged( ) ), SLOT( slotObjectLibraryChanged( ) ) );
+ TQHBoxLayout* hlayout = new TQHBoxLayout( gb, KDialog::marginHint( ) + 5, KDialog::spacingHint( ) );
+ m_pObjectLibraries = new TQListBox( gb );
+ connect( m_pObjectLibraries, TQT_SIGNAL( selectionChanged( ) ), TQT_SLOT( slotObjectLibraryChanged( ) ) );
hlayout->addWidget( m_pObjectLibraries );
- QVBoxLayout* gvl = new QVBoxLayout( hlayout );
- m_pCreateObjectLibrary = new QPushButton( i18n( "Create..." ), gb );
- connect( m_pCreateObjectLibrary, SIGNAL( clicked( ) ), SLOT( slotCreateObjectLibrary( ) ) );
+ TQVBoxLayout* gvl = new TQVBoxLayout( hlayout );
+ m_pCreateObjectLibrary = new TQPushButton( i18n( "Create..." ), gb );
+ connect( m_pCreateObjectLibrary, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotCreateObjectLibrary( ) ) );
gvl->addWidget( m_pCreateObjectLibrary );
- m_pRemoveObjectLibrary = new QPushButton( i18n( "Remove" ), gb );
- connect( m_pRemoveObjectLibrary, SIGNAL( clicked( ) ), SLOT( slotRemoveObjectLibrary( ) ) );
+ m_pRemoveObjectLibrary = new TQPushButton( i18n( "Remove" ), gb );
+ connect( m_pRemoveObjectLibrary, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemoveObjectLibrary( ) ) );
gvl->addWidget( m_pRemoveObjectLibrary );
- m_pImportObjectLibrary = new QPushButton( i18n( "Import" ), gb );
- connect( m_pImportObjectLibrary, SIGNAL( clicked( ) ), SLOT( slotImportObjectLibrary( ) ) );
+ m_pImportObjectLibrary = new TQPushButton( i18n( "Import" ), gb );
+ connect( m_pImportObjectLibrary, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotImportObjectLibrary( ) ) );
gvl->addWidget( m_pImportObjectLibrary );
- m_pModifyObjectLibrary = new QPushButton( i18n( "Properties" ), gb );
- connect( m_pModifyObjectLibrary, SIGNAL( clicked( ) ), SLOT( slotModifyObjectLibrary( ) ) );
+ m_pModifyObjectLibrary = new TQPushButton( i18n( "Properties" ), gb );
+ connect( m_pModifyObjectLibrary, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotModifyObjectLibrary( ) ) );
gvl->addWidget( m_pModifyObjectLibrary );
gvl->addStretch( 1 );
- gb = new QGroupBox( i18n( "Library Details" ), this );
- QGridLayout* grid = new QGridLayout( gb, 4, 2, KDialog::marginHint( ) + 5, KDialog::spacingHint( ) );
- QLabel* lbl = new QLabel( i18n( "Path" ), gb );
+ gb = new TQGroupBox( i18n( "Library Details" ), this );
+ TQGridLayout* grid = new TQGridLayout( gb, 4, 2, KDialog::marginHint( ) + 5, KDialog::spacingHint( ) );
+ TQLabel* lbl = new TQLabel( i18n( "Path" ), gb );
grid->addWidget( lbl, 0, 0 );
- lbl = new QLabel( i18n( "Author" ), gb );
+ lbl = new TQLabel( i18n( "Author" ), gb );
grid->addWidget( lbl, 1, 0 );
- lbl = new QLabel( i18n( "Description" ), gb );
+ lbl = new TQLabel( i18n( "Description" ), gb );
grid->addWidget( lbl, 2, 0 );
- m_pLibraryPath = new QLabel( "", gb );
- m_pLibraryAuthor = new QLabel( "", gb );
- m_pLibraryDescription = new QLabel( "", gb );
- m_pReadOnlyText = new QLabel( "", gb );
+ m_pLibraryPath = new TQLabel( "", gb );
+ m_pLibraryAuthor = new TQLabel( "", gb );
+ m_pLibraryDescription = new TQLabel( "", gb );
+ m_pReadOnlyText = new TQLabel( "", gb );
grid->addWidget( m_pLibraryPath, 0, 1 );
grid->addWidget( m_pLibraryAuthor, 1, 1 );
grid->addWidget( m_pLibraryDescription, 2, 1 );
@@ -113,7 +113,7 @@ void PMObjectLibrarySettings::slotModifyObjectLibrary( )
{
PMLibraryHandleEdit h_dlg( h, this );
- if( h_dlg.exec( ) == QDialog::Accepted )
+ if( h_dlg.exec( ) == TQDialog::Accepted )
{
h->saveLibraryInfo( );
displaySettings( );
@@ -139,9 +139,9 @@ void PMObjectLibrarySettings::slotCreateObjectLibrary( )
{
PMLibraryHandle h;
PMLibraryHandleEdit h_dlg( &h, this );
- QString libfilename;
+ TQString libfilename;
- if( h_dlg.exec( ) == QDialog::Accepted )
+ if( h_dlg.exec( ) == TQDialog::Accepted )
{
libfilename = h.name( );
h.setPath( locateLocal( "appdata", "library/" ) + libfilename.stripWhiteSpace( ) + "/" );
diff --git a/kpovmodeler/pmobjectlibrarysettings.h b/kpovmodeler/pmobjectlibrarysettings.h
index 1c4c9ab9..f4e7f854 100644
--- a/kpovmodeler/pmobjectlibrarysettings.h
+++ b/kpovmodeler/pmobjectlibrarysettings.h
@@ -26,8 +26,8 @@
#include "pmsettingsdialog.h"
-class QPushButton;
-class QListBox;
+class TQPushButton;
+class TQListBox;
/**
* Object library configuration dialog page
@@ -39,7 +39,7 @@ public:
/**
* Default constructor
*/
- PMObjectLibrarySettings( QWidget* parent, const char* name = 0 );
+ PMObjectLibrarySettings( TQWidget* parent, const char* name = 0 );
/** */
virtual void displaySettings( );
/** */
@@ -62,16 +62,16 @@ protected slots:
private:
int m_objectLibraryIndex;
int m_selectionIndex;
- QListBox* m_pObjectLibraries;
- QPushButton* m_pCreateObjectLibrary;
- QPushButton* m_pModifyObjectLibrary;
- QPushButton* m_pRemoveObjectLibrary;
- QPushButton* m_pImportObjectLibrary;
+ TQListBox* m_pObjectLibraries;
+ TQPushButton* m_pCreateObjectLibrary;
+ TQPushButton* m_pModifyObjectLibrary;
+ TQPushButton* m_pRemoveObjectLibrary;
+ TQPushButton* m_pImportObjectLibrary;
- QLabel* m_pLibraryPath;
- QLabel* m_pLibraryAuthor;
- QLabel* m_pLibraryDescription;
- QLabel* m_pReadOnlyText;
+ TQLabel* m_pLibraryPath;
+ TQLabel* m_pLibraryAuthor;
+ TQLabel* m_pLibraryDescription;
+ TQLabel* m_pReadOnlyText;
};
diff --git a/kpovmodeler/pmobjectlink.cpp b/kpovmodeler/pmobjectlink.cpp
index 6596471d..559d3fe4 100644
--- a/kpovmodeler/pmobjectlink.cpp
+++ b/kpovmodeler/pmobjectlink.cpp
@@ -53,7 +53,7 @@ PMObjectLink::~PMObjectLink( )
{
}
-QString PMObjectLink::description( ) const
+TQString PMObjectLink::description( ) const
{
return i18n( "object link" );
}
@@ -139,7 +139,7 @@ void PMObjectLink::setLinkedObjectProperty( PMObject* o )
setLinkedObject( ( PMDeclare* ) o );
}
-void PMObjectLink::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMObjectLink::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
if( m_pLinkedObject )
e.setAttribute( "prototype", m_pLinkedObject->id( ) );
@@ -148,7 +148,7 @@ void PMObjectLink::serialize( QDomElement& e, QDomDocument& doc ) const
void PMObjectLink::readAttributes( const PMXMLHelper& h )
{
- QString id = h.stringAttribute( "prototype", "" );
+ TQString id = h.stringAttribute( "prototype", "" );
if( !id.isEmpty( ) )
{
PMDeclare* link = h.parser( )->checkLink( id );
@@ -167,7 +167,7 @@ void PMObjectLink::readAttributes( const PMXMLHelper& h )
Base::readAttributes( h );
}
-PMDialogEditBase* PMObjectLink::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMObjectLink::editWidget( TQWidget* parent ) const
{
return new PMObjectLinkEdit( parent );
}
diff --git a/kpovmodeler/pmobjectlink.h b/kpovmodeler/pmobjectlink.h
index 54eb4833..8ec7b474 100644
--- a/kpovmodeler/pmobjectlink.h
+++ b/kpovmodeler/pmobjectlink.h
@@ -50,7 +50,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMObjectLink( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -74,15 +74,15 @@ public:
void setLinkedObjectProperty( PMObject* o );
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMObjectLinkEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmobjectlink" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmobjectlink" ); }
/** */
virtual void restoreMemento( PMMemento* s );
diff --git a/kpovmodeler/pmobjectlinkedit.cpp b/kpovmodeler/pmobjectlinkedit.cpp
index 935f8714..98aead0c 100644
--- a/kpovmodeler/pmobjectlinkedit.cpp
+++ b/kpovmodeler/pmobjectlinkedit.cpp
@@ -22,9 +22,9 @@
#include "pmobjectselect.h"
#include "pmlinkedit.h"
-#include <qlayout.h>
+#include <tqlayout.h>
-PMObjectLinkEdit::PMObjectLinkEdit( QWidget* parent, const char* name )
+PMObjectLinkEdit::PMObjectLinkEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -35,12 +35,12 @@ void PMObjectLinkEdit::createTopWidgets( )
Base::createTopWidgets( );
m_pLinkEdit = new PMLinkEdit( this );
- QStringList l;
+ TQStringList l;
l.append( "GraphicalObject" );
l.append( "Light" );
m_pLinkEdit->setLinkPossibilities( l );
topLayout( )->addWidget( m_pLinkEdit );
- connect( m_pLinkEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pLinkEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMObjectLinkEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmobjectlinkedit.h b/kpovmodeler/pmobjectlinkedit.h
index 2f517951..fd1ce86b 100644
--- a/kpovmodeler/pmobjectlinkedit.h
+++ b/kpovmodeler/pmobjectlinkedit.h
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMObjectLinkEdit with parent and name
*/
- PMObjectLinkEdit( QWidget* parent, const char* name = 0 );
+ PMObjectLinkEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmobjectselect.cpp b/kpovmodeler/pmobjectselect.cpp
index fb9fa0ce..fcfbb3f5 100644
--- a/kpovmodeler/pmobjectselect.cpp
+++ b/kpovmodeler/pmobjectselect.cpp
@@ -20,17 +20,17 @@
#include <klocale.h>
#include <kiconloader.h>
-PMListBoxObject::PMListBoxObject( QListBox* listbox, PMObject* obj,
- QListBoxItem* after )
- : QListBoxPixmap( listbox,
+PMListBoxObject::PMListBoxObject( TQListBox* listbox, PMObject* obj,
+ TQListBoxItem* after )
+ : TQListBoxPixmap( listbox,
SmallIcon( obj->pixmap( ), PMFactory::instance( ) ),
checkName( obj->name( ) ), after )
{
m_pObject = obj;
}
-PMListBoxObject::PMListBoxObject( QListBox* listbox, PMObject* obj )
- : QListBoxPixmap( listbox,
+PMListBoxObject::PMListBoxObject( TQListBox* listbox, PMObject* obj )
+ : TQListBoxPixmap( listbox,
SmallIcon( obj->pixmap( ), PMFactory::instance( ) ),
checkName( obj->name( ) ) )
{
@@ -38,38 +38,38 @@ PMListBoxObject::PMListBoxObject( QListBox* listbox, PMObject* obj )
}
PMListBoxObject::PMListBoxObject( PMObject* obj )
- : QListBoxPixmap( SmallIcon( obj->pixmap( ), PMFactory::instance( ) ),
+ : TQListBoxPixmap( SmallIcon( obj->pixmap( ), PMFactory::instance( ) ),
checkName( obj->name( ) ) )
{
m_pObject = obj;
}
-PMListBoxObject::PMListBoxObject( QListBox* listbox, PMObject* obj,
- const QString& text, QListBoxItem* after )
- : QListBoxPixmap( listbox,
+PMListBoxObject::PMListBoxObject( TQListBox* listbox, PMObject* obj,
+ const TQString& text, TQListBoxItem* after )
+ : TQListBoxPixmap( listbox,
SmallIcon( obj->pixmap( ), PMFactory::instance( ) ),
text, after )
{
m_pObject = obj;
}
-PMListBoxObject::PMListBoxObject( QListBox* listbox, PMObject* obj,
- const QString& text )
- : QListBoxPixmap( listbox,
+PMListBoxObject::PMListBoxObject( TQListBox* listbox, PMObject* obj,
+ const TQString& text )
+ : TQListBoxPixmap( listbox,
SmallIcon( obj->pixmap( ), PMFactory::instance( ) ),
text )
{
m_pObject = obj;
}
-PMListBoxObject::PMListBoxObject( PMObject* obj, const QString& text )
- : QListBoxPixmap( SmallIcon( obj->pixmap( ), PMFactory::instance( ) ),
+PMListBoxObject::PMListBoxObject( PMObject* obj, const TQString& text )
+ : TQListBoxPixmap( SmallIcon( obj->pixmap( ), PMFactory::instance( ) ),
text )
{
m_pObject = obj;
}
-QString PMListBoxObject::checkName( const QString& text )
+TQString PMListBoxObject::checkName( const TQString& text )
{
if( text.isEmpty( ) )
return i18n( "(unnamed)" );
@@ -81,21 +81,21 @@ PMListBoxObject::~PMListBoxObject( )
}
-QSize PMObjectSelect::s_size = QSize( 200, 300 );
+TQSize PMObjectSelect::s_size = TQSize( 200, 300 );
-PMObjectSelect::PMObjectSelect( QWidget* parent, const char* name, bool modal )
+PMObjectSelect::PMObjectSelect( TQWidget* parent, const char* name, bool modal )
: KDialogBase( parent, name, modal, i18n( "Choose Object" ), Ok | Cancel )
{
m_pSelectedObject = 0;
- m_pListBox = new QListBox( this );
+ m_pListBox = new TQListBox( this );
setMainWidget( m_pListBox );
setInitialSize( s_size );
- connect( m_pListBox, SIGNAL( highlighted( QListBoxItem* ) ),
- SLOT( slotHighlighted( QListBoxItem* ) ) );
- connect( m_pListBox, SIGNAL( selected( QListBoxItem* ) ),
- SLOT( slotSelected( QListBoxItem* ) ) );
+ connect( m_pListBox, TQT_SIGNAL( highlighted( TQListBoxItem* ) ),
+ TQT_SLOT( slotHighlighted( TQListBoxItem* ) ) );
+ connect( m_pListBox, TQT_SIGNAL( selected( TQListBoxItem* ) ),
+ TQT_SLOT( slotSelected( TQListBoxItem* ) ) );
enableButtonOK( false );
}
@@ -109,8 +109,8 @@ void PMObjectSelect::addObject( PMObject* obj )
m_pListBox->insertItem( new PMListBoxObject( obj ) );
}
-int PMObjectSelect::selectObject( PMObject* link, const QString& t,
- PMObject* & obj, QWidget* parent )
+int PMObjectSelect::selectObject( PMObject* link, const TQString& t,
+ PMObject* & obj, TQWidget* parent )
{
PMObject* last = link;
PMObject* scene;
@@ -166,8 +166,8 @@ int PMObjectSelect::selectObject( PMObject* link, const QString& t,
}
int PMObjectSelect::selectObject( PMObject* link,
- const QStringList& t,
- PMObject* & obj, QWidget* parent )
+ const TQStringList& t,
+ PMObject* & obj, TQWidget* parent )
{
PMObject* last = link;
PMObject* scene;
@@ -222,8 +222,8 @@ int PMObjectSelect::selectObject( PMObject* link,
return Rejected;
}
-int PMObjectSelect::selectDeclare( PMObject* link, const QString& declareType,
- PMObject* & obj, QWidget* parent )
+int PMObjectSelect::selectDeclare( PMObject* link, const TQString& declareType,
+ PMObject* & obj, TQWidget* parent )
{
PMObject* last = link;
PMObject* scene;
@@ -284,8 +284,8 @@ int PMObjectSelect::selectDeclare( PMObject* link, const QString& declareType,
return Rejected;
}
-int PMObjectSelect::selectDeclare( PMObject* link, const QStringList& declareTypes,
- PMObject* & obj, QWidget* parent )
+int PMObjectSelect::selectDeclare( PMObject* link, const TQStringList& declareTypes,
+ PMObject* & obj, TQWidget* parent )
{
PMObject* last = link;
PMObject* scene;
@@ -346,13 +346,13 @@ int PMObjectSelect::selectDeclare( PMObject* link, const QStringList& declareTyp
return Rejected;
}
-void PMObjectSelect::slotHighlighted( QListBoxItem* lbi )
+void PMObjectSelect::slotHighlighted( TQListBoxItem* lbi )
{
m_pSelectedObject = ( ( PMListBoxObject* ) lbi )->object( );
enableButtonOK( true );
}
-void PMObjectSelect::slotSelected( QListBoxItem* lbi )
+void PMObjectSelect::slotSelected( TQListBoxItem* lbi )
{
m_pSelectedObject = ( ( PMListBoxObject* ) lbi )->object( );
enableButtonOK( true );
diff --git a/kpovmodeler/pmobjectselect.h b/kpovmodeler/pmobjectselect.h
index c69af315..46d39d21 100644
--- a/kpovmodeler/pmobjectselect.h
+++ b/kpovmodeler/pmobjectselect.h
@@ -24,15 +24,15 @@
#endif
#include <kdialogbase.h>
-#include <qlistbox.h>
-#include <qsize.h>
-#include <qvaluelist.h>
-#include <qstringlist.h>
+#include <tqlistbox.h>
+#include <tqsize.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
#include "pmobject.h"
#include "pmdeclare.h"
/**
- * QListBoxItem for @ref PMObject
+ * TQListBoxItem for @ref PMObject
*/
class PMListBoxObject : public QListBoxPixmap
{
@@ -41,11 +41,11 @@ public:
* Constructs a list box item in listbox listbox showing the
* object obj. The item gets inserted after the item after
*/
- PMListBoxObject( QListBox* listbox, PMObject* obj, QListBoxItem* after );
+ PMListBoxObject( TQListBox* listbox, PMObject* obj, TQListBoxItem* after );
/**
* Constructs a list box item in listbox listbox showing the object obj
*/
- PMListBoxObject( QListBox* listbox, PMObject* obj );
+ PMListBoxObject( TQListBox* listbox, PMObject* obj );
/**
* Constructs a list box item showing the object obj
*/
@@ -54,16 +54,16 @@ public:
* Constructs a list box item in listbox listbox showing the
* text text. The item gets inserted after the item after
*/
- PMListBoxObject( QListBox* listbox, PMObject* obj, const QString& text,
- QListBoxItem* after );
+ PMListBoxObject( TQListBox* listbox, PMObject* obj, const TQString& text,
+ TQListBoxItem* after );
/**
* Constructs a list box item in listbox listbox showing the text text
*/
- PMListBoxObject( QListBox* listbox, PMObject* obj, const QString& text );
+ PMListBoxObject( TQListBox* listbox, PMObject* obj, const TQString& text );
/**
* Constructs a list box item showing the text text
*/
- PMListBoxObject( PMObject* obj, const QString& text );
+ PMListBoxObject( PMObject* obj, const TQString& text );
/**
* Deletes the item
*/
@@ -74,7 +74,7 @@ public:
*/
PMObject* object( ) const { return m_pObject; }
private:
- static QString checkName( const QString& text );
+ static TQString checkName( const TQString& text );
PMObject* m_pObject;
};
@@ -88,7 +88,7 @@ public:
/**
* Creates a selection widget with parent and name
*/
- PMObjectSelect( QWidget* parent = 0, const char* name = 0,
+ PMObjectSelect( TQWidget* parent = 0, const char* name = 0,
bool modal = true );
/**
* Deletes the dialog
@@ -111,22 +111,22 @@ public:
*
* Only objects above the object link are listed.
*/
- static int selectObject( PMObject* link, const QString& t, PMObject* & obj,
- QWidget* parent = 0 );
- static int selectObject( PMObject* link, const QStringList& t,
- PMObject* & obj, QWidget* parent = 0 );
- static int selectDeclare( PMObject* link, const QString& declareType,
- PMObject* & obj, QWidget* parent = 0 );
- static int selectDeclare( PMObject* link, const QStringList& dt,
- PMObject* & obj, QWidget* parent = 0 );
+ static int selectObject( PMObject* link, const TQString& t, PMObject* & obj,
+ TQWidget* parent = 0 );
+ static int selectObject( PMObject* link, const TQStringList& t,
+ PMObject* & obj, TQWidget* parent = 0 );
+ static int selectDeclare( PMObject* link, const TQString& declareType,
+ PMObject* & obj, TQWidget* parent = 0 );
+ static int selectDeclare( PMObject* link, const TQStringList& dt,
+ PMObject* & obj, TQWidget* parent = 0 );
protected slots:
- void slotHighlighted( QListBoxItem* lbi );
- void slotSelected( QListBoxItem* lbi );
+ void slotHighlighted( TQListBoxItem* lbi );
+ void slotSelected( TQListBoxItem* lbi );
private:
- QListBox* m_pListBox;
+ TQListBox* m_pListBox;
PMObject* m_pSelectedObject;
- static QSize s_size;
+ static TQSize s_size;
};
#endif
diff --git a/kpovmodeler/pmobjectsettings.cpp b/kpovmodeler/pmobjectsettings.cpp
index 06aae64e..411b0a49 100644
--- a/kpovmodeler/pmobjectsettings.cpp
+++ b/kpovmodeler/pmobjectsettings.cpp
@@ -37,195 +37,195 @@
#include "pmheightfield.h"
#include "pmtext.h"
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
#include <klocale.h>
-PMObjectSettings::PMObjectSettings( QWidget* parent, const char* name )
+PMObjectSettings::PMObjectSettings( TQWidget* parent, const char* name )
: PMSettingsDialogPage( parent, name )
{
- QHBoxLayout* hlayout;
- QVBoxLayout* vlayout;
- QVBoxLayout* gvl;
- QGridLayout* grid;
- QGroupBox* gb;
+ TQHBoxLayout* hlayout;
+ TQVBoxLayout* vlayout;
+ TQVBoxLayout* gvl;
+ TQGridLayout* grid;
+ TQGroupBox* gb;
- vlayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) );
+ vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) );
- gb = new QGroupBox( i18n( "Subdivisions" ), this );
+ gb = new TQGroupBox( i18n( "Subdivisions" ), this );
vlayout->addWidget( gb );
- gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
+ gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
gvl->addSpacing( 10 );
- grid = new QGridLayout( gvl, 13, 3 );
+ grid = new TQGridLayout( gvl, 13, 3 );
- grid->addWidget( new QLabel( i18n( "Sphere:" ), gb ), 0, 0 );
- hlayout = new QHBoxLayout( );
+ grid->addWidget( new TQLabel( i18n( "Sphere:" ), gb ), 0, 0 );
+ hlayout = new TQHBoxLayout( );
grid->addLayout( hlayout, 0, 2 );
- grid->addWidget( new QLabel( "u", gb ), 0, 1 );
+ grid->addWidget( new TQLabel( "u", gb ), 0, 1 );
m_pSphereUSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pSphereUSteps );
m_pSphereUSteps->setValidation( true, 2, true, 32 );
- hlayout->addWidget( new QLabel( "v", gb ) );
+ hlayout->addWidget( new TQLabel( "v", gb ) );
m_pSphereVSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pSphereVSteps );
m_pSphereVSteps->setValidation( true, 4, true, 64 );
hlayout->addStretch( 1 );
- grid->addWidget( new QLabel( i18n( "Cylinder:" ), gb ), 1, 0 );
- hlayout = new QHBoxLayout( );
+ grid->addWidget( new TQLabel( i18n( "Cylinder:" ), gb ), 1, 0 );
+ hlayout = new TQHBoxLayout( );
grid->addLayout( hlayout, 1, 2 );
m_pCylinderSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pCylinderSteps );
m_pCylinderSteps->setValidation( true, 4, true, 64 );
hlayout->addStretch( 1 );
- grid->addWidget( new QLabel( i18n( "Cone:" ), gb ), 2, 0 );
- hlayout = new QHBoxLayout( );
+ grid->addWidget( new TQLabel( i18n( "Cone:" ), gb ), 2, 0 );
+ hlayout = new TQHBoxLayout( );
grid->addLayout( hlayout, 2, 2 );
m_pConeSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pConeSteps );
m_pConeSteps->setValidation( true, 4, true, 64 );
hlayout->addStretch( 1 );
- grid->addWidget( new QLabel( i18n( "Torus:" ), gb ), 3, 0 );
- hlayout = new QHBoxLayout( );
+ grid->addWidget( new TQLabel( i18n( "Torus:" ), gb ), 3, 0 );
+ hlayout = new TQHBoxLayout( );
grid->addLayout( hlayout, 3, 2 );
- grid->addWidget( new QLabel( "u", gb ), 3, 1 );
+ grid->addWidget( new TQLabel( "u", gb ), 3, 1 );
m_pTorusUSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pTorusUSteps );
m_pTorusUSteps->setValidation( true, 2, true, 16 );
- hlayout->addWidget( new QLabel( "v", gb ) );
+ hlayout->addWidget( new TQLabel( "v", gb ) );
m_pTorusVSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pTorusVSteps );
m_pTorusVSteps->setValidation( true, 4, true, 64 );
hlayout->addStretch( 1 );
- grid->addWidget( new QLabel( i18n( "Disc:" ), gb ), 4, 0 );
- hlayout = new QHBoxLayout( );
+ grid->addWidget( new TQLabel( i18n( "Disc:" ), gb ), 4, 0 );
+ hlayout = new TQHBoxLayout( );
grid->addLayout( hlayout, 4, 2 );
m_pDiscSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pDiscSteps );
m_pDiscSteps->setValidation( true, 4, true, 64 );
hlayout->addStretch( 1 );
- grid->addWidget( new QLabel( i18n( "Blob sphere:" ), gb ), 5, 0 );
- hlayout = new QHBoxLayout( );
+ grid->addWidget( new TQLabel( i18n( "Blob sphere:" ), gb ), 5, 0 );
+ hlayout = new TQHBoxLayout( );
grid->addLayout( hlayout, 5, 2 );
- grid->addWidget( new QLabel( "u", gb ), 5, 1 );
+ grid->addWidget( new TQLabel( "u", gb ), 5, 1 );
m_pBlobSphereUSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pBlobSphereUSteps );
m_pBlobSphereUSteps->setValidation( true, 2, true, 32 );
- hlayout->addWidget( new QLabel( "v", gb ) );
+ hlayout->addWidget( new TQLabel( "v", gb ) );
m_pBlobSphereVSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pBlobSphereVSteps );
m_pBlobSphereVSteps->setValidation( true, 4, true, 64 );
hlayout->addStretch( 1 );
- grid->addWidget( new QLabel( i18n( "Blob cylinder:" ), gb ), 6, 0 );
- hlayout = new QHBoxLayout( );
+ grid->addWidget( new TQLabel( i18n( "Blob cylinder:" ), gb ), 6, 0 );
+ hlayout = new TQHBoxLayout( );
grid->addLayout( hlayout, 6, 2 );
- grid->addWidget( new QLabel( "u", gb ), 6, 1 );
+ grid->addWidget( new TQLabel( "u", gb ), 6, 1 );
m_pBlobCylinderUSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pBlobCylinderUSteps );
m_pBlobCylinderUSteps->setValidation( true, 2, true, 32 );
- hlayout->addWidget( new QLabel( "v", gb ) );
+ hlayout->addWidget( new TQLabel( "v", gb ) );
m_pBlobCylinderVSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pBlobCylinderVSteps );
m_pBlobCylinderVSteps->setValidation( true, 4, true, 64 );
hlayout->addStretch( 1 );
- grid->addWidget( new QLabel( i18n( "Lathe:" ), gb ), 7, 0 );
- hlayout = new QHBoxLayout( );
+ grid->addWidget( new TQLabel( i18n( "Lathe:" ), gb ), 7, 0 );
+ hlayout = new TQHBoxLayout( );
grid->addLayout( hlayout, 7, 2 );
- grid->addWidget( new QLabel( "u", gb ), 7, 1 );
+ grid->addWidget( new TQLabel( "u", gb ), 7, 1 );
m_pLatheUSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pLatheUSteps );
m_pLatheUSteps->setValidation( true, 1, true, 16 );
- hlayout->addWidget( new QLabel( "v", gb ) );
+ hlayout->addWidget( new TQLabel( "v", gb ) );
m_pLatheRSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pLatheRSteps );
m_pLatheRSteps->setValidation( true, 4, true, 64 );
hlayout->addStretch( 1 );
- grid->addWidget( new QLabel( i18n( "Surface of revolution:" ), gb ), 8, 0 );
- hlayout = new QHBoxLayout( );
+ grid->addWidget( new TQLabel( i18n( "Surface of revolution:" ), gb ), 8, 0 );
+ hlayout = new TQHBoxLayout( );
grid->addLayout( hlayout, 8, 2 );
- grid->addWidget( new QLabel( "u", gb ), 8, 1 );
+ grid->addWidget( new TQLabel( "u", gb ), 8, 1 );
m_pSorUSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pSorUSteps );
m_pSorUSteps->setValidation( true, 1, true, 16 );
- hlayout->addWidget( new QLabel( "v", gb ) );
+ hlayout->addWidget( new TQLabel( "v", gb ) );
m_pSorRSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pSorRSteps );
m_pSorRSteps->setValidation( true, 4, true, 64 );
hlayout->addStretch( 1 );
- grid->addWidget( new QLabel( i18n( "Prism:" ), gb ), 9, 0 );
- hlayout = new QHBoxLayout( );
+ grid->addWidget( new TQLabel( i18n( "Prism:" ), gb ), 9, 0 );
+ hlayout = new TQHBoxLayout( );
grid->addLayout( hlayout, 9, 2 );
m_pPrismSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pPrismSteps );
m_pPrismSteps->setValidation( true, 1, true, 16 );
hlayout->addStretch( 1 );
- grid->addWidget( new QLabel( i18n( "Superquadric ellipsoid:" ), gb ), 10, 0 );
- hlayout = new QHBoxLayout( );
+ grid->addWidget( new TQLabel( i18n( "Superquadric ellipsoid:" ), gb ), 10, 0 );
+ hlayout = new TQHBoxLayout( );
grid->addLayout( hlayout, 10, 2 );
- grid->addWidget( new QLabel( "u", gb ), 10, 1 );
+ grid->addWidget( new TQLabel( "u", gb ), 10, 1 );
m_pSqeUSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pSqeUSteps );
m_pSqeUSteps->setValidation( true, 2, true, 8 );
- hlayout->addWidget( new QLabel( "v", gb ) );
+ hlayout->addWidget( new TQLabel( "v", gb ) );
m_pSqeVSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pSqeVSteps );
m_pSqeVSteps->setValidation( true, 2, true, 8 );
hlayout->addStretch( 1 );
- grid->addWidget( new QLabel( i18n( "Sphere sweep:" ), gb ), 11, 0 );
- hlayout = new QHBoxLayout( );
+ grid->addWidget( new TQLabel( i18n( "Sphere sweep:" ), gb ), 11, 0 );
+ hlayout = new TQHBoxLayout( );
grid->addLayout( hlayout, 11, 2 );
- grid->addWidget( new QLabel( "r", gb ), 11, 1 );
+ grid->addWidget( new TQLabel( "r", gb ), 11, 1 );
m_pSphereSweepRSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pSphereSweepRSteps );
m_pSphereSweepRSteps->setValidation( true, 4, true, 64 );
- hlayout->addWidget( new QLabel( "s", gb ) );
+ hlayout->addWidget( new TQLabel( "s", gb ) );
m_pSphereSweepSSteps = new PMIntEdit( gb );
hlayout->addWidget( m_pSphereSweepSSteps );
m_pSphereSweepSSteps->setValidation( true, 1, true, 16 );
hlayout->addStretch( 1 );
- grid->addWidget( new QLabel( i18n( "Heightfield:" ), gb ), 12, 0 );
- hlayout = new QHBoxLayout( );
+ grid->addWidget( new TQLabel( i18n( "Heightfield:" ), gb ), 12, 0 );
+ hlayout = new TQHBoxLayout( );
grid->addLayout( hlayout, 12, 2 );
m_pHeightFieldVariance = new PMIntEdit( gb );
hlayout->addWidget( m_pHeightFieldVariance );
m_pHeightFieldVariance->setValidation( true, 1, true, 16 );
hlayout->addStretch( 1 );
- gb = new QGroupBox( i18n( "Sizes" ), this );
+ gb = new TQGroupBox( i18n( "Sizes" ), this );
vlayout->addWidget( gb );
- gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
+ gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
gvl->addSpacing( 10 );
- grid = new QGridLayout( gvl, 1, 2 );
+ grid = new TQGridLayout( gvl, 1, 2 );
- grid->addWidget( new QLabel( i18n( "Plane:" ), gb ), 0, 0 );
- hlayout = new QHBoxLayout( );
+ grid->addWidget( new TQLabel( i18n( "Plane:" ), gb ), 0, 0 );
+ hlayout = new TQHBoxLayout( );
grid->addLayout( hlayout, 0, 1 );
m_pPlaneSize = new PMFloatEdit( gb );
hlayout->addWidget( m_pPlaneSize );
m_pPlaneSize->setValidation( true, 0.1, false, 0.0 );
hlayout->addStretch( 1 );
- gb = new QGroupBox( i18n( "Camera Views" ), this );
+ gb = new TQGroupBox( i18n( "Camera Views" ), this );
vlayout->addWidget( gb );
- gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
+ gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
gvl->addSpacing( 10 );
- m_pHighDetailCameraViews = new QCheckBox( i18n( "High detail for enhanced projections" ), gb );
+ m_pHighDetailCameraViews = new TQCheckBox( i18n( "High detail for enhanced projections" ), gb );
gvl->addWidget( m_pHighDetailCameraViews );
vlayout->addStretch( 1 );
diff --git a/kpovmodeler/pmobjectsettings.h b/kpovmodeler/pmobjectsettings.h
index 716631c0..426ee47d 100644
--- a/kpovmodeler/pmobjectsettings.h
+++ b/kpovmodeler/pmobjectsettings.h
@@ -26,7 +26,7 @@
class PMIntEdit;
class PMFloatEdit;
-class QCheckBox;
+class TQCheckBox;
/**
* Object details configuration dialog page
@@ -38,7 +38,7 @@ public:
/**
* Default constructor
*/
- PMObjectSettings( QWidget* parent, const char* name = 0 );
+ PMObjectSettings( TQWidget* parent, const char* name = 0 );
/** */
virtual void displaySettings( );
/** */
@@ -71,7 +71,7 @@ private:
PMIntEdit* m_pSphereSweepRSteps;
PMIntEdit* m_pSphereSweepSSteps;
PMIntEdit* m_pHeightFieldVariance;
- QCheckBox* m_pHighDetailCameraViews;
+ TQCheckBox* m_pHighDetailCameraViews;
};
diff --git a/kpovmodeler/pmopenglsettings.cpp b/kpovmodeler/pmopenglsettings.cpp
index 64f3ac9c..9c125c32 100644
--- a/kpovmodeler/pmopenglsettings.cpp
+++ b/kpovmodeler/pmopenglsettings.cpp
@@ -20,18 +20,18 @@
#include "pmglview.h"
#include "pmdefaults.h"
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <klocale.h>
-PMOpenGLSettings::PMOpenGLSettings( QWidget* parent, const char* name )
+PMOpenGLSettings::PMOpenGLSettings( TQWidget* parent, const char* name )
: PMSettingsDialogPage( parent, name )
{
- QVBoxLayout* vlayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) );
+ TQVBoxLayout* vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) );
- m_pDirect = new QCheckBox( i18n( "Direct rendering" ), this );
- vlayout->addWidget( new QLabel( i18n( "Changes take only effect after a restart!" ), this ) );
+ m_pDirect = new TQCheckBox( i18n( "Direct rendering" ), this );
+ vlayout->addWidget( new TQLabel( i18n( "Changes take only effect after a restart!" ), this ) );
vlayout->addWidget( m_pDirect );
vlayout->addStretch( 1 );
}
diff --git a/kpovmodeler/pmopenglsettings.h b/kpovmodeler/pmopenglsettings.h
index d893a6b0..424265f7 100644
--- a/kpovmodeler/pmopenglsettings.h
+++ b/kpovmodeler/pmopenglsettings.h
@@ -24,7 +24,7 @@
#include "pmsettingsdialog.h"
-class QCheckBox;
+class TQCheckBox;
/**
* OpenGL configuration dialog page
@@ -36,7 +36,7 @@ public:
/**
* Default constructor
*/
- PMOpenGLSettings( QWidget* parent, const char* name = 0 );
+ PMOpenGLSettings( TQWidget* parent, const char* name = 0 );
/** */
virtual void displaySettings( );
/** */
@@ -47,7 +47,7 @@ public:
virtual void displayDefaults( );
private:
- QCheckBox* m_pDirect;
+ TQCheckBox* m_pDirect;
};
diff --git a/kpovmodeler/pmoutputdevice.cpp b/kpovmodeler/pmoutputdevice.cpp
index 5feb8ec2..abad0e36 100644
--- a/kpovmodeler/pmoutputdevice.cpp
+++ b/kpovmodeler/pmoutputdevice.cpp
@@ -18,13 +18,13 @@
#include "pmoutputdevice.h"
#include "pmpovrayformat.h"
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <klocale.h>
unsigned int PMOutputDevice::s_indentOffset = 3;
bool PMOutputDevice::s_bracketBehindType = true;
-PMOutputDevice::PMOutputDevice( QIODevice* dev, PMPovrayFormat* format )
+PMOutputDevice::PMOutputDevice( TQIODevice* dev, PMPovrayFormat* format )
: PMSerializer( dev ), m_stream( dev )
{
m_pFormat = format;
@@ -38,9 +38,9 @@ PMOutputDevice::~PMOutputDevice( )
{
}
-QString PMOutputDevice::description( ) const
+TQString PMOutputDevice::description( ) const
{
- return QString( "POV-Ray" );
+ return TQString( "POV-Ray" );
}
void PMOutputDevice::callSerialization( const PMObject* o, const PMMetaObject* mo )
@@ -78,7 +78,7 @@ void PMOutputDevice::close( )
// m_stream << ( char ) 0;
}
-void PMOutputDevice::objectBegin( const QString& type )
+void PMOutputDevice::objectBegin( const TQString& type )
{
if( m_pendingNewLine )
newLine( );
@@ -97,7 +97,7 @@ void PMOutputDevice::objectBegin( const QString& type )
m_objectSeparation = false;
}
-void PMOutputDevice::declareBegin( const QString& id )
+void PMOutputDevice::declareBegin( const TQString& id )
{
if( m_pendingNewLine )
newLine( );
@@ -118,7 +118,7 @@ void PMOutputDevice::objectEnd( )
m_objectSeparation = true;
}
-void PMOutputDevice::writeLine( const QString& str )
+void PMOutputDevice::writeLine( const TQString& str )
{
if( m_pendingNewLine )
newLine( );
@@ -127,7 +127,7 @@ void PMOutputDevice::writeLine( const QString& str )
m_objectSeparation = true;
}
-void PMOutputDevice::write( const QString& str )
+void PMOutputDevice::write( const TQString& str )
{
if( m_pendingNewLine )
newLine( );
@@ -142,10 +142,10 @@ void PMOutputDevice::newLine( )
m_stream << '\n' << m_indentString;
}
-void PMOutputDevice::writeComment( const QString& text )
+void PMOutputDevice::writeComment( const TQString& text )
{
- QString s( text );
- QTextStream str( &s, IO_ReadOnly );
+ TQString s( text );
+ TQTextStream str( &s, IO_ReadOnly );
bool lwc = m_lastWasComment;
if( m_pendingNewLine )
@@ -158,7 +158,7 @@ void PMOutputDevice::writeComment( const QString& text )
writeLine( "//" );
else
while( !str.atEnd( ) )
- writeLine( QString( "// " ) + str.readLine( ) );
+ writeLine( TQString( "// " ) + str.readLine( ) );
m_lastWasComment = true;
m_objectSeparation = false;
}
@@ -169,18 +169,18 @@ void PMOutputDevice::writeSemicolon( )
m_stream << ';';
}
-void PMOutputDevice::writeName( const QString& name )
+void PMOutputDevice::writeName( const TQString& name )
{
if( !name.isEmpty( ) )
- writeLine( QString( "//*PMName " ) + name );
+ writeLine( TQString( "//*PMName " ) + name );
}
-QString PMOutputDevice::escapeAndQuoteString( const QString& s )
+TQString PMOutputDevice::escapeAndQuoteString( const TQString& s )
{
- QString result = "\"";
- QString tmp = s;
- QTextStream stream( &tmp, IO_ReadOnly );
- QChar current, last;
+ TQString result = "\"";
+ TQString tmp = s;
+ TQTextStream stream( &tmp, IO_ReadOnly );
+ TQChar current, last;
while( !stream.atEnd( ) )
{
@@ -191,7 +191,7 @@ QString PMOutputDevice::escapeAndQuoteString( const QString& s )
result += current;
// correctly quoted backslash
if( ( last == '\\' ) && ( current == '\\' ) )
- current = QChar( 0 ); // clear the last char
+ current = TQChar( 0 ); // clear the last char
last = current;
}
// backslash at the end
diff --git a/kpovmodeler/pmoutputdevice.h b/kpovmodeler/pmoutputdevice.h
index 25b3c58b..41bad2e5 100644
--- a/kpovmodeler/pmoutputdevice.h
+++ b/kpovmodeler/pmoutputdevice.h
@@ -26,9 +26,9 @@
#include "pmserializer.h"
-#include <qstring.h>
+#include <tqstring.h>
-class QTextStream;
+class TQTextStream;
class PMPovrayFormat;
/**
@@ -49,12 +49,12 @@ public:
* Creates an PMOutputDevice that serializes the povray code
* to the device
*/
- PMOutputDevice( QIODevice* dev, PMPovrayFormat* format );
+ PMOutputDevice( TQIODevice* dev, PMPovrayFormat* format );
/** */
virtual ~PMOutputDevice( );
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual void serialize( PMObject* o );
/** */
@@ -64,11 +64,11 @@ public:
* Writes the povray object type, an open bracket to the text stream
* and indents the next lines
*/
- void objectBegin( const QString& type );
+ void objectBegin( const TQString& type );
/**
* Begins a declare with the identifier id
*/
- void declareBegin( const QString& id );
+ void declareBegin( const TQString& id );
/**
* Writes an closing bracket to the text stream
* and decreases the indentation
@@ -80,11 +80,11 @@ public:
*
* Adds a newline before the string.
*/
- void writeLine( const QString& str );
+ void writeLine( const TQString& str );
/**
* Writes the string to the text stream
*/
- void write( const QString& str );
+ void write( const TQString& str );
/**
* Writes a new line to the text stream and indents the next line.
*/
@@ -92,7 +92,7 @@ public:
/**
* Writes a comment string to the text stream
*/
- void writeComment( const QString& text );
+ void writeComment( const TQString& text );
/**
* Writes a semicolon after a call to objectEnd( )
*/
@@ -101,7 +101,7 @@ public:
* Writes a special name comment to the text stream, if the
* name is not empty
*/
- void writeName( const QString& name );
+ void writeName( const TQString& name );
/**
* Returns the basic indentation offset
@@ -131,7 +131,7 @@ public:
* Escapes only not escaped characters. "\"" and "\\" in the string
* are not escaped.
*/
- static QString escapeAndQuoteString( const QString& s );
+ static TQString escapeAndQuoteString( const TQString& s );
/**
* Calls the serialization method for the object o and class
@@ -148,8 +148,8 @@ private:
PMPovrayFormat* m_pFormat;
unsigned int m_indentation;
- QString m_indentString;
- QTextStream m_stream;
+ TQString m_indentString;
+ TQTextStream m_stream;
bool m_lastWasComment;
bool m_pendingNewLine;
bool m_objectSeparation;
diff --git a/kpovmodeler/pmpalettevalue.cpp b/kpovmodeler/pmpalettevalue.cpp
index f2b26fff..170c551f 100644
--- a/kpovmodeler/pmpalettevalue.cpp
+++ b/kpovmodeler/pmpalettevalue.cpp
@@ -40,15 +40,15 @@ void PMPaletteValue::setValue( double value )
m_value = value;
}
-void PMPaletteValue::serialize( QDomElement& e, QDomDocument& /* doc */ ) const
+void PMPaletteValue::serialize( TQDomElement& e, TQDomDocument& /* doc */ ) const
{
e.setAttribute( "index", m_index );
e.setAttribute( "value", m_value );
}
-void PMPaletteValue::readAttributes( const QDomElement& h )
+void PMPaletteValue::readAttributes( const TQDomElement& h )
{
- QString str;
+ TQString str;
bool ok;
str = h.attribute( "index" );
diff --git a/kpovmodeler/pmpalettevalue.h b/kpovmodeler/pmpalettevalue.h
index 05f9712a..44d443f4 100644
--- a/kpovmodeler/pmpalettevalue.h
+++ b/kpovmodeler/pmpalettevalue.h
@@ -55,11 +55,11 @@ public:
/**
* Serializes the palette entry into a XML document.
*/
- void serialize( QDomElement& e, QDomDocument& doc ) const;
+ void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/**
* Reads the palette entry from a XML document.
*/
- void readAttributes( const QDomElement& h );
+ void readAttributes( const TQDomElement& h );
/**
* Returns true if both values have the same index and value
diff --git a/kpovmodeler/pmpalettevalueedit.cpp b/kpovmodeler/pmpalettevalueedit.cpp
index ae6ea653..ca029887 100644
--- a/kpovmodeler/pmpalettevalueedit.cpp
+++ b/kpovmodeler/pmpalettevalueedit.cpp
@@ -21,42 +21,42 @@
#include "pmlineedits.h"
#include "pmdebug.h"
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
#include <ktabctl.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kdialog.h>
#include <kfiledialog.h>
-PMPaletteValueEdit::PMPaletteValueEdit( QWidget* parent, const char* name )
- : QWidget( parent, name )
+PMPaletteValueEdit::PMPaletteValueEdit( TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
- QLabel* lbl;
- QHBoxLayout* layout;
+ TQLabel* lbl;
+ TQHBoxLayout* layout;
m_pIndexEdit = new PMIntEdit( this );
m_pValueEdit = new PMFloatEdit( this );
- layout = new QHBoxLayout( this );
- lbl = new QLabel( i18n( "Index" ), this );
+ layout = new TQHBoxLayout( this );
+ lbl = new TQLabel( i18n( "Index" ), this );
layout->addWidget( lbl );
layout->addSpacing( KDialog::spacingHint( ) );
layout->addWidget( m_pIndexEdit );
layout->addSpacing( KDialog::spacingHint( ) );
- lbl = new QLabel( i18n( "Value" ), this );
+ lbl = new TQLabel( i18n( "Value" ), this );
layout->addWidget( lbl );
layout->addSpacing( KDialog::spacingHint( ) );
layout->addWidget( m_pValueEdit );
- connect( m_pIndexEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pValueEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pIndexEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pValueEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMPaletteValueEdit::setIndex( int idx )
diff --git a/kpovmodeler/pmpalettevalueedit.h b/kpovmodeler/pmpalettevalueedit.h
index c5795cd9..c2375de5 100644
--- a/kpovmodeler/pmpalettevalueedit.h
+++ b/kpovmodeler/pmpalettevalueedit.h
@@ -37,7 +37,7 @@ class PMPaletteValueEdit: public QWidget
Q_OBJECT
public:
/** */
- PMPaletteValueEdit( QWidget* parent, const char* name = 0 );
+ PMPaletteValueEdit( TQWidget* parent, const char* name = 0 );
/** */
void setIndex( int idx );
/** */
diff --git a/kpovmodeler/pmpalettevaluememento.cpp b/kpovmodeler/pmpalettevaluememento.cpp
index 6db9b922..f683068c 100644
--- a/kpovmodeler/pmpalettevaluememento.cpp
+++ b/kpovmodeler/pmpalettevaluememento.cpp
@@ -29,17 +29,17 @@ PMPaletteValueMemento::~PMPaletteValueMemento( )
{
}
-void PMPaletteValueMemento::setFilterPaletteValues( const QValueList<PMPaletteValue>& v )
+void PMPaletteValueMemento::setFilterPaletteValues( const TQValueList<PMPaletteValue>& v )
{
if( !m_bFilterPaletteValuesSaved )
{
// Direct assignment does not work with Qt 2.3.x
// The list will be changed later in a graphical
- // change because QValueList::detach( ) is called
+ // change because TQValueList::detach( ) is called
// too late!
// Copy the list by hand.
- QValueList<PMPaletteValue>::ConstIterator it = v.begin( );
+ TQValueList<PMPaletteValue>::ConstIterator it = v.begin( );
for( ; it != v.end( ); ++it )
m_filterPaletteValues.append( *it );
@@ -48,7 +48,7 @@ void PMPaletteValueMemento::setFilterPaletteValues( const QValueList<PMPaletteVa
}
}
-QValueList<PMPaletteValue> PMPaletteValueMemento::filterPaletteValues( ) const
+TQValueList<PMPaletteValue> PMPaletteValueMemento::filterPaletteValues( ) const
{
if( !m_bFilterPaletteValuesSaved )
kdError( PMArea ) << "Filter palette values not saved in PMPaletteValueMemento::filterPaletteValues\n";
@@ -56,17 +56,17 @@ QValueList<PMPaletteValue> PMPaletteValueMemento::filterPaletteValues( ) const
return m_filterPaletteValues;
}
-void PMPaletteValueMemento::setTransmitPaletteValues( const QValueList<PMPaletteValue>& v )
+void PMPaletteValueMemento::setTransmitPaletteValues( const TQValueList<PMPaletteValue>& v )
{
if( !m_bTransmitPaletteValuesSaved )
{
// Direct assignment does not work with Qt 2.3.x
// The list will be changed later in a graphical
- // change because QValueList::detach( ) is called
+ // change because TQValueList::detach( ) is called
// too late!
// Copy the list by hand.
- QValueList<PMPaletteValue>::ConstIterator it = v.begin( );
+ TQValueList<PMPaletteValue>::ConstIterator it = v.begin( );
for( ; it != v.end( ); ++it )
m_transmitPaletteValues.append( *it );
@@ -75,7 +75,7 @@ void PMPaletteValueMemento::setTransmitPaletteValues( const QValueList<PMPalette
}
}
-QValueList<PMPaletteValue> PMPaletteValueMemento::transmitPaletteValues( ) const
+TQValueList<PMPaletteValue> PMPaletteValueMemento::transmitPaletteValues( ) const
{
if( !m_bTransmitPaletteValuesSaved )
kdError( PMArea ) << "Transmit palette values not saved in PMPaletteValueMemento::transmitPaletteValues\n";
diff --git a/kpovmodeler/pmpalettevaluememento.h b/kpovmodeler/pmpalettevaluememento.h
index 0ac1242e..8741b80c 100644
--- a/kpovmodeler/pmpalettevaluememento.h
+++ b/kpovmodeler/pmpalettevaluememento.h
@@ -26,7 +26,7 @@
#include "pmmemento.h"
#include "pmpalettevalue.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
/**
@@ -47,11 +47,11 @@ public:
/**
* Saves the filter palette values
*/
- void setFilterPaletteValues( const QValueList<PMPaletteValue>& v );
+ void setFilterPaletteValues( const TQValueList<PMPaletteValue>& v );
/**
* Returns the filter palette values
*/
- QValueList<PMPaletteValue> filterPaletteValues( ) const;
+ TQValueList<PMPaletteValue> filterPaletteValues( ) const;
/**
* Returns true if the filter palette values were saved
*/
@@ -59,11 +59,11 @@ public:
/**
* Saves the transmit palette values
*/
- void setTransmitPaletteValues( const QValueList<PMPaletteValue>& v );
+ void setTransmitPaletteValues( const TQValueList<PMPaletteValue>& v );
/**
* Returns the transmit palette values
*/
- QValueList<PMPaletteValue> transmitPaletteValues( ) const;
+ TQValueList<PMPaletteValue> transmitPaletteValues( ) const;
/**
* Returns true if the transmit palette values were saved
*/
@@ -73,12 +73,12 @@ private:
/**
* The stored values for filter
*/
- QValueList<PMPaletteValue> m_filterPaletteValues;
+ TQValueList<PMPaletteValue> m_filterPaletteValues;
bool m_bFilterPaletteValuesSaved;
/**
* The stored values for transmit
*/
- QValueList<PMPaletteValue> m_transmitPaletteValues;
+ TQValueList<PMPaletteValue> m_transmitPaletteValues;
bool m_bTransmitPaletteValuesSaved;
};
diff --git a/kpovmodeler/pmparser.cpp b/kpovmodeler/pmparser.cpp
index 7a252c88..dfe37a6d 100644
--- a/kpovmodeler/pmparser.cpp
+++ b/kpovmodeler/pmparser.cpp
@@ -18,8 +18,8 @@
#include "pmparser.h"
-#include <qstring.h>
-#include <qbuffer.h>
+#include <tqstring.h>
+#include <tqbuffer.h>
#include <klocale.h>
#include "pmpart.h"
@@ -32,7 +32,7 @@ unsigned int PMParser::s_maxErrors = 30;
unsigned int PMParser::s_maxWarnings = 50;
-PMParser::PMParser( PMPart* part, QIODevice* dev )
+PMParser::PMParser( PMPart* part, TQIODevice* dev )
: m_okDeclares( 101 )
{
m_pPart = part;
@@ -42,11 +42,11 @@ PMParser::PMParser( PMPart* part, QIODevice* dev )
init( );
}
-PMParser::PMParser( PMPart* part, const QByteArray& array )
+PMParser::PMParser( PMPart* part, const TQByteArray& array )
: m_okDeclares( 101 )
{
m_pPart = part;
- QBuffer* buffer = new QBuffer( array );
+ TQBuffer* buffer = new TQBuffer( array );
buffer->open( IO_ReadOnly );
m_pDevice = buffer;
m_bDeviceCreated = true;
@@ -104,7 +104,7 @@ void PMParser::printMessage( const PMPMessage messageNum )
}
}
-void PMParser::printMessage( const QString& type, const QString& msg )
+void PMParser::printMessage( const TQString& type, const TQString& msg )
{
if( m_lineNum >= 0 )
m_messages += PMMessage( i18n( "Line %1: " ).arg( m_lineNum ) + type + ": " + msg );
@@ -112,7 +112,7 @@ void PMParser::printMessage( const QString& type, const QString& msg )
m_messages += PMMessage( type + ": " + msg );
}
-void PMParser::printError( const QString& msg )
+void PMParser::printError( const TQString& msg )
{
if( m_errors < s_maxErrors )
{
@@ -127,7 +127,7 @@ void PMParser::printError( const QString& msg )
}
}
-void PMParser::printWarning( const QString& msg )
+void PMParser::printWarning( const TQString& msg )
{
if( m_warnings < s_maxWarnings )
{
@@ -148,18 +148,18 @@ void PMParser::printExpected( const char c, const char* sValue )
.arg( c ).arg( sValue ) );
}
-void PMParser::printExpected( const QString& str, const char* sValue )
+void PMParser::printExpected( const TQString& str, const char* sValue )
{
printError( i18n( "'%1' expected, found token '%2' instead." )
.arg( str ).arg( sValue ) );
}
-void PMParser::printUnexpected( const QString& str )
+void PMParser::printUnexpected( const TQString& str )
{
printError( i18n( "Unexpected token '%1'." ).arg( str ) );
}
-void PMParser::printInfo( const QString& msg )
+void PMParser::printInfo( const TQString& msg )
{
printMessage( i18n( "Info" ), msg );
}
@@ -230,7 +230,7 @@ void PMParser::parse( PMObjectList* list, PMObject* parent,
topParse( );
- QPtrListIterator<PMSymbol> it( m_renamedObjectSymbols );
+ TQPtrListIterator<PMSymbol> it( m_renamedObjectSymbols );
for( ; it.current( ); ++it )
it.current( )->setRenamedSymbol( 0 );
m_renamedObjectSymbols.clear( );
@@ -333,7 +333,7 @@ void PMParser::checkID( PMDeclare* decl )
}
}
-void PMParser::checkID( const QString& id, const PMValue& v )
+void PMParser::checkID( const TQString& id, const PMValue& v )
{
PMSymbolTable* st = m_pPart->symbolTable( );
PMSymbol* s = m_pLocalST.find( id );
@@ -368,7 +368,7 @@ void PMParser::checkID( const QString& id, const PMValue& v )
}
}
-PMDeclare* PMParser::checkLink( const QString& id )
+PMDeclare* PMParser::checkLink( const TQString& id )
{
PMSymbolTable* t = m_pPart->symbolTable( );
bool ok = false;
@@ -423,7 +423,7 @@ PMDeclare* PMParser::checkLink( const QString& id )
return 0;
}
-PMSymbol* PMParser::getSymbol( const QString& id ) const
+PMSymbol* PMParser::getSymbol( const TQString& id ) const
{
PMSymbol* s = m_pLocalST.find( id );
if( !s )
diff --git a/kpovmodeler/pmparser.h b/kpovmodeler/pmparser.h
index 48250798..e72cbd60 100644
--- a/kpovmodeler/pmparser.h
+++ b/kpovmodeler/pmparser.h
@@ -25,20 +25,20 @@
#endif
#include <kurl.h>
-#include <qcstring.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qptrdict.h>
-#include <qptrlist.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqptrdict.h>
+#include <tqptrlist.h>
#include "pmobject.h"
#include "pmsymboltable.h"
#include "pmvalue.h"
#include "pmerrordialog.h"
-class QTextStream;
-class QIODevice;
+class TQTextStream;
+class TQIODevice;
class PMScanner;
class PMPart;
@@ -56,11 +56,11 @@ public:
/**
* Parser that parses the device
*/
- PMParser( PMPart* part, QIODevice* device );
+ PMParser( PMPart* part, TQIODevice* device );
/**
* Parser that parses the byte array
*/
- PMParser( PMPart* part, const QByteArray& array );
+ PMParser( PMPart* part, const TQByteArray& array );
/**
* Deletes the parser
*/
@@ -70,7 +70,7 @@ public:
* Quickly scans the top level objects. Appends all top level object
* types to the list.
*/
- virtual void quickParse( QStringList& /*list*/ ) { };
+ virtual void quickParse( TQStringList& /*list*/ ) { };
/**
* Returns true, if the parser can quickly scan the top level objects.
*/
@@ -132,11 +132,11 @@ public:
/**
* Adds an error to the message string
*/
- void printError( const QString& msg );
+ void printError( const TQString& msg );
/**
* Adds the error "'<str>' expected, found <token> instead" to the message string
*/
- void printExpected( const QString& str, const char* token );
+ void printExpected( const TQString& str, const char* token );
/**
* Adds the error "'<c>' expected" to the message string
*/
@@ -144,20 +144,20 @@ public:
/**
* Adds the error "Unexpected token '<str>', found <token> instead" to the message string
*/
- void printUnexpected( const QString& str );
+ void printUnexpected( const TQString& str );
/**
* Adds a warning to the message string
*/
- void printWarning( const QString& msg );
+ void printWarning( const TQString& msg );
/**
* Adds an info to the message string
*/
- void printInfo( const QString& msg );
+ void printInfo( const TQString& msg );
/**
* Adds the message to the message string. Type is "error", "warning",
* "info" or "scanner error"
*/
- void printMessage( const QString& type, const QString& msg );
+ void printMessage( const TQString& type, const TQString& msg );
/**
* Prints a messages that should only reported once
*/
@@ -177,7 +177,7 @@ public:
* Returns the declare object with id, if it exists and is declared at
* the current parse position, otherwise 0
*/
- PMDeclare* checkLink( const QString& id );
+ PMDeclare* checkLink( const TQString& id );
/**
* Checks the id of the declare. If there is already a declare with
* the same id, the id of the object is renamed.
@@ -190,11 +190,11 @@ public:
* the same id, the id of the value is renamed.
*
* Inserts the object into the symbol table.*/
- void checkID( const QString& id, const PMValue& v );
+ void checkID( const TQString& id, const PMValue& v );
/**
* Returns the symbol with id id or 0 if the id is undeclared
*/
- PMSymbol* getSymbol( const QString& id ) const;
+ PMSymbol* getSymbol( const TQString& id ) const;
/**
* Tries to insert obj as child of parent. If parent is 0, the object
* will be inserted in the list of top level objects.
@@ -229,7 +229,7 @@ protected:
/**
* The QIODevice
*/
- QIODevice* m_pDevice;
+ TQIODevice* m_pDevice;
/**
* True, if the device was created by the parser
*/
@@ -248,7 +248,7 @@ private:
/**
* A dictionary object -> message
*/
- QPtrDict< QPtrList<PMMessage> > m_messageDict;
+ TQPtrDict< TQPtrList<PMMessage> > m_messageDict;
/**
* Number of warnings during parsing
*/
@@ -281,11 +281,11 @@ private:
/**
* List of renamed declares
*/
- QPtrList<PMSymbol> m_renamedObjectSymbols;
+ TQPtrList<PMSymbol> m_renamedObjectSymbols;
/**
* Dictionary of symbol names, that can be linked
*/
- QDict<bool> m_okDeclares;
+ TQDict<bool> m_okDeclares;
PMObject* m_pNextCheckDeclare;
/**
* Symbol table used during parsing. The symbol table of the part
diff --git a/kpovmodeler/pmpart.cpp b/kpovmodeler/pmpart.cpp
index c87f4719..fe0f58b4 100644
--- a/kpovmodeler/pmpart.cpp
+++ b/kpovmodeler/pmpart.cpp
@@ -17,18 +17,18 @@
// include files for QT
-#include <qapplication.h>
-#include <qdir.h>
-#include <qstrlist.h>
-#include <qclipboard.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qmessagebox.h>
-#include <qcombobox.h>
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <qdatetime.h>
-#include <qstringlist.h>
+#include <tqapplication.h>
+#include <tqdir.h>
+#include <tqstrlist.h>
+#include <tqclipboard.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqmessagebox.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
+#include <tqdatetime.h>
+#include <tqstringlist.h>
// include files for KDE
#include <kiconloader.h>
@@ -94,13 +94,13 @@
#include "pmfiledialog.h"
#ifdef PMEnableSimpleProfiling
-QTime PMDebugTime;
+TQTime PMDebugTime;
#endif
//#define KPM_WITH_OBJECT_LIBRARY
-PMPart::PMPart( QWidget* parentWidget, const char* widgetName,
- QObject* parent, const char* name, bool readwrite,
+PMPart::PMPart( TQWidget* parentWidget, const char* widgetName,
+ TQObject* parent, const char* name, bool readwrite,
PMShell* shell )
: DCOPObject( "PMPartIface" ),
KParts::ReadWritePart( parent, name ),
@@ -145,15 +145,15 @@ PMPart::PMPart( QWidget* parentWidget, const char* widgetName,
restoreConfig( instance( )->config( ) );
- connect( qApp->clipboard( ), SIGNAL( dataChanged( ) ),
- SLOT( slotClipboardDataChanged( ) ) );
+ connect( qApp->clipboard( ), TQT_SIGNAL( dataChanged( ) ),
+ TQT_SLOT( slotClipboardDataChanged( ) ) );
slotClipboardDataChanged( );
- connect( &m_commandManager, SIGNAL( updateUndoRedo( const QString&, const QString& ) ),
- SLOT( slotUpdateUndoRedo( const QString&, const QString& ) ) );
- connect( &m_commandManager, SIGNAL( objectChanged( PMObject*, const int, QObject* ) ),
- SLOT( slotObjectChanged( PMObject*, const int, QObject* ) ) );
- connect( &m_commandManager, SIGNAL( idChanged( PMObject*, const QString& ) ),
- SLOT( slotIDChanged( PMObject*, const QString& ) ) );
+ connect( &m_commandManager, TQT_SIGNAL( updateUndoRedo( const TQString&, const TQString& ) ),
+ TQT_SLOT( slotUpdateUndoRedo( const TQString&, const TQString& ) ) );
+ connect( &m_commandManager, TQT_SIGNAL( objectChanged( PMObject*, const int, TQObject* ) ),
+ TQT_SLOT( slotObjectChanged( PMObject*, const int, TQObject* ) ) );
+ connect( &m_commandManager, TQT_SIGNAL( idChanged( PMObject*, const TQString& ) ),
+ TQT_SLOT( slotIDChanged( PMObject*, const TQString& ) ) );
PMPluginManager::theManager( )->registerPart( this );
@@ -161,8 +161,8 @@ PMPart::PMPart( QWidget* parentWidget, const char* widgetName,
slotObjectChanged( m_pScene, PMCNewSelection, this );
}
-PMPart::PMPart( QWidget* /*parentWidget*/, const char* /*widgetName*/,
- QObject* parent, const char* name, bool readwrite,
+PMPart::PMPart( TQWidget* /*parentWidget*/, const char* /*widgetName*/,
+ TQObject* parent, const char* name, bool readwrite,
bool /*onlyCutPaste*/, PMShell* shell )
: DCOPObject( "LibraryBrowserIface" ),
KParts::ReadWritePart( parent, name ),
@@ -202,8 +202,8 @@ PMPart::PMPart( QWidget* /*parentWidget*/, const char* /*widgetName*/,
initCopyPasteActions( );
- connect( &m_commandManager, SIGNAL( objectChanged( PMObject*, const int, QObject* ) ),
- SLOT( slotObjectChanged( PMObject*, const int, QObject* ) ) );
+ connect( &m_commandManager, TQT_SIGNAL( objectChanged( PMObject*, const int, TQObject* ) ),
+ TQT_SLOT( slotObjectChanged( PMObject*, const int, TQObject* ) ) );
PMPluginManager::theManager( )->registerPart( this );
@@ -222,13 +222,13 @@ PMPart::~PMPart( )
void PMPart::initCopyPasteActions( )
{
// setup edit menu
- m_pCutAction = KStdAction::cut( this, SLOT( slotEditCut( ) ), actionCollection( ) );
- m_pCopyAction = KStdAction::copy( this, SLOT( slotEditCopy( ) ), actionCollection( ) );
- m_pPasteAction = KStdAction::paste( this, SLOT( slotEditPaste( ) ), actionCollection( ) );
+ m_pCutAction = KStdAction::cut( this, TQT_SLOT( slotEditCut( ) ), actionCollection( ) );
+ m_pCopyAction = KStdAction::copy( this, TQT_SLOT( slotEditCopy( ) ), actionCollection( ) );
+ m_pPasteAction = KStdAction::paste( this, TQT_SLOT( slotEditPaste( ) ), actionCollection( ) );
m_pDeleteAction =
new KAction( i18n( "Delete" ), "edittrash", Qt::Key_Delete,
- this, SLOT( slotEditDelete( ) ),
+ this, TQT_SLOT( slotEditDelete( ) ),
actionCollection( ), "edit_delete" );
m_pCutAction->setEnabled( false );
@@ -242,311 +242,311 @@ void PMPart::initActions( )
{
// file menu
m_pImportAction = new KAction( i18n( "Import..." ), 0, this,
- SLOT( slotFileImport( ) ), actionCollection( ),
+ TQT_SLOT( slotFileImport( ) ), actionCollection( ),
"file_import" );
m_pExportAction = new KAction( i18n( "&Export..." ), 0, this,
- SLOT( slotFileExport( ) ), actionCollection( ),
+ TQT_SLOT( slotFileExport( ) ), actionCollection( ),
"file_export" );
initCopyPasteActions( );
m_onlyCopyPaste = false;
- m_pRenderComboAction = new PMComboAction( i18n( "Render Modes" ), 0, this, SLOT( slotRenderMode( int ) ),
+ m_pRenderComboAction = new PMComboAction( i18n( "Render Modes" ), 0, this, TQT_SLOT( slotRenderMode( int ) ),
actionCollection( ), "view_render_combo" );
m_pRenderComboAction->setMinimumWidth( 250 );
- connect( m_pRenderComboAction, SIGNAL( plugged( ) ),
- SLOT( slotRenderModeActionPlugged( ) ) );
- m_pRenderAction = new KAction( i18n( "Render" ), "pmrender", 0, this, SLOT( slotRender( ) ),
+ connect( m_pRenderComboAction, TQT_SIGNAL( plugged( ) ),
+ TQT_SLOT( slotRenderModeActionPlugged( ) ) );
+ m_pRenderAction = new KAction( i18n( "Render" ), "pmrender", 0, this, TQT_SLOT( slotRender( ) ),
actionCollection( ), "view_render" );
- m_pRenderSettingsAction = new KAction( i18n( "Render Modes..." ), "pmrendersettings", 0, this, SLOT( slotRenderSettings( ) ),
+ m_pRenderSettingsAction = new KAction( i18n( "Render Modes..." ), "pmrendersettings", 0, this, TQT_SLOT( slotRenderSettings( ) ),
actionCollection( ), "view_render_settings" );
- m_pViewRenderWindowAction = new KAction( i18n( "Render Window" ), 0, this, SLOT( slotViewRenderWindow( ) ),
+ m_pViewRenderWindowAction = new KAction( i18n( "Render Window" ), 0, this, TQT_SLOT( slotViewRenderWindow( ) ),
actionCollection( ), "view_render_window" );
- m_pVisibilityLabelAction = new PMLabelAction( i18n( "Visibility level:" ) + QString( " " ), actionCollection( ), "view_visibility_label" );
+ m_pVisibilityLabelAction = new PMLabelAction( i18n( "Visibility level:" ) + TQString( " " ), actionCollection( ), "view_visibility_label" );
m_pVisibilityLevelAction = new PMSpinBoxAction( i18n( "Visibility Level" ),
- 0, this, SLOT( slotVisibilityLevelChanged( int ) ),
+ 0, this, TQT_SLOT( slotVisibilityLevelChanged( int ) ),
actionCollection( ), "view_visibility_level" );
- connect( m_pVisibilityLevelAction, SIGNAL( plugged( ) ),
- SLOT( slotVisibilityActionPlugged( ) ) );
+ connect( m_pVisibilityLevelAction, TQT_SIGNAL( plugged( ) ),
+ TQT_SLOT( slotVisibilityActionPlugged( ) ) );
- m_pGlobalDetailLabelAction = new PMLabelAction( i18n( "Global detail:" ) + QString( " " ), actionCollection( ), "global_detail_label" );
+ m_pGlobalDetailLabelAction = new PMLabelAction( i18n( "Global detail:" ) + TQString( " " ), actionCollection( ), "global_detail_label" );
m_pGlobalDetailAction = new KSelectAction( i18n("Global Detail Level"), KShortcut(), actionCollection(), "global_detail_level" );
- QStringList strList;
+ TQStringList strList;
strList.append( i18n( "Very Low" ) );
strList.append( i18n( "Low" ) );
strList.append( i18n( "Medium" ) );
strList.append( i18n( "High" ) );
strList.append( i18n( "Very High" ) );
m_pGlobalDetailAction->setItems( strList );
- connect( m_pGlobalDetailAction, SIGNAL( activated( int ) ), SLOT( slotGlobalDetailLevelChanged( int ) ) );
+ connect( m_pGlobalDetailAction, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotGlobalDetailLevelChanged( int ) ) );
// new objects
if( isReadWrite( ) )
{
- m_pNewGlobalSettingsAction = new KAction( i18n( "Global Settings" ), "pmglobalsettings", 0, this, SLOT( slotNewGlobalSettings( ) ),
+ m_pNewGlobalSettingsAction = new KAction( i18n( "Global Settings" ), "pmglobalsettings", 0, this, TQT_SLOT( slotNewGlobalSettings( ) ),
actionCollection( ), "new_globalsettings" );
m_readWriteActions.append( m_pNewGlobalSettingsAction );
- m_pNewSkySphereAction = new KAction( i18n( "Sky Sphere" ), "pmskysphere", 0, this, SLOT( slotNewSkySphere( ) ),
+ m_pNewSkySphereAction = new KAction( i18n( "Sky Sphere" ), "pmskysphere", 0, this, TQT_SLOT( slotNewSkySphere( ) ),
actionCollection( ), "new_skysphere" );
m_readWriteActions.append( m_pNewSkySphereAction );
- m_pNewRainbowAction = new KAction( i18n( "Rainbow" ), "pmrainbow", 0, this, SLOT( slotNewRainbow( ) ),
+ m_pNewRainbowAction = new KAction( i18n( "Rainbow" ), "pmrainbow", 0, this, TQT_SLOT( slotNewRainbow( ) ),
actionCollection( ), "new_rainbow" );
m_readWriteActions.append( m_pNewRainbowAction );
- m_pNewFogAction = new KAction( i18n( "Fog" ), "pmfog", 0, this, SLOT( slotNewFog( ) ),
+ m_pNewFogAction = new KAction( i18n( "Fog" ), "pmfog", 0, this, TQT_SLOT( slotNewFog( ) ),
actionCollection( ), "new_fog" );
m_readWriteActions.append( m_pNewFogAction );
- m_pNewInteriorAction = new KAction( i18n( "Interior" ), "pminterior", 0, this, SLOT( slotNewInterior( ) ),
+ m_pNewInteriorAction = new KAction( i18n( "Interior" ), "pminterior", 0, this, TQT_SLOT( slotNewInterior( ) ),
actionCollection( ), "new_interior" );
m_readWriteActions.append( m_pNewInteriorAction );
- m_pNewMediaAction = new KAction( i18n( "Media" ), "pmmedia", 0, this, SLOT( slotNewMedia( ) ),
+ m_pNewMediaAction = new KAction( i18n( "Media" ), "pmmedia", 0, this, TQT_SLOT( slotNewMedia( ) ),
actionCollection( ), "new_media" );
m_readWriteActions.append( m_pNewMediaAction );
- m_pNewDensityAction = new KAction( i18n( "Density" ), "pmdensity", 0, this, SLOT( slotNewDensity( ) ),
+ m_pNewDensityAction = new KAction( i18n( "Density" ), "pmdensity", 0, this, TQT_SLOT( slotNewDensity( ) ),
actionCollection( ), "new_density" );
m_readWriteActions.append( m_pNewDensityAction );
- m_pNewMaterialAction = new KAction( i18n( "Material" ), "pmmaterial", 0, this, SLOT( slotNewMaterial( ) ),
+ m_pNewMaterialAction = new KAction( i18n( "Material" ), "pmmaterial", 0, this, TQT_SLOT( slotNewMaterial( ) ),
actionCollection( ), "new_material" );
m_readWriteActions.append( m_pNewMaterialAction );
- m_pNewBoxAction = new KAction( i18n( "Box" ), "pmbox", 0, this, SLOT( slotNewBox( ) ),
+ m_pNewBoxAction = new KAction( i18n( "Box" ), "pmbox", 0, this, TQT_SLOT( slotNewBox( ) ),
actionCollection( ), "new_box" );
m_readWriteActions.append( m_pNewBoxAction );
- m_pNewSphereAction = new KAction( i18n( "Sphere" ), "pmsphere", 0, this, SLOT( slotNewSphere( ) ),
+ m_pNewSphereAction = new KAction( i18n( "Sphere" ), "pmsphere", 0, this, TQT_SLOT( slotNewSphere( ) ),
actionCollection( ), "new_sphere" );
m_readWriteActions.append( m_pNewSphereAction );
- m_pNewCylinderAction = new KAction( i18n( "Cylinder" ), "pmcylinder", 0, this, SLOT( slotNewCylinder( ) ),
+ m_pNewCylinderAction = new KAction( i18n( "Cylinder" ), "pmcylinder", 0, this, TQT_SLOT( slotNewCylinder( ) ),
actionCollection( ), "new_cylinder" );
m_readWriteActions.append( m_pNewCylinderAction );
- m_pNewConeAction = new KAction( i18n( "Cone" ), "pmcone", 0, this, SLOT( slotNewCone( ) ),
+ m_pNewConeAction = new KAction( i18n( "Cone" ), "pmcone", 0, this, TQT_SLOT( slotNewCone( ) ),
actionCollection( ), "new_cone" );
m_readWriteActions.append( m_pNewConeAction );
- m_pNewTorusAction = new KAction( i18n( "Torus" ), "pmtorus", 0, this, SLOT( slotNewTorus( ) ),
+ m_pNewTorusAction = new KAction( i18n( "Torus" ), "pmtorus", 0, this, TQT_SLOT( slotNewTorus( ) ),
actionCollection( ), "new_torus" );
m_readWriteActions.append( m_pNewTorusAction );
- m_pNewLatheAction = new KAction( i18n( "Lathe" ), "pmlathe", 0, this, SLOT( slotNewLathe( ) ),
+ m_pNewLatheAction = new KAction( i18n( "Lathe" ), "pmlathe", 0, this, TQT_SLOT( slotNewLathe( ) ),
actionCollection( ), "new_lathe" );
m_readWriteActions.append( m_pNewLatheAction );
- m_pNewPrismAction = new KAction( i18n( "Prism" ), "pmprism", 0, this, SLOT( slotNewPrism( ) ),
+ m_pNewPrismAction = new KAction( i18n( "Prism" ), "pmprism", 0, this, TQT_SLOT( slotNewPrism( ) ),
actionCollection( ), "new_prism" );
m_readWriteActions.append( m_pNewPrismAction );
- m_pNewSurfaceOfRevolutionAction = new KAction( i18n( "Surface of Revolution" ), "pmsor", 0, this, SLOT( slotNewSurfaceOfRevolution( ) ),
+ m_pNewSurfaceOfRevolutionAction = new KAction( i18n( "Surface of Revolution" ), "pmsor", 0, this, TQT_SLOT( slotNewSurfaceOfRevolution( ) ),
actionCollection( ), "new_surfaceofrevolution" );
m_readWriteActions.append( m_pNewSurfaceOfRevolutionAction );
- m_pNewSuperquadricEllipsoidAction = new KAction( i18n( "Superquadric Ellipsoid" ), "pmsqe", 0, this, SLOT( slotNewSuperquadricEllipsoid( ) ),
+ m_pNewSuperquadricEllipsoidAction = new KAction( i18n( "Superquadric Ellipsoid" ), "pmsqe", 0, this, TQT_SLOT( slotNewSuperquadricEllipsoid( ) ),
actionCollection( ), "new_superquadricellipsoid" );
m_readWriteActions.append( m_pNewSuperquadricEllipsoidAction );
- m_pNewJuliaFractalAction = new KAction( i18n( "Julia Fractal" ), "pmjuliafractal", 0, this, SLOT( slotNewJuliaFractal( ) ),
+ m_pNewJuliaFractalAction = new KAction( i18n( "Julia Fractal" ), "pmjuliafractal", 0, this, TQT_SLOT( slotNewJuliaFractal( ) ),
actionCollection( ), "new_juliafractal" );
m_readWriteActions.append( m_pNewJuliaFractalAction );
- m_pNewHeightFieldAction = new KAction( i18n( "Height Field" ), "pmheightfield", 0, this, SLOT( slotNewHeightField( ) ),
+ m_pNewHeightFieldAction = new KAction( i18n( "Height Field" ), "pmheightfield", 0, this, TQT_SLOT( slotNewHeightField( ) ),
actionCollection( ), "new_heightfield" );
m_readWriteActions.append( m_pNewHeightFieldAction );
- m_pNewTextAction = new KAction( i18n( "Text" ), "pmtext", 0, this, SLOT( slotNewText( ) ),
+ m_pNewTextAction = new KAction( i18n( "Text" ), "pmtext", 0, this, TQT_SLOT( slotNewText( ) ),
actionCollection( ), "new_text" );
m_readWriteActions.append( m_pNewTextAction );
- m_pNewBlobAction = new KAction( i18n( "Blob" ), "pmblob", 0, this, SLOT( slotNewBlob( ) ),
+ m_pNewBlobAction = new KAction( i18n( "Blob" ), "pmblob", 0, this, TQT_SLOT( slotNewBlob( ) ),
actionCollection( ), "new_blob" );
m_readWriteActions.append( m_pNewBlobAction );
- m_pNewBlobSphereAction = new KAction( i18n( "Blob Sphere" ), "pmblobsphere", 0, this, SLOT( slotNewBlobSphere( ) ),
+ m_pNewBlobSphereAction = new KAction( i18n( "Blob Sphere" ), "pmblobsphere", 0, this, TQT_SLOT( slotNewBlobSphere( ) ),
actionCollection( ), "new_blobsphere" );
m_readWriteActions.append( m_pNewBlobSphereAction );
- m_pNewBlobCylinderAction = new KAction( i18n( "Blob Cylinder" ), "pmblobcylinder", 0, this, SLOT( slotNewBlobCylinder( ) ),
+ m_pNewBlobCylinderAction = new KAction( i18n( "Blob Cylinder" ), "pmblobcylinder", 0, this, TQT_SLOT( slotNewBlobCylinder( ) ),
actionCollection( ), "new_blobcylinder" );
m_readWriteActions.append( m_pNewBlobCylinderAction );
- m_pNewPlaneAction = new KAction( i18n( "Plane" ), "pmplane", 0, this, SLOT( slotNewPlane( ) ),
+ m_pNewPlaneAction = new KAction( i18n( "Plane" ), "pmplane", 0, this, TQT_SLOT( slotNewPlane( ) ),
actionCollection( ), "new_plane" );
m_readWriteActions.append( m_pNewPlaneAction );
- m_pNewPolynomAction = new KAction( i18n( "Polynom" ), "pmpolynom", 0, this, SLOT( slotNewPolynom( ) ),
+ m_pNewPolynomAction = new KAction( i18n( "Polynom" ), "pmpolynom", 0, this, TQT_SLOT( slotNewPolynom( ) ),
actionCollection( ), "new_polynom" );
m_readWriteActions.append( m_pNewPolynomAction );
- m_pNewDeclareAction = new KAction( i18n( "Declaration" ), "pmdeclare", 0, this, SLOT( slotNewDeclare( ) ),
+ m_pNewDeclareAction = new KAction( i18n( "Declaration" ), "pmdeclare", 0, this, TQT_SLOT( slotNewDeclare( ) ),
actionCollection( ), "new_declare" );
m_readWriteActions.append( m_pNewDeclareAction );
- m_pNewObjectLinkAction = new KAction( i18n( "Object Link" ), "pmobjectlink", 0, this, SLOT( slotNewObjectLink( ) ),
+ m_pNewObjectLinkAction = new KAction( i18n( "Object Link" ), "pmobjectlink", 0, this, TQT_SLOT( slotNewObjectLink( ) ),
actionCollection( ), "new_objectlink" );
m_readWriteActions.append( m_pNewObjectLinkAction );
- m_pNewUnionAction = new KAction( i18n( "Union" ), "pmunion", 0, this, SLOT( slotNewUnion( ) ),
+ m_pNewUnionAction = new KAction( i18n( "Union" ), "pmunion", 0, this, TQT_SLOT( slotNewUnion( ) ),
actionCollection( ), "new_union" );
m_readWriteActions.append( m_pNewUnionAction );
- m_pNewIntersectionAction = new KAction( i18n( "Intersection" ), "pmintersection", 0, this, SLOT( slotNewIntersection( ) ),
+ m_pNewIntersectionAction = new KAction( i18n( "Intersection" ), "pmintersection", 0, this, TQT_SLOT( slotNewIntersection( ) ),
actionCollection( ), "new_intersection" );
m_readWriteActions.append( m_pNewIntersectionAction );
- m_pNewDifferenceAction = new KAction( i18n( "Difference" ), "pmdifference", 0, this, SLOT( slotNewDifference( ) ),
+ m_pNewDifferenceAction = new KAction( i18n( "Difference" ), "pmdifference", 0, this, TQT_SLOT( slotNewDifference( ) ),
actionCollection( ), "new_difference" );
m_readWriteActions.append( m_pNewDifferenceAction );
- m_pNewMergeAction = new KAction( i18n( "Merge" ), "pmmerge", 0, this, SLOT( slotNewMerge( ) ),
+ m_pNewMergeAction = new KAction( i18n( "Merge" ), "pmmerge", 0, this, TQT_SLOT( slotNewMerge( ) ),
actionCollection( ), "new_merge" );
m_readWriteActions.append( m_pNewMergeAction );
- m_pNewBoundedByAction = new KAction( i18n( "Bounded By" ), "pmboundedby", 0, this, SLOT( slotNewBoundedBy( ) ),
+ m_pNewBoundedByAction = new KAction( i18n( "Bounded By" ), "pmboundedby", 0, this, TQT_SLOT( slotNewBoundedBy( ) ),
actionCollection( ), "new_boundedby" );
m_readWriteActions.append( m_pNewBoundedByAction );
- m_pNewClippedByAction = new KAction( i18n( "Clipped By" ), "pmclippedby", 0, this, SLOT( slotNewClippedBy( ) ),
+ m_pNewClippedByAction = new KAction( i18n( "Clipped By" ), "pmclippedby", 0, this, TQT_SLOT( slotNewClippedBy( ) ),
actionCollection( ), "new_clippedby" );
m_readWriteActions.append( m_pNewClippedByAction );
- m_pNewLightAction = new KAction( i18n( "Light" ), "pmlight", 0, this, SLOT( slotNewLight( ) ),
+ m_pNewLightAction = new KAction( i18n( "Light" ), "pmlight", 0, this, TQT_SLOT( slotNewLight( ) ),
actionCollection( ), "new_light" );
m_readWriteActions.append( m_pNewLightAction );
- m_pNewLooksLikeAction = new KAction( i18n( "Looks Like" ), "pmlookslike", 0, this, SLOT( slotNewLooksLike( ) ),
+ m_pNewLooksLikeAction = new KAction( i18n( "Looks Like" ), "pmlookslike", 0, this, TQT_SLOT( slotNewLooksLike( ) ),
actionCollection( ), "new_lookslike" );
m_readWriteActions.append( m_pNewLooksLikeAction );
- m_pNewProjectedThroughAction = new KAction( i18n( "Projected Through" ), "pmprojectedthrough", 0, this, SLOT( slotNewProjectedThrough( ) ),
+ m_pNewProjectedThroughAction = new KAction( i18n( "Projected Through" ), "pmprojectedthrough", 0, this, TQT_SLOT( slotNewProjectedThrough( ) ),
actionCollection( ), "new_projectedthrough" );
m_readWriteActions.append( m_pNewProjectedThroughAction );
- m_pNewBicubicPatchAction = new KAction( i18n( "Bicubic Patch" ), "pmbicubicpatch", 0, this, SLOT( slotNewBicubicPatch( ) ),
+ m_pNewBicubicPatchAction = new KAction( i18n( "Bicubic Patch" ), "pmbicubicpatch", 0, this, TQT_SLOT( slotNewBicubicPatch( ) ),
actionCollection( ), "new_bicubicpatch" );
m_readWriteActions.append( m_pNewBicubicPatchAction );
- m_pNewDiscAction = new KAction( i18n( "Disc" ), "pmdisc", 0, this, SLOT( slotNewDisc( ) ),
+ m_pNewDiscAction = new KAction( i18n( "Disc" ), "pmdisc", 0, this, TQT_SLOT( slotNewDisc( ) ),
actionCollection( ), "new_disc" );
m_readWriteActions.append( m_pNewDiscAction );
- m_pNewTriangleAction = new KAction( i18n( "Triangle" ), "pmtriangle", 0, this, SLOT( slotNewTriangle( ) ),
+ m_pNewTriangleAction = new KAction( i18n( "Triangle" ), "pmtriangle", 0, this, TQT_SLOT( slotNewTriangle( ) ),
actionCollection( ), "new_triangle" );
m_readWriteActions.append( m_pNewTriangleAction );
- m_pNewCameraAction = new KAction( i18n( "Camera" ), "pmcamera", 0, this, SLOT( slotNewCamera( ) ),
+ m_pNewCameraAction = new KAction( i18n( "Camera" ), "pmcamera", 0, this, TQT_SLOT( slotNewCamera( ) ),
actionCollection( ), "new_camera" );
m_readWriteActions.append( m_pNewCameraAction );
- m_pNewTextureAction = new KAction( i18n( "Texture" ), "pmtexture", 0, this, SLOT( slotNewTexture( ) ),
+ m_pNewTextureAction = new KAction( i18n( "Texture" ), "pmtexture", 0, this, TQT_SLOT( slotNewTexture( ) ),
actionCollection( ), "new_texture" );
m_readWriteActions.append( m_pNewTextureAction );
- m_pNewPigmentAction = new KAction( i18n( "Pigment" ), "pmpigment", 0, this, SLOT( slotNewPigment( ) ),
+ m_pNewPigmentAction = new KAction( i18n( "Pigment" ), "pmpigment", 0, this, TQT_SLOT( slotNewPigment( ) ),
actionCollection( ), "new_pigment" );
m_readWriteActions.append( m_pNewPigmentAction );
- m_pNewNormalAction = new KAction( i18n( "Normal" ), "pmnormal", 0, this, SLOT( slotNewNormal( ) ),
+ m_pNewNormalAction = new KAction( i18n( "Normal" ), "pmnormal", 0, this, TQT_SLOT( slotNewNormal( ) ),
actionCollection( ), "new_normal" );
m_readWriteActions.append( m_pNewNormalAction );
- m_pNewSolidColorAction = new KAction( i18n( "Solid Color" ), "pmsolidcolor", 0, this, SLOT( slotNewSolidColor( ) ),
+ m_pNewSolidColorAction = new KAction( i18n( "Solid Color" ), "pmsolidcolor", 0, this, TQT_SLOT( slotNewSolidColor( ) ),
actionCollection( ), "new_solidcolor" );
m_readWriteActions.append( m_pNewSolidColorAction );
- m_pNewTextureListAction = new KAction( i18n( "Texture List" ), "pmtexturelist", 0, this, SLOT( slotNewTextureList( ) ),
+ m_pNewTextureListAction = new KAction( i18n( "Texture List" ), "pmtexturelist", 0, this, TQT_SLOT( slotNewTextureList( ) ),
actionCollection( ), "new_texturelist" );
m_readWriteActions.append( m_pNewTextureListAction );
- m_pNewColorListAction = new KAction( i18n( "Color List" ), "pmcolorlist", 0, this, SLOT( slotNewColorList( ) ),
+ m_pNewColorListAction = new KAction( i18n( "Color List" ), "pmcolorlist", 0, this, TQT_SLOT( slotNewColorList( ) ),
actionCollection( ), "new_colorlist" );
m_readWriteActions.append( m_pNewColorListAction );
- m_pNewPigmentListAction = new KAction( i18n( "Pigment List" ), "pmpigmentlist", 0, this, SLOT( slotNewPigmentList( ) ),
+ m_pNewPigmentListAction = new KAction( i18n( "Pigment List" ), "pmpigmentlist", 0, this, TQT_SLOT( slotNewPigmentList( ) ),
actionCollection( ), "new_pigmentlist" );
m_readWriteActions.append( m_pNewPigmentListAction );
- m_pNewNormalListAction = new KAction( i18n( "Normal List" ), "pmnormallist", 0, this, SLOT( slotNewNormalList( ) ),
+ m_pNewNormalListAction = new KAction( i18n( "Normal List" ), "pmnormallist", 0, this, TQT_SLOT( slotNewNormalList( ) ),
actionCollection( ), "new_normallist" );
m_readWriteActions.append( m_pNewNormalListAction );
- m_pNewDensityListAction = new KAction( i18n( "Density List" ), "pmdensitylist", 0, this, SLOT( slotNewDensityList( ) ),
+ m_pNewDensityListAction = new KAction( i18n( "Density List" ), "pmdensitylist", 0, this, TQT_SLOT( slotNewDensityList( ) ),
actionCollection( ), "new_densitylist" );
m_readWriteActions.append( m_pNewDensityListAction );
- m_pNewFinishAction = new KAction( i18n( "Finish" ), "pmfinish", 0, this, SLOT( slotNewFinish( ) ),
+ m_pNewFinishAction = new KAction( i18n( "Finish" ), "pmfinish", 0, this, TQT_SLOT( slotNewFinish( ) ),
actionCollection( ), "new_finish" );
m_readWriteActions.append( m_pNewFinishAction );
- m_pNewPatternAction = new KAction( i18n( "Pattern" ), "pmpattern", 0, this, SLOT( slotNewPattern( ) ),
+ m_pNewPatternAction = new KAction( i18n( "Pattern" ), "pmpattern", 0, this, TQT_SLOT( slotNewPattern( ) ),
actionCollection( ), "new_pattern" );
m_readWriteActions.append( m_pNewPatternAction );
- m_pNewBlendMapModifiersAction = new KAction( i18n( "Blend Map Modifiers" ), "pmblendmapmodifiers", 0, this, SLOT( slotNewBlendMapModifiers( ) ),
+ m_pNewBlendMapModifiersAction = new KAction( i18n( "Blend Map Modifiers" ), "pmblendmapmodifiers", 0, this, TQT_SLOT( slotNewBlendMapModifiers( ) ),
actionCollection( ), "new_blendmapmodifiers" );
m_readWriteActions.append( m_pNewBlendMapModifiersAction );
- m_pNewTextureMapAction = new KAction( i18n( "Texture Map" ), "pmtexturemap", 0, this, SLOT( slotNewTextureMap( ) ),
+ m_pNewTextureMapAction = new KAction( i18n( "Texture Map" ), "pmtexturemap", 0, this, TQT_SLOT( slotNewTextureMap( ) ),
actionCollection( ), "new_texturemap" );
m_readWriteActions.append( m_pNewTextureMapAction );
- m_pNewMaterialMapAction = new KAction( i18n( "Material Map" ), "pmmaterialmap", 0, this, SLOT( slotNewMaterialMap( ) ),
+ m_pNewMaterialMapAction = new KAction( i18n( "Material Map" ), "pmmaterialmap", 0, this, TQT_SLOT( slotNewMaterialMap( ) ),
actionCollection( ), "new_materialmap" );
m_readWriteActions.append( m_pNewMaterialMapAction );
- m_pNewPigmentMapAction = new KAction( i18n( "Pigment Map" ), "pmpigmentmap", 0, this, SLOT( slotNewPigmentMap( ) ),
+ m_pNewPigmentMapAction = new KAction( i18n( "Pigment Map" ), "pmpigmentmap", 0, this, TQT_SLOT( slotNewPigmentMap( ) ),
actionCollection( ), "new_pigmentmap" );
m_readWriteActions.append( m_pNewPigmentMapAction );
- m_pNewColorMapAction = new KAction( i18n( "Color Map" ), "pmcolormap", 0, this, SLOT( slotNewColorMap( ) ),
+ m_pNewColorMapAction = new KAction( i18n( "Color Map" ), "pmcolormap", 0, this, TQT_SLOT( slotNewColorMap( ) ),
actionCollection( ), "new_colormap" );
m_readWriteActions.append( m_pNewColorMapAction );
- m_pNewNormalMapAction = new KAction( i18n( "Normal Map" ), "pmnormalmap", 0, this, SLOT( slotNewNormalMap( ) ),
+ m_pNewNormalMapAction = new KAction( i18n( "Normal Map" ), "pmnormalmap", 0, this, TQT_SLOT( slotNewNormalMap( ) ),
actionCollection( ), "new_normalmap" );
m_readWriteActions.append( m_pNewNormalMapAction );
- m_pNewBumpMapAction = new KAction( i18n( "Bump Map" ), "pmbumpmap", 0, this, SLOT( slotNewBumpMap( ) ),
+ m_pNewBumpMapAction = new KAction( i18n( "Bump Map" ), "pmbumpmap", 0, this, TQT_SLOT( slotNewBumpMap( ) ),
actionCollection( ), "new_bumpmap" );
m_readWriteActions.append( m_pNewBumpMapAction );
- m_pNewSlopeMapAction = new KAction( i18n( "Slope Map" ), "pmslopemap", 0, this, SLOT( slotNewSlopeMap( ) ),
+ m_pNewSlopeMapAction = new KAction( i18n( "Slope Map" ), "pmslopemap", 0, this, TQT_SLOT( slotNewSlopeMap( ) ),
actionCollection( ), "new_slopemap" );
m_readWriteActions.append( m_pNewSlopeMapAction );
- m_pNewDensityMapAction = new KAction( i18n( "Density Map" ), "pmdensitymap", 0, this, SLOT( slotNewDensityMap( ) ),
+ m_pNewDensityMapAction = new KAction( i18n( "Density Map" ), "pmdensitymap", 0, this, TQT_SLOT( slotNewDensityMap( ) ),
actionCollection( ), "new_densitymap" );
m_readWriteActions.append( m_pNewDensityMapAction );
- m_pNewSlopeAction = new KAction( i18n( "Slope" ), "pmslope", 0, this, SLOT( slotNewSlope( ) ),
+ m_pNewSlopeAction = new KAction( i18n( "Slope" ), "pmslope", 0, this, TQT_SLOT( slotNewSlope( ) ),
actionCollection( ), "new_slope" );
m_readWriteActions.append( m_pNewSlopeAction );
- m_pNewWarpAction = new KAction( i18n( "Warp" ), "pmwarp", 0, this, SLOT( slotNewWarp( ) ),
+ m_pNewWarpAction = new KAction( i18n( "Warp" ), "pmwarp", 0, this, TQT_SLOT( slotNewWarp( ) ),
actionCollection( ), "new_warp" );
m_readWriteActions.append( m_pNewWarpAction );
- m_pNewImageMapAction = new KAction( i18n( "Image Map" ), "pmimagemap", 0, this, SLOT( slotNewImageMap( ) ),
+ m_pNewImageMapAction = new KAction( i18n( "Image Map" ), "pmimagemap", 0, this, TQT_SLOT( slotNewImageMap( ) ),
actionCollection( ), "new_imagemap" );
m_readWriteActions.append( m_pNewImageMapAction );
- m_pNewQuickColorAction = new KAction( i18n( "QuickColor" ), "pmquickcolor", 0, this, SLOT( slotNewQuickColor( ) ),
+ m_pNewQuickColorAction = new KAction( i18n( "QuickColor" ), "pmquickcolor", 0, this, TQT_SLOT( slotNewQuickColor( ) ),
actionCollection( ), "new_quickcolor" );
m_readWriteActions.append( m_pNewQuickColorAction );
- m_pNewTranslateAction = new KAction( i18n( "Translate" ), "pmtranslate", 0, this, SLOT( slotNewTranslate( ) ),
+ m_pNewTranslateAction = new KAction( i18n( "Translate" ), "pmtranslate", 0, this, TQT_SLOT( slotNewTranslate( ) ),
actionCollection( ), "new_translate" );
m_readWriteActions.append( m_pNewTranslateAction );
- m_pNewScaleAction = new KAction( i18n( "Scale" ), "pmscale", 0, this, SLOT( slotNewScale( ) ),
+ m_pNewScaleAction = new KAction( i18n( "Scale" ), "pmscale", 0, this, TQT_SLOT( slotNewScale( ) ),
actionCollection( ), "new_scale" );
m_readWriteActions.append( m_pNewScaleAction );
- m_pNewRotateAction = new KAction( i18n( "Rotate" ), "pmrotate", 0, this, SLOT( slotNewRotate( ) ),
+ m_pNewRotateAction = new KAction( i18n( "Rotate" ), "pmrotate", 0, this, TQT_SLOT( slotNewRotate( ) ),
actionCollection( ), "new_rotate" );
m_readWriteActions.append( m_pNewRotateAction );
- m_pNewMatrixAction = new KAction( i18n( "Matrix" ), "pmmatrix", 0, this, SLOT( slotNewMatrix( ) ),
+ m_pNewMatrixAction = new KAction( i18n( "Matrix" ), "pmmatrix", 0, this, TQT_SLOT( slotNewMatrix( ) ),
actionCollection( ), "new_povraymatrix" );
m_readWriteActions.append( m_pNewMatrixAction );
- m_pNewCommentAction = new KAction( i18n( "Comment" ), "pmcomment", 0, this, SLOT( slotNewComment( ) ),
+ m_pNewCommentAction = new KAction( i18n( "Comment" ), "pmcomment", 0, this, TQT_SLOT( slotNewComment( ) ),
actionCollection( ), "new_comment" );
m_readWriteActions.append( m_pNewCommentAction );
- m_pNewRawAction = new KAction( i18n( "Raw Povray" ), "pmraw", 0, this, SLOT( slotNewRaw( ) ),
+ m_pNewRawAction = new KAction( i18n( "Raw Povray" ), "pmraw", 0, this, TQT_SLOT( slotNewRaw( ) ),
actionCollection( ), "new_raw" );
m_readWriteActions.append( m_pNewRawAction );
// POV-Ray 3.5 objects
- m_pNewIsoSurfaceAction = new KAction( i18n( "Iso Surface" ), "pmisosurface", 0, this, SLOT( slotNewIsoSurface( ) ),
+ m_pNewIsoSurfaceAction = new KAction( i18n( "Iso Surface" ), "pmisosurface", 0, this, TQT_SLOT( slotNewIsoSurface( ) ),
actionCollection( ), "new_isosurface" );
m_readWriteActions.append( m_pNewIsoSurfaceAction );
- m_pNewRadiosityAction = new KAction( i18n( "Radiosity" ), "pmradiosity", 0, this, SLOT( slotNewRadiosity( ) ),
+ m_pNewRadiosityAction = new KAction( i18n( "Radiosity" ), "pmradiosity", 0, this, TQT_SLOT( slotNewRadiosity( ) ),
actionCollection( ), "new_radiosity" );
m_readWriteActions.append( m_pNewRadiosityAction );
- m_pNewGlobalPhotonsAction = new KAction( i18n( "Global Photons" ), "pmglobalphotons", 0, this, SLOT( slotNewGlobalPhotons( ) ),
+ m_pNewGlobalPhotonsAction = new KAction( i18n( "Global Photons" ), "pmglobalphotons", 0, this, TQT_SLOT( slotNewGlobalPhotons( ) ),
actionCollection( ), "new_globalphotons" );
m_readWriteActions.append( m_pNewGlobalPhotonsAction );
- m_pNewPhotonsAction = new KAction( i18n( "Photons" ), "pmphotons", 0, this, SLOT( slotNewPhotons( ) ),
+ m_pNewPhotonsAction = new KAction( i18n( "Photons" ), "pmphotons", 0, this, TQT_SLOT( slotNewPhotons( ) ),
actionCollection( ), "new_photons" );
m_readWriteActions.append( m_pNewPhotonsAction );
- m_pNewLightGroupAction = new KAction( i18n( "Light Group" ), "pmlightgroup", 0, this, SLOT( slotNewLightGroup( ) ),
+ m_pNewLightGroupAction = new KAction( i18n( "Light Group" ), "pmlightgroup", 0, this, TQT_SLOT( slotNewLightGroup( ) ),
actionCollection( ), "new_lightgroup" );
m_readWriteActions.append( m_pNewLightGroupAction );
- m_pNewInteriorTextureAction = new KAction( i18n( "Interior Texture" ), "pminteriortexture", 0, this, SLOT( slotNewInteriorTexture( ) ),
+ m_pNewInteriorTextureAction = new KAction( i18n( "Interior Texture" ), "pminteriortexture", 0, this, TQT_SLOT( slotNewInteriorTexture( ) ),
actionCollection( ), "new_interiortexture" );
m_readWriteActions.append( m_pNewInteriorTextureAction );
- m_pNewSphereSweepAction = new KAction( i18n( "Sphere Sweep" ), "pmspheresweep", 0, this, SLOT( slotNewSphereSweep( ) ),
+ m_pNewSphereSweepAction = new KAction( i18n( "Sphere Sweep" ), "pmspheresweep", 0, this, TQT_SLOT( slotNewSphereSweep( ) ),
actionCollection( ), "new_spheresweep" );
m_readWriteActions.append( m_pNewSphereSweepAction );
- m_pNewMeshAction = new KAction( i18n( "Mesh" ), "pmmesh", 0, this, SLOT( slotNewMesh( ) ),
+ m_pNewMeshAction = new KAction( i18n( "Mesh" ), "pmmesh", 0, this, TQT_SLOT( slotNewMesh( ) ),
actionCollection( ), "new_mesh" );
m_readWriteActions.append( m_pNewMeshAction );
#ifdef KPM_WITH_OBJECT_LIBRARY
- m_pSearchLibraryObjectAction = new KAction( i18n( "Search Object" ), "pmsearchlibrary", 0, this, SLOT( slotSearchLibraryObject( ) ),
+ m_pSearchLibraryObjectAction = new KAction( i18n( "Search Object" ), "pmsearchlibrary", 0, this, TQT_SLOT( slotSearchLibraryObject( ) ),
actionCollection( ), "search_library_object" );
m_readWriteActions.append( m_pSearchLibraryObjectAction );
#endif
- m_pUndoAction = KStdAction::undo( this, SLOT( slotEditUndo( ) ), actionCollection( ) );
- m_pRedoAction = KStdAction::redo( this, SLOT( slotEditRedo( ) ), actionCollection( ) );
+ m_pUndoAction = KStdAction::undo( this, TQT_SLOT( slotEditUndo( ) ), actionCollection( ) );
+ m_pRedoAction = KStdAction::redo( this, TQT_SLOT( slotEditRedo( ) ), actionCollection( ) );
m_pUndoAction->setEnabled( false );
m_pRedoAction->setEnabled( false );
}
@@ -655,7 +655,7 @@ void PMPart::updateNewObjectActions( )
{
if( isReadWrite( ) && !m_onlyCopyPaste )
{
- QPtrListIterator<PMMetaObject> it =
+ TQPtrListIterator<PMMetaObject> it =
m_pPrototypeManager->prototypeIterator( );
KAction* action;
bool enable;
@@ -672,13 +672,13 @@ void PMPart::updateNewObjectActions( )
// action names are "new_" + povray name
// (like new_box, new_sphere ...)
- QString actionName = "new_" + it.current( )->className( ).lower( );
+ TQString actionName = "new_" + it.current( )->className( ).lower( );
action = actionCollection( )->action( actionName.latin1( ) );
if( action )
{
if( m_pActiveObject )
{
- QString insertName = it.current( )->className( );
+ TQString insertName = it.current( )->className( );
enable = m_pActiveObject->canInsert( insertName, 0 );
if( !enable )
if( m_pActiveObject->lastChild( ) )
@@ -695,13 +695,13 @@ void PMPart::updateNewObjectActions( )
// special treatment for csg actions
if( m_pActiveObject )
{
- enable = m_pActiveObject->canInsert( QString( "CSG" ), 0 );
+ enable = m_pActiveObject->canInsert( TQString( "CSG" ), 0 );
if( !enable )
if( m_pActiveObject->lastChild( ) )
- enable = m_pActiveObject->canInsert( QString( "CSG" ), m_pActiveObject->lastChild( ) );
+ enable = m_pActiveObject->canInsert( TQString( "CSG" ), m_pActiveObject->lastChild( ) );
if( !enable )
if( readWriteParent )
- enable = m_pActiveObject->parent( )->canInsert( QString( "CSG" ), m_pActiveObject );
+ enable = m_pActiveObject->parent( )->canInsert( TQString( "CSG" ), m_pActiveObject );
}
else
enable = false;
@@ -715,7 +715,7 @@ void PMPart::updateNewObjectActions( )
void PMPart::disableReadWriteActions( )
{
- QPtrListIterator<KAction> it( m_readWriteActions);
+ TQPtrListIterator<KAction> it( m_readWriteActions);
for( ; it.current( ); ++it )
it.current( )->setEnabled( false );
}
@@ -725,7 +725,7 @@ void PMPart::initDocument( )
newDocument( );
}
-void PMPart::initView( QWidget* parent, const char* name )
+void PMPart::initView( TQWidget* parent, const char* name )
{
if( !m_pShell )
{
@@ -838,7 +838,7 @@ void PMPart::restoreConfig( KConfig* cfg )
bool PMPart::openFile( )
{
- QIODevice* dev = KFilterDev::deviceForFile( m_file, "application/x-gzip" );
+ TQIODevice* dev = KFilterDev::deviceForFile( m_file, "application/x-gzip" );
bool success = true;
PMObjectList list;
@@ -856,7 +856,7 @@ bool PMPart::openFile( )
{
PMErrorDialog dlg( parser.messages( ), parser.errorFlags( ) );
// still try to insert the correct parsed objects?
- success = ( dlg.exec( ) == QDialog::Accepted );
+ success = ( dlg.exec( ) == TQDialog::Accepted );
}
if( success )
{
@@ -901,14 +901,14 @@ bool PMPart::saveFile( )
{
bool success = false;
- QIODevice* dev = KFilterDev::deviceForFile( m_file, "application/x-gzip" );
+ TQIODevice* dev = KFilterDev::deviceForFile( m_file, "application/x-gzip" );
if( dev && dev->open( IO_WriteOnly ) )
{
- QDomDocument doc( "KPOVMODELER" );
- QDomElement e = ( ( PMObject* )m_pScene)->serialize( doc );
+ TQDomDocument doc( "KPOVMODELER" );
+ TQDomElement e = ( ( PMObject* )m_pScene)->serialize( doc );
doc.appendChild( e );
- QTextStream str( dev );
+ TQTextStream str( dev );
str << doc;
dev->close( );
setModified( false );
@@ -924,7 +924,7 @@ bool PMPart::saveFile( )
bool PMPart::exportPovray( const KURL& url )
{
KTempFile* tempFile = 0;
- QFile* file = 0;
+ TQFile* file = 0;
bool ok = true;
if( !url.isValid( ) )
@@ -933,7 +933,7 @@ bool PMPart::exportPovray( const KURL& url )
if( url.isLocalFile( ) )
{
// Local file
- file = new QFile( url.path( ) );
+ file = new TQFile( url.path( ) );
if( !file->open( IO_WriteOnly ) )
ok = false;
}
@@ -958,7 +958,7 @@ bool PMPart::exportPovray( const KURL& url )
if( tempFile )
{
tempFile->close( );
- ok = KIO::NetAccess::upload( tempFile->name( ), url, (QWidget*) 0 );
+ ok = KIO::NetAccess::upload( tempFile->name( ), url, (TQWidget*) 0 );
tempFile->unlink( );
file = 0;
}
@@ -972,9 +972,9 @@ bool PMPart::exportPovray( const KURL& url )
return ok;
}
-QString PMPart::activeObjectName( )
+TQString PMPart::activeObjectName( )
{
- QString result = "";
+ TQString result = "";
PMObject* tmpObj;
PMObject* testSib;
int idx = 0;
@@ -990,7 +990,7 @@ QString PMPart::activeObjectName( )
// prepend to result
if( idx != 0 )
- result = tmpObj->type( ) + "[" + QString::number( idx ) + "]/" + result;
+ result = tmpObj->type( ) + "[" + TQString::number( idx ) + "]/" + result;
else
result = tmpObj->type( ) + "/" + result;
@@ -1005,13 +1005,13 @@ QString PMPart::activeObjectName( )
return result;
}
-bool PMPart::setActiveObject( const QString& name )
+bool PMPart::setActiveObject( const TQString& name )
{
PMObject* tmpObj;
PMObject* tmpSibling;
int pos, siblingIndex, objIndex, firstBracket, lastBracket;
- QString objPath;
- QString pathElem;
+ TQString objPath;
+ TQString pathElem;
// check if it's a absolute object name
if( name[0] == '/' )
@@ -1032,7 +1032,7 @@ bool PMPart::setActiveObject( const QString& name )
else
{
pathElem = objPath;
- objPath = QString::null;
+ objPath = TQString::null;
}
while( !pathElem.isNull( ) )
@@ -1079,7 +1079,7 @@ bool PMPart::setActiveObject( const QString& name )
else
{
pathElem = objPath;
- objPath = QString::null;
+ objPath = TQString::null;
}
}
if( tmpObj )
@@ -1091,18 +1091,18 @@ bool PMPart::setActiveObject( const QString& name )
return false;
}
-QStringList PMPart::getProperties( )
+TQStringList PMPart::getProperties( )
{
PMObject* curObj = activeObject( );
// Ensure that there is an active object
if( !curObj )
- return QStringList( );
+ return TQStringList( );
return curObj->properties( );
}
-bool PMPart::setProperty( const QString& name, const PMVariant& value )
+bool PMPart::setProperty( const TQString& name, const PMVariant& value )
{
PMObject* curObj = activeObject( );
@@ -1115,7 +1115,7 @@ bool PMPart::setProperty( const QString& name, const PMVariant& value )
return true;
}
-bool PMPart::setProperty( const QString& name, const QString& value )
+bool PMPart::setProperty( const TQString& name, const TQString& value )
{
PMObject* curObj = activeObject( );
PMVariant variant;
@@ -1130,7 +1130,7 @@ bool PMPart::setProperty( const QString& name, const QString& value )
return true;
}
-const PMVariant PMPart::getProperty( const QString& name )
+const PMVariant PMPart::getProperty( const TQString& name )
{
PMObject* curObj = activeObject( );
@@ -1141,7 +1141,7 @@ const PMVariant PMPart::getProperty( const QString& name )
return curObj->property( name );
}
-const QString PMPart::getPropertyStr( const QString& name )
+const TQString PMPart::getPropertyStr( const TQString& name )
{
PMObject* curObj = activeObject( );
@@ -1159,7 +1159,7 @@ const PMObjectList& PMPart::selectedObjects( )
bool stop = false;
PMObject* tmp;
- QPtrStack<PMObject> stack;
+ TQPtrStack<PMObject> stack;
if( !m_sortedListUpToDate )
{
@@ -1212,7 +1212,7 @@ const PMObjectList& PMPart::selectedObjects( )
int PMPart::whereToInsert( PMObject* obj, const PMObjectList& list )
{
// if you change this function, change
- // whereToInsert( PMObject* obj, const QStringList& ), too
+ // whereToInsert( PMObject* obj, const TQStringList& ), too
int canInsertAsFirstChild = 0;
int canInsertAsLastChild = 0;
@@ -1270,7 +1270,7 @@ int PMPart::whereToInsert( PMObject* obj, const PMObjectList& list )
return insertAs;
}
-int PMPart::whereToInsert( PMObject* obj, const QStringList& list )
+int PMPart::whereToInsert( PMObject* obj, const TQStringList& list )
{
// if you change this function, change
// whereToInsert( PMObject* obj, const PMObjectList ), too
@@ -1359,14 +1359,14 @@ int PMPart::whereToInsert( PMObject* obj )
void PMPart::slotFileImport( )
{
- QString fileName;
+ TQString fileName;
PMIOFormat* selectedFormat = 0;
fileName = PMFileDialog::getImportFileName( 0, this, selectedFormat );
if( !fileName.isEmpty( ) && selectedFormat )
{
- QFile file( fileName );
+ TQFile file( fileName );
if( file.open( IO_ReadOnly ) )
{
PMParser* newParser = selectedFormat->newParser( this, &file );
@@ -1393,15 +1393,15 @@ void PMPart::slotFileExport( )
{
emit aboutToSave( );
- QString fileName, filter;
+ TQString fileName, filter;
PMIOFormat* selectedFormat = 0;
fileName = PMFileDialog::getExportFileName( 0, this, selectedFormat, filter );
if( !fileName.isEmpty( ) && selectedFormat )
{
- QByteArray baData;
- QBuffer buffer( baData );
+ TQByteArray baData;
+ TQBuffer buffer( baData );
buffer.open( IO_WriteOnly );
PMSerializer* newSer = selectedFormat->newSerializer( &buffer );
@@ -1416,15 +1416,15 @@ void PMPart::slotFileExport( )
// there were errors, display them
PMErrorDialog dlg( newSer->messages( ), newSer->errorFlags( ) );
// still try to export?
- success = ( dlg.exec( ) == QDialog::Accepted );
+ success = ( dlg.exec( ) == TQDialog::Accepted );
}
if( success )
{
- QFileInfo info( fileName );
+ TQFileInfo info( fileName );
if( info.extension( ).isEmpty( ) )
fileName += filter.right( filter.length( ) - 1 ); // remove '*'
- QFile file( fileName );
+ TQFile file( fileName );
if( file.open( IO_WriteOnly ) )
{
file.writeBlock( baData );
@@ -1450,7 +1450,7 @@ void PMPart::slotEditCut( )
if( sortedList.count( ) > 0 )
{
- QApplication::clipboard( )->setData( new PMObjectDrag( this, sortedList ) );
+ TQApplication::clipboard( )->setData( new PMObjectDrag( this, sortedList ) );
removeSelection( i18n( "Cut" ) );
}
@@ -1472,7 +1472,7 @@ void PMPart::slotEditCopy( )
const PMObjectList& sortedList = selectedObjects( );
if( sortedList.count( ) > 0 )
- QApplication::clipboard( )->setData( new PMObjectDrag( this, sortedList ) );
+ TQApplication::clipboard( )->setData( new PMObjectDrag( this, sortedList ) );
emit setStatusBarText( "" );
}
@@ -1526,7 +1526,7 @@ bool PMPart::dragMoveSelectionTo( PMObject* obj )
return false;
}
-bool PMPart::removeSelection( const QString& type )
+bool PMPart::removeSelection( const TQString& type )
{
PMDeleteCommand* cmd = 0;
const PMObjectList& sortedList = selectedObjects( );
@@ -1540,7 +1540,7 @@ bool PMPart::removeSelection( const QString& type )
return false;
}
-bool PMPart::drop( PMObject* obj, QMimeSource* mime )
+bool PMPart::drop( PMObject* obj, TQMimeSource* mime )
{
return pasteOrDrop( i18n( "Drop" ), mime, obj );
}
@@ -1555,7 +1555,7 @@ void PMPart::slotEditPaste( )
emit setStatusBarText( "" );
}
-bool PMPart::pasteOrDrop( const QString& type, QMimeSource* mime, PMObject* obj )
+bool PMPart::pasteOrDrop( const TQString& type, TQMimeSource* mime, PMObject* obj )
{
bool success = false;
@@ -1569,7 +1569,7 @@ bool PMPart::pasteOrDrop( const QString& type, QMimeSource* mime, PMObject* obj
return success;
}
-bool PMPart::insertFromParser( const QString& type, PMParser* parser,
+bool PMPart::insertFromParser( const TQString& type, PMParser* parser,
PMObject* obj )
{
PMObjectList list;
@@ -1580,7 +1580,7 @@ bool PMPart::insertFromParser( const QString& type, PMParser* parser,
// try to parse
if( parser->canQuickParse( ) )
{
- QStringList types;
+ TQStringList types;
parser->quickParse( types );
success = !( parser->warnings( ) || parser->errors( ) );
@@ -1590,7 +1590,7 @@ bool PMPart::insertFromParser( const QString& type, PMParser* parser,
// there were errors, display them
PMErrorDialog dlg( parser->messages( ), parser->errorFlags( ) );
// still try to insert the correct parsed objects?
- success = ( dlg.exec( ) == QDialog::Accepted );
+ success = ( dlg.exec( ) == TQDialog::Accepted );
}
if( success && ( types.count( ) > 0 ) )
insertAs = whereToInsert( obj, types );
@@ -1631,7 +1631,7 @@ bool PMPart::insertFromParser( const QString& type, PMParser* parser,
// there were errors, display them
PMErrorDialog dlg( parser->messages( ), parser->errorFlags( ) );
// still try to insert the correct parsed objects?
- success = ( dlg.exec( ) == QDialog::Accepted );
+ success = ( dlg.exec( ) == TQDialog::Accepted );
}
if( list.count( ) > 0 )
@@ -1725,7 +1725,7 @@ bool PMPart::executeCommand( PMCommand* cmd )
if( flags )
{
PMErrorDialog dlg( cmd->messages( ), flags );
- execute = ( dlg.exec( ) == QDialog::Accepted );
+ execute = ( dlg.exec( ) == TQDialog::Accepted );
}
if( execute )
@@ -1755,7 +1755,7 @@ bool PMPart::executeCommand( PMCommand* cmd )
}
void PMPart::slotObjectChanged( PMObject* obj, const int m,
- QObject* sender )
+ TQObject* sender )
{
int mode = m;
bool selectionChanged = false;
@@ -1785,7 +1785,7 @@ void PMPart::slotObjectChanged( PMObject* obj, const int m,
{
if( obj->selectedChildren( ) > 0 )
{
- QPtrStack<PMObject> stack;
+ TQPtrStack<PMObject> stack;
PMObject* tmp = obj->firstChild( );
bool stop = false;
@@ -1930,8 +1930,8 @@ void PMPart::slotObjectChanged( PMObject* obj, const int m,
if( mode & PMCInsertError )
{
m_numInsertErrors++;
- QString detail;
- detail = obj->description( ) + QString( " " ) + obj->name( );
+ TQString detail;
+ detail = obj->description( ) + TQString( " " ) + obj->name( );
m_insertErrorDetails.append( detail );
if( obj->isA( "Declare" ) )
@@ -1972,7 +1972,7 @@ void PMPart::slotObjectChanged( PMObject* obj, const int m,
emit objectChanged( obj, mode, sender );
}
-void PMPart::slotIDChanged( PMObject* obj, const QString& oldID )
+void PMPart::slotIDChanged( PMObject* obj, const TQString& oldID )
{
if( obj->isA( "Declare" ) )
{
@@ -2050,14 +2050,14 @@ void PMPart::slotNewObject( PMObject* newObject, int insertAs )
}
}
-void PMPart::slotNewObject( const QString& type )
+void PMPart::slotNewObject( const TQString& type )
{
PMObject* newObject = m_pPrototypeManager->newObject( type );
if( newObject )
slotNewObject( newObject );
}
-void PMPart::slotNewObject( const QString& type, const QString& pos )
+void PMPart::slotNewObject( const TQString& type, const TQString& pos )
{
PMObject* newObject = m_pPrototypeManager->newObject( type );
if( newObject )
@@ -2073,10 +2073,10 @@ void PMPart::slotNewObject( const QString& type, const QString& pos )
}
}
-QStringList PMPart::getObjectTypes( )
+TQStringList PMPart::getObjectTypes( )
{
- QStringList result;
- QPtrListIterator<PMMetaObject> it = m_pPrototypeManager->prototypeIterator( );
+ TQStringList result;
+ TQPtrListIterator<PMMetaObject> it = m_pPrototypeManager->prototypeIterator( );
for( ; it.current( ); ++it )
{
@@ -2089,11 +2089,11 @@ void PMPart::slotNewTransformedObject( PMObject* o )
{
if( o )
{
- if( o->canInsert( QString( "Scale" ), o->lastChild( ) ) )
+ if( o->canInsert( TQString( "Scale" ), o->lastChild( ) ) )
o->appendChild( new PMScale( this ) );
- if( o->canInsert( QString( "Rotate" ), o->lastChild( ) ) )
+ if( o->canInsert( TQString( "Rotate" ), o->lastChild( ) ) )
o->appendChild( new PMRotate( this ) );
- if( o->canInsert( QString( "Translate" ), o->lastChild( ) ) )
+ if( o->canInsert( TQString( "Translate" ), o->lastChild( ) ) )
o->appendChild( new PMTranslate( this ) );
slotNewObject( o );
}
@@ -2625,7 +2625,7 @@ void PMPart::deleteContents( )
m_bCameraListUpToDate = true;
}
-void PMPart::slotUpdateUndoRedo( const QString& undo, const QString& redo )
+void PMPart::slotUpdateUndoRedo( const TQString& undo, const TQString& redo )
{
if( isReadWrite( ) )
{
@@ -2685,11 +2685,11 @@ PMCamera* PMPart::firstCamera( )
return m_cameras.first( );
}
-QPtrListIterator<PMCamera> PMPart::cameras( )
+TQPtrListIterator<PMCamera> PMPart::cameras( )
{
if( !m_bCameraListUpToDate )
updateCameraList( );
- return QPtrListIterator<PMCamera>( m_cameras );
+ return TQPtrListIterator<PMCamera>( m_cameras );
}
void PMPart::updateCameraList( )
@@ -2709,8 +2709,8 @@ void PMPart::slotRender( )
{
emit aboutToRender( );
- QByteArray a;
- QBuffer buffer( a );
+ TQByteArray a;
+ TQBuffer buffer( a );
buffer.open( IO_WriteOnly );
PMPovray35Format format;
PMSerializer* dev = format.newSerializer( &buffer );
@@ -2732,7 +2732,7 @@ void PMPart::slotRenderSettings( )
PMRenderModesDialog dlg( m_pScene->renderModes( ), widget( ) );
int result = dlg.exec( );
- if( result == QDialog::Accepted )
+ if( result == TQDialog::Accepted )
{
if( isReadWrite( ) )
setModified( true );
@@ -2762,7 +2762,7 @@ void PMPart::updateRenderModes( )
PMRenderModeList* list = m_pScene->renderModes( );
PMRenderModeListIterator it( *list );
- QComboBox* box = m_pRenderComboAction->combo( );
+ TQComboBox* box = m_pRenderComboAction->combo( );
if( box )
{
bool b = box->signalsBlocked( );
@@ -2783,8 +2783,8 @@ void PMPart::updateRenderModes( )
void PMPart::slotRenderModeActionPlugged( )
{
updateRenderModes( );
-// connect( m_pRenderComboAction->combo( ), SIGNAL( activated( int ) ),
-// SLOT( slotRenderMode( int ) ) );
+// connect( m_pRenderComboAction->combo( ), TQT_SIGNAL( activated( int ) ),
+// TQT_SLOT( slotRenderMode( int ) ) );
}
void PMPart::slotVisibilityLevelChanged( int l )
@@ -2802,7 +2802,7 @@ void PMPart::slotVisibilityActionPlugged( )
{
if( m_pVisibilityLevelAction )
{
- QSpinBox* box = m_pVisibilityLevelAction->spinBox( );
+ TQSpinBox* box = m_pVisibilityLevelAction->spinBox( );
if( box )
{
box->setMinValue( -1000 );
@@ -2816,7 +2816,7 @@ void PMPart::updateVisibilityLevel( )
{
if( m_pVisibilityLevelAction )
{
- QSpinBox* box = m_pVisibilityLevelAction->spinBox( );
+ TQSpinBox* box = m_pVisibilityLevelAction->spinBox( );
if( box && m_pScene )
{
bool sb = box->signalsBlocked( );
diff --git a/kpovmodeler/pmpart.h b/kpovmodeler/pmpart.h
index e0ebcd06..e1b36b46 100644
--- a/kpovmodeler/pmpart.h
+++ b/kpovmodeler/pmpart.h
@@ -30,9 +30,9 @@
#include <kurl.h>
#include <kparts/part.h>
#include <kparts/browserextension.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
#include <kglobal.h>
#include <klocale.h>
@@ -56,7 +56,7 @@ class PMPrototypeManager;
class PMInsertRuleSystem;
class PMIOManager;
-class QMimeSource;
+class TQMimeSource;
class KAction;
class KSelectAction;
class PMComboAction;
@@ -75,16 +75,16 @@ public:
* construtor of PMPart, calls all init functions to create the
* application.
*/
- PMPart( QWidget* parentWidget, const char* widgetName,
- QObject* parent, const char* name, bool readWrite,
+ PMPart( TQWidget* parentWidget, const char* widgetName,
+ TQObject* parent, const char* name, bool readWrite,
PMShell* shell = 0 );
/**
* construtor of PMPart, calls all init functions to create the
* application. It does not create the main widget.
*/
- PMPart( QWidget* parentWidget, const char* widgetName,
- QObject* parent, const char* name, bool readWrite,
+ PMPart( TQWidget* parentWidget, const char* widgetName,
+ TQObject* parent, const char* name, bool readWrite,
bool onlyCutPaste, PMShell* shell = 0 );
/**
@@ -157,7 +157,7 @@ public:
*
* Returns PMIFirstChild, PMILastChild, PMISibling or 0, if the objects
* should not be inserted.*/
- int whereToInsert( PMObject* obj, const QStringList& list );
+ int whereToInsert( PMObject* obj, const TQStringList& list );
/**
* Asks the user, where to insert new objects.
*
@@ -176,7 +176,7 @@ public:
/**
* Returns an iterator to the list of cameras
*/
- QPtrListIterator<PMCamera> cameras( );
+ TQPtrListIterator<PMCamera> cameras( );
/**
* The active object
*/
@@ -184,31 +184,31 @@ public:
/**
* The active object's name
*/
- virtual QString activeObjectName( );
+ virtual TQString activeObjectName( );
/**
* Set the active object
*/
- virtual bool setActiveObject( const QString& name );
+ virtual bool setActiveObject( const TQString& name );
/**
* Get the valid properties of the currently active object
*/
- virtual QStringList getProperties( );
+ virtual TQStringList getProperties( );
/**
* set a property on the active object
*/
- virtual bool setProperty( const QString& name, const PMVariant& value );
+ virtual bool setProperty( const TQString& name, const PMVariant& value );
/**
* set a property on the active object
*/
- virtual bool setProperty( const QString& name, const QString& value );
+ virtual bool setProperty( const TQString& name, const TQString& value );
/**
* get a property on the active object
*/
- virtual const PMVariant getProperty( const QString& name );
+ virtual const PMVariant getProperty( const TQString& name );
/**
* get a property on the active object
*/
- virtual const QString getPropertyStr( const QString& name );
+ virtual const TQString getPropertyStr( const TQString& name );
/**
* List of control points of the active object
*/
@@ -226,14 +226,14 @@ public:
*
* Returns true if successful.
*/
- bool drop( PMObject* obj, QMimeSource* e );
+ bool drop( PMObject* obj, TQMimeSource* e );
/**
* Tries to parse the data and insert the parsed objects
* as child or siblings of object obj
*
* Type is the actions description for the undo/redo menu.
*/
- bool insertFromParser( const QString& type, PMParser* parser, PMObject* obj );
+ bool insertFromParser( const TQString& type, PMParser* parser, PMObject* obj );
/**
* Returns a pointer to the prototype manager
@@ -287,16 +287,16 @@ public slots:
* Called when an object is changed.
* Mode is a bit combination of @ref PMChange constants
*/
- void slotObjectChanged( PMObject* obj, const int mode, QObject* sender );
+ void slotObjectChanged( PMObject* obj, const int mode, TQObject* sender );
/**
* Called when an id is changed
*/
- void slotIDChanged( PMObject* obj, const QString& oldID );
+ void slotIDChanged( PMObject* obj, const TQString& oldID );
/**
* Inserts a new PMObject of type type
*/
- void slotNewObject( const QString& type );
+ void slotNewObject( const TQString& type );
/**
* Inserts a new PMObject of type type at position pos.
* pos can be one of:
@@ -304,7 +304,7 @@ public slots:
* LastChild
* Sibling
*/
- void slotNewObject( const QString& type, const QString& pos );
+ void slotNewObject( const TQString& type, const TQString& pos );
/**
* Inserts the new PMObject. The object will be deleted if it can't be
* inserted or the user aborts the action
@@ -314,7 +314,7 @@ public slots:
/**
* List the known object types
*/
- virtual QStringList getObjectTypes( );
+ virtual TQStringList getObjectTypes( );
/**
* Adds transformations to the object and calls slotNewObject
@@ -654,7 +654,7 @@ public slots:
/**
* updates the undo/redo menu items
*/
- void slotUpdateUndoRedo( const QString& undo, const QString& redo );
+ void slotUpdateUndoRedo( const TQString& undo, const TQString& redo );
/**
* Starts rendering with povray
@@ -712,7 +712,7 @@ signals:
* Signal that is emitted when an object is changed.
* Mode is a bit combination of @ref PMChange constants.
*/
- void objectChanged( PMObject* obj, const int mode, QObject* sender );
+ void objectChanged( PMObject* obj, const int mode, TQObject* sender );
/**
* Signal that is emitted when the views have to be refreshed.
* Usually on newDocument or openDocument
@@ -729,7 +729,7 @@ signals:
/**
* Emitted when the mouse is over a control point
*/
- void controlPointMessage( const QString& msg );
+ void controlPointMessage( const TQString& msg );
/**
* Emitted when the active render mode has changed
*/
@@ -770,7 +770,7 @@ protected:
* creates the widget of the part instance and sets
* it as the view
*/
- void initView( QWidget* parent, const char* name );
+ void initView( TQWidget* parent, const char* name );
/**
* initializes the documents contents
*/
@@ -796,7 +796,7 @@ private:
*
* Returns the number.
*/
- unsigned int findNewID( const QString& prefix, unsigned int firstNumber,
+ unsigned int findNewID( const TQString& prefix, unsigned int firstNumber,
PMDeclare* obj );
/**
* Updates the list of cameras
@@ -806,11 +806,11 @@ private:
/**
* Generic drop/paste function
*/
- bool pasteOrDrop( const QString& type, QMimeSource* mime, PMObject* obj );
+ bool pasteOrDrop( const TQString& type, TQMimeSource* mime, PMObject* obj );
/**
* Generic cut/delete/remove function
*/
- bool removeSelection( const QString& type );
+ bool removeSelection( const TQString& type );
/**
* Updates the render mode combo action
*/
@@ -851,7 +851,7 @@ private:
/**
* List of all cameras
*/
- QPtrList<PMCamera> m_cameras;
+ TQPtrList<PMCamera> m_cameras;
/**
* true if the m_cameras list is up to date
*/
@@ -879,7 +879,7 @@ private:
/**
* Details of insert errors
*/
- QStringList m_insertErrorDetails;
+ TQStringList m_insertErrorDetails;
/**
* The symbol table for this document
*/
@@ -1015,7 +1015,7 @@ private:
KSelectAction* m_pGlobalDetailAction;
PMLabelAction* m_pGlobalDetailLabelAction;
- QPtrList<KAction> m_readWriteActions;
+ TQPtrList<KAction> m_readWriteActions;
PMPrototypeManager* m_pPrototypeManager;
PMInsertRuleSystem* m_pInsertRuleSystem;
diff --git a/kpovmodeler/pmpartiface.h b/kpovmodeler/pmpartiface.h
index a1fe495e..744b85ca 100644
--- a/kpovmodeler/pmpartiface.h
+++ b/kpovmodeler/pmpartiface.h
@@ -52,7 +52,7 @@ k_dcop:
/**
* Inserts a new PMObject of type type
*/
- virtual void slotNewObject( const QString& type, const QString& pos ) = 0;
+ virtual void slotNewObject( const TQString& type, const TQString& pos ) = 0;
/**
* initializes the documents contents
*/
@@ -84,36 +84,36 @@ k_dcop:
/**
* returns the currently selected object
*/
- virtual QString activeObjectName( ) = 0;
+ virtual TQString activeObjectName( ) = 0;
/**
* set the current selected object.
* returns true if successful or false otherwise
*/
- virtual bool setActiveObject( const QString& name ) = 0;
+ virtual bool setActiveObject( const TQString& name ) = 0;
/**
* Get known properties of the currently active object
*/
- virtual QStringList getProperties( ) = 0;
+ virtual TQStringList getProperties( ) = 0;
/**
* set a property on the currently active object
*/
- virtual bool setProperty( const QString& property, const PMVariant& value ) = 0;
+ virtual bool setProperty( const TQString& property, const PMVariant& value ) = 0;
/**
* set a property on the currently active object
*/
- virtual bool setProperty( const QString& property, const QString& value ) = 0;
+ virtual bool setProperty( const TQString& property, const TQString& value ) = 0;
/**
* Get the value of the given property
*/
- virtual const PMVariant getProperty( const QString& property ) = 0;
+ virtual const PMVariant getProperty( const TQString& property ) = 0;
/**
* Get the value of the given property
*/
- virtual const QString getPropertyStr( const QString& property ) = 0;
+ virtual const TQString getPropertyStr( const TQString& property ) = 0;
/**
* Get a list of known object types.
*/
- virtual QStringList getObjectTypes( ) = 0;
+ virtual TQStringList getObjectTypes( ) = 0;
};
#endif
diff --git a/kpovmodeler/pmpattern.cpp b/kpovmodeler/pmpattern.cpp
index c9377f84..2d60e9ce 100644
--- a/kpovmodeler/pmpattern.cpp
+++ b/kpovmodeler/pmpattern.cpp
@@ -33,7 +33,7 @@ const PMVector crackleFormDefault = PMVector( -1.0, 1.0, 0.0 );
const int crackleMetricDefault = 2;
const double crackleOffsetDefault = 0.0;
const bool crackleSolidDefault = false;
-const QString densityFileDefault = QString( "" );
+const TQString densityFileDefault = TQString( "" );
const int densityInterpolateDefault = 0;
const PMVector gradientDefault = PMVector( 1.0, 1.0, 1.0 );
const PMVector juliaComplexDefault = PMVector( 0.353, 0.288 );
@@ -56,7 +56,7 @@ const double slopeLoAltDefault = 0.0;
const double slopeHiAltDefault = 1.0;
const int spiralNumberArmsDefault = 0;
const PMPattern::PMNoiseType noiseGeneratorDefault = PMPattern::GlobalSetting;
-const QString noiseGeneratorDefaultText = QString( "global_setting" );
+const TQString noiseGeneratorDefaultText = TQString( "global_setting" );
const bool turbulenceDefault = false;
const PMVector valueVectorDefault = PMVector( 0.0, 0.0, 0.0 );
const int octavesDefault = 6;
@@ -182,7 +182,7 @@ PMPattern::~PMPattern( )
{
}
-void PMPattern::serialize( QDomElement& e, QDomDocument& ) const
+void PMPattern::serialize( TQDomElement& e, TQDomDocument& ) const
{
switch( m_patternType )
{
@@ -336,7 +336,7 @@ void PMPattern::serialize( QDomElement& e, QDomDocument& ) const
void PMPattern::readAttributes( const PMXMLHelper& h )
{
- QString str = h.stringAttribute( "patterntype", "agate" );
+ TQString str = h.stringAttribute( "patterntype", "agate" );
if( str == "agate" )
m_patternType = PatternAgate;
@@ -549,7 +549,7 @@ void PMPattern::cleanUp( ) const
Base::cleanUp( );
}
-QString PMPattern::description( ) const
+TQString PMPattern::description( ) const
{
return i18n( "pattern" );
}
@@ -630,7 +630,7 @@ void PMPattern::setDensityInterpolate( int c )
}
}
-void PMPattern::setDensityFile( const QString& s )
+void PMPattern::setDensityFile( const TQString& s )
{
if( s != m_densityFile )
{
@@ -982,7 +982,7 @@ void PMPattern::setDepth( const double c )
}
}
-PMDialogEditBase* PMPattern::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMPattern::editWidget( TQWidget* parent ) const
{
return new PMPatternEdit( parent );
}
diff --git a/kpovmodeler/pmpattern.h b/kpovmodeler/pmpattern.h
index 69001a41..7dcf9cff 100644
--- a/kpovmodeler/pmpattern.h
+++ b/kpovmodeler/pmpattern.h
@@ -28,8 +28,8 @@
#include "pmvector.h"
#include "pmcolor.h"
-#include <qvaluelist.h>
-#include <qvaluestack.h>
+#include <tqvaluelist.h>
+#include <tqvaluestack.h>
/**
* Class for povray patterns.
@@ -71,9 +71,9 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMPattern( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmpattern" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmpattern" ); }
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -81,14 +81,14 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMPatternEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Gets the pattern type
@@ -116,7 +116,7 @@ public:
/**
* Gets the desity file name
*/
- QString densityFile( ) const { return m_densityFile; }
+ TQString densityFile( ) const { return m_densityFile; }
/**
* Gets the density interpolation
*/
@@ -257,7 +257,7 @@ public:
/**
* Sets the Density File Name
*/
- void setDensityFile( const QString& v );
+ void setDensityFile( const TQString& v );
/**
* Sets the density interpolation
*/
@@ -402,7 +402,7 @@ private:
double m_crackleOffset;
bool m_crackleSolid;
// density
- QString m_densityFile;
+ TQString m_densityFile;
int m_densityInterpolate;
// gradient
PMVector m_gradient;
diff --git a/kpovmodeler/pmpatternedit.cpp b/kpovmodeler/pmpatternedit.cpp
index 1f9647c2..1e07b822 100644
--- a/kpovmodeler/pmpatternedit.cpp
+++ b/kpovmodeler/pmpatternedit.cpp
@@ -24,13 +24,13 @@
#include "pmlineedits.h"
#include "pmvector.h"
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
#include <ktabctl.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -38,7 +38,7 @@
#include <kfiledialog.h>
#include <kiconloader.h>
-PMPatternEdit::PMPatternEdit( QWidget* parent, const char* name )
+PMPatternEdit::PMPatternEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -48,15 +48,15 @@ void PMPatternEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QGridLayout* layout;
- QHBoxLayout* hl;
- QVBoxLayout* vl;
- QGridLayout* gl;
+ TQGridLayout* layout;
+ TQHBoxLayout* hl;
+ TQVBoxLayout* vl;
+ TQGridLayout* gl;
- layout = new QGridLayout( topLayout( ), 12, 2 );
- hl = new QHBoxLayout( KDialog::spacingHint( ) );
- hl->addWidget( new QLabel( i18n( "Type:" ), this ) );
- m_pTypeCombo = new QComboBox( false, this );
+ layout = new TQGridLayout( topLayout( ), 12, 2 );
+ hl = new TQHBoxLayout( KDialog::spacingHint( ) );
+ hl->addWidget( new TQLabel( i18n( "Type:" ), this ) );
+ m_pTypeCombo = new TQComboBox( false, this );
m_pTypeCombo->insertItem( i18n( "Agate" ) );
m_pTypeCombo->insertItem( i18n( "Average" ) );
m_pTypeCombo->insertItem( i18n( "Boxed" ) );
@@ -90,86 +90,86 @@ void PMPatternEdit::createTopWidgets( )
hl->addStretch( 1 );
layout->addMultiCellLayout( hl, 0, 0, 0, 1 );
- m_pAgateTurbulenceLabel = new QLabel( i18n( "Turbulence:" ), this );
+ m_pAgateTurbulenceLabel = new TQLabel( i18n( "Turbulence:" ), this );
layout->addWidget( m_pAgateTurbulenceLabel, 1, 0 );
m_pAgateTurbulenceEdit = new PMFloatEdit( this );
layout->addWidget( m_pAgateTurbulenceEdit, 1, 1, AlignLeft );
- m_pCrackleWidget = new QWidget( this );
- vl = new QVBoxLayout( m_pCrackleWidget, 0, KDialog::spacingHint( ) );
- hl = new QHBoxLayout( vl );
- hl->addWidget( new QLabel( i18n( "Form:" ), m_pCrackleWidget ) );
+ m_pCrackleWidget = new TQWidget( this );
+ vl = new TQVBoxLayout( m_pCrackleWidget, 0, KDialog::spacingHint( ) );
+ hl = new TQHBoxLayout( vl );
+ hl->addWidget( new TQLabel( i18n( "Form:" ), m_pCrackleWidget ) );
m_pCrackleForm = new PMVectorEdit( "x", "y", "z", m_pCrackleWidget );
hl->addWidget( m_pCrackleForm );
hl->addStretch( 1 );
- hl = new QHBoxLayout( vl );
- gl = new QGridLayout( hl, 3, 2 );
- gl->addWidget( new QLabel( i18n( "Metric:" ), m_pCrackleWidget ), 0, 0 );
+ hl = new TQHBoxLayout( vl );
+ gl = new TQGridLayout( hl, 3, 2 );
+ gl->addWidget( new TQLabel( i18n( "Metric:" ), m_pCrackleWidget ), 0, 0 );
m_pCrackleMetric = new PMIntEdit( m_pCrackleWidget );
m_pCrackleMetric->setValidation( true, 1, false, 0 );
gl->addWidget( m_pCrackleMetric, 0, 1 );
- gl->addWidget( new QLabel( i18n( "Offset:" ), m_pCrackleWidget ), 1, 0 );
+ gl->addWidget( new TQLabel( i18n( "Offset:" ), m_pCrackleWidget ), 1, 0 );
m_pCrackleOffset = new PMFloatEdit( m_pCrackleWidget );
gl->addWidget( m_pCrackleOffset, 1, 1 );
- m_pCrackleSolid = new QCheckBox( i18n( "Solid:" ), m_pCrackleWidget );
+ m_pCrackleSolid = new TQCheckBox( i18n( "Solid:" ), m_pCrackleWidget );
gl->addMultiCellWidget( m_pCrackleSolid, 2, 2, 0, 1 );
hl->addStretch( 1 );
layout->addMultiCellWidget( m_pCrackleWidget, 2, 2, 0, 1 );
- m_pDensityWidget = new QWidget( this );
- vl = new QVBoxLayout( m_pDensityWidget, 0, KDialog::spacingHint( ) );
- hl = new QHBoxLayout( vl );
- hl->addWidget( new QLabel( i18n( "File:" ), m_pDensityWidget ) );
- m_pDensityFile = new QLineEdit( m_pDensityWidget );
+ m_pDensityWidget = new TQWidget( this );
+ vl = new TQVBoxLayout( m_pDensityWidget, 0, KDialog::spacingHint( ) );
+ hl = new TQHBoxLayout( vl );
+ hl->addWidget( new TQLabel( i18n( "File:" ), m_pDensityWidget ) );
+ m_pDensityFile = new TQLineEdit( m_pDensityWidget );
hl->addWidget( m_pDensityFile, 1 );
- m_pDensityFileBrowse = new QPushButton( m_pDensityWidget );
+ m_pDensityFileBrowse = new TQPushButton( m_pDensityWidget );
m_pDensityFileBrowse->setPixmap( SmallIcon( "fileopen" ) );
hl->addWidget( m_pDensityFileBrowse );
- hl = new QHBoxLayout( vl );
- hl->addWidget( new QLabel( i18n( "Interpolation:" ), m_pDensityWidget ) );
- m_pDensityInterpolate = new QComboBox( false, m_pDensityWidget );
+ hl = new TQHBoxLayout( vl );
+ hl->addWidget( new TQLabel( i18n( "Interpolation:" ), m_pDensityWidget ) );
+ m_pDensityInterpolate = new TQComboBox( false, m_pDensityWidget );
m_pDensityInterpolate->insertItem( i18n( "None" ) );
m_pDensityInterpolate->insertItem( i18n( "Trilinear" ) );
hl->addWidget( m_pDensityInterpolate );
hl->addStretch( 1 );
layout->addMultiCellWidget( m_pDensityWidget, 3, 3, 0, 1 );
- m_pGradientLabel = new QLabel( i18n( "Gradient:" ), this );
+ m_pGradientLabel = new TQLabel( i18n( "Gradient:" ), this );
layout->addWidget( m_pGradientLabel, 4, 0 );
m_pGradientEdit = new PMVectorEdit( "x", "y", "z", this );
layout->addWidget( m_pGradientEdit, 4, 1 );
- m_pJuliaComplexLabel = new QLabel( i18n( "Complex number:" ), this );
+ m_pJuliaComplexLabel = new TQLabel( i18n( "Complex number:" ), this );
layout->addWidget( m_pJuliaComplexLabel, 5, 0 );
m_pJuliaComplex = new PMVectorEdit( "Real", "Imaginary", this );
layout->addWidget( m_pJuliaComplex, 5, 1 );
- m_pFractalWidget = new QWidget( this );
- vl = new QVBoxLayout( m_pFractalWidget, 0, KDialog::spacingHint( ) );
- hl = new QHBoxLayout( vl );
- m_pFractalMagnet = new QCheckBox( i18n( "Magnet" ), m_pFractalWidget );
+ m_pFractalWidget = new TQWidget( this );
+ vl = new TQVBoxLayout( m_pFractalWidget, 0, KDialog::spacingHint( ) );
+ hl = new TQHBoxLayout( vl );
+ m_pFractalMagnet = new TQCheckBox( i18n( "Magnet" ), m_pFractalWidget );
hl->addWidget( m_pFractalMagnet );
- m_pFractalMagnetType = new QComboBox( false, m_pFractalWidget );
+ m_pFractalMagnetType = new TQComboBox( false, m_pFractalWidget );
m_pFractalMagnetType->insertItem( i18n( "Type 1" ) );
m_pFractalMagnetType->insertItem( i18n( "Type 2" ) );
hl->addWidget( m_pFractalMagnetType );
hl->addStretch( 1 );
- hl = new QHBoxLayout( vl );
- gl = new QGridLayout( hl, 2, 2 );
- gl->addWidget( new QLabel( i18n( "Maximum iterations:" ), m_pFractalWidget ), 0, 0 );
+ hl = new TQHBoxLayout( vl );
+ gl = new TQGridLayout( hl, 2, 2 );
+ gl->addWidget( new TQLabel( i18n( "Maximum iterations:" ), m_pFractalWidget ), 0, 0 );
m_pMaxIterationsEdit = new PMIntEdit( m_pFractalWidget );
m_pMaxIterationsEdit->setValidation( true, 1, false, 0 );
gl->addWidget( m_pMaxIterationsEdit, 0, 1 );
- m_pFractalExponentLabel = new QLabel( i18n( "Exponent:" ), m_pFractalWidget );
+ m_pFractalExponentLabel = new TQLabel( i18n( "Exponent:" ), m_pFractalWidget );
gl->addWidget( m_pFractalExponentLabel, 1, 0 );
m_pFractalExponent = new PMIntEdit( m_pFractalWidget );
m_pFractalExponent->setValidation( true, 2, true, 33 );
gl->addWidget( m_pFractalExponent, 1, 1 );
hl->addStretch( 1 );
- hl = new QHBoxLayout( vl );
- gl = new QGridLayout( hl, 2, 4 );
- gl->addWidget( new QLabel( i18n( "Exterior type:" ), m_pFractalWidget ), 0, 0 );
- m_pFractalExtType = new QComboBox( false, m_pFractalWidget );
+ hl = new TQHBoxLayout( vl );
+ gl = new TQGridLayout( hl, 2, 4 );
+ gl->addWidget( new TQLabel( i18n( "Exterior type:" ), m_pFractalWidget ), 0, 0 );
+ m_pFractalExtType = new TQComboBox( false, m_pFractalWidget );
m_pFractalExtType->insertItem( i18n( "0: Returns Just 1" ) );
m_pFractalExtType->insertItem( i18n( "1: Iterations Until Bailout" ) );
m_pFractalExtType->insertItem( i18n( "2: Real Part" ) );
@@ -178,11 +178,11 @@ void PMPatternEdit::createTopWidgets( )
m_pFractalExtType->insertItem( i18n( "5: Squared Imaginary Part" ) );
m_pFractalExtType->insertItem( i18n( "6: Absolute Value" ) );
gl->addWidget( m_pFractalExtType, 0, 1 );
- gl->addWidget( new QLabel( i18n( "Factor:" ), m_pFractalWidget ), 0, 2 );
+ gl->addWidget( new TQLabel( i18n( "Factor:" ), m_pFractalWidget ), 0, 2 );
m_pFractalExtFactor = new PMFloatEdit( m_pFractalWidget );
gl->addWidget( m_pFractalExtFactor, 0, 3 );
- gl->addWidget( new QLabel( i18n( "Interior type:" ), m_pFractalWidget ), 1, 0 );
- m_pFractalIntType = new QComboBox( false, m_pFractalWidget );
+ gl->addWidget( new TQLabel( i18n( "Interior type:" ), m_pFractalWidget ), 1, 0 );
+ m_pFractalIntType = new TQComboBox( false, m_pFractalWidget );
m_pFractalIntType->insertItem( i18n( "0: Returns Just 1" ) );
m_pFractalIntType->insertItem( i18n( "1: Absolute Value Smallest" ) );
m_pFractalIntType->insertItem( i18n( "2: Real Part" ) );
@@ -191,69 +191,69 @@ void PMPatternEdit::createTopWidgets( )
m_pFractalIntType->insertItem( i18n( "5: Squared Imaginary Part" ) );
m_pFractalIntType->insertItem( i18n( "6: Absolute Value Last" ) );
gl->addWidget( m_pFractalIntType, 1, 1 );
- gl->addWidget( new QLabel( i18n( "Factor:" ), m_pFractalWidget ), 1, 2 );
+ gl->addWidget( new TQLabel( i18n( "Factor:" ), m_pFractalWidget ), 1, 2 );
m_pFractalIntFactor = new PMFloatEdit( m_pFractalWidget );
gl->addWidget( m_pFractalIntFactor, 1, 3 );
hl->addStretch( 1 );
layout->addMultiCellWidget( m_pFractalWidget, 6, 6, 0, 1 );
- m_pQuiltControlsLabel = new QLabel( i18n( "Quilt controls:" ), this );
+ m_pQuiltControlsLabel = new TQLabel( i18n( "Quilt controls:" ), this );
m_pQuiltControl0Edit = new PMFloatEdit( this );
m_pQuiltControl1Edit = new PMFloatEdit( this );
- hl = new QHBoxLayout( );
+ hl = new TQHBoxLayout( );
hl->addWidget( m_pQuiltControl0Edit );
hl->addWidget( m_pQuiltControl1Edit );
hl->addStretch( 1 );
layout->addWidget( m_pQuiltControlsLabel, 7, 0 );
layout->addLayout( hl, 7, 1 );
- m_pSlopeWidget = new QWidget( this );
- vl = new QVBoxLayout( m_pSlopeWidget, 0, KDialog::spacingHint( ) );
- hl = new QHBoxLayout( vl );
- hl->addWidget( new QLabel( i18n( "Direction:" ), m_pSlopeWidget ) );
+ m_pSlopeWidget = new TQWidget( this );
+ vl = new TQVBoxLayout( m_pSlopeWidget, 0, KDialog::spacingHint( ) );
+ hl = new TQHBoxLayout( vl );
+ hl->addWidget( new TQLabel( i18n( "Direction:" ), m_pSlopeWidget ) );
m_pSlopeDirection = new PMVectorEdit( "x", "y", "z", m_pSlopeWidget );
hl->addWidget( m_pSlopeDirection );
- hl = new QHBoxLayout( vl );
- gl = new QGridLayout( hl, 2, 2 );
- gl->addWidget( new QLabel( i18n( "Low slope:" ), m_pSlopeWidget ), 0, 0 );
+ hl = new TQHBoxLayout( vl );
+ gl = new TQGridLayout( hl, 2, 2 );
+ gl->addWidget( new TQLabel( i18n( "Low slope:" ), m_pSlopeWidget ), 0, 0 );
m_pSlopeLoSlope = new PMFloatEdit( m_pSlopeWidget );
m_pSlopeLoSlope->setValidation( true, 0.0, true, 1.0 );
gl->addWidget( m_pSlopeLoSlope, 0, 1 );
- gl->addWidget( new QLabel( i18n( "High slope:" ), m_pSlopeWidget ), 1, 0 );
+ gl->addWidget( new TQLabel( i18n( "High slope:" ), m_pSlopeWidget ), 1, 0 );
m_pSlopeHiSlope = new PMFloatEdit( m_pSlopeWidget );
m_pSlopeHiSlope->setValidation( true, 0.0, true, 1.0 );
gl->addWidget( m_pSlopeHiSlope, 1, 1 );
hl->addStretch( 1 );
- hl = new QHBoxLayout( vl );
- m_pSlopeAltFlag = new QCheckBox( i18n( "Altitiude" ), m_pSlopeWidget );
+ hl = new TQHBoxLayout( vl );
+ m_pSlopeAltFlag = new TQCheckBox( i18n( "Altitiude" ), m_pSlopeWidget );
hl->addWidget( m_pSlopeAltFlag );
m_pSlopeAltitude = new PMVectorEdit( "x", "y", "z", m_pSlopeWidget );
hl->addWidget( m_pSlopeAltitude );
- hl = new QHBoxLayout( vl );
- gl = new QGridLayout( hl, 2, 2 );
- m_pSlopeLoAltLabel = new QLabel( i18n( "Low altitude:" ), m_pSlopeWidget );
+ hl = new TQHBoxLayout( vl );
+ gl = new TQGridLayout( hl, 2, 2 );
+ m_pSlopeLoAltLabel = new TQLabel( i18n( "Low altitude:" ), m_pSlopeWidget );
gl->addWidget( m_pSlopeLoAltLabel, 0, 0 );
m_pSlopeLoAlt = new PMFloatEdit( m_pSlopeWidget );
gl->addWidget( m_pSlopeLoAlt, 0, 1 );
- m_pSlopeHiAltLabel = new QLabel( i18n( "High altitude:" ), m_pSlopeWidget );
+ m_pSlopeHiAltLabel = new TQLabel( i18n( "High altitude:" ), m_pSlopeWidget );
gl->addWidget( m_pSlopeHiAltLabel, 1, 0 );
m_pSlopeHiAlt = new PMFloatEdit( m_pSlopeWidget );
gl->addWidget( m_pSlopeHiAlt, 1, 1 );
hl->addStretch( 1 );
layout->addMultiCellWidget( m_pSlopeWidget, 8, 8, 0, 1 );
- m_pSpiralNumberLabel = new QLabel( i18n( "Spiral number:" ), this );
+ m_pSpiralNumberLabel = new TQLabel( i18n( "Spiral number:" ), this );
m_pSpiralNumberEdit = new PMIntEdit( this );
layout->addWidget( m_pSpiralNumberLabel, 9, 0 );
layout->addWidget( m_pSpiralNumberEdit, 9, 1, AlignLeft );
- m_pDepthLabel = new QLabel( i18n( "Depth:" ), this );
+ m_pDepthLabel = new TQLabel( i18n( "Depth:" ), this );
m_pDepthEdit = new PMFloatEdit( this );
layout->addWidget( m_pDepthLabel, 10, 0 );
layout->addWidget( m_pDepthEdit, 10, 1, AlignLeft );
- m_pNoiseGeneratorLabel = new QLabel( i18n( "Noise generator:" ), this );
- m_pNoiseGenerator = new QComboBox( false, this );
+ m_pNoiseGeneratorLabel = new TQLabel( i18n( "Noise generator:" ), this );
+ m_pNoiseGenerator = new TQComboBox( false, this );
m_pNoiseGenerator->insertItem( i18n( "Use Global Setting" ) );
m_pNoiseGenerator->insertItem( i18n( "Original" ) );
m_pNoiseGenerator->insertItem( i18n( "Range Corrected" ) );
@@ -261,80 +261,80 @@ void PMPatternEdit::createTopWidgets( )
layout->addWidget( m_pNoiseGeneratorLabel, 11, 0 );
layout->addWidget( m_pNoiseGenerator, 11, 1 );
- m_pEnableTurbulenceEdit = new QCheckBox( i18n( "Turbulence" ), this );
+ m_pEnableTurbulenceEdit = new TQCheckBox( i18n( "Turbulence" ), this );
topLayout( )->addWidget( m_pEnableTurbulenceEdit );
- m_pTurbulenceWidget = new QWidget( this );
- vl = new QVBoxLayout( m_pTurbulenceWidget, 0, KDialog::spacingHint( ) );
- hl = new QHBoxLayout( vl );
- hl->addWidget( new QLabel( i18n( "Value:" ), m_pTurbulenceWidget ) );
+ m_pTurbulenceWidget = new TQWidget( this );
+ vl = new TQVBoxLayout( m_pTurbulenceWidget, 0, KDialog::spacingHint( ) );
+ hl = new TQHBoxLayout( vl );
+ hl->addWidget( new TQLabel( i18n( "Value:" ), m_pTurbulenceWidget ) );
m_pValueVectorEdit = new PMVectorEdit( "x", "y", "z", m_pTurbulenceWidget );
hl->addWidget( m_pValueVectorEdit );
- hl = new QHBoxLayout( vl );
- gl = new QGridLayout( hl, 3, 2 );
- gl->addWidget( new QLabel( i18n( "Octaves:" ), m_pTurbulenceWidget ), 0, 0 );
+ hl = new TQHBoxLayout( vl );
+ gl = new TQGridLayout( hl, 3, 2 );
+ gl->addWidget( new TQLabel( i18n( "Octaves:" ), m_pTurbulenceWidget ), 0, 0 );
m_pOctavesEdit = new PMIntEdit( m_pTurbulenceWidget );
gl->addWidget( m_pOctavesEdit, 0, 1 );
- gl->addWidget( new QLabel( i18n( "Omega:" ), m_pTurbulenceWidget ), 1, 0 );
+ gl->addWidget( new TQLabel( i18n( "Omega:" ), m_pTurbulenceWidget ), 1, 0 );
m_pOmegaEdit = new PMFloatEdit( m_pTurbulenceWidget );
gl->addWidget( m_pOmegaEdit, 1, 1 );
- gl->addWidget( new QLabel( i18n( "Lambda:" ), m_pTurbulenceWidget ), 2, 0 );
+ gl->addWidget( new TQLabel( i18n( "Lambda:" ), m_pTurbulenceWidget ), 2, 0 );
m_pLambdaEdit = new PMFloatEdit( m_pTurbulenceWidget );
gl->addWidget( m_pLambdaEdit, 2, 1 );
hl->addStretch( 1 );
topLayout( )->addWidget( m_pTurbulenceWidget );
/* connect all signals to slots/signals */
- connect( m_pTypeCombo, SIGNAL( activated( int ) ), SLOT( slotComboChanged( int ) ) );
+ connect( m_pTypeCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotComboChanged( int ) ) );
- connect( m_pAgateTurbulenceEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pAgateTurbulenceEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
- connect( m_pCrackleForm, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pCrackleMetric, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pCrackleOffset, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pCrackleSolid, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pCrackleForm, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pCrackleMetric, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pCrackleOffset, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pCrackleSolid, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
- connect( m_pDensityInterpolate, SIGNAL( activated( int ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pDensityFile, SIGNAL( textChanged( const QString& ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pDensityFileBrowse, SIGNAL( clicked( ) ), SLOT( slotDensityFileBrowseClicked( ) ) );
+ connect( m_pDensityInterpolate, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pDensityFile, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pDensityFileBrowse, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotDensityFileBrowseClicked( ) ) );
- connect( m_pGradientEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pGradientEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
- connect( m_pJuliaComplex, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pFractalMagnet, SIGNAL( clicked( ) ), SLOT( slotFractalMagnetClicked( ) ) );
- connect( m_pFractalMagnetType, SIGNAL( activated( int ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pMaxIterationsEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pFractalExponent, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pFractalExtType, SIGNAL( activated( int ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pFractalExtFactor, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pFractalIntType, SIGNAL( activated( int ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pFractalIntFactor, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pJuliaComplex, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pFractalMagnet, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotFractalMagnetClicked( ) ) );
+ connect( m_pFractalMagnetType, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pMaxIterationsEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pFractalExponent, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pFractalExtType, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pFractalExtFactor, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pFractalIntType, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pFractalIntFactor, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
- connect( m_pQuiltControl0Edit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pQuiltControl1Edit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pQuiltControl0Edit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pQuiltControl1Edit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
- connect( m_pSlopeDirection, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pSlopeLoSlope, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pSlopeHiSlope, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pSlopeAltFlag, SIGNAL( clicked( ) ), SLOT( slotSlopeAltFlagClicked( ) ) );
- connect( m_pSlopeAltitude, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pSlopeLoAlt, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pSlopeHiAlt, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pSlopeDirection, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pSlopeLoSlope, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pSlopeHiSlope, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pSlopeAltFlag, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotSlopeAltFlagClicked( ) ) );
+ connect( m_pSlopeAltitude, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pSlopeLoAlt, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pSlopeHiAlt, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
- connect( m_pSpiralNumberEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pSpiralNumberEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
- connect( m_pNoiseGenerator, SIGNAL( activated( int ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pNoiseGenerator, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( dataChanged( ) ) );
- connect( m_pEnableTurbulenceEdit, SIGNAL( clicked( ) ), SLOT( slotTurbulenceClicked( ) ) );
- connect( m_pValueVectorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pOctavesEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pOmegaEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pLambdaEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pDepthEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pEnableTurbulenceEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotTurbulenceClicked( ) ) );
+ connect( m_pValueVectorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pOctavesEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pOmegaEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pLambdaEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pDepthEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMPatternEdit::displayObject( PMObject* o )
{
- QString str;
+ TQString str;
bool readOnly;
if( o->isA( "Pattern" ) )
@@ -1008,7 +1008,7 @@ void PMPatternEdit::slotComboChanged( int c )
void PMPatternEdit::slotDensityFileBrowseClicked( )
{
- QString str = KFileDialog::getOpenFileName( QString::null, QString::null );
+ TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null );
if( !str.isEmpty() )
{
diff --git a/kpovmodeler/pmpatternedit.h b/kpovmodeler/pmpatternedit.h
index 9f36ccf4..6826e13b 100644
--- a/kpovmodeler/pmpatternedit.h
+++ b/kpovmodeler/pmpatternedit.h
@@ -30,14 +30,14 @@
class PMPattern;
class PMVectorEdit;
-class QComboBox;
+class TQComboBox;
class PMFloatEdit;
class PMIntEdit;
-class QLabel;
-class QCheckBox;
-class QWidget;
-class QLineEdit;
-class QPushButton;
+class TQLabel;
+class TQCheckBox;
+class TQWidget;
+class TQLineEdit;
+class TQPushButton;
/**
* Dialog edit class for @ref PMPattern.
@@ -50,7 +50,7 @@ public:
/**
* Creates a PMPatternEdit with parent and name
*/
- PMPatternEdit( QWidget* parent, const char* name = 0 );
+ PMPatternEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -96,67 +96,67 @@ private:
*/
bool m_noDepth;
PMPattern* m_pDisplayedObject;
- QComboBox* m_pTypeCombo;
+ TQComboBox* m_pTypeCombo;
- QLabel* m_pAgateTurbulenceLabel;
+ TQLabel* m_pAgateTurbulenceLabel;
PMFloatEdit* m_pAgateTurbulenceEdit;
- QWidget* m_pCrackleWidget;
+ TQWidget* m_pCrackleWidget;
PMVectorEdit* m_pCrackleForm;
PMIntEdit* m_pCrackleMetric;
PMFloatEdit* m_pCrackleOffset;
- QCheckBox* m_pCrackleSolid;
+ TQCheckBox* m_pCrackleSolid;
- QWidget* m_pDensityWidget;
- QComboBox* m_pDensityInterpolate;
- QLineEdit* m_pDensityFile;
- QPushButton* m_pDensityFileBrowse;
+ TQWidget* m_pDensityWidget;
+ TQComboBox* m_pDensityInterpolate;
+ TQLineEdit* m_pDensityFile;
+ TQPushButton* m_pDensityFileBrowse;
- QLabel* m_pGradientLabel;
+ TQLabel* m_pGradientLabel;
PMVectorEdit* m_pGradientEdit;
- QLabel* m_pJuliaComplexLabel;
+ TQLabel* m_pJuliaComplexLabel;
PMVectorEdit* m_pJuliaComplex;
- QWidget* m_pFractalWidget;
- QCheckBox* m_pFractalMagnet;
- QComboBox* m_pFractalMagnetType;
+ TQWidget* m_pFractalWidget;
+ TQCheckBox* m_pFractalMagnet;
+ TQComboBox* m_pFractalMagnetType;
PMIntEdit* m_pMaxIterationsEdit;
- QLabel* m_pFractalExponentLabel;
+ TQLabel* m_pFractalExponentLabel;
PMIntEdit* m_pFractalExponent;
- QComboBox* m_pFractalExtType;
+ TQComboBox* m_pFractalExtType;
PMFloatEdit* m_pFractalExtFactor;
- QComboBox* m_pFractalIntType;
+ TQComboBox* m_pFractalIntType;
PMFloatEdit* m_pFractalIntFactor;
- QLabel* m_pQuiltControlsLabel;
+ TQLabel* m_pQuiltControlsLabel;
PMFloatEdit* m_pQuiltControl0Edit;
PMFloatEdit* m_pQuiltControl1Edit;
- QWidget* m_pSlopeWidget;
+ TQWidget* m_pSlopeWidget;
PMVectorEdit* m_pSlopeDirection;
PMFloatEdit* m_pSlopeLoSlope;
PMFloatEdit* m_pSlopeHiSlope;
- QCheckBox* m_pSlopeAltFlag;
+ TQCheckBox* m_pSlopeAltFlag;
PMVectorEdit* m_pSlopeAltitude;
- QLabel* m_pSlopeLoAltLabel;
+ TQLabel* m_pSlopeLoAltLabel;
PMFloatEdit* m_pSlopeLoAlt;
- QLabel* m_pSlopeHiAltLabel;
+ TQLabel* m_pSlopeHiAltLabel;
PMFloatEdit* m_pSlopeHiAlt;
- QLabel* m_pSpiralNumberLabel;
+ TQLabel* m_pSpiralNumberLabel;
PMIntEdit* m_pSpiralNumberEdit;
- QLabel* m_pNoiseGeneratorLabel;
- QComboBox* m_pNoiseGenerator;
+ TQLabel* m_pNoiseGeneratorLabel;
+ TQComboBox* m_pNoiseGenerator;
- QCheckBox* m_pEnableTurbulenceEdit;
- QWidget* m_pTurbulenceWidget;
+ TQCheckBox* m_pEnableTurbulenceEdit;
+ TQWidget* m_pTurbulenceWidget;
PMVectorEdit* m_pValueVectorEdit;
PMIntEdit* m_pOctavesEdit;
PMFloatEdit* m_pOmegaEdit;
PMFloatEdit* m_pLambdaEdit;
- QLabel* m_pDepthLabel;
+ TQLabel* m_pDepthLabel;
PMFloatEdit* m_pDepthEdit;
};
diff --git a/kpovmodeler/pmphotons.cpp b/kpovmodeler/pmphotons.cpp
index 8297e3be..cce7665b 100644
--- a/kpovmodeler/pmphotons.cpp
+++ b/kpovmodeler/pmphotons.cpp
@@ -95,12 +95,12 @@ void PMPhotons::cleanUp( ) const
Base::cleanUp( );
}
-QString PMPhotons::description( ) const
+TQString PMPhotons::description( ) const
{
return i18n( "photons" );
}
-void PMPhotons::serialize( QDomElement& e, QDomDocument& ) const
+void PMPhotons::serialize( TQDomElement& e, TQDomDocument& ) const
{
e.setAttribute( "target", m_target );
e.setAttribute( "spacing_multi", m_spacingMulti );
@@ -192,7 +192,7 @@ void PMPhotons::setAreaLight( bool al )
}
}
-PMDialogEditBase* PMPhotons::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMPhotons::editWidget( TQWidget* parent ) const
{
return new PMPhotonsEdit( parent );
}
diff --git a/kpovmodeler/pmphotons.h b/kpovmodeler/pmphotons.h
index 14ce9f6f..a28041f5 100644
--- a/kpovmodeler/pmphotons.h
+++ b/kpovmodeler/pmphotons.h
@@ -50,7 +50,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMPhotons( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -58,19 +58,19 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMPhotonsEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmphotons" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmphotons" ); }
/**
* Returns the target flag
diff --git a/kpovmodeler/pmphotonsedit.cpp b/kpovmodeler/pmphotonsedit.cpp
index 21f5d106..a2fde9a2 100644
--- a/kpovmodeler/pmphotonsedit.cpp
+++ b/kpovmodeler/pmphotonsedit.cpp
@@ -20,15 +20,15 @@
#include "pmphotons.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <kdialog.h>
#include <kmessagebox.h>
-PMPhotonsEdit::PMPhotonsEdit( QWidget* parent, const char* name )
+PMPhotonsEdit::PMPhotonsEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -36,45 +36,45 @@ PMPhotonsEdit::PMPhotonsEdit( QWidget* parent, const char* name )
void PMPhotonsEdit::createTopWidgets( )
{
- QGridLayout* gl;
- QHBoxLayout* hl;
+ TQGridLayout* gl;
+ TQHBoxLayout* hl;
Base::createTopWidgets( );
- m_pLayoutWidget = new QWidget( this );
- m_pTarget = new QCheckBox( i18n( "Target" ), m_pLayoutWidget );
- m_pSpacingMultiLabel = new QLabel( i18n( "Spacing multiplier:" ), m_pLayoutWidget );
+ m_pLayoutWidget = new TQWidget( this );
+ m_pTarget = new TQCheckBox( i18n( "Target" ), m_pLayoutWidget );
+ m_pSpacingMultiLabel = new TQLabel( i18n( "Spacing multiplier:" ), m_pLayoutWidget );
m_pSpacingMulti = new PMFloatEdit( m_pLayoutWidget );
m_pSpacingMulti->setValidation( true, 0, false, 0 );
- m_pRefraction = new QCheckBox( i18n( "Refraction" ), this );
- m_pReflection = new QCheckBox( i18n( "Reflection" ), this );
- m_pCollect = new QCheckBox( i18n( "Collect" ), this );
- m_pPassThrough = new QCheckBox( i18n( "Pass through" ), this );
- m_pAreaLight = new QCheckBox( i18n( "Area light" ), this );
+ m_pRefraction = new TQCheckBox( i18n( "Refraction" ), this );
+ m_pReflection = new TQCheckBox( i18n( "Reflection" ), this );
+ m_pCollect = new TQCheckBox( i18n( "Collect" ), this );
+ m_pPassThrough = new TQCheckBox( i18n( "Pass through" ), this );
+ m_pAreaLight = new TQCheckBox( i18n( "Area light" ), this );
- hl = new QHBoxLayout( m_pLayoutWidget, 0, KDialog::spacingHint( ) );
- gl = new QGridLayout( hl, 2, 2 );
+ hl = new TQHBoxLayout( m_pLayoutWidget, 0, KDialog::spacingHint( ) );
+ gl = new TQGridLayout( hl, 2, 2 );
gl->addMultiCellWidget( m_pTarget, 0, 0, 0, 1 );
gl->addWidget( m_pSpacingMultiLabel, 1, 0 );
gl->addWidget( m_pSpacingMulti, 1, 1 );
hl->addStretch( 1 );
topLayout( )->addWidget( m_pLayoutWidget );
- gl = new QGridLayout( topLayout( ), 2, 2 );
+ gl = new TQGridLayout( topLayout( ), 2, 2 );
gl->addWidget( m_pRefraction, 0, 0 );
gl->addWidget( m_pReflection, 0, 1 );
gl->addWidget( m_pCollect, 1, 0 );
gl->addWidget( m_pPassThrough, 1, 1 );
gl->addWidget( m_pAreaLight, 1, 0 );
- connect( m_pTarget, SIGNAL( clicked( ) ), SLOT( slotTargetClicked( ) ) );
- connect( m_pSpacingMulti, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pRefraction, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pReflection, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pCollect, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pPassThrough, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pAreaLight, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pTarget, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotTargetClicked( ) ) );
+ connect( m_pSpacingMulti, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pRefraction, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pReflection, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pCollect, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pPassThrough, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pAreaLight, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMPhotonsEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmphotonsedit.h b/kpovmodeler/pmphotonsedit.h
index d40e84cf..a4d3e414 100644
--- a/kpovmodeler/pmphotonsedit.h
+++ b/kpovmodeler/pmphotonsedit.h
@@ -28,8 +28,8 @@
class PMPhotons;
class PMFloatEdit;
-class QCheckBox;
-class QLabel;
+class TQCheckBox;
+class TQLabel;
/**
* Dialog edit class for @ref PMPhotons.
@@ -42,7 +42,7 @@ public:
/**
* Creates a PMPhotonsEdit with parent and name
*/
- PMPhotonsEdit( QWidget* parent, const char* name = 0 );
+ PMPhotonsEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -64,15 +64,15 @@ protected slots:
private:
PMPhotons* m_pDisplayedObject;
- QWidget* m_pLayoutWidget;
- QCheckBox* m_pTarget;
+ TQWidget* m_pLayoutWidget;
+ TQCheckBox* m_pTarget;
PMFloatEdit* m_pSpacingMulti;
- QLabel* m_pSpacingMultiLabel;
- QCheckBox* m_pRefraction;
- QCheckBox* m_pReflection;
- QCheckBox* m_pCollect;
- QCheckBox* m_pPassThrough;
- QCheckBox* m_pAreaLight;
+ TQLabel* m_pSpacingMultiLabel;
+ TQCheckBox* m_pRefraction;
+ TQCheckBox* m_pReflection;
+ TQCheckBox* m_pCollect;
+ TQCheckBox* m_pPassThrough;
+ TQCheckBox* m_pAreaLight;
};
diff --git a/kpovmodeler/pmpigment.cpp b/kpovmodeler/pmpigment.cpp
index 39e5a4e3..be37cfb1 100644
--- a/kpovmodeler/pmpigment.cpp
+++ b/kpovmodeler/pmpigment.cpp
@@ -67,17 +67,17 @@ void PMPigment::cleanUp( ) const
Base::cleanUp( );
}
-QString PMPigment::description( ) const
+TQString PMPigment::description( ) const
{
return i18n( "pigment" );
}
-PMDialogEditBase* PMPigment::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMPigment::editWidget( TQWidget* parent ) const
{
return new PMPigmentEdit( parent );
}
-void PMPigment::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMPigment::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "uv_mapping", m_uvMapping );
Base::serialize( e, doc );
diff --git a/kpovmodeler/pmpigment.h b/kpovmodeler/pmpigment.h
index 3f465e0e..b520ad27 100644
--- a/kpovmodeler/pmpigment.h
+++ b/kpovmodeler/pmpigment.h
@@ -49,7 +49,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMPigment( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -57,16 +57,16 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMPigmentEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmpigment" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmpigment" ); }
/**
* Returns the uv mapping flag
diff --git a/kpovmodeler/pmpigmentedit.cpp b/kpovmodeler/pmpigmentedit.cpp
index 939f18cf..16bfab2c 100644
--- a/kpovmodeler/pmpigmentedit.cpp
+++ b/kpovmodeler/pmpigmentedit.cpp
@@ -20,12 +20,12 @@
#include "pmpigment.h"
#include "pmlinkedit.h"
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include <klocale.h>
-PMPigmentEdit::PMPigmentEdit( QWidget* parent, const char* name )
+PMPigmentEdit::PMPigmentEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -34,10 +34,10 @@ PMPigmentEdit::PMPigmentEdit( QWidget* parent, const char* name )
void PMPigmentEdit::createTopWidgets()
{
Base::createTopWidgets();
- m_pUVMapping = new QCheckBox( i18n( "UV mapping" ), this );
+ m_pUVMapping = new TQCheckBox( i18n( "UV mapping" ), this );
topLayout( )->addWidget( m_pUVMapping );
- connect( m_pUVMapping, SIGNAL( clicked() ), SIGNAL( dataChanged() ) );
+ connect( m_pUVMapping, TQT_SIGNAL( clicked() ), TQT_SIGNAL( dataChanged() ) );
}
void PMPigmentEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmpigmentedit.h b/kpovmodeler/pmpigmentedit.h
index 7a3960a2..89bb2fb0 100644
--- a/kpovmodeler/pmpigmentedit.h
+++ b/kpovmodeler/pmpigmentedit.h
@@ -27,7 +27,7 @@
#include "pmtexturebaseedit.h"
class PMPigment;
-class QCheckBox;
+class TQCheckBox;
/**
* Dialog edit class for @ref PMPigment
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMPigmentEdit with parent and name
*/
- PMPigmentEdit( QWidget* parent, const char* name = 0 );
+ PMPigmentEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -53,7 +53,7 @@ protected:
private:
PMPigment* m_pDisplayedObject;
- QCheckBox* m_pUVMapping;
+ TQCheckBox* m_pUVMapping;
};
diff --git a/kpovmodeler/pmplane.cpp b/kpovmodeler/pmplane.cpp
index 171df53f..db7af35a 100644
--- a/kpovmodeler/pmplane.cpp
+++ b/kpovmodeler/pmplane.cpp
@@ -63,12 +63,12 @@ PMPlane::~PMPlane( )
{
}
-QString PMPlane::description( ) const
+TQString PMPlane::description( ) const
{
return i18n( "plane" );
}
-void PMPlane::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMPlane::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "normal", m_normal.serializeXML( ) );
e.setAttribute( "distance", m_distance );
@@ -126,7 +126,7 @@ void PMPlane::setDistance( double distance )
}
}
-PMDialogEditBase* PMPlane::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMPlane::editWidget( TQWidget* parent ) const
{
return new PMPlaneEdit( parent );
}
diff --git a/kpovmodeler/pmplane.h b/kpovmodeler/pmplane.h
index 34829ade..d5321dd8 100644
--- a/kpovmodeler/pmplane.h
+++ b/kpovmodeler/pmplane.h
@@ -54,23 +54,23 @@ public:
virtual PMObject* copy( ) const { return new PMPlane( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMPlaneEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmplane" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmplane" ); }
/**
* Return the normal
diff --git a/kpovmodeler/pmplaneedit.cpp b/kpovmodeler/pmplaneedit.cpp
index 62e7e08e..13e28aab 100644
--- a/kpovmodeler/pmplaneedit.cpp
+++ b/kpovmodeler/pmplaneedit.cpp
@@ -21,14 +21,14 @@
#include "pmvectoredit.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <kmessagebox.h>
-PMPlaneEdit::PMPlaneEdit( QWidget* parent, const char* name )
+PMPlaneEdit::PMPlaneEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -38,28 +38,28 @@ void PMPlaneEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* layout;
+ TQHBoxLayout* layout;
m_pNormal = new PMVectorEdit( "x", "y", "z", this );
m_pDistance = new PMFloatEdit( this );
- layout = new QHBoxLayout( topLayout( ) );
- layout->addWidget( new QLabel( i18n( "Normal:" ), this ) );
+ layout = new TQHBoxLayout( topLayout( ) );
+ layout->addWidget( new TQLabel( i18n( "Normal:" ), this ) );
layout->addWidget( m_pNormal );
- layout = new QHBoxLayout( topLayout( ) );
- layout->addWidget( new QLabel( i18n( "Distance:" ), this ) );
+ layout = new TQHBoxLayout( topLayout( ) );
+ layout->addWidget( new TQLabel( i18n( "Distance:" ), this ) );
layout->addWidget( m_pDistance );
layout->addStretch( 1 );
- QPushButton* nb = new QPushButton( i18n( "Normalize" ), this );
- layout = new QHBoxLayout( topLayout( ) );
+ TQPushButton* nb = new TQPushButton( i18n( "Normalize" ), this );
+ layout = new TQHBoxLayout( topLayout( ) );
layout->addWidget( nb );
layout->addStretch( 1 );
- connect( m_pNormal, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pDistance, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( nb, SIGNAL( clicked( ) ), SLOT( slotNormalize( ) ) );
+ connect( m_pNormal, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pDistance, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( nb, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotNormalize( ) ) );
}
void PMPlaneEdit::slotNormalize( )
diff --git a/kpovmodeler/pmplaneedit.h b/kpovmodeler/pmplaneedit.h
index 97a07467..80e72e47 100644
--- a/kpovmodeler/pmplaneedit.h
+++ b/kpovmodeler/pmplaneedit.h
@@ -29,7 +29,7 @@
class PMVectorEdit;
class PMFloatEdit;
class PMPlane;
-class QCheckBox;
+class TQCheckBox;
class PMPlaneEdit : public PMSolidObjectEdit
{
@@ -39,7 +39,7 @@ public:
/**
* Creates a PMPlaneEdit with parent and name
*/
- PMPlaneEdit( QWidget* parent, const char* name = 0 );
+ PMPlaneEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmplanenormalcontrolpoint.cpp b/kpovmodeler/pmplanenormalcontrolpoint.cpp
index f28c035e..bfafb697 100644
--- a/kpovmodeler/pmplanenormalcontrolpoint.cpp
+++ b/kpovmodeler/pmplanenormalcontrolpoint.cpp
@@ -22,7 +22,7 @@
PMPlaneNormalControlPoint::PMPlaneNormalControlPoint( PMDistanceControlPoint* d,
const PMVector& normal, int id,
- const QString& description )
+ const TQString& description )
: PMControlPoint( id, description )
{
m_normal = normal;
diff --git a/kpovmodeler/pmplanenormalcontrolpoint.h b/kpovmodeler/pmplanenormalcontrolpoint.h
index 0faf10b8..ccff2000 100644
--- a/kpovmodeler/pmplanenormalcontrolpoint.h
+++ b/kpovmodeler/pmplanenormalcontrolpoint.h
@@ -40,7 +40,7 @@ public:
* is changed, too!
*/
PMPlaneNormalControlPoint( PMDistanceControlPoint* d, const PMVector& normal,
- int id, const QString& description );
+ int id, const TQString& description );
/**
* Deletes the PMPlaneNormalControlPoint
*/
diff --git a/kpovmodeler/pmpluginmanager.cpp b/kpovmodeler/pmpluginmanager.cpp
index 0921f79d..7af50d5c 100644
--- a/kpovmodeler/pmpluginmanager.cpp
+++ b/kpovmodeler/pmpluginmanager.cpp
@@ -21,8 +21,8 @@
#include "pmfactory.h"
#include "pmdebug.h"
-#include <qmap.h>
-#include <qapplication.h>
+#include <tqmap.h>
+#include <tqapplication.h>
#include <kparts/plugin.h>
#include <kxmlguifactory.h>
@@ -38,7 +38,7 @@ class PMPluginWorkaround : public Plugin
{
public:
PMPluginWorkaround( ) : Plugin( 0, 0 ) { };
- static QValueList<Plugin::PluginInfo> installedPlugins( const KInstance* instance )
+ static TQValueList<Plugin::PluginInfo> installedPlugins( const KInstance* instance )
{
return pluginInfos( instance );
}
@@ -49,16 +49,16 @@ PMPluginManager::PMPluginManager( )
// find installed plugins
KConfigGroup cfgGroup( PMFactory::instance( )->config( ),
"KParts Plugins" );
- QValueList<Plugin::PluginInfo> plugins
+ TQValueList<Plugin::PluginInfo> plugins
= PMPluginWorkaround::installedPlugins( PMFactory::instance( ) );
- QValueList<Plugin::PluginInfo>::ConstIterator pIt = plugins.begin( );
- QValueList<Plugin::PluginInfo>::ConstIterator pEnd = plugins.end( );
+ TQValueList<Plugin::PluginInfo>::ConstIterator pIt = plugins.begin( );
+ TQValueList<Plugin::PluginInfo>::ConstIterator pEnd = plugins.end( );
for( ; pIt != pEnd; ++pIt )
{
- QDomElement docElem = ( *pIt ).m_document.documentElement( );
- QString name = docElem.attribute( "name" );
- QString description = docElem.attribute( "description" );
+ TQDomElement docElem = ( *pIt ).m_document.documentElement( );
+ TQString name = docElem.attribute( "name" );
+ TQString description = docElem.attribute( "description" );
if( !description.isEmpty( ) )
description = i18n( description.latin1( ) );
bool enabled = cfgGroup.readBoolEntry( name + "Enabled", false );
@@ -97,13 +97,13 @@ void PMPluginManager::updatePlugins( )
{
KConfigGroup cfgGroup( PMFactory::instance( )->config( ),
"KParts Plugins" );
- QPtrListIterator<PMPluginInfo> pit( m_plugins );
+ TQPtrListIterator<PMPluginInfo> pit( m_plugins );
for( ; *pit; ++pit )
cfgGroup.writeEntry( ( *pit )->name( ) + "Enabled",
( *pit )->enabled( ) );
cfgGroup.sync( );
- QPtrListIterator<PMPart> it( m_parts );
+ TQPtrListIterator<PMPart> it( m_parts );
for( ; *it; ++it )
{
Plugin::loadPlugins( *it, *it, PMFactory::instance( ), false );
diff --git a/kpovmodeler/pmpluginmanager.h b/kpovmodeler/pmpluginmanager.h
index 9424e014..364658a0 100644
--- a/kpovmodeler/pmpluginmanager.h
+++ b/kpovmodeler/pmpluginmanager.h
@@ -20,8 +20,8 @@
#include <kstaticdeleter.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
class PMPart;
@@ -34,7 +34,7 @@ public:
/**
* Default constructor
*/
- PMPluginInfo( const QString& name, const QString& description,
+ PMPluginInfo( const TQString& name, const TQString& description,
bool enabled )
{
m_name = name;
@@ -44,11 +44,11 @@ public:
/**
* Returns the plugin name
*/
- QString name( ) const { return m_name; }
+ TQString name( ) const { return m_name; }
/**
* Returns the plugin description (i18n'ed)
*/
- QString description( ) const { return m_description; }
+ TQString description( ) const { return m_description; }
/**
* Returns true if the plugin is enabled
*/
@@ -58,7 +58,7 @@ public:
*/
void enable( bool en ) { m_enabled = en; }
private:
- QString m_name, m_description;
+ TQString m_name, m_description;
bool m_enabled;
};
@@ -91,7 +91,7 @@ public:
/**
* Returns a list of available plugins
*/
- QPtrList<PMPluginInfo> plugins( ) const { return m_plugins; }
+ TQPtrList<PMPluginInfo> plugins( ) const { return m_plugins; }
/**
* Loads and unloads plugins for all parts when plugins were activated or
* deactivated
@@ -103,8 +103,8 @@ private:
*/
PMPluginManager( );
- QPtrList<PMPluginInfo> m_plugins;
- QPtrList<PMPart> m_parts;
+ TQPtrList<PMPluginInfo> m_plugins;
+ TQPtrList<PMPart> m_parts;
static PMPluginManager* s_pInstance;
static KStaticDeleter<PMPluginManager> s_staticDeleter;
diff --git a/kpovmodeler/pmpluginsettings.cpp b/kpovmodeler/pmpluginsettings.cpp
index 6b6611f2..0a635845 100644
--- a/kpovmodeler/pmpluginsettings.cpp
+++ b/kpovmodeler/pmpluginsettings.cpp
@@ -19,17 +19,17 @@
#include "pmpluginmanager.h"
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
#include <klocale.h>
class PMPluginListViewItem : public QListViewItem
{
public:
- PMPluginListViewItem( QListView* parent, PMPluginInfo* info )
- : QListViewItem( parent, info->name( ), info->description( ) )
+ PMPluginListViewItem( TQListView* parent, PMPluginInfo* info )
+ : TQListViewItem( parent, info->name( ), info->description( ) )
{
m_info = info;
m_enabled = info->enabled( );
@@ -51,29 +51,29 @@ public:
bool m_enabled;
};
-PMPluginSettings::PMPluginSettings( QWidget* parent, const char* name )
+PMPluginSettings::PMPluginSettings( TQWidget* parent, const char* name )
: PMSettingsDialogPage( parent, name )
{
- QVBoxLayout* vlayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) );
+ TQVBoxLayout* vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) );
- QGroupBox* gb = new QGroupBox( i18n( "Installed Plugins" ), this );
+ TQGroupBox* gb = new TQGroupBox( i18n( "Installed Plugins" ), this );
vlayout->addWidget( gb );
- QVBoxLayout* gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
+ TQVBoxLayout* gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
gvl->addSpacing( 10 );
- m_pPluginsList = new QListView( gb );
- connect( m_pPluginsList, SIGNAL( selectionChanged( ) ),
- SLOT( slotSelectionChanged( ) ) );
+ m_pPluginsList = new TQListView( gb );
+ connect( m_pPluginsList, TQT_SIGNAL( selectionChanged( ) ),
+ TQT_SLOT( slotSelectionChanged( ) ) );
m_pPluginsList->addColumn( i18n( "Name" ) );
m_pPluginsList->addColumn( i18n( "Description" ) );
m_pPluginsList->addColumn( i18n( "Status" ) );
gvl->addWidget( m_pPluginsList, 1 );
- QHBoxLayout* hl = new QHBoxLayout( gvl );
- m_pToggle = new QPushButton( i18n( "Load" ), gb );
+ TQHBoxLayout* hl = new TQHBoxLayout( gvl );
+ m_pToggle = new TQPushButton( i18n( "Load" ), gb );
m_pToggle->setEnabled( false );
- connect( m_pToggle, SIGNAL( clicked( ) ), SLOT( slotToggle( ) ) );
+ connect( m_pToggle, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotToggle( ) ) );
hl->addWidget( m_pToggle );
hl->addStretch( 1 );
@@ -82,8 +82,8 @@ PMPluginSettings::PMPluginSettings( QWidget* parent, const char* name )
void PMPluginSettings::displaySettings( )
{
- QPtrList<PMPluginInfo> plugins = PMPluginManager::theManager( )->plugins( );
- QPtrListIterator<PMPluginInfo> it( plugins );
+ TQPtrList<PMPluginInfo> plugins = PMPluginManager::theManager( )->plugins( );
+ TQPtrListIterator<PMPluginInfo> it( plugins );
m_pPluginsList->clear( );
for( ; *it; ++it )
diff --git a/kpovmodeler/pmpluginsettings.h b/kpovmodeler/pmpluginsettings.h
index 1ee9191a..186ca074 100644
--- a/kpovmodeler/pmpluginsettings.h
+++ b/kpovmodeler/pmpluginsettings.h
@@ -24,9 +24,9 @@
#include "pmsettingsdialog.h"
-class QFrame;
-class QListView;
-class QPushButton;
+class TQFrame;
+class TQListView;
+class TQPushButton;
/**
* Plugins configuration dialog page
@@ -38,7 +38,7 @@ public:
/**
* Default constructor
*/
- PMPluginSettings( QWidget* parent, const char* name = 0 );
+ PMPluginSettings( TQWidget* parent, const char* name = 0 );
/** */
virtual void displaySettings( );
/** */
@@ -53,9 +53,9 @@ protected slots:
void slotSelectionChanged( );
private:
- QFrame* m_pPluginOptions;
- QListView* m_pPluginsList;
- QPushButton* m_pToggle;
+ TQFrame* m_pPluginOptions;
+ TQListView* m_pPluginsList;
+ TQPushButton* m_pToggle;
};
diff --git a/kpovmodeler/pmpoint.h b/kpovmodeler/pmpoint.h
index 729d60c0..553358ab 100644
--- a/kpovmodeler/pmpoint.h
+++ b/kpovmodeler/pmpoint.h
@@ -21,7 +21,7 @@
#define PMPOINT_H
#include "GL/gl.h"
-#include <qmemarray.h>
+#include <tqmemarray.h>
class PMVector;
class PMMatrix;
@@ -114,9 +114,9 @@ private:
};
/**
- * @ref QMemArray of PMPoints
+ * @ref TQMemArray of PMPoints
*/
-typedef QMemArray<PMPoint> PMPointArray;
+typedef TQMemArray<PMPoint> PMPointArray;
#endif
diff --git a/kpovmodeler/pmpolynom.cpp b/kpovmodeler/pmpolynom.cpp
index 93555a58..e44044c5 100644
--- a/kpovmodeler/pmpolynom.cpp
+++ b/kpovmodeler/pmpolynom.cpp
@@ -103,7 +103,7 @@ PMPolynom::~PMPolynom( )
{
}
-QString PMPolynom::description( ) const
+TQString PMPolynom::description( ) const
{
if( m_order == 2 )
return i18n( "quadric" );
@@ -114,7 +114,7 @@ QString PMPolynom::description( ) const
return i18n( "polynom" );
}
-void PMPolynom::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMPolynom::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "order", m_order );
e.setAttribute( "coefficients", m_coefficients.serializeXML( ) );
@@ -158,7 +158,7 @@ void PMPolynom::cleanUp( ) const
Base::cleanUp( );
}
-PMDialogEditBase* PMPolynom::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMPolynom::editWidget( TQWidget* parent ) const
{
return new PMPolynomEdit( parent );
}
diff --git a/kpovmodeler/pmpolynom.h b/kpovmodeler/pmpolynom.h
index dc59be67..65a9ad20 100644
--- a/kpovmodeler/pmpolynom.h
+++ b/kpovmodeler/pmpolynom.h
@@ -51,7 +51,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMPolynom( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -59,15 +59,15 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/** */
- virtual QString pixmap( ) const { return QString( "pmpolynom" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmpolynom" ); }
/**
* Returns a new @ref PMPolynomEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
virtual void restoreMemento( PMMemento* s );
diff --git a/kpovmodeler/pmpolynomedit.cpp b/kpovmodeler/pmpolynomedit.cpp
index b236a8c6..e0e3bebc 100644
--- a/kpovmodeler/pmpolynomedit.cpp
+++ b/kpovmodeler/pmpolynomedit.cpp
@@ -22,14 +22,14 @@
#include "pmlineedits.h"
#include "pmformulalabel.h"
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kdialog.h>
-PMPolynomEdit::PMPolynomEdit( QWidget* parent, const char* name )
+PMPolynomEdit::PMPolynomEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -41,19 +41,19 @@ void PMPolynomEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Order" ), this ) );
- m_pOrder = new QSpinBox( 2, 7, 1, this );
+ TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Order" ), this ) );
+ m_pOrder = new TQSpinBox( 2, 7, 1, this );
hl->addWidget( m_pOrder );
hl->addStretch( 1 );
- connect( m_pOrder, SIGNAL( valueChanged( int ) ), SLOT( slotOrderChanged( int ) ) );
+ connect( m_pOrder, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotOrderChanged( int ) ) );
- topLayout( )->addWidget( new QLabel( i18n( "Formula:" ), this ) );
- m_pPolyWidget = new QWidget( this );
+ topLayout( )->addWidget( new TQLabel( i18n( "Formula:" ), this ) );
+ m_pPolyWidget = new TQWidget( this );
topLayout( )->addWidget( m_pPolyWidget );
- m_pSturm = new QCheckBox( i18n( "Sturm" ), this );
+ m_pSturm = new TQCheckBox( i18n( "Sturm" ), this );
topLayout( )->addWidget( m_pSturm );
- connect( m_pSturm, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pSturm, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMPolynomEdit::displayObject( PMObject* o )
@@ -89,7 +89,7 @@ void PMPolynomEdit::displayObject( PMObject* o )
void PMPolynomEdit::displayCoefficients( const PMVector& co, int cOrder,
int dOrder )
{
- QValueList<PMPolynomExponents>& polynom
+ TQValueList<PMPolynomExponents>& polynom
= PMPolynomExponents::polynom( dOrder );
if( dOrder != m_currentOrder )
@@ -111,15 +111,15 @@ void PMPolynomEdit::displayCoefficients( const PMVector& co, int cOrder,
int nr = ( nedit + 2 ) / 3;
int i;
- QGridLayout* gl = new QGridLayout( m_pPolyWidget, nr * 2 - 1, 9, 0 );
- QLabel* l = 0;
+ TQGridLayout* gl = new TQGridLayout( m_pPolyWidget, nr * 2 - 1, 9, 0 );
+ TQLabel* l = 0;
PMFloatEdit* edit;
PMFormulaLabel* fl;
- QValueList<PMPolynomExponents>::ConstIterator it = polynom.begin( );
- QString text;
+ TQValueList<PMPolynomExponents>::ConstIterator it = polynom.begin( );
+ TQString text;
int row, col;
- QString plus( "+" );
+ TQString plus( "+" );
for( i = 0; it != polynom.end( ); i++, ++it )
{
@@ -128,14 +128,14 @@ void PMPolynomEdit::displayCoefficients( const PMVector& co, int cOrder,
if( i != 0 )
{
- l = new QLabel( plus, m_pPolyWidget );
+ l = new TQLabel( plus, m_pPolyWidget );
m_labels.append( l );
gl->addWidget( l, row, col );
l->show( );
}
edit = new PMFloatEdit( m_pPolyWidget );
- connect( edit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( edit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
m_edits.append( edit );
gl->addWidget( edit, row, col + 1 );
edit->show( );
@@ -157,18 +157,18 @@ void PMPolynomEdit::displayCoefficients( const PMVector& co, int cOrder,
if( dOrder == cOrder )
{
- QPtrListIterator<PMFloatEdit> eit( m_edits );
+ TQPtrListIterator<PMFloatEdit> eit( m_edits );
int i;
for( i = 0; *eit; ++eit, ++i )
( *eit )->setValue( co[i] );
}
else if( dOrder > cOrder )
{
- QValueList<PMPolynomExponents>::ConstIterator dit = polynom.begin( );
- QValueList<PMPolynomExponents>& cpoly
+ TQValueList<PMPolynomExponents>::ConstIterator dit = polynom.begin( );
+ TQValueList<PMPolynomExponents>& cpoly
= PMPolynomExponents::polynom( cOrder );
- QValueList<PMPolynomExponents>::ConstIterator cit = cpoly.begin( );
- QPtrListIterator<PMFloatEdit> eit( m_edits );
+ TQValueList<PMPolynomExponents>::ConstIterator cit = cpoly.begin( );
+ TQPtrListIterator<PMFloatEdit> eit( m_edits );
int i = 0;
for( ; ( dit != polynom.end( ) ) && ( cit != cpoly.end( ) ); ++dit, ++eit )
@@ -187,11 +187,11 @@ void PMPolynomEdit::displayCoefficients( const PMVector& co, int cOrder,
}
else // dOrder < cOrder
{
- QValueList<PMPolynomExponents>::ConstIterator dit = polynom.begin( );
- QValueList<PMPolynomExponents>& cpoly
+ TQValueList<PMPolynomExponents>::ConstIterator dit = polynom.begin( );
+ TQValueList<PMPolynomExponents>& cpoly
= PMPolynomExponents::polynom( cOrder );
- QValueList<PMPolynomExponents>::ConstIterator cit = cpoly.begin( );
- QPtrListIterator<PMFloatEdit> eit( m_edits );
+ TQValueList<PMPolynomExponents>::ConstIterator cit = cpoly.begin( );
+ TQPtrListIterator<PMFloatEdit> eit( m_edits );
int i = 0;
for( ; ( dit != polynom.end( ) ) && ( cit != cpoly.end( ) ); ++cit, ++i )
@@ -210,7 +210,7 @@ void PMPolynomEdit::displayCoefficients( const PMVector& co, int cOrder,
PMVector PMPolynomEdit::coefficients( ) const
{
- QPtrListIterator<PMFloatEdit> eit( m_edits );
+ TQPtrListIterator<PMFloatEdit> eit( m_edits );
int num = m_edits.count( );
PMVector v( num );
int i;
@@ -235,7 +235,7 @@ void PMPolynomEdit::saveContents( )
bool PMPolynomEdit::isDataValid( )
{
- QPtrListIterator<PMFloatEdit> eit( m_edits );
+ TQPtrListIterator<PMFloatEdit> eit( m_edits );
for( ; *eit; ++eit )
if( !( *eit )->isDataValid( ) )
return false;
diff --git a/kpovmodeler/pmpolynomedit.h b/kpovmodeler/pmpolynomedit.h
index 6ffb05b4..1d745437 100644
--- a/kpovmodeler/pmpolynomedit.h
+++ b/kpovmodeler/pmpolynomedit.h
@@ -25,13 +25,13 @@
#endif
#include "pmsolidobjectedit.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
class PMPolynom;
class PMFloatEdit;
class PMFormulaLabel;
-class QSpinBox;
-class QCheckBox;
+class TQSpinBox;
+class TQCheckBox;
/**
* Dialog edit class for @ref PMPolynom
@@ -44,7 +44,7 @@ public:
/**
* Creates a PMPolynomEdit with parent and name
*/
- PMPolynomEdit( QWidget* parent, const char* name = 0 );
+ PMPolynomEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -68,11 +68,11 @@ private:
int m_currentOrder;
- QWidget* m_pPolyWidget;
- QPtrList<QWidget> m_labels;
- QPtrList<PMFloatEdit> m_edits;
- QCheckBox* m_pSturm;
- QSpinBox* m_pOrder;
+ TQWidget* m_pPolyWidget;
+ TQPtrList<TQWidget> m_labels;
+ TQPtrList<PMFloatEdit> m_edits;
+ TQCheckBox* m_pSturm;
+ TQSpinBox* m_pOrder;
bool m_readOnly;
};
diff --git a/kpovmodeler/pmpolynomexponents.cpp b/kpovmodeler/pmpolynomexponents.cpp
index fdda7bdf..a8d82b19 100644
--- a/kpovmodeler/pmpolynomexponents.cpp
+++ b/kpovmodeler/pmpolynomexponents.cpp
@@ -20,7 +20,7 @@
bool PMPolynomExponents::m_created[6] = { false, false, false,
false, false, false };
-QValueList<PMPolynomExponents> PMPolynomExponents::m_lists[6];
+TQValueList<PMPolynomExponents> PMPolynomExponents::m_lists[6];
PMPolynomExponents operator+ ( const PMPolynomExponents& p1,
const PMPolynomExponents& p2 )
@@ -30,7 +30,7 @@ PMPolynomExponents operator+ ( const PMPolynomExponents& p1,
p1.m_exponents[2] + p2.m_exponents[2] );
}
-QValueList<PMPolynomExponents>& PMPolynomExponents::polynom( int n )
+TQValueList<PMPolynomExponents>& PMPolynomExponents::polynom( int n )
{
if( ( n < 2 ) || ( n > 7 ) )
{
@@ -48,11 +48,11 @@ QValueList<PMPolynomExponents>& PMPolynomExponents::polynom( int n )
return m_lists[n-2];
}
-QValueList<PMPolynomExponents>
+TQValueList<PMPolynomExponents>
PMPolynomExponents::recPolynom( const PMPolynomExponents& base,
int xyz, int n, int rem )
{
- QValueList<PMPolynomExponents> res;
+ TQValueList<PMPolynomExponents> res;
if( n >= 0 )
{
diff --git a/kpovmodeler/pmpolynomexponents.h b/kpovmodeler/pmpolynomexponents.h
index 6f1812ba..cd2b39b6 100644
--- a/kpovmodeler/pmpolynomexponents.h
+++ b/kpovmodeler/pmpolynomexponents.h
@@ -24,8 +24,8 @@
#include <config.h>
#endif
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
/**
* Helper class for the @ref PMPolynomBaseEdit widget
@@ -117,13 +117,13 @@ public:
/**
* Returns the exponents for a polynom with order n ( 2 <= n <= 7 )
*/
- static QValueList<PMPolynomExponents>& polynom( int n );
+ static TQValueList<PMPolynomExponents>& polynom( int n );
private:
- static QValueList<PMPolynomExponents> //...
+ static TQValueList<PMPolynomExponents> //...
recPolynom( const PMPolynomExponents& base, int xyz, int n, int rem );
static bool m_created[6];
- static QValueList<PMPolynomExponents> m_lists[6];
+ static TQValueList<PMPolynomExponents> m_lists[6];
};
#endif
diff --git a/kpovmodeler/pmpovray31format.cpp b/kpovmodeler/pmpovray31format.cpp
index 417dd177..dc2bb54e 100644
--- a/kpovmodeler/pmpovray31format.cpp
+++ b/kpovmodeler/pmpovray31format.cpp
@@ -109,17 +109,17 @@ PMPovray31Format::~PMPovray31Format( )
}
-PMParser* PMPovray31Format::newParser( PMPart* part, QIODevice* dev ) const
+PMParser* PMPovray31Format::newParser( PMPart* part, TQIODevice* dev ) const
{
return new PMPovrayParser( part, dev );
}
-PMParser* PMPovray31Format::newParser( PMPart* part, const QByteArray& data ) const
+PMParser* PMPovray31Format::newParser( PMPart* part, const TQByteArray& data ) const
{
return new PMPovrayParser( part, data );
}
-PMSerializer* PMPovray31Format::newSerializer( QIODevice* dev )
+PMSerializer* PMPovray31Format::newSerializer( TQIODevice* dev )
{
return new PMOutputDevice( dev, this );
}
@@ -130,24 +130,24 @@ PMRenderer* PMPovray31Format::newRenderer( PMPart* ) const
return 0;
}
-QString PMPovray31Format::mimeType( ) const
+TQString PMPovray31Format::mimeType( ) const
{
- return QString( "text/plain" );
+ return TQString( "text/plain" );
}
-QStringList PMPovray31Format::importPatterns( ) const
+TQStringList PMPovray31Format::importPatterns( ) const
{
- QStringList result;
- result.push_back( QString( "*.pov *.inc|" )
+ TQStringList result;
+ result.push_back( TQString( "*.pov *.inc|" )
+ i18n( "POV-Ray 3.1 Files (*.pov, *.inc)" ) );
return result;
}
-QStringList PMPovray31Format::exportPatterns( ) const
+TQStringList PMPovray31Format::exportPatterns( ) const
{
- QStringList result;
- result.push_back( QString( "*.pov|" ) + i18n( "POV-Ray 3.1 Files (*.pov)" ) );
- result.push_back( QString( "*.ini|" ) + i18n( "POV-Ray 3.1 Include Files (*.ini)" ) );
+ TQStringList result;
+ result.push_back( TQString( "*.pov|" ) + i18n( "POV-Ray 3.1 Files (*.pov)" ) );
+ result.push_back( TQString( "*.ini|" ) + i18n( "POV-Ray 3.1 Include Files (*.ini)" ) );
return result;
}
diff --git a/kpovmodeler/pmpovray31format.h b/kpovmodeler/pmpovray31format.h
index a0e3453e..4765093d 100644
--- a/kpovmodeler/pmpovray31format.h
+++ b/kpovmodeler/pmpovray31format.h
@@ -40,25 +40,25 @@ public:
virtual ~PMPovray31Format( );
/** */
- virtual QString name( ) const { return "povray31"; };
+ virtual TQString name( ) const { return "povray31"; };
/** */
- virtual QString description( ) const { return "POV-Ray 3.1"; }
+ virtual TQString description( ) const { return "POV-Ray 3.1"; }
/** */
virtual int services( ) const { return AllServices; }
/** */
- virtual PMParser* newParser( PMPart*, QIODevice* ) const;
+ virtual PMParser* newParser( PMPart*, TQIODevice* ) const;
/** */
- virtual PMParser* newParser( PMPart*, const QByteArray& ) const;
+ virtual PMParser* newParser( PMPart*, const TQByteArray& ) const;
/** */
- virtual PMSerializer* newSerializer( QIODevice* );
+ virtual PMSerializer* newSerializer( TQIODevice* );
/** */
virtual PMRenderer* newRenderer( PMPart* ) const;
/** */
- virtual QString mimeType( ) const;
+ virtual TQString mimeType( ) const;
/** */
- virtual QStringList importPatterns( ) const;
+ virtual TQStringList importPatterns( ) const;
/** */
- virtual QStringList exportPatterns( ) const;
+ virtual TQStringList exportPatterns( ) const;
};
#endif
diff --git a/kpovmodeler/pmpovray31serialization.cpp b/kpovmodeler/pmpovray31serialization.cpp
index dd4b7603..d153261d 100644
--- a/kpovmodeler/pmpovray31serialization.cpp
+++ b/kpovmodeler/pmpovray31serialization.cpp
@@ -26,7 +26,7 @@ void PMPov31SerBicubicPatch( const PMObject* object, const PMMetaObject* metaObj
PMBicubicPatch* o = ( PMBicubicPatch* ) object;
int u, v;
- QString str, line;
+ TQString str, line;
dev->objectBegin( "bicubic_patch" );
dev->writeName( object->name( ) );
@@ -47,7 +47,7 @@ void PMPov31SerBicubicPatch( const PMObject* object, const PMMetaObject* metaObj
{
line = o->controlPoint( v*4 ).serialize( );
for( u = 1; u < 4; u++ )
- line += QString( ", " ) + o->controlPoint( u+4*v ).serialize( );
+ line += TQString( ", " ) + o->controlPoint( u+4*v ).serialize( );
if( v != 3 )
line += ",";
dev->writeLine( line );
@@ -61,7 +61,7 @@ void PMPov31SerBlendMapModifiers( const PMObject* object, const PMMetaObject*, P
{
PMBlendMapModifiers* o = ( PMBlendMapModifiers* ) object;
- QString str;
+ TQString str;
if( o->isFrequencyEnabled( ) )
{
@@ -109,7 +109,7 @@ void PMPov31SerBlob( const PMObject* object, const PMMetaObject* metaObject, PMO
dev->objectBegin( "blob" );
dev->writeName( object->name( ) );
- dev->writeLine( QString( "threshold %1" ).arg( o->threshold( ) ) );
+ dev->writeLine( TQString( "threshold %1" ).arg( o->threshold( ) ) );
dev->callSerialization( object, metaObject->superClass( ) );
@@ -128,11 +128,11 @@ void PMPov31SerBlobCylinder( const PMObject* object, const PMMetaObject* metaObj
dev->objectBegin( "cylinder" );
dev->writeName( object->name( ) );
- QString str1;
+ TQString str1;
str1.setNum( o->radius( ) );
dev->writeLine( o->end1( ).serialize( ) + ", " + o->end2( ).serialize( )
+ ", " + str1 + "," );
- dev->writeLine( QString( "strength %1" ).arg( o->strength( ) ) );
+ dev->writeLine( TQString( "strength %1" ).arg( o->strength( ) ) );
dev->callSerialization( object, metaObject->superClass( ) );
dev->objectEnd( );
@@ -144,8 +144,8 @@ void PMPov31SerBlobSphere( const PMObject* object, const PMMetaObject* metaObjec
dev->objectBegin( "sphere" );
dev->writeName( object->name( ) );
- dev->writeLine( o->centre( ).serialize( ) + QString( ", %1," ).arg( o->radius( ) ) );
- dev->writeLine( QString( "strength %1" ).arg( o->strength( ) ) );
+ dev->writeLine( o->centre( ).serialize( ) + TQString( ", %1," ).arg( o->radius( ) ) );
+ dev->writeLine( TQString( "strength %1" ).arg( o->strength( ) ) );
dev->callSerialization( object, metaObject->superClass( ) );
dev->objectEnd( );
}
@@ -178,7 +178,7 @@ void PMPov31SerBumpMap( const PMObject* object, const PMMetaObject*, PMOutputDev
{
PMBumpMap* o = ( PMBumpMap* ) object;
- QString str1;
+ TQString str1;
dev->objectBegin( "bump_map" );
@@ -262,7 +262,7 @@ void PMPov31SerCamera( const PMObject* object, const PMMetaObject* metaObject, P
PMCamera* o = ( PMCamera* ) object;
dev->objectBegin( "camera" );
- QString str;
+ TQString str;
dev->writeName( object->name( ) );
@@ -341,13 +341,13 @@ void PMPov31SerCone( const PMObject* object, const PMMetaObject* metaObject, PMO
dev->objectBegin( "cone" );
dev->writeName( object->name( ) );
- QString str1;
+ TQString str1;
str1.setNum( o->radius1( ) );
dev->writeLine( o->end1( ).serialize( ) + ", " + str1 + "," );
str1.setNum( o->radius2( ) );
dev->writeLine( o->end2( ).serialize( ) + ", " + str1 );
if( o->open( ) )
- dev->writeLine( QString( "open" ) );
+ dev->writeLine( TQString( "open" ) );
dev->callSerialization( object, metaObject->superClass( ) );
dev->objectEnd( );
@@ -385,12 +385,12 @@ void PMPov31SerCylinder( const PMObject* object, const PMMetaObject* metaObject,
dev->objectBegin( "cylinder" );
dev->writeName( object->name( ) );
- QString str1;
+ TQString str1;
str1.setNum( o->radius( ) );
dev->writeLine( o->end1( ).serialize( ) + ", " + o->end2( ).serialize( )
+ ", " + str1 );
if( o->open( ) )
- dev->writeLine( QString( "open" ) );
+ dev->writeLine( TQString( "open" ) );
dev->callSerialization( object, metaObject->superClass( ) );
dev->objectEnd( );
@@ -428,7 +428,7 @@ void PMPov31SerDisc( const PMObject* object, const PMMetaObject* metaObject, PMO
dev->objectBegin( "disc" );
dev->writeName( object->name( ) );
- QString str1, str2;
+ TQString str1, str2;
str1.setNum( o->radius( ) );
if( o->radius( ) != 0.0 )
{
@@ -447,7 +447,7 @@ void PMPov31SerFinish( const PMObject* object, const PMMetaObject* metaObject, P
{
PMFinish* o = ( PMFinish* ) object;
- QString str1;
+ TQString str1;
dev->objectBegin( "finish" );
@@ -525,7 +525,7 @@ void PMPov31SerFog( const PMObject* object, const PMMetaObject*, PMOutputDevice*
{
PMFog* o = ( PMFog* ) object;
- QString str;
+ TQString str;
dev->objectBegin( "fog" );
@@ -539,12 +539,12 @@ void PMPov31SerFog( const PMObject* object, const PMMetaObject*, PMOutputDevice*
dev->writeLine( o->linkedObject( )->id( ) );
else
{
- QString text;
+ TQString text;
text = o->name( );
if( text.isEmpty( ) )
text = o->description( );
- dev->writeComment( QString( "No prototype for %1" ).arg( text ) );
+ dev->writeComment( TQString( "No prototype for %1" ).arg( text ) );
}
}
@@ -615,7 +615,7 @@ void PMPov31SerGlobalSettings( const PMObject* object, const PMMetaObject*, PMOu
{
PMGlobalSettings* o = ( PMGlobalSettings* ) object;
- QString str1;
+ TQString str1;
dev->objectBegin( "global_settings" );
@@ -727,7 +727,7 @@ void PMPov31SerHeightField( const PMObject* object, const PMMetaObject* metaObje
dev->writeLine( o->typeToString( o->heightFieldType( ) ) + " \"" + o->fileName( ) + "\"" );
if( o->waterLevel( ) > 0.0 )
- dev->writeLine( QString( "water_level %1" ).arg( o->waterLevel( ) ) );
+ dev->writeLine( TQString( "water_level %1" ).arg( o->waterLevel( ) ) );
if( !o->hierarchy( ) )
dev->writeLine( "hierarchy off" );
if( o->smooth( ) )
@@ -741,10 +741,10 @@ void PMPov31SerImageMap( const PMObject* object, const PMMetaObject*, PMOutputDe
{
PMImageMap* o = ( PMImageMap* ) object;
- typedef QValueList<PMPaletteValue> PMPaletteValueList;
+ typedef TQValueList<PMPaletteValue> PMPaletteValueList;
PMPaletteValueList values;
PMPaletteValueList::ConstIterator tmpPalette;
- QString str1, str2;
+ TQString str1, str2;
dev->objectBegin( "image_map" );
@@ -846,7 +846,7 @@ void PMPov31SerInterior( const PMObject* object, const PMMetaObject* metaObject,
{
PMInterior* o = ( PMInterior* ) object;
- QString str1;
+ TQString str1;
dev->objectBegin( "interior" );
dev->callSerialization( object, metaObject->superClass( ) );
@@ -885,14 +885,14 @@ void PMPov31SerJuliaFractal( const PMObject* object, const PMMetaObject* metaObj
dev->writeLine( o->algebraTypeToString( o->algebraType( ) ) );
if( o->functionType( ) == PMJuliaFractal::FTpwr )
- dev->writeLine( QString( "pwr(%1, %2)" ).arg( o->exponent( )[0] ).
+ dev->writeLine( TQString( "pwr(%1, %2)" ).arg( o->exponent( )[0] ).
arg( o->exponent( )[1] ) );
else
dev->writeLine( o->functionTypeToString( o->functionType( ) ) );
- dev->writeLine( QString( "max_iteration %1" ).arg( o->maximumIterations( ) ) );
- dev->writeLine( QString( "precision %1" ).arg( o->precision( ) ) );
- dev->writeLine( QString( "slice %1, %2" ).arg( o->sliceNormal( ).serialize( ) )
+ dev->writeLine( TQString( "max_iteration %1" ).arg( o->maximumIterations( ) ) );
+ dev->writeLine( TQString( "precision %1" ).arg( o->precision( ) ) );
+ dev->writeLine( TQString( "slice %1, %2" ).arg( o->sliceNormal( ).serialize( ) )
.arg( o->sliceDistance( ) ) );
@@ -925,11 +925,11 @@ void PMPov31SerLathe( const PMObject* object, const PMMetaObject* metaObject, PM
}
int num = o->points( ).count( );
- dev->writeLine( QString( "%1," ).arg( num ) );
+ dev->writeLine( TQString( "%1," ).arg( num ) );
bool first = true;
- QValueList<PMVector> points = o->points( );
- QValueList<PMVector>::ConstIterator it = points.begin( );
+ TQValueList<PMVector> points = o->points( );
+ TQValueList<PMVector>::ConstIterator it = points.begin( );
for( ; it != points.end( ); ++it )
{
if( !first )
@@ -953,49 +953,49 @@ void PMPov31SerLight( const PMObject* object, const PMMetaObject* metaObject, PM
{
PMLight* o = ( PMLight* ) object;
- dev->objectBegin( QString( "light_source" ) );
+ dev->objectBegin( TQString( "light_source" ) );
dev->writeName( object->name( ) );
dev->writeLine( o->location( ).serialize( ) + ", " + o->color( ).serialize( ) );
if( o->lightType( ) == PMLight::SpotLight )
- dev->writeLine( QString( "spotlight" ) );
+ dev->writeLine( TQString( "spotlight" ) );
else if( o->lightType( ) == PMLight::CylinderLight )
- dev->writeLine( QString( "cylinder" ) );
+ dev->writeLine( TQString( "cylinder" ) );
else if( o->lightType( ) == PMLight::ShadowlessLight )
- dev->writeLine( QString( "shadowless" ) );
+ dev->writeLine( TQString( "shadowless" ) );
if( ( o->lightType( ) == PMLight::SpotLight ) ||
( o->lightType( ) == PMLight::CylinderLight ) )
{
- dev->writeLine( QString( "radius %1" ).arg( o->radius( ) ) );
- dev->writeLine( QString( "falloff %1" ).arg( o->falloff( ) ) );
+ dev->writeLine( TQString( "radius %1" ).arg( o->radius( ) ) );
+ dev->writeLine( TQString( "falloff %1" ).arg( o->falloff( ) ) );
if( o->tightness( ) != c_defaultLightTightness )
- dev->writeLine( QString( "tightness %1" ).arg( o->tightness( ) ) );
- dev->writeLine( QString( "point_at " ) + o->pointAt( ).serialize( ) );
+ dev->writeLine( TQString( "tightness %1" ).arg( o->tightness( ) ) );
+ dev->writeLine( TQString( "point_at " ) + o->pointAt( ).serialize( ) );
}
if( o->isAreaLight( ) )
{
- dev->writeLine( QString( "area_light " ) + o->axis1( ).serialize( )
- + QString( ", " ) + o->axis2( ).serialize( )
- + QString( ", %1, %2" ).arg( o->size1( ) ).arg( o->size2( ) ) );
+ dev->writeLine( TQString( "area_light " ) + o->axis1( ).serialize( )
+ + TQString( ", " ) + o->axis2( ).serialize( )
+ + TQString( ", %1, %2" ).arg( o->size1( ) ).arg( o->size2( ) ) );
if( o->adaptive( ) != c_defaultLightAdaptive )
- dev->writeLine( QString( "adaptive %1" ).arg( o->adaptive( ) ) );
+ dev->writeLine( TQString( "adaptive %1" ).arg( o->adaptive( ) ) );
if( o->jitter( ) )
- dev->writeLine( QString( "jitter" ) );
+ dev->writeLine( TQString( "jitter" ) );
}
if( o->fading( ) )
{
- dev->writeLine( QString( "fade_distance %1" ).arg( o->fadeDistance( ) ) );
- dev->writeLine( QString( "fade_power %1" ).arg( o->fadePower( ) ) );
+ dev->writeLine( TQString( "fade_distance %1" ).arg( o->fadeDistance( ) ) );
+ dev->writeLine( TQString( "fade_power %1" ).arg( o->fadePower( ) ) );
}
if( !o->mediaInteraction( ) )
- dev->writeLine( QString( "media_interaction off" ) );
+ dev->writeLine( TQString( "media_interaction off" ) );
if( !o->mediaAttenuation( ) )
- dev->writeLine( QString( "media_attenuation off" ) );
+ dev->writeLine( TQString( "media_attenuation off" ) );
dev->callSerialization( object, metaObject->superClass( ) );
dev->objectEnd( );
@@ -1005,7 +1005,7 @@ void PMPov31SerListPattern( const PMObject* object, const PMMetaObject* metaObje
{
PMListPattern* o = ( PMListPattern* ) object;
- QString str1;
+ TQString str1;
switch( o->listType( ) )
{
@@ -1055,7 +1055,7 @@ void PMPov31SerNormalList( const PMObject* object, const PMMetaObject*, PMOutput
{
PMNormalList* o = ( PMNormalList* ) object;
- QString str1;
+ TQString str1;
switch( o->listType( ) )
{
@@ -1102,7 +1102,7 @@ void PMPov31SerMaterialMap( const PMObject* object, const PMMetaObject* metaObje
{
PMMaterialMap* o = ( PMMaterialMap* ) object;
- QString str1;
+ TQString str1;
dev->objectBegin( "material_map" );
@@ -1187,8 +1187,8 @@ void PMPov31SerMedia( const PMObject* object, const PMMetaObject* metaObject, PM
{
PMMedia* o = ( PMMedia* ) object;
- QString str1;
- QString str2;
+ TQString str1;
+ TQString str2;
dev->objectBegin( "media" );
dev->callSerialization( object, metaObject->superClass( ) );
@@ -1257,7 +1257,7 @@ void PMPov31SerNormal( const PMObject* object, const PMMetaObject* metaObject, P
{
PMNormal* o = ( PMNormal* ) object;
- QString str1;
+ TQString str1;
bool bObject = true;
if( o->parent( ) )
@@ -1297,12 +1297,12 @@ void PMPov31SerObjectLink( const PMObject* object, const PMMetaObject* metaObjec
}
if( writeComment )
{
- QString text;
+ TQString text;
text = o->name( );
if( text.isEmpty( ) )
text = o->description( );
- dev->writeComment( QString( "No prototype for %1" ).arg( text ) );
+ dev->writeComment( TQString( "No prototype for %1" ).arg( text ) );
}
}
@@ -1314,7 +1314,7 @@ void PMPov31SerPattern( const PMObject* object, const PMMetaObject*, PMOutputDev
{
PMPattern* o = ( PMPattern* ) object;
- QString str;
+ TQString str;
// pattern type
switch( o->patternType( ) )
@@ -1476,7 +1476,7 @@ void PMPov31SerPlane( const PMObject* object, const PMMetaObject* metaObject, PM
dev->objectBegin( "plane" );
dev->writeName( object->name( ) );
- QString str1;
+ TQString str1;
str1.setNum( o->distance( ) );
dev->writeLine( o->normal( ).serialize( ) + ", " + str1 );
dev->callSerialization( object, metaObject->superClass( ) );
@@ -1501,23 +1501,23 @@ void PMPov31SerPolynom( const PMObject* object, const PMMetaObject* metaObject,
if( o->polynomOrder( ) == 2 )
{
- dev->writeLine( QString( "<%1, %2, %3>," ).arg( coefficients[0] )
+ dev->writeLine( TQString( "<%1, %2, %3>," ).arg( coefficients[0] )
.arg( coefficients[4] ).arg( coefficients[7] ) );
- dev->writeLine( QString( "<%1, %2, %3>," ).arg( coefficients[1] )
+ dev->writeLine( TQString( "<%1, %2, %3>," ).arg( coefficients[1] )
.arg( coefficients[2] ).arg( coefficients[5] ) );
- dev->writeLine( QString( "<%1, %2, %3>, %4" ).arg( coefficients[3] )
+ dev->writeLine( TQString( "<%1, %2, %3>, %4" ).arg( coefficients[3] )
.arg( coefficients[6] ).arg( coefficients[8] )
.arg( coefficients[9] ) );
}
else
{
if( o->polynomOrder( ) > 4 )
- dev->writeLine( QString( "%1," ).arg( o->polynomOrder( ) ) );
+ dev->writeLine( TQString( "%1," ).arg( o->polynomOrder( ) ) );
int size = coefficients.size( );
int i;
- QString hlp;
+ TQString hlp;
dev->write( "<" );
for( i = 0; i < size; i++ )
@@ -1545,13 +1545,13 @@ void PMPov31SerPovrayMatrix( const PMObject* object, const PMMetaObject*, PMOutp
{
PMPovrayMatrix* o = ( PMPovrayMatrix* ) object;
- dev->writeLine( QString( "matrix < %1, %2, %3," ).arg( o->values( )[0] )
+ dev->writeLine( TQString( "matrix < %1, %2, %3," ).arg( o->values( )[0] )
.arg( o->values( )[1] ).arg( o->values( )[2] ) );
- dev->writeLine( QString( " %1, %2, %3," ).arg( o->values( )[3] )
+ dev->writeLine( TQString( " %1, %2, %3," ).arg( o->values( )[3] )
.arg( o->values( )[4] ).arg( o->values( )[5] ) );
- dev->writeLine( QString( " %1, %2, %3," ).arg( o->values( )[6] )
+ dev->writeLine( TQString( " %1, %2, %3," ).arg( o->values( )[6] )
.arg( o->values( )[7] ).arg( o->values( )[8] ) );
- dev->writeLine( QString( " %1, %2, %3 >" ).arg( o->values( )[9] )
+ dev->writeLine( TQString( " %1, %2, %3 >" ).arg( o->values( )[9] )
.arg( o->values( )[10] ).arg( o->values( )[11] ) );
}
@@ -1587,11 +1587,11 @@ void PMPov31SerPrism( const PMObject* object, const PMMetaObject* metaObject, PM
dev->writeLine( "conic_sweep" );
break;
}
- dev->writeLine( QString( "%1, %2," ).arg( o->height1( ) ).arg( o->height2( ) ) );
+ dev->writeLine( TQString( "%1, %2," ).arg( o->height1( ) ).arg( o->height2( ) ) );
// count number of points
- QValueList< QValueList<PMVector> > points = o->points( );
- QValueList< QValueList<PMVector> >::ConstIterator spit = points.begin( );
+ TQValueList< TQValueList<PMVector> > points = o->points( );
+ TQValueList< TQValueList<PMVector> >::ConstIterator spit = points.begin( );
int lines = 0;
for( ; spit != points.end( ); ++spit )
{
@@ -1600,14 +1600,14 @@ void PMPov31SerPrism( const PMObject* object, const PMMetaObject* metaObject, PM
else
lines += ( *spit ).count( ) / 3 * 4;
}
- dev->writeLine( QString( "%1," ).arg( lines ) );
+ dev->writeLine( TQString( "%1," ).arg( lines ) );
for( spit = points.begin( ); spit != points.end( ); ++spit )
{
bool first = true;
- QValueList<PMVector> fullPoints = o->expandedPoints( *spit );
- QValueList<PMVector>::ConstIterator it = fullPoints.begin( );
+ TQValueList<PMVector> fullPoints = o->expandedPoints( *spit );
+ TQValueList<PMVector>::ConstIterator it = fullPoints.begin( );
for( ; it != fullPoints.end( ); ++it )
{
@@ -1616,7 +1616,7 @@ void PMPov31SerPrism( const PMObject* object, const PMMetaObject* metaObject, PM
dev->write( ( *it ).serialize( ) );
first = false;
}
- QValueList< QValueList<PMVector> >::ConstIterator spit2 = spit;
+ TQValueList< TQValueList<PMVector> >::ConstIterator spit2 = spit;
spit2++;
if( spit2 != points.end( ) )
dev->write( "," );
@@ -1643,7 +1643,7 @@ void PMPov31SerRainbow( const PMObject* object, const PMMetaObject* metaObject,
{
PMRainbow* o = ( PMRainbow* ) object;
- QString str1;
+ TQString str1;
dev->objectBegin( "rainbow" );
dev->callSerialization( object, metaObject->superClass( ) );
@@ -1691,8 +1691,8 @@ void PMPov31SerRaw( const PMObject* object, const PMMetaObject*, PMOutputDevice*
dev->writeLine( "//*PMRawBegin" );
- QString tmp = o->code( );
- QTextStream str( &tmp, IO_ReadOnly );
+ TQString tmp = o->code( );
+ TQTextStream str( &tmp, IO_ReadOnly );
while( !str.atEnd( ) )
dev->writeLine( str.readLine( ) );
@@ -1704,8 +1704,8 @@ void PMPov31SerRotate( const PMObject* object, const PMMetaObject*, PMOutputDevi
PMRotate* o = ( PMRotate* ) object;
PMVector rotate = o->rotation( );
- QString vector;
- QTextStream str( &vector, IO_WriteOnly );
+ TQString vector;
+ TQTextStream str( &vector, IO_WriteOnly );
int i;
bool z[3];
@@ -1756,7 +1756,7 @@ void PMPov31SerScale( const PMObject* object, const PMMetaObject* , PMOutputDevi
if( approx( scale[0], scale[1] ) &&
approx( scale[1], scale[2] ) )
- dev->writeLine( QString( "scale %1" ).arg( scale[0] ) );
+ dev->writeLine( TQString( "scale %1" ).arg( scale[0] ) );
else
dev->writeLine( "scale " + scale.serialize( ) );
}
@@ -1777,7 +1777,7 @@ void PMPov31SerSlope( const PMObject* object, const PMMetaObject* , PMOutputDevi
{
PMSlope* o = ( PMSlope* ) object;
- QString str1,str2;
+ TQString str1,str2;
str1.setNum(o->height( ));
str2.setNum(o->slope( ));
@@ -1821,11 +1821,11 @@ void PMPov31SerSurfaceOfRevolution( const PMObject* object, const PMMetaObject*
dev->writeName( object->name( ) );
int num = o->points( ).count( );
- dev->writeLine( QString( "%1," ).arg( num ) );
+ dev->writeLine( TQString( "%1," ).arg( num ) );
bool first = true;
- QValueList<PMVector> points = o->points( );
- QValueList<PMVector>::ConstIterator it = points.begin( );
+ TQValueList<PMVector> points = o->points( );
+ TQValueList<PMVector>::ConstIterator it = points.begin( );
for( ; it != points.end( ); ++it )
{
if( !first )
@@ -1850,7 +1850,7 @@ void PMPov31SerSphere( const PMObject* object, const PMMetaObject* metaObject, P
dev->objectBegin( "sphere" );
dev->writeName( object->name( ) );
- QString str;
+ TQString str;
str.setNum( o->radius( ) );
dev->writeLine( o->centre( ).serialize( ) + ", " + str );
dev->callSerialization( object, metaObject->superClass( ) );
@@ -1864,7 +1864,7 @@ void PMPov31SerSuperquadricEllipsoid( const PMObject* object, const PMMetaObject
dev->objectBegin( "superellipsoid" );
dev->writeName( object->name( ) );
- dev->writeLine( QString( "<%1, %2>" ).arg( o->eastWestExponent( ) )
+ dev->writeLine( TQString( "<%1, %2>" ).arg( o->eastWestExponent( ) )
.arg( o->northSouthExponent( ) ) );
dev->callSerialization( object, metaObject->superClass( ) );
@@ -1878,9 +1878,9 @@ void PMPov31SerText( const PMObject* object, const PMMetaObject* metaObject, PMO
dev->objectBegin( "text" );
dev->writeName( object->name( ) );
- dev->writeLine( QString( "ttf \"" ) + o->font( ) + "\"" );
+ dev->writeLine( TQString( "ttf \"" ) + o->font( ) + "\"" );
dev->writeLine( PMOutputDevice::escapeAndQuoteString( o->text( ) ) );
- dev->writeLine( QString( "%1, " ).arg( o->thickness( ) )
+ dev->writeLine( TQString( "%1, " ).arg( o->thickness( ) )
+ o->offset( ).serialize( ) );
dev->callSerialization( object, metaObject->superClass( ) );
@@ -1917,12 +1917,12 @@ void PMPov31SerTextureBase( const PMObject* object, const PMMetaObject* metaObje
dev->writeLine( linkedObject->id( ) );
else
{
- QString text;
+ TQString text;
text = o->name( );
if( text.isEmpty( ) )
text = o->description( );
- dev->writeComment( QString( "No prototype for %1" ).arg( text ) );
+ dev->writeComment( TQString( "No prototype for %1" ).arg( text ) );
}
}
@@ -1933,8 +1933,8 @@ void PMPov31SerTextureMapBase( const PMObject* object, const PMMetaObject* , PMO
{
PMTextureMapBase* o = ( PMTextureMapBase* ) object;
- QValueList<double> mapValues = o->mapValues( );
- QValueList<double>::ConstIterator it = mapValues.begin( );
+ TQValueList<double> mapValues = o->mapValues( );
+ TQValueList<double>::ConstIterator it = mapValues.begin( );
PMObject* c = o->firstChild( );
double value = 0.0;
@@ -1945,12 +1945,12 @@ void PMPov31SerTextureMapBase( const PMObject* object, const PMMetaObject* , PMO
dev->writeLine( o->linkedObject( )->id( ) );
else
{
- QString text;
+ TQString text;
text = o->name( );
if( text.isEmpty( ) )
text = o->description( );
- dev->writeComment( QString( "No prototype for %1" ).arg( text ) );
+ dev->writeComment( TQString( "No prototype for %1" ).arg( text ) );
}
}
@@ -1962,7 +1962,7 @@ void PMPov31SerTextureMapBase( const PMObject* object, const PMMetaObject* , PMO
value = 1.0;
if( it != mapValues.end( ) )
value = *it;
- dev->write( QString( "[ %1 " ).arg( value ) );
+ dev->write( TQString( "[ %1 " ).arg( value ) );
dev->serialize( c );
dev->writeLine( "]" );
++it;
@@ -2018,14 +2018,14 @@ void PMPov31SerTorus( const PMObject* object, const PMMetaObject* metaObject, PM
dev->objectBegin( "torus" );
dev->writeName( object->name( ) );
- QString strMinor;
- QString strMajor;
+ TQString strMinor;
+ TQString strMajor;
strMinor.setNum( o->minorRadius( ) );
strMajor.setNum( o->majorRadius( ) );
dev->writeLine(strMajor + ", " + strMinor);
if( o->sturm( ) )
- dev->writeLine( QString( "sturm" ) );
+ dev->writeLine( TQString( "sturm" ) );
dev->callSerialization( object, metaObject->superClass( ) );
dev->objectEnd( );
@@ -2035,8 +2035,8 @@ void PMPov31SerTranslate( const PMObject* object, const PMMetaObject* , PMOutput
{
PMTranslate* o = ( PMTranslate* ) object;
- QString vector;
- QTextStream str( &vector, IO_WriteOnly );
+ TQString vector;
+ TQTextStream str( &vector, IO_WriteOnly );
int i;
bool z[3];
PMVector move = o->translation( );
@@ -2130,7 +2130,7 @@ void PMPov31SerWarp( const PMObject* object, const PMMetaObject* , PMOutputDevic
{
PMWarp* o = ( PMWarp* ) object;
- QString str1;
+ TQString str1;
dev->objectBegin( "warp" );
switch( o->warpType( ) )
diff --git a/kpovmodeler/pmpovray35format.cpp b/kpovmodeler/pmpovray35format.cpp
index c00b1d65..438eb261 100644
--- a/kpovmodeler/pmpovray35format.cpp
+++ b/kpovmodeler/pmpovray35format.cpp
@@ -56,17 +56,17 @@ PMPovray35Format::~PMPovray35Format( )
}
-PMParser* PMPovray35Format::newParser( PMPart* part, QIODevice* dev ) const
+PMParser* PMPovray35Format::newParser( PMPart* part, TQIODevice* dev ) const
{
return new PMPovrayParser( part, dev );
}
-PMParser* PMPovray35Format::newParser( PMPart* part, const QByteArray& data ) const
+PMParser* PMPovray35Format::newParser( PMPart* part, const TQByteArray& data ) const
{
return new PMPovrayParser( part, data );
}
-PMSerializer* PMPovray35Format::newSerializer( QIODevice* dev )
+PMSerializer* PMPovray35Format::newSerializer( TQIODevice* dev )
{
return new PMOutputDevice( dev, this );
}
@@ -77,24 +77,24 @@ PMRenderer* PMPovray35Format::newRenderer( PMPart* ) const
return 0;
}
-QString PMPovray35Format::mimeType( ) const
+TQString PMPovray35Format::mimeType( ) const
{
- return QString( "text/plain" );
+ return TQString( "text/plain" );
}
-QStringList PMPovray35Format::importPatterns( ) const
+TQStringList PMPovray35Format::importPatterns( ) const
{
- QStringList result;
- result.push_back( QString( "*.pov *.inc|" )
+ TQStringList result;
+ result.push_back( TQString( "*.pov *.inc|" )
+ i18n( "POV-Ray 3.5 Files (*.pov, *.inc)" ) );
return result;
}
-QStringList PMPovray35Format::exportPatterns( ) const
+TQStringList PMPovray35Format::exportPatterns( ) const
{
- QStringList result;
- result.push_back( QString( "*.pov|" ) + i18n( "POV-Ray 3.5 Files (*.pov)" ) );
- result.push_back( QString( "*.ini|" ) + i18n( "POV-Ray 3.5 Include Files (*.ini)" ) );
+ TQStringList result;
+ result.push_back( TQString( "*.pov|" ) + i18n( "POV-Ray 3.5 Files (*.pov)" ) );
+ result.push_back( TQString( "*.ini|" ) + i18n( "POV-Ray 3.5 Include Files (*.ini)" ) );
return result;
}
diff --git a/kpovmodeler/pmpovray35format.h b/kpovmodeler/pmpovray35format.h
index 117d0375..85ebc9ec 100644
--- a/kpovmodeler/pmpovray35format.h
+++ b/kpovmodeler/pmpovray35format.h
@@ -40,25 +40,25 @@ public:
virtual ~PMPovray35Format( );
/** */
- virtual QString name( ) const { return "povray35"; };
+ virtual TQString name( ) const { return "povray35"; };
/** */
- virtual QString description( ) const { return "POV-Ray 3.5"; }
+ virtual TQString description( ) const { return "POV-Ray 3.5"; }
/** */
virtual int services( ) const { return AllServices; }
/** */
- virtual PMParser* newParser( PMPart*, QIODevice* ) const;
+ virtual PMParser* newParser( PMPart*, TQIODevice* ) const;
/** */
- virtual PMParser* newParser( PMPart*, const QByteArray& ) const;
+ virtual PMParser* newParser( PMPart*, const TQByteArray& ) const;
/** */
- virtual PMSerializer* newSerializer( QIODevice* );
+ virtual PMSerializer* newSerializer( TQIODevice* );
/** */
virtual PMRenderer* newRenderer( PMPart* ) const;
/** */
- virtual QString mimeType( ) const;
+ virtual TQString mimeType( ) const;
/** */
- virtual QStringList importPatterns( ) const;
+ virtual TQStringList importPatterns( ) const;
/** */
- virtual QStringList exportPatterns( ) const;
+ virtual TQStringList exportPatterns( ) const;
};
#endif
diff --git a/kpovmodeler/pmpovray35serialization.cpp b/kpovmodeler/pmpovray35serialization.cpp
index 2c3a88e0..d567100e 100644
--- a/kpovmodeler/pmpovray35serialization.cpp
+++ b/kpovmodeler/pmpovray35serialization.cpp
@@ -61,19 +61,19 @@ const bool c_defaultIsoAllIntersections = false;
void PMPov35SerIsoSurface( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev )
{
PMIsoSurface* o = ( PMIsoSurface* ) object;
- QString str;
+ TQString str;
dev->objectBegin( "isosurface" );
dev->writeName( object->name( ) );
if( o->containedBy( ) == PMIsoSurface::Box )
{
- dev->writeLine( QString( "function { " ) + o->function( ) + " }" );
+ dev->writeLine( TQString( "function { " ) + o->function( ) + " }" );
if( o->corner1( ) != c_defaultIsoCorner1 ||
o->corner2( ) != c_defaultIsoCorner2 )
{
- dev->writeLine( QString( "contained_by { box { " ) +
+ dev->writeLine( TQString( "contained_by { box { " ) +
o->corner1( ).serialize( ) + ", " +
o->corner2( ).serialize( ) + " } }" );
}
@@ -81,7 +81,7 @@ void PMPov35SerIsoSurface( const PMObject* object, const PMMetaObject* metaObjec
else
{
str.setNum( o->radius( ) );
- dev->writeLine( QString( "contained_by { sphere { " ) +
+ dev->writeLine( TQString( "contained_by { sphere { " ) +
o->center( ).serialize( ) + ", " + str + " } }" );
}
@@ -102,7 +102,7 @@ void PMPov35SerIsoSurface( const PMObject* object, const PMMetaObject* metaObjec
}
if( o->evaluate( ) )
{
- str = QString( "%1, %2, %3" ).arg( o->evaluateValue( 0 ) )
+ str = TQString( "%1, %2, %3" ).arg( o->evaluateValue( 0 ) )
.arg( o->evaluateValue( 1 ) ).arg( o->evaluateValue( 2 ) );
dev->writeLine( "evaluate " + str );
}
@@ -127,56 +127,56 @@ void PMPov35SerLight( const PMObject* object, const PMMetaObject* metaObject, PM
{
PMLight* o = ( PMLight* ) object;
- dev->objectBegin( QString( "light_source" ) );
+ dev->objectBegin( TQString( "light_source" ) );
dev->writeName( object->name( ) );
dev->writeLine( o->location( ).serialize( ) + ", " + o->color( ).serialize( ) );
if( o->lightType( ) == PMLight::SpotLight )
- dev->writeLine( QString( "spotlight" ) );
+ dev->writeLine( TQString( "spotlight" ) );
else if( o->lightType( ) == PMLight::CylinderLight )
- dev->writeLine( QString( "cylinder" ) );
+ dev->writeLine( TQString( "cylinder" ) );
else if( o->lightType( ) == PMLight::ShadowlessLight )
- dev->writeLine( QString( "shadowless" ) );
+ dev->writeLine( TQString( "shadowless" ) );
if( o->parallel( ) )
- dev->writeLine( QString( "parallel" ) );
+ dev->writeLine( TQString( "parallel" ) );
if( ( o->lightType( ) == PMLight::SpotLight ) ||
( o->lightType( ) == PMLight::CylinderLight ) )
{
- dev->writeLine( QString( "radius %1" ).arg( o->radius( ) ) );
- dev->writeLine( QString( "falloff %1" ).arg( o->falloff( ) ) );
+ dev->writeLine( TQString( "radius %1" ).arg( o->radius( ) ) );
+ dev->writeLine( TQString( "falloff %1" ).arg( o->falloff( ) ) );
if( o->tightness( ) != c_defaultLightTightness )
- dev->writeLine( QString( "tightness %1" ).arg( o->tightness( ) ) );
- dev->writeLine( QString( "point_at " ) + o->pointAt( ).serialize( ) );
+ dev->writeLine( TQString( "tightness %1" ).arg( o->tightness( ) ) );
+ dev->writeLine( TQString( "point_at " ) + o->pointAt( ).serialize( ) );
}
if( o->isAreaLight( ) )
{
- dev->writeLine( QString( "area_light " ) + o->axis1( ).serialize( )
- + QString( ", " ) + o->axis2( ).serialize( )
- + QString( ", %1, %2" ).arg( o->size1( ) ).arg( o->size2( ) ) );
+ dev->writeLine( TQString( "area_light " ) + o->axis1( ).serialize( )
+ + TQString( ", " ) + o->axis2( ).serialize( )
+ + TQString( ", %1, %2" ).arg( o->size1( ) ).arg( o->size2( ) ) );
if( o->adaptive( ) != c_defaultLightAdaptive )
- dev->writeLine( QString( "adaptive %1" ).arg( o->adaptive( ) ) );
+ dev->writeLine( TQString( "adaptive %1" ).arg( o->adaptive( ) ) );
if( o->jitter( ) )
- dev->writeLine( QString( "jitter" ) );
+ dev->writeLine( TQString( "jitter" ) );
if ( o->areaType( ) == PMLight::Circular )
- dev->writeLine( QString( "circular" ) );
+ dev->writeLine( TQString( "circular" ) );
if ( o->orient( ) )
- dev->writeLine( QString( "orient" ) );
+ dev->writeLine( TQString( "orient" ) );
}
if( o->fading( ) )
{
- dev->writeLine( QString( "fade_distance %1" ).arg( o->fadeDistance( ) ) );
- dev->writeLine( QString( "fade_power %1" ).arg( o->fadePower( ) ) );
+ dev->writeLine( TQString( "fade_distance %1" ).arg( o->fadeDistance( ) ) );
+ dev->writeLine( TQString( "fade_power %1" ).arg( o->fadePower( ) ) );
}
if( !o->mediaInteraction( ) )
- dev->writeLine( QString( "media_interaction off" ) );
+ dev->writeLine( TQString( "media_interaction off" ) );
if( !o->mediaAttenuation( ) )
- dev->writeLine( QString( "media_attenuation off" ) );
+ dev->writeLine( TQString( "media_attenuation off" ) );
dev->callSerialization( object, metaObject->superClass( ) );
dev->objectEnd( );
@@ -213,7 +213,7 @@ void PMPov35SerGlobalSettings( const PMObject* object, const PMMetaObject* metaO
{
PMGlobalSettings* o = ( PMGlobalSettings* ) object;
- QString str1;
+ TQString str1;
dev->objectBegin( "global_settings" );
@@ -254,11 +254,11 @@ void PMPov35SerGlobalSettings( const PMObject* object, const PMMetaObject* metaO
dev->writeLine( "number_of_waves " + str1 );
}
if ( o->noiseGenerator( ) == PMGlobalSettings::Original )
- dev->writeLine( QString( "noise_generator 1" ) );
+ dev->writeLine( TQString( "noise_generator 1" ) );
else if ( o->noiseGenerator( ) == PMGlobalSettings::RangeCorrected )
- dev->writeLine( QString( "noise_generator 2" ) );
+ dev->writeLine( TQString( "noise_generator 2" ) );
else
- dev->writeLine( QString( "noise_generator 3" ) );
+ dev->writeLine( TQString( "noise_generator 3" ) );
if( o->isRadiosityEnabled( ) )
{
dev->objectBegin( "radiosity" );
@@ -331,7 +331,7 @@ void PMPov35SerRadiosity( const PMObject* object, const PMMetaObject*, PMOutputD
{
PMRadiosity* o = ( PMRadiosity* ) object;
- QString str1;
+ TQString str1;
dev->objectBegin( "radiosity" );
@@ -434,7 +434,7 @@ void PMPov35SerGlobalPhotons( const PMObject* object, const PMMetaObject*, PMOut
{
PMGlobalPhotons* o = ( PMGlobalPhotons* ) object;
- QString str1, str2;
+ TQString str1, str2;
dev->objectBegin( "photons" );
@@ -506,7 +506,7 @@ void PMPov35SerGlobalPhotons( const PMObject* object, const PMMetaObject*, PMOut
o->radiusMedia( ) != c_defaultGlobalPhotonsRadiusMedia ||
o->radiusMediaMulti( ) != c_defaultGlobalPhotonsRadiusMediaMulti )
{
- QString str3, str4;
+ TQString str3, str4;
str1.setNum( o->radiusGather( ) );
str2.setNum( o->radiusGatherMulti( ) );
str3.setNum( o->radiusMedia( ) );
@@ -522,18 +522,18 @@ void PMPov35SerPhotons( const PMObject* object, const PMMetaObject*, PMOutputDev
{
PMPhotons* o = ( PMPhotons* ) object;
- QString str1;
+ TQString str1;
dev->objectBegin( "photons" );
if( o->parent( ) && ( o->parent( )->type( ) == "Light" ) )
{
if( o->refraction( ) )
- dev->writeLine( QString( "refraction on" ) );
+ dev->writeLine( TQString( "refraction on" ) );
if( o->reflection( ) )
- dev->writeLine( QString( "reflection on" ) );
+ dev->writeLine( TQString( "reflection on" ) );
if( o->areaLight( ) )
- dev->writeLine( QString( "area_light" ) );
+ dev->writeLine( TQString( "area_light" ) );
}
else
{
@@ -545,16 +545,16 @@ void PMPov35SerPhotons( const PMObject* object, const PMMetaObject*, PMOutputDev
dev->writeLine( "target " + str1 );
}
else
- dev->writeLine( QString( "target" ) );
+ dev->writeLine( TQString( "target" ) );
}
if( o->refraction( ) )
- dev->writeLine( QString( "refraction on" ) );
+ dev->writeLine( TQString( "refraction on" ) );
if( o->reflection( ) )
- dev->writeLine( QString( "reflection on" ) );
+ dev->writeLine( TQString( "reflection on" ) );
if( !o->collect( ) )
- dev->writeLine( QString( "collect off" ) );
+ dev->writeLine( TQString( "collect off" ) );
if( o->passThrough( ) )
- dev->writeLine( QString( "pass_through" ) );
+ dev->writeLine( TQString( "pass_through" ) );
}
dev->objectEnd( );
}
@@ -563,7 +563,7 @@ void PMPov35SerInterior( const PMObject* object, const PMMetaObject* metaObject,
{
PMInterior* o = ( PMInterior* ) object;
- QString str1;
+ TQString str1;
dev->objectBegin( "interior" );
dev->callSerialization( object, metaObject->superClass( ) );
@@ -639,7 +639,7 @@ void PMPov35SerPattern( const PMObject* object, const PMMetaObject*, PMOutputDev
{
PMPattern* o = ( PMPattern* ) object;
- QString str, str2;
+ TQString str, str2;
// pattern type
switch( o->patternType( ) )
@@ -849,13 +849,13 @@ void PMPov35SerPattern( const PMObject* object, const PMMetaObject*, PMOutputDev
switch( o->noiseGenerator( ) )
{
case PMPattern::Original:
- dev->writeLine( QString( "noise_generator 1" ) );
+ dev->writeLine( TQString( "noise_generator 1" ) );
break;
case PMPattern::RangeCorrected:
- dev->writeLine( QString( "noise_generator 2" ) );
+ dev->writeLine( TQString( "noise_generator 2" ) );
break;
case PMPattern::Perlin:
- dev->writeLine( QString( "noise_generator 3" ) );
+ dev->writeLine( TQString( "noise_generator 3" ) );
break;
default:
break;
@@ -891,7 +891,7 @@ void PMPov35SerNormal( const PMObject* object, const PMMetaObject* metaObject, P
{
PMNormal* o = ( PMNormal* ) object;
- QString str1;
+ TQString str1;
bool bObject = true;
if( o->parent( ) )
@@ -954,7 +954,7 @@ void PMPov35SerWarp( const PMObject* object, const PMMetaObject* , PMOutputDevic
{
PMWarp* o = ( PMWarp* ) object;
- QString str1, str2;
+ TQString str1, str2;
dev->objectBegin( "warp" );
switch( o->warpType( ) )
@@ -1061,23 +1061,23 @@ void PMPov35SerSphereSweep( const PMObject* object, const PMMetaObject* metaObje
{
PMSphereSweep* o = ( PMSphereSweep* ) object;
- QString str1;
+ TQString str1;
int numSpheres;
- QValueList<PMVector> points;
- QValueList<double> radii;
+ TQValueList<PMVector> points;
+ TQValueList<double> radii;
dev->objectBegin( "sphere_sweep" );
switch( o->splineType( ) )
{
case PMSphereSweep::LinearSpline:
- dev->writeLine( QString( "linear_spline," ) );
+ dev->writeLine( TQString( "linear_spline," ) );
break;
case PMSphereSweep::BSpline:
- dev->writeLine( QString( "b_spline," ) );
+ dev->writeLine( TQString( "b_spline," ) );
break;
case PMSphereSweep::CubicSpline:
- dev->writeLine( QString( "cubic_spline," ) );
+ dev->writeLine( TQString( "cubic_spline," ) );
break;
}
@@ -1107,7 +1107,7 @@ void PMPov35SerFinish( const PMObject* object, const PMMetaObject* metaObject, P
{
PMFinish* o = ( PMFinish* ) object;
- QString str1;
+ TQString str1;
dev->objectBegin( "finish" );
@@ -1249,8 +1249,8 @@ void PMPov35SerMedia( const PMObject* object, const PMMetaObject* metaObject, PM
{
PMMedia* o = ( PMMedia* ) object;
- QString str1;
- QString str2;
+ TQString str1;
+ TQString str2;
dev->objectBegin( "media" );
dev->callSerialization( object, metaObject->superClass( ) );
@@ -1398,7 +1398,7 @@ void PMPov35SerBicubicPatch( const PMObject* object, const PMMetaObject* metaObj
PMBicubicPatch* o = ( PMBicubicPatch* ) object;
int u, v;
- QString str, line;
+ TQString str, line;
dev->objectBegin( "bicubic_patch" );
dev->writeName( object->name( ) );
@@ -1427,7 +1427,7 @@ void PMPov35SerBicubicPatch( const PMObject* object, const PMMetaObject* metaObj
{
line = o->controlPoint( v*4 ).serialize( );
for( u = 1; u < 4; u++ )
- line += QString( ", " ) + o->controlPoint( u+4*v ).serialize( );
+ line += TQString( ", " ) + o->controlPoint( u+4*v ).serialize( );
if( v != 3 )
line += ",";
dev->writeLine( line );
diff --git a/kpovmodeler/pmpovrayformat.cpp b/kpovmodeler/pmpovrayformat.cpp
index a2c48c80..35e0881a 100644
--- a/kpovmodeler/pmpovrayformat.cpp
+++ b/kpovmodeler/pmpovrayformat.cpp
@@ -29,7 +29,7 @@ PMPovrayFormat::~PMPovrayFormat( )
}
-void PMPovrayFormat::registerMethod( const QString& className,
+void PMPovrayFormat::registerMethod( const TQString& className,
PMPovraySerializeMethod method )
{
PMPovraySerializeMethodInfo* info = m_methodDict.find( className );
@@ -40,13 +40,13 @@ void PMPovrayFormat::registerMethod( const QString& className,
m_methodDict.insert( className, info );
}
-void PMPovrayFormat::removeMethod( const QString& className )
+void PMPovrayFormat::removeMethod( const TQString& className )
{
m_methodDict.remove( className );
}
const PMPovraySerializeMethodInfo* PMPovrayFormat::serializationMethod(
- const QString& className )
+ const TQString& className )
{
return m_methodDict.find( className );
}
diff --git a/kpovmodeler/pmpovrayformat.h b/kpovmodeler/pmpovrayformat.h
index 398cae42..fe823618 100644
--- a/kpovmodeler/pmpovrayformat.h
+++ b/kpovmodeler/pmpovrayformat.h
@@ -72,23 +72,23 @@ public:
/**
* Registers the serialization method for the class className
*/
- void registerMethod( const QString& className, PMPovraySerializeMethod method );
+ void registerMethod( const TQString& className, PMPovraySerializeMethod method );
/**
* Removes a registered serialization method
*/
- void removeMethod( const QString& className );
+ void removeMethod( const TQString& className );
/**
* Returns the serialization methods info for the given object type
* or 0 if there is none.
*/
const PMPovraySerializeMethodInfo* serializationMethod(
- const QString& className );
+ const TQString& className );
private:
/**
* Dict class name -> serialization method
*/
- QDict<PMPovraySerializeMethodInfo> m_methodDict;
+ TQDict<PMPovraySerializeMethodInfo> m_methodDict;
};
#endif
diff --git a/kpovmodeler/pmpovraymatrix.cpp b/kpovmodeler/pmpovraymatrix.cpp
index 4100d46a..d51610f1 100644
--- a/kpovmodeler/pmpovraymatrix.cpp
+++ b/kpovmodeler/pmpovraymatrix.cpp
@@ -51,12 +51,12 @@ PMPovrayMatrix::~PMPovrayMatrix( )
{
}
-QString PMPovrayMatrix::description( ) const
+TQString PMPovrayMatrix::description( ) const
{
return i18n( "matrix" );
}
-void PMPovrayMatrix::serialize( QDomElement& e, QDomDocument& /*doc*/ ) const
+void PMPovrayMatrix::serialize( TQDomElement& e, TQDomDocument& /*doc*/ ) const
{
e.setAttribute( "value", m_values.serializeXML( ) );
}
@@ -108,7 +108,7 @@ void PMPovrayMatrix::setValues( const PMVector& v )
}
}
-PMDialogEditBase* PMPovrayMatrix::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMPovrayMatrix::editWidget( TQWidget* parent ) const
{
return new PMPovrayMatrixEdit( parent );
}
diff --git a/kpovmodeler/pmpovraymatrix.h b/kpovmodeler/pmpovraymatrix.h
index 25a1e03b..c4e0d886 100644
--- a/kpovmodeler/pmpovraymatrix.h
+++ b/kpovmodeler/pmpovraymatrix.h
@@ -50,7 +50,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMPovrayMatrix( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -58,15 +58,15 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMPovrayMatrixEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmmatrix" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmmatrix" ); }
/**
* Returns the matrix values.
diff --git a/kpovmodeler/pmpovraymatrixedit.cpp b/kpovmodeler/pmpovraymatrixedit.cpp
index 0d78c226..1e0f7833 100644
--- a/kpovmodeler/pmpovraymatrixedit.cpp
+++ b/kpovmodeler/pmpovraymatrixedit.cpp
@@ -20,12 +20,12 @@
#include "pmpovraymatrix.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
-PMPovrayMatrixEdit::PMPovrayMatrixEdit( QWidget* parent, const char* name )
+PMPovrayMatrixEdit::PMPovrayMatrixEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -36,21 +36,21 @@ void PMPovrayMatrixEdit::createTopWidgets( )
Base::createTopWidgets( );
int i, r, c;
- QGridLayout* gl = new QGridLayout( topLayout( ), 4, 4 );
+ TQGridLayout* gl = new TQGridLayout( topLayout( ), 4, 4 );
for( i = 0; i < 12; i++ )
{
m_pValue[i] = new PMFloatEdit( this );
- connect( m_pValue[i], SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pValue[i], TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
for( r = 0; r < 4; r++ )
for( c = 0; c < 3; c++ )
gl->addWidget( m_pValue[r*3+c], r, c );
- gl->addWidget( new QLabel( "0.0", this ), 0, 3 );
- gl->addWidget( new QLabel( "0.0", this ), 1, 3 );
- gl->addWidget( new QLabel( "0.0", this ), 2, 3 );
- gl->addWidget( new QLabel( "1.0", this ), 3, 3 );
+ gl->addWidget( new TQLabel( "0.0", this ), 0, 3 );
+ gl->addWidget( new TQLabel( "0.0", this ), 1, 3 );
+ gl->addWidget( new TQLabel( "0.0", this ), 2, 3 );
+ gl->addWidget( new TQLabel( "1.0", this ), 3, 3 );
}
void PMPovrayMatrixEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmpovraymatrixedit.h b/kpovmodeler/pmpovraymatrixedit.h
index 2dbd41ae..4b3b3512 100644
--- a/kpovmodeler/pmpovraymatrixedit.h
+++ b/kpovmodeler/pmpovraymatrixedit.h
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMPovrayMatrixEdit with parent and name
*/
- PMPovrayMatrixEdit( QWidget* parent, const char* name = 0 );
+ PMPovrayMatrixEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmpovrayoutputwidget.cpp b/kpovmodeler/pmpovrayoutputwidget.cpp
index b0d4ca73..f7eb9da4 100644
--- a/kpovmodeler/pmpovrayoutputwidget.cpp
+++ b/kpovmodeler/pmpovrayoutputwidget.cpp
@@ -17,8 +17,8 @@
#include "pmpovrayoutputwidget.h"
-#include <qtextedit.h>
-#include <qlayout.h>
+#include <tqtextedit.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kglobalsettings.h>
@@ -28,25 +28,25 @@
#include "pmdebug.h"
-QSize PMPovrayOutputWidget::s_size = QSize( 400, 400 );
+TQSize PMPovrayOutputWidget::s_size = TQSize( 400, 400 );
-PMPovrayOutputWidget::PMPovrayOutputWidget( QWidget* parent, const char* name )
+PMPovrayOutputWidget::PMPovrayOutputWidget( TQWidget* parent, const char* name )
: KDialog( parent, name )
{
- QVBoxLayout* topLayout = new QVBoxLayout( this, KDialog::marginHint( ), KDialog::spacingHint( ) );
+ TQVBoxLayout* topLayout = new TQVBoxLayout( this, KDialog::marginHint( ), KDialog::spacingHint( ) );
- m_pTextView = new QTextEdit( this );
+ m_pTextView = new TQTextEdit( this );
topLayout->addWidget( m_pTextView, 1 );
m_pTextView->setFont( KGlobalSettings::fixedFont( ) );
m_pTextView->setTextFormat( Qt::PlainText );
m_pTextView->setReadOnly( true );
- QHBoxLayout* buttonLayout = new QHBoxLayout( topLayout );
+ TQHBoxLayout* buttonLayout = new TQHBoxLayout( topLayout );
buttonLayout->addStretch( 1 );
- QPushButton* closeButton = new KPushButton( KStdGuiItem::close(), this );
+ TQPushButton* closeButton = new KPushButton( KStdGuiItem::close(), this );
buttonLayout->addWidget( closeButton );
closeButton->setDefault( true );
- connect( closeButton, SIGNAL( clicked( ) ), SLOT( hide( ) ) );
+ connect( closeButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( hide( ) ) );
setCaption( i18n( "Povray Output" ) );
resize( s_size );
@@ -60,18 +60,18 @@ PMPovrayOutputWidget::~PMPovrayOutputWidget( )
void PMPovrayOutputWidget::slotClear( )
{
- m_output = QString::null;
+ m_output = TQString::null;
m_startOfLastLine = 0;
m_pTextView->clear( );
}
-void PMPovrayOutputWidget::slotText( const QString& output )
+void PMPovrayOutputWidget::slotText( const TQString& output )
{
unsigned int i;
for( i = 0; i < output.length( ); i++ )
{
- QChar c = output[i];
+ TQChar c = output[i];
if( c == '\r' )
m_output.truncate( m_startOfLastLine );
else if( c == '\n' )
@@ -103,11 +103,11 @@ void PMPovrayOutputWidget::restoreConfig( KConfig* cfg )
{
cfg->setGroup( "Appearance" );
- QSize defaultSize( 500, 400 );
+ TQSize defaultSize( 500, 400 );
s_size = cfg->readSizeEntry( "PovrayOutputWidgetSize", &defaultSize );
}
-void PMPovrayOutputWidget::resizeEvent( QResizeEvent* ev )
+void PMPovrayOutputWidget::resizeEvent( TQResizeEvent* ev )
{
s_size = ev->size( );
}
diff --git a/kpovmodeler/pmpovrayoutputwidget.h b/kpovmodeler/pmpovrayoutputwidget.h
index faac7352..e617dba1 100644
--- a/kpovmodeler/pmpovrayoutputwidget.h
+++ b/kpovmodeler/pmpovrayoutputwidget.h
@@ -25,7 +25,7 @@
#include <kdialog.h>
-class QTextEdit;
+class TQTextEdit;
class KConfig;
/**
@@ -38,7 +38,7 @@ public:
/**
* Standard constructor
*/
- PMPovrayOutputWidget( QWidget* parent = 0, const char* name = 0 );
+ PMPovrayOutputWidget( TQWidget* parent = 0, const char* name = 0 );
/**
* Destructor
*/
@@ -55,7 +55,7 @@ public slots:
/**
* Adds the text to the output
*/
- void slotText( const QString& output );
+ void slotText( const TQString& output );
protected slots:
/**
@@ -64,13 +64,13 @@ protected slots:
void slotClose( );
protected:
- virtual void resizeEvent( QResizeEvent* ev );
+ virtual void resizeEvent( TQResizeEvent* ev );
private:
- QTextEdit* m_pTextView;
+ TQTextEdit* m_pTextView;
int m_startOfLastLine;
- QString m_output;
- static QSize s_size;
+ TQString m_output;
+ static TQSize s_size;
};
diff --git a/kpovmodeler/pmpovrayparser.cpp b/kpovmodeler/pmpovrayparser.cpp
index 88bd8393..3755ce42 100644
--- a/kpovmodeler/pmpovrayparser.cpp
+++ b/kpovmodeler/pmpovrayparser.cpp
@@ -19,7 +19,7 @@
#include "pmpovrayparser.h"
#include <klocale.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "pmpart.h"
#include "pmscanner.h"
@@ -31,13 +31,13 @@
#include "pmxmlhelper.h"
-PMPovrayParser::PMPovrayParser( PMPart* part, QIODevice* dev )
+PMPovrayParser::PMPovrayParser( PMPart* part, TQIODevice* dev )
: PMParser( part, dev )
{
init( );
}
-PMPovrayParser::PMPovrayParser( PMPart* part, const QByteArray& array )
+PMPovrayParser::PMPovrayParser( PMPart* part, const TQByteArray& array )
: PMParser( part, array )
{
init( );
@@ -70,7 +70,7 @@ void PMPovrayParser::nextToken( )
// create the objects (string) only if necessary
PMComment* c;
int lastCommentLine = -2;
- QString commentText;
+ TQString commentText;
while( ( m_token == SCANNER_ERROR_TOK ) || ( m_token == COMMENT_TOK )
|| ( m_token == LINE_COMMENT_TOK ) || ( m_token == PMNAME_TOK ) )
@@ -697,7 +697,7 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent,
nextToken( );
if( m_token == ID_TOK )
{
- QString id( m_pScanner->sValue( ) );
+ TQString id( m_pScanner->sValue( ) );
nextToken( );
if( !parseToken( '=' ) )
@@ -825,7 +825,7 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent,
return finished;
}
-bool PMPovrayParser::parseToken( int t, const QString& tokenName )
+bool PMPovrayParser::parseToken( int t, const TQString& tokenName )
{
if( t == ',' )
{
@@ -2871,7 +2871,7 @@ bool PMPovrayParser::parseLathe( PMLathe* pNewLathe )
if( !parseInt( nump ) )
return false;
- QValueList<PMVector> points;
+ TQValueList<PMVector> points;
for( i = 0; i < nump; i++ )
{
parseToken( ',' );
@@ -2976,7 +2976,7 @@ bool PMPovrayParser::parsePrism( PMPrism* pNewPrism )
if( !parseInt( nump ) )
return false;
- QValueList<PMVector> allPoints;
+ TQValueList<PMVector> allPoints;
for( i = 0; i < nump; i++ )
{
parseToken( ',' );
@@ -2986,9 +2986,9 @@ bool PMPovrayParser::parsePrism( PMPrism* pNewPrism )
allPoints.append( vector );
}
- QValueList< QValueList<PMVector> > points;
- QValueList<PMVector> subPoints;
- QValueList<PMVector>::Iterator it = allPoints.begin( );
+ TQValueList< TQValueList<PMVector> > points;
+ TQValueList<PMVector> subPoints;
+ TQValueList<PMVector>::Iterator it = allPoints.begin( );
int pnr = 0, pmod4;
PMVector ref( 2 ), ref2( 2 );
bool error = false;
@@ -3205,7 +3205,7 @@ bool PMPovrayParser::parseSor( PMSurfaceOfRevolution* pNewSor )
if( !parseInt( nump ) )
return false;
- QValueList<PMVector> points;
+ TQValueList<PMVector> points;
for( i = 0; i < nump; i++ )
{
parseToken( ',' );
@@ -3219,9 +3219,9 @@ bool PMPovrayParser::parseSor( PMSurfaceOfRevolution* pNewSor )
printError( i18n( "At least 4 points are needed for the surface of revolution" ) );
else
{
- QValueList<PMVector>::Iterator it1 = points.begin( );
- QValueList<PMVector>::Iterator it2 = it1; ++it2;
- QValueList<PMVector>::Iterator it3 = it2; ++it3;
+ TQValueList<PMVector>::Iterator it1 = points.begin( );
+ TQValueList<PMVector>::Iterator it2 = it1; ++it2;
+ TQValueList<PMVector>::Iterator it3 = it2; ++it3;
int pnr = 0;
for( ; it3 != points.end( ); ++it1, ++it2, ++it3, pnr++ )
@@ -3740,7 +3740,7 @@ bool PMPovrayParser::parseTexture( PMTexture* texture, bool parseOuter )
if( m_token == ID_TOK )
{
- QString id( m_pScanner->sValue( ) );
+ TQString id( m_pScanner->sValue( ) );
PMDeclare* decl = checkLink( id );
if( decl )
{
@@ -4396,7 +4396,7 @@ bool PMPovrayParser::parsePigment( PMPigment* pigment, bool parseOuter )
if( m_token == ID_TOK )
{
- QString id( m_pScanner->sValue( ) );
+ TQString id( m_pScanner->sValue( ) );
PMSymbol* s = getSymbol( id );
bool skipID = false;
@@ -4477,7 +4477,7 @@ bool PMPovrayParser::parseNormal( PMNormal* normal )
if( m_token == ID_TOK )
{
- QString id( m_pScanner->sValue( ) );
+ TQString id( m_pScanner->sValue( ) );
PMDeclare* decl = checkLink( id );
if( decl )
{
@@ -4526,7 +4526,7 @@ bool PMPovrayParser::parseTextureMap( PMTextureMap* textureMap )
int oldConsumed;
double f_number1;
PMTexture* texture;
- QValueList<double> mapValues;
+ TQValueList<double> mapValues;
if( !parseToken( TEXTURE_MAP_TOK, "texture_map" ) )
return false;
@@ -4535,7 +4535,7 @@ bool PMPovrayParser::parseTextureMap( PMTextureMap* textureMap )
if( m_token == ID_TOK )
{
- QString id( m_pScanner->sValue( ) );
+ TQString id( m_pScanner->sValue( ) );
PMDeclare* decl = checkLink( id );
if( decl )
{
@@ -4582,7 +4582,7 @@ bool PMPovrayParser::parsePigmentMap( PMPigmentMap* pigmentMap )
int oldConsumed;
double f_number1;
PMPigment* pigment;
- QValueList<double> mapValues;
+ TQValueList<double> mapValues;
if( !parseToken( PIGMENT_MAP_TOK, "pigment_map" ) )
return false;
@@ -4591,7 +4591,7 @@ bool PMPovrayParser::parsePigmentMap( PMPigmentMap* pigmentMap )
if( m_token == ID_TOK )
{
- QString id( m_pScanner->sValue( ) );
+ TQString id( m_pScanner->sValue( ) );
PMDeclare* decl = checkLink( id );
if( decl )
{
@@ -4635,7 +4635,7 @@ bool PMPovrayParser::parseNormalMap( PMNormalMap* normalMap )
int oldConsumed;
double f_number1;
PMNormal* normal;
- QValueList<double> mapValues;
+ TQValueList<double> mapValues;
if( !parseToken( NORMAL_MAP_TOK, "normal_map" ) )
return false;
@@ -4644,7 +4644,7 @@ bool PMPovrayParser::parseNormalMap( PMNormalMap* normalMap )
if( m_token == ID_TOK )
{
- QString id( m_pScanner->sValue( ) );
+ TQString id( m_pScanner->sValue( ) );
PMDeclare* decl = checkLink( id );
if( decl )
{
@@ -4935,7 +4935,7 @@ bool PMPovrayParser::parseSlopeMap( PMSlopeMap* slopeMap )
int oldConsumed;
double f_number1;
PMSlope* slope;
- QValueList<double> mapValues;
+ TQValueList<double> mapValues;
if( !parseToken( SLOPE_MAP_TOK, "slope_map" ) )
return false;
@@ -4944,7 +4944,7 @@ bool PMPovrayParser::parseSlopeMap( PMSlopeMap* slopeMap )
if( m_token == ID_TOK )
{
- QString id( m_pScanner->sValue( ) );
+ TQString id( m_pScanner->sValue( ) );
PMDeclare* decl = checkLink( id );
if( decl )
{
@@ -4991,7 +4991,7 @@ bool PMPovrayParser::parseDensityMap( PMDensityMap* densityMap )
int oldConsumed;
double f_number1;
PMDensity* density;
- QValueList<double> mapValues;
+ TQValueList<double> mapValues;
if( !parseToken( DENSITY_MAP_TOK, "density_map" ) )
return false;
@@ -5000,7 +5000,7 @@ bool PMPovrayParser::parseDensityMap( PMDensityMap* densityMap )
if( m_token == ID_TOK )
{
- QString id( m_pScanner->sValue( ) );
+ TQString id( m_pScanner->sValue( ) );
PMDeclare* decl = checkLink( id );
if( decl )
{
@@ -5048,8 +5048,8 @@ bool PMPovrayParser::parseImageMap( PMImageMap* imageMap )
int i_number;
double f_number;
PMPaletteValue newPaletteValue;
- QValueList<PMPaletteValue> l_valuesFilter;
- QValueList<PMPaletteValue> l_valuesTransmit;
+ TQValueList<PMPaletteValue> l_valuesFilter;
+ TQValueList<PMPaletteValue> l_valuesTransmit;
if( !parseToken( IMAGE_MAP_TOK, "image_map" ) )
return false;
@@ -5353,7 +5353,7 @@ bool PMPovrayParser::parseColorMap( PMColorMap* colorMap )
PMColor color1, color2;
PMSolidColor* solidColor;
PMSolidColor* lastColor = 0;
- QValueList<double> mapValues;
+ TQValueList<double> mapValues;
bool newEntry;
bool twoColors;
@@ -5365,7 +5365,7 @@ bool PMPovrayParser::parseColorMap( PMColorMap* colorMap )
if( m_token == ID_TOK )
{
- QString id( m_pScanner->sValue( ) );
+ TQString id( m_pScanner->sValue( ) );
PMDeclare* decl = checkLink( id );
if( decl )
{
@@ -5482,7 +5482,7 @@ bool PMPovrayParser::parseSkySphere( PMSkySphere* sky )
if( m_token == ID_TOK )
{
- QString id( m_pScanner->sValue( ) );
+ TQString id( m_pScanner->sValue( ) );
PMDeclare* decl = checkLink( id );
if( decl )
{
@@ -5518,7 +5518,7 @@ bool PMPovrayParser::parseRainbow( PMRainbow* rainbow )
if( m_token == ID_TOK )
{
- QString id( m_pScanner->sValue( ) );
+ TQString id( m_pScanner->sValue( ) );
PMDeclare* decl = checkLink( id );
if( decl )
{
@@ -5626,7 +5626,7 @@ bool PMPovrayParser::parseFog( PMFog* fog )
if( m_token == ID_TOK )
{
- QString id( m_pScanner->sValue( ) );
+ TQString id( m_pScanner->sValue( ) );
PMDeclare* decl = checkLink( id );
if( decl )
{
@@ -5752,7 +5752,7 @@ bool PMPovrayParser::parseMedia( PMMedia* media )
if( m_token == ID_TOK )
{
- QString id( m_pScanner->sValue( ) );
+ TQString id( m_pScanner->sValue( ) );
PMDeclare* decl = checkLink( id );
if( decl )
{
@@ -5880,7 +5880,7 @@ bool PMPovrayParser::parseDensity( PMDensity* density )
if( m_token == ID_TOK )
{
- QString id( m_pScanner->sValue( ) );
+ TQString id( m_pScanner->sValue( ) );
PMDeclare* decl = checkLink( id );
if( decl )
{
@@ -5916,7 +5916,7 @@ bool PMPovrayParser::parseInterior( PMInterior* interior )
if( m_token == ID_TOK )
{
- QString id( m_pScanner->sValue( ) );
+ TQString id( m_pScanner->sValue( ) );
PMDeclare* decl = checkLink( id );
if( decl )
{
@@ -6004,7 +6004,7 @@ bool PMPovrayParser::parseMaterial( PMMaterial* material )
if( m_token == ID_TOK )
{
- QString id( m_pScanner->sValue( ) );
+ TQString id( m_pScanner->sValue( ) );
PMDeclare* decl = checkLink( id );
if( decl )
{
@@ -6150,7 +6150,7 @@ bool PMPovrayParser::parseFinish( PMFinish* finish )
// Parse a possible declare link identifier
if( m_token == ID_TOK )
{
- QString id( m_pScanner->sValue( ) );
+ TQString id( m_pScanner->sValue( ) );
PMDeclare* decl = checkLink( id );
if( decl )
{
@@ -6640,7 +6640,7 @@ bool PMPovrayParser::parseObjectLink( PMObjectLink* link )
return false;
}
- QString id( m_pScanner->sValue( ) );
+ TQString id( m_pScanner->sValue( ) );
PMDeclare* decl = checkLink( id );
if( decl )
{
@@ -6692,7 +6692,7 @@ bool PMPovrayParser::parseIsoSurface( PMIsoSurface* iso )
nextToken( );
if( m_token != FUNCTION_TOK )
return false;
- iso->setFunction( QString( m_pScanner->sValue( ) ).simplifyWhiteSpace( ) );
+ iso->setFunction( TQString( m_pScanner->sValue( ) ).simplifyWhiteSpace( ) );
nextToken( );
parseToken( '}' );
@@ -7105,8 +7105,8 @@ bool PMPovrayParser::parseInteriorTexture( PMInteriorTexture* it )
bool PMPovrayParser::parseSphereSweep( PMSphereSweep* ss )
{
int oldConsumed, numspheres;
- QValueList<PMVector> points;
- QValueList<double> radii;
+ TQValueList<PMVector> points;
+ TQValueList<double> radii;
PMVector point;
double f;
diff --git a/kpovmodeler/pmpovrayparser.h b/kpovmodeler/pmpovrayparser.h
index b41beaf9..72306508 100644
--- a/kpovmodeler/pmpovrayparser.h
+++ b/kpovmodeler/pmpovrayparser.h
@@ -117,11 +117,11 @@ public:
/**
* Parser that parses the device
*/
- PMPovrayParser( PMPart* part, QIODevice* device );
+ PMPovrayParser( PMPart* part, TQIODevice* device );
/**
* Parser that parses the byte array
*/
- PMPovrayParser( PMPart* part, const QByteArray& array );
+ PMPovrayParser( PMPart* part, const TQByteArray& array );
/**
* Deletes the parser
*/
@@ -179,7 +179,7 @@ private:
* If t is not a single character token, set tokenName to the token
* name (like "box", "sphere" ...)
*/
- bool parseToken( int t, const QString& tokenName = QString::null );
+ bool parseToken( int t, const TQString& tokenName = TQString::null );
/**
* Parses an item of a vector, float or color expression
@@ -520,10 +520,10 @@ private:
/**
* All comments are skipped during parsing and stored here
*/
- QPtrList<PMComment> m_skippedComments;
+ TQPtrList<PMComment> m_skippedComments;
/**
* The last skipped comment text with special kpovmodeler tags*/
- QString m_lastPMComment;
+ TQString m_lastPMComment;
/**
* true if m_lastPMComment is empty
*/
diff --git a/kpovmodeler/pmpovrayrenderwidget.cpp b/kpovmodeler/pmpovrayrenderwidget.cpp
index 3cd44f20..7581cbea 100644
--- a/kpovmodeler/pmpovrayrenderwidget.cpp
+++ b/kpovmodeler/pmpovrayrenderwidget.cpp
@@ -26,10 +26,10 @@
#include <kconfig.h>
#include <kurl.h>
#include <ktempfile.h>
-#include <qcolor.h>
-#include <qpainter.h>
-#include <qtextstream.h>
-#include <qdragobject.h>
+#include <tqcolor.h>
+#include <tqpainter.h>
+#include <tqtextstream.h>
+#include <tqdragobject.h>
#ifdef KDE_NO_COMPAT
#undef KDE_NO_COMPAT
@@ -37,10 +37,10 @@
#include <kapplication.h>
-QString PMPovrayRenderWidget::s_povrayCommand = c_defaultPovrayCommand;
-QStringList PMPovrayRenderWidget::s_libraryPaths;
+TQString PMPovrayRenderWidget::s_povrayCommand = c_defaultPovrayCommand;
+TQStringList PMPovrayRenderWidget::s_libraryPaths;
-PMPovrayRenderWidget::PMPovrayRenderWidget( QWidget* parent, const char* name )
+PMPovrayRenderWidget::PMPovrayRenderWidget( TQWidget* parent, const char* name )
: PMDragWidget( parent, name )
{
m_pProcess = 0;
@@ -50,7 +50,7 @@ PMPovrayRenderWidget::PMPovrayRenderWidget( QWidget* parent, const char* name )
m_bPixmapUpToDate = false;
m_pTempFile = 0;
- setBackgroundColor( QColor( 0, 0, 0 ) );
+ setBackgroundColor( TQColor( 0, 0, 0 ) );
}
PMPovrayRenderWidget::~PMPovrayRenderWidget( )
@@ -58,7 +58,7 @@ PMPovrayRenderWidget::~PMPovrayRenderWidget( )
cleanup( );
}
-bool PMPovrayRenderWidget::render( const QByteArray& scene,
+bool PMPovrayRenderWidget::render( const TQByteArray& scene,
const PMRenderMode& m,
const KURL& documentURL )
{
@@ -74,8 +74,8 @@ bool PMPovrayRenderWidget::render( const QByteArray& scene,
}
// output to tmp file
- m_pTempFile = new KTempFile( QString::null, ".pov" );
- QDataStream* dstr = m_pTempFile->dataStream( );
+ m_pTempFile = new KTempFile( TQString::null, ".pov" );
+ TQDataStream* dstr = m_pTempFile->dataStream( );
if( ( m_pTempFile->status( ) != 0 ) || !dstr )
{
@@ -87,29 +87,29 @@ bool PMPovrayRenderWidget::render( const QByteArray& scene,
m_pTempFile->close( );
m_pProcess = new KProcess( );
- connect( m_pProcess, SIGNAL( receivedStdout( KProcess*, char*, int ) ),
- SLOT( slotPovrayImage( KProcess*, char*, int ) ) );
- connect( m_pProcess, SIGNAL( receivedStderr( KProcess*, char*, int ) ),
- SLOT( slotPovrayMessage( KProcess*, char*, int ) ) );
- connect( m_pProcess, SIGNAL( processExited( KProcess* ) ),
- SLOT( slotRenderingFinished( KProcess* ) ) );
+ connect( m_pProcess, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
+ TQT_SLOT( slotPovrayImage( KProcess*, char*, int ) ) );
+ connect( m_pProcess, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ),
+ TQT_SLOT( slotPovrayMessage( KProcess*, char*, int ) ) );
+ connect( m_pProcess, TQT_SIGNAL( processExited( KProcess* ) ),
+ TQT_SLOT( slotRenderingFinished( KProcess* ) ) );
*m_pProcess << s_povrayCommand;
- QStringList::ConstIterator it;
- QStringList args = m_renderMode.commandLineSwitches( );
+ TQStringList::ConstIterator it;
+ TQStringList args = m_renderMode.commandLineSwitches( );
for( it = args.begin( ); it != args.end( ); ++it )
*m_pProcess << *it;
for( it = s_libraryPaths.begin( ); it != s_libraryPaths.end( ); ++it )
{
- QString path = *it;
- if( path != QString( "/" ) )
- if( path.right( 1 ) == QString( "/" ) )
+ TQString path = *it;
+ if( path != TQString( "/" ) )
+ if( path.right( 1 ) == TQString( "/" ) )
path.truncate( path.length( ) - 1 );
- *m_pProcess << ( QString( "+L" ) + path );
+ *m_pProcess << ( TQString( "+L" ) + path );
}
- *m_pProcess << QString( "+I" ) + m_pTempFile->name( ) << "+O-" << "+FT"
+ *m_pProcess << TQString( "+I" ) + m_pTempFile->name( ) << "+O-" << "+FT"
<< "+K0.0" << "+KFI1" << "+KFF1" << "+KI0.0" << "+KF0.0"
<< "+SF1" << "+EF1" << "-KC" << "-D";
@@ -182,7 +182,7 @@ void PMPovrayRenderWidget::resumeRendering( )
void PMPovrayRenderWidget::slotPovrayMessage( KProcess*,
char* buffer, int buflen )
{
- QString str;
+ TQString str;
str.setLatin1( buffer, buflen );
m_povrayOutput += str;
emit povrayMessage( str );
@@ -289,7 +289,7 @@ void PMPovrayRenderWidget::slotPovrayImage( KProcess*, char* buffer, int buflen
if( m_line != oldLine )
{
- QPainter paint( this );
+ TQPainter paint( this );
int offset = 0;
if( m_renderMode.subSection( ) )
{
@@ -367,7 +367,7 @@ void PMPovrayRenderWidget::slotRenderingFinished( KProcess* )
cleanup( );
}
-void PMPovrayRenderWidget::paintEvent( QPaintEvent* ev )
+void PMPovrayRenderWidget::paintEvent( TQPaintEvent* ev )
{
if( !m_bPixmapUpToDate )
{
@@ -393,11 +393,11 @@ void PMPovrayRenderWidget::cleanup( )
m_pTempFile = 0;
}
-QSize PMPovrayRenderWidget::sizeHint( ) const
+TQSize PMPovrayRenderWidget::sizeHint( ) const
{
- QSize s;
+ TQSize s;
if( m_image.isNull( ) )
- s = QSize( 200, 200 );
+ s = TQSize( 200, 200 );
else
s = m_image.size( );
@@ -430,7 +430,7 @@ void PMPovrayRenderWidget::restoreConfig( KConfig* cfg )
void PMPovrayRenderWidget::startDrag( )
{
- QImageDrag* d = new QImageDrag( m_image, this );
+ TQImageDrag* d = new TQImageDrag( m_image, this );
d->dragCopy( );
}
diff --git a/kpovmodeler/pmpovrayrenderwidget.h b/kpovmodeler/pmpovrayrenderwidget.h
index 23e30721..cc447b06 100644
--- a/kpovmodeler/pmpovrayrenderwidget.h
+++ b/kpovmodeler/pmpovrayrenderwidget.h
@@ -22,11 +22,11 @@
#include <config.h>
#endif
-#include <qwidget.h>
-#include <qcstring.h>
-#include <qimage.h>
-#include <qbuffer.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqcstring.h>
+#include <tqimage.h>
+#include <tqbuffer.h>
+#include <tqstringlist.h>
#include "pmrendermode.h"
#include "pmdragwidget.h"
@@ -47,7 +47,7 @@ public:
/**
* Standard constructor
*/
- PMPovrayRenderWidget( QWidget* parent = 0, const char* name = 0 );
+ PMPovrayRenderWidget( TQWidget* parent = 0, const char* name = 0 );
/**
* destructor
*/
@@ -58,17 +58,17 @@ public:
* render mode m.
* @see PMRenderMode
*/
- bool render( const QByteArray& scene, const PMRenderMode& m,
+ bool render( const TQByteArray& scene, const PMRenderMode& m,
const KURL& documentURL );
/**
* Returns the povray text output
*/
- QString povrayOutput( ) const { return m_povrayOutput; }
+ TQString povrayOutput( ) const { return m_povrayOutput; }
/**
* Returns the rendered image
*/
- QImage image( ) const { return m_image; }
+ TQImage image( ) const { return m_image; }
static void saveConfig( KConfig* cfg );
static void restoreConfig( KConfig* cfg );
@@ -76,21 +76,21 @@ public:
/**
* Returns the povray command
*/
- static QString povrayCommand( ) { return s_povrayCommand; }
+ static TQString povrayCommand( ) { return s_povrayCommand; }
/**
* Sets the povray command
*/
- static void setPovrayCommand( const QString& c ) { s_povrayCommand = c; }
+ static void setPovrayCommand( const TQString& c ) { s_povrayCommand = c; }
/**
* Returns the library paths
*/
- static QStringList povrayLibraryPaths( ) { return s_libraryPaths; }
+ static TQStringList povrayLibraryPaths( ) { return s_libraryPaths; }
/**
* Sets the library paths
*/
- static void setPovrayLibraryPaths( const QStringList& slist )
+ static void setPovrayLibraryPaths( const TQStringList& slist )
{ s_libraryPaths = slist; }
- virtual QSize sizeHint( ) const;
+ virtual TQSize sizeHint( ) const;
virtual void startDrag( );
signals:
@@ -109,7 +109,7 @@ signals:
/**
* The povray output text
*/
- void povrayMessage( const QString& msg );
+ void povrayMessage( const TQString& msg );
public slots:
/**
@@ -144,7 +144,7 @@ protected slots:
void slotRenderingFinished( KProcess* proc );
protected:
- virtual void paintEvent( QPaintEvent* );
+ virtual void paintEvent( TQPaintEvent* );
private:
void setPixel( int x, int y, uint c );
@@ -153,7 +153,7 @@ private:
KProcess* m_pProcess;
bool m_bSuspended;
PMRenderMode m_renderMode;
- QImage m_image;
+ TQImage m_image;
bool m_rcvHeader;
unsigned char m_header[18];
int m_rcvHeaderBytes;
@@ -165,13 +165,13 @@ private:
int m_numRestBytes;
int m_line;
int m_column;
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
bool m_bPixmapUpToDate;
- QString m_povrayOutput;
+ TQString m_povrayOutput;
KTempFile* m_pTempFile;
- static QString s_povrayCommand;
- static QStringList s_libraryPaths;
+ static TQString s_povrayCommand;
+ static TQStringList s_libraryPaths;
};
#endif
diff --git a/kpovmodeler/pmpovraysettings.cpp b/kpovmodeler/pmpovraysettings.cpp
index 0b2824ae..607c5752 100644
--- a/kpovmodeler/pmpovraysettings.cpp
+++ b/kpovmodeler/pmpovraysettings.cpp
@@ -23,94 +23,94 @@
#include "pmresourcelocator.h"
#include "pmtext.h"
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlistbox.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kmessagebox.h>
#include <kfiledialog.h>
-PMPovraySettings::PMPovraySettings( QWidget* parent, const char* name )
+PMPovraySettings::PMPovraySettings( TQWidget* parent, const char* name )
: PMSettingsDialogPage( parent, name )
{
m_selectionIndex = 0;
- QHBoxLayout* hlayout;
- QVBoxLayout* vlayout;
- QVBoxLayout* gvl;
- QGroupBox* gb;
+ TQHBoxLayout* hlayout;
+ TQVBoxLayout* vlayout;
+ TQVBoxLayout* gvl;
+ TQGroupBox* gb;
- vlayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) );
+ vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) );
- gb = new QGroupBox( i18n( "Povray Command" ), this );
- gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
+ gb = new TQGroupBox( i18n( "Povray Command" ), this );
+ gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
gvl->addSpacing( 10 );
- hlayout = new QHBoxLayout( gvl );
- hlayout->addWidget( new QLabel( i18n( "Command:" ), gb ) );
- m_pPovrayCommand = new QLineEdit( gb );
+ hlayout = new TQHBoxLayout( gvl );
+ hlayout->addWidget( new TQLabel( i18n( "Command:" ), gb ) );
+ m_pPovrayCommand = new TQLineEdit( gb );
hlayout->addWidget( m_pPovrayCommand );
- m_pBrowsePovrayCommand = new QPushButton( gb );
+ m_pBrowsePovrayCommand = new TQPushButton( gb );
m_pBrowsePovrayCommand->setPixmap( SmallIcon( "fileopen" ) );
- connect( m_pBrowsePovrayCommand, SIGNAL( clicked( ) ),
- SLOT( slotBrowsePovrayCommand( ) ) );
+ connect( m_pBrowsePovrayCommand, TQT_SIGNAL( clicked( ) ),
+ TQT_SLOT( slotBrowsePovrayCommand( ) ) );
hlayout->addWidget( m_pBrowsePovrayCommand );
vlayout->addWidget( gb );
- gb = new QGroupBox( i18n( "Povray User Documentation" ), this );
- gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
+ gb = new TQGroupBox( i18n( "Povray User Documentation" ), this );
+ gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
gvl->addSpacing( 10 );
- hlayout = new QHBoxLayout( gvl );
- hlayout->addWidget( new QLabel( i18n( "Path:" ), gb ) );
- m_pDocumentationPath = new QLineEdit( gb );
+ hlayout = new TQHBoxLayout( gvl );
+ hlayout->addWidget( new TQLabel( i18n( "Path:" ), gb ) );
+ m_pDocumentationPath = new TQLineEdit( gb );
hlayout->addWidget( m_pDocumentationPath );
- m_pBrowseDocumentationPath = new QPushButton( gb );
+ m_pBrowseDocumentationPath = new TQPushButton( gb );
m_pBrowseDocumentationPath->setPixmap( SmallIcon( "fileopen" ) );
- connect( m_pBrowseDocumentationPath, SIGNAL( clicked( ) ),
- SLOT( slotBrowsePovrayDocumentation( ) ) );
+ connect( m_pBrowseDocumentationPath, TQT_SIGNAL( clicked( ) ),
+ TQT_SLOT( slotBrowsePovrayDocumentation( ) ) );
hlayout->addWidget( m_pBrowseDocumentationPath );
vlayout->addWidget( gb );
- hlayout = new QHBoxLayout( gvl );
- hlayout->addWidget( new QLabel( i18n( "Version:" ), gb ) );
- m_pDocumentationVersion = new QComboBox( false, gb );
- QValueList<QString> versions = PMDocumentationMap::theMap( )->availableVersions( );
- QValueListIterator<QString> it;
+ hlayout = new TQHBoxLayout( gvl );
+ hlayout->addWidget( new TQLabel( i18n( "Version:" ), gb ) );
+ m_pDocumentationVersion = new TQComboBox( false, gb );
+ TQValueList<TQString> versions = PMDocumentationMap::theMap( )->availableVersions( );
+ TQValueListIterator<TQString> it;
for( it = versions.begin( ); it != versions.end( ); ++it )
m_pDocumentationVersion->insertItem( *it );
hlayout->addWidget( m_pDocumentationVersion );
hlayout->addStretch( );
- gb = new QGroupBox( i18n( "Library Paths" ), this );
- gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
+ gb = new TQGroupBox( i18n( "Library Paths" ), this );
+ gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
gvl->addSpacing( 10 );
- hlayout = new QHBoxLayout( gvl );
- m_pLibraryPaths = new QListBox( gb );
- connect( m_pLibraryPaths, SIGNAL( highlighted( int ) ),
- SLOT( slotPathSelected( int ) ) );
+ hlayout = new TQHBoxLayout( gvl );
+ m_pLibraryPaths = new TQListBox( gb );
+ connect( m_pLibraryPaths, TQT_SIGNAL( highlighted( int ) ),
+ TQT_SLOT( slotPathSelected( int ) ) );
hlayout->addWidget( m_pLibraryPaths );
- QVBoxLayout* bl = new QVBoxLayout( hlayout );
- m_pAddLibraryPath = new QPushButton( i18n( "Add..." ), gb );
- connect( m_pAddLibraryPath, SIGNAL( clicked( ) ), SLOT( slotAddPath( ) ) );
+ TQVBoxLayout* bl = new TQVBoxLayout( hlayout );
+ m_pAddLibraryPath = new TQPushButton( i18n( "Add..." ), gb );
+ connect( m_pAddLibraryPath, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPath( ) ) );
bl->addWidget( m_pAddLibraryPath );
- m_pRemoveLibraryPath = new QPushButton( i18n( "Remove" ), gb );
- connect( m_pRemoveLibraryPath, SIGNAL( clicked( ) ),
- SLOT( slotRemovePath( ) ) );
+ m_pRemoveLibraryPath = new TQPushButton( i18n( "Remove" ), gb );
+ connect( m_pRemoveLibraryPath, TQT_SIGNAL( clicked( ) ),
+ TQT_SLOT( slotRemovePath( ) ) );
bl->addWidget( m_pRemoveLibraryPath );
- m_pChangeLibraryPath = new QPushButton( i18n( "Edit..." ), gb );
- connect( m_pChangeLibraryPath, SIGNAL( clicked( ) ),
- SLOT( slotEditPath( ) ) );
+ m_pChangeLibraryPath = new TQPushButton( i18n( "Edit..." ), gb );
+ connect( m_pChangeLibraryPath, TQT_SIGNAL( clicked( ) ),
+ TQT_SLOT( slotEditPath( ) ) );
bl->addWidget( m_pChangeLibraryPath );
- m_pLibraryPathUp = new QPushButton( i18n( "Up" ), gb );
- connect( m_pLibraryPathUp, SIGNAL( clicked( ) ), SLOT( slotPathUp( ) ) );
+ m_pLibraryPathUp = new TQPushButton( i18n( "Up" ), gb );
+ connect( m_pLibraryPathUp, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotPathUp( ) ) );
bl->addWidget( m_pLibraryPathUp );
- m_pLibraryPathDown = new QPushButton( i18n( "Down" ), gb );
- connect( m_pLibraryPathDown, SIGNAL( clicked( ) ),
- SLOT( slotPathDown( ) ) );
+ m_pLibraryPathDown = new TQPushButton( i18n( "Down" ), gb );
+ connect( m_pLibraryPathDown, TQT_SIGNAL( clicked( ) ),
+ TQT_SLOT( slotPathDown( ) ) );
bl->addWidget( m_pLibraryPathDown );
bl->addStretch( 1 );
vlayout->addWidget( gb );
@@ -123,7 +123,7 @@ void PMPovraySettings::displaySettings( )
m_pPovrayCommand->setText( PMPovrayRenderWidget::povrayCommand( ) );
m_pDocumentationPath->setText( PMDocumentationMap::theMap( )->povrayDocumentationPath( ) );
int c = m_pDocumentationVersion->count( );
- QString s = PMDocumentationMap::theMap( )->documentationVersion( );
+ TQString s = PMDocumentationMap::theMap( )->documentationVersion( );
int i;
for( i = 0; i < c; i++ )
if( m_pDocumentationVersion->text( i ) == s )
@@ -132,8 +132,8 @@ void PMPovraySettings::displaySettings( )
bool sb = m_pLibraryPaths->signalsBlocked( );
m_pLibraryPaths->blockSignals( true );
m_pLibraryPaths->clear( );
- QStringList plist = PMPovrayRenderWidget::povrayLibraryPaths( );
- QStringList::ConstIterator it = plist.begin( );
+ TQStringList plist = PMPovrayRenderWidget::povrayLibraryPaths( );
+ TQStringList::ConstIterator it = plist.begin( );
m_selectionIndex = -1;
for( ; it != plist.end( ); ++it )
{
@@ -152,7 +152,7 @@ void PMPovraySettings::displayDefaults( )
{
m_pPovrayCommand->setText( c_defaultPovrayCommand );
m_pDocumentationVersion->setCurrentItem( 0 );
- m_pDocumentationPath->setText( QString::null );
+ m_pDocumentationPath->setText( TQString::null );
m_pLibraryPaths->clear();
}
@@ -169,7 +169,7 @@ void PMPovraySettings::applySettings( )
m_pDocumentationPath->text( ) );
PMDocumentationMap::theMap( )->setDocumentationVersion(
m_pDocumentationVersion->currentText( ) );
- QStringList plist;
+ TQStringList plist;
int num = ( signed ) m_pLibraryPaths->count( );
int i;
for( i = 0; i < num; i++ )
@@ -190,13 +190,13 @@ void PMPovraySettings::slotAddPath( )
KMessageBox::error( this, i18n( "Povray only supports up to 20 library paths." ) );
else
{
- QString path = KFileDialog::getExistingDirectory( QString::null, this );
+ TQString path = KFileDialog::getExistingDirectory( TQString::null, this );
if( !path.isEmpty( ) )
{
#if ( QT_VERSION >= 300 )
- QListBoxItem* item = m_pLibraryPaths->findItem( path, ExactMatch );
+ TQListBoxItem* item = m_pLibraryPaths->findItem( path, ExactMatch );
#else
- QListBoxItem* item = 0;
+ TQListBoxItem* item = 0;
#endif
if( !item )
{
@@ -219,10 +219,10 @@ void PMPovraySettings::slotRemovePath( )
void PMPovraySettings::slotPathUp( )
{
- QListBoxItem* lbi = m_pLibraryPaths->item( m_selectionIndex );
+ TQListBoxItem* lbi = m_pLibraryPaths->item( m_selectionIndex );
if( lbi )
{
- QString text = lbi->text( );
+ TQString text = lbi->text( );
m_pLibraryPaths->removeItem( m_selectionIndex );
if( m_selectionIndex > 0 )
m_selectionIndex--;
@@ -233,10 +233,10 @@ void PMPovraySettings::slotPathUp( )
void PMPovraySettings::slotPathDown( )
{
- QListBoxItem* lbi = m_pLibraryPaths->item( m_selectionIndex );
+ TQListBoxItem* lbi = m_pLibraryPaths->item( m_selectionIndex );
if( lbi )
{
- QString text = lbi->text( );
+ TQString text = lbi->text( );
m_pLibraryPaths->removeItem( m_selectionIndex );
if( ( unsigned ) m_selectionIndex < m_pLibraryPaths->count( ) )
m_selectionIndex++;
@@ -247,17 +247,17 @@ void PMPovraySettings::slotPathDown( )
void PMPovraySettings::slotEditPath( )
{
- QListBoxItem* lbi = m_pLibraryPaths->item( m_selectionIndex );
+ TQListBoxItem* lbi = m_pLibraryPaths->item( m_selectionIndex );
if( lbi )
{
- QString text = lbi->text( );
- QString path = KFileDialog::getExistingDirectory( text, this );
+ TQString text = lbi->text( );
+ TQString path = KFileDialog::getExistingDirectory( text, this );
if( !path.isEmpty( ) )
{
#if ( QT_VERSION >= 300 )
- QListBoxItem* item = m_pLibraryPaths->findItem( path, ExactMatch );
+ TQListBoxItem* item = m_pLibraryPaths->findItem( path, ExactMatch );
#else
- QListBoxItem* item = 0;
+ TQListBoxItem* item = 0;
#endif
if( !item )
m_pLibraryPaths->changeItem( path, m_selectionIndex );
@@ -270,7 +270,7 @@ void PMPovraySettings::slotEditPath( )
void PMPovraySettings::slotPathSelected( int index )
{
m_selectionIndex = index;
- QListBoxItem* lbi = m_pLibraryPaths->item( m_selectionIndex );
+ TQListBoxItem* lbi = m_pLibraryPaths->item( m_selectionIndex );
if( lbi )
{
m_pRemoveLibraryPath->setEnabled( true );
@@ -289,7 +289,7 @@ void PMPovraySettings::slotPathSelected( int index )
void PMPovraySettings::slotBrowsePovrayCommand( )
{
- QString str = KFileDialog::getOpenFileName( QString::null, QString::null );
+ TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null );
if( !str.isEmpty() )
{
@@ -299,7 +299,7 @@ void PMPovraySettings::slotBrowsePovrayCommand( )
void PMPovraySettings::slotBrowsePovrayDocumentation( )
{
- QString str = KFileDialog::getExistingDirectory( );
+ TQString str = KFileDialog::getExistingDirectory( );
if( !str.isEmpty( ) )
m_pDocumentationPath->setText( str );
diff --git a/kpovmodeler/pmpovraysettings.h b/kpovmodeler/pmpovraysettings.h
index cbe07827..6858eb5f 100644
--- a/kpovmodeler/pmpovraysettings.h
+++ b/kpovmodeler/pmpovraysettings.h
@@ -24,10 +24,10 @@
#include "pmsettingsdialog.h"
-class QLineEdit;
-class QPushButton;
-class QComboBox;
-class QListBox;
+class TQLineEdit;
+class TQPushButton;
+class TQComboBox;
+class TQListBox;
/**
* Povray configuration dialog page
@@ -39,7 +39,7 @@ public:
/**
* Default constructor
*/
- PMPovraySettings( QWidget* parent, const char* name = 0 );
+ PMPovraySettings( TQWidget* parent, const char* name = 0 );
/** */
virtual void displaySettings( );
/** */
@@ -81,17 +81,17 @@ protected slots:
void slotBrowsePovrayDocumentation( );
private:
- QLineEdit* m_pPovrayCommand;
- QPushButton* m_pBrowsePovrayCommand;
- QLineEdit* m_pDocumentationPath;
- QPushButton* m_pBrowseDocumentationPath;
- QComboBox* m_pDocumentationVersion;
- QListBox* m_pLibraryPaths;
- QPushButton* m_pAddLibraryPath;
- QPushButton* m_pRemoveLibraryPath;
- QPushButton* m_pChangeLibraryPath;
- QPushButton* m_pLibraryPathUp;
- QPushButton* m_pLibraryPathDown;
+ TQLineEdit* m_pPovrayCommand;
+ TQPushButton* m_pBrowsePovrayCommand;
+ TQLineEdit* m_pDocumentationPath;
+ TQPushButton* m_pBrowseDocumentationPath;
+ TQComboBox* m_pDocumentationVersion;
+ TQListBox* m_pLibraryPaths;
+ TQPushButton* m_pAddLibraryPath;
+ TQPushButton* m_pRemoveLibraryPath;
+ TQPushButton* m_pChangeLibraryPath;
+ TQPushButton* m_pLibraryPathUp;
+ TQPushButton* m_pLibraryPathDown;
int m_selectionIndex;
};
diff --git a/kpovmodeler/pmpovraywidget.cpp b/kpovmodeler/pmpovraywidget.cpp
index d50edc7e..cd1232e4 100644
--- a/kpovmodeler/pmpovraywidget.cpp
+++ b/kpovmodeler/pmpovraywidget.cpp
@@ -30,25 +30,25 @@
#include <kpushbutton.h>
#include <kstdguiitem.h>
-#include <qlayout.h>
-#include <qprogressbar.h>
-#include <qlabel.h>
-#include <qscrollview.h>
-#include <qtimer.h>
-#include <qapplication.h>
+#include <tqlayout.h>
+#include <tqprogressbar.h>
+#include <tqlabel.h>
+#include <tqscrollview.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
const int timerIntervall = 1000;
bool PMPovrayWidget::s_imageFormatsRegistered = false;
-PMPovrayWidget::PMPovrayWidget( QWidget* parent, const char* name )
+PMPovrayWidget::PMPovrayWidget( TQWidget* parent, const char* name )
: KDialog( parent, name )
{
- QVBoxLayout* topLayout = new QVBoxLayout( this, KDialog::marginHint( ), KDialog::spacingHint( ) );
+ TQVBoxLayout* topLayout = new TQVBoxLayout( this, KDialog::marginHint( ), KDialog::spacingHint( ) );
topLayout->addStretch( );
- QHBoxLayout* renderLayout = new QHBoxLayout( );
+ TQHBoxLayout* renderLayout = new TQHBoxLayout( );
topLayout->addLayout( renderLayout, 2 );
- m_pScrollView = new QScrollView( this );
+ m_pScrollView = new TQScrollView( this );
m_pScrollView->setBackgroundMode( PaletteBase );
renderLayout->addWidget( m_pScrollView, 2 );
m_pRenderWidget = new PMPovrayRenderWidget( m_pScrollView->viewport( ) );
@@ -56,54 +56,54 @@ PMPovrayWidget::PMPovrayWidget( QWidget* parent, const char* name )
m_pScrollView->addChild( m_pRenderWidget );
topLayout->addStretch( );
- QHBoxLayout* progressLayout = new QHBoxLayout( topLayout );
- m_pProgressBar = new QProgressBar( this );
+ TQHBoxLayout* progressLayout = new TQHBoxLayout( topLayout );
+ m_pProgressBar = new TQProgressBar( this );
m_pProgressBar->hide( );
progressLayout->addWidget( m_pProgressBar, 1 );
- m_pProgressLabel = new QLabel( this );
+ m_pProgressLabel = new TQLabel( this );
progressLayout->addWidget( m_pProgressLabel, 2 );
- QHBoxLayout* buttonLayout = new QHBoxLayout( topLayout );
- m_pStopButton = new QPushButton( i18n( "Stop" ), this );
+ TQHBoxLayout* buttonLayout = new TQHBoxLayout( topLayout );
+ m_pStopButton = new TQPushButton( i18n( "Stop" ), this );
m_pStopButton->setEnabled( false );
buttonLayout->addWidget( m_pStopButton );
- m_pSuspendButton = new QPushButton( i18n( "Suspend" ), this );
+ m_pSuspendButton = new TQPushButton( i18n( "Suspend" ), this );
m_pSuspendButton->setEnabled( false );
buttonLayout->addWidget( m_pSuspendButton );
- m_pResumeButton = new QPushButton( i18n( "Resume" ), this );
+ m_pResumeButton = new TQPushButton( i18n( "Resume" ), this );
m_pResumeButton->setEnabled( false );
buttonLayout->addWidget( m_pResumeButton );
buttonLayout->addStretch( 1 );
- m_pPovrayOutputButton = new QPushButton( i18n( "Povray Output" ), this );
+ m_pPovrayOutputButton = new TQPushButton( i18n( "Povray Output" ), this );
buttonLayout->addWidget( m_pPovrayOutputButton );
- buttonLayout = new QHBoxLayout( topLayout );
+ buttonLayout = new TQHBoxLayout( topLayout );
m_pSaveButton = new KPushButton( KStdGuiItem::saveAs(), this );
m_pSaveButton->setEnabled( false );
buttonLayout->addWidget( m_pSaveButton );
buttonLayout->addStretch( 1 );
- QPushButton* closeButton = new KPushButton( KStdGuiItem::close(), this );
+ TQPushButton* closeButton = new KPushButton( KStdGuiItem::close(), this );
buttonLayout->addWidget( closeButton );
- connect( m_pRenderWidget, SIGNAL( finished( int ) ),
- SLOT( slotRenderingFinished( int ) ) );
- connect( m_pRenderWidget, SIGNAL( progress( int ) ),
- SLOT( slotProgress( int ) ) );
- connect( m_pRenderWidget, SIGNAL( lineFinished( int ) ),
- SLOT( slotLineFinished( int ) ) );
-
- connect( m_pStopButton, SIGNAL( clicked( ) ), SLOT( slotStop( ) ) );
- connect( m_pSuspendButton, SIGNAL( clicked( ) ), SLOT( slotSuspend( ) ) );
- connect( m_pResumeButton, SIGNAL( clicked( ) ), SLOT( slotResume( ) ) );
- connect( m_pSaveButton, SIGNAL( clicked( ) ), SLOT( slotSave( ) ) );
- connect( closeButton, SIGNAL( clicked( ) ), SLOT( slotClose( ) ) );
- connect( m_pPovrayOutputButton, SIGNAL( clicked( ) ),
- SLOT( slotPovrayOutput( ) ) );
+ connect( m_pRenderWidget, TQT_SIGNAL( finished( int ) ),
+ TQT_SLOT( slotRenderingFinished( int ) ) );
+ connect( m_pRenderWidget, TQT_SIGNAL( progress( int ) ),
+ TQT_SLOT( slotProgress( int ) ) );
+ connect( m_pRenderWidget, TQT_SIGNAL( lineFinished( int ) ),
+ TQT_SLOT( slotLineFinished( int ) ) );
+
+ connect( m_pStopButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotStop( ) ) );
+ connect( m_pSuspendButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotSuspend( ) ) );
+ connect( m_pResumeButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotResume( ) ) );
+ connect( m_pSaveButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotSave( ) ) );
+ connect( closeButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotClose( ) ) );
+ connect( m_pPovrayOutputButton, TQT_SIGNAL( clicked( ) ),
+ TQT_SLOT( slotPovrayOutput( ) ) );
m_bRunning = false;
- m_pProgressTimer = new QTimer( this );
- connect( m_pProgressTimer, SIGNAL( timeout( ) ),
- SLOT( slotUpdateSpeed( ) ) );
+ m_pProgressTimer = new TQTimer( this );
+ connect( m_pProgressTimer, TQT_SIGNAL( timeout( ) ),
+ TQT_SLOT( slotUpdateSpeed( ) ) );
setCaption( i18n( "Render Window" ) );
@@ -111,8 +111,8 @@ PMPovrayWidget::PMPovrayWidget( QWidget* parent, const char* name )
m_stopped = false;
m_pPovrayOutputWidget = new PMPovrayOutputWidget( );
- connect( m_pRenderWidget, SIGNAL( povrayMessage( const QString& ) ),
- m_pPovrayOutputWidget, SLOT( slotText( const QString& ) ) );
+ connect( m_pRenderWidget, TQT_SIGNAL( povrayMessage( const TQString& ) ),
+ m_pPovrayOutputWidget, TQT_SLOT( slotText( const TQString& ) ) );
}
PMPovrayWidget::~PMPovrayWidget( )
@@ -120,7 +120,7 @@ PMPovrayWidget::~PMPovrayWidget( )
delete m_pPovrayOutputWidget;
}
-bool PMPovrayWidget::render( const QByteArray& scene, const PMRenderMode& m,
+bool PMPovrayWidget::render( const TQByteArray& scene, const PMRenderMode& m,
const KURL& documentURL )
{
bool updateSize = ( m_height != m.height( ) ) || ( m_width != m.width( ) );
@@ -131,7 +131,7 @@ bool PMPovrayWidget::render( const QByteArray& scene, const PMRenderMode& m,
m_stopped = false;
m_pRenderWidget->setFixedSize( m_width, m_height );
- QSize maxSize( m_width + m_pScrollView->frameWidth( ) * 2,
+ TQSize maxSize( m_width + m_pScrollView->frameWidth( ) * 2,
m_height + m_pScrollView->frameWidth( ) * 2 );
m_pScrollView->setMaximumSize( maxSize );
@@ -152,13 +152,13 @@ bool PMPovrayWidget::render( const QByteArray& scene, const PMRenderMode& m,
h += 16;
#if ( ( KDE_VERSION_MAJOR == 3 ) && ( KDE_VERSION_MINOR <= 1 ) )
- QWidget* dw = QApplication::desktop( );
+ TQWidget* dw = TQApplication::desktop( );
if( w > dw->width( ) )
w = dw->width( );
if( h > dw->height( ) )
h = dw->height( );
#else
- QRect dw = KGlobalSettings::desktopGeometry(this);
+ TQRect dw = KGlobalSettings::desktopGeometry(this);
if( w > dw.width() )
w = dw.width();
if( h > dw.height() )
@@ -178,7 +178,7 @@ bool PMPovrayWidget::render( const QByteArray& scene, const PMRenderMode& m,
m_pResumeButton->setEnabled( false );
m_pSaveButton->setEnabled( false );
- m_lastSpeedTime = QTime( );
+ m_lastSpeedTime = TQTime( );
m_pProgressTimer->start( timerIntervall, true );
m_speedInfo = false;
m_speed = 0;
@@ -205,7 +205,7 @@ void PMPovrayWidget::slotSuspend( )
m_pSaveButton->setEnabled( true );
m_pProgressTimer->stop( );
- m_lastSpeedTime = QTime( );
+ m_lastSpeedTime = TQTime( );
m_speedInfo = false;
m_immediateUpdate = false;
m_pProgressLabel->setText( i18n( "suspended" ) );
@@ -230,7 +230,7 @@ void PMPovrayWidget::slotClose( )
void PMPovrayWidget::slotSave( )
{
KTempFile* tempFile = 0;
- QFile* file = 0;
+ TQFile* file = 0;
bool ok = true;
if( !s_imageFormatsRegistered )
@@ -239,7 +239,7 @@ void PMPovrayWidget::slotSave( )
s_imageFormatsRegistered = true;
}
- KURL url = KFileDialog::getSaveURL( QString::null, KImageIO::pattern( KImageIO::Writing ) );
+ KURL url = KFileDialog::getSaveURL( TQString::null, KImageIO::pattern( KImageIO::Writing ) );
if( url.isEmpty( ) )
return;
if( !PMShell::overwriteURL( url ) )
@@ -251,7 +251,7 @@ void PMPovrayWidget::slotSave( )
return;
}
- QString format = KImageIO::type( url.fileName( ) );
+ TQString format = KImageIO::type( url.fileName( ) );
if( format.isEmpty( ) )
{
KMessageBox::error( this, i18n( "Unknown image format.\n"
@@ -268,7 +268,7 @@ void PMPovrayWidget::slotSave( )
if( url.isLocalFile( ) )
{
// Local file
- file = new QFile( url.path( ) );
+ file = new TQFile( url.path( ) );
if( !file->open( IO_WriteOnly ) )
ok = false;
}
@@ -285,7 +285,7 @@ void PMPovrayWidget::slotSave( )
if( ok )
{
- QImageIO iio( file, format.latin1( ) );
+ TQImageIO iio( file, format.latin1( ) );
iio.setImage( m_pRenderWidget->image( ) );
ok = iio.write( );
@@ -352,7 +352,7 @@ void PMPovrayWidget::slotProgress( int i )
void PMPovrayWidget::slotLineFinished( int line )
{
m_speedInfo = true;
- QTime ct = QTime::currentTime( );
+ TQTime ct = TQTime::currentTime( );
if( !m_lastSpeedTime.isNull( ) )
{
@@ -391,7 +391,7 @@ void PMPovrayWidget::slotUpdateSpeed( )
void PMPovrayWidget::showSpeed( double pps )
{
- QString num;
+ TQString num;
if( pps >= 1000000 )
{
num.setNum( pps / 100000, 'g', 3 );
diff --git a/kpovmodeler/pmpovraywidget.h b/kpovmodeler/pmpovraywidget.h
index 26d5bb1e..058e12ee 100644
--- a/kpovmodeler/pmpovraywidget.h
+++ b/kpovmodeler/pmpovraywidget.h
@@ -23,17 +23,17 @@
#endif
#include <kdialog.h>
-#include <qcstring.h>
-#include <qdatetime.h>
+#include <tqcstring.h>
+#include <tqdatetime.h>
class PMPovrayRenderWidget;
class PMPovrayOutputWidget;
class PMRenderMode;
-class QProgressBar;
-class QPushButton;
-class QLabel;
-class QScrollView;
+class TQProgressBar;
+class TQPushButton;
+class TQLabel;
+class TQScrollView;
class KURL;
/**
@@ -46,7 +46,7 @@ public:
/**
* Standard constructor
*/
- PMPovrayWidget( QWidget* parent = 0, const char* name = 0 );
+ PMPovrayWidget( TQWidget* parent = 0, const char* name = 0 );
/**
* Destructor
*/
@@ -57,7 +57,7 @@ public:
* render mode m.
* @see PMRenderMode
*/
- bool render( const QByteArray& scene, const PMRenderMode& m,
+ bool render( const TQByteArray& scene, const PMRenderMode& m,
const KURL& documentURL );
public slots:
@@ -80,18 +80,18 @@ protected:
private:
PMPovrayRenderWidget* m_pRenderWidget;
PMPovrayOutputWidget* m_pPovrayOutputWidget;
- QPushButton* m_pStopButton;
- QPushButton* m_pSuspendButton;
- QPushButton* m_pResumeButton;
- QPushButton* m_pSaveButton;
- QPushButton* m_pPovrayOutputButton;
- QProgressBar* m_pProgressBar;
- QLabel* m_pProgressLabel;
- QScrollView* m_pScrollView;
+ TQPushButton* m_pStopButton;
+ TQPushButton* m_pSuspendButton;
+ TQPushButton* m_pResumeButton;
+ TQPushButton* m_pSaveButton;
+ TQPushButton* m_pPovrayOutputButton;
+ TQProgressBar* m_pProgressBar;
+ TQLabel* m_pProgressLabel;
+ TQScrollView* m_pScrollView;
int m_height, m_width;
bool m_bRunning;
- QTime m_lastSpeedTime;
- QTimer* m_pProgressTimer;
+ TQTime m_lastSpeedTime;
+ TQTimer* m_pProgressTimer;
bool m_speedInfo;
bool m_immediateUpdate;
float m_speed;
diff --git a/kpovmodeler/pmpreviewsettings.cpp b/kpovmodeler/pmpreviewsettings.cpp
index 1254431e..700c19ee 100644
--- a/kpovmodeler/pmpreviewsettings.cpp
+++ b/kpovmodeler/pmpreviewsettings.cpp
@@ -21,90 +21,90 @@
#include "pmdialogeditbase.h"
#include "pmdefaults.h"
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
#include <kcolorbutton.h>
#include <klocale.h>
#include <kmessagebox.h>
-PMPreviewSettings::PMPreviewSettings( QWidget* parent, const char* name )
+PMPreviewSettings::PMPreviewSettings( TQWidget* parent, const char* name )
: PMSettingsDialogPage( parent, name )
{
- QHBoxLayout* hlayout;
- QVBoxLayout* vlayout;
- QVBoxLayout* gvl;
- QGridLayout* grid;
- QGroupBox* gb;
+ TQHBoxLayout* hlayout;
+ TQVBoxLayout* vlayout;
+ TQVBoxLayout* gvl;
+ TQGridLayout* grid;
+ TQGroupBox* gb;
- vlayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) );
+ vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) );
- hlayout = new QHBoxLayout( vlayout );
- grid = new QGridLayout( hlayout, 2, 2 );
- grid->addWidget( new QLabel( i18n( "Size:" ), this ), 0, 0 );
+ hlayout = new TQHBoxLayout( vlayout );
+ grid = new TQGridLayout( hlayout, 2, 2 );
+ grid->addWidget( new TQLabel( i18n( "Size:" ), this ), 0, 0 );
m_pPreviewSize = new PMIntEdit( this );
m_pPreviewSize->setValidation( true, 10, true, 400 );
grid->addWidget( m_pPreviewSize, 0, 1 );
- grid->addWidget( new QLabel( i18n( "Gamma:" ), this ), 1, 0 );
+ grid->addWidget( new TQLabel( i18n( "Gamma:" ), this ), 1, 0 );
m_pPreviewGamma = new PMFloatEdit( this );
grid->addWidget( m_pPreviewGamma, 1, 1 );
hlayout->addStretch( 1 );
- gb = new QGroupBox( i18n( "Rendered Objects" ), this );
+ gb = new TQGroupBox( i18n( "Rendered Objects" ), this );
vlayout->addWidget( gb );
- gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
+ gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
gvl->addSpacing( 10 );
- m_pPreviewSphere = new QCheckBox( i18n( "Sphere" ), gb );
+ m_pPreviewSphere = new TQCheckBox( i18n( "Sphere" ), gb );
gvl->addWidget( m_pPreviewSphere );
- m_pPreviewCylinder = new QCheckBox( i18n( "Cylinder" ), gb );
+ m_pPreviewCylinder = new TQCheckBox( i18n( "Cylinder" ), gb );
gvl->addWidget( m_pPreviewCylinder );
- m_pPreviewBox = new QCheckBox( i18n( "Box" ), gb );
+ m_pPreviewBox = new TQCheckBox( i18n( "Box" ), gb );
gvl->addWidget( m_pPreviewBox );
- gb = new QGroupBox( i18n( "Wall" ), this );
+ gb = new TQGroupBox( i18n( "Wall" ), this );
vlayout->addWidget( gb );
- gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
+ gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
gvl->addSpacing( 10 );
- m_pPreviewWall = new QCheckBox( i18n( "Enable wall" ), gb );
+ m_pPreviewWall = new TQCheckBox( i18n( "Enable wall" ), gb );
gvl->addWidget( m_pPreviewWall );
- hlayout = new QHBoxLayout( gvl );
- hlayout->addWidget( new QLabel( i18n( "Color 1:" ), gb ) );
+ hlayout = new TQHBoxLayout( gvl );
+ hlayout->addWidget( new TQLabel( i18n( "Color 1:" ), gb ) );
m_pWallColor1 = new KColorButton( gb );
hlayout->addWidget( m_pWallColor1 );
- hlayout->addWidget( new QLabel( i18n( "Color 2:" ), gb ) );
+ hlayout->addWidget( new TQLabel( i18n( "Color 2:" ), gb ) );
m_pWallColor2 = new KColorButton( gb );
hlayout->addWidget( m_pWallColor2 );
hlayout->addStretch( 1 );
- gb = new QGroupBox( i18n( "Floor" ), this );
+ gb = new TQGroupBox( i18n( "Floor" ), this );
vlayout->addWidget( gb );
- gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
+ gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
gvl->addSpacing( 10 );
- m_pPreviewFloor = new QCheckBox( i18n( "Enable floor" ), gb );
+ m_pPreviewFloor = new TQCheckBox( i18n( "Enable floor" ), gb );
gvl->addWidget( m_pPreviewFloor );
- hlayout = new QHBoxLayout( gvl );
- hlayout->addWidget( new QLabel( i18n( "Color 1:" ), gb ) );
+ hlayout = new TQHBoxLayout( gvl );
+ hlayout->addWidget( new TQLabel( i18n( "Color 1:" ), gb ) );
m_pFloorColor1 = new KColorButton( gb );
hlayout->addWidget( m_pFloorColor1 );
- hlayout->addWidget( new QLabel( i18n( "Color 2:" ), gb ) );
+ hlayout->addWidget( new TQLabel( i18n( "Color 2:" ), gb ) );
m_pFloorColor2 = new KColorButton( gb );
hlayout->addWidget( m_pFloorColor2 );
hlayout->addStretch( 1 );
- gb = new QGroupBox( i18n( "Antialiasing" ), this );
+ gb = new TQGroupBox( i18n( "Antialiasing" ), this );
vlayout->addWidget( gb );
- gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
+ gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) );
gvl->addSpacing( 10 );
- m_pPreviewAA = new QCheckBox( i18n( "Enable antialiasing" ), gb );
+ m_pPreviewAA = new TQCheckBox( i18n( "Enable antialiasing" ), gb );
gvl->addWidget( m_pPreviewAA );
- hlayout = new QHBoxLayout( gvl );
- hlayout->addWidget( new QLabel( i18n( "Depth:" ), gb ) );
+ hlayout = new TQHBoxLayout( gvl );
+ hlayout->addWidget( new TQLabel( i18n( "Depth:" ), gb ) );
m_pPreviewAALevel = new PMIntEdit( gb );
m_pPreviewAALevel->setValidation( true, 1, true, 9 );
hlayout->addWidget( m_pPreviewAALevel );
- hlayout->addWidget( new QLabel( i18n( "Threshold:" ), gb ) );
+ hlayout->addWidget( new TQLabel( i18n( "Threshold:" ), gb ) );
m_pPreviewAAThreshold = new PMFloatEdit( gb );
hlayout->addWidget( m_pPreviewAAThreshold );
hlayout->addStretch( 1 );
diff --git a/kpovmodeler/pmpreviewsettings.h b/kpovmodeler/pmpreviewsettings.h
index a0983002..b3c38af2 100644
--- a/kpovmodeler/pmpreviewsettings.h
+++ b/kpovmodeler/pmpreviewsettings.h
@@ -26,7 +26,7 @@
class PMIntEdit;
class PMFloatEdit;
-class QCheckBox;
+class TQCheckBox;
class KColorButton;
/**
@@ -39,7 +39,7 @@ public:
/**
* Default constructor
*/
- PMPreviewSettings( QWidget* parent, const char* name = 0 );
+ PMPreviewSettings( TQWidget* parent, const char* name = 0 );
/** */
virtual void displaySettings( );
/** */
@@ -51,14 +51,14 @@ public:
private:
PMIntEdit* m_pPreviewSize;
- QCheckBox* m_pPreviewSphere;
- QCheckBox* m_pPreviewCylinder;
- QCheckBox* m_pPreviewBox;
- QCheckBox* m_pPreviewAA;
+ TQCheckBox* m_pPreviewSphere;
+ TQCheckBox* m_pPreviewCylinder;
+ TQCheckBox* m_pPreviewBox;
+ TQCheckBox* m_pPreviewAA;
PMIntEdit* m_pPreviewAALevel;
PMFloatEdit* m_pPreviewAAThreshold;
- QCheckBox* m_pPreviewWall;
- QCheckBox* m_pPreviewFloor;
+ TQCheckBox* m_pPreviewWall;
+ TQCheckBox* m_pPreviewFloor;
KColorButton* m_pFloorColor1;
KColorButton* m_pFloorColor2;
KColorButton* m_pWallColor1;
diff --git a/kpovmodeler/pmprism.cpp b/kpovmodeler/pmprism.cpp
index 26fa9035..81417ba3 100644
--- a/kpovmodeler/pmprism.cpp
+++ b/kpovmodeler/pmprism.cpp
@@ -80,12 +80,12 @@ public:
virtual int size( PMObject* object, int dimension ) const
{
PMPrism* prism = ( PMPrism* ) object;
- QValueList< QValueList<PMVector> > points = prism->points( );
+ TQValueList< TQValueList<PMVector> > points = prism->points( );
if( dimension == 0 )
return points.size( );
else
{
- QValueList< QValueList<PMVector> >::ConstIterator it
+ TQValueList< TQValueList<PMVector> >::ConstIterator it
= points.at( m_index[0] );
if( it != points.end( ) )
return ( *it ).size( );
@@ -96,8 +96,8 @@ protected:
virtual bool setProtected( PMObject* obj, const PMVariant& var )
{
PMPrism* p = ( PMPrism* ) obj;
- QValueList< QValueList<PMVector> > list = p->points( );
- QValueList< QValueList<PMVector> >::Iterator sit = list.begin( );
+ TQValueList< TQValueList<PMVector> > list = p->points( );
+ TQValueList< TQValueList<PMVector> >::Iterator sit = list.begin( );
int i;
PMVector v = var.vectorData( );
v.resize( 2 );
@@ -106,11 +106,11 @@ protected:
++sit;
// expand the list if necessary
for( ; i < m_index[0]; ++i )
- list.insert( sit, QValueList< PMVector >( ) );
+ list.insert( sit, TQValueList< PMVector >( ) );
if( sit == list.end( ) )
- sit = list.insert( sit, QValueList< PMVector >( ) );
+ sit = list.insert( sit, TQValueList< PMVector >( ) );
- QValueList<PMVector>::Iterator it = ( *sit ).begin( );
+ TQValueList<PMVector>::Iterator it = ( *sit ).begin( );
for( i = 0; i < m_index[1] && it != ( *sit ).end( ); ++i )
++it;
@@ -128,15 +128,15 @@ protected:
virtual PMVariant getProtected( const PMObject* obj )
{
PMPrism* p = ( PMPrism* ) obj;
- QValueList< QValueList<PMVector> > list = p->points( );
- QValueList< QValueList<PMVector> >::ConstIterator sit = list.at( m_index[0] );
+ TQValueList< TQValueList<PMVector> > list = p->points( );
+ TQValueList< TQValueList<PMVector> >::ConstIterator sit = list.at( m_index[0] );
if( sit == list.end( ) )
{
kdError( PMArea ) << "Range error in PMPrism::PointProperty::get" << endl;
return PMVariant( );
}
- QValueList<PMVector>::ConstIterator it = ( *sit ).at( m_index[1] );
+ TQValueList<PMVector>::ConstIterator it = ( *sit ).at( m_index[1] );
if( it == ( *sit ).end( ) )
{
@@ -155,7 +155,7 @@ PMPrism::PMPrism( PMPart* part )
: Base( part )
{
int i;
- QValueList<PMVector> p;
+ TQValueList<PMVector> p;
for( i = 0; i < defaultNumberOfPoints; ++i )
p.append( defaultPoint[i] );
@@ -184,15 +184,15 @@ PMPrism::~PMPrism( )
{
}
-QString PMPrism::description( ) const
+TQString PMPrism::description( ) const
{
return i18n( "prism" );
}
-void PMPrism::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMPrism::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
- QDomElement data = doc.createElement( "extra_data" );
- QDomElement p, p2;
+ TQDomElement data = doc.createElement( "extra_data" );
+ TQDomElement p, p2;
e.setAttribute( "spline_type", m_splineType );
e.setAttribute( "sweep_type", m_sweepType );
@@ -201,8 +201,8 @@ void PMPrism::serialize( QDomElement& e, QDomDocument& doc ) const
e.setAttribute( "height1", m_height1 );
e.setAttribute( "height2", m_height2 );
- QValueList< QValueList<PMVector> >::ConstIterator it;
- QValueList<PMVector>::ConstIterator it2;
+ TQValueList< TQValueList<PMVector> >::ConstIterator it;
+ TQValueList<PMVector>::ConstIterator it2;
for( it = m_points.begin( ); it != m_points.end( ); ++it )
{
p = doc.createElement( "sub_prism" );
@@ -229,30 +229,30 @@ void PMPrism::readAttributes( const PMXMLHelper& h )
m_height2 = h.doubleAttribute( "height2", defaultHeight2 );
m_points.clear( );
- QValueList<PMVector> list;
+ TQValueList<PMVector> list;
PMVector v( 2 );
- QDomElement e = h.extraData( );
+ TQDomElement e = h.extraData( );
if( !e.isNull( ) )
{
- QDomNode sp = e.firstChild( );
+ TQDomNode sp = e.firstChild( );
while( !sp.isNull( ) )
{
if( sp.isElement( ) )
{
- QDomElement spe = sp.toElement( );
+ TQDomElement spe = sp.toElement( );
if( spe.tagName( ) == "sub_prism" )
{
list.clear( );
- QDomNode c = spe.firstChild( );
+ TQDomNode c = spe.firstChild( );
while( !c.isNull( ) )
{
if( c.isElement( ) )
{
- QDomElement ce = c.toElement( );
+ TQDomElement ce = c.toElement( );
if( ce.tagName( ) == "point" )
{
- QString str = ce.attribute( "vector" );
+ TQString str = ce.attribute( "vector" );
if( !str.isNull( ) )
{
v.loadXML( str );
@@ -380,7 +380,7 @@ void PMPrism::setHeight2( double h )
}
}
-void PMPrism::setPoints( const QValueList< QValueList<PMVector> >& points )
+void PMPrism::setPoints( const TQValueList< TQValueList<PMVector> >& points )
{
if( m_points != points )
{
@@ -392,7 +392,7 @@ void PMPrism::setPoints( const QValueList< QValueList<PMVector> >& points )
}
}
-PMDialogEditBase* PMPrism::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMPrism::editWidget( TQWidget* parent ) const
{
return new PMPrismEdit( parent );
}
@@ -456,7 +456,7 @@ void PMPrism::createViewStructure( )
int sSteps = (int)( ( (float)s_sSteps / 2 ) * ( displayDetail( ) + 1 ) );
// calculate number of points and lines of the view structure
- QValueList< QValueList<PMVector> >::ConstIterator spit = m_points.begin( );
+ TQValueList< TQValueList<PMVector> >::ConstIterator spit = m_points.begin( );
int np = 0;
for( ; spit != m_points.end( ); ++spit )
{
@@ -499,8 +499,8 @@ void PMPrism::createViewStructure( )
for( spit = m_points.begin( ); spit != m_points.end( ); ++spit )
{
- QValueList<PMSplineSegment> segments;
- QValueList<PMVector> fullPoints = expandedPoints( *spit );
+ TQValueList<PMSplineSegment> segments;
+ TQValueList<PMVector> fullPoints = expandedPoints( *spit );
int ns = fullPoints.count( );
int i, j;
@@ -520,7 +520,7 @@ void PMPrism::createViewStructure( )
ns = ns / 4;
break;
}
- QValueList<PMVector>::Iterator it1, it2, it3, it4;
+ TQValueList<PMVector>::Iterator it1, it2, it3, it4;
// create the spline segments
it1 = fullPoints.begin( );
@@ -581,7 +581,7 @@ void PMPrism::createViewStructure( )
// calculate the points
PMVector point2( 2 ), point3;
- QValueList<PMSplineSegment>::Iterator sit = segments.begin( );
+ TQValueList<PMSplineSegment>::Iterator sit = segments.begin( );
int pi = 0;
double poffset = 1.0 / sSteps;
@@ -616,8 +616,8 @@ void PMPrism::createViewStructure( )
void PMPrism::controlPoints( PMControlPointList& list )
{
- QValueList< QValueList<PMVector> >::Iterator it1;
- QValueList<PMVector>::Iterator it2;
+ TQValueList< TQValueList<PMVector> >::Iterator it1;
+ TQValueList<PMVector>::Iterator it2;
int i1, i2;
list.append( new PMDistanceControlPoint( PMVector( 0.0, 0.0, 0.0 ),
@@ -708,8 +708,8 @@ void PMPrism::controlPoints( PMControlPointList& list )
void PMPrism::controlPointsChanged( PMControlPointList& list )
{
PMControlPointListIterator it( list );
- QValueList< QValueList<PMVector> >::Iterator spit = m_points.begin( );
- QValueList<PMVector>::Iterator pit = ( *spit ).begin( );
+ TQValueList< TQValueList<PMVector> >::Iterator spit = m_points.begin( );
+ TQValueList<PMVector>::Iterator pit = ( *spit ).begin( );
PM2DControlPoint* p1;
PMDistanceControlPoint* dcp;
bool firstChange = true;
@@ -765,7 +765,7 @@ void PMPrism::controlPointsChanged( PMControlPointList& list )
}
void PMPrism::addObjectActions( const PMControlPointList& /*cp*/,
- QPtrList<PMObjectAction>& actions )
+ TQPtrList<PMObjectAction>& actions )
{
PMObjectAction* a;
@@ -777,7 +777,7 @@ void PMPrism::addObjectActions( const PMControlPointList& /*cp*/,
i18n( "Remove Point" ) );
bool enableJoin = false;
- QValueList< QValueList<PMVector> >::ConstIterator spit = m_points.begin( );
+ TQValueList< TQValueList<PMVector> >::ConstIterator spit = m_points.begin( );
int minp = 4;
switch( m_splineType )
@@ -806,7 +806,7 @@ void PMPrism::addObjectActions( const PMControlPointList& /*cp*/,
void PMPrism::objectActionCalled( const PMObjectAction* action,
const PMControlPointList& cp,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition )
{
if( action->objectType( ) == s_pMetaObject )
@@ -829,7 +829,7 @@ void PMPrism::objectActionCalled( const PMObjectAction* action,
}
void PMPrism::splitSegment( const PMControlPointList& /*cp*/,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition )
{
// find nearest segment
@@ -841,12 +841,12 @@ void PMPrism::splitSegment( const PMControlPointList& /*cp*/,
PMVector mid( 3 ), dist( 2 );
PMVector firstPoint( 3 );
- QPtrListIterator<PMVector> it1( cpViewPosition );
- QPtrListIterator<PMVector> it2( cpViewPosition );
+ TQPtrListIterator<PMVector> it1( cpViewPosition );
+ TQPtrListIterator<PMVector> it2( cpViewPosition );
for( i = 0; i < 2; ++i ) ++it1;
for( i = 0; i < 3; ++i ) ++it2;
- QValueList< QValueList<PMVector> >::Iterator spit = m_points.begin( );
+ TQValueList< TQValueList<PMVector> >::Iterator spit = m_points.begin( );
for( spnr = 0; spit != m_points.end( ); ++spit, ++spnr )
{
int nump = ( *spit ).count( );
@@ -901,18 +901,18 @@ void PMPrism::splitSegment( const PMControlPointList& /*cp*/,
}
// add a new segment
- QValueList< QValueList<PMVector> > newPoints = m_points;
+ TQValueList< TQValueList<PMVector> > newPoints = m_points;
spit = newPoints.at( nsp );
- QValueList<PMVector> newSubPoints = *spit;
+ TQValueList<PMVector> newSubPoints = *spit;
if( m_splineType == BezierSpline )
{
ns /= 3;
ns *= 3;
}
- QValueList<PMVector>::Iterator it = newSubPoints.at( ( unsigned ) ns );
+ TQValueList<PMVector>::Iterator it = newSubPoints.at( ( unsigned ) ns );
PMVector p[4];
- QValueList<PMVector>::Iterator hit = it, eit = newSubPoints.end( );
+ TQValueList<PMVector>::Iterator hit = it, eit = newSubPoints.end( );
--eit;
// calculate the spline segment
@@ -1007,7 +1007,7 @@ void PMPrism::splitSegment( const PMControlPointList& /*cp*/,
}
void PMPrism::joinSegments( const PMControlPointList& /*cp*/,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition )
{
// find nearest point
@@ -1018,7 +1018,7 @@ void PMPrism::joinSegments( const PMControlPointList& /*cp*/,
int i;
PMVector dist( 2 );
- QPtrListIterator<PMVector> it1( cpViewPosition );
+ TQPtrListIterator<PMVector> it1( cpViewPosition );
for( i = 0; i < 2; ++i ) ++it1;
int minp = 0;
@@ -1038,7 +1038,7 @@ void PMPrism::joinSegments( const PMControlPointList& /*cp*/,
break;
}
- QValueList< QValueList<PMVector> >::Iterator spit = m_points.begin( );
+ TQValueList< TQValueList<PMVector> >::Iterator spit = m_points.begin( );
for( spnr = 0; spit != m_points.end( ); ++spit, ++spnr )
{
int nump = ( *spit ).count( );
@@ -1088,10 +1088,10 @@ void PMPrism::joinSegments( const PMControlPointList& /*cp*/,
}
// remove the segment
- QValueList< QValueList<PMVector> > newPoints = m_points;
+ TQValueList< TQValueList<PMVector> > newPoints = m_points;
spit = newPoints.at( nsp );
- QValueList<PMVector> newSubPoints = *spit;
- QValueList<PMVector>::Iterator it;
+ TQValueList<PMVector> newSubPoints = *spit;
+ TQValueList<PMVector>::Iterator it;
if( m_splineType != BezierSpline )
{
@@ -1138,11 +1138,11 @@ void PMPrism::setSSteps( int s )
++s_parameterKey;
}
-QValueList<PMVector> PMPrism::expandedPoints( const QValueList<PMVector>& p ) const
+TQValueList<PMVector> PMPrism::expandedPoints( const TQValueList<PMVector>& p ) const
{
// add the missing points
int refa = 0, refb = p.count( );
- QValueList<PMVector> result = p;
+ TQValueList<PMVector> result = p;
switch( m_splineType )
{
@@ -1159,7 +1159,7 @@ QValueList<PMVector> PMPrism::expandedPoints( const QValueList<PMVector>& p ) co
refb = refb / 3 * 4;
break;
}
- QValueList<PMVector>::Iterator it1, it2, it3;
+ TQValueList<PMVector>::Iterator it1, it2, it3;
if( m_splineType != BezierSpline )
{
it1 = result.at( refa );
diff --git a/kpovmodeler/pmprism.h b/kpovmodeler/pmprism.h
index 64511ee5..a22fb748 100644
--- a/kpovmodeler/pmprism.h
+++ b/kpovmodeler/pmprism.h
@@ -26,8 +26,8 @@
#include "pmsolidobject.h"
#include "pmvector.h"
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
#include <math.h>
class PMViewStructure;
@@ -64,7 +64,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMPrism( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -72,18 +72,18 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMPrismEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmprism" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmprism" ); }
/** */
virtual void createMemento( );
@@ -99,21 +99,21 @@ public:
virtual bool hasDisplayDetail( ) const { return true; }
/** */
virtual void addObjectActions( const PMControlPointList&,
- QPtrList<PMObjectAction>& );
+ TQPtrList<PMObjectAction>& );
/** */
virtual void objectActionCalled( const PMObjectAction*,
const PMControlPointList&,
- const QPtrList<PMVector>&,
+ const TQPtrList<PMVector>&,
const PMVector& );
/**
* Returns the spline points
*/
- QValueList< QValueList<PMVector> > points( ) const { return m_points; }
+ TQValueList< TQValueList<PMVector> > points( ) const { return m_points; }
/**
* Sets the spline points
*/
- void setPoints( const QValueList< QValueList<PMVector> >& points );
+ void setPoints( const TQValueList< TQValueList<PMVector> >& points );
/**
* Returns the spline type
*/
@@ -174,7 +174,7 @@ public:
/**
* Returns the points for POV-Ray serialization (contains additional points)
*/
- QValueList<PMVector> expandedPoints( const QValueList<PMVector>& p ) const;
+ TQValueList<PMVector> expandedPoints( const TQValueList<PMVector>& p ) const;
protected:
/** */
@@ -187,17 +187,17 @@ private:
* Object action. Adds a spline point
*/
void splitSegment( const PMControlPointList& cp,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition );
/**
* Object action. Removes a spline point
*/
void joinSegments( const PMControlPointList& cp,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition );
- void stringToValues( const QString& str );
- QString valuesToString( ) const;
+ void stringToValues( const TQString& str );
+ TQString valuesToString( ) const;
/**
* IDs for @ref PMMementoData
@@ -210,7 +210,7 @@ private:
enum PMPrismActionID { PMSplitSegmentID, PMJoinSegmentsID };
SplineType m_splineType;
SweepType m_sweepType;
- QValueList< QValueList<PMVector> > m_points;
+ TQValueList< TQValueList<PMVector> > m_points;
double m_height1, m_height2;
bool m_sturm;
bool m_open;
diff --git a/kpovmodeler/pmprismedit.cpp b/kpovmodeler/pmprismedit.cpp
index 13ac49b5..e5cf8615 100644
--- a/kpovmodeler/pmprismedit.cpp
+++ b/kpovmodeler/pmprismedit.cpp
@@ -23,18 +23,18 @@
#include "pmvectorlistedit.h"
#include "pmpart.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <kdialog.h>
#include <kiconloader.h>
#include <kmessagebox.h>
-PMPrismEdit::PMPrismEdit( QWidget* parent, const char* name )
+PMPrismEdit::PMPrismEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -49,51 +49,51 @@ void PMPrismEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Spline type:" ), this ) );
- m_pSplineType = new QComboBox( false, this );
+ TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Spline type:" ), this ) );
+ m_pSplineType = new TQComboBox( false, this );
m_pSplineType->insertItem( i18n( "Linear Spline" ) );
m_pSplineType->insertItem( i18n( "Quadratic Spline" ) );
m_pSplineType->insertItem( i18n( "Cubic Spline" ) );
m_pSplineType->insertItem( i18n( "Bezier Spline" ) );
hl->addWidget( m_pSplineType );
- hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Sweep type:" ), this ) );
- m_pSweepType = new QComboBox( false, this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Sweep type:" ), this ) );
+ m_pSweepType = new TQComboBox( false, this );
m_pSweepType->insertItem( i18n( "Linear Sweep" ) );
m_pSweepType->insertItem( i18n( "Conic Sweep" ) );
hl->addWidget( m_pSweepType );
- connect( m_pSplineType, SIGNAL( activated( int ) ),
- SLOT( slotTypeChanged( int ) ) );
- connect( m_pSweepType, SIGNAL( activated( int ) ),
- SLOT( slotSweepChanged( int ) ) );
+ connect( m_pSplineType, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotTypeChanged( int ) ) );
+ connect( m_pSweepType, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotSweepChanged( int ) ) );
- hl = new QHBoxLayout( topLayout( ) );
- QGridLayout* gl = new QGridLayout( hl, 2, 2 );
- gl->addWidget( new QLabel( i18n( "Height 1:" ), this ), 0, 0 );
+ hl = new TQHBoxLayout( topLayout( ) );
+ TQGridLayout* gl = new TQGridLayout( hl, 2, 2 );
+ gl->addWidget( new TQLabel( i18n( "Height 1:" ), this ), 0, 0 );
m_pHeight1 = new PMFloatEdit( this );
gl->addWidget( m_pHeight1, 0, 1 );
- connect( m_pHeight1, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pHeight1, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
- gl->addWidget( new QLabel( i18n( "Height 2:" ), this ), 1, 0 );
+ gl->addWidget( new TQLabel( i18n( "Height 2:" ), this ), 1, 0 );
m_pHeight2 = new PMFloatEdit( this );
gl->addWidget( m_pHeight2, 1, 1 );
- connect( m_pHeight2, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pHeight2, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
hl->addStretch( 1 );
}
void PMPrismEdit::createBottomWidgets( )
{
- m_pEditWidget = new QWidget( this );
+ m_pEditWidget = new TQWidget( this );
topLayout( )->addWidget( m_pEditWidget );
- m_pOpen = new QCheckBox( i18n( "type of the object", "Open" ), this );
+ m_pOpen = new TQCheckBox( i18n( "type of the object", "Open" ), this );
topLayout( )->addWidget( m_pOpen );
- m_pSturm = new QCheckBox( i18n( "Sturm" ), this );
+ m_pSturm = new TQCheckBox( i18n( "Sturm" ), this );
topLayout( )->addWidget( m_pSturm );
- connect( m_pSturm, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pOpen, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pSturm, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pOpen, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
Base::createBottomWidgets( );
}
@@ -147,16 +147,16 @@ void PMPrismEdit::displayObject( PMObject* o )
kdError( PMArea ) << "PMPrismEdit: Can't display object\n";
}
-void PMPrismEdit::displayPoints( const QValueList< QValueList<PMVector> >& sp )
+void PMPrismEdit::displayPoints( const TQValueList< TQValueList<PMVector> >& sp )
{
bool readOnly = m_pDisplayedObject->isReadOnly( );
// (re)create the edit widget if necessary
createEdits( sp );
- QValueList< QValueList<PMVector> >::ConstIterator spit = sp.begin( );
- QPtrListIterator< PMVectorListEdit > seit( m_points );
- QPtrListIterator< QPushButton > sbit1( m_removeButtons );
+ TQValueList< TQValueList<PMVector> >::ConstIterator spit = sp.begin( );
+ TQPtrListIterator< PMVectorListEdit > seit( m_points );
+ TQPtrListIterator< TQPushButton > sbit1( m_removeButtons );
// display the points
for( ; ( spit != sp.end( ) ) && *seit; ++spit, ++seit, ++sbit1 )
@@ -166,23 +166,23 @@ void PMPrismEdit::displayPoints( const QValueList< QValueList<PMVector> >& sp )
( *sbit1 )->setEnabled( !readOnly && ( *spit ).size( ) > 3 );
}
- QPtrListIterator< QPushButton > sbit2( m_addAboveButtons );
- QPtrListIterator< QPushButton > sbit3( m_addBelowButtons );
+ TQPtrListIterator< TQPushButton > sbit2( m_addAboveButtons );
+ TQPtrListIterator< TQPushButton > sbit3( m_addBelowButtons );
for( ; *sbit2; ++sbit2 )
( *sbit2 )->setEnabled( !readOnly );
for( ; *sbit3; ++sbit3 )
( *sbit3 )->setEnabled( !readOnly );
- QPtrListIterator<QPushButton> bit1( m_subPrismAddButtons );
+ TQPtrListIterator<TQPushButton> bit1( m_subPrismAddButtons );
for( ; *bit1; ++bit1 )
( *bit1 )->setEnabled( !readOnly );
- QPtrListIterator<QPushButton> bit2( m_subPrismRemoveButtons );
+ TQPtrListIterator<TQPushButton> bit2( m_subPrismRemoveButtons );
for( ; *bit2; ++bit2 )
( *bit2 )->setEnabled( !readOnly && sp.size( ) > 1 );
updateControlPointSelection( );
}
-void PMPrismEdit::createEdits( const QValueList< QValueList<PMVector> >& sp )
+void PMPrismEdit::createEdits( const TQValueList< TQValueList<PMVector> >& sp )
{
int st = m_pSplineType->currentItem( );
@@ -190,74 +190,74 @@ void PMPrismEdit::createEdits( const QValueList< QValueList<PMVector> >& sp )
{
deleteEdits( );
- QPixmap addPixmap = SmallIcon( "pmaddpoint" );
- QPixmap removePixmap = SmallIcon( "pmremovepoint" );
- QPixmap addPrismPixmap = SmallIcon( "pmaddsubprism" );
- QVBoxLayout* tvl = new QVBoxLayout( m_pEditWidget,
+ TQPixmap addPixmap = SmallIcon( "pmaddpoint" );
+ TQPixmap removePixmap = SmallIcon( "pmremovepoint" );
+ TQPixmap addPrismPixmap = SmallIcon( "pmaddsubprism" );
+ TQVBoxLayout* tvl = new TQVBoxLayout( m_pEditWidget,
0, KDialog::spacingHint( ) );
- QHBoxLayout* hl = 0;
- QVBoxLayout* vl;
- QLabel* label = 0;
- QPushButton* button = 0;
+ TQHBoxLayout* hl = 0;
+ TQVBoxLayout* vl;
+ TQLabel* label = 0;
+ TQPushButton* button = 0;
PMVectorListEdit* vle;
int spnr = 0;
for( spnr = 0; spnr < ( signed ) sp.size( ); spnr++ )
{
// create all edits for one sub prism
- hl = new QHBoxLayout( tvl );
- label = new QLabel( i18n( "Sub prism %1:" ).arg( spnr + 1 ),
+ hl = new TQHBoxLayout( tvl );
+ label = new TQLabel( i18n( "Sub prism %1:" ).arg( spnr + 1 ),
m_pEditWidget );
hl->addWidget( label );
hl->addStretch( 1 );
m_labels.append( label );
label->show( );
- button = new QPushButton( m_pEditWidget );
+ button = new TQPushButton( m_pEditWidget );
button->setPixmap( addPrismPixmap );
m_subPrismAddButtons.append( button );
- connect( button, SIGNAL( clicked( ) ), SLOT( slotAddSubPrism( ) ) );
+ connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddSubPrism( ) ) );
hl->addWidget( button );
button->show( );
- QToolTip::add( button, i18n( "Add sub prism" ) );
+ TQToolTip::add( button, i18n( "Add sub prism" ) );
- button = new QPushButton( m_pEditWidget );
+ button = new TQPushButton( m_pEditWidget );
button->setPixmap( removePixmap );
m_subPrismRemoveButtons.append( button );
- connect( button, SIGNAL( clicked( ) ), SLOT( slotRemoveSubPrism( ) ) );
+ connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemoveSubPrism( ) ) );
hl->addWidget( button );
button->show( );
if( sp.size( ) < 2 )
button->setEnabled( false );
- QToolTip::add( button, i18n( "Remove sub prism" ) );
+ TQToolTip::add( button, i18n( "Remove sub prism" ) );
- hl = new QHBoxLayout( tvl );
+ hl = new TQHBoxLayout( tvl );
vle = new PMVectorListEdit( "x", "z", m_pEditWidget );
m_points.append( vle );
- connect( vle, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( vle, SIGNAL( selectionChanged( ) ),
- SLOT( slotSelectionChanged( ) ) );
+ connect( vle, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( vle, TQT_SIGNAL( selectionChanged( ) ),
+ TQT_SLOT( slotSelectionChanged( ) ) );
hl->addWidget( vle, 2 );
vle->show( );
- vl = new QVBoxLayout( hl );
+ vl = new TQVBoxLayout( hl );
- button = new QPushButton( m_pEditWidget );
+ button = new TQPushButton( m_pEditWidget );
button->setPixmap( SmallIcon( "pmaddpointabove" ) );
- connect( button, SIGNAL( clicked( ) ), SLOT( slotAddPointAbove( ) ) );
+ connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPointAbove( ) ) );
m_addAboveButtons.append( button );
button->show( );
vl->addWidget( button );
- button = new QPushButton( m_pEditWidget );
+ button = new TQPushButton( m_pEditWidget );
button->setPixmap( SmallIcon( "pmaddpoint" ) );
- connect( button, SIGNAL( clicked( ) ), SLOT( slotAddPointBelow( ) ) );
+ connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPointBelow( ) ) );
m_addBelowButtons.append( button );
button->show( );
vl->addWidget( button );
- button = new QPushButton( m_pEditWidget );
+ button = new TQPushButton( m_pEditWidget );
button->setPixmap( SmallIcon( "pmremovepoint" ) );
- connect( button, SIGNAL( clicked( ) ), SLOT( slotRemovePoint( ) ) );
+ connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemovePoint( ) ) );
m_removeButtons.append( button );
button->show( );
vl->addWidget( button );
@@ -267,24 +267,24 @@ void PMPrismEdit::createEdits( const QValueList< QValueList<PMVector> >& sp )
tvl->addSpacing( KDialog::spacingHint( ) );
}
- hl = new QHBoxLayout( tvl );
- label = new QLabel( i18n( "New sub prism" ), m_pEditWidget );
+ hl = new TQHBoxLayout( tvl );
+ label = new TQLabel( i18n( "New sub prism" ), m_pEditWidget );
hl->addWidget( label );
hl->addStretch( 1 );
m_labels.append( label );
label->show( );
- button = new QPushButton( m_pEditWidget );
+ button = new TQPushButton( m_pEditWidget );
button->setPixmap( addPrismPixmap );
m_subPrismAddButtons.append( button );
- connect( button, SIGNAL( clicked( ) ), SLOT( slotAddSubPrism( ) ) );
+ connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddSubPrism( ) ) );
hl->addWidget( button );
button->show( );
- QToolTip::add( button, i18n( "Append sub prism" ) );
+ TQToolTip::add( button, i18n( "Append sub prism" ) );
}
- QPtrListIterator< PMVectorListEdit > vlit( m_points );
- QValueList< QValueList< PMVector > >::ConstIterator spit;
+ TQPtrListIterator< PMVectorListEdit > vlit( m_points );
+ TQValueList< TQValueList< PMVector > >::ConstIterator spit;
PMVectorListEdit* vle = 0;
bool newSize = false;
@@ -336,10 +336,10 @@ void PMPrismEdit::deleteEdits( )
delete m_pEditWidget->layout( );
}
-QValueList< QValueList<PMVector> > PMPrismEdit::splinePoints( )
+TQValueList< TQValueList<PMVector> > PMPrismEdit::splinePoints( )
{
- QPtrListIterator< PMVectorListEdit > it( m_points );
- QValueList< QValueList<PMVector> > values;
+ TQPtrListIterator< PMVectorListEdit > it( m_points );
+ TQValueList< TQValueList<PMVector> > values;
for( ; it.current( ); ++it )
values.append( ( *it )->vectors( ) );
@@ -387,7 +387,7 @@ void PMPrismEdit::saveContents( )
bool PMPrismEdit::isDataValid( )
{
- QPtrListIterator< PMVectorListEdit > it( m_points );
+ TQPtrListIterator< PMVectorListEdit > it( m_points );
for( ; it.current( ); ++it )
if( !it.current( )->isDataValid( ) )
return false;
@@ -449,7 +449,7 @@ void PMPrismEdit::slotSweepChanged( int )
void PMPrismEdit::slotAddPointAbove( )
{
- QPushButton* bt = ( QPushButton* ) sender( );
+ TQPushButton* bt = ( TQPushButton* ) sender( );
if( bt )
{
int subIndex = m_addAboveButtons.findRef( bt );
@@ -459,8 +459,8 @@ void PMPrismEdit::slotAddPointAbove( )
int index = ed->currentRow( );
if( index >= 0 && index < ed->size( ) )
{
- QValueList<PMVector> points = ed->vectors( );
- QValueListIterator<PMVector> it = points.at( index );
+ TQValueList<PMVector> points = ed->vectors( );
+ TQValueListIterator<PMVector> it = points.at( index );
PMVector newPoint = *it;
if( index != 0 )
@@ -485,7 +485,7 @@ void PMPrismEdit::slotAddPointAbove( )
void PMPrismEdit::slotAddPointBelow( )
{
- QPushButton* bt = ( QPushButton* ) sender( );
+ TQPushButton* bt = ( TQPushButton* ) sender( );
if( bt )
{
int subIndex = m_addBelowButtons.findRef( bt );
@@ -495,8 +495,8 @@ void PMPrismEdit::slotAddPointBelow( )
int index = ed->currentRow( );
if( index >= 0 && index < ed->size( ) )
{
- QValueList<PMVector> points = ed->vectors( );
- QValueListIterator<PMVector> it = points.at( index );
+ TQValueList<PMVector> points = ed->vectors( );
+ TQValueListIterator<PMVector> it = points.at( index );
PMVector newPoint = *it;
++it;
@@ -521,7 +521,7 @@ void PMPrismEdit::slotAddPointBelow( )
void PMPrismEdit::slotRemovePoint( )
{
- QPushButton* bt = ( QPushButton* ) sender( );
+ TQPushButton* bt = ( TQPushButton* ) sender( );
if( bt )
{
int subIndex = m_removeButtons.findRef( bt );
@@ -531,8 +531,8 @@ void PMPrismEdit::slotRemovePoint( )
int index = ed->currentRow( );
if( index >= 0 && index < ed->size( ) )
{
- QValueList<PMVector> points = ed->vectors( );
- QValueListIterator<PMVector> it = points.at( index );
+ TQValueList<PMVector> points = ed->vectors( );
+ TQValueListIterator<PMVector> it = points.at( index );
points.remove( it );
@@ -557,15 +557,15 @@ void PMPrismEdit::slotAddSubPrism( )
i18n( "Warning" ), "subPrismWithBezierSplines" );
}
- QPushButton* button = ( QPushButton* ) sender( );
+ TQPushButton* button = ( TQPushButton* ) sender( );
if( button )
{
int index = m_subPrismAddButtons.findRef( button );
if( index >= 0 )
{
- QValueList< QValueList<PMVector> > points = splinePoints( );
- QValueList< QValueList<PMVector> >::Iterator it = points.at( index );
- QValueList<PMVector> newSubPrism;
+ TQValueList< TQValueList<PMVector> > points = splinePoints( );
+ TQValueList< TQValueList<PMVector> >::Iterator it = points.at( index );
+ TQValueList<PMVector> newSubPrism;
if( it != points.begin( ) )
{
@@ -576,7 +576,7 @@ void PMPrismEdit::slotAddSubPrism( )
// find middle point
PMVector mid( 2 );
int num = 0;
- QValueList<PMVector>::Iterator pit = newSubPrism.begin( );
+ TQValueList<PMVector>::Iterator pit = newSubPrism.begin( );
for( ; pit != newSubPrism.end( ); ++pit, ++num )
mid += *pit;
if( num > 0 )
@@ -597,14 +597,14 @@ void PMPrismEdit::slotAddSubPrism( )
void PMPrismEdit::slotRemoveSubPrism( )
{
- QPushButton* button = ( QPushButton* ) sender( );
+ TQPushButton* button = ( TQPushButton* ) sender( );
if( button )
{
int index = m_subPrismRemoveButtons.findRef( button );
if( index >= 0 )
{
- QValueList< QValueList<PMVector> > points = splinePoints( );
- QValueList< QValueList<PMVector> >::Iterator it = points.at( index );
+ TQValueList< TQValueList<PMVector> > points = splinePoints( );
+ TQValueList< TQValueList<PMVector> >::Iterator it = points.at( index );
if( points.count( ) > 1 )
{
@@ -622,16 +622,16 @@ void PMPrismEdit::slotSelectionChanged( )
PMVectorListEdit* edit = ( PMVectorListEdit* ) sender( );
if( edit )
{
- QValueList< QValueList< PMVector > > points = m_pDisplayedObject->points( );
+ TQValueList< TQValueList< PMVector > > points = m_pDisplayedObject->points( );
if( m_points.count( ) == points.size( ) )
{
int i;
bool changed = false;
- QValueList< QValueList< PMVector > >::Iterator spit;
+ TQValueList< TQValueList< PMVector > >::Iterator spit;
PMControlPointList cp = part( )->activeControlPoints( );
PMControlPointListIterator it( cp ); ++it; ++it;
- QPtrListIterator<PMVectorListEdit> edit( m_points );
+ TQPtrListIterator<PMVectorListEdit> edit( m_points );
for( spit = points.begin( ); spit != points.end( ) && it.current( );
++spit, ++edit )
@@ -656,14 +656,14 @@ void PMPrismEdit::slotSelectionChanged( )
void PMPrismEdit::updateControlPointSelection( )
{
- QValueList< QValueList< PMVector > > points = m_pDisplayedObject->points( );
+ TQValueList< TQValueList< PMVector > > points = m_pDisplayedObject->points( );
if( m_points.count( ) == points.size( ) )
{
- QValueList< QValueList< PMVector > >::Iterator spit;
+ TQValueList< TQValueList< PMVector > >::Iterator spit;
PMControlPointList cp = part( )->activeControlPoints( );
PMControlPointListIterator it( cp ); ++it; ++it;
- QPtrListIterator<PMVectorListEdit> edit( m_points );
+ TQPtrListIterator<PMVectorListEdit> edit( m_points );
for( spit = points.begin( ); spit != points.end( ) && it.current( );
++spit, ++edit )
diff --git a/kpovmodeler/pmprismedit.h b/kpovmodeler/pmprismedit.h
index 75a65dbd..8f54beb2 100644
--- a/kpovmodeler/pmprismedit.h
+++ b/kpovmodeler/pmprismedit.h
@@ -26,18 +26,18 @@
#include "pmsolidobjectedit.h"
#include "pmvectoredit.h"
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
class PMPrism;
class PMFloatEdit;
class PMVectorListEdit;
-class QVBoxLayout;
-class QComboBox;
-class QCheckBox;
-class QPushButton;
-class QLabel;
+class TQVBoxLayout;
+class TQComboBox;
+class TQCheckBox;
+class TQPushButton;
+class TQLabel;
/**
* Dialog edit class for @ref PMPrism
@@ -50,7 +50,7 @@ public:
/**
* Creates a PMPrismEdit with parent and name
*/
- PMPrismEdit( QWidget* parent, const char* name = 0 );
+ PMPrismEdit( TQWidget* parent, const char* name = 0 );
/**
* Destructor
*/
@@ -75,11 +75,11 @@ private:
/**
* Displays the spline points
*/
- void displayPoints( const QValueList< QValueList<PMVector> >& list );
+ void displayPoints( const TQValueList< TQValueList<PMVector> >& list );
/**
* Returns the spline points from the vector edits
*/
- QValueList< QValueList<PMVector> > splinePoints( );
+ TQValueList< TQValueList<PMVector> > splinePoints( );
/**
* Deletes the spline point edits
*/
@@ -87,7 +87,7 @@ private:
/**
* Creates the edits for the points
*/
- void createEdits( const QValueList< QValueList<PMVector> >& points );
+ void createEdits( const TQValueList< TQValueList<PMVector> >& points );
protected slots:
void slotTypeChanged( int );
@@ -101,18 +101,18 @@ protected slots:
private:
PMPrism* m_pDisplayedObject;
- QPtrList< QLabel > m_labels;
- QPtrList< QPushButton > m_subPrismAddButtons;
- QPtrList< QPushButton > m_subPrismRemoveButtons;
- QPtrList< QPushButton > m_addAboveButtons;
- QPtrList< QPushButton > m_addBelowButtons;
- QPtrList< QPushButton > m_removeButtons;
- QPtrList< PMVectorListEdit> m_points;
- QWidget* m_pEditWidget;
- QComboBox* m_pSplineType;
- QComboBox* m_pSweepType;
- QCheckBox* m_pSturm;
- QCheckBox* m_pOpen;
+ TQPtrList< TQLabel > m_labels;
+ TQPtrList< TQPushButton > m_subPrismAddButtons;
+ TQPtrList< TQPushButton > m_subPrismRemoveButtons;
+ TQPtrList< TQPushButton > m_addAboveButtons;
+ TQPtrList< TQPushButton > m_addBelowButtons;
+ TQPtrList< TQPushButton > m_removeButtons;
+ TQPtrList< PMVectorListEdit> m_points;
+ TQWidget* m_pEditWidget;
+ TQComboBox* m_pSplineType;
+ TQComboBox* m_pSweepType;
+ TQCheckBox* m_pSturm;
+ TQCheckBox* m_pOpen;
PMFloatEdit* m_pHeight1;
PMFloatEdit* m_pHeight2;
int m_lastSplineType;
diff --git a/kpovmodeler/pmprismmemento.cpp b/kpovmodeler/pmprismmemento.cpp
index 0f50449d..4b24d500 100644
--- a/kpovmodeler/pmprismmemento.cpp
+++ b/kpovmodeler/pmprismmemento.cpp
@@ -27,21 +27,21 @@ PMPrismMemento::~PMPrismMemento( )
{
}
-void PMPrismMemento::setPrismPoints( const QValueList< QValueList<PMVector> >& v )
+void PMPrismMemento::setPrismPoints( const TQValueList< TQValueList<PMVector> >& v )
{
if( !m_bPrismPointsSaved )
{
// Direct assignment does not work with Qt 2.3.x
// The list will be changed later in a graphical
- // change because QValueList::detach( ) is called
+ // change because TQValueList::detach( ) is called
// too late!
// Copy the list by hand.
- QValueList< QValueList< PMVector > >::ConstIterator sit = v.begin( );
+ TQValueList< TQValueList< PMVector > >::ConstIterator sit = v.begin( );
for( ; sit != v.end( ); ++sit )
{
- QValueList<PMVector> list;
- QValueList<PMVector>::ConstIterator it = ( *sit ).begin( );
+ TQValueList<PMVector> list;
+ TQValueList<PMVector>::ConstIterator it = ( *sit ).begin( );
for( ; it != ( *sit ).end( ); ++it )
list.append( *it );
m_prismPoints.append( list );
diff --git a/kpovmodeler/pmprismmemento.h b/kpovmodeler/pmprismmemento.h
index a45f7fef..13adf608 100644
--- a/kpovmodeler/pmprismmemento.h
+++ b/kpovmodeler/pmprismmemento.h
@@ -26,7 +26,7 @@
#include "pmmemento.h"
#include "pmvector.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
/**
@@ -47,11 +47,11 @@ public:
/**
* Saves the prism points
*/
- void setPrismPoints( const QValueList< QValueList<PMVector> >& v );
+ void setPrismPoints( const TQValueList< TQValueList<PMVector> >& v );
/**
* Returns the prism points
*/
- QValueList< QValueList<PMVector> > prismPoints( ) const
+ TQValueList< TQValueList<PMVector> > prismPoints( ) const
{
return m_prismPoints;
}
@@ -64,7 +64,7 @@ private:
/**
* The stored points
*/
- QValueList< QValueList<PMVector> > m_prismPoints;
+ TQValueList< TQValueList<PMVector> > m_prismPoints;
bool m_bPrismPointsSaved;
};
diff --git a/kpovmodeler/pmprojectedthrough.cpp b/kpovmodeler/pmprojectedthrough.cpp
index 46ecc51c..96c0c00a 100644
--- a/kpovmodeler/pmprojectedthrough.cpp
+++ b/kpovmodeler/pmprojectedthrough.cpp
@@ -44,7 +44,7 @@ PMProjectedThrough::~PMProjectedThrough( )
}
-QString PMProjectedThrough::description( ) const
+TQString PMProjectedThrough::description( ) const
{
return i18n( "projected through" );
}
@@ -70,7 +70,7 @@ void PMProjectedThrough::cleanUp( ) const
Base::cleanUp( );
}
-void PMProjectedThrough::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMProjectedThrough::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
Base::serialize( e, doc );
}
@@ -80,7 +80,7 @@ void PMProjectedThrough::readAttributes( const PMXMLHelper& h )
Base::readAttributes( h );
}
-PMDialogEditBase* PMProjectedThrough::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMProjectedThrough::editWidget( TQWidget* parent ) const
{
return new PMNamedObjectEdit( parent );
}
diff --git a/kpovmodeler/pmprojectedthrough.h b/kpovmodeler/pmprojectedthrough.h
index 66b2a7bd..4212097f 100644
--- a/kpovmodeler/pmprojectedthrough.h
+++ b/kpovmodeler/pmprojectedthrough.h
@@ -50,7 +50,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMProjectedThrough( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -58,18 +58,18 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMProjectedThroughEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmprojectedthrough" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmprojectedthrough" ); }
/** */
virtual void restoreMemento( PMMemento* s );
diff --git a/kpovmodeler/pmprototypemanager.cpp b/kpovmodeler/pmprototypemanager.cpp
index f458e248..a32a6692 100644
--- a/kpovmodeler/pmprototypemanager.cpp
+++ b/kpovmodeler/pmprototypemanager.cpp
@@ -180,9 +180,9 @@ void PMPrototypeManager::addPrototype( PMObject* obj )
delete obj;
}
-void PMPrototypeManager::addDeclarationType( const QString& className,
- const QString& description,
- const QString& pixmap )
+void PMPrototypeManager::addDeclarationType( const TQString& className,
+ const TQString& description,
+ const TQString& pixmap )
{
PMMetaObject* m = metaObject( className );
if( !m )
@@ -191,17 +191,17 @@ void PMPrototypeManager::addDeclarationType( const QString& className,
m_declareDescriptions.push_back( PMDeclareDescription( m, description, pixmap ) );
}
-QPtrListIterator<PMMetaObject> PMPrototypeManager::prototypeIterator( ) const
+TQPtrListIterator<PMMetaObject> PMPrototypeManager::prototypeIterator( ) const
{
- return QPtrListIterator<PMMetaObject>( m_prototypes );
+ return TQPtrListIterator<PMMetaObject>( m_prototypes );
}
-const QValueList<PMDeclareDescription>& PMPrototypeManager::declarationTypes( ) const
+const TQValueList<PMDeclareDescription>& PMPrototypeManager::declarationTypes( ) const
{
return m_declareDescriptions;
}
-PMObject* PMPrototypeManager::newObject( const QString& name ) const
+PMObject* PMPrototypeManager::newObject( const TQString& name ) const
{
if( name.isEmpty( ) )
return 0;
@@ -212,21 +212,21 @@ PMObject* PMPrototypeManager::newObject( const QString& name ) const
return meta->newObject( m_pPart );
}
-PMMetaObject* PMPrototypeManager::metaObject( const QString& name ) const
+PMMetaObject* PMPrototypeManager::metaObject( const TQString& name ) const
{
if( name.isNull( ) )
return 0;
return m_metaDict.find( name );
}
-bool PMPrototypeManager::isA( const QString& className,
- const QString& baseClass ) const
+bool PMPrototypeManager::isA( const TQString& className,
+ const TQString& baseClass ) const
{
return isA( metaObject( className ), baseClass );
}
bool PMPrototypeManager::isA( PMMetaObject* c,
- const QString& baseClass ) const
+ const TQString& baseClass ) const
{
PMMetaObject* bc = metaObject( baseClass );
while( c && c != bc )
@@ -234,10 +234,10 @@ bool PMPrototypeManager::isA( PMMetaObject* c,
return( c && ( c == bc ) );
}
-QString PMPrototypeManager::className( const QString& lowercase ) const
+TQString PMPrototypeManager::className( const TQString& lowercase ) const
{
- QMap<QString, QString>::const_iterator it = m_lowerCaseDict.find( lowercase );
+ TQMap<TQString, TQString>::const_iterator it = m_lowerCaseDict.find( lowercase );
if( it != m_lowerCaseDict.end( ) )
return *it;
- return QString::null;
+ return TQString::null;
}
diff --git a/kpovmodeler/pmprototypemanager.h b/kpovmodeler/pmprototypemanager.h
index 025b8213..bade9e29 100644
--- a/kpovmodeler/pmprototypemanager.h
+++ b/kpovmodeler/pmprototypemanager.h
@@ -21,9 +21,9 @@
#define PMPTMANAGER_H
#include "pmobject.h"
-#include <qdict.h>
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqdict.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
class PMPart;
@@ -41,7 +41,7 @@ public:
description = d.description;
pixmap = d.pixmap;
}
- PMDeclareDescription( PMMetaObject* t, const QString& d, const QString& p )
+ PMDeclareDescription( PMMetaObject* t, const TQString& d, const TQString& p )
{
type = t;
description = d;
@@ -55,8 +55,8 @@ public:
return *this;
}
PMMetaObject* type;
- QString description;
- QString pixmap;
+ TQString description;
+ TQString pixmap;
};
/**
@@ -91,31 +91,31 @@ public:
* Adds a declaration type. Needed information is the class type,
* the @ref description( ) and the @ref pixmap( )
*/
- void addDeclarationType( const QString& className,
- const QString& description,
- const QString& pixmap );
+ void addDeclarationType( const TQString& className,
+ const TQString& description,
+ const TQString& pixmap );
/**
* Returns an iterator to the list of available objects
*/
- QPtrListIterator<PMMetaObject> prototypeIterator( ) const;
+ TQPtrListIterator<PMMetaObject> prototypeIterator( ) const;
/**
* Returns an iterator to the list of available declaration types
*/
- const QValueList<PMDeclareDescription>& declarationTypes( ) const;
+ const TQValueList<PMDeclareDescription>& declarationTypes( ) const;
/**
* Returns a new PMObject by class name
*/
- PMObject* newObject( const QString& name ) const;
+ PMObject* newObject( const TQString& name ) const;
/**
* Returns the meta object by class name or 0 if this class does
* not exist.
* @see PMMetaObject
*/
- PMMetaObject* metaObject( const QString& name ) const;
+ PMMetaObject* metaObject( const TQString& name ) const;
/**
* Returns true if the class exists
*/
- bool existsClass( const QString& name ) const
+ bool existsClass( const TQString& name ) const
{
return metaObject( name );
}
@@ -123,27 +123,27 @@ public:
* Returns true if the second class is a base class for
* the first class
*/
- bool isA( const QString& className, const QString& baseClassName ) const;
+ bool isA( const TQString& className, const TQString& baseClassName ) const;
/**
* Returns true if the second class is a base class for
* the first class
*/
- bool isA( PMMetaObject* c, const QString& baseClassName ) const;
+ bool isA( PMMetaObject* c, const TQString& baseClassName ) const;
/**
* Returns the real class if only the lower case version is know.
* Used by the xml parser
*/
- QString className( const QString& lowercase ) const;
+ TQString className( const TQString& lowercase ) const;
/**
* Returns a pointer to the part
*/
PMPart* part( ) const { return m_pPart; }
private:
- QPtrList<PMMetaObject> m_prototypes;
- QDict<PMMetaObject> m_metaDict;
- QMap<QString, QString> m_lowerCaseDict;
- QValueList<PMDeclareDescription> m_declareDescriptions;
+ TQPtrList<PMMetaObject> m_prototypes;
+ TQDict<PMMetaObject> m_metaDict;
+ TQMap<TQString, TQString> m_lowerCaseDict;
+ TQValueList<PMDeclareDescription> m_declareDescriptions;
PMPart* m_pPart;
};
#endif
diff --git a/kpovmodeler/pmquickcolor.cpp b/kpovmodeler/pmquickcolor.cpp
index fcf34e85..25fc7aff 100644
--- a/kpovmodeler/pmquickcolor.cpp
+++ b/kpovmodeler/pmquickcolor.cpp
@@ -52,12 +52,12 @@ PMQuickColor::~PMQuickColor( )
{
}
-QString PMQuickColor::description( ) const
+TQString PMQuickColor::description( ) const
{
return i18n( "quick color" );
}
-void PMQuickColor::serialize( QDomElement& e, QDomDocument& /*doc*/ ) const
+void PMQuickColor::serialize( TQDomElement& e, TQDomDocument& /*doc*/ ) const
{
e.setAttribute( "quickcolor", m_color.serializeXML( ) );
}
@@ -102,7 +102,7 @@ void PMQuickColor::setColor( const PMColor& c )
}
}
-PMDialogEditBase* PMQuickColor::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMQuickColor::editWidget( TQWidget* parent ) const
{
return new PMQuickColorEdit( parent );
}
diff --git a/kpovmodeler/pmquickcolor.h b/kpovmodeler/pmquickcolor.h
index a1dce42d..84a3afb5 100644
--- a/kpovmodeler/pmquickcolor.h
+++ b/kpovmodeler/pmquickcolor.h
@@ -54,7 +54,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMQuickColor( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -62,19 +62,19 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMQuickColorEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmquickcolor" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmquickcolor" ); }
/**
* Returns the color
diff --git a/kpovmodeler/pmquickcoloredit.cpp b/kpovmodeler/pmquickcoloredit.cpp
index 35c21234..cb86c0c0 100644
--- a/kpovmodeler/pmquickcoloredit.cpp
+++ b/kpovmodeler/pmquickcoloredit.cpp
@@ -21,12 +21,12 @@
#include "pmcoloredit.h"
#include "pmdebug.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
-PMQuickColorEdit::PMQuickColorEdit( QWidget* parent, const char* name )
+PMQuickColorEdit::PMQuickColorEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -36,12 +36,12 @@ void PMQuickColorEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* layout = new QHBoxLayout( topLayout( ) );
+ TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) );
m_pColorEdit = new PMColorEdit( false, this );
- layout->addWidget( new QLabel( i18n( "Color:" ), this ), 0, AlignTop );
+ layout->addWidget( new TQLabel( i18n( "Color:" ), this ), 0, AlignTop );
layout->addWidget( m_pColorEdit );
- connect( m_pColorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pColorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMQuickColorEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmquickcoloredit.h b/kpovmodeler/pmquickcoloredit.h
index 78759a88..7f6d16e9 100644
--- a/kpovmodeler/pmquickcoloredit.h
+++ b/kpovmodeler/pmquickcoloredit.h
@@ -42,7 +42,7 @@ public:
/**
* Creates a PMQuickColorEdit with parent and name
*/
- PMQuickColorEdit( QWidget* parent, const char* name = 0 );
+ PMQuickColorEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmradiosity.cpp b/kpovmodeler/pmradiosity.cpp
index d5446b25..86d36e74 100644
--- a/kpovmodeler/pmradiosity.cpp
+++ b/kpovmodeler/pmradiosity.cpp
@@ -136,12 +136,12 @@ void PMRadiosity::cleanUp( ) const
Base::cleanUp( );
}
-QString PMRadiosity::description( ) const
+TQString PMRadiosity::description( ) const
{
return i18n( "radiosity" );
}
-void PMRadiosity::serialize( QDomElement& e, QDomDocument& ) const
+void PMRadiosity::serialize( TQDomElement& e, TQDomDocument& ) const
{
e.setAttribute( "adc_bailout", m_adcBailout );
@@ -356,7 +356,7 @@ void PMRadiosity::setRecursionLimit( int c )
}
}
-PMDialogEditBase* PMRadiosity::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMRadiosity::editWidget( TQWidget* parent ) const
{
return new PMRadiosityEdit( parent );
}
diff --git a/kpovmodeler/pmradiosity.h b/kpovmodeler/pmradiosity.h
index 56a1cbd4..c56ccec2 100644
--- a/kpovmodeler/pmradiosity.h
+++ b/kpovmodeler/pmradiosity.h
@@ -50,7 +50,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMRadiosity( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -58,19 +58,19 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMRadiosityEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmradiosity" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmradiosity" ); }
/**
* Returns the adc bailout
diff --git a/kpovmodeler/pmradiosityedit.cpp b/kpovmodeler/pmradiosityedit.cpp
index 1154214d..97494ff8 100644
--- a/kpovmodeler/pmradiosityedit.cpp
+++ b/kpovmodeler/pmradiosityedit.cpp
@@ -20,15 +20,15 @@
#include "pmradiosity.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <kdialog.h>
#include <kmessagebox.h>
-PMRadiosityEdit::PMRadiosityEdit( QWidget* parent, const char* name )
+PMRadiosityEdit::PMRadiosityEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -36,91 +36,91 @@ PMRadiosityEdit::PMRadiosityEdit( QWidget* parent, const char* name )
void PMRadiosityEdit::createTopWidgets( )
{
- QHBoxLayout* hl;
- QGridLayout *gl;
- QLabel* lbl;
+ TQHBoxLayout* hl;
+ TQGridLayout *gl;
+ TQLabel* lbl;
Base::createTopWidgets( );
- hl = new QHBoxLayout( topLayout( ) );
- gl = new QGridLayout( hl, 15, 2 );
+ hl = new TQHBoxLayout( topLayout( ) );
+ gl = new TQGridLayout( hl, 15, 2 );
- lbl = new QLabel( i18n( "Adc bailout:" ), this );
+ lbl = new TQLabel( i18n( "Adc bailout:" ), this );
m_pAdcBailout = new PMFloatEdit( this );
m_pAdcBailout->setValidation( true, 0, true, 1 );
gl->addWidget( lbl, 0, 0 );
gl->addWidget( m_pAdcBailout, 0, 1 );
- m_pAlwaysSample = new QCheckBox( i18n( "Always sample" ), this );
+ m_pAlwaysSample = new TQCheckBox( i18n( "Always sample" ), this );
gl->addMultiCellWidget( m_pAlwaysSample, 1, 1, 0, 1 );
- lbl = new QLabel( i18n( "Brightness:" ), this );
+ lbl = new TQLabel( i18n( "Brightness:" ), this );
m_pBrightness = new PMFloatEdit( this );
m_pBrightness->setValidation( true, 0, false, 0 );
gl->addWidget( lbl, 2, 0 );
gl->addWidget( m_pBrightness, 2, 1 );
- lbl = new QLabel( i18n( "Count:" ), this );
+ lbl = new TQLabel( i18n( "Count:" ), this );
m_pCount = new PMIntEdit( this );
m_pCount->setValidation( true, 0, true, 1600 );
gl->addWidget( lbl, 3, 0 );
gl->addWidget( m_pCount, 3, 1 );
- lbl = new QLabel( i18n( "Error boundary:" ), this );
+ lbl = new TQLabel( i18n( "Error boundary:" ), this );
m_pErrorBound = new PMFloatEdit( this );
m_pErrorBound->setValidation( true, 0, false, 0 );
gl->addWidget( lbl, 4, 0 );
gl->addWidget( m_pErrorBound, 4, 1 );
- lbl = new QLabel( i18n( "Gray threshold:" ), this );
+ lbl = new TQLabel( i18n( "Gray threshold:" ), this );
m_pGrayThreshold = new PMFloatEdit( this );
m_pGrayThreshold->setValidation( true, 0, true, 1 );
gl->addWidget( lbl, 5, 0 );
gl->addWidget( m_pGrayThreshold, 5, 1 );
- lbl = new QLabel( i18n( "Low error factor:" ), this );
+ lbl = new TQLabel( i18n( "Low error factor:" ), this );
m_pLowErrorFactor = new PMFloatEdit( this );
m_pLowErrorFactor->setValidation( true, 0, true, 1 );
gl->addWidget( lbl, 6, 0 );
gl->addWidget( m_pLowErrorFactor, 6, 1 );
- lbl = new QLabel( i18n( "Maximum sample:" ), this );
+ lbl = new TQLabel( i18n( "Maximum sample:" ), this );
m_pMaxSample = new PMFloatEdit( this );
m_pMaxSample->setValidation( true, -1, false, 0 );
gl->addWidget( lbl, 7, 0 );
gl->addWidget( m_pMaxSample, 7, 1 );
- m_pMedia = new QCheckBox( i18n( "Media" ), this );
+ m_pMedia = new TQCheckBox( i18n( "Media" ), this );
gl->addMultiCellWidget( m_pMedia, 8, 8, 0, 1 );
- lbl = new QLabel( i18n( "Minimum reuse:" ), this );
+ lbl = new TQLabel( i18n( "Minimum reuse:" ), this );
m_pMinimumReuse = new PMFloatEdit( this );
m_pMinimumReuse->setValidation( true, 0, true, 1 );
gl->addWidget( lbl, 9, 0 );
gl->addWidget( m_pMinimumReuse, 9, 1 );
- lbl = new QLabel( i18n( "Nearest count:" ), this );
+ lbl = new TQLabel( i18n( "Nearest count:" ), this );
m_pNearestCount = new PMIntEdit( this );
m_pNearestCount->setValidation( true, 0, true, 20 );
gl->addWidget( lbl, 10, 0 );
gl->addWidget( m_pNearestCount, 10, 1 );
- m_pNormal = new QCheckBox( i18n( "Normal" ), this );
+ m_pNormal = new TQCheckBox( i18n( "Normal" ), this );
gl->addMultiCellWidget( m_pNormal, 11, 11, 0, 1 );
- lbl = new QLabel( i18n( "Pretrace start:" ), this );
+ lbl = new TQLabel( i18n( "Pretrace start:" ), this );
m_pPretraceStart = new PMFloatEdit( this );
m_pPretraceStart->setValidation( true, 0, true, 1 );
gl->addWidget( lbl, 12, 0 );
gl->addWidget( m_pPretraceStart, 12, 1 );
- lbl = new QLabel( i18n( "Pretrace end:" ), this );
+ lbl = new TQLabel( i18n( "Pretrace end:" ), this );
m_pPretraceEnd = new PMFloatEdit( this );
m_pPretraceEnd->setValidation( true, 0, true, 1 );
gl->addWidget( lbl, 13, 0 );
gl->addWidget( m_pPretraceEnd, 13, 1 );
- lbl = new QLabel( i18n( "Recursion limit:" ), this );
+ lbl = new TQLabel( i18n( "Recursion limit:" ), this );
m_pRecursionLimit = new PMIntEdit( this );
m_pRecursionLimit->setValidation( true, 1, true, 20 );
gl->addWidget( lbl, 14, 0 );
@@ -128,21 +128,21 @@ void PMRadiosityEdit::createTopWidgets( )
hl->addStretch( 1 );
- connect( m_pAdcBailout, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pAlwaysSample, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pBrightness, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pCount, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pErrorBound, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pGrayThreshold, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pLowErrorFactor, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pMaxSample, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pMedia, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pMinimumReuse, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pNearestCount, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pNormal, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pPretraceStart, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pPretraceEnd, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pRecursionLimit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pAdcBailout, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pAlwaysSample, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pBrightness, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pCount, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pErrorBound, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pGrayThreshold, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pLowErrorFactor, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pMaxSample, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pMedia, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pMinimumReuse, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pNearestCount, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pNormal, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pPretraceStart, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pPretraceEnd, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pRecursionLimit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMRadiosityEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmradiosityedit.h b/kpovmodeler/pmradiosityedit.h
index 37ee18c7..d2389cab 100644
--- a/kpovmodeler/pmradiosityedit.h
+++ b/kpovmodeler/pmradiosityedit.h
@@ -29,7 +29,7 @@
class PMRadiosity;
class PMFloatEdit;
class PMIntEdit;
-class QCheckBox;
+class TQCheckBox;
/**
* Dialog edit class for @ref PMRadiosity.
@@ -42,7 +42,7 @@ public:
/**
* Creates a PMRadiosityEdit with parent and name
*/
- PMRadiosityEdit( QWidget* parent, const char* name = 0 );
+ PMRadiosityEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -61,17 +61,17 @@ private:
PMRadiosity* m_pDisplayedObject;
PMFloatEdit* m_pAdcBailout;
- QCheckBox* m_pAlwaysSample;
+ TQCheckBox* m_pAlwaysSample;
PMFloatEdit* m_pBrightness;
PMIntEdit* m_pCount;
PMFloatEdit* m_pErrorBound;
PMFloatEdit* m_pGrayThreshold;
PMFloatEdit* m_pLowErrorFactor;
PMFloatEdit* m_pMaxSample;
- QCheckBox* m_pMedia;
+ TQCheckBox* m_pMedia;
PMFloatEdit* m_pMinimumReuse;
PMIntEdit* m_pNearestCount;
- QCheckBox* m_pNormal;
+ TQCheckBox* m_pNormal;
PMFloatEdit* m_pPretraceStart;
PMFloatEdit* m_pPretraceEnd;
PMIntEdit* m_pRecursionLimit;
diff --git a/kpovmodeler/pmrainbow.cpp b/kpovmodeler/pmrainbow.cpp
index 5a80e013..1fd9e8ca 100644
--- a/kpovmodeler/pmrainbow.cpp
+++ b/kpovmodeler/pmrainbow.cpp
@@ -139,12 +139,12 @@ void PMRainbow::cleanUp( ) const
Base::cleanUp( );
}
-QString PMRainbow::description( ) const
+TQString PMRainbow::description( ) const
{
return i18n( "rainbow" );
}
-void PMRainbow::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMRainbow::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
Base::serialize( e, doc );
e.setAttribute( "enable_direction", m_enableDirection );
@@ -347,7 +347,7 @@ void PMRainbow::enableFalloffAngle( bool c )
}
}
-PMDialogEditBase* PMRainbow::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMRainbow::editWidget( TQWidget* parent ) const
{
return new PMRainbowEdit( parent );
}
diff --git a/kpovmodeler/pmrainbow.h b/kpovmodeler/pmrainbow.h
index 0c95c459..64dae5d7 100644
--- a/kpovmodeler/pmrainbow.h
+++ b/kpovmodeler/pmrainbow.h
@@ -49,7 +49,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMRainbow( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -57,16 +57,16 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMRainbowEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmrainbow" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmrainbow" ); }
/** */
virtual void restoreMemento( PMMemento* s );
diff --git a/kpovmodeler/pmrainbowedit.cpp b/kpovmodeler/pmrainbowedit.cpp
index ff359a7e..7765f720 100644
--- a/kpovmodeler/pmrainbowedit.cpp
+++ b/kpovmodeler/pmrainbowedit.cpp
@@ -23,14 +23,14 @@
#include "pmvector.h"
#include "pmmath.h"
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kmessagebox.h>
-PMRainbowEdit::PMRainbowEdit( QWidget* parent, const char* name )
+PMRainbowEdit::PMRainbowEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -38,76 +38,76 @@ PMRainbowEdit::PMRainbowEdit( QWidget* parent, const char* name )
void PMRainbowEdit::createTopWidgets( )
{
- QHBoxLayout* hl;
- QGridLayout* gl;
+ TQHBoxLayout* hl;
+ TQGridLayout* gl;
Base::createTopWidgets( );
- hl = new QHBoxLayout( topLayout( ) );
- m_pEnableDirectionEdit = new QCheckBox( i18n( "Direction:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ m_pEnableDirectionEdit = new TQCheckBox( i18n( "Direction:" ), this );
m_pDirectionEdit = new PMVectorEdit( "x", "y", "z", this );
hl->addWidget( m_pEnableDirectionEdit );
hl->addWidget( m_pDirectionEdit );
- hl = new QHBoxLayout( topLayout( ) );
- gl = new QGridLayout( hl, 4, 2 );
- m_pEnableAngleEdit = new QCheckBox( i18n( "Angle:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ gl = new TQGridLayout( hl, 4, 2 );
+ m_pEnableAngleEdit = new TQCheckBox( i18n( "Angle:" ), this );
m_pAngleEdit = new PMFloatEdit( this );
gl->addWidget( m_pEnableAngleEdit, 0, 0 );
gl->addWidget( m_pAngleEdit, 0, 1 );
- m_pEnableWidthEdit = new QCheckBox( i18n( "Width:" ), this );
+ m_pEnableWidthEdit = new TQCheckBox( i18n( "Width:" ), this );
m_pWidthEdit = new PMFloatEdit( this );
gl->addWidget( m_pEnableWidthEdit, 1, 0 );
gl->addWidget( m_pWidthEdit, 1, 1 );
- m_pEnableDistanceEdit = new QCheckBox( i18n( "Distance:" ), this );
+ m_pEnableDistanceEdit = new TQCheckBox( i18n( "Distance:" ), this );
m_pDistanceEdit = new PMFloatEdit( this );
gl->addWidget( m_pEnableDistanceEdit, 2, 0 );
gl->addWidget( m_pDistanceEdit, 2, 1 );
- m_pEnableJitterEdit = new QCheckBox( i18n( "Jitter:" ), this );
+ m_pEnableJitterEdit = new TQCheckBox( i18n( "Jitter:" ), this );
m_pJitterEdit = new PMFloatEdit( this );
gl->addWidget( m_pEnableJitterEdit, 3, 0 );
gl->addWidget( m_pJitterEdit, 3, 1 );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- m_pEnableUpEdit = new QCheckBox( i18n( "Up:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ m_pEnableUpEdit = new TQCheckBox( i18n( "Up:" ), this );
m_pUpEdit = new PMVectorEdit( "x", "y", "z", this );
hl->addWidget( m_pEnableUpEdit );
hl->addWidget( m_pUpEdit );
- hl = new QHBoxLayout( topLayout( ) );
- gl = new QGridLayout( hl, 2, 2 );
- m_pEnableArcAngleEdit = new QCheckBox( i18n( "Arc angle:" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ gl = new TQGridLayout( hl, 2, 2 );
+ m_pEnableArcAngleEdit = new TQCheckBox( i18n( "Arc angle:" ), this );
m_pArcAngleEdit = new PMFloatEdit( this );
m_pArcAngleEdit->setValidation( true, 0, true, 360 );
gl->addWidget( m_pEnableArcAngleEdit, 0, 0 );
gl->addWidget( m_pArcAngleEdit, 0, 1 );
- m_pEnableFalloffAngleEdit = new QCheckBox( i18n( "Falloff angle:" ), this );
+ m_pEnableFalloffAngleEdit = new TQCheckBox( i18n( "Falloff angle:" ), this );
m_pFalloffAngleEdit = new PMFloatEdit( this );
m_pFalloffAngleEdit->setValidation( true, 0, true, 360 );
gl->addWidget( m_pEnableFalloffAngleEdit, 1, 0 );
gl->addWidget( m_pFalloffAngleEdit, 1, 1 );
hl->addStretch( 1 );
- connect( m_pDirectionEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pAngleEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pWidthEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pDistanceEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pJitterEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pUpEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pArcAngleEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pFalloffAngleEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pEnableDirectionEdit, SIGNAL( clicked( ) ), SLOT( slotDirectionClicked( ) ) );
- connect( m_pEnableAngleEdit, SIGNAL( clicked( ) ), SLOT( slotAngleClicked( ) ) );
- connect( m_pEnableWidthEdit, SIGNAL( clicked( ) ), SLOT( slotWidthClicked( ) ) );
- connect( m_pEnableDistanceEdit, SIGNAL( clicked( ) ), SLOT( slotDistanceClicked( ) ) );
- connect( m_pEnableJitterEdit, SIGNAL( clicked( ) ), SLOT( slotJitterClicked( ) ) );
- connect( m_pEnableUpEdit, SIGNAL( clicked( ) ), SLOT( slotUpClicked( ) ) );
- connect( m_pEnableArcAngleEdit, SIGNAL( clicked( ) ), SLOT( slotArcAngleClicked( ) ) );
- connect( m_pEnableFalloffAngleEdit, SIGNAL( clicked( ) ), SLOT( slotFalloffAngleClicked( ) ) );
+ connect( m_pDirectionEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pAngleEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pWidthEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pDistanceEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pJitterEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pUpEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pArcAngleEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pFalloffAngleEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pEnableDirectionEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotDirectionClicked( ) ) );
+ connect( m_pEnableAngleEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAngleClicked( ) ) );
+ connect( m_pEnableWidthEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotWidthClicked( ) ) );
+ connect( m_pEnableDistanceEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotDistanceClicked( ) ) );
+ connect( m_pEnableJitterEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotJitterClicked( ) ) );
+ connect( m_pEnableUpEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotUpClicked( ) ) );
+ connect( m_pEnableArcAngleEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotArcAngleClicked( ) ) );
+ connect( m_pEnableFalloffAngleEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotFalloffAngleClicked( ) ) );
}
void PMRainbowEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmrainbowedit.h b/kpovmodeler/pmrainbowedit.h
index c5d4b714..d520f6e2 100644
--- a/kpovmodeler/pmrainbowedit.h
+++ b/kpovmodeler/pmrainbowedit.h
@@ -29,8 +29,8 @@
class PMRainbow;
class PMFloatEdit;
class PMVectorEdit;
-class QCheckBox;
-class QLabel;
+class TQCheckBox;
+class TQLabel;
/**
* Dialog edit class for @ref PMRainbow
@@ -43,7 +43,7 @@ public:
/**
* Creates a PMRainbowEdit with parent and name
*/
- PMRainbowEdit( QWidget* parent, const char* name = 0 );
+ PMRainbowEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -76,14 +76,14 @@ private:
PMVectorEdit* m_pUpEdit;
PMFloatEdit* m_pArcAngleEdit;
PMFloatEdit* m_pFalloffAngleEdit;
- QCheckBox* m_pEnableDirectionEdit;
- QCheckBox* m_pEnableAngleEdit;
- QCheckBox* m_pEnableWidthEdit;
- QCheckBox* m_pEnableDistanceEdit;
- QCheckBox* m_pEnableJitterEdit;
- QCheckBox* m_pEnableUpEdit;
- QCheckBox* m_pEnableArcAngleEdit;
- QCheckBox* m_pEnableFalloffAngleEdit;
+ TQCheckBox* m_pEnableDirectionEdit;
+ TQCheckBox* m_pEnableAngleEdit;
+ TQCheckBox* m_pEnableWidthEdit;
+ TQCheckBox* m_pEnableDistanceEdit;
+ TQCheckBox* m_pEnableJitterEdit;
+ TQCheckBox* m_pEnableUpEdit;
+ TQCheckBox* m_pEnableArcAngleEdit;
+ TQCheckBox* m_pEnableFalloffAngleEdit;
};
diff --git a/kpovmodeler/pmraw.cpp b/kpovmodeler/pmraw.cpp
index a2d44784..31d7ec1a 100644
--- a/kpovmodeler/pmraw.cpp
+++ b/kpovmodeler/pmraw.cpp
@@ -23,7 +23,7 @@
#include "pmmemento.h"
#include <klocale.h>
-#include <qtextstream.h>
+#include <tqtextstream.h>
PMDefinePropertyClass( PMRaw, PMRawProperty );
@@ -44,7 +44,7 @@ PMRaw::PMRaw( const PMRaw& r )
m_code = r.m_code;
}
-PMRaw::PMRaw( PMPart* part, const QString& t )
+PMRaw::PMRaw( PMPart* part, const TQString& t )
: Base( part )
{
m_code = t;
@@ -54,12 +54,12 @@ PMRaw::~PMRaw( )
{
}
-QString PMRaw::description( ) const
+TQString PMRaw::description( ) const
{
return i18n( "raw povray" );
}
-void PMRaw::setCode( const QString& code )
+void PMRaw::setCode( const TQString& code )
{
if( code != m_code )
{
@@ -91,20 +91,20 @@ void PMRaw::cleanUp( ) const
Base::cleanUp( );
}
-void PMRaw::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMRaw::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
- QDomText t = doc.createTextNode( m_code );
+ TQDomText t = doc.createTextNode( m_code );
e.appendChild( t );
}
void PMRaw::readAttributes( const PMXMLHelper& h )
{
- QDomNode e = h.element( ).firstChild( );
+ TQDomNode e = h.element( ).firstChild( );
if( e.isText( ) )
m_code = e.toText( ).data( );
}
-PMDialogEditBase* PMRaw::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMRaw::editWidget( TQWidget* parent ) const
{
return new PMRawEdit( parent );
}
diff --git a/kpovmodeler/pmraw.h b/kpovmodeler/pmraw.h
index 2ba888bc..11c28ad2 100644
--- a/kpovmodeler/pmraw.h
+++ b/kpovmodeler/pmraw.h
@@ -21,7 +21,7 @@
#define PMRAW_H
#include "pmnamedobject.h"
-#include <qstring.h>
+#include <tqstring.h>
/**
@@ -42,7 +42,7 @@ public:
/**
* Creates a raw povray object with text t
*/
- PMRaw( PMPart* part, const QString& t );
+ PMRaw( PMPart* part, const TQString& t );
/**
* Deletes the raw povray object
*/
@@ -51,18 +51,18 @@ public:
/**
* Sets the povray code
*/
- void setCode( const QString& text );
+ void setCode( const TQString& text );
/**
* Returns the raw povray code
*/
- QString code( ) const { return m_code; }
+ TQString code( ) const { return m_code; }
/** */
virtual PMObject* copy( ) const { return new PMRaw( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
@@ -72,9 +72,9 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmraw" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmraw" ); }
/** */
virtual void restoreMemento( PMMemento* s );
private:
@@ -82,7 +82,7 @@ private:
* IDs for @ref PMMementoData
*/
enum PMRawMementoID { PMCodeID };
- QString m_code;
+ TQString m_code;
static PMMetaObject* s_pMetaObject;
};
diff --git a/kpovmodeler/pmrawedit.cpp b/kpovmodeler/pmrawedit.cpp
index 81d752d2..59e0f237 100644
--- a/kpovmodeler/pmrawedit.cpp
+++ b/kpovmodeler/pmrawedit.cpp
@@ -19,13 +19,13 @@
#include "pmrawedit.h"
#include "pmraw.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qmultilineedit.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqmultilineedit.h>
#include <kglobalsettings.h>
#include <klocale.h>
-PMRawEdit::PMRawEdit( QWidget* parent, const char* name )
+PMRawEdit::PMRawEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -35,16 +35,16 @@ void PMRawEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- topLayout( )->addWidget( new QLabel( i18n( "Povray code:" ), this ) );
- m_pEdit = new QMultiLineEdit( this );
+ topLayout( )->addWidget( new TQLabel( i18n( "Povray code:" ), this ) );
+ m_pEdit = new TQMultiLineEdit( this );
#if ( QT_VERSION >= 300 )
m_pEdit->setTextFormat( Qt::PlainText );
- m_pEdit->setWordWrap( QTextEdit::NoWrap );
+ m_pEdit->setWordWrap( TQTextEdit::NoWrap );
#endif
m_pEdit->setFont( KGlobalSettings::fixedFont( ) );
topLayout( )->addWidget( m_pEdit, 2 );
- connect( m_pEdit, SIGNAL( textChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pEdit, TQT_SIGNAL( textChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMRawEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmrawedit.h b/kpovmodeler/pmrawedit.h
index 911ceb4e..2a34db6a 100644
--- a/kpovmodeler/pmrawedit.h
+++ b/kpovmodeler/pmrawedit.h
@@ -27,7 +27,7 @@
#include "pmnamedobjectedit.h"
class PMRaw;
-class QMultiLineEdit;
+class TQMultiLineEdit;
/**
* Dialog edit class for @ref PMRaw.
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMRawEdit with parent and name
*/
- PMRawEdit( QWidget* parent, const char* name = 0 );
+ PMRawEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -55,7 +55,7 @@ protected:
private:
PMRaw* m_pDisplayedObject;
- QMultiLineEdit* m_pEdit;
+ TQMultiLineEdit* m_pEdit;
};
diff --git a/kpovmodeler/pmrendermanager.cpp b/kpovmodeler/pmrendermanager.cpp
index 664f0fd9..27d62465 100644
--- a/kpovmodeler/pmrendermanager.cpp
+++ b/kpovmodeler/pmrendermanager.cpp
@@ -30,11 +30,11 @@
#include "pmgraphicalobject.h"
#include "pmmath.h"
-#include <qptrstack.h>
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qimage.h>
-#include <qpainter.h>
+#include <tqptrstack.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+#include <tqpainter.h>
#include <kconfig.h>
#include <klocale.h>
@@ -78,7 +78,7 @@ PMRenderManager* PMRenderManager::theManager( )
}
PMRenderManager::PMRenderManager( )
- : QObject( qApp )
+ : TQObject( qApp )
{
int i;
@@ -213,40 +213,40 @@ bool PMRenderManager::containsTask( PMGLView* view ) const
return contains;
}
-QColor PMRenderManager::controlPointColor( int i ) const
+TQColor PMRenderManager::controlPointColor( int i ) const
{
if( ( i >= 0 ) && ( i <= 1 ) )
return m_controlPointColor[i];
- return QColor( 0, 0, 0 );
+ return TQColor( 0, 0, 0 );
}
-void PMRenderManager::setControlPointColor( int i, const QColor& c )
+void PMRenderManager::setControlPointColor( int i, const TQColor& c )
{
if( ( i >= 0 ) && ( i <= 1 ) )
m_controlPointColor[i] = c;
}
-QColor PMRenderManager::graphicalObjectColor( int i ) const
+TQColor PMRenderManager::graphicalObjectColor( int i ) const
{
if( ( i >= 0 ) && ( i <= 1 ) )
return m_graphicalObjectColor[i];
- return QColor( 0, 0, 0 );
+ return TQColor( 0, 0, 0 );
}
-void PMRenderManager::setGraphicalObjectColor( int i, const QColor& c )
+void PMRenderManager::setGraphicalObjectColor( int i, const TQColor& c )
{
if( ( i >= 0 ) && ( i <= 1 ) )
m_graphicalObjectColor[i] = c;
}
-QColor PMRenderManager::axesColor( int i ) const
+TQColor PMRenderManager::axesColor( int i ) const
{
if( ( i >= 0 ) && ( i <= 2 ) )
return m_axesColor[i];
- return QColor( 0, 0, 0 );
+ return TQColor( 0, 0, 0 );
}
-void PMRenderManager::setAxesColor( int i, const QColor& c )
+void PMRenderManager::setAxesColor( int i, const TQColor& c )
{
if( ( i >= 0 ) && ( i <= 2 ) )
m_axesColor[i] = c;
@@ -278,7 +278,7 @@ void PMRenderManager::slotStopRendering( )
m_renderTasks.clear( );
}
-void PMRenderManager::timerEvent( QTimerEvent* )
+void PMRenderManager::timerEvent( TQTimerEvent* )
{
killTimers( );
renderTask( );
@@ -499,7 +499,7 @@ void PMRenderManager::renderObject( PMObject* objectToRender )
if( m_quickColorObjects.top( ) != it.current( ) )
{
m_quickColorObjects.push( it.current( ) );
- m_quickColors.push( new QColor( m_currentColor ) );
+ m_quickColors.push( new TQColor( m_currentColor ) );
m_currentColor = qc->color( ).toQColor( );
}
}
@@ -563,7 +563,7 @@ void PMRenderManager::renderObject( PMObject* objectToRender )
if( m_quickColorObjects.top( ) == objectToRender )
{
m_quickColorObjects.pop( );
- QColor* col = m_quickColors.pop( );
+ TQColor* col = m_quickColors.pop( );
if( col )
{
m_currentColor = *col;
@@ -1410,7 +1410,7 @@ void PMRenderManager::renderGrid( )
glVertex2d( screenx, height/2 );
glEnd( );
- QString label = QString( "%1" ).arg( x * signx, 0, 'g', 4 );
+ TQString label = TQString( "%1" ).arg( x * signx, 0, 'g', 4 );
if( approxZero( x ) && label.find( "e-" ) )
label = "0";
@@ -1431,7 +1431,7 @@ void PMRenderManager::renderGrid( )
glVertex2d( width/2, screeny );
glEnd( );
- QString label = QString( "%1" ).arg( y * signy, 0, 'g', 4 );
+ TQString label = TQString( "%1" ).arg( y * signy, 0, 'g', 4 );
if( approxZero( y ) && label.find( "e-" ) )
label = "0";
@@ -1536,7 +1536,7 @@ void PMRenderManager::renderDescription( )
PMCamera* c = m_pCurrentGlView->camera( );
if( c )
{
- QString name( "-" );
+ TQString name( "-" );
if( !c->name( ).isEmpty( ) )
name = c->name( );
else
@@ -1559,27 +1559,27 @@ void PMRenderManager::renderDescription( )
glPopMatrix( );
}
-void PMRenderManager::renderString( const QString& str, double x, double y )
+void PMRenderManager::renderString( const TQString& str, double x, double y )
{
int width = qApp->fontMetrics( ).boundingRect( str ).width( );
int height = qApp->fontMetrics( ).height( );
// GL wants word aligned bitmap
- QBitmap bm( ( ( width + 32 ) % 32 ) * 32, height, true );
+ TQBitmap bm( ( ( width + 32 ) % 32 ) * 32, height, true );
- QPainter p( &bm );
+ TQPainter p( &bm );
p.setFont( qApp->font( ) );
p.drawText( bm.rect( ), Qt::AlignLeft | Qt::AlignBottom, str );
p.end();
// Transform to GL bitmap
- QImage img = bm.convertToImage( ).mirror( ).convertBitOrder( QImage::BigEndian );
+ TQImage img = bm.convertToImage( ).mirror( ).convertBitOrder( TQImage::BigEndian );
glRasterPos2d( x, y );
glBitmap( img.width( ), img.height( ), 0, 0, 0, 0, img.bits( ) );
}
-void PMRenderManager::setGLColor( const QColor& c )
+void PMRenderManager::setGLColor( const TQColor& c )
{
int r, g, b;
diff --git a/kpovmodeler/pmrendermanager.h b/kpovmodeler/pmrendermanager.h
index a29a6589..f8e248fb 100644
--- a/kpovmodeler/pmrendermanager.h
+++ b/kpovmodeler/pmrendermanager.h
@@ -28,11 +28,11 @@
#include "pmobject.h"
#include "pmviewstructure.h"
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qcolor.h>
-#include <qptrstack.h>
-#include <qvaluestack.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqcolor.h>
+#include <tqptrstack.h>
+#include <tqvaluestack.h>
#include <kstaticdeleter.h>
#include <GL/gl.h>
@@ -40,7 +40,7 @@ class PMGLView;
class PMCamera;
class PMPoint;
class KConfig;
-class QString;
+class TQString;
/**
* Used internally by PMRenderManager.
@@ -87,8 +87,8 @@ private:
int m_visibilityLevel;
};
-typedef QPtrList<PMRenderTask> PMRenderTaskList;
-typedef QPtrListIterator<PMRenderTask> PMRenderTaskListIterator;
+typedef TQPtrList<PMRenderTask> PMRenderTaskList;
+typedef TQPtrListIterator<PMRenderTask> PMRenderTaskListIterator;
/**
* Class that controls the background rendering
@@ -141,52 +141,52 @@ public:
/**
* Returns the color for the control points
*/
- QColor controlPointColor( int i ) const;
+ TQColor controlPointColor( int i ) const;
/**
* Sets the control point color
*/
- void setControlPointColor( int i, const QColor& c );
+ void setControlPointColor( int i, const TQColor& c );
/**
* Returns the color for graphical objects
*/
- QColor graphicalObjectColor( int i ) const;
+ TQColor graphicalObjectColor( int i ) const;
/**
* Sets the graphical object color
*/
- void setGraphicalObjectColor( int i, const QColor& c );
+ void setGraphicalObjectColor( int i, const TQColor& c );
/**
* Returns the color for the coordinate axes
*/
- QColor axesColor( int i ) const;
+ TQColor axesColor( int i ) const;
/**
* Sets the axes color
*/
- void setAxesColor( int i, const QColor& c );
+ void setAxesColor( int i, const TQColor& c );
/**
* Returns the background color
*/
- QColor backgroundColor( ) const { return m_backgroundColor; }
+ TQColor backgroundColor( ) const { return m_backgroundColor; }
/**
* Sets the background color
*/
- void setBackgroundColor( const QColor& c ) { m_backgroundColor = c; }
+ void setBackgroundColor( const TQColor& c ) { m_backgroundColor = c; }
/**
* Returns the field of view color.
*/
- QColor fieldOfViewColor( ) const { return m_fieldOfViewColor; }
+ TQColor fieldOfViewColor( ) const { return m_fieldOfViewColor; }
/**
* Sets the field of view color
*/
- void setFieldOfViewColor( const QColor& c ) { m_fieldOfViewColor = c; }
+ void setFieldOfViewColor( const TQColor& c ) { m_fieldOfViewColor = c; }
/**
* Sets the grid color
*/
- void setGridColor( const QColor& c ) { m_gridColor = c; }
+ void setGridColor( const TQColor& c ) { m_gridColor = c; }
/**
* Returns the grid color
*/
- QColor gridColor( ) { return m_gridColor; }
+ TQColor gridColor( ) { return m_gridColor; }
/**
* Sets the grid distance
*/
@@ -209,7 +209,7 @@ public:
/**
* Sets the gl drawing color
*/
- static void setGLColor( const QColor& c );
+ static void setGLColor( const TQColor& c );
/**
* Saves the configuration
@@ -266,7 +266,7 @@ signals:
void renderingFinished( );
protected:
- virtual void timerEvent( QTimerEvent* );
+ virtual void timerEvent( TQTimerEvent* );
private:
/**
@@ -319,7 +319,7 @@ private:
/**
* Renders the string
*/
- void renderString( const QString& str, double x, double y );
+ void renderString( const TQString& str, double x, double y );
/**
* Transforms and renders the view structure for special
@@ -343,7 +343,7 @@ private:
/**
* List of render tasks. The first has the highest priority
*/
- QPtrList<PMRenderTask> m_renderTasks;
+ TQPtrList<PMRenderTask> m_renderTasks;
/**
* Flag for background rendering
*/
@@ -353,35 +353,35 @@ private:
*
* index 0: normal color, 1: selected
*/
- QColor m_graphicalObjectColor[2];
+ TQColor m_graphicalObjectColor[2];
/**
* The color for view structures of textures
*/
- QColor m_textureColor[2];
+ TQColor m_textureColor[2];
/**
* The color for the coordinate axes
*/
- QColor m_axesColor[3];
+ TQColor m_axesColor[3];
/**
* The background color
*/
- QColor m_backgroundColor;
+ TQColor m_backgroundColor;
/**
* color for control points
*
* index 0: normal color, 1: selected
*/
- QColor m_controlPointColor[2];
+ TQColor m_controlPointColor[2];
/**
* Color for the field of view box
*/
- QColor m_fieldOfViewColor;
+ TQColor m_fieldOfViewColor;
/**
* Grid distance and color
*/
int m_gridDistance;
- QColor m_gridColor;
+ TQColor m_gridColor;
/**
* If true, lines are subdivided in camera views with complex
* projections
@@ -406,14 +406,14 @@ private:
// Member variables to save stack space during rendering
PMRenderTask* m_pCurrentTask;
PMGLView* m_pCurrentGlView;
- QPtrStack<PMMatrix> m_matrixStack; // I don't know if the build in gl matrix stack is deep enough
+ TQPtrStack<PMMatrix> m_matrixStack; // I don't know if the build in gl matrix stack is deep enough
bool m_selected;
PMObject* m_pDeselectObject;
PMObjectList m_objectToRenderStack;
- QPtrStack<PMObject> m_quickColorObjects;
- QPtrStack<QColor> m_quickColors;
- QColor m_currentColor;
- QValueStack<int> m_visibilityStack;
+ TQPtrStack<PMObject> m_quickColorObjects;
+ TQPtrStack<TQColor> m_quickColors;
+ TQColor m_currentColor;
+ TQValueStack<int> m_visibilityStack;
int m_currentVisibility;
unsigned int m_renderedLines;
PMMatrix m_controlPointTransformation;
diff --git a/kpovmodeler/pmrendermode.cpp b/kpovmodeler/pmrendermode.cpp
index 1dc32290..8ef8d207 100644
--- a/kpovmodeler/pmrendermode.cpp
+++ b/kpovmodeler/pmrendermode.cpp
@@ -53,7 +53,7 @@ void PMRenderMode::init( )
m_alpha = false;
}
-PMRenderMode::PMRenderMode( const QDomElement& e )
+PMRenderMode::PMRenderMode( const TQDomElement& e )
{
init( );
@@ -77,7 +77,7 @@ PMRenderMode::PMRenderMode( const QDomElement& e )
m_alpha = hlp.boolAttribute( "alpha", m_alpha );
}
-void PMRenderMode::serialize( QDomElement& e ) const
+void PMRenderMode::serialize( TQDomElement& e ) const
{
e.setAttribute( "description", m_description );
e.setAttribute( "height", m_height );
@@ -155,47 +155,47 @@ void PMRenderMode::setSamplingMethod( int method )
m_samplingMethod = AntialiasingNonRecursive;
}
-QStringList PMRenderMode::commandLineSwitches( ) const
+TQStringList PMRenderMode::commandLineSwitches( ) const
{
- QStringList cl;
- QString tmp;
+ TQStringList cl;
+ TQString tmp;
- cl.append( QString( "+W%1" ).arg( m_width ) );
- cl.append( QString( "+H%1" ).arg( m_height ) );
+ cl.append( TQString( "+W%1" ).arg( m_width ) );
+ cl.append( TQString( "+H%1" ).arg( m_height ) );
if( m_subSection )
{
if( m_startRow < 1.0 )
tmp.sprintf( "+SR%4.2f", m_startRow );
else
- tmp = QString( "+SR%1" ).arg( ( int ) ( m_startRow + 0.5 ) );
+ tmp = TQString( "+SR%1" ).arg( ( int ) ( m_startRow + 0.5 ) );
cl.append( tmp );
if( m_endRow < 1.0 )
tmp.sprintf( "+ER%4.2f", m_endRow );
else
- tmp = QString( "+ER%1" ).arg( ( int ) ( m_endRow + 0.5 ) );
+ tmp = TQString( "+ER%1" ).arg( ( int ) ( m_endRow + 0.5 ) );
cl.append( tmp );
if( m_startColumn < 1.0 )
tmp.sprintf( "+SC%4.2f", m_startColumn );
else
- tmp = QString( "+SC%1" ).arg( ( int ) ( m_startColumn + 0.5 ) );
+ tmp = TQString( "+SC%1" ).arg( ( int ) ( m_startColumn + 0.5 ) );
cl.append( tmp );
if( m_endColumn < 1.0 )
tmp.sprintf( "+EC%4.2f", m_endColumn );
else
- tmp = QString( "+EC%1" ).arg( ( int ) ( m_endColumn + 0.5 ) );
+ tmp = TQString( "+EC%1" ).arg( ( int ) ( m_endColumn + 0.5 ) );
cl.append( tmp );
}
- cl.append( QString( "+Q%1" ).arg( m_quality ) );
+ cl.append( TQString( "+Q%1" ).arg( m_quality ) );
if( m_radiosity )
- cl.append( QString( "+QR" ) );
+ cl.append( TQString( "+QR" ) );
else
- cl.append( QString( "-QR" ) );
+ cl.append( TQString( "-QR" ) );
if( m_antialiasing )
{
- cl.append( QString( "+A" ) );
- cl.append( QString( "+AM%1" ).arg( m_samplingMethod ) );
+ cl.append( TQString( "+A" ) );
+ cl.append( TQString( "+AM%1" ).arg( m_samplingMethod ) );
tmp.sprintf( "+A%5.3f", m_antialiasThreshold );
cl.append( tmp );
if( m_antialiasJitter )
@@ -204,16 +204,16 @@ QStringList PMRenderMode::commandLineSwitches( ) const
cl.append( tmp );
}
else
- cl.append( QString( "-J" ) );
- cl.append( QString( "+R%1" ).arg( m_antialiasDepth ) );
+ cl.append( TQString( "-J" ) );
+ cl.append( TQString( "+R%1" ).arg( m_antialiasDepth ) );
}
else
- cl.append( QString( "-A" ) );
+ cl.append( TQString( "-A" ) );
if( m_alpha )
- cl.append( QString( "+UA" ) );
+ cl.append( TQString( "+UA" ) );
else
- cl.append( QString( "-UA" ) );
+ cl.append( TQString( "-UA" ) );
return cl;
}
diff --git a/kpovmodeler/pmrendermode.h b/kpovmodeler/pmrendermode.h
index a8c891ce..eb9410e4 100644
--- a/kpovmodeler/pmrendermode.h
+++ b/kpovmodeler/pmrendermode.h
@@ -24,10 +24,10 @@
#include <config.h>
#endif
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
/**
* Class that represents the render options for povray
@@ -49,10 +49,10 @@ public:
/**
* Reads the attributes from the QDomElement
*/
- PMRenderMode( const QDomElement& e );
+ PMRenderMode( const TQDomElement& e );
- void setDescription( const QString& descr ) { m_description = descr; }
- QString description( ) const { return m_description; }
+ void setDescription( const TQString& descr ) { m_description = descr; }
+ TQString description( ) const { return m_description; }
void setHeight( int height );
int height( ) const { return m_height; }
@@ -96,16 +96,16 @@ public:
/**
* Returns the settings as povray command line switches
*/
- QStringList commandLineSwitches( ) const;
+ TQStringList commandLineSwitches( ) const;
/**
* Saves the data
*/
- void serialize( QDomElement& e ) const;
+ void serialize( TQDomElement& e ) const;
private:
void init( );
- QString m_description;
+ TQString m_description;
int m_height, m_width;
bool m_subSection;
double m_startRow, m_endRow, m_startColumn, m_endColumn;
@@ -122,7 +122,7 @@ private:
bool m_alpha;
};
-typedef QPtrList<PMRenderMode> PMRenderModeList;
-typedef QPtrListIterator<PMRenderMode> PMRenderModeListIterator;
+typedef TQPtrList<PMRenderMode> PMRenderModeList;
+typedef TQPtrListIterator<PMRenderMode> PMRenderModeListIterator;
#endif
diff --git a/kpovmodeler/pmrendermodesdialog.cpp b/kpovmodeler/pmrendermodesdialog.cpp
index 5c4b4b7b..4fa8f09f 100644
--- a/kpovmodeler/pmrendermodesdialog.cpp
+++ b/kpovmodeler/pmrendermodesdialog.cpp
@@ -18,15 +18,15 @@
#include "pmrendermodesdialog.h"
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qtabwidget.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqtabwidget.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
#include <klocale.h>
#include <kconfig.h>
@@ -35,9 +35,9 @@
#include "pmlineedits.h"
-QSize PMRenderModesDialog::s_size = QSize( 300, 200 );
+TQSize PMRenderModesDialog::s_size = TQSize( 300, 200 );
-PMRenderModesDialog::PMRenderModesDialog( PMRenderModeList* modes, QWidget* parent, const char* name )
+PMRenderModesDialog::PMRenderModesDialog( PMRenderModeList* modes, TQWidget* parent, const char* name )
: KDialogBase( parent, name, true, i18n( "Render Modes" ),
Ok | Cancel, Ok )
{
@@ -48,22 +48,22 @@ PMRenderModesDialog::PMRenderModesDialog( PMRenderModeList* modes, QWidget* pare
m_workingModes.append( new PMRenderMode( *( it.current( ) ) ) );
m_workingModes.setAutoDelete( true );
- QVBox* mainPage = makeVBoxMainWidget( );
- m_pListBox = new QListBox( mainPage );
- connect( m_pListBox, SIGNAL( highlighted( int ) ), SLOT( slotModeSelected( int ) ) );
+ TQVBox* mainPage = makeVBoxMainWidget( );
+ m_pListBox = new TQListBox( mainPage );
+ connect( m_pListBox, TQT_SIGNAL( highlighted( int ) ), TQT_SLOT( slotModeSelected( int ) ) );
- QHBox* buttons = new QHBox( mainPage );
+ TQHBox* buttons = new TQHBox( mainPage );
buttons->setSpacing( KDialog::spacingHint( ) );
- m_pAddButton = new QPushButton( i18n( "Add" ), buttons );
- connect( m_pAddButton, SIGNAL( clicked( ) ), SLOT( slotAdd( ) ) );
- m_pRemoveButton = new QPushButton( i18n( "Remove" ), buttons );
- connect( m_pRemoveButton, SIGNAL( clicked( ) ), SLOT( slotRemove( ) ) );
- m_pEditButton = new QPushButton( i18n( "Edit..." ), buttons );
- connect( m_pEditButton, SIGNAL( clicked( ) ), SLOT( slotEdit( ) ) );
- m_pUpButton = new QPushButton( i18n( "Up" ), buttons );
- connect( m_pUpButton, SIGNAL( clicked( ) ), SLOT( slotUp( ) ) );
- m_pDownButton = new QPushButton( i18n( "Down" ), buttons );
- connect( m_pDownButton, SIGNAL( clicked( ) ), SLOT( slotDown( ) ) );
+ m_pAddButton = new TQPushButton( i18n( "Add" ), buttons );
+ connect( m_pAddButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAdd( ) ) );
+ m_pRemoveButton = new TQPushButton( i18n( "Remove" ), buttons );
+ connect( m_pRemoveButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemove( ) ) );
+ m_pEditButton = new TQPushButton( i18n( "Edit..." ), buttons );
+ connect( m_pEditButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotEdit( ) ) );
+ m_pUpButton = new TQPushButton( i18n( "Up" ), buttons );
+ connect( m_pUpButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotUp( ) ) );
+ m_pDownButton = new TQPushButton( i18n( "Down" ), buttons );
+ connect( m_pDownButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotDown( ) ) );
m_pRemoveButton->setEnabled( false );
m_pUpButton->setEnabled( false );
@@ -73,7 +73,7 @@ PMRenderModesDialog::PMRenderModesDialog( PMRenderModeList* modes, QWidget* pare
resize( s_size );
displayList( );
- connect( m_pListBox, SIGNAL( doubleClicked ( QListBoxItem *) ), this, SLOT(slotEdit( ) ) );
+ connect( m_pListBox, TQT_SIGNAL( doubleClicked ( TQListBoxItem *) ), this, TQT_SLOT(slotEdit( ) ) );
}
void PMRenderModesDialog::slotChanged( )
@@ -134,11 +134,11 @@ void PMRenderModesDialog::restoreConfig( KConfig* cfg )
{
cfg->setGroup( "Appearance" );
- QSize defaultSize( 300, 200 );
+ TQSize defaultSize( 300, 200 );
s_size = cfg->readSizeEntry( "RenderModesDialogSize", &defaultSize );
}
-void PMRenderModesDialog::resizeEvent( QResizeEvent* ev )
+void PMRenderModesDialog::resizeEvent( TQResizeEvent* ev )
{
s_size = ev->size( );
}
@@ -197,7 +197,7 @@ void PMRenderModesDialog::slotEdit( )
if ( m_selectionIndex==-1 )
return;
PMRenderModeDialog dlg( m_workingModes.at( m_selectionIndex ) );
- bool changed = ( dlg.exec( ) == QDialog::Accepted );
+ bool changed = ( dlg.exec( ) == TQDialog::Accepted );
if( changed )
{
slotChanged( );
@@ -220,7 +220,7 @@ void PMRenderModesDialog::slotOk( )
}
-QSize PMRenderModeDialog::s_size = QSize( 300, 200 );
+TQSize PMRenderModeDialog::s_size = TQSize( 300, 200 );
const int numQuality = 9;
const char* qualityString[numQuality] =
@@ -239,7 +239,7 @@ const char* qualityString[numQuality] =
const int c_qualityToIndex[12] = { 0, 0, 1, 1, 2, 3, 4, 4, 5, 6, 7, 8 };
const int c_indexToQuality[numQuality] = { 0, 2, 4, 5, 6, 8, 9, 10, 11 };
-PMRenderModeDialog::PMRenderModeDialog( PMRenderMode* mode, QWidget* parent, const char* name )
+PMRenderModeDialog::PMRenderModeDialog( PMRenderMode* mode, TQWidget* parent, const char* name )
: KDialogBase( parent, name, true, i18n( "Render Modes" ),
Ok | Cancel, Ok )
{
@@ -247,58 +247,58 @@ PMRenderModeDialog::PMRenderModeDialog( PMRenderMode* mode, QWidget* parent, con
int i;
// main page
- QWidget* page = new QWidget( this );
+ TQWidget* page = new TQWidget( this );
setMainWidget( page );
- QVBoxLayout* topLayout = new QVBoxLayout( page, 0, spacingHint( ) );
+ TQVBoxLayout* topLayout = new TQVBoxLayout( page, 0, spacingHint( ) );
- QHBoxLayout* descrLayout = new QHBoxLayout( topLayout );
- QLabel* descrLabel = new QLabel( i18n( "Description:" ), page );
+ TQHBoxLayout* descrLayout = new TQHBoxLayout( topLayout );
+ TQLabel* descrLabel = new TQLabel( i18n( "Description:" ), page );
descrLayout->addWidget( descrLabel );
- m_pDescriptionEdit = new QLineEdit( page );
+ m_pDescriptionEdit = new TQLineEdit( page );
descrLayout->addWidget( m_pDescriptionEdit );
- m_pTabWidget = new QTabWidget( page );
+ m_pTabWidget = new TQTabWidget( page );
topLayout->addWidget( m_pTabWidget );
- QWidget* tab;
- QVBoxLayout* tabLayout;
+ TQWidget* tab;
+ TQVBoxLayout* tabLayout;
// size tab
- tab = new QWidget( );
+ tab = new TQWidget( );
m_pTabWidget->addTab( tab, i18n( "Size" ) );
- tabLayout = new QVBoxLayout( tab, marginHint( ), spacingHint( ) );
+ tabLayout = new TQVBoxLayout( tab, marginHint( ), spacingHint( ) );
- QHBoxLayout* sizeHelpLayout = new QHBoxLayout( tabLayout );
- QGridLayout* sizeLayout = new QGridLayout( sizeHelpLayout, 2, 2 );
- sizeLayout->addWidget( new QLabel( i18n( "Width:" ), tab ), 0, 0 );
+ TQHBoxLayout* sizeHelpLayout = new TQHBoxLayout( tabLayout );
+ TQGridLayout* sizeLayout = new TQGridLayout( sizeHelpLayout, 2, 2 );
+ sizeLayout->addWidget( new TQLabel( i18n( "Width:" ), tab ), 0, 0 );
m_pWidthEdit = new PMIntEdit( tab );
m_pWidthEdit->setValidation( true, 1, false, 0 );
sizeLayout->addWidget( m_pWidthEdit, 0, 1 );
- sizeLayout->addWidget( new QLabel( i18n( "Height:" ), tab ), 1, 0 );
+ sizeLayout->addWidget( new TQLabel( i18n( "Height:" ), tab ), 1, 0 );
m_pHeightEdit = new PMIntEdit( tab );
m_pHeightEdit->setValidation( true, 1, false, 0 );
sizeLayout->addWidget( m_pHeightEdit, 1, 1 );
sizeHelpLayout->addStretch( 1 );
- m_pSubsectionBox = new QCheckBox( i18n( "Subsection" ), tab );
+ m_pSubsectionBox = new TQCheckBox( i18n( "Subsection" ), tab );
tabLayout->addWidget( m_pSubsectionBox );
- QHBoxLayout* ssHelpLayout = new QHBoxLayout( tabLayout );
- QGridLayout* ssLayout = new QGridLayout( ssHelpLayout, 4, 2 );
- ssLayout->addWidget( new QLabel( i18n( "Start column:" ), tab ), 0, 0 );
+ TQHBoxLayout* ssHelpLayout = new TQHBoxLayout( tabLayout );
+ TQGridLayout* ssLayout = new TQGridLayout( ssHelpLayout, 4, 2 );
+ ssLayout->addWidget( new TQLabel( i18n( "Start column:" ), tab ), 0, 0 );
m_pStartColumnEdit = new PMFloatEdit( tab );
m_pStartColumnEdit->setValidation( true, 0.0, false, 0.0 );
ssLayout->addWidget( m_pStartColumnEdit, 0, 1 );
- ssLayout->addWidget( new QLabel( i18n( "End column:" ), tab ), 1, 0 );
+ ssLayout->addWidget( new TQLabel( i18n( "End column:" ), tab ), 1, 0 );
m_pEndColumnEdit = new PMFloatEdit( tab );
m_pEndColumnEdit->setValidation( true, 0.0, false, 0.0 );
ssLayout->addWidget( m_pEndColumnEdit, 1, 1 );
- ssLayout->addWidget( new QLabel( i18n( "Start row:" ), tab ), 2, 0 );
+ ssLayout->addWidget( new TQLabel( i18n( "Start row:" ), tab ), 2, 0 );
m_pStartRowEdit = new PMFloatEdit( tab );
m_pStartRowEdit->setValidation( true, 0.0, false, 0.0 );
ssLayout->addWidget( m_pStartRowEdit, 2, 1 );
- ssLayout->addWidget( new QLabel( i18n( "End row:" ), tab ), 3, 0 );
+ ssLayout->addWidget( new TQLabel( i18n( "End row:" ), tab ), 3, 0 );
m_pEndRowEdit = new PMFloatEdit( tab );
m_pEndRowEdit->setValidation( true, 0.0, false, 0.0 );
ssLayout->addWidget( m_pEndRowEdit, 3, 1 );
@@ -307,57 +307,57 @@ PMRenderModeDialog::PMRenderModeDialog( PMRenderMode* mode, QWidget* parent, con
tabLayout->addStretch( 1 );
// quality tab
- tab = new QWidget( );
+ tab = new TQWidget( );
m_pTabWidget->addTab( tab, i18n( "Quality" ) );
- tabLayout = new QVBoxLayout( tab, marginHint( ), spacingHint( ) );
+ tabLayout = new TQVBoxLayout( tab, marginHint( ), spacingHint( ) );
- QHBoxLayout* quHelpLayout = new QHBoxLayout( tabLayout );
- quHelpLayout->addWidget( new QLabel( i18n( "Quality:" ), tab ) );
- m_pQualityCombo = new QComboBox( tab );
+ TQHBoxLayout* quHelpLayout = new TQHBoxLayout( tabLayout );
+ quHelpLayout->addWidget( new TQLabel( i18n( "Quality:" ), tab ) );
+ m_pQualityCombo = new TQComboBox( tab );
quHelpLayout->addWidget( m_pQualityCombo );
for( i = 0; i < numQuality; i++ )
m_pQualityCombo->insertItem( i18n( qualityString[i] ) );
- m_pAntialiasingBox = new QCheckBox( i18n( "Antialiasing" ), tab );
+ m_pAntialiasingBox = new TQCheckBox( i18n( "Antialiasing" ), tab );
tabLayout->addWidget( m_pAntialiasingBox );
- QHBoxLayout* aaHelpLayout = new QHBoxLayout( tabLayout );
- QGridLayout* aaGridLayout = new QGridLayout( aaHelpLayout, 5, 2 );
- aaGridLayout->addWidget( new QLabel( i18n( "Method:" ), tab ), 0, 0 );
- m_pSamplingCombo = new QComboBox( tab );
+ TQHBoxLayout* aaHelpLayout = new TQHBoxLayout( tabLayout );
+ TQGridLayout* aaGridLayout = new TQGridLayout( aaHelpLayout, 5, 2 );
+ aaGridLayout->addWidget( new TQLabel( i18n( "Method:" ), tab ), 0, 0 );
+ m_pSamplingCombo = new TQComboBox( tab );
aaGridLayout->addWidget( m_pSamplingCombo, 0, 1 );
m_pSamplingCombo->insertItem( i18n( "Non Recursive" ) );
m_pSamplingCombo->insertItem( i18n( "Recursive" ) );
- aaGridLayout->addWidget( new QLabel( i18n( "Threshold:" ), tab ), 1, 0 );
+ aaGridLayout->addWidget( new TQLabel( i18n( "Threshold:" ), tab ), 1, 0 );
m_pThresholdEdit = new PMFloatEdit( tab );
aaGridLayout->addWidget( m_pThresholdEdit, 1, 1 );
- aaGridLayout->addWidget( new QLabel( i18n( "Depth:" ), tab ), 2, 0 );
+ aaGridLayout->addWidget( new TQLabel( i18n( "Depth:" ), tab ), 2, 0 );
m_pAntialiasDepthEdit = new PMIntEdit( tab );
m_pAntialiasDepthEdit->setValidation( true, 1, true, 9 );
aaGridLayout->addWidget( m_pAntialiasDepthEdit, 2, 1 );
- m_pJitterBox = new QCheckBox( i18n( "Jitter" ), tab );
+ m_pJitterBox = new TQCheckBox( i18n( "Jitter" ), tab );
aaGridLayout->addMultiCellWidget( m_pJitterBox, 3, 3, 0, 1 );
- aaGridLayout->addWidget( new QLabel( i18n( "Amount:" ), tab ), 4, 0 );
+ aaGridLayout->addWidget( new TQLabel( i18n( "Amount:" ), tab ), 4, 0 );
m_pJitterAmountEdit = new PMFloatEdit( tab );
aaGridLayout->addWidget( m_pJitterAmountEdit, 4, 1 );
aaHelpLayout->addStretch( 1 );
- m_pRadiosityBox = new QCheckBox( i18n( "Radiosity" ), tab );
+ m_pRadiosityBox = new TQCheckBox( i18n( "Radiosity" ), tab );
tabLayout->addWidget( m_pRadiosityBox );
tabLayout->addStretch( 1 );
// output options tab
- tab = new QWidget( );
+ tab = new TQWidget( );
m_pTabWidget->addTab( tab, i18n( "Output" ) );
- tabLayout = new QVBoxLayout( tab, marginHint( ), spacingHint( ) );
+ tabLayout = new TQVBoxLayout( tab, marginHint( ), spacingHint( ) );
- m_pAlphaBox = new QCheckBox( i18n( "Alpha" ), tab );
+ m_pAlphaBox = new TQCheckBox( i18n( "Alpha" ), tab );
tabLayout->addWidget( m_pAlphaBox );
tabLayout->addStretch( 1 );
@@ -371,23 +371,23 @@ PMRenderModeDialog::PMRenderModeDialog( PMRenderMode* mode, QWidget* parent, con
enableButtonOK( false );
// connect signals
- connect( m_pDescriptionEdit, SIGNAL( textChanged( const QString& ) ), SLOT( slotTextChanged( const QString& ) ) );
- connect( m_pHeightEdit, SIGNAL( dataChanged( ) ), SLOT( slotChanged( ) ) );
- connect( m_pWidthEdit, SIGNAL( dataChanged( ) ), SLOT( slotChanged( ) ) );
- connect( m_pSubsectionBox, SIGNAL( toggled( bool ) ), SLOT( slotSubsectionToggled( bool ) ) );
- connect( m_pStartRowEdit, SIGNAL( dataChanged( ) ), SLOT( slotChanged( ) ) );
- connect( m_pEndRowEdit, SIGNAL( dataChanged( ) ), SLOT( slotChanged( ) ) );
- connect( m_pStartColumnEdit, SIGNAL( dataChanged( ) ), SLOT( slotChanged( ) ) );
- connect( m_pEndColumnEdit, SIGNAL( dataChanged( ) ), SLOT( slotChanged( ) ) );
- connect( m_pQualityCombo, SIGNAL( activated( int ) ), SLOT( slotActivated( int ) ) );
- connect( m_pRadiosityBox, SIGNAL( clicked( ) ), SLOT( slotChanged( ) ) );
- connect( m_pAntialiasingBox, SIGNAL( toggled( bool ) ), SLOT( slotAntialiasingToggled( bool ) ) );
- connect( m_pSamplingCombo, SIGNAL( activated( int ) ), SLOT( slotActivated( int ) ) );
- connect( m_pThresholdEdit, SIGNAL( dataChanged( ) ), SLOT( slotChanged( ) ) );
- connect( m_pJitterBox, SIGNAL( toggled( bool ) ), SLOT( slotJitterToggled( bool ) ) );
- connect( m_pJitterAmountEdit, SIGNAL( dataChanged( ) ), SLOT( slotChanged( ) ) );
- connect( m_pAntialiasDepthEdit, SIGNAL( dataChanged( ) ), SLOT( slotChanged( ) ) );
- connect( m_pAlphaBox, SIGNAL( toggled( bool ) ), SLOT( slotToggled( bool ) ) );
+ connect( m_pDescriptionEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotTextChanged( const TQString& ) ) );
+ connect( m_pHeightEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) );
+ connect( m_pWidthEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) );
+ connect( m_pSubsectionBox, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotSubsectionToggled( bool ) ) );
+ connect( m_pStartRowEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) );
+ connect( m_pEndRowEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) );
+ connect( m_pStartColumnEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) );
+ connect( m_pEndColumnEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) );
+ connect( m_pQualityCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotActivated( int ) ) );
+ connect( m_pRadiosityBox, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotChanged( ) ) );
+ connect( m_pAntialiasingBox, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotAntialiasingToggled( bool ) ) );
+ connect( m_pSamplingCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotActivated( int ) ) );
+ connect( m_pThresholdEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) );
+ connect( m_pJitterBox, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotJitterToggled( bool ) ) );
+ connect( m_pJitterAmountEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) );
+ connect( m_pAntialiasDepthEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) );
+ connect( m_pAlphaBox, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotToggled( bool ) ) );
}
void PMRenderModeDialog::saveConfig( KConfig* cfg )
@@ -400,11 +400,11 @@ void PMRenderModeDialog::restoreConfig( KConfig* cfg )
{
cfg->setGroup( "Appearance" );
- QSize defaultSize( 400, 400 );
+ TQSize defaultSize( 400, 400 );
s_size = cfg->readSizeEntry( "RenderModeDialogSize", &defaultSize );
}
-void PMRenderModeDialog::resizeEvent( QResizeEvent* ev )
+void PMRenderModeDialog::resizeEvent( TQResizeEvent* ev )
{
s_size = ev->size( );
}
@@ -574,7 +574,7 @@ void PMRenderModeDialog::slotChanged( )
enableButtonOK( true );
}
-void PMRenderModeDialog::slotTextChanged( const QString& )
+void PMRenderModeDialog::slotTextChanged( const TQString& )
{
slotChanged( );
}
diff --git a/kpovmodeler/pmrendermodesdialog.h b/kpovmodeler/pmrendermodesdialog.h
index a6b6482f..1afce03b 100644
--- a/kpovmodeler/pmrendermodesdialog.h
+++ b/kpovmodeler/pmrendermodesdialog.h
@@ -22,12 +22,12 @@
#include "pmrendermode.h"
#include <kdialogbase.h>
-class QCheckBox;
-class QComboBox;
-class QLineEdit;
-class QListBox;
-class QPushButton;
-class QTabWidget;
+class TQCheckBox;
+class TQComboBox;
+class TQLineEdit;
+class TQListBox;
+class TQPushButton;
+class TQTabWidget;
class KConfig;
class PMIntEdit;
class PMFloatEdit;
@@ -43,7 +43,7 @@ public:
/**
* Creates a dialog for the modes list
*/
- PMRenderModesDialog( PMRenderModeList* modes, QWidget* parent = 0, const char* name = 0 );
+ PMRenderModesDialog( PMRenderModeList* modes, TQWidget* parent = 0, const char* name = 0 );
static void saveConfig( KConfig* cfg );
static void restoreConfig( KConfig* cfg );
@@ -81,7 +81,7 @@ protected slots:
virtual void slotOk( );
protected:
- virtual void resizeEvent( QResizeEvent* ev );
+ virtual void resizeEvent( TQResizeEvent* ev );
private:
void displayList( );
@@ -91,13 +91,13 @@ private:
PMRenderModeList m_workingModes;
int m_selectionIndex;
- QListBox* m_pListBox;
- QPushButton* m_pAddButton;
- QPushButton* m_pRemoveButton;
- QPushButton* m_pUpButton;
- QPushButton* m_pDownButton;
- QPushButton* m_pEditButton;
- static QSize s_size;
+ TQListBox* m_pListBox;
+ TQPushButton* m_pAddButton;
+ TQPushButton* m_pRemoveButton;
+ TQPushButton* m_pUpButton;
+ TQPushButton* m_pDownButton;
+ TQPushButton* m_pEditButton;
+ static TQSize s_size;
};
/**
@@ -111,19 +111,19 @@ public:
/**
* Creates a dialog for the mode
*/
- PMRenderModeDialog( PMRenderMode* mode, QWidget* parent = 0, const char* name = 0 );
+ PMRenderModeDialog( PMRenderMode* mode, TQWidget* parent = 0, const char* name = 0 );
static void saveConfig( KConfig* cfg );
static void restoreConfig( KConfig* cfg );
protected:
- virtual void resizeEvent( QResizeEvent* ev );
+ virtual void resizeEvent( TQResizeEvent* ev );
protected slots:
virtual void slotOk( );
void slotChanged( );
- void slotTextChanged( const QString& );
+ void slotTextChanged( const TQString& );
void slotActivated( int );
void slotSubsectionToggled( bool );
void slotAntialiasingToggled( bool );
@@ -152,28 +152,28 @@ private:
PMRenderMode* m_pMode;
- QTabWidget* m_pTabWidget;
- QLineEdit* m_pDescriptionEdit;
+ TQTabWidget* m_pTabWidget;
+ TQLineEdit* m_pDescriptionEdit;
PMIntEdit* m_pHeightEdit;
PMIntEdit* m_pWidthEdit;
- QCheckBox* m_pSubsectionBox;
+ TQCheckBox* m_pSubsectionBox;
PMFloatEdit* m_pStartRowEdit;
PMFloatEdit* m_pEndRowEdit;
PMFloatEdit* m_pStartColumnEdit;
PMFloatEdit* m_pEndColumnEdit;
// quality
- QComboBox* m_pQualityCombo;
- QCheckBox* m_pRadiosityBox;
- QCheckBox* m_pAntialiasingBox;
- QComboBox* m_pSamplingCombo;
+ TQComboBox* m_pQualityCombo;
+ TQCheckBox* m_pRadiosityBox;
+ TQCheckBox* m_pAntialiasingBox;
+ TQComboBox* m_pSamplingCombo;
PMFloatEdit* m_pThresholdEdit;
- QCheckBox* m_pJitterBox;
+ TQCheckBox* m_pJitterBox;
PMFloatEdit* m_pJitterAmountEdit;
PMIntEdit* m_pAntialiasDepthEdit;
// output
- QCheckBox* m_pAlphaBox;
+ TQCheckBox* m_pAlphaBox;
- static QSize s_size;
+ static TQSize s_size;
};
#endif
diff --git a/kpovmodeler/pmresourcelocator.cpp b/kpovmodeler/pmresourcelocator.cpp
index 7c778b31..715abc45 100644
--- a/kpovmodeler/pmresourcelocator.cpp
+++ b/kpovmodeler/pmresourcelocator.cpp
@@ -19,8 +19,8 @@
#include "pmpovrayrenderwidget.h"
#include "pmdebug.h"
-#include <qfileinfo.h>
-#include <qdir.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
PMResourceLocator* PMResourceLocator::s_pInstance = 0;
KStaticDeleter<PMResourceLocator> PMResourceLocator::s_staticDeleter;
@@ -36,7 +36,7 @@ PMResourceLocator::~PMResourceLocator( )
m_cache.clear( );
}
-QString PMResourceLocator::findFile( const QString& file )
+TQString PMResourceLocator::findFile( const TQString& file )
{
if( !s_pInstance )
s_staticDeleter.setObject( s_pInstance, new PMResourceLocator( ) );
@@ -49,24 +49,24 @@ void PMResourceLocator::clearCache( )
s_pInstance->m_cache.clear( );
}
-QString PMResourceLocator::lookUp( const QString& file )
+TQString PMResourceLocator::lookUp( const TQString& file )
{
if( file.isEmpty( ) )
- return QString::null;
+ return TQString::null;
kdDebug( PMArea ) << "LookUp: " << file << endl;
- QString* ps = m_cache.find( file );
+ TQString* ps = m_cache.find( file );
if( ps )
return *ps;
bool found = false;
- QString fullPath = QString::null;
+ TQString fullPath = TQString::null;
if( file[0] == '/' )
{
// absolute path, library paths are not used
- QFileInfo info( file );
+ TQFileInfo info( file );
if( info.exists( ) && info.isReadable( ) && info.isFile( ) )
{
found = true;
@@ -75,12 +75,12 @@ QString PMResourceLocator::lookUp( const QString& file )
}
else
{
- QStringList plist = PMPovrayRenderWidget::povrayLibraryPaths( );
- QStringList::ConstIterator it = plist.begin( );
+ TQStringList plist = PMPovrayRenderWidget::povrayLibraryPaths( );
+ TQStringList::ConstIterator it = plist.begin( );
for( ; ( it != plist.end( ) ) && !found; ++it )
{
- QDir dir( *it );
- QFileInfo info( dir, file );
+ TQDir dir( *it );
+ TQFileInfo info( dir, file );
if( info.exists( ) && info.isReadable( ) && info.isFile( ) )
{
found = true;
@@ -91,7 +91,7 @@ QString PMResourceLocator::lookUp( const QString& file )
if( found )
{
- QString* ni = new QString( fullPath );
+ TQString* ni = new TQString( fullPath );
if( !m_cache.insert( file, ni ) )
delete ni;
kdDebug( PMArea ) << "File \"" << file << "\" found in "
diff --git a/kpovmodeler/pmresourcelocator.h b/kpovmodeler/pmresourcelocator.h
index 02e725cb..1c016114 100644
--- a/kpovmodeler/pmresourcelocator.h
+++ b/kpovmodeler/pmresourcelocator.h
@@ -23,8 +23,8 @@
#include <config.h>
#endif
-#include <qstring.h>
-#include <qcache.h>
+#include <tqstring.h>
+#include <tqcache.h>
#include <kstaticdeleter.h>
/**
@@ -41,7 +41,7 @@ public:
* Returns the full path for the file or a null string if the file
* was not found. The file can be a relative or absolute path.
*/
- static QString findFile( const QString& file );
+ static TQString findFile( const TQString& file );
/**
* Clears the resource cache. Call this if the library paths are changed
*/
@@ -55,11 +55,11 @@ private:
/**
* File lookup function
*/
- QString lookUp( const QString& file );
+ TQString lookUp( const TQString& file );
static PMResourceLocator* s_pInstance;
static KStaticDeleter<PMResourceLocator> s_staticDeleter;
- QCache<QString> m_cache;
+ TQCache<TQString> m_cache;
};
#endif
diff --git a/kpovmodeler/pmrotate.cpp b/kpovmodeler/pmrotate.cpp
index f3e34040..5a432c91 100644
--- a/kpovmodeler/pmrotate.cpp
+++ b/kpovmodeler/pmrotate.cpp
@@ -24,7 +24,7 @@
#include "pmrotatecontrolpoint.h"
#include <klocale.h>
-#include <qdom.h>
+#include <tqdom.h>
const PMVector rotateDefault = PMVector( 0, 0, 0 );
@@ -51,12 +51,12 @@ PMRotate::~PMRotate( )
{
}
-QString PMRotate::description( ) const
+TQString PMRotate::description( ) const
{
return i18n( "rotate" );
}
-void PMRotate::serialize( QDomElement& e, QDomDocument& /*doc*/ ) const
+void PMRotate::serialize( TQDomElement& e, TQDomDocument& /*doc*/ ) const
{
e.setAttribute( "value", m_rotate.serializeXML( ) );
}
@@ -102,7 +102,7 @@ void PMRotate::setRotation( const PMVector& p )
}
}
-PMDialogEditBase* PMRotate::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMRotate::editWidget( TQWidget* parent ) const
{
return new PMRotateEdit( parent );
}
diff --git a/kpovmodeler/pmrotate.h b/kpovmodeler/pmrotate.h
index 0a8a1dbb..4ecc6d9a 100644
--- a/kpovmodeler/pmrotate.h
+++ b/kpovmodeler/pmrotate.h
@@ -51,7 +51,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMRotate( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -59,16 +59,16 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMRotateEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmrotate" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmrotate" ); }
/**
* Returns the rotation
diff --git a/kpovmodeler/pmrotateedit.cpp b/kpovmodeler/pmrotateedit.cpp
index df2c2340..2ad5f06e 100644
--- a/kpovmodeler/pmrotateedit.cpp
+++ b/kpovmodeler/pmrotateedit.cpp
@@ -20,11 +20,11 @@
#include "pmrotate.h"
#include "pmvectoredit.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
-PMRotateEdit::PMRotateEdit( QWidget* parent, const char* name )
+PMRotateEdit::PMRotateEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -37,7 +37,7 @@ void PMRotateEdit::createTopWidgets( )
m_pVector = new PMVectorEdit( "x", "y", "z", this );
topLayout( )->addWidget( m_pVector );
- connect( m_pVector, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pVector, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMRotateEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmrotateedit.h b/kpovmodeler/pmrotateedit.h
index 89ca56fd..f9e895df 100644
--- a/kpovmodeler/pmrotateedit.h
+++ b/kpovmodeler/pmrotateedit.h
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMRotateEdit with parent and name
*/
- PMRotateEdit( QWidget* parent, const char* name = 0 );
+ PMRotateEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmscale.cpp b/kpovmodeler/pmscale.cpp
index 2be064c2..af8245b8 100644
--- a/kpovmodeler/pmscale.cpp
+++ b/kpovmodeler/pmscale.cpp
@@ -51,12 +51,12 @@ PMScale::~PMScale( )
{
}
-QString PMScale::description( ) const
+TQString PMScale::description( ) const
{
return i18n( "scale" );
}
-void PMScale::serialize( QDomElement& e, QDomDocument& /*d*/ ) const
+void PMScale::serialize( TQDomElement& e, TQDomDocument& /*d*/ ) const
{
e.setAttribute( "value", m_scale.serializeXML( ) );
}
@@ -102,7 +102,7 @@ void PMScale::setScale( const PMVector& p )
}
}
-PMDialogEditBase* PMScale::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMScale::editWidget( TQWidget* parent ) const
{
return new PMScaleEdit( parent );
}
diff --git a/kpovmodeler/pmscale.h b/kpovmodeler/pmscale.h
index bc1a391d..72821041 100644
--- a/kpovmodeler/pmscale.h
+++ b/kpovmodeler/pmscale.h
@@ -52,7 +52,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMScale( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -60,16 +60,16 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMScaleEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmscale" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmscale" ); }
/**
* Returns the scale
diff --git a/kpovmodeler/pmscaleedit.cpp b/kpovmodeler/pmscaleedit.cpp
index 1df7b40f..24f3a471 100644
--- a/kpovmodeler/pmscaleedit.cpp
+++ b/kpovmodeler/pmscaleedit.cpp
@@ -20,11 +20,11 @@
#include "pmscale.h"
#include "pmvectoredit.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
-PMScaleEdit::PMScaleEdit( QWidget* parent, const char* name )
+PMScaleEdit::PMScaleEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -37,7 +37,7 @@ void PMScaleEdit::createTopWidgets( )
m_pVector = new PMVectorEdit( "x", "y", "z", this );
topLayout( )->addWidget( m_pVector );
- connect( m_pVector, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pVector, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMScaleEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmscaleedit.h b/kpovmodeler/pmscaleedit.h
index f18989f5..0e553be5 100644
--- a/kpovmodeler/pmscaleedit.h
+++ b/kpovmodeler/pmscaleedit.h
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMScaleEdit with parent and name
*/
- PMScaleEdit( QWidget* parent, const char* name = 0 );
+ PMScaleEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmscanner.cpp b/kpovmodeler/pmscanner.cpp
index f67b7035..ebabb147 100644
--- a/kpovmodeler/pmscanner.cpp
+++ b/kpovmodeler/pmscanner.cpp
@@ -28,7 +28,7 @@
//#define PMSCAN_DEBUG
PMReservedWordDict::PMReservedWordDict( PMDictMode mode )
- : QAsciiDict<int>( 353 )
+ : TQAsciiDict<int>( 353 )
{
switch( mode )
{
@@ -479,7 +479,7 @@ const char* c_commentRawEnd = "//*PMRawEnd";
const int c_commentRawEndLength = 11;
-PMScanner::PMScanner( QIODevice* device )
+PMScanner::PMScanner( TQIODevice* device )
{
m_svalueAlloc = 256;
m_svalue = ( char* ) malloc( m_svalueAlloc );
@@ -704,7 +704,7 @@ int PMScanner::nextToken( )
#ifdef PMSCAN_DEBUG
kdDebug( PMArea ) << "Line " << m_line << ": Single char '"
- << QString( QChar( ( char ) m_char ) ) << "'\n";
+ << TQString( TQChar( ( char ) m_char ) ) << "'\n";
#endif
break;
}
diff --git a/kpovmodeler/pmscanner.h b/kpovmodeler/pmscanner.h
index 6a3e8529..9d2515ea 100644
--- a/kpovmodeler/pmscanner.h
+++ b/kpovmodeler/pmscanner.h
@@ -20,9 +20,9 @@
#ifndef PMSCANNER_H
#define PMSCANNER_H
-#include <qiodevice.h>
-#include <qstring.h>
-#include <qasciidict.h>
+#include <tqiodevice.h>
+#include <tqstring.h>
+#include <tqasciidict.h>
/**
* Dictionary of reserved words for fast lookup
@@ -30,7 +30,7 @@
* The class @ref PMScanner has two static dictionaries: one for reserved
* words and one for directives. The constructor will insert the items.
*/
-class PMReservedWordDict : protected QAsciiDict<int>
+class PMReservedWordDict : protected TQAsciiDict<int>
{
public:
/**
@@ -55,7 +55,7 @@ public:
*/
int find( const char* key ) const
{
- int* result = QAsciiDict<int>::find( key );
+ int* result = TQAsciiDict<int>::find( key );
if( result )
return *result;
return -1;
@@ -70,9 +70,9 @@ class PMScanner
{
public:
/**
- * Creates a scanner that scans the QIODevice device
+ * Creates a scanner that scans the TQIODevice device
*/
- PMScanner( QIODevice* device );
+ PMScanner( TQIODevice* device );
/**
* Deletes the scanner
*/
@@ -110,7 +110,7 @@ public:
/**
* Returns the error string if current token is SCANNER_ERROR_TOK
*/
- QString error( ) const { return m_error; }
+ TQString error( ) const { return m_error; }
/**
* Special parse method for a function statement
*/
@@ -168,7 +168,7 @@ private:
TOKEN_END_ST
};
- QIODevice* m_pDevice;
+ TQIODevice* m_pDevice;
int m_char;
int m_token;
@@ -184,7 +184,7 @@ private:
bool m_bFunctionMode;
int m_line;
- QString m_error;
+ TQString m_error;
};
diff --git a/kpovmodeler/pmscene.cpp b/kpovmodeler/pmscene.cpp
index b8de8eef..cd6593cd 100644
--- a/kpovmodeler/pmscene.cpp
+++ b/kpovmodeler/pmscene.cpp
@@ -18,7 +18,7 @@
#include "pmscene.h"
#include <klocale.h>
-#include <qdom.h>
+#include <tqdom.h>
#include "pmxmlhelper.h"
#include "pmdocumentformat.h"
@@ -47,7 +47,7 @@ PMScene::~PMScene( )
m_renderModes.clear( );
}
-QString PMScene::description( ) const
+TQString PMScene::description( ) const
{
return i18n( "scene" );
}
@@ -72,13 +72,13 @@ void PMScene::cleanUp( ) const
Base::cleanUp( );
}
-void PMScene::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMScene::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "majorFormat", c_majorDocumentFormat );
e.setAttribute( "minorFormat", c_minorDocumentFormat );
e.setAttribute( "visibility_level", m_visibilityLevel );
- QDomElement data = doc.createElement( "extra_data" );
- QDomElement rm;
+ TQDomElement data = doc.createElement( "extra_data" );
+ TQDomElement rm;
PMRenderModeListIterator it( m_renderModes );
for( ; it.current( ); ++it )
@@ -95,15 +95,15 @@ void PMScene::serialize( QDomElement& e, QDomDocument& doc ) const
void PMScene::readAttributes( const PMXMLHelper& h )
{
m_visibilityLevel = h.intAttribute( "visibility_level", c_defaultVisibilityLevel );
- QDomElement e = h.extraData( );
+ TQDomElement e = h.extraData( );
if( !e.isNull( ) )
{
- QDomNode c = e.firstChild( );
+ TQDomNode c = e.firstChild( );
while( !c.isNull( ) )
{
if( c.isElement( ) )
{
- QDomElement ce = c.toElement( );
+ TQDomElement ce = c.toElement( );
if( ce.tagName( ) == "rendermode" )
m_renderModes.append( new PMRenderMode( ce ) );
}
diff --git a/kpovmodeler/pmscene.h b/kpovmodeler/pmscene.h
index 2932c43c..ed7cf227 100644
--- a/kpovmodeler/pmscene.h
+++ b/kpovmodeler/pmscene.h
@@ -58,13 +58,13 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMScene( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmscene" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmscene" ); }
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
diff --git a/kpovmodeler/pmserializer.cpp b/kpovmodeler/pmserializer.cpp
index 087631cc..2f58d0c1 100644
--- a/kpovmodeler/pmserializer.cpp
+++ b/kpovmodeler/pmserializer.cpp
@@ -25,7 +25,7 @@ unsigned int PMSerializer::s_maxErrors = 30;
unsigned int PMSerializer::s_maxWarnings = 50;
-PMSerializer::PMSerializer( QIODevice* dev )
+PMSerializer::PMSerializer( TQIODevice* dev )
{
m_pDev = dev;
m_errors = 0;
@@ -57,12 +57,12 @@ int PMSerializer::errorFlags( ) const
return result;
}
-void PMSerializer::printMessage( const QString& type, const QString& msg )
+void PMSerializer::printMessage( const TQString& type, const TQString& msg )
{
m_messages += PMMessage( type + ": " + msg );
}
-void PMSerializer::printError( const QString& msg )
+void PMSerializer::printError( const TQString& msg )
{
if( m_errors < s_maxErrors )
{
@@ -77,7 +77,7 @@ void PMSerializer::printError( const QString& msg )
}
}
-void PMSerializer::printWarning( const QString& msg )
+void PMSerializer::printWarning( const TQString& msg )
{
if( m_warnings < s_maxWarnings )
{
diff --git a/kpovmodeler/pmserializer.h b/kpovmodeler/pmserializer.h
index 73e509d8..4c579364 100644
--- a/kpovmodeler/pmserializer.h
+++ b/kpovmodeler/pmserializer.h
@@ -23,12 +23,12 @@
#include <config.h>
#endif
-class QIODevice;
+class TQIODevice;
#include "pmobject.h"
#include "pmerrordialog.h"
-#include <qdict.h>
+#include <tqdict.h>
/**
@@ -50,7 +50,7 @@ public:
*
* The serialized data will be written to the io device
*/
- PMSerializer( QIODevice* dev );
+ PMSerializer( TQIODevice* dev );
/**
* Destructor
*/
@@ -60,7 +60,7 @@ public:
* the same string as description( ) of the corresponding
* IO format.
*/
- virtual QString description( ) const = 0;
+ virtual TQString description( ) const = 0;
/**
* Serializes one object to the device
@@ -101,20 +101,20 @@ public:
/**
* Adds an error to the message string
*/
- void printError( const QString& msg );
+ void printError( const TQString& msg );
/**
* Adds a warning to the message string
*/
- void printWarning( const QString& msg );
+ void printWarning( const TQString& msg );
/**
* Adds an info to the message string
*/
- void printInfo( const QString& msg );
+ void printInfo( const TQString& msg );
/**
* Adds the message to the message string. Type is "error", "warning",
* "info"
*/
- void printMessage( const QString& type, const QString& msg );
+ void printMessage( const TQString& type, const TQString& msg );
/**
* Sets the fatal error flag
@@ -142,7 +142,7 @@ protected:
/**
* The assigned IO device for serialization
*/
- QIODevice* m_pDev;
+ TQIODevice* m_pDev;
private:
/**
@@ -152,7 +152,7 @@ private:
/**
* A dictionary object -> message
*/
- QPtrDict< QPtrList<PMMessage> > m_messageDict;
+ TQPtrDict< TQPtrList<PMMessage> > m_messageDict;
/**
* Number of warnings during parsing
*/
diff --git a/kpovmodeler/pmsettingsdialog.cpp b/kpovmodeler/pmsettingsdialog.cpp
index 898719bc..3830a5d9 100644
--- a/kpovmodeler/pmsettingsdialog.cpp
+++ b/kpovmodeler/pmsettingsdialog.cpp
@@ -32,27 +32,27 @@
#include "pmrendermanager.h"
#include "pmdebug.h"
-#include <qvbox.h>
-#include <qlistview.h>
+#include <tqvbox.h>
+#include <tqlistview.h>
#include <klocale.h>
#include <kconfig.h>
#include <kiconloader.h>
//#define KPM_WITH_OBJECT_LIBRARY
-PMSettingsDialogPage::PMSettingsDialogPage( QWidget* parent, const char* name )
- : QWidget( parent, name )
+PMSettingsDialogPage::PMSettingsDialogPage( TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
}
-QSize PMSettingsDialog::s_size = QSize( 640, 400 );
+TQSize PMSettingsDialog::s_size = TQSize( 640, 400 );
-PMSettingsDialog::PMSettingsDialog( PMPart* part, QWidget* parent, const char* name )
+PMSettingsDialog::PMSettingsDialog( PMPart* part, TQWidget* parent, const char* name )
: KDialogBase( TreeList, i18n( "Configure" ), Ok | Apply | Cancel | Default, Ok,
parent, name )
{
- QStringList sl;
- QWidget* w = 0;
+ TQStringList sl;
+ TQWidget* w = 0;
PMSettingsDialogPage* p = 0;
m_pPart = part;
@@ -139,14 +139,14 @@ PMSettingsDialog::PMSettingsDialog( PMPart* part, QWidget* parent, const char* n
void PMSettingsDialog::displaySettings( )
{
- QValueList<PMRegisteredSettingsPage>::const_iterator it;
+ TQValueList<PMRegisteredSettingsPage>::const_iterator it;
for( it = m_pages.begin( ); it != m_pages.end( ); ++it )
( *it ).page->displaySettings( );
}
void PMSettingsDialog::slotCancel( )
{
- QDialog::reject( );
+ TQDialog::reject( );
}
void PMSettingsDialog::slotApply( )
@@ -160,7 +160,7 @@ void PMSettingsDialog::slotOk( )
if( validateData( ) )
{
saveSettings( );
- QDialog::accept( );
+ TQDialog::accept( );
}
}
@@ -168,7 +168,7 @@ void PMSettingsDialog::slotDefault( )
{
int currentPage = activePageIndex( );
PMSettingsDialogPage* page = 0;
- QValueList<PMRegisteredSettingsPage>::const_iterator it;
+ TQValueList<PMRegisteredSettingsPage>::const_iterator it;
for( it = m_pages.begin( ); it != m_pages.end( ) && !page; ++it )
if( ( *it ).index == currentPage )
page = ( *it ).page;
@@ -179,7 +179,7 @@ void PMSettingsDialog::slotDefault( )
bool PMSettingsDialog::validateData( )
{
bool valid = true;
- QValueList<PMRegisteredSettingsPage>::const_iterator it;
+ TQValueList<PMRegisteredSettingsPage>::const_iterator it;
for( it = m_pages.begin( ); it != m_pages.end( ) && valid; ++it )
valid = ( *it ).page->validateData( );
return valid;
@@ -189,7 +189,7 @@ void PMSettingsDialog::saveSettings( )
{
m_repaint = false;
- QValueList<PMRegisteredSettingsPage>::const_iterator it;
+ TQValueList<PMRegisteredSettingsPage>::const_iterator it;
for( it = m_pages.begin( ); it != m_pages.end( ); ++it )
( *it ).page->applySettings( );
@@ -210,16 +210,16 @@ void PMSettingsDialog::restoreConfig( KConfig* cfg )
{
cfg->setGroup( "Appearance" );
- QSize defaultSize( 640, 400 );
+ TQSize defaultSize( 640, 400 );
s_size = cfg->readSizeEntry( "SettingsDialogSize", &defaultSize );
}
-void PMSettingsDialog::resizeEvent( QResizeEvent* ev )
+void PMSettingsDialog::resizeEvent( TQResizeEvent* ev )
{
s_size = ev->size( );
}
-void PMSettingsDialog::registerPage( QWidget* topPage,
+void PMSettingsDialog::registerPage( TQWidget* topPage,
PMSettingsDialogPage* page )
{
int i = pageIndex( topPage );
@@ -229,8 +229,8 @@ void PMSettingsDialog::registerPage( QWidget* topPage,
else
{
m_pages.push_back( PMRegisteredSettingsPage( topPage, page, i ) );
- connect( page, SIGNAL( repaintViews( ) ), SLOT( slotRepaint( ) ) );
- connect( page, SIGNAL( showMe( ) ), SLOT( slotShowPage( ) ) );
+ connect( page, TQT_SIGNAL( repaintViews( ) ), TQT_SLOT( slotRepaint( ) ) );
+ connect( page, TQT_SIGNAL( showMe( ) ), TQT_SLOT( slotShowPage( ) ) );
}
}
@@ -241,7 +241,7 @@ void PMSettingsDialog::slotRepaint( )
void PMSettingsDialog::slotShowPage( )
{
- const QObject* w = sender( );
+ const TQObject* w = sender( );
if( w )
{
int index = findPage( ( const PMSettingsDialogPage* ) w );
@@ -253,7 +253,7 @@ void PMSettingsDialog::slotShowPage( )
int PMSettingsDialog::findPage( const PMSettingsDialogPage* p )
{
int index = -1;
- QValueList<PMRegisteredSettingsPage>::const_iterator it;
+ TQValueList<PMRegisteredSettingsPage>::const_iterator it;
for( it = m_pages.begin( ); it != m_pages.end( ) && index < 0; ++it )
if( ( *it ).page == p )
index = ( *it ).index;
diff --git a/kpovmodeler/pmsettingsdialog.h b/kpovmodeler/pmsettingsdialog.h
index 09f00973..478fafe0 100644
--- a/kpovmodeler/pmsettingsdialog.h
+++ b/kpovmodeler/pmsettingsdialog.h
@@ -24,16 +24,16 @@
#endif
#include <kdialogbase.h>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
-class QFrame;
-class QCheckBox;
-class QLineEdit;
-class QListBox;
-class QListView;
-class QButtonGroup;
-class QComboBox;
+class TQFrame;
+class TQCheckBox;
+class TQLineEdit;
+class TQListBox;
+class TQListView;
+class TQButtonGroup;
+class TQComboBox;
class KColorButton;
class KConfig;
class PMIntEdit;
@@ -56,7 +56,7 @@ public:
/**
* Constructor
*/
- PMSettingsDialogPage( QWidget* parent, const char* name = 0 );
+ PMSettingsDialogPage( TQWidget* parent, const char* name = 0 );
/**
* Display the settings here.
*
@@ -108,14 +108,14 @@ public:
page = 0;
index = 0;
}
- PMRegisteredSettingsPage( QWidget* top, PMSettingsDialogPage* p,
+ PMRegisteredSettingsPage( TQWidget* top, PMSettingsDialogPage* p,
int i )
{
topPage = top;
page = p;
index = i;
}
- QWidget* topPage;
+ TQWidget* topPage;
PMSettingsDialogPage* page;
int index;
};
@@ -130,20 +130,20 @@ public:
/**
* Standard constructor
*/
- PMSettingsDialog( PMPart* part, QWidget* parent = 0, const char* name = 0 );
+ PMSettingsDialog( PMPart* part, TQWidget* parent = 0, const char* name = 0 );
/**
* Registers a new settings page.
*
* @param topPage The page created with addVBoxPage
* @param page The internal settings page
*/
- void registerPage( QWidget* topPage, PMSettingsDialogPage* page );
+ void registerPage( TQWidget* topPage, PMSettingsDialogPage* page );
static void saveConfig( KConfig* cfg );
static void restoreConfig( KConfig* cfg );
protected:
- virtual void resizeEvent( QResizeEvent* ev );
+ virtual void resizeEvent( TQResizeEvent* ev );
protected slots:
/**
@@ -178,10 +178,10 @@ private:
void saveSettings( );
int findPage( const PMSettingsDialogPage* page );
bool m_repaint;
- QValueList<PMRegisteredSettingsPage> m_pages;
+ TQValueList<PMRegisteredSettingsPage> m_pages;
PMPart* m_pPart;
- static QSize s_size;
+ static TQSize s_size;
};
#endif
diff --git a/kpovmodeler/pmshell.cpp b/kpovmodeler/pmshell.cpp
index 52702492..a09b1f82 100644
--- a/kpovmodeler/pmshell.cpp
+++ b/kpovmodeler/pmshell.cpp
@@ -27,7 +27,7 @@
#include <kkeydialog.h>
#include <kaboutdialog.h>
#include <kpopupmenu.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include "pmshell.h"
#include "pmpart.h"
@@ -81,9 +81,9 @@ PMShell::PMShell( const KURL& url )
openURL( url );
setCaption( url.prettyURL( ) );
- connect( m_pPart, SIGNAL( modified( ) ), SLOT( slotModified( ) ) );
- connect( m_pPart, SIGNAL( controlPointMessage( const QString& ) ),
- SLOT( slotControlPointMsg( const QString& ) ) );
+ connect( m_pPart, TQT_SIGNAL( modified( ) ), TQT_SLOT( slotModified( ) ) );
+ connect( m_pPart, TQT_SIGNAL( controlPointMessage( const TQString& ) ),
+ TQT_SLOT( slotControlPointMsg( const TQString& ) ) );
}
PMShell::~PMShell( )
@@ -95,67 +95,67 @@ void PMShell::setupActions( )
// m_helpMenu = new KHelpMenu( this, PMFactory::aboutData( ), true,
// actionCollection( ) );
- KStdAction::openNew( this, SLOT( slotFileNew( ) ), actionCollection( ) );
- KStdAction::open( this, SLOT( slotFileOpen( ) ), actionCollection( ) );
- m_pRecent = KStdAction::openRecent( this, SLOT( slotOpenRecent( const KURL& ) ),
+ KStdAction::openNew( this, TQT_SLOT( slotFileNew( ) ), actionCollection( ) );
+ KStdAction::open( this, TQT_SLOT( slotFileOpen( ) ), actionCollection( ) );
+ m_pRecent = KStdAction::openRecent( this, TQT_SLOT( slotOpenRecent( const KURL& ) ),
actionCollection( ) );
- KStdAction::save( this, SLOT( slotFileSave( ) ), actionCollection( ) );
- KStdAction::saveAs( this, SLOT( slotFileSaveAs( ) ), actionCollection( ) );
+ KStdAction::save( this, TQT_SLOT( slotFileSave( ) ), actionCollection( ) );
+ KStdAction::saveAs( this, TQT_SLOT( slotFileSaveAs( ) ), actionCollection( ) );
- KStdAction::revert( this, SLOT( slotFileRevert( ) ), actionCollection( ) );
- KStdAction::print( this, SLOT( slotFilePrint( ) ), actionCollection( ) );
+ KStdAction::revert( this, TQT_SLOT( slotFileRevert( ) ), actionCollection( ) );
+ KStdAction::print( this, TQT_SLOT( slotFilePrint( ) ), actionCollection( ) );
- KStdAction::close( this, SLOT( slotFileClose( ) ), actionCollection( ) );
- KStdAction::quit( this, SLOT( close( ) ), actionCollection( ) );
+ KStdAction::close( this, TQT_SLOT( slotFileClose( ) ), actionCollection( ) );
+ KStdAction::quit( this, TQT_SLOT( close( ) ), actionCollection( ) );
m_pPathAction = new KToggleAction( i18n( "Show &Path" ), 0, this,
- SLOT( slotShowPath( ) ), actionCollection( ),
+ TQT_SLOT( slotShowPath( ) ), actionCollection( ),
"options_show_path" );
m_pPathAction->setCheckedState(i18n("Hide &Path"));
- m_pStatusbarAction = KStdAction::showStatusbar( this, SLOT( slotShowStatusbar( ) ),
+ m_pStatusbarAction = KStdAction::showStatusbar( this, TQT_SLOT( slotShowStatusbar( ) ),
actionCollection( ) );
- KStdAction::saveOptions( this, SLOT( saveOptions( ) ), actionCollection( ) );
+ KStdAction::saveOptions( this, TQT_SLOT( saveOptions( ) ), actionCollection( ) );
- KStdAction::keyBindings( this, SLOT( slotConfigureKeys( ) ),
+ KStdAction::keyBindings( this, TQT_SLOT( slotConfigureKeys( ) ),
actionCollection( ) );
- KStdAction::configureToolbars( this, SLOT( slotConfigureToolbars( ) ),
+ KStdAction::configureToolbars( this, TQT_SLOT( slotConfigureToolbars( ) ),
actionCollection( ) );
- KStdAction::preferences( this, SLOT( slotSettings( ) ), actionCollection( ) );
+ KStdAction::preferences( this, TQT_SLOT( slotSettings( ) ), actionCollection( ) );
m_pNewTopViewAction = new KAction( i18n( "New Top View" ), 0, this,
- SLOT( slotNewTopView( ) ),
+ TQT_SLOT( slotNewTopView( ) ),
actionCollection( ), "view_new_topview" );
m_pNewBottomViewAction = new KAction( i18n( "New Bottom View" ), 0, this,
- SLOT( slotNewBottomView( ) ),
+ TQT_SLOT( slotNewBottomView( ) ),
actionCollection( ), "view_new_bottomview" );
m_pNewLeftViewAction = new KAction( i18n( "New Left View" ), 0, this,
- SLOT( slotNewLeftView( ) ),
+ TQT_SLOT( slotNewLeftView( ) ),
actionCollection( ), "view_new_leftview" );
m_pNewRightViewAction = new KAction( i18n( "New Right View" ), 0, this,
- SLOT( slotNewRightView( ) ),
+ TQT_SLOT( slotNewRightView( ) ),
actionCollection( ), "view_new_rightview" );
m_pNewFrontViewAction = new KAction( i18n( "New Front View" ), 0, this,
- SLOT( slotNewFrontView( ) ),
+ TQT_SLOT( slotNewFrontView( ) ),
actionCollection( ), "view_new_frontview" );
m_pNewBackViewAction = new KAction( i18n( "New Back View" ), 0, this,
- SLOT( slotNewBackView( ) ),
+ TQT_SLOT( slotNewBackView( ) ),
actionCollection( ), "view_new_back_view" );
m_pNewCameraViewAction = new KAction( i18n( "New Camera View" ), 0, this,
- SLOT( slotNewCameraView( ) ),
+ TQT_SLOT( slotNewCameraView( ) ),
actionCollection( ), "view_new_cameraview" );
m_pNewTreeViewAction = new KAction( i18n( "New Object Tree" ), 0, this,
- SLOT( slotNewTreeView( ) ), actionCollection( ),
+ TQT_SLOT( slotNewTreeView( ) ), actionCollection( ),
"view_new_treeview" );
m_pNewDialogViewAction = new KAction( i18n( "New Properties View" ), 0, this,
- SLOT( slotNewDialogView( ) ), actionCollection( ),
+ TQT_SLOT( slotNewDialogView( ) ), actionCollection( ),
"view_new_dialogview" );
#ifdef KPM_WITH_OBJECT_LIBRARY
m_pNewLibraryBrowserAction = new KAction( i18n( "New Library Browser" ), 0, this,
- SLOT( slotNewLibraryBrowserView( ) ), actionCollection( ),
+ TQT_SLOT( slotNewLibraryBrowserView( ) ), actionCollection( ),
"view_new_librarybrowser" );
#endif
@@ -163,12 +163,12 @@ void PMShell::setupActions( )
m_pViewLayoutsAction = new KActionMenu( i18n( "View Layouts" ),
actionCollection( ), "view_layouts_menu" );
KPopupMenu* menu = m_pViewLayoutsAction->popupMenu( );
- connect( menu, SIGNAL( aboutToShow( ) ), SLOT( slotViewsMenuAboutToShow( ) ) );
+ connect( menu, TQT_SIGNAL( aboutToShow( ) ), TQT_SLOT( slotViewsMenuAboutToShow( ) ) );
PMViewLayoutManager::theManager( )->fillPopupMenu( menu );
- connect( menu, SIGNAL( activated( int ) ), SLOT( slotSelectedLayout( int ) ) );
+ connect( menu, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotSelectedLayout( int ) ) );
m_pSaveViewLayoutAction = new KAction( i18n( "Save View Layout..." ), 0, this,
- SLOT( slotSaveViewLayout( ) ),
+ TQT_SLOT( slotSaveViewLayout( ) ),
actionCollection( ), "save_view_layout" );
}
@@ -178,7 +178,7 @@ void PMShell::setupView( )
}
-PMDockWidget* PMShell::createView( const QString& t, PMViewOptions* o,
+PMDockWidget* PMShell::createView( const TQString& t, PMViewOptions* o,
bool initPosition )
{
PMDockWidget* dock = 0;
@@ -188,11 +188,11 @@ PMDockWidget* PMShell::createView( const QString& t, PMViewOptions* o,
PMViewFactory::theFactory( )->viewFactory( t );
m_viewNumber++;
- QString name = QString( "View (%1)" ).arg( m_viewNumber );
+ TQString name = TQString( "View (%1)" ).arg( m_viewNumber );
if( factory )
{
- QString desc;
+ TQString desc;
// Create the appropriate dock widget
if( o )
desc = factory->description( o );
@@ -214,14 +214,14 @@ PMDockWidget* PMShell::createView( const QString& t, PMViewOptions* o,
}
dock->setWidget( contents );
- connect( dock, SIGNAL( headerCloseButtonClicked( ) ),
- SLOT( slotDockWidgetClosed( ) ) );
+ connect( dock, TQT_SIGNAL( headerCloseButtonClicked( ) ),
+ TQT_SLOT( slotDockWidgetClosed( ) ) );
if( initPosition )
{
dock->resize( 300, 400 );
dock->manualDock( 0, PMDockWidget::DockDesktop, 50,
- mapToGlobal( QPoint( 50, 50 ) ) );
+ mapToGlobal( TQPoint( 50, 50 ) ) );
}
return dock;
}
@@ -231,15 +231,15 @@ PMDockWidget* PMShell::createTreeView( )
{
PMDockWidget* dock = 0;
m_numTreeViews++;
- QString name = QString( "Object Tree (%1)" ).arg( m_numTreeViews );
+ TQString name = TQString( "Object Tree (%1)" ).arg( m_numTreeViews );
dock = createDockWidget( name, SmallIcon( "pmtreeview" ),
0L, i18n( "Object Tree" ), i18n( "Object Tree" ) );
dock->setDockSite( PMDockWidget::DockFullSite );
PMTreeView* tv = new PMTreeView( m_pPart, dock );
dock->setWidget( tv );
- connect( dock, SIGNAL( headerCloseButtonClicked( ) ),
- SLOT( slotDockWidgetClosed( ) ) );
+ connect( dock, TQT_SIGNAL( headerCloseButtonClicked( ) ),
+ TQT_SLOT( slotDockWidgetClosed( ) ) );
return dock;
}
@@ -248,15 +248,15 @@ PMDockWidget* PMShell::createDialogView( )
{
PMDockWidget* dock = 0;
m_numDialogViews++;
- QString name = QString( "Object Properties (%1)" ).arg( m_numDialogViews );
+ TQString name = TQString( "Object Properties (%1)" ).arg( m_numDialogViews );
dock = createDockWidget( name, SmallIcon( "pmdialogview" ),
0L, i18n( "Object Properties" ), i18n( "Object Properties" ) );
dock->setDockSite( PMDockWidget::DockFullSite );
PMDialogView* dv = new PMDialogView( m_pPart, dock );
dock->setWidget( dv );
- connect( dock, SIGNAL( headerCloseButtonClicked( ) ),
- SLOT( slotDockWidgetClosed( ) ) );
+ connect( dock, TQT_SIGNAL( headerCloseButtonClicked( ) ),
+ TQT_SLOT( slotDockWidgetClosed( ) ) );
return dock;
}
@@ -265,18 +265,18 @@ PMDockWidget* PMShell::create3DView( PMGLView::PMViewType t )
{
PMDockWidget* dock = 0;
m_numGLViews++;
- QString name = QString( "3D View (%1)" ).arg( m_numGLViews );
+ TQString name = TQString( "3D View (%1)" ).arg( m_numGLViews );
dock = createDockWidget( name, SmallIcon( "pmglview" ),
0L, i18n( "3D View" ), i18n( "3D View" ) );
dock->setDockSite( PMDockWidget::DockFullSite );
PMGLView* vgl = new PMGLView( m_pPart, t, dock );
dock->setWidget( vgl );
- connect( vgl, SIGNAL( viewTypeChanged( const QString& ) ),
- dock, SLOT( slotSetCaption( const QString& ) ) );
+ connect( vgl, TQT_SIGNAL( viewTypeChanged( const TQString& ) ),
+ dock, TQT_SLOT( slotSetCaption( const TQString& ) ) );
dock->slotSetCaption( PMGLView::viewTypeAsString( t ) );
- connect( dock, SIGNAL( headerCloseButtonClicked( ) ),
- SLOT( slotDockWidgetClosed( ) ) );
+ connect( dock, TQT_SIGNAL( headerCloseButtonClicked( ) ),
+ TQT_SLOT( slotDockWidgetClosed( ) ) );
return dock;
}
@@ -341,13 +341,13 @@ void PMShell::slotNewLibraryBrowserView( )
void PMShell::slotDockWidgetClosed( )
{
- const QObject* o = sender( );
+ const TQObject* o = sender( );
if( o && o->inherits( "PMDockWidget" ) )
{
if( m_objectsToDelete.containsRef( o ) == 0 )
{
m_objectsToDelete.append( o );
- QTimer::singleShot( 0, this, SLOT( slotDeleteClosedObjects( ) ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotDeleteClosedObjects( ) ) );
}
}
}
@@ -377,7 +377,7 @@ void PMShell::openURL( const KURL& url )
void PMShell::slotOpenRecent( const KURL& url )
{
m_openRecentURL = url;
- QTimer::singleShot( 0, this, SLOT( slotOpenRecentTimer( ) ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotOpenRecentTimer( ) ) );
}
void PMShell::slotOpenRecentTimer( )
@@ -402,7 +402,7 @@ void PMShell::slotFileNew( )
void PMShell::slotFileOpen( )
{
KURL url = KFileDialog::getOpenURL(
- QString::null, QString( "*.kpm|" ) + i18n( "Povray Modeler Files (*.kpm)" )
+ TQString::null, TQString( "*.kpm|" ) + i18n( "Povray Modeler Files (*.kpm)" )
+ "\n*|" + i18n( "All Files" ) );
if( !url.isEmpty( ) )
@@ -434,9 +434,9 @@ void PMShell::slotFileSaveAs( )
void PMShell::saveAs( )
{
- KFileDialog dlg( QString::null,
- QString( "*.kpm|" ) + i18n( "Povray Modeler Files (*.kpm)" ) +
- QString( "\n*|" ) + i18n( "All Files" ),
+ KFileDialog dlg( TQString::null,
+ TQString( "*.kpm|" ) + i18n( "Povray Modeler Files (*.kpm)" ) +
+ TQString( "\n*|" ) + i18n( "All Files" ),
0, "filedialog", true );
dlg.setCaption( i18n( "Save As" ) );
dlg.setOperationMode( KFileDialog::Saving );
@@ -446,8 +446,8 @@ void PMShell::saveAs( )
if( !url.isEmpty( ) )
{
- if( dlg.currentFilter( ) == QString( "*.kpm" ) )
- if( QFileInfo( url.path( ) ).extension( ).isEmpty( ) )
+ if( dlg.currentFilter( ) == TQString( "*.kpm" ) )
+ if( TQFileInfo( url.path( ) ).extension( ).isEmpty( ) )
url.setPath( url.path( ) + ".kpm" );
if( overwriteURL( url ) )
@@ -533,8 +533,8 @@ void PMShell::slotConfigureToolbars( )
{
saveMainWindowSettings( KGlobal::config( ), "Appearance" );
KEditToolbar dlg( factory( ) );
- connect( &dlg, SIGNAL( newToolbarConfig( ) ),
- this, SLOT( slotNewToolbarConfig( ) ) );
+ connect( &dlg, TQT_SIGNAL( newToolbarConfig( ) ),
+ this, TQT_SLOT( slotNewToolbarConfig( ) ) );
dlg.exec( );
}
@@ -593,9 +593,9 @@ void PMShell::restoreOptions( )
m_pRecent->loadEntries( config );
}
-void PMShell::setCaption( const QString& caption )
+void PMShell::setCaption( const TQString& caption )
{
- QString tmp;
+ TQString tmp;
if( caption.isEmpty( ) )
tmp = i18n( "unknown" );
@@ -610,7 +610,7 @@ void PMShell::setCaption( const QString& caption )
KMainWindow::setCaption( tmp, m_pPart->isModified( ) );
}
-void PMShell::statusMsg( const QString& text )
+void PMShell::statusMsg( const TQString& text )
{
m_pStatusBar->message( text, 5000 );
}
@@ -621,7 +621,7 @@ bool PMShell::queryClose( )
return m_pPart->closeURL( );
}
-void PMShell::showEvent( QShowEvent* ){
+void PMShell::showEvent( TQShowEvent* ){
activateDock( );
}
@@ -630,12 +630,12 @@ void PMShell::slotModified( )
setCaption( m_pPart->url( ).prettyURL( ) );
}
-void PMShell::slotControlPointMsg( const QString& msg )
+void PMShell::slotControlPointMsg( const TQString& msg )
{
if( msg.isEmpty( ) )
m_pStatusBar->changeItem( msg, c_statusBarControlPoints );
else
- m_pStatusBar->changeItem( QString( " " ) + msg + QString( " " ),
+ m_pStatusBar->changeItem( TQString( " " ) + msg + TQString( " " ),
c_statusBarControlPoints );
}
@@ -645,18 +645,18 @@ bool PMShell::overwriteURL( const KURL& u )
if( u.isLocalFile( ) )
{
- QFileInfo info;
- QString name( u.path( ) );
+ TQFileInfo info;
+ TQString name( u.path( ) );
info.setFile( name );
if( info.exists( ) )
- query = KMessageBox::warningContinueCancel( 0, i18n( "A file with this name already exists.\nDo you want to overwrite it?" ), QString::null, i18n("Overwrite") );
+ query = KMessageBox::warningContinueCancel( 0, i18n( "A file with this name already exists.\nDo you want to overwrite it?" ), TQString::null, i18n("Overwrite") );
}
return ( query == KMessageBox::Continue );
}
void PMShell::slotSelectedLayout( int id )
{
- QMenuItem* menu = m_pViewLayoutsAction->popupMenu( )->findItem( id );
+ TQMenuItem* menu = m_pViewLayoutsAction->popupMenu( )->findItem( id );
PMViewLayoutManager::theManager( )->displayLayout( menu->text( ), this );
}
diff --git a/kpovmodeler/pmshell.h b/kpovmodeler/pmshell.h
index 9a0dbb91..2165e15c 100644
--- a/kpovmodeler/pmshell.h
+++ b/kpovmodeler/pmshell.h
@@ -26,7 +26,7 @@
#include "pmglview.h"
#include "version.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
//class KHelpMenu;
class KStatusBar;
@@ -113,9 +113,9 @@ public slots:
void saveOptions( );
void restoreOptions( );
- void setCaption( const QString& caption = QString::null );
- void statusMsg( const QString& text = QString::null );
- void slotControlPointMsg( const QString& msg = QString::null );
+ void setCaption( const TQString& caption = TQString::null );
+ void statusMsg( const TQString& text = TQString::null );
+ void slotControlPointMsg( const TQString& msg = TQString::null );
void slotModified( );
void slotDockWidgetClosed( );
@@ -126,7 +126,7 @@ public slots:
protected:
virtual bool queryClose( );
- virtual void showEvent( QShowEvent* );
+ virtual void showEvent( TQShowEvent* );
void saveAs( );
public:
@@ -135,7 +135,7 @@ public:
*
* If initPosition is true, the widget is docked to the desktop.
*/
- PMDockWidget* createView( const QString& t, PMViewOptions* c = 0,
+ PMDockWidget* createView( const TQString& t, PMViewOptions* c = 0,
bool initPosition = true );
//PMDockWidget* createTreeView( );
//PMDockWidget* createDialogView( );
@@ -165,7 +165,7 @@ private:
PMPart* m_pPart;
KURL m_openRecentURL;
- QPtrList<QObject> m_objectsToDelete;
+ TQPtrList<TQObject> m_objectsToDelete;
int m_viewNumber;
};
diff --git a/kpovmodeler/pmskysphere.cpp b/kpovmodeler/pmskysphere.cpp
index 735c851b..a31cc475 100644
--- a/kpovmodeler/pmskysphere.cpp
+++ b/kpovmodeler/pmskysphere.cpp
@@ -64,12 +64,12 @@ void PMSkySphere::cleanUp( ) const
Base::cleanUp( );
}
-QString PMSkySphere::description( ) const
+TQString PMSkySphere::description( ) const
{
return i18n( "skysphere" );
}
-PMDialogEditBase* PMSkySphere::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMSkySphere::editWidget( TQWidget* parent ) const
{
return new PMSkySphereEdit( parent );
}
diff --git a/kpovmodeler/pmskysphere.h b/kpovmodeler/pmskysphere.h
index f3799b75..116af543 100644
--- a/kpovmodeler/pmskysphere.h
+++ b/kpovmodeler/pmskysphere.h
@@ -49,7 +49,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMSkySphere( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -59,9 +59,9 @@ public:
/**
* Returns a new @ref PMSkySphereEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmskysphere" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmskysphere" ); }
private:
/**
diff --git a/kpovmodeler/pmskysphereedit.cpp b/kpovmodeler/pmskysphereedit.cpp
index 0dc05580..4a1590b2 100644
--- a/kpovmodeler/pmskysphereedit.cpp
+++ b/kpovmodeler/pmskysphereedit.cpp
@@ -20,12 +20,12 @@
#include "pmskysphere.h"
#include "pmlinkedit.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
-PMSkySphereEdit::PMSkySphereEdit( QWidget* parent, const char* name )
+PMSkySphereEdit::PMSkySphereEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
diff --git a/kpovmodeler/pmskysphereedit.h b/kpovmodeler/pmskysphereedit.h
index 10ef2567..f0e2946e 100644
--- a/kpovmodeler/pmskysphereedit.h
+++ b/kpovmodeler/pmskysphereedit.h
@@ -39,7 +39,7 @@ public:
/**
* Creates a PMSkySphereEdit with parent and name
*/
- PMSkySphereEdit( QWidget* parent, const char* name = 0 );
+ PMSkySphereEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmslope.cpp b/kpovmodeler/pmslope.cpp
index aa652be9..1d2d2977 100644
--- a/kpovmodeler/pmslope.cpp
+++ b/kpovmodeler/pmslope.cpp
@@ -52,12 +52,12 @@ PMSlope::~PMSlope( )
{
}
-QString PMSlope::description( ) const
+TQString PMSlope::description( ) const
{
return i18n( "slope" );
}
-void PMSlope::serialize( QDomElement& e, QDomDocument& /*doc*/ ) const
+void PMSlope::serialize( TQDomElement& e, TQDomDocument& /*doc*/ ) const
{
e.setAttribute( "height", m_height );
e.setAttribute( "slope", m_slope );
@@ -113,7 +113,7 @@ void PMSlope::setSlope( const double c )
}
}
-PMDialogEditBase* PMSlope::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMSlope::editWidget( TQWidget* parent ) const
{
return new PMSlopeEdit( parent );
}
diff --git a/kpovmodeler/pmslope.h b/kpovmodeler/pmslope.h
index 5f89b5b2..eb860373 100644
--- a/kpovmodeler/pmslope.h
+++ b/kpovmodeler/pmslope.h
@@ -50,7 +50,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMSlope( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -58,19 +58,19 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMSlopeEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmslope" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmslope" ); }
double height( ) const { return m_height; }
void setHeight( double c );
diff --git a/kpovmodeler/pmslopeedit.cpp b/kpovmodeler/pmslopeedit.cpp
index 5bfcb88b..63b0ee44 100644
--- a/kpovmodeler/pmslopeedit.cpp
+++ b/kpovmodeler/pmslopeedit.cpp
@@ -21,15 +21,15 @@
#include "pmvectoredit.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <kdialog.h>
-PMSlopeEdit::PMSlopeEdit( QWidget* parent, const char* name )
+PMSlopeEdit::PMSlopeEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -37,25 +37,25 @@ PMSlopeEdit::PMSlopeEdit( QWidget* parent, const char* name )
void PMSlopeEdit::createTopWidgets( )
{
- QHBoxLayout* hl;
- QGridLayout* gl;
+ TQHBoxLayout* hl;
+ TQGridLayout* gl;
Base::createTopWidgets( );
- QLabel* label = new QLabel( i18n( "Height:" ), this );
+ TQLabel* label = new TQLabel( i18n( "Height:" ), this );
m_pHeightEdit = new PMFloatEdit( this );
- hl = new QHBoxLayout( topLayout( ) );
- gl = new QGridLayout( hl, 2, 2 );
+ hl = new TQHBoxLayout( topLayout( ) );
+ gl = new TQGridLayout( hl, 2, 2 );
gl->addWidget( label, 0, 0 );
gl->addWidget( m_pHeightEdit, 0, 1 );
- label = new QLabel( i18n( "Slope:" ), this );
+ label = new TQLabel( i18n( "Slope:" ), this );
m_pSlopeEdit = new PMFloatEdit( this );
gl->addWidget( label, 1, 0 );
gl->addWidget( m_pSlopeEdit, 1, 1 );
hl->addStretch( 1 );
- connect( m_pHeightEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pSlopeEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pHeightEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pSlopeEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMSlopeEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmslopeedit.h b/kpovmodeler/pmslopeedit.h
index 2c4d2af4..a2defaa9 100644
--- a/kpovmodeler/pmslopeedit.h
+++ b/kpovmodeler/pmslopeedit.h
@@ -30,9 +30,9 @@ class PMSlope;
class PMVectorEdit;
class PMIntEdit;
class PMFloatEdit;
-class QComboBox;
-class QCheckBox;
-class QLabel;
+class TQComboBox;
+class TQCheckBox;
+class TQLabel;
/**
* Dialog edit class for @ref PMSlope.
@@ -45,7 +45,7 @@ public:
/**
* Creates a PMSlopeEdit with parent and name
*/
- PMSlopeEdit( QWidget* parent, const char* name = 0 );
+ PMSlopeEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmsolidcolor.cpp b/kpovmodeler/pmsolidcolor.cpp
index c067b12d..dd50d030 100644
--- a/kpovmodeler/pmsolidcolor.cpp
+++ b/kpovmodeler/pmsolidcolor.cpp
@@ -50,12 +50,12 @@ PMSolidColor::~PMSolidColor( )
{
}
-QString PMSolidColor::description( ) const
+TQString PMSolidColor::description( ) const
{
return i18n( "solid color" );
}
-void PMSolidColor::serialize( QDomElement& e, QDomDocument& /*doc*/ ) const
+void PMSolidColor::serialize( TQDomElement& e, TQDomDocument& /*doc*/ ) const
{
e.setAttribute( "color", m_color.serializeXML( ) );
}
@@ -97,7 +97,7 @@ void PMSolidColor::setColor( const PMColor& c )
}
}
-PMDialogEditBase* PMSolidColor::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMSolidColor::editWidget( TQWidget* parent ) const
{
return new PMSolidColorEdit( parent );
}
diff --git a/kpovmodeler/pmsolidcolor.h b/kpovmodeler/pmsolidcolor.h
index 7a575758..225a3a5b 100644
--- a/kpovmodeler/pmsolidcolor.h
+++ b/kpovmodeler/pmsolidcolor.h
@@ -51,7 +51,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMSolidColor( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -59,19 +59,19 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMSolidColorEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmsolidcolor" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmsolidcolor" ); }
/**
* Returns the color
diff --git a/kpovmodeler/pmsolidcoloredit.cpp b/kpovmodeler/pmsolidcoloredit.cpp
index 49183582..3eb326c4 100644
--- a/kpovmodeler/pmsolidcoloredit.cpp
+++ b/kpovmodeler/pmsolidcoloredit.cpp
@@ -20,12 +20,12 @@
#include "pmsolidcolor.h"
#include "pmcoloredit.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
-PMSolidColorEdit::PMSolidColorEdit( QWidget* parent, const char* name )
+PMSolidColorEdit::PMSolidColorEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -35,14 +35,14 @@ void PMSolidColorEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* layout = new QHBoxLayout( topLayout( ) );
+ TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) );
m_pColorEdit = new PMColorEdit( true, this );
- QLabel* label = new QLabel( i18n( "Color:" ), this );
+ TQLabel* label = new TQLabel( i18n( "Color:" ), this );
layout->addWidget( label, 0, AlignTop );
layout->addWidget( m_pColorEdit );
- connect( m_pColorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pColorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMSolidColorEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmsolidcoloredit.h b/kpovmodeler/pmsolidcoloredit.h
index 57439f92..c3dada09 100644
--- a/kpovmodeler/pmsolidcoloredit.h
+++ b/kpovmodeler/pmsolidcoloredit.h
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMSolidColorEdit with parent and name
*/
- PMSolidColorEdit( QWidget* parent, const char* name = 0 );
+ PMSolidColorEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmsolidobject.cpp b/kpovmodeler/pmsolidobject.cpp
index 6907e731..61ddd45c 100644
--- a/kpovmodeler/pmsolidobject.cpp
+++ b/kpovmodeler/pmsolidobject.cpp
@@ -66,7 +66,7 @@ void PMSolidObject::cleanUp( ) const
Base::cleanUp( );
}
-void PMSolidObject::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMSolidObject::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
switch( m_hollow )
{
diff --git a/kpovmodeler/pmsolidobject.h b/kpovmodeler/pmsolidobject.h
index e497c397..be2d2f5c 100644
--- a/kpovmodeler/pmsolidobject.h
+++ b/kpovmodeler/pmsolidobject.h
@@ -53,7 +53,7 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
diff --git a/kpovmodeler/pmsolidobjectedit.cpp b/kpovmodeler/pmsolidobjectedit.cpp
index e6aa3765..4a1a2205 100644
--- a/kpovmodeler/pmsolidobjectedit.cpp
+++ b/kpovmodeler/pmsolidobjectedit.cpp
@@ -19,11 +19,11 @@
#include "pmsolidobjectedit.h"
#include "pmsolidobject.h"
-#include <qcheckbox.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
#include <klocale.h>
-PMSolidObjectEdit::PMSolidObjectEdit( QWidget* parent, const char* name )
+PMSolidObjectEdit::PMSolidObjectEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -31,16 +31,16 @@ PMSolidObjectEdit::PMSolidObjectEdit( QWidget* parent, const char* name )
void PMSolidObjectEdit::createBottomWidgets( )
{
- m_pInverseButton = new QCheckBox( i18n( "Inverse" ), this );
- m_pHollowButton = new QCheckBox( i18n( "Hollow" ), this );
+ m_pInverseButton = new TQCheckBox( i18n( "Inverse" ), this );
+ m_pHollowButton = new TQCheckBox( i18n( "Hollow" ), this );
m_pHollowButton->setTristate( true );
topLayout( )->addWidget( m_pInverseButton );
topLayout( )->addWidget( m_pHollowButton );
- connect( m_pHollowButton, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pInverseButton, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pHollowButton, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pInverseButton, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
Base::createBottomWidgets( );
}
diff --git a/kpovmodeler/pmsolidobjectedit.h b/kpovmodeler/pmsolidobjectedit.h
index 3da2da6a..719e3f01 100644
--- a/kpovmodeler/pmsolidobjectedit.h
+++ b/kpovmodeler/pmsolidobjectedit.h
@@ -27,7 +27,7 @@
#include "pmgraphicalobjectedit.h"
class PMSolidObject;
-class QCheckBox;
+class TQCheckBox;
/**
* Dialog edit class for @ref PMSolidObject.
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMSolidObjectEdit with parent and name
*/
- PMSolidObjectEdit( QWidget* parent, const char* name = 0 );
+ PMSolidObjectEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -55,8 +55,8 @@ protected:
private:
PMSolidObject* m_pDisplayedObject;
- QCheckBox* m_pHollowButton;
- QCheckBox* m_pInverseButton;
+ TQCheckBox* m_pHollowButton;
+ TQCheckBox* m_pInverseButton;
};
diff --git a/kpovmodeler/pmsor.cpp b/kpovmodeler/pmsor.cpp
index b7a9f0ef..2ede8b8a 100644
--- a/kpovmodeler/pmsor.cpp
+++ b/kpovmodeler/pmsor.cpp
@@ -74,8 +74,8 @@ protected:
virtual bool setProtected( PMObject* obj, const PMVariant& var )
{
PMSurfaceOfRevolution* p = ( PMSurfaceOfRevolution* ) obj;
- QValueList<PMVector> list = p->points( );
- QValueList<PMVector>::Iterator it = list.begin( );
+ TQValueList<PMVector> list = p->points( );
+ TQValueList<PMVector>::Iterator it = list.begin( );
int i;
PMVector v = var.vectorData( );
v.resize( 2 );
@@ -96,8 +96,8 @@ protected:
virtual PMVariant getProtected( const PMObject* obj )
{
PMSurfaceOfRevolution* p = ( PMSurfaceOfRevolution* ) obj;
- QValueList<PMVector> list = p->points( );
- QValueList<PMVector>::ConstIterator it = list.at( m_index );
+ TQValueList<PMVector> list = p->points( );
+ TQValueList<PMVector>::ConstIterator it = list.at( m_index );
if( it == list.end( ) )
{
@@ -135,20 +135,20 @@ PMSurfaceOfRevolution::~PMSurfaceOfRevolution( )
{
}
-QString PMSurfaceOfRevolution::description( ) const
+TQString PMSurfaceOfRevolution::description( ) const
{
return i18n( "surface of revolution" );
}
-void PMSurfaceOfRevolution::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMSurfaceOfRevolution::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
- QDomElement data = doc.createElement( "extra_data" );
- QDomElement p;
+ TQDomElement data = doc.createElement( "extra_data" );
+ TQDomElement p;
e.setAttribute( "sturm", m_sturm );
e.setAttribute( "open", m_open );
- QValueList<PMVector>::ConstIterator it;
+ TQValueList<PMVector>::ConstIterator it;
for( it = m_points.begin( ); it != m_points.end( ); ++it )
{
p = doc.createElement( "point" );
@@ -168,18 +168,18 @@ void PMSurfaceOfRevolution::readAttributes( const PMXMLHelper& h )
m_points.clear( );
PMVector v( 2 );
- QDomElement e = h.extraData( );
+ TQDomElement e = h.extraData( );
if( !e.isNull( ) )
{
- QDomNode c = e.firstChild( );
+ TQDomNode c = e.firstChild( );
while( !c.isNull( ) )
{
if( c.isElement( ) )
{
- QDomElement ce = c.toElement( );
+ TQDomElement ce = c.toElement( );
if( ce.tagName( ) == "point" )
{
- QString str = ce.attribute( "vector" );
+ TQString str = ce.attribute( "vector" );
if( !str.isNull( ) )
{
v.loadXML( str );
@@ -241,7 +241,7 @@ void PMSurfaceOfRevolution::setOpen( bool o )
}
}
-void PMSurfaceOfRevolution::setPoints( const QValueList<PMVector>& points )
+void PMSurfaceOfRevolution::setPoints( const TQValueList<PMVector>& points )
{
if( m_points != points )
{
@@ -253,7 +253,7 @@ void PMSurfaceOfRevolution::setPoints( const QValueList<PMVector>& points )
}
}
-PMDialogEditBase* PMSurfaceOfRevolution::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMSurfaceOfRevolution::editWidget( TQWidget* parent ) const
{
return new PMSurfaceOfRevolutionEdit( parent );
}
@@ -330,8 +330,8 @@ void PMSurfaceOfRevolution::createViewStructure( )
// calculate the spline segments
- QValueList<PMSorSegment> segments;
- QValueList<PMVector>::Iterator it1, it2, it3, it4;
+ TQValueList<PMSorSegment> segments;
+ TQValueList<PMVector>::Iterator it1, it2, it3, it4;
it1 = m_points.begin( );
it2 = it1; ++it2;
it3 = it2; ++it3;
@@ -364,7 +364,7 @@ void PMSurfaceOfRevolution::createViewStructure( )
// calculate the points
PMVector point2, point3;
- QValueList<PMSorSegment>::Iterator sit = segments.begin( );
+ TQValueList<PMSorSegment>::Iterator sit = segments.begin( );
double poffset = 1.0 / sSteps;
PMMatrix rot = PMMatrix::rotation( 0.0, M_PI * 2.0 / rSteps, 0.0 );
@@ -408,8 +408,8 @@ void PMSurfaceOfRevolution::createViewStructure( )
void PMSurfaceOfRevolution::controlPoints( PMControlPointList& list )
{
- QValueList<PMVector>::Iterator it;
- QPtrList<PMSorControlPoint> tmp1, tmp2;
+ TQValueList<PMVector>::Iterator it;
+ TQPtrList<PMSorControlPoint> tmp1, tmp2;
int i;
PMSorControlPoint* cp = 0;
@@ -436,7 +436,7 @@ void PMSurfaceOfRevolution::controlPoints( PMControlPointList& list )
tmp2.append( cp );
}
- QPtrListIterator<PMSorControlPoint> cit1( tmp1 ), cit2( tmp2 );
+ TQPtrListIterator<PMSorControlPoint> cit1( tmp1 ), cit2( tmp2 );
for( ; cit1.current( ) && cit2.current( ); ++cit1, ++cit2 )
{
@@ -452,7 +452,7 @@ void PMSurfaceOfRevolution::controlPoints( PMControlPointList& list )
void PMSurfaceOfRevolution::controlPointsChanged( PMControlPointList& list )
{
PMControlPointListIterator it1( list ), it2( list );
- QValueList<PMVector>::Iterator pit = m_points.begin( );
+ TQValueList<PMVector>::Iterator pit = m_points.begin( );
PMSorControlPoint* p1;
PMSorControlPoint* p2;
bool firstChange = true;
@@ -509,7 +509,7 @@ void PMSurfaceOfRevolution::controlPointsChanged( PMControlPointList& list )
}
if( ( pnr == ( num - 1 ) ) || ( pnr == 2 ) )
{
- QValueList<PMVector>::Iterator hit = pit;
+ TQValueList<PMVector>::Iterator hit = pit;
--hit; --hit;
if( approxZero( ( *hit )[1] - ( *pit )[1], c_sorTolerance ) )
@@ -525,7 +525,7 @@ void PMSurfaceOfRevolution::controlPointsChanged( PMControlPointList& list )
}
void PMSurfaceOfRevolution::addObjectActions( const PMControlPointList& /*cp*/,
- QPtrList<PMObjectAction>& actions )
+ TQPtrList<PMObjectAction>& actions )
{
PMObjectAction* a;
@@ -544,7 +544,7 @@ void PMSurfaceOfRevolution::addObjectActions( const PMControlPointList& /*cp*/,
void PMSurfaceOfRevolution::objectActionCalled( const PMObjectAction* action,
const PMControlPointList& cp,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition )
{
if( action->objectType( ) == s_pMetaObject )
@@ -567,7 +567,7 @@ void PMSurfaceOfRevolution::objectActionCalled( const PMObjectAction* action,
}
void PMSurfaceOfRevolution::splitSegment( const PMControlPointList& /*cp*/,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition )
{
// find nearest segment
@@ -577,8 +577,8 @@ void PMSurfaceOfRevolution::splitSegment( const PMControlPointList& /*cp*/,
int i, j;
PMVector mid( 3 ), dist( 2 );
- QPtrListIterator<PMVector> it1( cpViewPosition );
- QPtrListIterator<PMVector> it2( cpViewPosition );
+ TQPtrListIterator<PMVector> it1( cpViewPosition );
+ TQPtrListIterator<PMVector> it2( cpViewPosition );
++it2;
for( j = 0; j < 2; ++j )
@@ -608,10 +608,10 @@ void PMSurfaceOfRevolution::splitSegment( const PMControlPointList& /*cp*/,
}
// add a new segment
- QValueList<PMVector> newPoints = m_points;
- QValueList<PMVector>::Iterator it = newPoints.at( ( unsigned ) ns );
+ TQValueList<PMVector> newPoints = m_points;
+ TQValueList<PMVector>::Iterator it = newPoints.at( ( unsigned ) ns );
PMVector p[4];
- QValueList<PMVector>::Iterator hit = it;
+ TQValueList<PMVector>::Iterator hit = it;
// calculate the spline segment
--hit;
@@ -635,7 +635,7 @@ void PMSurfaceOfRevolution::splitSegment( const PMControlPointList& /*cp*/,
}
void PMSurfaceOfRevolution::joinSegments( const PMControlPointList& /*cp*/,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition )
{
// find nearest point
@@ -653,7 +653,7 @@ void PMSurfaceOfRevolution::joinSegments( const PMControlPointList& /*cp*/,
PMVector* p;
PMVector dist( 2 );
- QPtrListIterator<PMVector> it1( cpViewPosition );
+ TQPtrListIterator<PMVector> it1( cpViewPosition );
for( j = 0; j < 2; ++j )
{
@@ -675,8 +675,8 @@ void PMSurfaceOfRevolution::joinSegments( const PMControlPointList& /*cp*/,
}
// join two segments
- QValueList<PMVector> newPoints = m_points;
- QValueList<PMVector>::Iterator it;
+ TQValueList<PMVector> newPoints = m_points;
+ TQValueList<PMVector>::Iterator it;
// never remove the first or last point
if( ns == 0 )
diff --git a/kpovmodeler/pmsor.h b/kpovmodeler/pmsor.h
index c15b305d..46db677e 100644
--- a/kpovmodeler/pmsor.h
+++ b/kpovmodeler/pmsor.h
@@ -27,8 +27,8 @@
#include "pmsolidobject.h"
#include "pmvector.h"
#include "pmsorcontrolpoint.h"
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
#include <math.h>
class PMViewStructure;
@@ -57,7 +57,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMSurfaceOfRevolution( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -65,18 +65,18 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMSurfaceOfRevolutionEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmsor" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmsor" ); }
/** */
virtual void createMemento( );
@@ -92,21 +92,21 @@ public:
virtual bool hasDisplayDetail( ) const { return true; }
/** */
virtual void addObjectActions( const PMControlPointList&,
- QPtrList<PMObjectAction>& );
+ TQPtrList<PMObjectAction>& );
/** */
virtual void objectActionCalled( const PMObjectAction*,
const PMControlPointList&,
- const QPtrList<PMVector>&,
+ const TQPtrList<PMVector>&,
const PMVector& );
/**
* Returns the sor points
*/
- QValueList<PMVector> points( ) const { return m_points; }
+ TQValueList<PMVector> points( ) const { return m_points; }
/**
* Sets the spline points
*/
- void setPoints( const QValueList<PMVector>& points );
+ void setPoints( const TQValueList<PMVector>& points );
/**
* Returns the number of spline points
*/
@@ -156,17 +156,17 @@ private:
* Object action. Adds a spline point
*/
void splitSegment( const PMControlPointList& cp,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition );
/**
* Object action. Removes a spline point
*/
void joinSegments( const PMControlPointList& cp,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition );
- void stringToValues( const QString& str );
- QString valuesToString( ) const;
+ void stringToValues( const TQString& str );
+ TQString valuesToString( ) const;
/**
* IDs for @ref PMMementoData
@@ -177,7 +177,7 @@ private:
*/
enum PMSurfaceOfRevolutionActionID { PMSplitSegmentID, PMJoinSegmentsID };
- QValueList<PMVector> m_points;
+ TQValueList<PMVector> m_points;
bool m_sturm;
bool m_open;
diff --git a/kpovmodeler/pmsorcontrolpoint.cpp b/kpovmodeler/pmsorcontrolpoint.cpp
index 88924d05..373d0138 100644
--- a/kpovmodeler/pmsorcontrolpoint.cpp
+++ b/kpovmodeler/pmsorcontrolpoint.cpp
@@ -22,7 +22,7 @@
PMSorControlPoint::PMSorControlPoint( PMSorControlPoint* prev,
const PMVector& point,
PMSorControlPoint::CPType type, int id,
- const QString& description )
+ const TQString& description )
: PMControlPoint( id, description )
{
m_point = point;
diff --git a/kpovmodeler/pmsorcontrolpoint.h b/kpovmodeler/pmsorcontrolpoint.h
index 0d9ec283..f25ddde5 100644
--- a/kpovmodeler/pmsorcontrolpoint.h
+++ b/kpovmodeler/pmsorcontrolpoint.h
@@ -42,7 +42,7 @@ public:
*/
PMSorControlPoint( PMSorControlPoint* prev,
const PMVector& point, CPType type,
- int id, const QString& description );
+ int id, const TQString& description );
/**
* Deletes the PMSorControlPoint
*/
diff --git a/kpovmodeler/pmsoredit.cpp b/kpovmodeler/pmsoredit.cpp
index b56949e6..127015df 100644
--- a/kpovmodeler/pmsoredit.cpp
+++ b/kpovmodeler/pmsoredit.cpp
@@ -21,18 +21,18 @@
#include "pmvectorlistedit.h"
#include "pmpart.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <kdialog.h>
#include <kiconloader.h>
#include <kmessagebox.h>
-PMSurfaceOfRevolutionEdit::PMSurfaceOfRevolutionEdit( QWidget* parent, const char* name )
+PMSurfaceOfRevolutionEdit::PMSurfaceOfRevolutionEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -40,37 +40,37 @@ PMSurfaceOfRevolutionEdit::PMSurfaceOfRevolutionEdit( QWidget* parent, const cha
void PMSurfaceOfRevolutionEdit::createBottomWidgets( )
{
- topLayout( )->addWidget( new QLabel( i18n( "Spline points:" ), this ) );
+ topLayout( )->addWidget( new TQLabel( i18n( "Spline points:" ), this ) );
m_pPoints = new PMVectorListEdit( "u", "v", this );
- connect( m_pPoints, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pPoints, SIGNAL( selectionChanged( ) ),
- SLOT( slotSelectionChanged( ) ) );
- QHBoxLayout* hl = new QHBoxLayout( topLayout( ) );
+ connect( m_pPoints, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pPoints, TQT_SIGNAL( selectionChanged( ) ),
+ TQT_SLOT( slotSelectionChanged( ) ) );
+ TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) );
hl->addWidget( m_pPoints, 2 );
- m_pAddAbove = new QPushButton( this );
+ m_pAddAbove = new TQPushButton( this );
m_pAddAbove->setPixmap( SmallIcon( "pmaddpointabove" ) );
- m_pAddBelow = new QPushButton( this );
+ m_pAddBelow = new TQPushButton( this );
m_pAddBelow->setPixmap( SmallIcon( "pmaddpoint" ) );
- m_pRemove = new QPushButton( this );
+ m_pRemove = new TQPushButton( this );
m_pRemove->setPixmap( SmallIcon( "pmremovepoint" ) );
- connect( m_pAddAbove, SIGNAL( clicked( ) ), SLOT( slotAddPointAbove( ) ) );
- connect( m_pAddBelow, SIGNAL( clicked( ) ), SLOT( slotAddPointBelow( ) ) );
- connect( m_pRemove, SIGNAL( clicked( ) ), SLOT( slotRemovePoint( ) ) );
+ connect( m_pAddAbove, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPointAbove( ) ) );
+ connect( m_pAddBelow, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPointBelow( ) ) );
+ connect( m_pRemove, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemovePoint( ) ) );
- QVBoxLayout* bl = new QVBoxLayout( hl );
+ TQVBoxLayout* bl = new TQVBoxLayout( hl );
bl->addWidget( m_pAddAbove );
bl->addWidget( m_pAddBelow );
bl->addWidget( m_pRemove );
bl->addStretch( 1 );
- m_pOpen = new QCheckBox( i18n( "type of the object", "Open" ), this );
+ m_pOpen = new TQCheckBox( i18n( "type of the object", "Open" ), this );
topLayout( )->addWidget( m_pOpen );
- connect( m_pOpen, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- m_pSturm = new QCheckBox( i18n( "Sturm" ), this );
+ connect( m_pOpen, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ m_pSturm = new TQCheckBox( i18n( "Sturm" ), this );
topLayout( )->addWidget( m_pSturm );
- connect( m_pSturm, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pSturm, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
Base::createBottomWidgets( );
}
@@ -146,10 +146,10 @@ bool PMSurfaceOfRevolutionEdit::isDataValid( )
return false;
}
- QValueList<PMVector> points = m_pPoints->vectors( );
- QValueListIterator<PMVector> it1 = points.begin( );
- QValueListIterator<PMVector> it2 = it1; ++it2;
- QValueListIterator<PMVector> it3 = it2; ++it3;
+ TQValueList<PMVector> points = m_pPoints->vectors( );
+ TQValueListIterator<PMVector> it1 = points.begin( );
+ TQValueListIterator<PMVector> it2 = it1; ++it2;
+ TQValueListIterator<PMVector> it3 = it2; ++it3;
int pnr;
for( pnr = 0; it3 != points.end( ); ++it1, ++it2, ++it3, pnr++ )
@@ -186,12 +186,12 @@ void PMSurfaceOfRevolutionEdit::slotAddPointAbove( )
int index = m_pPoints->currentRow( );
if( index >= 0 )
{
- QValueList<PMVector> points = m_pPoints->vectors( );
- QValueListIterator<PMVector> it = points.at( index );
+ TQValueList<PMVector> points = m_pPoints->vectors( );
+ TQValueListIterator<PMVector> it = points.at( index );
if( it != points.end( ) )
{
- QValueListIterator<PMVector> it2 = it;
+ TQValueListIterator<PMVector> it2 = it;
it2--;
PMVector v;
if( it2 == points.end( ) )
@@ -212,12 +212,12 @@ void PMSurfaceOfRevolutionEdit::slotAddPointBelow( )
int index = m_pPoints->currentRow( );
if( index >= 0 )
{
- QValueList<PMVector> points = m_pPoints->vectors( );
- QValueListIterator<PMVector> it = points.at( index );
+ TQValueList<PMVector> points = m_pPoints->vectors( );
+ TQValueListIterator<PMVector> it = points.at( index );
if( it != points.end( ) )
{
- QValueListIterator<PMVector> it2 = it;
+ TQValueListIterator<PMVector> it2 = it;
it2++;
PMVector v;
if( it2 == points.end( ) )
@@ -240,8 +240,8 @@ void PMSurfaceOfRevolutionEdit::slotRemovePoint( )
if( row >= 0 )
{
- QValueList<PMVector> points = m_pPoints->vectors( );
- QValueListIterator<PMVector> it = points.at( row );
+ TQValueList<PMVector> points = m_pPoints->vectors( );
+ TQValueListIterator<PMVector> it = points.at( row );
if( it != points.end( ) && points.size( ) > 1 )
{
diff --git a/kpovmodeler/pmsoredit.h b/kpovmodeler/pmsoredit.h
index eb64be67..1c7c57fd 100644
--- a/kpovmodeler/pmsoredit.h
+++ b/kpovmodeler/pmsoredit.h
@@ -26,15 +26,15 @@
#include "pmsolidobjectedit.h"
#include "pmvectoredit.h"
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
class PMSurfaceOfRevolution;
-class QVBoxLayout;
-class QComboBox;
-class QCheckBox;
-class QPushButton;
-class QLabel;
+class TQVBoxLayout;
+class TQComboBox;
+class TQCheckBox;
+class TQPushButton;
+class TQLabel;
class PMVectorListEdit;
/**
@@ -48,7 +48,7 @@ public:
/**
* Creates a PMSurfaceOfRevolutionEdit with parent and name
*/
- PMSurfaceOfRevolutionEdit( QWidget* parent, const char* name = 0 );
+ PMSurfaceOfRevolutionEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -75,11 +75,11 @@ private:
PMSurfaceOfRevolution* m_pDisplayedObject;
PMVectorListEdit* m_pPoints;
- QCheckBox* m_pOpen;
- QCheckBox* m_pSturm;
- QPushButton* m_pAddAbove;
- QPushButton* m_pAddBelow;
- QPushButton* m_pRemove;
+ TQCheckBox* m_pOpen;
+ TQCheckBox* m_pSturm;
+ TQPushButton* m_pAddAbove;
+ TQPushButton* m_pAddBelow;
+ TQPushButton* m_pRemove;
};
diff --git a/kpovmodeler/pmsphere.cpp b/kpovmodeler/pmsphere.cpp
index 698b5352..cca385c9 100644
--- a/kpovmodeler/pmsphere.cpp
+++ b/kpovmodeler/pmsphere.cpp
@@ -66,7 +66,7 @@ PMSphere::~PMSphere( )
}
-QString PMSphere::description( ) const
+TQString PMSphere::description( ) const
{
return i18n( "sphere" );
}
@@ -85,7 +85,7 @@ PMMetaObject* PMSphere::metaObject( ) const
return s_pMetaObject;
}
-void PMSphere::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMSphere::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "centre", m_centre.serializeXML( ) );
e.setAttribute( "radius", m_radius );
@@ -99,7 +99,7 @@ void PMSphere::readAttributes( const PMXMLHelper& h )
Base::readAttributes( h );
}
-PMDialogEditBase* PMSphere::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMSphere::editWidget( TQWidget* parent ) const
{
return new PMSphereEdit( parent );
diff --git a/kpovmodeler/pmsphere.h b/kpovmodeler/pmsphere.h
index 876fd103..984bc6d6 100644
--- a/kpovmodeler/pmsphere.h
+++ b/kpovmodeler/pmsphere.h
@@ -54,24 +54,24 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMSphere( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMSphereEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmsphere" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmsphere" ); }
/**
* Returns the centre of the sphere
diff --git a/kpovmodeler/pmsphereedit.cpp b/kpovmodeler/pmsphereedit.cpp
index cb46d513..c12f95bd 100644
--- a/kpovmodeler/pmsphereedit.cpp
+++ b/kpovmodeler/pmsphereedit.cpp
@@ -22,11 +22,11 @@
#include "pmvectoredit.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
-PMSphereEdit::PMSphereEdit( QWidget* parent, const char* name )
+PMSphereEdit::PMSphereEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -36,22 +36,22 @@ void PMSphereEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* layout;
+ TQHBoxLayout* layout;
m_pCentre = new PMVectorEdit( "x", "y", "z", this );
m_pRadius = new PMFloatEdit( this );
- layout = new QHBoxLayout( topLayout( ) );
- layout->addWidget( new QLabel( i18n( "Center:" ), this ) );
+ layout = new TQHBoxLayout( topLayout( ) );
+ layout->addWidget( new TQLabel( i18n( "Center:" ), this ) );
layout->addWidget( m_pCentre );
- layout = new QHBoxLayout( topLayout( ) );
- layout->addWidget( new QLabel( i18n( "Radius:" ), this ) );
+ layout = new TQHBoxLayout( topLayout( ) );
+ layout->addWidget( new TQLabel( i18n( "Radius:" ), this ) );
layout->addWidget( m_pRadius );
layout->addStretch( 1 );
- connect( m_pCentre, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pCentre, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMSphereEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmsphereedit.h b/kpovmodeler/pmsphereedit.h
index 9cd64d86..b885b9ac 100644
--- a/kpovmodeler/pmsphereedit.h
+++ b/kpovmodeler/pmsphereedit.h
@@ -41,7 +41,7 @@ public:
/**
* Creates a PMSphereEdit with parent and name
*/
- PMSphereEdit( QWidget* parent, const char* name = 0 );
+ PMSphereEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmspheresweep.cpp b/kpovmodeler/pmspheresweep.cpp
index f65a029e..b19ef173 100644
--- a/kpovmodeler/pmspheresweep.cpp
+++ b/kpovmodeler/pmspheresweep.cpp
@@ -83,17 +83,17 @@ public:
/**
* Saves the radii
*/
- void setRadii( const QValueList<double>& r )
+ void setRadii( const TQValueList<double>& r )
{
if( !m_bRadiiSaved )
{
// Direct assignment does not work with Qt 2.3.x
// The list will be changed later in a graphical
- // change because QValueList::detach( ) is called
+ // change because TQValueList::detach( ) is called
// too late!
// Copy the list by hand.
- QValueList<double>::ConstIterator it = r.begin( );
+ TQValueList<double>::ConstIterator it = r.begin( );
for( ; it != r.end( ); ++it )
m_radii.append( *it );
@@ -104,7 +104,7 @@ public:
/**
* Returns the radii
*/
- QValueList<double> radii( ) const
+ TQValueList<double> radii( ) const
{
if( !m_bRadiiSaved )
kdError( PMArea ) << "Radii points not saved in PMSphereSweepMemento::radii\n";
@@ -119,7 +119,7 @@ private:
/**
* The stored radii
*/
- QValueList<double> m_radii;
+ TQValueList<double> m_radii;
bool m_bRadiiSaved;
};
@@ -151,21 +151,21 @@ PMSphereSweep::~PMSphereSweep( )
{
}
-QString PMSphereSweep::description( ) const
+TQString PMSphereSweep::description( ) const
{
return i18n( "sphere sweep" );
}
-void PMSphereSweep::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMSphereSweep::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
- QDomElement data = doc.createElement( "extra_data" );
- QDomElement p;
+ TQDomElement data = doc.createElement( "extra_data" );
+ TQDomElement p;
e.setAttribute( "spline_type", m_splineType );
e.setAttribute( "tolerance", m_tolerance );
- QValueList<PMVector>::ConstIterator it;
- QValueList<double>::ConstIterator it2;
+ TQValueList<PMVector>::ConstIterator it;
+ TQValueList<double>::ConstIterator it2;
for( it = m_points.begin( ), it2 = m_radii.begin( );
it != m_points.end( ) && it2 != m_radii.end( ); ++it, ++it2 )
{
@@ -188,23 +188,23 @@ void PMSphereSweep::readAttributes( const PMXMLHelper& h )
m_radii.clear( );
PMVector v( 3 );
- QDomElement e = h.extraData( );
+ TQDomElement e = h.extraData( );
if( !e.isNull( ) )
{
- QDomNode c = e.firstChild( );
+ TQDomNode c = e.firstChild( );
while( !c.isNull( ) )
{
if( c.isElement( ) )
{
- QDomElement ce = c.toElement( );
+ TQDomElement ce = c.toElement( );
if( ce.tagName( ) == "point" )
{
- QString str = ce.attribute( "vector" );
+ TQString str = ce.attribute( "vector" );
if( !str.isNull( ) )
{
v.loadXML( str );
m_points.append( v );
- QString str = ce.attribute( "radius" );
+ TQString str = ce.attribute( "radius" );
m_radii.append( str.toDouble( ) );
}
}
@@ -266,7 +266,7 @@ void PMSphereSweep::setTolerance( double t )
}
}
-void PMSphereSweep::setPoints( const QValueList<PMVector>& points )
+void PMSphereSweep::setPoints( const TQValueList<PMVector>& points )
{
if( m_points != points )
{
@@ -278,7 +278,7 @@ void PMSphereSweep::setPoints( const QValueList<PMVector>& points )
}
}
-void PMSphereSweep::setRadii( const QValueList<double>& radii )
+void PMSphereSweep::setRadii( const TQValueList<double>& radii )
{
if( m_radii != radii )
{
@@ -290,7 +290,7 @@ void PMSphereSweep::setRadii( const QValueList<double>& radii )
}
}
-PMDialogEditBase* PMSphereSweep::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMSphereSweep::editWidget( TQWidget* parent ) const
{
return new PMSphereSweepEdit( parent );
}
@@ -426,8 +426,8 @@ void PMSphereSweep::createViewStructure( )
void PMSphereSweep::controlPoints( PMControlPointList& list )
{
- QValueList<PMVector>::Iterator it;
- QValueList<double>::Iterator it2;
+ TQValueList<PMVector>::Iterator it;
+ TQValueList<double>::Iterator it2;
int i, nr;
for( it = m_points.begin( ), it2 = m_radii.begin( ), nr = 1, i = 0;
@@ -454,8 +454,8 @@ void PMSphereSweep::controlPoints( PMControlPointList& list )
void PMSphereSweep::controlPointsChanged( PMControlPointList& list )
{
PMControlPointListIterator it1( list );
- QValueList<PMVector>::Iterator pit = m_points.begin( );
- QValueList<double>::Iterator rit = m_radii.begin( );
+ TQValueList<PMVector>::Iterator pit = m_points.begin( );
+ TQValueList<double>::Iterator rit = m_radii.begin( );
int i;
PM3DControlPoint* p;
PMDistanceControlPoint* r;
@@ -513,7 +513,7 @@ void PMSphereSweep::controlPointsChanged( PMControlPointList& list )
}
void PMSphereSweep::addObjectActions( const PMControlPointList& /*cp*/,
- QPtrList<PMObjectAction>& actions )
+ TQPtrList<PMObjectAction>& actions )
{
PMObjectAction* a;
@@ -545,7 +545,7 @@ void PMSphereSweep::addObjectActions( const PMControlPointList& /*cp*/,
void PMSphereSweep::objectActionCalled( const PMObjectAction* action,
const PMControlPointList& cp,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition )
{
if( action->objectType( ) == s_pMetaObject )
@@ -568,7 +568,7 @@ void PMSphereSweep::objectActionCalled( const PMObjectAction* action,
}
void PMSphereSweep::splitSegment( const PMControlPointList& /*cp*/,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition )
{
// find nearest segment
@@ -578,8 +578,8 @@ void PMSphereSweep::splitSegment( const PMControlPointList& /*cp*/,
int i, j;
PMVector mid( 3 ), dist( 2 );
- QPtrListIterator<PMVector> it1( cpViewPosition );
- QPtrListIterator<PMVector> it2( cpViewPosition );
+ TQPtrListIterator<PMVector> it1( cpViewPosition );
+ TQPtrListIterator<PMVector> it2( cpViewPosition );
++it2;
for( i = 0; i < nump; i++ )
@@ -618,17 +618,17 @@ void PMSphereSweep::splitSegment( const PMControlPointList& /*cp*/,
}
// add a new segment
- QValueList<PMVector> newPoints = m_points;
- QValueList<double> newRadii = m_radii;
+ TQValueList<PMVector> newPoints = m_points;
+ TQValueList<double> newRadii = m_radii;
- QValueList<PMVector>::Iterator it = newPoints.at( ( unsigned ) ns );
- QValueList<PMVector>::Iterator hit = it;
+ TQValueList<PMVector>::Iterator it = newPoints.at( ( unsigned ) ns );
+ TQValueList<PMVector>::Iterator hit = it;
++it;
mid = ( *it + *hit ) / 2;
newPoints.insert( it, mid );
- QValueList<double>::Iterator rit = newRadii.at( ( unsigned ) ns );
- QValueList<double>::Iterator rhit = rit;
+ TQValueList<double>::Iterator rit = newRadii.at( ( unsigned ) ns );
+ TQValueList<double>::Iterator rhit = rit;
++rit;
newRadii.insert( rit, ( *rit + *rhit ) / 2 );
@@ -637,7 +637,7 @@ void PMSphereSweep::splitSegment( const PMControlPointList& /*cp*/,
}
void PMSphereSweep::joinSegments( const PMControlPointList& /*cp*/,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition )
{
// find nearest point
@@ -667,7 +667,7 @@ void PMSphereSweep::joinSegments( const PMControlPointList& /*cp*/,
PMVector* p;
PMVector dist( 2 );
- QPtrListIterator<PMVector> it1( cpViewPosition );
+ TQPtrListIterator<PMVector> it1( cpViewPosition );
for( i = 0; i < nump; i++ )
{
@@ -687,10 +687,10 @@ void PMSphereSweep::joinSegments( const PMControlPointList& /*cp*/,
}
// join two segments
- QValueList<PMVector> newPoints = m_points;
- QValueList<PMVector>::Iterator it;
- QValueList<double> newRadii = m_radii;
- QValueList<double>::Iterator rit;
+ TQValueList<PMVector> newPoints = m_points;
+ TQValueList<PMVector>::Iterator it;
+ TQValueList<double> newRadii = m_radii;
+ TQValueList<double>::Iterator rit;
// never remove the first or last point
if( ns == 0 )
diff --git a/kpovmodeler/pmspheresweep.h b/kpovmodeler/pmspheresweep.h
index 281db0c3..b28d69a5 100644
--- a/kpovmodeler/pmspheresweep.h
+++ b/kpovmodeler/pmspheresweep.h
@@ -26,8 +26,8 @@
#include "pmsolidobject.h"
#include "pmvector.h"
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
#include <math.h>
class PMViewStructure;
@@ -60,7 +60,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMSphereSweep( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -68,18 +68,18 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMSphereSweepEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmspheresweep" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmspheresweep" ); }
/** */
virtual void createMemento( );
@@ -93,29 +93,29 @@ public:
virtual bool hasDisplayDetail( ) const { return true; }
/** */
virtual void addObjectActions( const PMControlPointList&,
- QPtrList<PMObjectAction>& );
+ TQPtrList<PMObjectAction>& );
/** */
virtual void objectActionCalled( const PMObjectAction*,
const PMControlPointList&,
- const QPtrList<PMVector>&,
+ const TQPtrList<PMVector>&,
const PMVector& );
/**
* Returns the spline points
*/
- QValueList<PMVector> points( ) const { return m_points; }
+ TQValueList<PMVector> points( ) const { return m_points; }
/**
* Sets the spline points
*/
- void setPoints( const QValueList<PMVector>& points );
+ void setPoints( const TQValueList<PMVector>& points );
/**
* Returns the radii
*/
- QValueList<double> radii( ) const { return m_radii; }
+ TQValueList<double> radii( ) const { return m_radii; }
/**
* Sets the radii
*/
- void setRadii( const QValueList<double>& radii );
+ void setRadii( const TQValueList<double>& radii );
/**
* Returns the number of spline points
*/
@@ -165,17 +165,17 @@ private:
* Object action. Adds a spline point
*/
void splitSegment( const PMControlPointList& cp,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition );
/**
* Object action. Removes a spline point
*/
void joinSegments( const PMControlPointList& cp,
- const QPtrList<PMVector>& cpViewPosition,
+ const TQPtrList<PMVector>& cpViewPosition,
const PMVector& clickPosition );
- void stringToValues( const QString& str );
- QString valuesToString( ) const;
+ void stringToValues( const TQString& str );
+ TQString valuesToString( ) const;
/**
* IDs for @ref PMMementoData
@@ -186,8 +186,8 @@ private:
*/
enum PMSphereSweepActionID { PMSplitSegmentID, PMJoinSegmentsID };
SplineType m_splineType;
- QValueList<PMVector> m_points;
- QValueList<double> m_radii;
+ TQValueList<PMVector> m_points;
+ TQValueList<double> m_radii;
double m_tolerance;
static int s_rSteps;
@@ -201,12 +201,12 @@ private:
* creating view structure
*/
struct Segment{
- QValueList<PMVector> points;
- QValueList<double> radii;
- QValueList<PMVector> direction;
+ TQValueList<PMVector> points;
+ TQValueList<double> radii;
+ TQValueList<PMVector> direction;
};
- QValueList<Segment> m_segments;
+ TQValueList<Segment> m_segments;
int m_nextPoint;
int m_nextLine;
/**
diff --git a/kpovmodeler/pmspheresweepedit.cpp b/kpovmodeler/pmspheresweepedit.cpp
index 582a0e80..9798a304 100644
--- a/kpovmodeler/pmspheresweepedit.cpp
+++ b/kpovmodeler/pmspheresweepedit.cpp
@@ -23,18 +23,18 @@
#include "pmvectorlistedit.h"
#include "pmpart.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <kdialog.h>
#include <kiconloader.h>
#include <kmessagebox.h>
-PMSphereSweepEdit::PMSphereSweepEdit( QWidget* parent, const char* name )
+PMSphereSweepEdit::PMSphereSweepEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -44,52 +44,52 @@ void PMSphereSweepEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Spline type:" ), this ) );
- m_pSplineType = new QComboBox( false, this );
+ TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Spline type:" ), this ) );
+ m_pSplineType = new TQComboBox( false, this );
m_pSplineType->insertItem( i18n( "Linear Spline" ) );
m_pSplineType->insertItem( i18n( "B-Spline" ) );
m_pSplineType->insertItem( i18n( "Cubic Spline" ) );
hl->addWidget( m_pSplineType );
hl->addStretch( 1 );
- connect( m_pSplineType, SIGNAL( activated( int ) ),
- SLOT( slotTypeChanged( int ) ) );
+ connect( m_pSplineType, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotTypeChanged( int ) ) );
}
void PMSphereSweepEdit::createBottomWidgets( )
{
- topLayout( )->addWidget( new QLabel( i18n( "Spheres:" ), this ) );
+ topLayout( )->addWidget( new TQLabel( i18n( "Spheres:" ), this ) );
m_pPoints = new PMVectorListEdit( "x", "y", "z", "r", this );
- connect( m_pPoints, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pPoints, SIGNAL( selectionChanged( ) ),
- SLOT( slotSelectionChanged( ) ) );
- QHBoxLayout* hl = new QHBoxLayout( topLayout( ) );
+ connect( m_pPoints, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pPoints, TQT_SIGNAL( selectionChanged( ) ),
+ TQT_SLOT( slotSelectionChanged( ) ) );
+ TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) );
hl->addWidget( m_pPoints, 2 );
- m_pAddAbove = new QPushButton( this );
+ m_pAddAbove = new TQPushButton( this );
m_pAddAbove->setPixmap( SmallIcon( "pmaddpointabove" ) );
- m_pAddBelow = new QPushButton( this );
+ m_pAddBelow = new TQPushButton( this );
m_pAddBelow->setPixmap( SmallIcon( "pmaddpoint" ) );
- m_pRemove = new QPushButton( this );
+ m_pRemove = new TQPushButton( this );
m_pRemove->setPixmap( SmallIcon( "pmremovepoint" ) );
- connect( m_pAddAbove, SIGNAL( clicked( ) ), SLOT( slotAddPointAbove( ) ) );
- connect( m_pAddBelow, SIGNAL( clicked( ) ), SLOT( slotAddPointBelow( ) ) );
- connect( m_pRemove, SIGNAL( clicked( ) ), SLOT( slotRemovePoint( ) ) );
+ connect( m_pAddAbove, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPointAbove( ) ) );
+ connect( m_pAddBelow, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPointBelow( ) ) );
+ connect( m_pRemove, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemovePoint( ) ) );
- QVBoxLayout* bl = new QVBoxLayout( hl );
+ TQVBoxLayout* bl = new TQVBoxLayout( hl );
bl->addWidget( m_pAddAbove );
bl->addWidget( m_pAddBelow );
bl->addWidget( m_pRemove );
bl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Tolerance" ), this ) );
+ hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Tolerance" ), this ) );
m_pTolerance = new PMFloatEdit( this );
m_pTolerance->setValidation( true, 0, false, 0 );
hl->addWidget( m_pTolerance );
- connect( m_pTolerance, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pTolerance, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
Base::createBottomWidgets( );
}
@@ -118,10 +118,10 @@ void PMSphereSweepEdit::displayObject( PMObject* o )
m_pTolerance->setReadOnly( readOnly );
m_pPoints->setReadOnly( readOnly );
- QValueList<PMVector> points = m_pDisplayedObject->points( );
- QValueList<double> radii = m_pDisplayedObject->radii( );
- QValueListIterator<PMVector> pit = points.begin( );
- QValueListIterator<double> rit = radii.begin( );
+ TQValueList<PMVector> points = m_pDisplayedObject->points( );
+ TQValueList<double> radii = m_pDisplayedObject->radii( );
+ TQValueListIterator<PMVector> pit = points.begin( );
+ TQValueListIterator<double> rit = radii.begin( );
for( ; pit != points.end( ) && rit != radii.end( ); ++pit, ++rit )
{
( *pit ).resize( 4 );
@@ -170,9 +170,9 @@ void PMSphereSweepEdit::saveContents( )
{
if( m_pDisplayedObject )
{
- QValueList<PMVector> points = m_pPoints->vectors( );
- QValueList<double> radii;
- QValueListIterator<PMVector> pit = points.begin( );
+ TQValueList<PMVector> points = m_pPoints->vectors( );
+ TQValueList<double> radii;
+ TQValueListIterator<PMVector> pit = points.begin( );
for( ; pit != points.end( ); ++pit )
{
radii.append( ( *pit )[3] );
@@ -253,12 +253,12 @@ void PMSphereSweepEdit::slotAddPointAbove( )
int index = m_pPoints->currentRow( );
if( index >= 0 )
{
- QValueList<PMVector> points = m_pPoints->vectors( );
- QValueListIterator<PMVector> it = points.at( index );
+ TQValueList<PMVector> points = m_pPoints->vectors( );
+ TQValueListIterator<PMVector> it = points.at( index );
if( it != points.end( ) )
{
- QValueListIterator<PMVector> it2 = it;
+ TQValueListIterator<PMVector> it2 = it;
it2--;
PMVector v;
if( it2 == points.end( ) )
@@ -280,12 +280,12 @@ void PMSphereSweepEdit::slotAddPointBelow( )
int index = m_pPoints->currentRow( );
if( index >= 0 )
{
- QValueList<PMVector> points = m_pPoints->vectors( );
- QValueListIterator<PMVector> it = points.at( index );
+ TQValueList<PMVector> points = m_pPoints->vectors( );
+ TQValueListIterator<PMVector> it = points.at( index );
if( it != points.end( ) )
{
- QValueListIterator<PMVector> it2 = it;
+ TQValueListIterator<PMVector> it2 = it;
it2++;
PMVector v;
if( it2 == points.end( ) )
@@ -309,8 +309,8 @@ void PMSphereSweepEdit::slotRemovePoint( )
if( row >= 0 )
{
- QValueList<PMVector> points = m_pPoints->vectors( );
- QValueListIterator<PMVector> it = points.at( row );
+ TQValueList<PMVector> points = m_pPoints->vectors( );
+ TQValueListIterator<PMVector> it = points.at( row );
if( it != points.end( ) && points.size( ) > 1 )
{
diff --git a/kpovmodeler/pmspheresweepedit.h b/kpovmodeler/pmspheresweepedit.h
index 58f89372..16d86246 100644
--- a/kpovmodeler/pmspheresweepedit.h
+++ b/kpovmodeler/pmspheresweepedit.h
@@ -26,17 +26,17 @@
#include "pmsolidobjectedit.h"
#include "pmvectoredit.h"
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
class PMSphereSweep;
class PMVectorListEdit;
class PMFloatEdit;
-class QVBoxLayout;
-class QComboBox;
-class QCheckBox;
-class QPushButton;
-class QLabel;
+class TQVBoxLayout;
+class TQComboBox;
+class TQCheckBox;
+class TQPushButton;
+class TQLabel;
/**
* Dialog edit class for @ref PMSphereSweep
@@ -49,7 +49,7 @@ public:
/**
* Creates a PMSphereSweepEdit with parent and name
*/
- PMSphereSweepEdit( QWidget* parent, const char* name = 0 );
+ PMSphereSweepEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -78,12 +78,12 @@ private:
void updatePointButtons( );
PMSphereSweep* m_pDisplayedObject;
- QComboBox* m_pSplineType;
+ TQComboBox* m_pSplineType;
PMVectorListEdit* m_pPoints;
PMFloatEdit* m_pTolerance;
- QPushButton* m_pAddAbove;
- QPushButton* m_pAddBelow;
- QPushButton* m_pRemove;
+ TQPushButton* m_pAddAbove;
+ TQPushButton* m_pAddBelow;
+ TQPushButton* m_pRemove;
};
diff --git a/kpovmodeler/pmsplinememento.cpp b/kpovmodeler/pmsplinememento.cpp
index a197f8ea..7836fc7d 100644
--- a/kpovmodeler/pmsplinememento.cpp
+++ b/kpovmodeler/pmsplinememento.cpp
@@ -28,17 +28,17 @@ PMSplineMemento::~PMSplineMemento( )
{
}
-void PMSplineMemento::setSplinePoints( const QValueList<PMVector>& v )
+void PMSplineMemento::setSplinePoints( const TQValueList<PMVector>& v )
{
if( !m_bSplinePointsSaved )
{
// Direct assignment does not work with Qt 2.3.x
// The list will be changed later in a graphical
- // change because QValueList::detach( ) is called
+ // change because TQValueList::detach( ) is called
// too late!
// Copy the list by hand.
- QValueList<PMVector>::ConstIterator it = v.begin( );
+ TQValueList<PMVector>::ConstIterator it = v.begin( );
for( ; it != v.end( ); ++it )
m_splinePoints.append( *it );
@@ -47,7 +47,7 @@ void PMSplineMemento::setSplinePoints( const QValueList<PMVector>& v )
}
}
-QValueList<PMVector> PMSplineMemento::splinePoints( ) const
+TQValueList<PMVector> PMSplineMemento::splinePoints( ) const
{
if( !m_bSplinePointsSaved )
kdError( PMArea ) << "Spline points not saved in PMSplineMemento::splinePoints\n";
diff --git a/kpovmodeler/pmsplinememento.h b/kpovmodeler/pmsplinememento.h
index daa4a70b..4436e60c 100644
--- a/kpovmodeler/pmsplinememento.h
+++ b/kpovmodeler/pmsplinememento.h
@@ -26,7 +26,7 @@
#include "pmmemento.h"
#include "pmvector.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
/**
@@ -47,11 +47,11 @@ public:
/**
* Saves the spline points
*/
- void setSplinePoints( const QValueList<PMVector>& v );
+ void setSplinePoints( const TQValueList<PMVector>& v );
/**
* Returns the spline points
*/
- QValueList<PMVector> splinePoints( ) const;
+ TQValueList<PMVector> splinePoints( ) const;
/**
* Returns true if the spline points were saved
*/
@@ -61,7 +61,7 @@ private:
/**
* The stored points
*/
- QValueList<PMVector> m_splinePoints;
+ TQValueList<PMVector> m_splinePoints;
bool m_bSplinePointsSaved;
};
diff --git a/kpovmodeler/pmsplinesegment.h b/kpovmodeler/pmsplinesegment.h
index 5e97ff49..c45b0a2e 100644
--- a/kpovmodeler/pmsplinesegment.h
+++ b/kpovmodeler/pmsplinesegment.h
@@ -25,7 +25,7 @@
#endif
#include "pmvector.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
/**
* Helper class for splines
@@ -116,7 +116,7 @@ private:
double m_a[2], m_b[2], m_c[2], m_d[2];
};
-typedef QValueList<PMSplineSegment> PMSegmentList;
-typedef QValueList<PMSegmentList> PMSegmentListList;
+typedef TQValueList<PMSplineSegment> PMSegmentList;
+typedef TQValueList<PMSegmentList> PMSegmentListList;
#endif
diff --git a/kpovmodeler/pmsqe.cpp b/kpovmodeler/pmsqe.cpp
index 051aac72..61279251 100644
--- a/kpovmodeler/pmsqe.cpp
+++ b/kpovmodeler/pmsqe.cpp
@@ -61,12 +61,12 @@ PMSuperquadricEllipsoid::~PMSuperquadricEllipsoid( )
{
}
-QString PMSuperquadricEllipsoid::description( ) const
+TQString PMSuperquadricEllipsoid::description( ) const
{
return i18n( "superquadric ellipsoid" );
}
-void PMSuperquadricEllipsoid::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMSuperquadricEllipsoid::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "value_e", m_eastWestExponent );
e.setAttribute( "value_n", m_northSouthExponent );
@@ -133,7 +133,7 @@ void PMSuperquadricEllipsoid::setNorthSouthExponent( double n )
}
}
-PMDialogEditBase* PMSuperquadricEllipsoid::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMSuperquadricEllipsoid::editWidget( TQWidget* parent ) const
{
return new PMSuperquadricEllipsoidEdit( parent );
}
diff --git a/kpovmodeler/pmsqe.h b/kpovmodeler/pmsqe.h
index e2d04c60..b73a95c3 100644
--- a/kpovmodeler/pmsqe.h
+++ b/kpovmodeler/pmsqe.h
@@ -55,24 +55,24 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMSuperquadricEllipsoid( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMSuperquadricEllipsoidEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmsqe" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmsqe" ); }
/**
* Returns the east west exponent
diff --git a/kpovmodeler/pmsqeedit.cpp b/kpovmodeler/pmsqeedit.cpp
index 488ce2f2..377b552b 100644
--- a/kpovmodeler/pmsqeedit.cpp
+++ b/kpovmodeler/pmsqeedit.cpp
@@ -20,11 +20,11 @@
#include "pmsqe.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
-PMSuperquadricEllipsoidEdit::PMSuperquadricEllipsoidEdit( QWidget* parent, const char* name )
+PMSuperquadricEllipsoidEdit::PMSuperquadricEllipsoidEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -39,18 +39,18 @@ void PMSuperquadricEllipsoidEdit::createTopWidgets( )
m_pValueN = new PMFloatEdit( this );
m_pValueN->setValidation( true, 0.01, false, 1.0 );
- topLayout( )->addWidget( new QLabel( i18n( "Exponents:" ), this ) );
+ topLayout( )->addWidget( new TQLabel( i18n( "Exponents:" ), this ) );
- QHBoxLayout* hl = new QHBoxLayout( topLayout( ) );
- QGridLayout* gl = new QGridLayout( hl, 2, 2 );
- gl->addWidget( new QLabel( i18n( "East-west:" ), this ), 0, 0 );
+ TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) );
+ TQGridLayout* gl = new TQGridLayout( hl, 2, 2 );
+ gl->addWidget( new TQLabel( i18n( "East-west:" ), this ), 0, 0 );
gl->addWidget( m_pValueE, 0, 1 );
- gl->addWidget( new QLabel( i18n( "North-south:" ), this ), 1, 0 );
+ gl->addWidget( new TQLabel( i18n( "North-south:" ), this ), 1, 0 );
gl->addWidget( m_pValueN, 1, 1 );
hl->addStretch( 1 );
- connect( m_pValueE, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pValueN, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pValueE, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pValueN, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMSuperquadricEllipsoidEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmsqeedit.h b/kpovmodeler/pmsqeedit.h
index 45ae1a2f..99e87967 100644
--- a/kpovmodeler/pmsqeedit.h
+++ b/kpovmodeler/pmsqeedit.h
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMSuperquadricEllipsoidEdit with parent and name
*/
- PMSuperquadricEllipsoidEdit( QWidget* parent, const char* name = 0 );
+ PMSuperquadricEllipsoidEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmsymboltable.cpp b/kpovmodeler/pmsymboltable.cpp
index bd1aab3b..e8a15c3d 100644
--- a/kpovmodeler/pmsymboltable.cpp
+++ b/kpovmodeler/pmsymboltable.cpp
@@ -21,7 +21,7 @@
#include <string.h>
-PMSymbol::PMSymbol( const QString& id, PMDeclare* o )
+PMSymbol::PMSymbol( const TQString& id, PMDeclare* o )
{
setId( id );
m_type = Object;
@@ -30,7 +30,7 @@ PMSymbol::PMSymbol( const QString& id, PMDeclare* o )
m_pRenamedSymbol = 0;
}
-PMSymbol::PMSymbol( const QString& id, const PMValue& v )
+PMSymbol::PMSymbol( const TQString& id, const PMValue& v )
{
setId( id );
m_type = Value;
@@ -45,7 +45,7 @@ PMSymbol::~PMSymbol( )
delete m_pVal;
}
-void PMSymbol::setId( const QString& id )
+void PMSymbol::setId( const TQString& id )
{
m_id = id.left( MaxIDLength );
}
@@ -68,7 +68,7 @@ PMValue PMSymbol::value( ) const
PMSymbolTable::PMSymbolTable( )
- : QDict<PMSymbol>( 1009 ), m_lastID( 47 )
+ : TQDict<PMSymbol>( 1009 ), m_lastID( 47 )
{
setAutoDelete( true );
m_lastID.setAutoDelete( true );
@@ -79,10 +79,10 @@ PMSymbolTable::~PMSymbolTable( )
clear( );
}
-QString PMSymbolTable::findNewID( const QString& prefix )
+TQString PMSymbolTable::findNewID( const TQString& prefix )
{
PMSymbol* symbol;
- QString testID;
+ TQString testID;
unsigned int number;
int* lastNumber = m_lastID.find( prefix );
@@ -94,7 +94,7 @@ QString PMSymbolTable::findNewID( const QString& prefix )
// find next free id
do
{
- testID = prefix + QString( "%1" ).arg( number );
+ testID = prefix + TQString( "%1" ).arg( number );
symbol = find( testID );
if( symbol )
number++;
@@ -109,9 +109,9 @@ QString PMSymbolTable::findNewID( const QString& prefix )
return testID;
}
-PMSymbol* PMSymbolTable::findNewID( const QString& prefix, PMDeclare* obj )
+PMSymbol* PMSymbolTable::findNewID( const TQString& prefix, PMDeclare* obj )
{
- QString newID = findNewID( prefix );
+ TQString newID = findNewID( prefix );
obj->setID( newID );
PMSymbol* s = new PMSymbol( newID, obj );
diff --git a/kpovmodeler/pmsymboltable.h b/kpovmodeler/pmsymboltable.h
index 27e88785..481a2916 100644
--- a/kpovmodeler/pmsymboltable.h
+++ b/kpovmodeler/pmsymboltable.h
@@ -28,8 +28,8 @@
class PMObject;
class PMDeclare;
-#include <qdict.h>
-#include <qstring.h>
+#include <tqdict.h>
+#include <tqstring.h>
/**
* Entry in a @ref PMSymbolTable. Can be a @ref PMValue or a @ref PMObject
@@ -42,11 +42,11 @@ public:
/**
* Creates a entry for an object
*/
- PMSymbol( const QString& id, PMDeclare* o );
+ PMSymbol( const TQString& id, PMDeclare* o );
/**
* Creates a entry for a value
*/
- PMSymbol( const QString& id, const PMValue& v );
+ PMSymbol( const TQString& id, const PMValue& v );
/**
* Destructor
*/
@@ -59,11 +59,11 @@ public:
/**
* Returns the id of the symbol
*/
- QString id( ) const { return m_id; }
+ TQString id( ) const { return m_id; }
/**
* Sets the id
*/
- void setId( const QString& id );
+ void setId( const TQString& id );
/**
* Returns the stored object
*/
@@ -92,13 +92,13 @@ private:
PMDeclare* m_pObj;
PMSymbol* m_pRenamedSymbol;
PMValue* m_pVal;
- QString m_id;
+ TQString m_id;
};
/**
* Symbol table for povray #declare statements
*/
-class PMSymbolTable : public QDict<PMSymbol>
+class PMSymbolTable : public TQDict<PMSymbol>
{
public:
/**
@@ -112,7 +112,7 @@ public:
/**
* Returns a free id with prefix prefix and a number as suffix
*/
- QString findNewID( const QString& prefix );
+ TQString findNewID( const TQString& prefix );
/**
* Returns a free id with prefix prefix and a number as suffix and assigns
* it to the object.
@@ -120,9 +120,9 @@ public:
* Does NOT add the object to the symbol table.
*
* Returns the new symbol.*/
- PMSymbol* findNewID( const QString& prefix, PMDeclare* obj );
+ PMSymbol* findNewID( const TQString& prefix, PMDeclare* obj );
private:
- QDict<int> m_lastID;
+ TQDict<int> m_lastID;
};
#endif
diff --git a/kpovmodeler/pmtext.cpp b/kpovmodeler/pmtext.cpp
index 21191cbc..9410228d 100644
--- a/kpovmodeler/pmtext.cpp
+++ b/kpovmodeler/pmtext.cpp
@@ -28,8 +28,8 @@
#include <klocale.h>
-const QString c_defaultFont = QString( "" );
-const QString c_defaultText = QString( "" );
+const TQString c_defaultFont = TQString( "" );
+const TQString c_defaultText = TQString( "" );
const double c_defaultThickness = 1.0;
const PMVector c_defaultOffset = PMVector( 0.0, 0.0 );
@@ -66,12 +66,12 @@ PMText::~PMText( )
{
}
-QString PMText::description( ) const
+TQString PMText::description( ) const
{
return i18n( "text" );
}
-void PMText::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMText::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "font", m_font );
e.setAttribute( "text", m_text );
@@ -117,7 +117,7 @@ void PMText::cleanUp( ) const
Base::cleanUp( );
}
-void PMText::setFont( const QString& f )
+void PMText::setFont( const TQString& f )
{
if( f != m_font )
{
@@ -128,7 +128,7 @@ void PMText::setFont( const QString& f )
}
}
-void PMText::setText( const QString& t )
+void PMText::setText( const TQString& t )
{
if( t != m_text )
{
@@ -162,7 +162,7 @@ void PMText::setOffset( const PMVector& o )
}
}
-PMDialogEditBase* PMText::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMText::editWidget( TQWidget* parent ) const
{
return new PMTextEdit( parent );
}
@@ -205,13 +205,13 @@ void PMText::createViewStructure( )
// calculate needed points and lines
int nlines = 0, npoints = 0;
- QString file = PMResourceLocator::findFile( m_font );
+ TQString file = PMResourceLocator::findFile( m_font );
PMTrueTypeFont* font = PMTrueTypeCache::font( file );
if( font && font->isValid( ) )
{
- QTextStream str( &m_text, IO_ReadOnly );
- QChar c;
+ TQTextStream str( &m_text, IO_ReadOnly );
+ TQChar c;
PMTrueTypeOutline* ol;
while( !str.atEnd( ) )
@@ -239,8 +239,8 @@ void PMText::createViewStructure( )
if( ( nlines > 0 ) && ( npoints > 0 ) && font )
{
// create the view structure
- QTextStream str( &m_text, IO_ReadOnly );
- QChar c, oldc;
+ TQTextStream str( &m_text, IO_ReadOnly );
+ TQChar c, oldc;
PMTrueTypeOutline* ol;
double dp = 1.0 / s_steps;
int i;
diff --git a/kpovmodeler/pmtext.h b/kpovmodeler/pmtext.h
index 3a7350bb..7ab4aff7 100644
--- a/kpovmodeler/pmtext.h
+++ b/kpovmodeler/pmtext.h
@@ -53,7 +53,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMText( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -61,35 +61,35 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMTextEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmtext" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmtext" ); }
/**
* Returns the font file
*/
- QString font( ) const { return m_font; }
+ TQString font( ) const { return m_font; }
/**
* Sets the font file
*/
- void setFont( const QString& f );
+ void setFont( const TQString& f );
/**
* Returns the text
*/
- QString text( ) const { return m_text; }
+ TQString text( ) const { return m_text; }
/**
* Sets the text
*/
- void setText( const QString& t );
+ void setText( const TQString& t );
/**
* Returns the thickness
*/
@@ -134,7 +134,7 @@ private:
* IDs for @ref PMMementoData
*/
enum PMTextMementoID { PMFontID, PMTextID, PMThicknessID, PMOffsetID };
- QString m_font, m_text;
+ TQString m_font, m_text;
double m_thickness;
PMVector m_offset;
diff --git a/kpovmodeler/pmtextedit.cpp b/kpovmodeler/pmtextedit.cpp
index 16f8501d..835808bd 100644
--- a/kpovmodeler/pmtextedit.cpp
+++ b/kpovmodeler/pmtextedit.cpp
@@ -21,15 +21,15 @@
#include "pmvectoredit.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kfiledialog.h>
-PMTextEdit::PMTextEdit( QWidget* parent, const char* name )
+PMTextEdit::PMTextEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -39,40 +39,40 @@ void PMTextEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QHBoxLayout* hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Font:" ), this ) );
- m_pFont = new QLineEdit( this );
+ TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Font:" ), this ) );
+ m_pFont = new TQLineEdit( this );
hl->addWidget( m_pFont );
- m_pChooseFont = new QPushButton( this );
+ m_pChooseFont = new TQPushButton( this );
m_pChooseFont->setPixmap( SmallIcon( "fileopen" ) );
hl->addWidget( m_pChooseFont );
- hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Text:" ), this ) );
- m_pText = new QLineEdit( this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Text:" ), this ) );
+ m_pText = new TQLineEdit( this );
hl->addWidget( m_pText );
- hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Thickness:" ), this ) );
+ hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Thickness:" ), this ) );
m_pThickness = new PMFloatEdit( this );
hl->addWidget( m_pThickness );
hl->addStretch( 1 );
- hl = new QHBoxLayout( topLayout( ) );
- hl->addWidget( new QLabel( i18n( "Offset:" ), this ) );
+ hl = new TQHBoxLayout( topLayout( ) );
+ hl->addWidget( new TQLabel( i18n( "Offset:" ), this ) );
m_pOffset = new PMVectorEdit( "x", "y", this );
hl->addWidget( m_pOffset );
- connect( m_pFont, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotTextChanged( const QString& ) ) );
- connect( m_pChooseFont, SIGNAL( clicked( ) ),
- SLOT( slotChooseFont( ) ) );
- connect( m_pText, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotTextChanged( const QString& ) ) );
- connect( m_pThickness, SIGNAL( dataChanged( ) ),
- SIGNAL( dataChanged( ) ) );
- connect( m_pOffset, SIGNAL( dataChanged( ) ),
- SIGNAL( dataChanged( ) ) );
+ connect( m_pFont, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotTextChanged( const TQString& ) ) );
+ connect( m_pChooseFont, TQT_SIGNAL( clicked( ) ),
+ TQT_SLOT( slotChooseFont( ) ) );
+ connect( m_pText, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotTextChanged( const TQString& ) ) );
+ connect( m_pThickness, TQT_SIGNAL( dataChanged( ) ),
+ TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pOffset, TQT_SIGNAL( dataChanged( ) ),
+ TQT_SIGNAL( dataChanged( ) ) );
}
void PMTextEdit::displayObject( PMObject* o )
@@ -119,14 +119,14 @@ bool PMTextEdit::isDataValid( )
return false;
}
-void PMTextEdit::slotTextChanged( const QString& )
+void PMTextEdit::slotTextChanged( const TQString& )
{
emit dataChanged( );
}
void PMTextEdit::slotChooseFont( )
{
- QString str = KFileDialog::getOpenFileName( QString::null, QString::null );
+ TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null );
if( !str.isEmpty() )
{
diff --git a/kpovmodeler/pmtextedit.h b/kpovmodeler/pmtextedit.h
index 3dd11280..132adc5e 100644
--- a/kpovmodeler/pmtextedit.h
+++ b/kpovmodeler/pmtextedit.h
@@ -29,8 +29,8 @@
class PMText;
class PMVectorEdit;
class PMFloatEdit;
-class QLineEdit;
-class QPushButton;
+class TQLineEdit;
+class TQPushButton;
/**
* Dialog edit class for @ref PMText
@@ -43,7 +43,7 @@ public:
/**
* Creates a PMTextEdit with parent and name
*/
- PMTextEdit( QWidget* parent, const char* name = 0 );
+ PMTextEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -52,7 +52,7 @@ public:
virtual bool isDataValid( );
protected slots:
- void slotTextChanged( const QString& t );
+ void slotTextChanged( const TQString& t );
void slotChooseFont( );
protected:
@@ -63,9 +63,9 @@ protected:
private:
PMText* m_pDisplayedObject;
- QLineEdit* m_pFont;
- QPushButton* m_pChooseFont;
- QLineEdit* m_pText;
+ TQLineEdit* m_pFont;
+ TQPushButton* m_pChooseFont;
+ TQLineEdit* m_pText;
PMFloatEdit* m_pThickness;
PMVectorEdit* m_pOffset;
};
diff --git a/kpovmodeler/pmtexture.cpp b/kpovmodeler/pmtexture.cpp
index 4b8a21ff..a40da8cb 100644
--- a/kpovmodeler/pmtexture.cpp
+++ b/kpovmodeler/pmtexture.cpp
@@ -67,17 +67,17 @@ void PMTexture::cleanUp( ) const
Base::cleanUp( );
}
-QString PMTexture::description( ) const
+TQString PMTexture::description( ) const
{
return i18n( "texture" );
}
-PMDialogEditBase* PMTexture::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMTexture::editWidget( TQWidget* parent ) const
{
return new PMTextureEdit( parent );
}
-void PMTexture::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMTexture::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "uv_mapping", m_uvMapping );
Base::serialize( e, doc );
diff --git a/kpovmodeler/pmtexture.h b/kpovmodeler/pmtexture.h
index b8b176db..b2675b11 100644
--- a/kpovmodeler/pmtexture.h
+++ b/kpovmodeler/pmtexture.h
@@ -49,7 +49,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMTexture( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -57,16 +57,16 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMTextureEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmtexture" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmtexture" ); }
/**
* Returns the uv mapping flag
diff --git a/kpovmodeler/pmtexturebase.cpp b/kpovmodeler/pmtexturebase.cpp
index 82a92418..a49b103f 100644
--- a/kpovmodeler/pmtexturebase.cpp
+++ b/kpovmodeler/pmtexturebase.cpp
@@ -128,7 +128,7 @@ void PMTextureBase::setLinkedObjectProperty( PMObject* o )
setLinkedObject( ( PMDeclare* ) o );
}
-void PMTextureBase::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMTextureBase::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
if( m_pLinkedObject )
e.setAttribute( "prototype", m_pLinkedObject->id( ) );
@@ -137,7 +137,7 @@ void PMTextureBase::serialize( QDomElement& e, QDomDocument& doc ) const
void PMTextureBase::readAttributes( const PMXMLHelper& h )
{
- QString id = h.stringAttribute( "prototype", "" );
+ TQString id = h.stringAttribute( "prototype", "" );
if( !id.isEmpty( ) )
{
PMDeclare* link = h.parser( )->checkLink( id );
diff --git a/kpovmodeler/pmtexturebase.h b/kpovmodeler/pmtexturebase.h
index 2bd687f6..a3ecdc0a 100644
--- a/kpovmodeler/pmtexturebase.h
+++ b/kpovmodeler/pmtexturebase.h
@@ -24,7 +24,7 @@
#include <config.h>
#endif
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "pmnamedobject.h"
#include "pmdeclare.h"
@@ -50,7 +50,7 @@ public:
virtual ~PMTextureBase( );
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
diff --git a/kpovmodeler/pmtexturebaseedit.cpp b/kpovmodeler/pmtexturebaseedit.cpp
index e9b91486..0768adc1 100644
--- a/kpovmodeler/pmtexturebaseedit.cpp
+++ b/kpovmodeler/pmtexturebaseedit.cpp
@@ -20,12 +20,12 @@
#include "pmpigment.h"
#include "pmlinkedit.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
-PMTextureBaseEdit::PMTextureBaseEdit( QWidget* parent, const char* name )
+PMTextureBaseEdit::PMTextureBaseEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -37,7 +37,7 @@ void PMTextureBaseEdit::createTopWidgets( )
Base::createTopWidgets( );
m_pLinkEdit = new PMLinkEdit( this );
topLayout( )->addWidget( m_pLinkEdit );
- connect( m_pLinkEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pLinkEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
diff --git a/kpovmodeler/pmtexturebaseedit.h b/kpovmodeler/pmtexturebaseedit.h
index b8d67f56..8e89af9f 100644
--- a/kpovmodeler/pmtexturebaseedit.h
+++ b/kpovmodeler/pmtexturebaseedit.h
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMTextureBaseEdit with parent and name
*/
- PMTextureBaseEdit( QWidget* parent, const char* name = 0 );
+ PMTextureBaseEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmtextureedit.cpp b/kpovmodeler/pmtextureedit.cpp
index 8a3d4f9f..768cc3cc 100644
--- a/kpovmodeler/pmtextureedit.cpp
+++ b/kpovmodeler/pmtextureedit.cpp
@@ -20,12 +20,12 @@
#include "pmtexture.h"
#include "pmlinkedit.h"
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
#include <klocale.h>
-PMTextureEdit::PMTextureEdit( QWidget* parent, const char* name )
+PMTextureEdit::PMTextureEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -34,10 +34,10 @@ PMTextureEdit::PMTextureEdit( QWidget* parent, const char* name )
void PMTextureEdit::createTopWidgets()
{
Base::createTopWidgets();
- m_pUVMapping = new QCheckBox( i18n( "UV mapping" ), this );
+ m_pUVMapping = new TQCheckBox( i18n( "UV mapping" ), this );
topLayout( )->addWidget( m_pUVMapping );
- connect( m_pUVMapping, SIGNAL( clicked() ), SIGNAL( dataChanged() ) );
+ connect( m_pUVMapping, TQT_SIGNAL( clicked() ), TQT_SIGNAL( dataChanged() ) );
}
void PMTextureEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmtextureedit.h b/kpovmodeler/pmtextureedit.h
index 7b799a5e..e1487794 100644
--- a/kpovmodeler/pmtextureedit.h
+++ b/kpovmodeler/pmtextureedit.h
@@ -27,7 +27,7 @@
#include "pmtexturebaseedit.h"
class PMTexture;
-class QCheckBox;
+class TQCheckBox;
/**
* Dialog edit class for @ref PMTexture
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMTextureEdit with parent and name
*/
- PMTextureEdit( QWidget* parent, const char* name = 0 );
+ PMTextureEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -53,7 +53,7 @@ protected:
private:
PMTexture* m_pDisplayedObject;
- QCheckBox* m_pUVMapping;
+ TQCheckBox* m_pUVMapping;
};
diff --git a/kpovmodeler/pmtexturemap.cpp b/kpovmodeler/pmtexturemap.cpp
index fad93c61..1ab0c3a4 100644
--- a/kpovmodeler/pmtexturemap.cpp
+++ b/kpovmodeler/pmtexturemap.cpp
@@ -22,7 +22,7 @@
#include "pmxmlhelper.h"
#include "pmmapmemento.h"
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <klocale.h>
class PMValueProperty : public PMPropertyBase
@@ -46,8 +46,8 @@ protected:
virtual bool setProtected( PMObject* obj, const PMVariant& var )
{
PMTextureMapBase* m = ( PMTextureMapBase* ) obj;
- QValueList<double> list = m->mapValues( );
- QValueList<double>::Iterator it = list.at( m_index );
+ TQValueList<double> list = m->mapValues( );
+ TQValueList<double>::Iterator it = list.at( m_index );
if( it == list.end( ) )
{
@@ -63,8 +63,8 @@ protected:
virtual PMVariant getProtected( const PMObject* obj )
{
PMTextureMapBase* m = ( PMTextureMapBase* ) obj;
- QValueList<double> list = m->mapValues( );
- QValueList<double>::ConstIterator it = list.at( m_index );
+ TQValueList<double> list = m->mapValues( );
+ TQValueList<double>::ConstIterator it = list.at( m_index );
if( it == list.end( ) )
{
@@ -96,7 +96,7 @@ PMTextureMapBase::~PMTextureMapBase( )
{
}
-void PMTextureMapBase::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMTextureMapBase::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "map_values", valuesToString( ) );
Base::serialize( e, doc );
@@ -108,10 +108,10 @@ void PMTextureMapBase::readAttributes( const PMXMLHelper& h )
Base::readAttributes( h );
}
-QString PMTextureMapBase::valuesToString( ) const
+TQString PMTextureMapBase::valuesToString( ) const
{
- QString str;
- QValueList<double>::ConstIterator it;
+ TQString str;
+ TQValueList<double>::ConstIterator it;
it = m_mapValues.begin( );
if( it != m_mapValues.end( ) )
@@ -119,16 +119,16 @@ QString PMTextureMapBase::valuesToString( ) const
str.setNum( *it );
++it;
for( ; it != m_mapValues.end( ); ++it )
- str += QString( " %1" ).arg( *it );
+ str += TQString( " %1" ).arg( *it );
}
return str;
}
-void PMTextureMapBase::stringToValues( const QString& str )
+void PMTextureMapBase::stringToValues( const TQString& str )
{
m_mapValues.clear( );
- QString tstr = str;
- QTextIStream s( &tstr );
+ TQString tstr = str;
+ TQTextIStream s( &tstr );
double d;
while( !s.atEnd( ) )
@@ -158,7 +158,7 @@ void PMTextureMapBase::cleanUp( ) const
Base::cleanUp( );
}
-PMDialogEditBase* PMTextureMapBase::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMTextureMapBase::editWidget( TQWidget* parent ) const
{
return new PMTextureMapEdit( parent );
}
@@ -189,10 +189,10 @@ void PMTextureMapBase::createMemento( )
m_pMemento = new PMMapMemento( this );
}
-QValueList<double>::Iterator PMTextureMapBase::valueForChild( PMObject* obj )
+TQValueList<double>::Iterator PMTextureMapBase::valueForChild( PMObject* obj )
{
PMObject* o = firstChild( );
- QValueList<double>::Iterator it = m_mapValues.begin( );
+ TQValueList<double>::Iterator it = m_mapValues.begin( );
while( o && ( o != obj ) )
{
@@ -206,7 +206,7 @@ QValueList<double>::Iterator PMTextureMapBase::valueForChild( PMObject* obj )
double PMTextureMapBase::mapValue( const PMObject* obj ) const
{
PMObject* o = firstChild( );
- QValueList<double>::ConstIterator it = m_mapValues.begin( );
+ TQValueList<double>::ConstIterator it = m_mapValues.begin( );
while( o && ( o != obj ) )
{
@@ -226,7 +226,7 @@ void PMTextureMapBase::childAdded( PMObject* ao )
( ( PMMapMemento* ) m_pMemento )->setMapValues( m_mapValues );
if( m_removedValues.isEmpty( ) )
{
- QValueList<double>::Iterator it = valueForChild( ao );
+ TQValueList<double>::Iterator it = valueForChild( ao );
if( it == m_mapValues.end( ) )
{
--it;
@@ -254,7 +254,7 @@ void PMTextureMapBase::childAdded( PMObject* ao )
if( m_pMemento )
( ( PMMapMemento* ) m_pMemento )->setRemovedValues( m_removedValues );
- QValueList<double>::Iterator it = m_mapValues.begin( );
+ TQValueList<double>::Iterator it = m_mapValues.begin( );
bool stop = false;
double v = m_removedValues.last( );
m_removedValues.remove( m_removedValues.fromLast( ) );
@@ -278,7 +278,7 @@ bool PMTextureMapBase::takeChild( PMObject* o )
( ( PMMapMemento* ) m_pMemento )->setRemovedValues( m_removedValues );
}
- QValueList<double>::Iterator it = valueForChild( o );
+ TQValueList<double>::Iterator it = valueForChild( o );
if( it != m_mapValues.end( ) )
{
m_removedValues.append( *it );
@@ -288,7 +288,7 @@ bool PMTextureMapBase::takeChild( PMObject* o )
return Base::takeChild( o );
}
-void PMTextureMapBase::setMapValues( const QValueList<double>& v )
+void PMTextureMapBase::setMapValues( const TQValueList<double>& v )
{
if( m_pMemento )
{
@@ -362,7 +362,7 @@ void PMTextureMap::cleanUp( ) const
Base::cleanUp( );
}
-QString PMTextureMap::description( ) const
+TQString PMTextureMap::description( ) const
{
return i18n( "texture map" );
}
@@ -408,7 +408,7 @@ void PMPigmentMap::cleanUp( ) const
Base::cleanUp( );
}
-QString PMPigmentMap::description( ) const
+TQString PMPigmentMap::description( ) const
{
return i18n( "pigment map" );
}
@@ -454,7 +454,7 @@ void PMColorMap::cleanUp( ) const
Base::cleanUp( );
}
-QString PMColorMap::description( ) const
+TQString PMColorMap::description( ) const
{
return i18n( "color map" );
}
@@ -500,7 +500,7 @@ void PMNormalMap::cleanUp( ) const
Base::cleanUp( );
}
-QString PMNormalMap::description( ) const
+TQString PMNormalMap::description( ) const
{
return i18n( "normal map" );
}
@@ -546,7 +546,7 @@ void PMSlopeMap::cleanUp( ) const
Base::cleanUp( );
}
-QString PMSlopeMap::description( ) const
+TQString PMSlopeMap::description( ) const
{
return i18n( "slope map" );
}
@@ -592,7 +592,7 @@ void PMDensityMap::cleanUp( ) const
Base::cleanUp( );
}
-QString PMDensityMap::description( ) const
+TQString PMDensityMap::description( ) const
{
return i18n( "density map" );
}
diff --git a/kpovmodeler/pmtexturemap.h b/kpovmodeler/pmtexturemap.h
index 227c7e1f..6a7b020d 100644
--- a/kpovmodeler/pmtexturemap.h
+++ b/kpovmodeler/pmtexturemap.h
@@ -27,7 +27,7 @@
#include "pmtexturebase.h"
#include "pmvector.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
/**
* Base class for color, pigment, texture and normal maps
@@ -64,19 +64,19 @@ public:
virtual bool takeChild( PMObject* o );
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns the map object type
*/
- virtual QString mapType( ) const = 0;
+ virtual TQString mapType( ) const = 0;
/**
* Returns a new @ref PMTextureMapEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
virtual void createMemento( );
@@ -86,11 +86,11 @@ public:
/**
* Returns the map values
*/
- QValueList<double> mapValues( ) const { return m_mapValues; }
+ TQValueList<double> mapValues( ) const { return m_mapValues; }
/**
* Sets the map values
*/
- void setMapValues( const QValueList<double>& v );
+ void setMapValues( const TQValueList<double>& v );
/**
* Returns the map value for the object o
*/
@@ -102,9 +102,9 @@ public:
private:
PMObject* nextMapEntry( PMObject* o );
- void stringToValues( const QString& str );
- QString valuesToString( ) const;
- QValueList<double>::Iterator valueForChild( PMObject* o );
+ void stringToValues( const TQString& str );
+ TQString valuesToString( ) const;
+ TQValueList<double>::Iterator valueForChild( PMObject* o );
/**
* IDs for @ref PMMementoData
@@ -114,11 +114,11 @@ private:
/**
* list of map values
*/
- QValueList<double> m_mapValues;
+ TQValueList<double> m_mapValues;
/**
* removed map values
*/
- QValueList<double> m_removedValues;
+ TQValueList<double> m_removedValues;
static PMMetaObject* s_pMetaObject;
};
@@ -148,9 +148,9 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMTextureMap( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
- virtual QString mapType( ) const { return QString( "Texture" ); }
+ virtual TQString mapType( ) const { return TQString( "Texture" ); }
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -158,7 +158,7 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmtexturemap" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmtexturemap" ); }
private:
static PMMetaObject* s_pMetaObject;
@@ -188,9 +188,9 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMPigmentMap( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
- virtual QString mapType( ) const { return QString( "Pigment" ); }
+ virtual TQString mapType( ) const { return TQString( "Pigment" ); }
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -198,7 +198,7 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmpigmentmap" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmpigmentmap" ); }
private:
static PMMetaObject* s_pMetaObject;
@@ -228,9 +228,9 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMColorMap( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
- virtual QString mapType( ) const { return QString( "SolidColor" ); }
+ virtual TQString mapType( ) const { return TQString( "SolidColor" ); }
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -238,7 +238,7 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmcolormap" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmcolormap" ); }
private:
static PMMetaObject* s_pMetaObject;
@@ -269,9 +269,9 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMNormalMap( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
- virtual QString mapType( ) const { return QString( "Normal" ); }
+ virtual TQString mapType( ) const { return TQString( "Normal" ); }
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -279,7 +279,7 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmnormalmap" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmnormalmap" ); }
private:
static PMMetaObject* s_pMetaObject;
@@ -309,9 +309,9 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMSlopeMap( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
- virtual QString mapType( ) const { return QString( "Slope" ); }
+ virtual TQString mapType( ) const { return TQString( "Slope" ); }
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -319,7 +319,7 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmslopemap" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmslopemap" ); }
private:
static PMMetaObject* s_pMetaObject;
@@ -349,9 +349,9 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMDensityMap( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
- virtual QString mapType( ) const { return QString( "Density" ); }
+ virtual TQString mapType( ) const { return TQString( "Density" ); }
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -359,7 +359,7 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmdensitymap" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmdensitymap" ); }
private:
static PMMetaObject* s_pMetaObject;
diff --git a/kpovmodeler/pmtexturemapedit.cpp b/kpovmodeler/pmtexturemapedit.cpp
index 6faf4376..2efa7708 100644
--- a/kpovmodeler/pmtexturemapedit.cpp
+++ b/kpovmodeler/pmtexturemapedit.cpp
@@ -20,13 +20,13 @@
#include "pmtexturemap.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kmessagebox.h>
-PMTextureMapEdit::PMTextureMapEdit( QWidget* parent, const char* name )
+PMTextureMapEdit::PMTextureMapEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -36,27 +36,27 @@ PMTextureMapEdit::PMTextureMapEdit( QWidget* parent, const char* name )
void PMTextureMapEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- topLayout( )->addWidget( new QLabel( i18n( "Map values:" ), this ) );
- m_pNoChildLabel = new QLabel( i18n( "(No Child Objects)" ), this );
- m_pPureLinkLabel = new QLabel( i18n( "(Pure Link)" ), this );
+ topLayout( )->addWidget( new TQLabel( i18n( "Map values:" ), this ) );
+ m_pNoChildLabel = new TQLabel( i18n( "(No Child Objects)" ), this );
+ m_pPureLinkLabel = new TQLabel( i18n( "(Pure Link)" ), this );
topLayout( )->addWidget( m_pNoChildLabel );
topLayout( )->addWidget( m_pPureLinkLabel );
- QHBoxLayout* hl = new QHBoxLayout( topLayout( ) );
- m_pEditLayout = new QVBoxLayout( hl );
+ TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) );
+ m_pEditLayout = new TQVBoxLayout( hl );
hl->addStretch( 1 );
}
void PMTextureMapEdit::displayObject( PMObject* o )
{
- QString str;
+ TQString str;
if( o->isA( "TextureMapBase" ) )
{
bool readOnly = o->isReadOnly( );
m_pDisplayedObject = ( PMTextureMapBase* ) o;
- QValueList<double> mv = m_pDisplayedObject->mapValues( );
- QValueList<double>::Iterator vit = mv.begin( );
- QPtrListIterator<PMFloatEdit> eit( m_edits );
+ TQValueList<double> mv = m_pDisplayedObject->mapValues( );
+ TQValueList<double>::Iterator vit = mv.begin( );
+ TQPtrListIterator<PMFloatEdit> eit( m_edits );
PMFloatEdit* edit;
m_numValues = 0;
@@ -78,7 +78,7 @@ void PMTextureMapEdit::displayObject( PMObject* o )
edit->setValue( *vit );
edit->setValidation( true, 0.0, true, 1.0 );
edit->setReadOnly( readOnly );
- connect( edit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( edit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
m_numValues++;
}
@@ -115,9 +115,9 @@ void PMTextureMapEdit::saveContents( )
{
if( m_numValues > 0 )
{
- QPtrListIterator<PMFloatEdit> it( m_edits );
+ TQPtrListIterator<PMFloatEdit> it( m_edits );
int i = 0;
- QValueList<double> values;
+ TQValueList<double> values;
for( ; ( i < m_numValues ) && it.current( ); ++i, ++it )
values.append( it.current( )->value( ) );
@@ -129,7 +129,7 @@ void PMTextureMapEdit::saveContents( )
bool PMTextureMapEdit::isDataValid( )
{
- QPtrListIterator<PMFloatEdit> it( m_edits );
+ TQPtrListIterator<PMFloatEdit> it( m_edits );
int i = 0;
double last = 0.0;
diff --git a/kpovmodeler/pmtexturemapedit.h b/kpovmodeler/pmtexturemapedit.h
index 818d7435..7ec806d3 100644
--- a/kpovmodeler/pmtexturemapedit.h
+++ b/kpovmodeler/pmtexturemapedit.h
@@ -25,13 +25,13 @@
#endif
#include "pmtexturebaseedit.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
class PMTextureMapBase;
class PMFloatEdit;
-class QWidget;
-class QVBoxLayout;
-class QLabel;
+class TQWidget;
+class TQVBoxLayout;
+class TQLabel;
/**
* Dialog edit class for @ref PMTextureMapBase.
@@ -44,7 +44,7 @@ public:
/**
* Creates a PMTextureMapEdit with parent and name
*/
- PMTextureMapEdit( QWidget* parent, const char* name = 0 );
+ PMTextureMapEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -59,10 +59,10 @@ protected:
private:
PMTextureMapBase* m_pDisplayedObject;
- QPtrList<PMFloatEdit> m_edits;
- QVBoxLayout* m_pEditLayout;
- QLabel* m_pNoChildLabel;
- QLabel* m_pPureLinkLabel;
+ TQPtrList<PMFloatEdit> m_edits;
+ TQVBoxLayout* m_pEditLayout;
+ TQLabel* m_pNoChildLabel;
+ TQLabel* m_pPureLinkLabel;
int m_numValues;
};
diff --git a/kpovmodeler/pmtorus.cpp b/kpovmodeler/pmtorus.cpp
index c6f4238a..5e5be5ea 100644
--- a/kpovmodeler/pmtorus.cpp
+++ b/kpovmodeler/pmtorus.cpp
@@ -69,7 +69,7 @@ PMTorus::~PMTorus( )
}
-QString PMTorus::description( ) const
+TQString PMTorus::description( ) const
{
return i18n( "torus" );
}
@@ -92,7 +92,7 @@ PMMetaObject* PMTorus::metaObject( ) const
return s_pMetaObject;
}
-void PMTorus::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMTorus::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "minor_radius", m_minorRadius );
e.setAttribute( "major_radius", m_majorRadius );
@@ -110,7 +110,7 @@ void PMTorus::readAttributes( const PMXMLHelper& h )
Base::readAttributes( h );
}
-PMDialogEditBase* PMTorus::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMTorus::editWidget( TQWidget* parent ) const
{
return new PMTorusEdit( parent );
diff --git a/kpovmodeler/pmtorus.h b/kpovmodeler/pmtorus.h
index 9f3f8225..a7f1ee6a 100644
--- a/kpovmodeler/pmtorus.h
+++ b/kpovmodeler/pmtorus.h
@@ -55,24 +55,24 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMTorus( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMTrousEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmtorus" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmtorus" ); }
/**
* set minor radius see povray documentation about torus
*/
diff --git a/kpovmodeler/pmtorusedit.cpp b/kpovmodeler/pmtorusedit.cpp
index 01784e1d..e47301b9 100644
--- a/kpovmodeler/pmtorusedit.cpp
+++ b/kpovmodeler/pmtorusedit.cpp
@@ -20,13 +20,13 @@
#include "pmvectoredit.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
-PMTorusEdit::PMTorusEdit( QWidget* parent, const char* name )
+PMTorusEdit::PMTorusEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -36,27 +36,27 @@ void PMTorusEdit::createTopWidgets( )
{
Base::createTopWidgets( );
- QGridLayout* gl;
- QHBoxLayout* hl;
+ TQGridLayout* gl;
+ TQHBoxLayout* hl;
m_pMinorRadius = new PMFloatEdit( this );
m_pMajorRadius = new PMFloatEdit( this );
- m_pSturm = new QCheckBox( i18n( "Sturm" ), this );
+ m_pSturm = new TQCheckBox( i18n( "Sturm" ), this );
- hl = new QHBoxLayout( topLayout( ) );
- gl = new QGridLayout( hl, 2, 2 );
- gl->addWidget( new QLabel( i18n( "Minor radius:" ), this ), 0, 0 );
+ hl = new TQHBoxLayout( topLayout( ) );
+ gl = new TQGridLayout( hl, 2, 2 );
+ gl->addWidget( new TQLabel( i18n( "Minor radius:" ), this ), 0, 0 );
gl->addWidget( m_pMinorRadius, 0, 1 );
- gl->addWidget( new QLabel( i18n( "Major radius:" ), this ), 1, 0 );
+ gl->addWidget( new TQLabel( i18n( "Major radius:" ), this ), 1, 0 );
gl->addWidget( m_pMajorRadius, 1, 1 );
hl->addStretch( 1 );
topLayout( )->addWidget( m_pSturm );
- connect( m_pMinorRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pMajorRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pSturm, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pMinorRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pMajorRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pSturm, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMTorusEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmtorusedit.h b/kpovmodeler/pmtorusedit.h
index 2aea334b..1d3f4f5a 100644
--- a/kpovmodeler/pmtorusedit.h
+++ b/kpovmodeler/pmtorusedit.h
@@ -27,7 +27,7 @@
class PMTorus;
class PMFloatEdit ;
-class QCheckBox;
+class TQCheckBox;
/**
* Dialog edit class for @ref PMTorus
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMSphereEdit with parent and name
*/
- PMTorusEdit( QWidget* parent, const char* name = 0 );
+ PMTorusEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -57,7 +57,7 @@ private:
PMTorus* m_pDisplayedObject;
PMFloatEdit* m_pMinorRadius;
PMFloatEdit* m_pMajorRadius;
- QCheckBox * m_pSturm;
+ TQCheckBox * m_pSturm;
};
diff --git a/kpovmodeler/pmtranslate.cpp b/kpovmodeler/pmtranslate.cpp
index 0cfab44f..a0a09b7b 100644
--- a/kpovmodeler/pmtranslate.cpp
+++ b/kpovmodeler/pmtranslate.cpp
@@ -50,12 +50,12 @@ PMTranslate::~PMTranslate( )
{
}
-QString PMTranslate::description( ) const
+TQString PMTranslate::description( ) const
{
return i18n( "translate" );
}
-void PMTranslate::serialize( QDomElement& e, QDomDocument& /*doc*/ ) const
+void PMTranslate::serialize( TQDomElement& e, TQDomDocument& /*doc*/ ) const
{
e.setAttribute( "value", m_move.serializeXML( ) );
}
@@ -101,7 +101,7 @@ void PMTranslate::setTranslation( const PMVector& p )
}
}
-PMDialogEditBase* PMTranslate::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMTranslate::editWidget( TQWidget* parent ) const
{
return new PMTranslateEdit( parent );
}
diff --git a/kpovmodeler/pmtranslate.h b/kpovmodeler/pmtranslate.h
index 91f1c7c3..d1272bf6 100644
--- a/kpovmodeler/pmtranslate.h
+++ b/kpovmodeler/pmtranslate.h
@@ -51,7 +51,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMTranslate( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -59,15 +59,15 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMTranslateEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/** */
- virtual QString pixmap( ) const { return QString( "pmtranslate" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmtranslate" ); }
/**
* Returns the movement
diff --git a/kpovmodeler/pmtranslateedit.cpp b/kpovmodeler/pmtranslateedit.cpp
index d2690f51..f98bcf00 100644
--- a/kpovmodeler/pmtranslateedit.cpp
+++ b/kpovmodeler/pmtranslateedit.cpp
@@ -20,11 +20,11 @@
#include "pmtranslate.h"
#include "pmvectoredit.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
-PMTranslateEdit::PMTranslateEdit( QWidget* parent, const char* name )
+PMTranslateEdit::PMTranslateEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -37,7 +37,7 @@ void PMTranslateEdit::createTopWidgets( )
m_pVector = new PMVectorEdit( "x", "y", "z", this );
topLayout( )->addWidget( m_pVector );
- connect( m_pVector, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pVector, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMTranslateEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmtranslateedit.h b/kpovmodeler/pmtranslateedit.h
index ce27b037..f2061ca0 100644
--- a/kpovmodeler/pmtranslateedit.h
+++ b/kpovmodeler/pmtranslateedit.h
@@ -40,7 +40,7 @@ public:
/**
* Creates a PMTranslateEdit with parent and name
*/
- PMTranslateEdit( QWidget* parent, const char* name = 0 );
+ PMTranslateEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
diff --git a/kpovmodeler/pmtreeview.cpp b/kpovmodeler/pmtreeview.cpp
index 66ec18a0..827a52c0 100644
--- a/kpovmodeler/pmtreeview.cpp
+++ b/kpovmodeler/pmtreeview.cpp
@@ -18,11 +18,11 @@
#include <stdlib.h>
-#include <qlistview.h>
-#include <qheader.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qcursor.h>
+#include <tqlistview.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqcursor.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -38,23 +38,23 @@
#include "pmobjectdrag.h"
-PMTreeViewWidget::PMTreeViewWidget( PMPart* part, QWidget* parent /*= 0*/,
+PMTreeViewWidget::PMTreeViewWidget( PMPart* part, TQWidget* parent /*= 0*/,
const char* name /*=0*/ )
: PMViewBase( parent, name )
{
- QHBoxLayout* hl = new QHBoxLayout( this );
+ TQHBoxLayout* hl = new TQHBoxLayout( this );
PMTreeView* tv = new PMTreeView( part, this );
hl->addWidget( tv );
}
-QString PMTreeViewWidget::description( ) const
+TQString PMTreeViewWidget::description( ) const
{
return i18n( "Object Tree" );
}
-PMTreeView::PMTreeView( PMPart* part, QWidget* parent /*= 0*/,
+PMTreeView::PMTreeView( PMPart* part, TQWidget* parent /*= 0*/,
const char* name /*= 0*/ )
- : QListView( parent, name )
+ : TQListView( parent, name )
{
addColumn( i18n( "Objects" ) );
header( )->hide( );
@@ -75,16 +75,16 @@ PMTreeView::PMTreeView( PMPart* part, QWidget* parent /*= 0*/,
viewport( )->setAcceptDrops( true );
viewport( )->setMouseTracking( true );
- viewport( )->setFocusPolicy( QWidget::WheelFocus );
- setFocusPolicy( QWidget::WheelFocus );
+ viewport( )->setFocusPolicy( TQWidget::WheelFocus );
+ setFocusPolicy( TQWidget::WheelFocus );
setAcceptDrops( true );
- connect( part, SIGNAL( refresh( ) ), SLOT( slotRefresh( ) ) );
- connect( part, SIGNAL( objectChanged( PMObject*, const int, QObject* ) ),
- SLOT( slotObjectChanged( PMObject*, const int, QObject* ) ) );
- connect( part, SIGNAL( clear( ) ), SLOT( slotClear( ) ) );
- connect( this, SIGNAL( objectChanged( PMObject*, const int, QObject* ) ),
- part, SLOT( slotObjectChanged( PMObject*, const int, QObject* ) ) );
+ connect( part, TQT_SIGNAL( refresh( ) ), TQT_SLOT( slotRefresh( ) ) );
+ connect( part, TQT_SIGNAL( objectChanged( PMObject*, const int, TQObject* ) ),
+ TQT_SLOT( slotObjectChanged( PMObject*, const int, TQObject* ) ) );
+ connect( part, TQT_SIGNAL( clear( ) ), TQT_SLOT( slotClear( ) ) );
+ connect( this, TQT_SIGNAL( objectChanged( PMObject*, const int, TQObject* ) ),
+ part, TQT_SLOT( slotObjectChanged( PMObject*, const int, TQObject* ) ) );
slotRefresh( );
}
@@ -95,7 +95,7 @@ PMTreeView::~PMTreeView( )
}
void PMTreeView::slotObjectChanged( PMObject* obj, const int mode,
- QObject* sender )
+ TQObject* sender )
{
PMTreeViewItem* pTreeItem = 0;
bool as = m_acceptSelect;
@@ -114,11 +114,11 @@ void PMTreeView::slotObjectChanged( PMObject* obj, const int mode,
else
{
// find the parent in the listview
- QListViewItem* pParentTreeItem = findObject( obj->parent( ) );
+ TQListViewItem* pParentTreeItem = findObject( obj->parent( ) );
if( pParentTreeItem )
{
PMObject* hObj = obj->prevSibling( );
- QListViewItem* pSibling = 0;
+ TQListViewItem* pSibling = 0;
bool found = false;
if( hObj )
@@ -261,9 +261,9 @@ PMTreeViewItem* PMTreeView::findObject( const PMObject* obj )
}
-void PMTreeView::selectItem( QListViewItem* /*sitem*/ )
+void PMTreeView::selectItem( TQListViewItem* /*sitem*/ )
{
-/* QListViewItem* pItem = 0;
+/* TQListViewItem* pItem = 0;
bool emitSig;
emitSig = ( m_pSelectedObject != ( ( PMTreeViewItem* ) sitem )->object( ) );
@@ -342,7 +342,7 @@ void PMTreeView::itemSelected( PMTreeViewItem* item, bool selected )
}
}
-void PMTreeView::contentsMousePressEvent( QMouseEvent * e )
+void PMTreeView::contentsMousePressEvent( TQMouseEvent * e )
{
m_itemSelected = false;
m_itemDeselected = false;
@@ -351,11 +351,11 @@ void PMTreeView::contentsMousePressEvent( QMouseEvent * e )
m_selectOnReleaseEvent = false;
bool specialAction = false;
- QListViewItem* oldCurrent = currentItem( );
+ TQListViewItem* oldCurrent = currentItem( );
m_event = true;
m_acceptSelect = true;
- QListView::contentsMousePressEvent( e );
+ TQListView::contentsMousePressEvent( e );
m_event = false;
m_acceptSelect = true;
@@ -399,7 +399,7 @@ void PMTreeView::contentsMousePressEvent( QMouseEvent * e )
if( m_pLastSelected->object( )->isSelectable( ) )
{
bool down = oldCurrent->itemPos( ) < m_pLastSelected->itemPos( );
- QListViewItem* tmp;
+ TQListViewItem* tmp;
if( down )
{
@@ -446,7 +446,7 @@ void PMTreeView::contentsMousePressEvent( QMouseEvent * e )
m_acceptSelect = false;
}
-void PMTreeView::contentsMouseMoveEvent( QMouseEvent * e )
+void PMTreeView::contentsMouseMoveEvent( TQMouseEvent * e )
{
m_itemSelected = false;
m_itemDeselected = false;
@@ -454,7 +454,7 @@ void PMTreeView::contentsMouseMoveEvent( QMouseEvent * e )
m_selectionCleared = false;
m_event = true;
- QListView::contentsMouseMoveEvent( e );
+ TQListView::contentsMouseMoveEvent( e );
m_event = false;
// ignore all selections/deselections
@@ -462,24 +462,24 @@ void PMTreeView::contentsMouseMoveEvent( QMouseEvent * e )
m_pLastSelected->setSelected( m_pLastSelected->object( )->isSelected( ) );
}
-void PMTreeView::viewportMousePressEvent( QMouseEvent* e )
+void PMTreeView::viewportMousePressEvent( TQMouseEvent* e )
{
m_acceptSelect = true;
- QListView::viewportMousePressEvent( e );
+ TQListView::viewportMousePressEvent( e );
m_acceptSelect = false;
m_pressed = false;
- QPoint p = e->pos( );
+ TQPoint p = e->pos( );
if( e->button( ) & RightButton )
{
if( m_pPart->factory( ) )
{
- QPopupMenu* m =
- ( QPopupMenu* ) m_pPart->factory( )->container( "treeViewPopup", m_pPart );
+ TQPopupMenu* m =
+ ( TQPopupMenu* ) m_pPart->factory( )->container( "treeViewPopup", m_pPart );
if( m )
- m->exec( QCursor::pos( ) );
+ m->exec( TQCursor::pos( ) );
}
return;
}
@@ -507,9 +507,9 @@ void PMTreeView::viewportMousePressEvent( QMouseEvent* e )
}
}
-void PMTreeView::viewportMouseReleaseEvent( QMouseEvent* e )
+void PMTreeView::viewportMouseReleaseEvent( TQMouseEvent* e )
{
- QListView::viewportMouseReleaseEvent( e );
+ TQListView::viewportMouseReleaseEvent( e );
if( !m_pressed )
return;
@@ -531,9 +531,9 @@ void PMTreeView::viewportMouseReleaseEvent( QMouseEvent* e )
}
}
-void PMTreeView::viewportMouseMoveEvent( QMouseEvent *e )
+void PMTreeView::viewportMouseMoveEvent( TQMouseEvent *e )
{
- QListView::viewportMouseMoveEvent( e );
+ TQListView::viewportMouseMoveEvent( e );
if( m_pressed && m_pressedItem )
{
@@ -547,7 +547,7 @@ void PMTreeView::viewportMouseMoveEvent( QMouseEvent *e )
m_selectOnReleaseEvent = false;
// Calculate hotspot
- QPoint hotspot;
+ TQPoint hotspot;
PMObjectList sortedList = m_pPart->selectedObjects( );
// Do not handle more mouse move or mouse release events
@@ -576,7 +576,7 @@ void PMTreeView::viewportMouseMoveEvent( QMouseEvent *e )
}
}
-void PMTreeView::viewportDragMoveEvent( QDragMoveEvent *e )
+void PMTreeView::viewportDragMoveEvent( TQDragMoveEvent *e )
{
bool accept = false;
@@ -645,7 +645,7 @@ void PMTreeView::viewportDragMoveEvent( QDragMoveEvent *e )
e->ignore( );
}
-void PMTreeView::viewportDragEnterEvent( QDragEnterEvent *e )
+void PMTreeView::viewportDragEnterEvent( TQDragEnterEvent *e )
{
m_pDragOverItem = 0L;
@@ -655,12 +655,12 @@ void PMTreeView::viewportDragEnterEvent( QDragEnterEvent *e )
e->ignore( );
}
-void PMTreeView::viewportDragLeaveEvent( QDragLeaveEvent* )
+void PMTreeView::viewportDragLeaveEvent( TQDragLeaveEvent* )
{
m_pDragOverItem = 0L;
}
-void PMTreeView::viewportDropEvent( QDropEvent* e )
+void PMTreeView::viewportDropEvent( TQDropEvent* e )
{
PMObject* obj;
@@ -674,7 +674,7 @@ void PMTreeView::viewportDropEvent( QDropEvent* e )
if( PMObjectDrag::canDecode( e, m_pPart ) )
{
if( targetDisplaysPart( e->source( ) ) &&
- ( e->action( ) == QDropEvent::Move ) )
+ ( e->action( ) == TQDropEvent::Move ) )
{
if( m_pPart->dragMoveSelectionTo( obj ) )
e->acceptAction( );
@@ -698,24 +698,24 @@ void PMTreeView::viewportDropEvent( QDropEvent* e )
m_pDragOverItem = 0L;
}
-void PMTreeView::focusOutEvent( QFocusEvent* e )
+void PMTreeView::focusOutEvent( TQFocusEvent* e )
{
- QWidget::focusOutEvent( e );
+ TQWidget::focusOutEvent( e );
m_pressed = false;
m_pressedItem = 0;
}
-void PMTreeView::focusInEvent( QFocusEvent* e )
+void PMTreeView::focusInEvent( TQFocusEvent* e )
{
- QWidget::focusInEvent( e );
+ TQWidget::focusInEvent( e );
m_pressed = false;
m_pressedItem = 0;
}
-void PMTreeView::keyPressEvent( QKeyEvent* e )
+void PMTreeView::keyPressEvent( TQKeyEvent* e )
{
- QListViewItem* current = currentItem( );
- QListViewItem* newSelection = 0;
+ TQListViewItem* current = currentItem( );
+ TQListViewItem* newSelection = 0;
bool accept = false;
bool deleteItem = false;
bool pasteItem = false;
@@ -788,10 +788,10 @@ void PMTreeView::keyPressEvent( QKeyEvent* e )
e->accept( );
else
e->ignore( );
- QWidget::keyPressEvent( e );
+ TQWidget::keyPressEvent( e );
}
-bool PMTreeView::targetDisplaysPart( QWidget* target )
+bool PMTreeView::targetDisplaysPart( TQWidget* target )
{
bool result = false;
if( !target ) // another application
@@ -802,7 +802,7 @@ bool PMTreeView::targetDisplaysPart( QWidget* target )
{
// Widget may be a view port
// find the tree view
- QWidget* t = target;
+ TQWidget* t = target;
while( t && !t->isA( "PMTreeView" ) )
t = t->parentWidget( );
if( t )
@@ -812,7 +812,7 @@ bool PMTreeView::targetDisplaysPart( QWidget* target )
return result;
}
-QString PMTreeViewFactory::description( ) const
+TQString PMTreeViewFactory::description( ) const
{
return i18n( "Object Tree" );
}
diff --git a/kpovmodeler/pmtreeview.h b/kpovmodeler/pmtreeview.h
index 24f6f33f..ec4d9c1b 100644
--- a/kpovmodeler/pmtreeview.h
+++ b/kpovmodeler/pmtreeview.h
@@ -24,7 +24,7 @@
#include <config.h>
#endif
-#include <qlistview.h>
+#include <tqlistview.h>
#include "pmobject.h"
#include "pmviewbase.h"
#include "pmviewfactory.h"
@@ -41,12 +41,12 @@ public:
/**
* Default constructor
*/
- PMTreeViewWidget( PMPart* pare, QWidget* parent, const char* name = 0 );
+ PMTreeViewWidget( PMPart* pare, TQWidget* parent, const char* name = 0 );
/** */
- virtual QString viewType( ) const { return QString( "treeview" ); }
+ virtual TQString viewType( ) const { return TQString( "treeview" ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
};
/**
@@ -61,7 +61,7 @@ public:
* Creates a PMTreeView with parent and name that displays the
* document doc
*/
- PMTreeView( PMPart* part, QWidget* parent = 0, const char* name = 0 );
+ PMTreeView( PMPart* part, TQWidget* parent = 0, const char* name = 0 );
/**
* Deletes the PMTreeView
*/
@@ -80,7 +80,7 @@ public slots:
/**
* Called when an object is changed.
* @see PMPart::objectChanged( ) */
- void slotObjectChanged( PMObject* obj, const int mode, QObject* sender );
+ void slotObjectChanged( PMObject* obj, const int mode, TQObject* sender );
/**
* Refreshes the whole csg tree
*/
@@ -94,30 +94,30 @@ signals:
/**
* Emitted, when an object is selected or deselected
*/
- void objectChanged( PMObject* obj, const int mode, QObject* sender );
+ void objectChanged( PMObject* obj, const int mode, TQObject* sender );
/**
* Emitted in the destructor
*/
void destroyed( PMTreeView* v );
protected:
- void contentsMousePressEvent( QMouseEvent * e );
- void contentsMouseMoveEvent( QMouseEvent * e );
+ void contentsMousePressEvent( TQMouseEvent * e );
+ void contentsMouseMoveEvent( TQMouseEvent * e );
void itemSelected( PMTreeViewItem* item, bool selected );
- void viewportMousePressEvent( QMouseEvent * e );
- void viewportMouseReleaseEvent( QMouseEvent* e );
- void viewportMouseMoveEvent( QMouseEvent* e );
+ void viewportMousePressEvent( TQMouseEvent * e );
+ void viewportMouseReleaseEvent( TQMouseEvent* e );
+ void viewportMouseMoveEvent( TQMouseEvent* e );
- void viewportDragMoveEvent( QDragMoveEvent *e );
- void viewportDragEnterEvent( QDragEnterEvent *e );
- void viewportDragLeaveEvent( QDragLeaveEvent* e );
- void viewportDropEvent( QDropEvent* e );
+ void viewportDragMoveEvent( TQDragMoveEvent *e );
+ void viewportDragEnterEvent( TQDragEnterEvent *e );
+ void viewportDragLeaveEvent( TQDragLeaveEvent* e );
+ void viewportDropEvent( TQDropEvent* e );
- void focusOutEvent( QFocusEvent* e );
- void focusInEvent( QFocusEvent* e );
+ void focusOutEvent( TQFocusEvent* e );
+ void focusInEvent( TQFocusEvent* e );
- void keyPressEvent( QKeyEvent* e );
+ void keyPressEvent( TQKeyEvent* e );
private:
/**
@@ -131,11 +131,11 @@ private:
/**
* Selects the item. Expands the tree if necessary
*/
- void selectItem( QListViewItem* item );
+ void selectItem( TQListViewItem* item );
/**
* Returns true if the drop target is a tree view for the same part
*/
- bool targetDisplaysPart( QWidget* target );
+ bool targetDisplaysPart( TQWidget* target );
/**
* the displayed document
@@ -145,7 +145,7 @@ private:
/**
* the selected items
*/
-// QPtrList<PMTreeViewItem> m_selectedItems;
+// TQPtrList<PMTreeViewItem> m_selectedItems;
PMTreeViewItem* m_pLastSelected;
bool m_itemSelected;
bool m_itemDeselected;
@@ -155,11 +155,11 @@ private:
bool m_selectOnReleaseEvent;
PMTreeViewItem* m_pDragOverItem;
-// QStringList m_lstDropFormats;
+// TQStringList m_lstDropFormats;
// for drag and drop, copied from KonqBaseListViewWidget
bool m_pressed;
- QPoint m_pressedPos;
+ TQPoint m_pressedPos;
PMTreeViewItem* m_pressedItem;
};
@@ -170,10 +170,10 @@ class PMTreeViewFactory : public PMViewTypeFactory
{
public:
PMTreeViewFactory( ) { }
- virtual QString viewType( ) const { return QString( "treeview" ); }
- virtual QString description( ) const;
- virtual QString iconName( ) const { return QString( "pmtreeview" ); }
- virtual PMViewBase* newInstance( QWidget* parent, PMPart* part ) const
+ virtual TQString viewType( ) const { return TQString( "treeview" ); }
+ virtual TQString description( ) const;
+ virtual TQString iconName( ) const { return TQString( "pmtreeview" ); }
+ virtual PMViewBase* newInstance( TQWidget* parent, PMPart* part ) const
{
return new PMTreeViewWidget( part, parent );
}
diff --git a/kpovmodeler/pmtreeviewitem.cpp b/kpovmodeler/pmtreeviewitem.cpp
index 72562f78..cac3b3c7 100644
--- a/kpovmodeler/pmtreeviewitem.cpp
+++ b/kpovmodeler/pmtreeviewitem.cpp
@@ -24,34 +24,34 @@
#include "pmfactory.h"
#include "pmtexturemap.h"
-PMTreeViewItem::PMTreeViewItem( PMObject* object, QListView* parent )
- : QListViewItem( parent )
+PMTreeViewItem::PMTreeViewItem( PMObject* object, TQListView* parent )
+ : TQListViewItem( parent )
{
m_pObject = object;
setDescriptions( );
initSelection( );
}
-PMTreeViewItem::PMTreeViewItem( PMObject* object, QListViewItem* parent )
- : QListViewItem( parent )
+PMTreeViewItem::PMTreeViewItem( PMObject* object, TQListViewItem* parent )
+ : TQListViewItem( parent )
{
m_pObject = object;
setDescriptions( );
initSelection( );
}
-PMTreeViewItem::PMTreeViewItem( PMObject* object, QListView* parent,
- QListViewItem* after )
- : QListViewItem( parent, after )
+PMTreeViewItem::PMTreeViewItem( PMObject* object, TQListView* parent,
+ TQListViewItem* after )
+ : TQListViewItem( parent, after )
{
m_pObject = object;
setDescriptions( );
initSelection( );
}
-PMTreeViewItem::PMTreeViewItem( PMObject* object, QListViewItem* parent,
- QListViewItem* after )
- : QListViewItem( parent, after )
+PMTreeViewItem::PMTreeViewItem( PMObject* object, TQListViewItem* parent,
+ TQListViewItem* after )
+ : TQListViewItem( parent, after )
{
m_pObject = object;
setDescriptions( );
@@ -60,7 +60,7 @@ PMTreeViewItem::PMTreeViewItem( PMObject* object, QListViewItem* parent,
void PMTreeViewItem::setDescriptions( )
{
- QString text;
+ TQString text;
setPixmap( 0, SmallIcon( m_pObject->pixmap( ), PMFactory::instance( ) ) );
if( m_pObject->canHaveName( ) )
@@ -78,15 +78,15 @@ void PMTreeViewItem::setDescriptions( )
{
PMTextureMapBase* tm = ( PMTextureMapBase* ) m_pObject->parent( );
if( m_pObject->type( ) == tm->mapType( ) )
- text = QString( "[%1] " ).arg( tm->mapValue( m_pObject ), 4, 'f', 2 ) + text;
+ text = TQString( "[%1] " ).arg( tm->mapValue( m_pObject ), 4, 'f', 2 ) + text;
}
}
setText( 0, text );
}
-QString PMTreeViewItem::key( int, bool ) const
+TQString PMTreeViewItem::key( int, bool ) const
{
- QString result;
+ TQString result;
if( m_pObject->parent( ) )
result.sprintf( "%06i", m_pObject->parent( )->findChild( m_pObject ) );
else
@@ -102,7 +102,7 @@ void PMTreeViewItem::setSelected( bool select )
// ignore selections during a move event
if( treeview->acceptSelect( ) )
{
- QListViewItem::setSelected( select );
+ TQListViewItem::setSelected( select );
if( ws != isSelected( ) )
treeview->itemSelected( this, isSelected( ) );
@@ -111,7 +111,7 @@ void PMTreeViewItem::setSelected( bool select )
void PMTreeViewItem::initSelection( )
{
- QListViewItem::setSelected( m_pObject->isSelected( ) );
+ TQListViewItem::setSelected( m_pObject->isSelected( ) );
// if( m_pObject->isSelected( ) )
// repaint( );
}
diff --git a/kpovmodeler/pmtreeviewitem.h b/kpovmodeler/pmtreeviewitem.h
index 499e2d16..21cd26c1 100644
--- a/kpovmodeler/pmtreeviewitem.h
+++ b/kpovmodeler/pmtreeviewitem.h
@@ -24,11 +24,11 @@
#include <config.h>
#endif
-#include <qlistview.h>
+#include <tqlistview.h>
class PMObject;
/**
- * QListViewItem for a @ref PMObject
+ * TQListViewItem for a @ref PMObject
*
* Each PMListViewItem is connected to a PMObject.
*/
@@ -36,25 +36,25 @@ class PMTreeViewItem : public QListViewItem
{
public:
/**
- * Constructs a new top-level list view item in the QListView parent.
+ * Constructs a new top-level list view item in the TQListView parent.
*/
- PMTreeViewItem( PMObject* object, QListView* parent );
+ PMTreeViewItem( PMObject* object, TQListView* parent );
/**
* Constructs a new list view item which is a child of parent and
* first in the parent's list of children.
*/
- PMTreeViewItem( PMObject* object, QListViewItem* parent );
+ PMTreeViewItem( PMObject* object, TQListViewItem* parent );
/**
* Constructs a list view item which is a child of parent
* and is after after in the parent's list of children.
*/
- PMTreeViewItem( PMObject* object, QListView* parent, QListViewItem* after );
+ PMTreeViewItem( PMObject* object, TQListView* parent, TQListViewItem* after );
/**
* Constructs a list view item which is a child of parent
* and is after after in the parent's list of children.
*/
- PMTreeViewItem( PMObject* object, QListViewItem* parent,
- QListViewItem* after );
+ PMTreeViewItem( PMObject* object, TQListViewItem* parent,
+ TQListViewItem* after );
/**
* Returns the connected @ref PMObject
*/
@@ -63,13 +63,13 @@ public:
* Returns a key that can be used for sorting, here the index in the
* parents list of children
*/
- virtual QString key( int column, bool ascending ) const;
+ virtual TQString key( int column, bool ascending ) const;
/**
* Returns a pointer to the parent item
*/
PMTreeViewItem* parent( )
{
- return ( PMTreeViewItem* ) QListViewItem::parent( );
+ return ( PMTreeViewItem* ) TQListViewItem::parent( );
}
void setSelected( bool select );
diff --git a/kpovmodeler/pmtriangle.cpp b/kpovmodeler/pmtriangle.cpp
index 3cae7e37..ecf00f8c 100644
--- a/kpovmodeler/pmtriangle.cpp
+++ b/kpovmodeler/pmtriangle.cpp
@@ -189,14 +189,14 @@ PMTriangle::~PMTriangle( )
{
}
-QString PMTriangle::description( ) const
+TQString PMTriangle::description( ) const
{
if( m_smooth )
return i18n( "smooth triangle" );
return i18n( "triangle" );
}
-void PMTriangle::serialize( QDomElement& e, QDomDocument& doc ) const
+void PMTriangle::serialize( TQDomElement& e, TQDomDocument& doc ) const
{
e.setAttribute( "point0", m_point[0].serializeXML( ) );
e.setAttribute( "point1", m_point[1].serializeXML( ) );
@@ -345,7 +345,7 @@ void PMTriangle::enableUV( bool yes )
}
}
-PMDialogEditBase* PMTriangle::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMTriangle::editWidget( TQWidget* parent ) const
{
return new PMTriangleEdit( parent );
}
diff --git a/kpovmodeler/pmtriangle.h b/kpovmodeler/pmtriangle.h
index e2309c79..e2ef3026 100644
--- a/kpovmodeler/pmtriangle.h
+++ b/kpovmodeler/pmtriangle.h
@@ -53,24 +53,24 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMTriangle( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMTriangleEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmtriangle" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmtriangle" ); }
/**
* Returns true if the triangle is a smooth triangle
diff --git a/kpovmodeler/pmtriangleedit.cpp b/kpovmodeler/pmtriangleedit.cpp
index 7b225aa8..457ddb29 100644
--- a/kpovmodeler/pmtriangleedit.cpp
+++ b/kpovmodeler/pmtriangleedit.cpp
@@ -20,14 +20,14 @@
#include "pmtriangle.h"
#include "pmvectoredit.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <kmessagebox.h>
-PMTriangleEdit::PMTriangleEdit( QWidget* parent, const char* name )
+PMTriangleEdit::PMTriangleEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -39,47 +39,47 @@ void PMTriangleEdit::createTopWidgets( )
int i;
- QHBoxLayout *hl = new QHBoxLayout( topLayout( ) );
- m_pSmooth = new QCheckBox( i18n( "Smooth" ), this );
+ TQHBoxLayout *hl = new TQHBoxLayout( topLayout( ) );
+ m_pSmooth = new TQCheckBox( i18n( "Smooth" ), this );
hl->addWidget( m_pSmooth );
- connect( m_pSmooth, SIGNAL( toggled( bool ) ),
- SLOT( slotSmoothChecked( bool ) ) );
+ connect( m_pSmooth, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotSmoothChecked( bool ) ) );
- m_pUVEnabled = new QCheckBox( i18n( "UV vectors" ), this );
+ m_pUVEnabled = new TQCheckBox( i18n( "UV vectors" ), this );
hl->addWidget( m_pUVEnabled );
- connect( m_pUVEnabled, SIGNAL( toggled( bool ) ),
- SLOT( slotUVVectorsChecked( bool ) ) );
+ connect( m_pUVEnabled, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotUVVectorsChecked( bool ) ) );
- QGridLayout* gl = new QGridLayout( topLayout( ), 9, 2 );
+ TQGridLayout* gl = new TQGridLayout( topLayout( ), 9, 2 );
for( i = 0; i < 3; i++ )
{
m_pPoint[i] = new PMVectorEdit( "x", "y", "z", this );
- gl->addWidget( new QLabel( i18n( "Point %1:" ).arg( i+1 ), this ),
+ gl->addWidget( new TQLabel( i18n( "Point %1:" ).arg( i+1 ), this ),
i * 3, 0 );
gl->addWidget( m_pPoint[i], i * 3, 1 );
- connect( m_pPoint[i], SIGNAL( dataChanged( ) ),
- SIGNAL( dataChanged( ) ) );
+ connect( m_pPoint[i], TQT_SIGNAL( dataChanged( ) ),
+ TQT_SIGNAL( dataChanged( ) ) );
m_pNormal[i] = new PMVectorEdit( "x", "y", "z", this );
- m_pNormalLabel[i] = new QLabel( i18n( "Normal %1:" ).arg( i+1 ), this );
+ m_pNormalLabel[i] = new TQLabel( i18n( "Normal %1:" ).arg( i+1 ), this );
gl->addWidget( m_pNormalLabel[i], i * 3 + 1, 0 );
gl->addWidget( m_pNormal[i], i * 3 + 1, 1 );
- connect( m_pNormal[i], SIGNAL( dataChanged( ) ),
- SIGNAL( dataChanged( ) ) );
+ connect( m_pNormal[i], TQT_SIGNAL( dataChanged( ) ),
+ TQT_SIGNAL( dataChanged( ) ) );
m_pUVVector[i] = new PMVectorEdit( "u", "v", this );
- m_pUVVectorLabel[i] = new QLabel( i18n( "UV vector %1:" ).arg( i+1 ), this );
+ m_pUVVectorLabel[i] = new TQLabel( i18n( "UV vector %1:" ).arg( i+1 ), this );
gl->addWidget( m_pUVVectorLabel[i], i * 3 + 2, 0 );
gl->addWidget( m_pUVVector[i], i * 3 + 2, 1 );
- connect( m_pUVVector[i], SIGNAL( dataChanged( ) ),
- SIGNAL( dataChanged( ) ) );
+ connect( m_pUVVector[i], TQT_SIGNAL( dataChanged( ) ),
+ TQT_SIGNAL( dataChanged( ) ) );
}
- hl = new QHBoxLayout( topLayout( ) );
- m_pMirror = new QPushButton( i18n( "Invert Normal Vectors" ), this );
+ hl = new TQHBoxLayout( topLayout( ) );
+ m_pMirror = new TQPushButton( i18n( "Invert Normal Vectors" ), this );
hl->addWidget( m_pMirror );
hl->addStretch( 1 );
- connect( m_pMirror, SIGNAL( clicked( ) ), SLOT( slotInvertNormals( ) ) );
+ connect( m_pMirror, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotInvertNormals( ) ) );
}
void PMTriangleEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmtriangleedit.h b/kpovmodeler/pmtriangleedit.h
index 821ad68d..aff323ad 100644
--- a/kpovmodeler/pmtriangleedit.h
+++ b/kpovmodeler/pmtriangleedit.h
@@ -28,9 +28,9 @@
class PMTriangle;
class PMVectorEdit;
-class QCheckBox;
-class QLabel;
-class QPushButton;
+class TQCheckBox;
+class TQLabel;
+class TQPushButton;
/**
* Dialog edit class for @ref PMTriangle
@@ -43,7 +43,7 @@ public:
/**
* Creates a PMTriangleEdit with parent and name
*/
- PMTriangleEdit( QWidget* parent, const char* name = 0 );
+ PMTriangleEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -65,12 +65,12 @@ private:
PMTriangle* m_pDisplayedObject;
PMVectorEdit* m_pPoint[3];
PMVectorEdit* m_pNormal[3];
- QLabel* m_pNormalLabel[3];
- QCheckBox* m_pSmooth;
- QLabel* m_pUVVectorLabel[3];
+ TQLabel* m_pNormalLabel[3];
+ TQCheckBox* m_pSmooth;
+ TQLabel* m_pUVVectorLabel[3];
PMVectorEdit* m_pUVVector[3];
- QCheckBox* m_pUVEnabled;
- QPushButton* m_pMirror;
+ TQCheckBox* m_pUVEnabled;
+ TQPushButton* m_pMirror;
};
diff --git a/kpovmodeler/pmtruetypecache.cpp b/kpovmodeler/pmtruetypecache.cpp
index 9aa28d89..f685001a 100644
--- a/kpovmodeler/pmtruetypecache.cpp
+++ b/kpovmodeler/pmtruetypecache.cpp
@@ -50,7 +50,7 @@ PMTrueTypeCache::~PMTrueTypeCache( )
FT_Done_FreeType( m_library );
}
-PMTrueTypeFont* PMTrueTypeCache::lookUp( const QString& file )
+PMTrueTypeFont* PMTrueTypeCache::lookUp( const TQString& file )
{
if( !m_library )
return 0;
@@ -81,7 +81,7 @@ PMTrueTypeFont* PMTrueTypeCache::lookUp( const QString& file )
return 0;
}
-PMTrueTypeFont* PMTrueTypeCache::font( const QString& file )
+PMTrueTypeFont* PMTrueTypeCache::font( const TQString& file )
{
if( !s_pInstance )
s_staticDeleter.setObject( s_pInstance, new PMTrueTypeCache( ) );
@@ -144,13 +144,13 @@ bool PMTrueTypeFont::isValid( )
return m_valid;
}
-PMTrueTypeOutline* PMTrueTypeFont::outline( QChar c )
+PMTrueTypeOutline* PMTrueTypeFont::outline( TQChar c )
{
PMTrueTypeOutline* ol = 0;
if( isValid( ) )
{
- QString str( c );
+ TQString str( c );
ol = m_cache.find( str );
if( !ol )
{
@@ -193,7 +193,7 @@ PMTrueTypeOutline* PMTrueTypeFont::outline( QChar c )
return ol;
}
-double PMTrueTypeFont::kerning( QChar c1, QChar c2 )
+double PMTrueTypeFont::kerning( TQChar c1, TQChar c2 )
{
double k = 0.0;
if( m_useKerning && !c1.isNull( ) && !c2.isNull( ) )
@@ -211,7 +211,7 @@ double PMTrueTypeFont::kerning( QChar c1, QChar c2 )
return k;
}
-FT_UInt PMTrueTypeFont::findGlyphIndex( QChar c )
+FT_UInt PMTrueTypeFont::findGlyphIndex( TQChar c )
{
FT_UInt glyphIndex = 0;
@@ -368,7 +368,7 @@ PMTrueTypeCache::PMTrueTypeCache( )
{
}
-PMTrueTypeFont* PMTrueTypeCache::font( const QString& )
+PMTrueTypeFont* PMTrueTypeCache::font( const TQString& )
{
return 0;
}
@@ -382,12 +382,12 @@ bool PMTrueTypeFont::isValid( )
return false;
}
-PMTrueTypeOutline* PMTrueTypeFont::outline( QChar )
+PMTrueTypeOutline* PMTrueTypeFont::outline( TQChar )
{
return 0;
}
-double PMTrueTypeFont::kerning( QChar, QChar )
+double PMTrueTypeFont::kerning( TQChar, TQChar )
{
return 0;
}
diff --git a/kpovmodeler/pmtruetypecache.h b/kpovmodeler/pmtruetypecache.h
index b305cb1c..342597b0 100644
--- a/kpovmodeler/pmtruetypecache.h
+++ b/kpovmodeler/pmtruetypecache.h
@@ -25,7 +25,7 @@
#include "pmsplinesegment.h"
-#include <qcache.h>
+#include <tqcache.h>
#include <kstaticdeleter.h>
#ifdef HAVE_FREETYPE
@@ -49,7 +49,7 @@ public:
*
* Returns 0 if freetype is not available.
*/
- static PMTrueTypeFont* font( const QString& file );
+ static PMTrueTypeFont* font( const TQString& file );
#ifdef HAVE_FREETYPE
@@ -65,9 +65,9 @@ private:
/**
* Lookup function
*/
- PMTrueTypeFont* lookUp( const QString& file );
+ PMTrueTypeFont* lookUp( const TQString& file );
- QCache<PMTrueTypeFont> m_cache;
+ TQCache<PMTrueTypeFont> m_cache;
FT_Library m_library;
#endif //HAVE_FREETYPE
@@ -142,7 +142,7 @@ public:
* Returns 0 if there is no glyph for the character or the font is
* not a valid, scalable true type font.
*/
- PMTrueTypeOutline* outline( QChar c );
+ PMTrueTypeOutline* outline( TQChar c );
/**
* Returns true if the font is a valid, scalable true type font
*/
@@ -150,7 +150,7 @@ public:
/**
* Returns the kerning offset for the two characters
*/
- double kerning( QChar c1, QChar c2 );
+ double kerning( TQChar c1, TQChar c2 );
#ifdef HAVE_FREETYPE
@@ -165,7 +165,7 @@ public:
~PMTrueTypeFont( );
private:
- FT_UInt findGlyphIndex( QChar c );
+ FT_UInt findGlyphIndex( TQChar c );
FT_Library m_library;
FT_Face m_face;
@@ -174,7 +174,7 @@ private:
bool m_validChecked;
bool m_useKerning;
- QCache<PMTrueTypeOutline> m_cache;
+ TQCache<PMTrueTypeOutline> m_cache;
#else //!HAVE_FREETYPE
diff --git a/kpovmodeler/pmunknownview.cpp b/kpovmodeler/pmunknownview.cpp
index b6067c02..e1660d02 100644
--- a/kpovmodeler/pmunknownview.cpp
+++ b/kpovmodeler/pmunknownview.cpp
@@ -17,21 +17,21 @@
#include "pmunknownview.h"
#include <klocale.h>
-#include <qlayout.h>
+#include <tqlayout.h>
-PMUnknownView::PMUnknownView( const QString& viewType,
- QWidget* parent, const char* name )
+PMUnknownView::PMUnknownView( const TQString& viewType,
+ TQWidget* parent, const char* name )
: PMViewBase( parent, name )
{
- QHBoxLayout* hl = new QHBoxLayout( this );
- QLabel* l;
- l = new QLabel( i18n( "Unknown view type \"%1\"" ).arg( viewType ), this );
+ TQHBoxLayout* hl = new TQHBoxLayout( this );
+ TQLabel* l;
+ l = new TQLabel( i18n( "Unknown view type \"%1\"" ).arg( viewType ), this );
l->setAlignment( Qt::AlignCenter );
hl->addWidget( l );
m_viewType = viewType;
}
-QString PMUnknownView::description( ) const
+TQString PMUnknownView::description( ) const
{
return i18n( "Unknown" );
}
diff --git a/kpovmodeler/pmunknownview.h b/kpovmodeler/pmunknownview.h
index b8921dd6..dbb5d042 100644
--- a/kpovmodeler/pmunknownview.h
+++ b/kpovmodeler/pmunknownview.h
@@ -22,7 +22,7 @@
#include <config.h>
#endif
-#include <qlabel.h>
+#include <tqlabel.h>
#include "pmviewbase.h"
/**
@@ -34,14 +34,14 @@ public:
/**
* Default constructor
*/
- PMUnknownView( const QString& viewType, QWidget* parent,
+ PMUnknownView( const TQString& viewType, TQWidget* parent,
const char* name = 0 );
/** */
- virtual QString viewType( ) const { return m_viewType; }
+ virtual TQString viewType( ) const { return m_viewType; }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
private:
- QString m_viewType;
+ TQString m_viewType;
};
#endif
diff --git a/kpovmodeler/pmvariant.cpp b/kpovmodeler/pmvariant.cpp
index d6b5384c..fb2175c7 100644
--- a/kpovmodeler/pmvariant.cpp
+++ b/kpovmodeler/pmvariant.cpp
@@ -17,7 +17,7 @@
#include "pmvariant.h"
-#include <qstring.h>
+#include <tqstring.h>
#include "pmcolor.h"
#include "pmvector.h"
#include "pmdebug.h"
@@ -62,10 +62,10 @@ PMVariant::PMVariant( PMThreeState data )
}
-PMVariant::PMVariant( const QString& data )
+PMVariant::PMVariant( const TQString& data )
{
m_dataType = PMVariant::String;
- m_pData = new QString( data );
+ m_pData = new TQString( data );
}
PMVariant::PMVariant( const PMVector& data )
@@ -109,7 +109,7 @@ PMVariant::PMVariant( const PMVariant& v )
setThreeState( *( ( PMThreeState* ) v.m_pData ) );
break;
case PMVariant::String:
- setString( *( ( QString* ) v.m_pData ) );
+ setString( *( ( TQString* ) v.m_pData ) );
break;
case PMVariant::Vector:
setVector( *( ( PMVector* ) v.m_pData ) );
@@ -145,7 +145,7 @@ PMVariant& PMVariant::operator= ( const PMVariant& v )
setThreeState( *( ( PMThreeState* ) v.m_pData ) );
break;
case PMVariant::String:
- setString( *( ( QString* ) v.m_pData ) );
+ setString( *( ( TQString* ) v.m_pData ) );
break;
case PMVariant::Vector:
setVector( *( ( PMVector* ) v.m_pData ) );
@@ -188,7 +188,7 @@ void PMVariant::clear( )
delete( ( PMThreeState* ) m_pData );
break;
case PMVariant::String:
- delete( ( QString* ) m_pData );
+ delete( ( TQString* ) m_pData );
break;
case PMVariant::Vector:
delete( ( PMVector* ) m_pData );
@@ -267,16 +267,16 @@ void PMVariant::setThreeState( const PMThreeState data )
*( ( PMThreeState* ) m_pData ) = data;
}
-void PMVariant::setString( const QString& data )
+void PMVariant::setString( const TQString& data )
{
if( m_dataType != PMVariant::String )
{
clear( );
- m_pData = new QString( data );
+ m_pData = new TQString( data );
m_dataType = PMVariant::String;
}
else
- *( ( QString* ) m_pData ) = data;
+ *( ( TQString* ) m_pData ) = data;
}
void PMVariant::setVector( const PMVector& data )
@@ -355,12 +355,12 @@ PMThreeState PMVariant::threeStateData( ) const
return PMUnspecified;
}
-QString PMVariant::stringData( ) const
+TQString PMVariant::stringData( ) const
{
if( m_dataType == PMVariant::String )
- return *( ( QString* ) m_pData );
+ return *( ( TQString* ) m_pData );
kdError( PMArea ) << "Wrong type in PMVariant get function\n";
- return QString::null;
+ return TQString::null;
}
PMVector PMVariant::vectorData( ) const
@@ -415,7 +415,7 @@ bool PMVariant::convertTo( PMVariant::PMVariantDataType t )
break;
case PMVariant::String:
{
- QString tmp;
+ TQString tmp;
tmp.setNum( data );
setString( tmp );
break;
@@ -458,7 +458,7 @@ bool PMVariant::convertTo( PMVariant::PMVariantDataType t )
break;
case PMVariant::String:
{
- QString tmp;
+ TQString tmp;
tmp.setNum( data );
setString( tmp );
break;
@@ -501,7 +501,7 @@ bool PMVariant::convertTo( PMVariant::PMVariantDataType t )
break;
case PMVariant::String:
{
- QString tmp;
+ TQString tmp;
tmp.setNum( data );
setString( tmp );
break;
@@ -547,9 +547,9 @@ bool PMVariant::convertTo( PMVariant::PMVariantDataType t )
break;
case PMVariant::String:
if( data )
- setString( QString( "true" ) );
+ setString( TQString( "true" ) );
else
- setString( QString( "false" ) );
+ setString( TQString( "false" ) );
break;
case PMVariant::Vector:
success = false;
@@ -594,11 +594,11 @@ bool PMVariant::convertTo( PMVariant::PMVariantDataType t )
break;
case PMVariant::String:
if( data == PMTrue )
- setString( QString( "true" ) );
+ setString( TQString( "true" ) );
else if( data == PMFalse )
- setString( QString( "false" ) );
+ setString( TQString( "false" ) );
else
- setString( QString( "unspecified" ) );
+ setString( TQString( "unspecified" ) );
break;
case PMVariant::Vector:
success = false;
@@ -618,7 +618,7 @@ bool PMVariant::convertTo( PMVariant::PMVariantDataType t )
case PMVariant::String:
{
- QString data = *( ( QString* ) m_pData );
+ TQString data = *( ( TQString* ) m_pData );
switch( t )
{
@@ -738,9 +738,9 @@ bool PMVariant::convertTo( PMVariant::PMVariantDataType t )
return success;
}
-QString PMVariant::asString( ) const
+TQString PMVariant::asString( ) const
{
- QString tmp;
+ TQString tmp;
switch( m_dataType )
{
@@ -789,7 +789,7 @@ QString PMVariant::asString( ) const
}
case PMVariant::String:
{
- tmp = *( ( QString* ) m_pData );
+ tmp = *( ( TQString* ) m_pData );
break;
}
case PMVariant::Vector:
@@ -822,7 +822,7 @@ QString PMVariant::asString( ) const
return tmp;
}
-bool PMVariant::fromString( const PMVariant::PMVariantDataType t, const QString& value )
+bool PMVariant::fromString( const PMVariant::PMVariantDataType t, const TQString& value )
{
bool success;
@@ -895,7 +895,7 @@ bool PMVariant::fromString( const PMVariant::PMVariantDataType t, const QString&
return success;
}
-QDataStream& operator<<( QDataStream& stream, const PMVariant& value )
+TQDataStream& operator<<( TQDataStream& stream, const PMVariant& value )
{
stream << (Q_INT8)value.dataType( );
stream << value.asString( );
@@ -903,11 +903,11 @@ QDataStream& operator<<( QDataStream& stream, const PMVariant& value )
return stream;
}
-QDataStream& operator>>( QDataStream& stream, PMVariant& value )
+TQDataStream& operator>>( TQDataStream& stream, PMVariant& value )
{
Q_INT8 type;
PMVariant::PMVariantDataType dataType;
- QString str;
+ TQString str;
stream >> type;
dataType = (PMVariant::PMVariantDataType)type;
diff --git a/kpovmodeler/pmvariant.h b/kpovmodeler/pmvariant.h
index 01519a01..e6bcdee9 100644
--- a/kpovmodeler/pmvariant.h
+++ b/kpovmodeler/pmvariant.h
@@ -19,7 +19,7 @@
#ifndef PMVARIANT_H
#define PMVARIANT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "pmcolor.h"
#include "pmvector.h"
#include "pmthreestate.h"
@@ -30,9 +30,9 @@ class PMObject;
* Variant class for KPovModeler.
*
* Can store and convert: int, unsigned int, double, bool,
- * PMThreeState, QString, PMVector, PMColor, PMObject*.
+ * PMThreeState, TQString, PMVector, PMColor, PMObject*.
*
- * Enums are stored as QString.
+ * Enums are stored as TQString.
*
* The variant can store one type at a time. You can try to convert
* the type with the convertTo* methods. These will return bool on success.
@@ -76,7 +76,7 @@ public:
/**
* Stores a string
*/
- PMVariant( const QString& data );
+ PMVariant( const TQString& data );
/**
* Stores a @ref PMVector
*/
@@ -131,7 +131,7 @@ public:
/**
* Sets the string data
*/
- void setString( const QString& data );
+ void setString( const TQString& data );
/**
* Sets the vector data
*/
@@ -168,7 +168,7 @@ public:
/**
* Returns the string data. Data type has to be String!
*/
- QString stringData( ) const;
+ TQString stringData( ) const;
/**
* Returns the vector data. Data type has to be Vector!
*/
@@ -195,11 +195,11 @@ public:
/**
* Returns the value of the stored data in string format
*/
- QString asString( ) const;
+ TQString asString( ) const;
/**
* Sets the value of the variant based on the string
*/
- bool fromString( const PMVariant::PMVariantDataType t, const QString& value );
+ bool fromString( const PMVariant::PMVariantDataType t, const TQString& value );
private:
void clear( );
@@ -214,8 +214,8 @@ private:
};
// Streaming operators for PMVariant
-QDataStream& operator<<( QDataStream& stream, const PMVariant& value );
-QDataStream& operator>>( QDataStream& stream, PMVariant& value );
+TQDataStream& operator<<( TQDataStream& stream, const PMVariant& value );
+TQDataStream& operator>>( TQDataStream& stream, PMVariant& value );
#endif
diff --git a/kpovmodeler/pmvector.cpp b/kpovmodeler/pmvector.cpp
index 035f0d2b..13ba6ba4 100644
--- a/kpovmodeler/pmvector.cpp
+++ b/kpovmodeler/pmvector.cpp
@@ -21,7 +21,7 @@
#include "pmmatrix.h"
#include "pmdebug.h"
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <stdio.h>
#include <stdlib.h>
@@ -528,10 +528,10 @@ PMVector PMVector::orthogonal( ) const
return result / rl;
}
-QString PMVector::serialize( ) const
+TQString PMVector::serialize( ) const
{
- QString result;
- QTextStream str( &result, IO_WriteOnly );
+ TQString result;
+ TQTextStream str( &result, IO_WriteOnly );
unsigned int i;
if( m_size > 0 )
@@ -551,10 +551,10 @@ QString PMVector::serialize( ) const
return result;
}
-QString PMVector::serializeXML( ) const
+TQString PMVector::serializeXML( ) const
{
- QString result;
- QTextStream str( &result, IO_WriteOnly );
+ TQString result;
+ TQTextStream str( &result, IO_WriteOnly );
unsigned int i;
if( m_size > 0 )
@@ -572,13 +572,13 @@ QString PMVector::serializeXML( ) const
return result;
}
-bool PMVector::loadXML( const QString& str )
+bool PMVector::loadXML( const TQString& str )
{
int i;
int size = str.contains( ' ' ) + 1;
- QString tmp( str );
- QTextStream s( &tmp, IO_ReadOnly );
- QString val;
+ TQString tmp( str );
+ TQTextStream s( &tmp, IO_ReadOnly );
+ TQString val;
bool ok;
resize( size );
diff --git a/kpovmodeler/pmvector.h b/kpovmodeler/pmvector.h
index 6794d02a..f5e885a5 100644
--- a/kpovmodeler/pmvector.h
+++ b/kpovmodeler/pmvector.h
@@ -20,8 +20,8 @@
#ifndef PMVECTOR_H
#define PMVECTOR_H
-#include <qmemarray.h>
-#include <qstring.h>
+#include <tqmemarray.h>
+#include <tqstring.h>
class PMMatrix;
@@ -255,15 +255,15 @@ public:
/**
* Returns a string for serialization
*/
- QString serialize( ) const;
+ TQString serialize( ) const;
/**
* Returns a string for xml output
*/
- QString serializeXML( ) const;
+ TQString serializeXML( ) const;
/**
* loads the vector data from the xml string
*/
- bool loadXML( const QString& str );
+ bool loadXML( const TQString& str );
private:
void allocateMemory( unsigned int size );
diff --git a/kpovmodeler/pmvectorcontrolpoint.cpp b/kpovmodeler/pmvectorcontrolpoint.cpp
index 0a14d0b8..fe7b0fe2 100644
--- a/kpovmodeler/pmvectorcontrolpoint.cpp
+++ b/kpovmodeler/pmvectorcontrolpoint.cpp
@@ -21,7 +21,7 @@
PMVectorControlPoint::PMVectorControlPoint( PMControlPoint* base,
const PMVector& v, int id,
- const QString& description,
+ const TQString& description,
bool extraLine, bool normalize )
: PMControlPoint( id, description )
{
@@ -33,7 +33,7 @@ PMVectorControlPoint::PMVectorControlPoint( PMControlPoint* base,
PMVectorControlPoint::PMVectorControlPoint( const PMVector& base,
const PMVector& v, int id,
- const QString& description,
+ const TQString& description,
bool extraLine, bool normalize )
: PMControlPoint( id, description )
{
diff --git a/kpovmodeler/pmvectorcontrolpoint.h b/kpovmodeler/pmvectorcontrolpoint.h
index 92713bc6..1aca3088 100644
--- a/kpovmodeler/pmvectorcontrolpoint.h
+++ b/kpovmodeler/pmvectorcontrolpoint.h
@@ -38,7 +38,7 @@ public:
* The base point of the vector is given by the control point location.
*/
PMVectorControlPoint( PMControlPoint* location, const PMVector& v,
- int id, const QString& description,
+ int id, const TQString& description,
bool extraLine = true, bool normalize = false );
/**
* Creates a PMVectorControlPoint with id.
@@ -46,7 +46,7 @@ public:
* The base point of the vector is given by the vector p.
*/
PMVectorControlPoint( const PMVector& location, const PMVector& v,
- int id, const QString& description,
+ int id, const TQString& description,
bool extraLine = true, bool normalize = false );
/**
* Deletes the PMVectorControlPoint
diff --git a/kpovmodeler/pmvectoredit.cpp b/kpovmodeler/pmvectoredit.cpp
index 7264f8f3..7b9b6568 100644
--- a/kpovmodeler/pmvectoredit.cpp
+++ b/kpovmodeler/pmvectoredit.cpp
@@ -18,36 +18,36 @@
#include "pmvectoredit.h"
#include "pmdebug.h"
-#include <qstring.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqstring.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kdialog.h>
#include <kmessagebox.h>
#include <klocale.h>
-PMVectorEdit::PMVectorEdit( const QString& descriptionX,
- const QString& descriptionY,
- QWidget* parent, const char* name )
- : QWidget( parent, name )
+PMVectorEdit::PMVectorEdit( const TQString& descriptionX,
+ const TQString& descriptionY,
+ TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
unsigned int i;
- QHBoxLayout* layout;
- QLabel* label;
+ TQHBoxLayout* layout;
+ TQLabel* label;
m_edits.resize( 2 );
for( i = 0; i < 2; i++ )
{
- m_edits.insert( i, new QLineEdit( this ) );
- connect( m_edits[i], SIGNAL( textChanged( const QString& ) ),
- SLOT( slotTextChanged( const QString& ) ) );
+ m_edits.insert( i, new TQLineEdit( this ) );
+ connect( m_edits[i], TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotTextChanged( const TQString& ) ) );
}
- layout = new QHBoxLayout( this );
+ layout = new TQHBoxLayout( this );
if( !descriptionX.isEmpty( ) )
{
- label = new QLabel( descriptionX, this );
+ label = new TQLabel( descriptionX, this );
layout->addWidget( label );
layout->addSpacing( KDialog::spacingHint( ) );
}
@@ -56,36 +56,36 @@ PMVectorEdit::PMVectorEdit( const QString& descriptionX,
if( !descriptionY.isEmpty( ) )
{
- label = new QLabel( descriptionY, this );
+ label = new TQLabel( descriptionY, this );
layout->addWidget( label );
layout->addSpacing( KDialog::spacingHint( ) );
}
layout->addWidget( m_edits[1] );
}
-PMVectorEdit::PMVectorEdit( const QString& descriptionX,
- const QString& descriptionY,
- const QString& descriptionZ,
- QWidget* parent, const char* name )
- : QWidget( parent, name )
+PMVectorEdit::PMVectorEdit( const TQString& descriptionX,
+ const TQString& descriptionY,
+ const TQString& descriptionZ,
+ TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
unsigned int i;
- QHBoxLayout* layout;
- QLabel* label;
+ TQHBoxLayout* layout;
+ TQLabel* label;
m_edits.resize( 3 );
for( i = 0; i < 3; i++ )
{
- m_edits.insert( i, new QLineEdit( this ) );
- connect( m_edits[i], SIGNAL( textChanged( const QString& ) ),
- SLOT( slotTextChanged( const QString& ) ) );
+ m_edits.insert( i, new TQLineEdit( this ) );
+ connect( m_edits[i], TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotTextChanged( const TQString& ) ) );
}
- layout = new QHBoxLayout( this );
+ layout = new TQHBoxLayout( this );
if( !descriptionX.isEmpty( ) )
{
- label = new QLabel( descriptionX, this );
+ label = new TQLabel( descriptionX, this );
layout->addWidget( label );
layout->addSpacing( KDialog::spacingHint( ) );
}
@@ -94,7 +94,7 @@ PMVectorEdit::PMVectorEdit( const QString& descriptionX,
if( !descriptionY.isEmpty( ) )
{
- label = new QLabel( descriptionY, this );
+ label = new TQLabel( descriptionY, this );
layout->addWidget( label );
layout->addSpacing( KDialog::spacingHint( ) );
}
@@ -103,37 +103,37 @@ PMVectorEdit::PMVectorEdit( const QString& descriptionX,
if( !descriptionZ.isEmpty( ) )
{
- label = new QLabel( descriptionZ, this );
+ label = new TQLabel( descriptionZ, this );
layout->addWidget( label );
layout->addSpacing( KDialog::spacingHint( ) );
}
layout->addWidget( m_edits[2] );
}
-PMVectorEdit::PMVectorEdit( const QString& descriptionA,
- const QString& descriptionB,
- const QString& descriptionC,
- const QString& descriptionD,
- QWidget* parent, const char* name )
- : QWidget( parent, name )
+PMVectorEdit::PMVectorEdit( const TQString& descriptionA,
+ const TQString& descriptionB,
+ const TQString& descriptionC,
+ const TQString& descriptionD,
+ TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
unsigned int i;
- QHBoxLayout* layout;
- QLabel* label;
+ TQHBoxLayout* layout;
+ TQLabel* label;
m_edits.resize( 4 );
for( i = 0; i < 4; i++ )
{
- m_edits.insert( i, new QLineEdit( this ) );
- connect( m_edits[i], SIGNAL( textChanged( const QString& ) ),
- SLOT( slotTextChanged( const QString& ) ) );
+ m_edits.insert( i, new TQLineEdit( this ) );
+ connect( m_edits[i], TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotTextChanged( const TQString& ) ) );
}
- layout = new QHBoxLayout( this );
+ layout = new TQHBoxLayout( this );
if( !descriptionA.isEmpty( ) )
{
- label = new QLabel( descriptionA, this );
+ label = new TQLabel( descriptionA, this );
layout->addWidget( label );
layout->addSpacing( KDialog::spacingHint( ) );
}
@@ -142,7 +142,7 @@ PMVectorEdit::PMVectorEdit( const QString& descriptionA,
if( !descriptionB.isEmpty( ) )
{
- label = new QLabel( descriptionB, this );
+ label = new TQLabel( descriptionB, this );
layout->addWidget( label );
layout->addSpacing( KDialog::spacingHint( ) );
}
@@ -151,7 +151,7 @@ PMVectorEdit::PMVectorEdit( const QString& descriptionA,
if( !descriptionC.isEmpty( ) )
{
- label = new QLabel( descriptionC, this );
+ label = new TQLabel( descriptionC, this );
layout->addWidget( label );
layout->addSpacing( KDialog::spacingHint( ) );
}
@@ -160,7 +160,7 @@ PMVectorEdit::PMVectorEdit( const QString& descriptionA,
if( !descriptionD.isEmpty( ) )
{
- label = new QLabel( descriptionD, this );
+ label = new TQLabel( descriptionD, this );
layout->addWidget( label );
layout->addSpacing( KDialog::spacingHint( ) );
}
@@ -170,7 +170,7 @@ PMVectorEdit::PMVectorEdit( const QString& descriptionA,
void PMVectorEdit::setVector( const PMVector& v, int precision )
{
unsigned int i;
- QString str;
+ TQString str;
if( v.size( ) != m_edits.size( ) )
kdError( PMArea ) << "Vector has wrong size in PMVectorEdit::setVector\n";
@@ -213,7 +213,7 @@ bool PMVectorEdit::isDataValid( )
return ok;
}
-void PMVectorEdit::slotTextChanged( const QString& )
+void PMVectorEdit::slotTextChanged( const TQString& )
{
emit dataChanged( );
}
diff --git a/kpovmodeler/pmvectoredit.h b/kpovmodeler/pmvectoredit.h
index 8be64ebe..be94977d 100644
--- a/kpovmodeler/pmvectoredit.h
+++ b/kpovmodeler/pmvectoredit.h
@@ -24,9 +24,9 @@
#include <config.h>
#endif
-#include <qwidget.h>
-#include <qptrvector.h>
-#include <qlineedit.h>
+#include <tqwidget.h>
+#include <tqptrvector.h>
+#include <tqlineedit.h>
#include "pmvector.h"
/**
@@ -41,26 +41,26 @@ public:
*
* The labels shown are descriptionX and descriptionY
*/
- PMVectorEdit( const QString& descriptionX,
- const QString& descriptionY,
- QWidget* parent, const char* name = 0 );
+ PMVectorEdit( const TQString& descriptionX,
+ const TQString& descriptionY,
+ TQWidget* parent, const char* name = 0 );
/**
* Creates an edit widget for 3D vectors.
*
* The labels shown are descriptionX, descriptionY and descriptionZ
*/
- PMVectorEdit( const QString& descriptionX,
- const QString& descriptionY, const QString& descriptionZ,
- QWidget* parent, const char* name = 0 );
+ PMVectorEdit( const TQString& descriptionX,
+ const TQString& descriptionY, const TQString& descriptionZ,
+ TQWidget* parent, const char* name = 0 );
/**
* Creates an edit widget for 4D vectors.
*
* The labels shown are descriptionA, descriptionB, descriptionC
* and description D
*/
- PMVectorEdit( const QString& descriptionA, const QString& descriptionB,
- const QString& descriptionC, const QString& descriptionD,
- QWidget* parent, const char* name = 0 );
+ PMVectorEdit( const TQString& descriptionA, const TQString& descriptionB,
+ const TQString& descriptionC, const TQString& descriptionD,
+ TQWidget* parent, const char* name = 0 );
/**
* Sets the displayed vector
@@ -92,9 +92,9 @@ signals:
void dataChanged( );
protected slots:
- void slotTextChanged( const QString& );
+ void slotTextChanged( const TQString& );
private:
- QPtrVector<QLineEdit> m_edits;
+ TQPtrVector<TQLineEdit> m_edits;
};
#endif
diff --git a/kpovmodeler/pmvectorlistedit.cpp b/kpovmodeler/pmvectorlistedit.cpp
index 224c6b69..bf8f74ad 100644
--- a/kpovmodeler/pmvectorlistedit.cpp
+++ b/kpovmodeler/pmvectorlistedit.cpp
@@ -18,10 +18,10 @@
#include "pmvectorlistedit.h"
#include "pmdebug.h"
-#include <qheader.h>
-#include <qapplication.h>
-#include <qpalette.h>
-#include <qpainter.h>
+#include <tqheader.h>
+#include <tqapplication.h>
+#include <tqpalette.h>
+#include <tqpainter.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -29,19 +29,19 @@ const int c_columnWidth = 65;
/*
-PMTableItem::PMTableItem( QTable* table )
- : QTableItem( table, QTableItem::OnTyping, QString( "" ) )
+PMTableItem::PMTableItem( TQTable* table )
+ : TQTableItem( table, TQTableItem::OnTyping, TQString( "" ) )
{
m_readOnly = false;
}
-void PMTableItem::paint( QPainter* p, const QColorGroup& cg,
- const QRect& cr, bool selected )
+void PMTableItem::paint( TQPainter* p, const TQColorGroup& cg,
+ const TQRect& cr, bool selected )
{
p->fillRect( 0, 0, cr.width( ), cr.height( ),
- selected ? cg.brush( QColorGroup::Highlight )
- : ( m_readOnly ? cg.brush( QColorGroup::Background ) :
- cg.brush( QColorGroup::Base ) ) );
+ selected ? cg.brush( TQColorGroup::Highlight )
+ : ( m_readOnly ? cg.brush( TQColorGroup::Background ) :
+ cg.brush( TQColorGroup::Base ) ) );
int w = cr.width( );
int h = cr.height( );
@@ -57,51 +57,51 @@ void PMTableItem::paint( QPainter* p, const QColorGroup& cg,
}
*/
-PMVectorListEdit::PMVectorListEdit( QWidget* parent, const char* name )
- : QTable( 1, 3, parent, name )
+PMVectorListEdit::PMVectorListEdit( TQWidget* parent, const char* name )
+ : TQTable( 1, 3, parent, name )
{
init( 3 );
- QHeader* header = horizontalHeader( );
+ TQHeader* header = horizontalHeader( );
header->setLabel( 0, "x" );
header->setLabel( 1, "y" );
header->setLabel( 2, "z" );
}
-PMVectorListEdit::PMVectorListEdit( const QString& c1, const QString& c2,
- const QString& c3, const QString& c4,
- QWidget* parent, const char* name )
- : QTable( 1, 4, parent, name )
+PMVectorListEdit::PMVectorListEdit( const TQString& c1, const TQString& c2,
+ const TQString& c3, const TQString& c4,
+ TQWidget* parent, const char* name )
+ : TQTable( 1, 4, parent, name )
{
init( 4 );
- QHeader* header = horizontalHeader( );
+ TQHeader* header = horizontalHeader( );
header->setLabel( 0, c1 );
header->setLabel( 1, c2 );
header->setLabel( 2, c3 );
header->setLabel( 3, c4 );
}
-PMVectorListEdit::PMVectorListEdit( const QString& c1, const QString& c2,
- const QString& c3, QWidget* parent,
+PMVectorListEdit::PMVectorListEdit( const TQString& c1, const TQString& c2,
+ const TQString& c3, TQWidget* parent,
const char* name )
- : QTable( 1, 3, parent, name )
+ : TQTable( 1, 3, parent, name )
{
init( 3 );
- QHeader* header = horizontalHeader( );
+ TQHeader* header = horizontalHeader( );
header->setLabel( 0, c1 );
header->setLabel( 1, c2 );
header->setLabel( 2, c3 );
}
-PMVectorListEdit::PMVectorListEdit( const QString& c1, const QString& c2,
- QWidget* parent, const char* name )
- : QTable( 1, 2, parent, name )
+PMVectorListEdit::PMVectorListEdit( const TQString& c1, const TQString& c2,
+ TQWidget* parent, const char* name )
+ : TQTable( 1, 2, parent, name )
{
init( 2 );
- QHeader* header = horizontalHeader( );
+ TQHeader* header = horizontalHeader( );
header->setLabel( 0, c1 );
header->setLabel( 1, c2 );
}
@@ -116,18 +116,18 @@ void PMVectorListEdit::init( int dimensions )
horizontalHeader( )->setResizeEnabled( false );
verticalHeader( )->setResizeEnabled( false );
- setSelectionMode( QTable::MultiRow );
+ setSelectionMode( TQTable::MultiRow );
for( i = 0; i < m_dimension; ++i )
setColumnStretchable( i, true );
- connect( this, SIGNAL( valueChanged( int, int ) ),
- SLOT( slotTextChanged( int, int ) ) );
- setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) );
+ connect( this, TQT_SIGNAL( valueChanged( int, int ) ),
+ TQT_SLOT( slotTextChanged( int, int ) ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) );
}
-void PMVectorListEdit::setVectors( const QValueList<PMVector>& l,
+void PMVectorListEdit::setVectors( const TQValueList<PMVector>& l,
bool resize, int prec )
{
- QValueList<PMVector>::ConstIterator it;
+ TQValueList<PMVector>::ConstIterator it;
int r, nl = 0;
for( r = 0; r < ( signed ) m_links.size( ); ++r )
@@ -158,9 +158,9 @@ void PMVectorListEdit::setVectors( const QValueList<PMVector>& l,
kdError( PMArea ) << "Wrong size of vector list in PMVectorListEdit::setVectors" << endl;
}
-QValueList<PMVector> PMVectorListEdit::vectors( ) const
+TQValueList<PMVector> PMVectorListEdit::vectors( ) const
{
- QValueList<PMVector> l;
+ TQValueList<PMVector> l;
int i;
for( i = 0; i < m_size; ++i )
@@ -183,7 +183,7 @@ void PMVectorListEdit::setVector( int r, const PMVector& v, int precision )
blockSignals( true );
int i;
- QString str;
+ TQString str;
for( i = 0; i < m_dimension && i <= ( signed ) v.size( ); ++i )
{
@@ -218,8 +218,8 @@ void PMVectorListEdit::setSize( int s )
setNumRows( s );
int i;
- QHeader* h = verticalHeader( );
- QString str;
+ TQHeader* h = verticalHeader( );
+ TQString str;
for( i = 0; i < s; ++i )
{
@@ -240,8 +240,8 @@ void PMVectorListEdit::setLink( int p1, int p2 )
if( p1 < 0 || p1 >= m_size || p2 >= m_size )
return;
- QHeader* h = verticalHeader( );
- QString str;
+ TQHeader* h = verticalHeader( );
+ TQString str;
// remove old link
if( m_links[p1] >= 0 )
@@ -256,7 +256,7 @@ void PMVectorListEdit::setLink( int p1, int p2 )
if( p2 >= 0 )
{
m_disabled[p2] = true;
- str = QString( "%1 (=%2)" ).arg( p2 + 1 ).arg( p1 + 1 );
+ str = TQString( "%1 (=%2)" ).arg( p2 + 1 ).arg( p1 + 1 );
h->setLabel( p2, str );
if( !isReadOnly( ) )
setRowReadOnly( p2, true );
@@ -285,7 +285,7 @@ void PMVectorListEdit::select( int i )
void PMVectorListEdit::select( int i, int j )
{
- QTableSelection sel( i, 0, j, m_dimension - 1 );
+ TQTableSelection sel( i, 0, j, m_dimension - 1 );
addSelection( sel );
}
@@ -315,9 +315,9 @@ bool PMVectorListEdit::isDataValid( )
return valid;
}
-QSize PMVectorListEdit::sizeHint( ) const
+TQSize PMVectorListEdit::sizeHint( ) const
{
- return QSize( c_columnWidth * m_dimension + frameWidth( ) * 2,
+ return TQSize( c_columnWidth * m_dimension + frameWidth( ) * 2,
frameWidth( ) * 2 + horizontalHeader( )->height( )
+ verticalHeader( )->sizeHint( ).height( ) );
}
@@ -340,18 +340,18 @@ void PMVectorListEdit::blockSelectionUpdates( bool block )
}
}
-bool PMVectorListEdit::eventFilter( QObject* o, QEvent* e )
+bool PMVectorListEdit::eventFilter( TQObject* o, TQEvent* e )
{
- if( e->type( ) == QEvent::Wheel && parent( ) )
- return QApplication::sendEvent( parent( ), e );
- if( e->type( ) == QEvent::MouseButtonPress
- && ( ( QMouseEvent* ) e )->button( ) == RightButton )
+ if( e->type( ) == TQEvent::Wheel && parent( ) )
+ return TQApplication::sendEvent( parent( ), e );
+ if( e->type( ) == TQEvent::MouseButtonPress
+ && ( ( TQMouseEvent* ) e )->button( ) == RightButton )
{
- bool b = QTable::eventFilter( o, e );
+ bool b = TQTable::eventFilter( o, e );
emit showContextMenu( );
return b;
}
- return QTable::eventFilter( o, e );
+ return TQTable::eventFilter( o, e );
}
#include "pmvectorlistedit.moc"
diff --git a/kpovmodeler/pmvectorlistedit.h b/kpovmodeler/pmvectorlistedit.h
index f8ecb938..73e32036 100644
--- a/kpovmodeler/pmvectorlistedit.h
+++ b/kpovmodeler/pmvectorlistedit.h
@@ -23,9 +23,9 @@
#include <config.h>
#endif
-#include <qtable.h>
-#include <qvaluelist.h>
-#include <qmemarray.h>
+#include <tqtable.h>
+#include <tqvaluelist.h>
+#include <tqmemarray.h>
#include "pmvector.h"
@@ -35,10 +35,10 @@ const int c_pmTableRTTI = 14352;
class PMTableItem : public QTableItem
{
public:
- PMTableItem( QTable* table );
+ PMTableItem( TQTable* table );
- virtual void paint( QPainter* p, const QColorGroup& cg,
- const QRect& cr, bool selected );
+ virtual void paint( TQPainter* p, const TQColorGroup& cg,
+ const TQRect& cr, bool selected );
int rtti( ) const { return c_pmTableRTTI; }
@@ -52,7 +52,7 @@ private:
/**
- * Widget that displays a list of vectors, based on @ref QTable.
+ * Widget that displays a list of vectors, based on @ref TQTable.
*/
class PMVectorListEdit : public QTable
{
@@ -61,33 +61,33 @@ public:
/**
* Constructor for 3d vectors (x, y, z)
*/
- PMVectorListEdit( QWidget* parent, const char* name = 0 );
+ PMVectorListEdit( TQWidget* parent, const char* name = 0 );
/**
* Constructor for 3d vectors
*/
- PMVectorListEdit( const QString& c1, const QString& c2, const QString& c3,
- QWidget* parent, const char* name = 0 );
+ PMVectorListEdit( const TQString& c1, const TQString& c2, const TQString& c3,
+ TQWidget* parent, const char* name = 0 );
/**
* Constructor for 2d vectors
*/
- PMVectorListEdit( const QString& c1, const QString& c2,
- QWidget* parent, const char* name = 0 );
+ PMVectorListEdit( const TQString& c1, const TQString& c2,
+ TQWidget* parent, const char* name = 0 );
/**
* Constructor for 4d vectors
*/
- PMVectorListEdit( const QString& c1, const QString& c2, const QString& c3,
- const QString& c4, QWidget* parent, const char* name = 0 );
+ PMVectorListEdit( const TQString& c1, const TQString& c2, const TQString& c3,
+ const TQString& c4, TQWidget* parent, const char* name = 0 );
/**
* Sets and displays the vectors. The widget will automatically
* resize if no link is set and resize is true.
*/
- void setVectors( const QValueList<PMVector>& v, bool resize = false,
+ void setVectors( const TQValueList<PMVector>& v, bool resize = false,
int precision = 5 );
/**
* Returns the vectors
*/
- QValueList<PMVector> vectors( ) const;
+ TQValueList<PMVector> vectors( ) const;
/**
* Sets the i-th vector
*/
@@ -146,9 +146,9 @@ public:
bool isDataValid( );
/** */
- virtual QSize sizeHint( ) const;
+ virtual TQSize sizeHint( ) const;
/** */
- bool eventFilter( QObject* o, QEvent* e );
+ bool eventFilter( TQObject* o, TQEvent* e );
protected slots:
void slotTextChanged( int, int );
@@ -166,8 +166,8 @@ private:
void init( int dimensions );
int m_dimension, m_size;
- QMemArray<int> m_links;
- QMemArray<bool> m_disabled;
+ TQMemArray<int> m_links;
+ TQMemArray<bool> m_disabled;
};
diff --git a/kpovmodeler/pmview.cpp b/kpovmodeler/pmview.cpp
index fe9f32d4..2fcd7eb2 100644
--- a/kpovmodeler/pmview.cpp
+++ b/kpovmodeler/pmview.cpp
@@ -16,11 +16,11 @@
**************************************************************************/
-#include <qprinter.h>
-#include <qpainter.h>
-#include <qsplitter.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
+#include <tqsplitter.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kconfig.h>
#include <kdialog.h>
#include <klocale.h>
@@ -34,14 +34,14 @@
#include "pmdialogview.h"
#include "pmglview.h"
-PMView::PMView( PMPart* part, QWidget* parent, const char* name )
- : QWidget( parent, name )
+PMView::PMView( PMPart* part, TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
setBackgroundMode( PaletteBase );
- QVBoxLayout* layout = new QVBoxLayout( this );
- m_pMainSplitter = new QSplitter( Qt::Horizontal, this, "MainSplitter" );
- m_pTreeEditSplitter = new QSplitter( Qt::Vertical, m_pMainSplitter,
+ TQVBoxLayout* layout = new TQVBoxLayout( this );
+ m_pMainSplitter = new TQSplitter( Qt::Horizontal, this, "MainSplitter" );
+ m_pTreeEditSplitter = new TQSplitter( Qt::Vertical, m_pMainSplitter,
"TreeEditSplitter" );
@@ -52,11 +52,11 @@ PMView::PMView( PMPart* part, QWidget* parent, const char* name )
m_pDialogView->show( );
- QWidget* glArea = new QWidget( m_pMainSplitter, "GLArea" );
+ TQWidget* glArea = new TQWidget( m_pMainSplitter, "GLArea" );
glArea->show( );
PMGLView* gl;
- QGridLayout* topLayout = new QGridLayout( glArea, 2, 2, 1, 1 );
+ TQGridLayout* topLayout = new TQGridLayout( glArea, 2, 2, 1, 1 );
gl = new PMGLView( part, PMGLView::PMViewPosZ, glArea );
topLayout->addWidget( gl, 0, 0 );
gl = new PMGLView( part, PMGLView::PMViewPosX, glArea );
@@ -78,9 +78,9 @@ PMView::~PMView( )
{
}
-void PMView::print( QPrinter* pPrinter )
+void PMView::print( TQPrinter* pPrinter )
{
- QPainter printpainter;
+ TQPainter printpainter;
printpainter.begin( pPrinter );
// TODO: add your printing code here
diff --git a/kpovmodeler/pmview.h b/kpovmodeler/pmview.h
index 8a216663..38249ed4 100644
--- a/kpovmodeler/pmview.h
+++ b/kpovmodeler/pmview.h
@@ -25,12 +25,12 @@
#endif
// include files for Qt
-#include <qwidget.h>
+#include <tqwidget.h>
class PMTreeView;
class PMDialogView;
class PMPart;
-class QSplitter;
+class TQSplitter;
class KConfig;
/**
@@ -43,7 +43,7 @@ public:
/**
* Constructor for the main view
*/
- PMView( PMPart* part, QWidget* parent = 0, const char* name = 0 );
+ PMView( PMPart* part, TQWidget* parent = 0, const char* name = 0 );
/**
* Destructor for the main view
*/
@@ -56,7 +56,7 @@ public:
/**
* contains the implementation for printing functionality TODO*/
- void print( QPrinter* pPrinter );
+ void print( TQPrinter* pPrinter );
/**
* saves settings
*/
@@ -69,8 +69,8 @@ private:
PMTreeView* m_pTreeView;
PMPart* m_pPart;
PMDialogView* m_pDialogView;
- QSplitter* m_pMainSplitter;
- QSplitter* m_pTreeEditSplitter;
+ TQSplitter* m_pMainSplitter;
+ TQSplitter* m_pTreeEditSplitter;
};
#endif
diff --git a/kpovmodeler/pmviewbase.h b/kpovmodeler/pmviewbase.h
index cce59922..357929c4 100644
--- a/kpovmodeler/pmviewbase.h
+++ b/kpovmodeler/pmviewbase.h
@@ -22,10 +22,10 @@
#include <config.h>
#endif
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
-class QDomElement;
+class TQDomElement;
/**
* This class stores the view configuration for one view.
@@ -47,15 +47,15 @@ public:
* Returns the identifier for the view type. Has to be equal
* to @ref PMViewBase::viewType for the corresponding view type.
*/
- virtual QString viewType( ) const = 0;
+ virtual TQString viewType( ) const = 0;
/**
* Loads the data from the xml element
*/
- virtual void loadData( QDomElement& e ) = 0;
+ virtual void loadData( TQDomElement& e ) = 0;
/**
* Saves the data from to xml element
*/
- virtual void saveData( QDomElement& e ) = 0;
+ virtual void saveData( TQDomElement& e ) = 0;
};
/**
@@ -69,8 +69,8 @@ public:
/**
* Default constructor
*/
- PMViewOptionsWidget( QWidget* parent, const char* name = 0 )
- : QWidget( parent, name )
+ PMViewOptionsWidget( TQWidget* parent, const char* name = 0 )
+ : TQWidget( parent, name )
{
}
@@ -94,19 +94,19 @@ public:
/**
* Default constructor
*/
- PMViewBase( QWidget* parent, const char* name = 0, WFlags f = 0 )
- : QWidget( parent, name, f )
+ PMViewBase( TQWidget* parent, const char* name = 0, WFlags f = 0 )
+ : TQWidget( parent, name, f )
{
}
/**
* Returns the identifier for the view type. Has to be unique
* for all view types.
*/
- virtual QString viewType( ) const = 0;
+ virtual TQString viewType( ) const = 0;
/**
* Returns a i18n'ed description
*/
- virtual QString description( ) const = 0;
+ virtual TQString description( ) const = 0;
/**
* Restores the view configuration
*
diff --git a/kpovmodeler/pmviewfactory.cpp b/kpovmodeler/pmviewfactory.cpp
index 58e566cc..804c787c 100644
--- a/kpovmodeler/pmviewfactory.cpp
+++ b/kpovmodeler/pmviewfactory.cpp
@@ -61,8 +61,8 @@ void PMViewFactory::addViewType( PMViewTypeFactory* vt )
}
}
-PMViewBase* PMViewFactory::newViewInstance( const QString& viewType,
- QWidget* parent, PMPart* part ) const
+PMViewBase* PMViewFactory::newViewInstance( const TQString& viewType,
+ TQWidget* parent, PMPart* part ) const
{
PMViewTypeFactory* f = m_dict.find( viewType );
if( f )
@@ -72,7 +72,7 @@ PMViewBase* PMViewFactory::newViewInstance( const QString& viewType,
return 0;
}
-PMViewOptions* PMViewFactory::newOptionsInstance( const QString& viewType ) const
+PMViewOptions* PMViewFactory::newOptionsInstance( const TQString& viewType ) const
{
PMViewTypeFactory* f = m_dict.find( viewType );
if( f )
@@ -82,12 +82,12 @@ PMViewOptions* PMViewFactory::newOptionsInstance( const QString& viewType ) cons
return 0;
}
-PMViewTypeFactory* PMViewFactory::viewFactory( const QString& viewType ) const
+PMViewTypeFactory* PMViewFactory::viewFactory( const TQString& viewType ) const
{
return m_dict.find( viewType );
}
-const QPtrList<PMViewTypeFactory>& PMViewFactory::viewTypes( ) const
+const TQPtrList<PMViewTypeFactory>& PMViewFactory::viewTypes( ) const
{
return m_viewTypes;
}
diff --git a/kpovmodeler/pmviewfactory.h b/kpovmodeler/pmviewfactory.h
index b24814cf..5fd42c1a 100644
--- a/kpovmodeler/pmviewfactory.h
+++ b/kpovmodeler/pmviewfactory.h
@@ -22,15 +22,15 @@
#include <config.h>
#endif
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qdict.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
#include <kstaticdeleter.h>
class PMViewBase;
-class QWidget;
+class TQWidget;
class PMPart;
-class QDomElement;
+class TQDomElement;
class PMViewOptions;
class PMViewOptionsWidget;
@@ -52,27 +52,27 @@ public:
/**
* Returns the id for the view type. Choose an unique name.
*/
- virtual QString viewType( ) const = 0;
+ virtual TQString viewType( ) const = 0;
/**
* Returns a i18n'ed description for the view type
*/
- virtual QString description( ) const = 0;
+ virtual TQString description( ) const = 0;
/**
* Returns a i18n'ed description for the view type, dependent
* on the options. Calls the method above by default.
*/
- virtual QString description( PMViewOptions* ) const
+ virtual TQString description( PMViewOptions* ) const
{
return description( );
}
/**
* Returns the icon name for the view
*/
- virtual QString iconName( ) const = 0;
+ virtual TQString iconName( ) const = 0;
/**
* Returns a new view instance
*/
- virtual PMViewBase* newInstance( QWidget* parent, PMPart* part ) const = 0;
+ virtual PMViewBase* newInstance( TQWidget* parent, PMPart* part ) const = 0;
/**
* Creates a config object for the view type.
* If the view doesn't have special attributes, the function returns 0;
@@ -81,7 +81,7 @@ public:
/**
* Creates a widget to configure the custom options
*/
- virtual PMViewOptionsWidget* newOptionsWidget( QWidget*, PMViewOptions* )
+ virtual PMViewOptionsWidget* newOptionsWidget( TQWidget*, PMViewOptions* )
{
return 0;
}
@@ -115,28 +115,28 @@ public:
/**
* Returns a new view of type viewType if available
*/
- PMViewBase* newViewInstance( const QString& viewType,
- QWidget* parent, PMPart* part ) const;
+ PMViewBase* newViewInstance( const TQString& viewType,
+ TQWidget* parent, PMPart* part ) const;
/**
* Returns a new view option instance for the given view type
*/
- PMViewOptions* newOptionsInstance( const QString& viewType ) const;
+ PMViewOptions* newOptionsInstance( const TQString& viewType ) const;
/**
* Returns the factory for the given view type
*/
- PMViewTypeFactory* viewFactory( const QString& viewType ) const;
+ PMViewTypeFactory* viewFactory( const TQString& viewType ) const;
/**
* Returns the list of available view types
*/
- const QPtrList<PMViewTypeFactory>& viewTypes( ) const;
+ const TQPtrList<PMViewTypeFactory>& viewTypes( ) const;
private:
/**
* Constructor
*/
PMViewFactory( );
- QPtrList<PMViewTypeFactory> m_viewTypes;
- QDict<PMViewTypeFactory> m_dict;
+ TQPtrList<PMViewTypeFactory> m_viewTypes;
+ TQDict<PMViewTypeFactory> m_dict;
static PMViewFactory* s_pInstance;
static KStaticDeleter<PMViewFactory> s_staticDeleter;
diff --git a/kpovmodeler/pmviewlayoutmanager.cpp b/kpovmodeler/pmviewlayoutmanager.cpp
index 593eed27..fe3a031d 100644
--- a/kpovmodeler/pmviewlayoutmanager.cpp
+++ b/kpovmodeler/pmviewlayoutmanager.cpp
@@ -27,13 +27,13 @@
#include <kpopupmenu.h>
#include <kiconloader.h>
-#include <qfile.h>
-#include <qdom.h>
-#include <qwidgetlist.h>
-#include <qlistbox.h>
-#include <qlineedit.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqfile.h>
+#include <tqdom.h>
+#include <tqwidgetlist.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include "pmshell.h"
#include "pmdebug.h"
@@ -80,9 +80,9 @@ PMViewLayoutEntry::~PMViewLayoutEntry( )
delete m_pCustomOptions;
}
-void PMViewLayoutEntry::loadData( QDomElement& e )
+void PMViewLayoutEntry::loadData( TQDomElement& e )
{
- QString s;
+ TQString s;
bool ok;
// Read the view type
@@ -129,9 +129,9 @@ void PMViewLayoutEntry::loadData( QDomElement& e )
m_pCustomOptions->loadData( e );
}
-void PMViewLayoutEntry::saveData( QDomElement& e ) const
+void PMViewLayoutEntry::saveData( TQDomElement& e ) const
{
- QString s;
+ TQString s;
e.setTagName( m_viewType );
switch( m_dockPosition )
{
@@ -170,7 +170,7 @@ void PMViewLayoutEntry::saveData( QDomElement& e ) const
m_pCustomOptions->saveData( e );
}
-void PMViewLayoutEntry::setViewType( const QString& v )
+void PMViewLayoutEntry::setViewType( const TQString& v )
{
m_viewType = v;
}
@@ -194,7 +194,7 @@ void PMViewLayoutEntry::setHeight( int i )
m_height = 1;
}
-const QString PMViewLayoutEntry::viewTypeAsString( )
+const TQString PMViewLayoutEntry::viewTypeAsString( )
{
PMViewTypeFactory* f = PMViewFactory::theFactory( )->viewFactory( m_viewType );
if( f )
@@ -209,7 +209,7 @@ const QString PMViewLayoutEntry::viewTypeAsString( )
return i18n( "Unknown" );
}
-const QString PMViewLayoutEntry::dockPositionAsString( )
+const TQString PMViewLayoutEntry::dockPositionAsString( )
{
switch( m_dockPosition )
{
@@ -255,17 +255,17 @@ PMViewLayout& PMViewLayout::operator = ( const PMViewLayout& vl )
return *this;
}
-void PMViewLayout::loadData( QDomElement& e )
+void PMViewLayout::loadData( TQDomElement& e )
{
m_entries.clear( );
m_name = e.attribute( "name", "unnamed" );
- QDomNode m = e.firstChild( );
+ TQDomNode m = e.firstChild( );
while( !m.isNull( ) )
{
if( m.isElement( ) )
{
- QDomElement me = m.toElement( );
+ TQDomElement me = m.toElement( );
PMViewLayoutEntry vle;
vle.loadData( me );
@@ -276,21 +276,21 @@ void PMViewLayout::loadData( QDomElement& e )
normalize( );
}
-void PMViewLayout::saveData( QDomElement& e, QDomDocument& doc ) const
+void PMViewLayout::saveData( TQDomElement& e, TQDomDocument& doc ) const
{
- QValueList< PMViewLayoutEntry>::const_iterator it;
+ TQValueList< PMViewLayoutEntry>::const_iterator it;
e.setAttribute( "name", m_name );
for( it = m_entries.begin( ); it != m_entries.end( ) ; ++it )
{
- QDomElement a;
+ TQDomElement a;
a = doc.createElement( "unknown" );
( *it ).saveData( a );
e.appendChild( a );
}
}
-void PMViewLayout::setName( const QString& n )
+void PMViewLayout::setName( const TQString& n )
{
m_name = n;
}
@@ -311,7 +311,7 @@ void PMViewLayout::removeEntry( int index )
void PMViewLayout::displayLayout( PMShell* shell )
{
PMDockWidget* lastWidget = 0;
- QValueList< PMViewLayoutEntry>::const_iterator it;
+ TQValueList< PMViewLayoutEntry>::const_iterator it;
bool isViewSet = false;
int lastWidth = 0, width = 100;
int lastHeight = 0, height = 100;
@@ -326,7 +326,7 @@ void PMViewLayout::displayLayout( PMShell* shell )
{
// the specified target is the desktop
dock->manualDock( 0, PMDockWidget::DockDesktop, 50,
- QPoint( ( *it ).floatingPositionX( ),
+ TQPoint( ( *it ).floatingPositionX( ),
( *it ).floatingPositionY( ) ) );
dock->resize( ( *it ).floatingWidth( ), ( *it ).floatingHeight( ) );
dock->show( );
@@ -445,35 +445,35 @@ PMViewLayout PMViewLayout::extractViewLayout( PMShell* shell )
{
PMViewLayout layout;
- QValueList< QValueList< PMViewLayoutEntry > > cols;
- cols.append( QValueList< PMViewLayoutEntry >( ) );
+ TQValueList< TQValueList< PMViewLayoutEntry > > cols;
+ cols.append( TQValueList< PMViewLayoutEntry >( ) );
// find docked widgets
recursiveExtractColumns( cols, cols.begin( ), 100,
shell->centralWidget( ) );
- QValueListIterator< QValueList< PMViewLayoutEntry > > cit;
- QValueListIterator< PMViewLayoutEntry > eit;
+ TQValueListIterator< TQValueList< PMViewLayoutEntry > > cit;
+ TQValueListIterator< PMViewLayoutEntry > eit;
for( cit = cols.begin( ); cit != cols.end( ); ++cit )
for( eit = ( *cit ).begin( ); eit != ( *cit ).end( ); ++eit )
layout.addEntry( *eit );
// find floating widgets
- QPtrList<PMDockWidget> list;
+ TQPtrList<PMDockWidget> list;
shell->manager( )->findFloatingWidgets( list );
- QPtrListIterator<PMDockWidget> it( list );
+ TQPtrListIterator<PMDockWidget> it( list );
for( ; it.current( ); ++it )
{
kdDebug( PMArea ) << it.current( ) << " " << it.current( )->isVisible( ) << endl;
- QWidget* w = it.current( )->getWidget( );
+ TQWidget* w = it.current( )->getWidget( );
if( w )
{
bool invalid = false;
PMViewLayoutEntry e;
e.setDockPosition( PMDockWidget::DockNone );
- QPoint p = it.current( )->pos( );
+ TQPoint p = it.current( )->pos( );
e.setFloatingPositionX( p.x( ) );
e.setFloatingPositionY( p.y( ) );
e.setFloatingWidth( it.current( )->width( ) );
@@ -503,9 +503,9 @@ PMViewLayout PMViewLayout::extractViewLayout( PMShell* shell )
}
void PMViewLayout::recursiveExtractColumns(
- QValueList< QValueList< PMViewLayoutEntry > >& cols,
- QValueList< QValueList< PMViewLayoutEntry > >::iterator cit,
- int width, QWidget* widget )
+ TQValueList< TQValueList< PMViewLayoutEntry > >& cols,
+ TQValueList< TQValueList< PMViewLayoutEntry > >::iterator cit,
+ int width, TQWidget* widget )
{
if( !widget )
return;
@@ -513,7 +513,7 @@ void PMViewLayout::recursiveExtractColumns(
if( widget->inherits( "PMDockWidget" ) )
{
PMDockWidget* dw = ( PMDockWidget* ) widget;
- QWidget* w = dw->getWidget( );
+ TQWidget* w = dw->getWidget( );
if( w )
{
bool colStart = true;
@@ -529,8 +529,8 @@ void PMViewLayout::recursiveExtractColumns(
if( w1 == 0 ) w1++;
if( w2 == 0 ) w2++;
- QValueList< QValueList< PMViewLayoutEntry > >::iterator cit1
- = cols.insert( cit, QValueList< PMViewLayoutEntry >( ) );
+ TQValueList< TQValueList< PMViewLayoutEntry > >::iterator cit1
+ = cols.insert( cit, TQValueList< PMViewLayoutEntry >( ) );
recursiveExtractColumns( cols, cit1, w1, sp->getFirst( ) );
recursiveExtractColumns( cols, cit, w2, sp->getLast( ) );
@@ -550,9 +550,9 @@ void PMViewLayout::recursiveExtractColumns(
}
void PMViewLayout::recursiveExtractOneColumn(
- QValueList< PMViewLayoutEntry >& entries,
- QValueList< PMViewLayoutEntry >::iterator eit,
- int height, QWidget* widget )
+ TQValueList< PMViewLayoutEntry >& entries,
+ TQValueList< PMViewLayoutEntry >::iterator eit,
+ int height, TQWidget* widget )
{
if( !widget )
return;
@@ -560,7 +560,7 @@ void PMViewLayout::recursiveExtractOneColumn(
if( widget->inherits( "PMDockWidget" ) )
{
PMDockWidget* dw = ( PMDockWidget* ) widget;
- QWidget* w = dw->getWidget( );
+ TQWidget* w = dw->getWidget( );
if( w )
{
if( w->inherits( "PMDockSplitter" ) )
@@ -578,7 +578,7 @@ void PMViewLayout::recursiveExtractOneColumn(
PMViewLayoutEntry e;
e.setHeight( h2 );
e.setDockPosition( PMDockWidget::DockBottom );
- QValueList< PMViewLayoutEntry >::iterator eit1 = eit;
+ TQValueList< PMViewLayoutEntry >::iterator eit1 = eit;
eit1 = entries.insert( ++eit1, e );
recursiveExtractOneColumn( entries, eit, h1, sp->getFirst( ) );
@@ -588,7 +588,7 @@ void PMViewLayout::recursiveExtractOneColumn(
{
PMDockTabGroup* g = ( PMDockTabGroup* ) w;
int num = g->count( );
- QWidget* tw;
+ TQWidget* tw;
int i;
for( i = 0; i < num; i++ )
{
@@ -640,15 +640,15 @@ PMViewLayoutManager::~PMViewLayoutManager( )
{
}
-void PMViewLayoutManager::setDefaultLayout( const QString& name )
+void PMViewLayoutManager::setDefaultLayout( const TQString& name )
{
m_defaultLayout = name;
}
-QStringList PMViewLayoutManager::availableLayouts( )
+TQStringList PMViewLayoutManager::availableLayouts( )
{
- QStringList result;
- QValueListIterator<PMViewLayout> it;
+ TQStringList result;
+ TQValueListIterator<PMViewLayout> it;
for( it = m_layouts.begin( ); it != m_layouts.end( ); ++it )
result.push_back( ( *it ).name( ) );
@@ -663,7 +663,7 @@ void PMViewLayoutManager::loadData( )
m_layoutsLoaded = true;
- QString fileName = locate( "data", "kpovmodeler/viewlayouts.xml" );
+ TQString fileName = locate( "data", "kpovmodeler/viewlayouts.xml" );
if( fileName.isEmpty( ) )
{
// Generate a default layout
@@ -707,7 +707,7 @@ void PMViewLayoutManager::loadData( )
return;
}
- QFile file( fileName );
+ TQFile file( fileName );
if( !file.open( IO_ReadOnly ) )
{
kdError( PMArea ) << i18n( "Could not open the view layouts file." )
@@ -715,21 +715,21 @@ void PMViewLayoutManager::loadData( )
return;
}
- QDomDocument doc( "VIEWLAYOUTS" );
+ TQDomDocument doc( "VIEWLAYOUTS" );
doc.setContent( &file );
- QDomElement e = doc.documentElement( );
+ TQDomElement e = doc.documentElement( );
m_defaultLayout = e.attribute( "default", "empty" );
- QDomNode c = e.firstChild( );
+ TQDomNode c = e.firstChild( );
- QString str;
+ TQString str;
while( !c.isNull( ) )
{
if( c.isElement( ) )
{
- QDomElement ce = c.toElement( );
+ TQDomElement ce = c.toElement( );
PMViewLayout v;
v.loadData( ce );
m_layouts.append( v );
@@ -740,36 +740,36 @@ void PMViewLayoutManager::loadData( )
void PMViewLayoutManager::saveData( )
{
- QString fileName = locateLocal( "data", "kpovmodeler/viewlayouts.xml" );
+ TQString fileName = locateLocal( "data", "kpovmodeler/viewlayouts.xml" );
if( fileName.isEmpty( ) )
{
kdError( PMArea ) << i18n( "View layouts not found." ) << endl;
return;
}
- QFile file( fileName );
+ TQFile file( fileName );
if( !file.open( IO_WriteOnly ) )
{
kdError( PMArea ) << i18n( "Could not open the view layouts file." )
<< endl;
return;
}
- QDomDocument doc( "VIEWLAYOUTS" );
- QDomElement e = doc.createElement( "viewlist" );
+ TQDomDocument doc( "VIEWLAYOUTS" );
+ TQDomElement e = doc.createElement( "viewlist" );
e.setAttribute( "default", m_defaultLayout );
- QValueListIterator<PMViewLayout> it;
+ TQValueListIterator<PMViewLayout> it;
for( it = m_layouts.begin( ); it != m_layouts.end( ); ++it )
{
- QDomElement l;
+ TQDomElement l;
l = doc.createElement( "viewlayout" );
( *it ).saveData( l, doc );
e.appendChild( l );
}
doc.appendChild( e );
- QTextStream str( &file );
- str.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream str( &file );
+ str.setEncoding( TQTextStream::UnicodeUTF8 );
str << doc.toString( );
file.close( );
}
@@ -781,7 +781,7 @@ PMViewLayoutManager* PMViewLayoutManager::theManager( )
return s_pInstance;
}
-void PMViewLayoutManager::displayLayout( const QString& name, PMShell* shell )
+void PMViewLayoutManager::displayLayout( const TQString& name, PMShell* shell )
{
PMViewLayout* v_layout = findLayout( name );
@@ -790,7 +790,7 @@ void PMViewLayoutManager::displayLayout( const QString& name, PMShell* shell )
// Destroy the existing dock widgets
if( m_layoutDisplayed )
{
- QWidgetList lst;
+ TQWidgetList lst;
if( shell->centralWidget( ) )
shell->manager( )->findChildDockWidget( shell->centralWidget( ), lst );
@@ -801,7 +801,7 @@ void PMViewLayoutManager::displayLayout( const QString& name, PMShell* shell )
lst.remove( );
}
- QPtrList<PMDockWidget> flist;
+ TQPtrList<PMDockWidget> flist;
shell->manager( )->findFloatingWidgets( flist );
while( flist.first( ) )
{
@@ -821,9 +821,9 @@ void PMViewLayoutManager::displayDefaultLayout( PMShell* shell )
displayLayout( m_defaultLayout, shell );
}
-PMViewLayout* PMViewLayoutManager::findLayout( const QString& name )
+PMViewLayout* PMViewLayoutManager::findLayout( const TQString& name )
{
- QValueListIterator<PMViewLayout> it;
+ TQValueListIterator<PMViewLayout> it;
for( it = m_layouts.begin( ); it != m_layouts.end( ) &&
( *it ).name( ) != name; ++it );
@@ -834,8 +834,8 @@ PMViewLayout* PMViewLayoutManager::findLayout( const QString& name )
void PMViewLayoutManager::fillPopupMenu( KPopupMenu* pMenu )
{
- QStringList lst = availableLayouts( );
- QStringList::ConstIterator it = lst.begin( );
+ TQStringList lst = availableLayouts( );
+ TQStringList::ConstIterator it = lst.begin( );
pMenu->clear( );
if( it != lst.end( ) )
@@ -845,7 +845,7 @@ void PMViewLayoutManager::fillPopupMenu( KPopupMenu* pMenu )
}
}
-void PMViewLayoutManager::addLayout( const QString& name )
+void PMViewLayoutManager::addLayout( const TQString& name )
{
PMViewLayout a;
@@ -855,9 +855,9 @@ void PMViewLayoutManager::addLayout( const QString& name )
m_layouts.append( a );
}
-void PMViewLayoutManager::removeLayout( const QString& name )
+void PMViewLayoutManager::removeLayout( const TQString& name )
{
- QValueListIterator<PMViewLayout> it;
+ TQValueListIterator<PMViewLayout> it;
for( it = m_layouts.begin( ); it != m_layouts.end( ) &&
( *it ).name( ) != name; ++it );
@@ -876,26 +876,26 @@ PMSaveViewLayoutDialog::PMSaveViewLayoutDialog( PMShell* parent,
setButtonOK( KStdGuiItem::save() );
enableButtonOK( false );
- QWidget* w = new QWidget( this );
- QVBoxLayout* vl = new QVBoxLayout( w, 0, KDialog::spacingHint( ) );
+ TQWidget* w = new TQWidget( this );
+ TQVBoxLayout* vl = new TQVBoxLayout( w, 0, KDialog::spacingHint( ) );
- QLabel* l = new QLabel( i18n( "Enter view layout name:" ), w );
+ TQLabel* l = new TQLabel( i18n( "Enter view layout name:" ), w );
vl->addWidget( l );
- m_pLayoutName = new QLineEdit( w );
+ m_pLayoutName = new TQLineEdit( w );
vl->addWidget( m_pLayoutName );
- connect( m_pLayoutName, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotNameChanged( const QString& ) ) );
+ connect( m_pLayoutName, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotNameChanged( const TQString& ) ) );
- QListBox* lb = new QListBox( w );
+ TQListBox* lb = new TQListBox( w );
vl->addWidget( lb );
- connect( lb, SIGNAL( highlighted( const QString& ) ),
- SLOT( slotNameSelected( const QString& ) ) );
+ connect( lb, TQT_SIGNAL( highlighted( const TQString& ) ),
+ TQT_SLOT( slotNameSelected( const TQString& ) ) );
lb->insertStringList( PMViewLayoutManager::theManager( )
->availableLayouts( ) );
setMainWidget( w );
- setInitialSize( QSize( 300, 200 ) );
+ setInitialSize( TQSize( 300, 200 ) );
}
PMSaveViewLayoutDialog::~PMSaveViewLayoutDialog( )
@@ -904,7 +904,7 @@ PMSaveViewLayoutDialog::~PMSaveViewLayoutDialog( )
void PMSaveViewLayoutDialog::slotOk( )
{
- QString name = m_pLayoutName->text( );
+ TQString name = m_pLayoutName->text( );
PMViewLayoutManager* m = PMViewLayoutManager::theManager( );
PMViewLayout* layout = m->findLayout( name );
@@ -922,12 +922,12 @@ void PMSaveViewLayoutDialog::slotOk( )
KDialogBase::slotOk( );
}
-void PMSaveViewLayoutDialog::slotNameChanged( const QString& s )
+void PMSaveViewLayoutDialog::slotNameChanged( const TQString& s )
{
enableButtonOK( !s.isEmpty( ) );
}
-void PMSaveViewLayoutDialog::slotNameSelected( const QString& s )
+void PMSaveViewLayoutDialog::slotNameSelected( const TQString& s )
{
m_pLayoutName->setText( s );
}
diff --git a/kpovmodeler/pmviewlayoutmanager.h b/kpovmodeler/pmviewlayoutmanager.h
index c0246c5d..01235337 100644
--- a/kpovmodeler/pmviewlayoutmanager.h
+++ b/kpovmodeler/pmviewlayoutmanager.h
@@ -25,9 +25,9 @@
#include <config.h>
#endif
-#include <qstring.h>
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#include <kstaticdeleter.h>
#include <kdialogbase.h>
@@ -36,8 +36,8 @@
#include "pmviewbase.h"
class KConfig;
-class QDomElement;
-class QLineEdit;
+class TQDomElement;
+class TQLineEdit;
class PMShell;
/**
@@ -61,8 +61,8 @@ public:
*/
~PMViewLayoutEntry( );
- QString viewType( ) const { return m_viewType; }
- void setViewType( const QString& vt );
+ TQString viewType( ) const { return m_viewType; }
+ void setViewType( const TQString& vt );
PMDockWidget::DockPosition dockPosition( ) const { return m_dockPosition; }
void setDockPosition( PMDockWidget::DockPosition i );
@@ -84,17 +84,17 @@ public:
int floatingPositionY( ) const { return m_floatingPositionY; }
void setFloatingPositionY( int p ) { m_floatingPositionY = p; }
- void loadData( QDomElement& e );
- void saveData( QDomElement& e ) const;
+ void loadData( TQDomElement& e );
+ void saveData( TQDomElement& e ) const;
PMViewOptions* customOptions( ) const { return m_pCustomOptions; }
void setCustomOptions( PMViewOptions* o );
- const QString dockPositionAsString( );
- const QString viewTypeAsString( );
+ const TQString dockPositionAsString( );
+ const TQString viewTypeAsString( );
private:
- QString m_viewType;
+ TQString m_viewType;
PMDockWidget::DockPosition m_dockPosition;
int m_columnWidth;
int m_height;
@@ -114,7 +114,7 @@ private:
class PMViewLayout
{
public:
- typedef QValueList< PMViewLayoutEntry >::iterator iterator;
+ typedef TQValueList< PMViewLayoutEntry >::iterator iterator;
/**
* Constructor
*/
@@ -133,11 +133,11 @@ public:
*/
PMViewLayout& operator = ( const PMViewLayout& vl );
- QString name( ) const { return m_name; }
+ TQString name( ) const { return m_name; }
- void loadData( QDomElement& e );
+ void loadData( TQDomElement& e );
- void saveData( QDomElement& e, QDomDocument& doc ) const;
+ void saveData( TQDomElement& e, TQDomDocument& doc ) const;
/**
* Destroy all dock widgets in PMShell and create the new ones
*/
@@ -145,7 +145,7 @@ public:
/**
* Sets the name of the layout
*/
- void setName( const QString& n );
+ void setName( const TQString& n );
/**
*
* Add a new entry to the layout. By default it adds the entry at the end
@@ -184,17 +184,17 @@ public:
static PMViewLayout extractViewLayout( PMShell* shell );
private:
static void recursiveExtractColumns(
- QValueList< QValueList< PMViewLayoutEntry > >& cols,
- QValueList< QValueList< PMViewLayoutEntry > >::iterator cit,
- int width, QWidget* widget );
+ TQValueList< TQValueList< PMViewLayoutEntry > >& cols,
+ TQValueList< TQValueList< PMViewLayoutEntry > >::iterator cit,
+ int width, TQWidget* widget );
static void recursiveExtractOneColumn(
- QValueList< PMViewLayoutEntry >& entries,
- QValueList< PMViewLayoutEntry >::iterator eit,
- int height, QWidget* widget );
+ TQValueList< PMViewLayoutEntry >& entries,
+ TQValueList< PMViewLayoutEntry >::iterator eit,
+ int height, TQWidget* widget );
- QString m_name;
- QValueList< PMViewLayoutEntry > m_entries;
+ TQString m_name;
+ TQValueList< PMViewLayoutEntry > m_entries;
};
/**
@@ -219,19 +219,19 @@ public:
/**
* Returns the list of available view layouts
*/
- QStringList availableLayouts( );
+ TQStringList availableLayouts( );
/**
* Sets the default layout
*/
- void setDefaultLayout( const QString& name );
+ void setDefaultLayout( const TQString& name );
/**
* Returns the default layout
*/
- QString defaultLayout( ) const { return m_defaultLayout; }
+ TQString defaultLayout( ) const { return m_defaultLayout; }
/**
* Destroy all dock widgets in PMShell and create the new ones
*/
- void displayLayout( const QString& name, PMShell* shell );
+ void displayLayout( const TQString& name, PMShell* shell );
/**
* Displays the layout indicated as default
*/
@@ -247,7 +247,7 @@ public:
/**
* Add a new empty layout
*/
- void addLayout( const QString& name );
+ void addLayout( const TQString& name );
/**
* Add a new layout
*/
@@ -255,19 +255,19 @@ public:
/**
* Remove a layout
*/
- void removeLayout( const QString& name );
+ void removeLayout( const TQString& name );
/**
* Get a known layout
*/
- PMViewLayout* findLayout( const QString& name );
+ PMViewLayout* findLayout( const TQString& name );
/**
* Returns the list of available layouts
*/
- QValueList<PMViewLayout> layouts( ) { return m_layouts; }
+ TQValueList<PMViewLayout> layouts( ) { return m_layouts; }
/**
* Sets the list of available layouts
*/
- void setLayouts( const QValueList<PMViewLayout>& l ) { m_layouts = l; }
+ void setLayouts( const TQValueList<PMViewLayout>& l ) { m_layouts = l; }
/**
* Fill the available layouts menu
*/
@@ -280,8 +280,8 @@ private:
bool m_layoutsLoaded;
bool m_layoutDisplayed;
- QString m_defaultLayout;
- QValueList< PMViewLayout > m_layouts;
+ TQString m_defaultLayout;
+ TQValueList< PMViewLayout > m_layouts;
static PMViewLayoutManager* s_pInstance;
static KStaticDeleter<PMViewLayoutManager> s_staticDeleter;
@@ -296,10 +296,10 @@ public:
~PMSaveViewLayoutDialog( );
protected slots:
virtual void slotOk( );
- void slotNameChanged( const QString& );
- void slotNameSelected( const QString& );
+ void slotNameChanged( const TQString& );
+ void slotNameSelected( const TQString& );
private:
- QLineEdit* m_pLayoutName;
+ TQLineEdit* m_pLayoutName;
PMShell* m_pShell;
};
diff --git a/kpovmodeler/pmwarp.cpp b/kpovmodeler/pmwarp.cpp
index 76d58cf3..166777ce 100644
--- a/kpovmodeler/pmwarp.cpp
+++ b/kpovmodeler/pmwarp.cpp
@@ -101,12 +101,12 @@ PMWarp::~PMWarp( )
{
}
-QString PMWarp::description( ) const
+TQString PMWarp::description( ) const
{
return i18n( "warp" );
}
-void PMWarp::serialize( QDomElement& e, QDomDocument& /*doc*/ ) const
+void PMWarp::serialize( TQDomElement& e, TQDomDocument& /*doc*/ ) const
{
bool mapping = false;
@@ -164,7 +164,7 @@ void PMWarp::serialize( QDomElement& e, QDomDocument& /*doc*/ ) const
void PMWarp::readAttributes( const PMXMLHelper& h )
{
bool mapping = false;
- QString str = h.stringAttribute( "warp_type", "repeat" );
+ TQString str = h.stringAttribute( "warp_type", "repeat" );
if( str == "repeat" )
{
@@ -467,7 +467,7 @@ void PMWarp::setMajorRadius( const double c )
}
}
-PMDialogEditBase* PMWarp::editWidget( QWidget* parent ) const
+PMDialogEditBase* PMWarp::editWidget( TQWidget* parent ) const
{
return new PMWarpEdit( parent );
}
diff --git a/kpovmodeler/pmwarp.h b/kpovmodeler/pmwarp.h
index a6ed213b..6b50f498 100644
--- a/kpovmodeler/pmwarp.h
+++ b/kpovmodeler/pmwarp.h
@@ -53,7 +53,7 @@ public:
/** */
virtual PMObject* copy( ) const { return new PMWarp( *this ); }
/** */
- virtual QString description( ) const;
+ virtual TQString description( ) const;
/** */
virtual PMMetaObject* metaObject( ) const;
@@ -61,19 +61,19 @@ public:
virtual void cleanUp( ) const;
/** */
- virtual void serialize( QDomElement& e, QDomDocument& doc ) const;
+ virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const;
/** */
virtual void readAttributes( const PMXMLHelper& h );
/**
* Returns a new @ref PMWarpEdit
*/
- virtual PMDialogEditBase* editWidget( QWidget* parent ) const;
+ virtual PMDialogEditBase* editWidget( TQWidget* parent ) const;
/**
* Returns the name of the pixmap that is displayed in the tree view
* and dialog view
*/
- virtual QString pixmap( ) const { return QString( "pmwarp" ); }
+ virtual TQString pixmap( ) const { return TQString( "pmwarp" ); }
PMWarpType warpType( ) const { return m_warpType; }
void setWarpType( PMWarpType c );
diff --git a/kpovmodeler/pmwarpedit.cpp b/kpovmodeler/pmwarpedit.cpp
index 99c620dd..3f247eee 100644
--- a/kpovmodeler/pmwarpedit.cpp
+++ b/kpovmodeler/pmwarpedit.cpp
@@ -21,15 +21,15 @@
#include "pmvectoredit.h"
#include "pmlineedits.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <kdialog.h>
-PMWarpEdit::PMWarpEdit( QWidget* parent, const char* name )
+PMWarpEdit::PMWarpEdit( TQWidget* parent, const char* name )
: Base( parent, name )
{
m_pDisplayedObject = 0;
@@ -37,14 +37,14 @@ PMWarpEdit::PMWarpEdit( QWidget* parent, const char* name )
void PMWarpEdit::createTopWidgets( )
{
- QHBoxLayout* hl;
- QVBoxLayout* vl;
- QGridLayout* gl;
+ TQHBoxLayout* hl;
+ TQVBoxLayout* vl;
+ TQGridLayout* gl;
Base::createTopWidgets( );
- QLabel* label = new QLabel( i18n( "Warp type:" ), this );
- m_pWarpTypeEdit = new QComboBox( false, this );
+ TQLabel* label = new TQLabel( i18n( "Warp type:" ), this );
+ m_pWarpTypeEdit = new TQComboBox( false, this );
m_pWarpTypeEdit->insertItem( i18n( "Repeat" ) );
m_pWarpTypeEdit->insertItem( i18n( "Black Hole" ) );
m_pWarpTypeEdit->insertItem( i18n( "Turbulence" ) );
@@ -52,44 +52,44 @@ void PMWarpEdit::createTopWidgets( )
m_pWarpTypeEdit->insertItem( i18n( "Spherical" ) );
m_pWarpTypeEdit->insertItem( i18n( "Toroidal" ) );
m_pWarpTypeEdit->insertItem( i18n( "Planar" ) );
- hl = new QHBoxLayout( topLayout( ) );
+ hl = new TQHBoxLayout( topLayout( ) );
hl->addWidget( label );
hl->addWidget( m_pWarpTypeEdit );
hl->addStretch( 1 );
/* Repeat Warp Objects */
- m_pRepeatWidget = new QWidget( this );
- vl = new QVBoxLayout( m_pRepeatWidget, 0, KDialog::spacingHint( ) );
- gl = new QGridLayout( vl, 3, 2 );
- m_pDirectionLabel = new QLabel( i18n( "Direction:" ), m_pRepeatWidget );
+ m_pRepeatWidget = new TQWidget( this );
+ vl = new TQVBoxLayout( m_pRepeatWidget, 0, KDialog::spacingHint( ) );
+ gl = new TQGridLayout( vl, 3, 2 );
+ m_pDirectionLabel = new TQLabel( i18n( "Direction:" ), m_pRepeatWidget );
m_pDirectionEdit = new PMVectorEdit( "x", "y", "z", m_pRepeatWidget );
gl->addWidget( m_pDirectionLabel, 0, 0 );
gl->addWidget( m_pDirectionEdit, 0, 1 );
- m_pOffsetLabel = new QLabel( i18n( "Offset:" ), m_pRepeatWidget );
+ m_pOffsetLabel = new TQLabel( i18n( "Offset:" ), m_pRepeatWidget );
m_pOffsetEdit = new PMVectorEdit( "x", "y", "z", m_pRepeatWidget );
gl->addWidget( m_pOffsetLabel, 1, 0 );
gl->addWidget( m_pOffsetEdit, 1, 1 );
- m_pFlipLabel = new QLabel( i18n( "Flip:" ), m_pRepeatWidget );
+ m_pFlipLabel = new TQLabel( i18n( "Flip:" ), m_pRepeatWidget );
m_pFlipEdit = new PMVectorEdit( "x", "y", "z", m_pRepeatWidget );
gl->addWidget( m_pFlipLabel, 2, 0 );
gl->addWidget( m_pFlipEdit, 2, 1 );
/* Black Hole Warp Objects */
- m_pBlackHoleWidget = new QWidget( this );
- vl = new QVBoxLayout( m_pBlackHoleWidget, 0, KDialog::spacingHint( ) );
- m_pLocationLabel = new QLabel( i18n( "Location:" ), m_pBlackHoleWidget );
+ m_pBlackHoleWidget = new TQWidget( this );
+ vl = new TQVBoxLayout( m_pBlackHoleWidget, 0, KDialog::spacingHint( ) );
+ m_pLocationLabel = new TQLabel( i18n( "Location:" ), m_pBlackHoleWidget );
m_pLocationEdit = new PMVectorEdit( "x", "y", "z", m_pBlackHoleWidget );
- hl = new QHBoxLayout( vl );
+ hl = new TQHBoxLayout( vl );
hl->addWidget( m_pLocationLabel );
hl->addWidget( m_pLocationEdit );
- m_pRadiusLabel = new QLabel( i18n( "Radius:" ), m_pBlackHoleWidget );
+ m_pRadiusLabel = new TQLabel( i18n( "Radius:" ), m_pBlackHoleWidget );
m_pRadiusEdit = new PMFloatEdit( m_pBlackHoleWidget );
- m_pStrengthLabel = new QLabel( i18n( "Strength:" ), m_pBlackHoleWidget );
+ m_pStrengthLabel = new TQLabel( i18n( "Strength:" ), m_pBlackHoleWidget );
m_pStrengthEdit = new PMFloatEdit( m_pBlackHoleWidget );
- m_pFalloffLabel = new QLabel( i18n( "Falloff:" ), m_pBlackHoleWidget );
+ m_pFalloffLabel = new TQLabel( i18n( "Falloff:" ), m_pBlackHoleWidget );
m_pFalloffEdit = new PMFloatEdit( m_pBlackHoleWidget );
- hl = new QHBoxLayout( vl );
- gl = new QGridLayout( hl, 3, 2 );
+ hl = new TQHBoxLayout( vl );
+ gl = new TQGridLayout( hl, 3, 2 );
gl->addWidget( m_pRadiusLabel, 0, 0 );
gl->addWidget( m_pRadiusEdit, 0, 1 );
gl->addWidget( m_pStrengthLabel, 1, 0 );
@@ -98,88 +98,88 @@ void PMWarpEdit::createTopWidgets( )
gl->addWidget( m_pFalloffEdit, 2, 1 );
hl->addStretch( 1 );
- m_pRepeatLabel = new QLabel( i18n( "Repeat:" ), m_pBlackHoleWidget );
+ m_pRepeatLabel = new TQLabel( i18n( "Repeat:" ), m_pBlackHoleWidget );
m_pRepeatEdit = new PMVectorEdit( "x", "y", "z", m_pBlackHoleWidget );
- hl = new QHBoxLayout( vl );
+ hl = new TQHBoxLayout( vl );
hl->addWidget( m_pRepeatLabel );
hl->addWidget( m_pRepeatEdit );
- m_pTurbulenceLabel = new QLabel( i18n( "Turbulence:" ), m_pBlackHoleWidget );
+ m_pTurbulenceLabel = new TQLabel( i18n( "Turbulence:" ), m_pBlackHoleWidget );
m_pTurbulenceEdit = new PMVectorEdit( "x", "y", "z", m_pBlackHoleWidget );
- hl = new QHBoxLayout( vl );
+ hl = new TQHBoxLayout( vl );
hl->addWidget( m_pTurbulenceLabel );
hl->addWidget( m_pTurbulenceEdit );
- m_pInverseEdit = new QCheckBox( i18n( "Inverse" ), m_pBlackHoleWidget );
+ m_pInverseEdit = new TQCheckBox( i18n( "Inverse" ), m_pBlackHoleWidget );
vl->addWidget( m_pInverseEdit );
/* Turbulence Warp Objects */
- m_pTurbulenceWidget = new QWidget( this );
- vl = new QVBoxLayout( m_pTurbulenceWidget, 0, KDialog::spacingHint( ) );
- m_pValueVectorLabel = new QLabel( i18n( "Value:" ), m_pTurbulenceWidget );
+ m_pTurbulenceWidget = new TQWidget( this );
+ vl = new TQVBoxLayout( m_pTurbulenceWidget, 0, KDialog::spacingHint( ) );
+ m_pValueVectorLabel = new TQLabel( i18n( "Value:" ), m_pTurbulenceWidget );
m_pValueVectorEdit = new PMVectorEdit( "x", "y", "z", m_pTurbulenceWidget );
- hl = new QHBoxLayout( vl );
+ hl = new TQHBoxLayout( vl );
hl->addWidget( m_pValueVectorLabel );
hl->addWidget( m_pValueVectorEdit );
- hl = new QHBoxLayout( vl );
- gl = new QGridLayout( hl, 3, 2 );
- m_pOctavesLabel = new QLabel( i18n( "Octaves:" ), m_pTurbulenceWidget );
+ hl = new TQHBoxLayout( vl );
+ gl = new TQGridLayout( hl, 3, 2 );
+ m_pOctavesLabel = new TQLabel( i18n( "Octaves:" ), m_pTurbulenceWidget );
m_pOctavesEdit = new PMIntEdit( m_pTurbulenceWidget );
gl->addWidget( m_pOctavesLabel, 0, 0 );
gl->addWidget( m_pOctavesEdit, 0, 1 );
- m_pOmegaLabel = new QLabel( i18n( "Omega:" ), m_pTurbulenceWidget );
+ m_pOmegaLabel = new TQLabel( i18n( "Omega:" ), m_pTurbulenceWidget );
m_pOmegaEdit = new PMFloatEdit( m_pTurbulenceWidget );
gl->addWidget( m_pOmegaLabel, 1, 0 );
gl->addWidget( m_pOmegaEdit, 1, 1 );
- m_pLambdaLabel = new QLabel( i18n( "Lambda:" ), m_pTurbulenceWidget );
+ m_pLambdaLabel = new TQLabel( i18n( "Lambda:" ), m_pTurbulenceWidget );
m_pLambdaEdit = new PMFloatEdit( m_pTurbulenceWidget );
gl->addWidget( m_pLambdaLabel, 2, 0 );
gl->addWidget( m_pLambdaEdit, 2, 1 );
hl->addStretch( 1 );
/* Mapping Warp Objects */
- m_pMappingWidget = new QWidget( this );
- vl = new QVBoxLayout( m_pMappingWidget, 0, KDialog::spacingHint( ) );
- label = new QLabel( i18n( "Orientation:" ), m_pMappingWidget );
+ m_pMappingWidget = new TQWidget( this );
+ vl = new TQVBoxLayout( m_pMappingWidget, 0, KDialog::spacingHint( ) );
+ label = new TQLabel( i18n( "Orientation:" ), m_pMappingWidget );
m_pOrientationEdit = new PMVectorEdit( "x", "y", "z", m_pMappingWidget );
- hl = new QHBoxLayout( vl );
+ hl = new TQHBoxLayout( vl );
hl->addWidget( label );
hl->addWidget( m_pOrientationEdit );
- gl = new QGridLayout( vl, 2, 2 );
- label = new QLabel( i18n( "Distance exponent:" ), m_pMappingWidget );
+ gl = new TQGridLayout( vl, 2, 2 );
+ label = new TQLabel( i18n( "Distance exponent:" ), m_pMappingWidget );
m_pDistExpEdit = new PMFloatEdit( m_pMappingWidget );
gl->addWidget( label, 0, 0 );
gl->addWidget( m_pDistExpEdit, 0, 1 );
- m_pMajorRadiusLabel = new QLabel( i18n( "Major radius:" ), m_pMappingWidget );
+ m_pMajorRadiusLabel = new TQLabel( i18n( "Major radius:" ), m_pMappingWidget );
m_pMajorRadiusEdit = new PMFloatEdit( m_pMappingWidget );
gl->addWidget( m_pMajorRadiusLabel, 1, 0 );
gl->addWidget( m_pMajorRadiusEdit, 1, 1 );
- vl = new QVBoxLayout( topLayout( ) );
+ vl = new TQVBoxLayout( topLayout( ) );
vl->addSpacing( 0 );
vl->addWidget( m_pRepeatWidget );
vl->addWidget( m_pBlackHoleWidget );
vl->addWidget( m_pTurbulenceWidget );
vl->addWidget( m_pMappingWidget );
- connect( m_pWarpTypeEdit, SIGNAL( activated( int ) ), SLOT( slotComboChanged( int ) ) );
- connect( m_pDirectionEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pOffsetEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pFlipEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pLocationEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pRadiusEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pStrengthEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pFalloffEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pInverseEdit, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pRepeatEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pTurbulenceEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pValueVectorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pOctavesEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pOmegaEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pLambdaEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pOrientationEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pDistExpEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
- connect( m_pMajorRadiusEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) );
+ connect( m_pWarpTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotComboChanged( int ) ) );
+ connect( m_pDirectionEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pOffsetEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pFlipEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pLocationEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pRadiusEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pStrengthEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pFalloffEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pInverseEdit, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pRepeatEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pTurbulenceEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pValueVectorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pOctavesEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pOmegaEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pLambdaEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pOrientationEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pDistExpEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
+ connect( m_pMajorRadiusEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) );
}
void PMWarpEdit::displayObject( PMObject* o )
diff --git a/kpovmodeler/pmwarpedit.h b/kpovmodeler/pmwarpedit.h
index 1140e3e6..fa12a358 100644
--- a/kpovmodeler/pmwarpedit.h
+++ b/kpovmodeler/pmwarpedit.h
@@ -30,9 +30,9 @@ class PMWarp;
class PMVectorEdit;
class PMIntEdit;
class PMFloatEdit;
-class QComboBox;
-class QCheckBox;
-class QLabel;
+class TQComboBox;
+class TQCheckBox;
+class TQLabel;
/**
* Dialog edit class for @ref PMWarp.
@@ -45,7 +45,7 @@ public:
/**
* Creates a PMWarpEdit with parent and name
*/
- PMWarpEdit( QWidget* parent, const char* name = 0 );
+ PMWarpEdit( TQWidget* parent, const char* name = 0 );
/** */
virtual void displayObject( PMObject* o );
@@ -64,46 +64,46 @@ protected slots:
private:
PMWarp* m_pDisplayedObject;
- QComboBox* m_pWarpTypeEdit;
+ TQComboBox* m_pWarpTypeEdit;
PMVectorEdit* m_pDirectionEdit;
- QLabel* m_pDirectionLabel;
+ TQLabel* m_pDirectionLabel;
PMVectorEdit* m_pOffsetEdit;
- QLabel* m_pOffsetLabel;
+ TQLabel* m_pOffsetLabel;
PMVectorEdit* m_pFlipEdit;
- QLabel* m_pFlipLabel;
+ TQLabel* m_pFlipLabel;
PMVectorEdit* m_pLocationEdit;
- QLabel* m_pLocationLabel;
+ TQLabel* m_pLocationLabel;
PMFloatEdit* m_pRadiusEdit;
- QLabel* m_pRadiusLabel;
+ TQLabel* m_pRadiusLabel;
PMFloatEdit* m_pStrengthEdit;
- QLabel* m_pStrengthLabel;
+ TQLabel* m_pStrengthLabel;
PMFloatEdit* m_pFalloffEdit;
- QLabel* m_pFalloffLabel;
- QCheckBox* m_pInverseEdit;
+ TQLabel* m_pFalloffLabel;
+ TQCheckBox* m_pInverseEdit;
PMVectorEdit* m_pRepeatEdit;
- QLabel* m_pRepeatLabel;
+ TQLabel* m_pRepeatLabel;
PMVectorEdit* m_pTurbulenceEdit;
- QLabel* m_pTurbulenceLabel;
+ TQLabel* m_pTurbulenceLabel;
PMVectorEdit* m_pValueVectorEdit;
- QLabel* m_pValueVectorLabel;
+ TQLabel* m_pValueVectorLabel;
PMIntEdit* m_pOctavesEdit;
- QLabel* m_pOctavesLabel;
+ TQLabel* m_pOctavesLabel;
PMFloatEdit* m_pOmegaEdit;
- QLabel* m_pOmegaLabel;
+ TQLabel* m_pOmegaLabel;
PMFloatEdit* m_pLambdaEdit;
- QLabel* m_pLambdaLabel;
+ TQLabel* m_pLambdaLabel;
PMVectorEdit* m_pOrientationEdit;
PMFloatEdit* m_pDistExpEdit;
PMFloatEdit* m_pMajorRadiusEdit;
- QLabel* m_pMajorRadiusLabel;
+ TQLabel* m_pMajorRadiusLabel;
- QWidget* m_pRepeatWidget;
- QWidget* m_pBlackHoleWidget;
- QWidget* m_pTurbulenceWidget;
- QWidget* m_pMappingWidget;
+ TQWidget* m_pRepeatWidget;
+ TQWidget* m_pBlackHoleWidget;
+ TQWidget* m_pTurbulenceWidget;
+ TQWidget* m_pMappingWidget;
};
diff --git a/kpovmodeler/pmxmlhelper.cpp b/kpovmodeler/pmxmlhelper.cpp
index bbb3c32c..2146c1d6 100644
--- a/kpovmodeler/pmxmlhelper.cpp
+++ b/kpovmodeler/pmxmlhelper.cpp
@@ -17,7 +17,7 @@
#include "pmxmlhelper.h"
-PMXMLHelper::PMXMLHelper( const QDomElement& e, PMPart* p, PMParser* par,
+PMXMLHelper::PMXMLHelper( const TQDomElement& e, PMPart* p, PMParser* par,
int majorDocumentFormat, int minorDocumentFormat )
{
m_e = e;
@@ -27,14 +27,14 @@ PMXMLHelper::PMXMLHelper( const QDomElement& e, PMPart* p, PMParser* par,
m_minor = minorDocumentFormat;
}
-bool PMXMLHelper::hasAttribute( const QString& name ) const
+bool PMXMLHelper::hasAttribute( const TQString& name ) const
{
return m_e.hasAttribute( name );
}
-int PMXMLHelper::intAttribute( const QString& name, int def ) const
+int PMXMLHelper::intAttribute( const TQString& name, int def ) const
{
- QString str = m_e.attribute( name );
+ TQString str = m_e.attribute( name );
bool ok;
int res;
@@ -46,9 +46,9 @@ int PMXMLHelper::intAttribute( const QString& name, int def ) const
return def;
}
-double PMXMLHelper::doubleAttribute( const QString& name, double def ) const
+double PMXMLHelper::doubleAttribute( const TQString& name, double def ) const
{
- QString str = m_e.attribute( name );
+ TQString str = m_e.attribute( name );
bool ok;
double res;
@@ -60,9 +60,9 @@ double PMXMLHelper::doubleAttribute( const QString& name, double def ) const
return def;
}
-bool PMXMLHelper::boolAttribute( const QString& name, bool def ) const
+bool PMXMLHelper::boolAttribute( const TQString& name, bool def ) const
{
- QString str = m_e.attribute( name );
+ TQString str = m_e.attribute( name );
bool ok;
int res;
@@ -74,9 +74,9 @@ bool PMXMLHelper::boolAttribute( const QString& name, bool def ) const
return def;
}
-PMThreeState PMXMLHelper::threeStateAttribute( const QString& name ) const
+PMThreeState PMXMLHelper::threeStateAttribute( const TQString& name ) const
{
- QString str = m_e.attribute( name );
+ TQString str = m_e.attribute( name );
bool ok;
int res;
@@ -93,14 +93,14 @@ PMThreeState PMXMLHelper::threeStateAttribute( const QString& name ) const
return PMUnspecified;
}
-QString PMXMLHelper::stringAttribute( const QString& name, const QString& def ) const
+TQString PMXMLHelper::stringAttribute( const TQString& name, const TQString& def ) const
{
return m_e.attribute( name, def );
}
-PMVector PMXMLHelper::vectorAttribute( const QString& name, const PMVector& def ) const
+PMVector PMXMLHelper::vectorAttribute( const TQString& name, const PMVector& def ) const
{
- QString str = m_e.attribute( name );
+ TQString str = m_e.attribute( name );
if( str.isNull( ) )
return def;
@@ -113,9 +113,9 @@ PMVector PMXMLHelper::vectorAttribute( const QString& name, const PMVector& def
return def;
}
-PMMatrix PMXMLHelper::matrixAttribute( const QString& name, const PMMatrix& def ) const
+PMMatrix PMXMLHelper::matrixAttribute( const TQString& name, const PMMatrix& def ) const
{
- QString str = m_e.attribute( name );
+ TQString str = m_e.attribute( name );
if( str.isNull( ) )
return def;
@@ -128,9 +128,9 @@ PMMatrix PMXMLHelper::matrixAttribute( const QString& name, const PMMatrix& def
return def;
}
-PMColor PMXMLHelper::colorAttribute( const QString& name, const PMColor& def ) const
+PMColor PMXMLHelper::colorAttribute( const TQString& name, const PMColor& def ) const
{
- QString str = m_e.attribute( name );
+ TQString str = m_e.attribute( name );
if( str.isNull( ) )
return def;
@@ -143,18 +143,18 @@ PMColor PMXMLHelper::colorAttribute( const QString& name, const PMColor& def ) c
return def;
}
-QDomElement PMXMLHelper::extraData( ) const
+TQDomElement PMXMLHelper::extraData( ) const
{
- QDomNode c = m_e.firstChild( );
+ TQDomNode c = m_e.firstChild( );
while( !c.isNull( ) )
{
if( c.isElement( ) )
{
- QDomElement ce = c.toElement( );
+ TQDomElement ce = c.toElement( );
if( ce.tagName( ) == "extra_data" )
return ce;
}
c = c.nextSibling( );
}
- return QDomElement( );
+ return TQDomElement( );
}
diff --git a/kpovmodeler/pmxmlhelper.h b/kpovmodeler/pmxmlhelper.h
index 25ae6947..9e9af51c 100644
--- a/kpovmodeler/pmxmlhelper.h
+++ b/kpovmodeler/pmxmlhelper.h
@@ -23,8 +23,8 @@
#include <config.h>
#endif
-#include <qdom.h>
-#include <qstring.h>
+#include <tqdom.h>
+#include <tqstring.h>
#include "pmobject.h"
#include "pmcolor.h"
@@ -41,57 +41,57 @@ class PMXMLHelper
{
public:
/**
- * Creates a PMXMLHelper for the QDomElement& e
+ * Creates a PMXMLHelper for the TQDomElement& e
*/
- PMXMLHelper( const QDomElement& e, PMPart* p, PMParser* par,
+ PMXMLHelper( const TQDomElement& e, PMPart* p, PMParser* par,
int majorDocumentFormat, int minorDocumentFormat );
/**
* Returns the QDomElement
*/
- QDomElement element( ) const { return m_e; }
+ TQDomElement element( ) const { return m_e; }
/**
* Returns true if the element contains the attribute
*/
- bool hasAttribute( const QString& name ) const;
+ bool hasAttribute( const TQString& name ) const;
/**
* Reads an integer attribute
*/
- int intAttribute( const QString& name, int def ) const;
+ int intAttribute( const TQString& name, int def ) const;
/**
* Reads a double attribute
*/
- double doubleAttribute( const QString& name, double def ) const;
+ double doubleAttribute( const TQString& name, double def ) const;
/**
* Reads a bool attribute
*/
- bool boolAttribute( const QString& name, bool def ) const;
+ bool boolAttribute( const TQString& name, bool def ) const;
/**
* Reads a PMThreeState attribute
*/
- PMThreeState threeStateAttribute( const QString& name ) const;
+ PMThreeState threeStateAttribute( const TQString& name ) const;
/**
* Reads a string attribute
*/
- QString stringAttribute( const QString& name, const QString& def ) const;
+ TQString stringAttribute( const TQString& name, const TQString& def ) const;
/**
* Reads a vector attribute
*/
- PMVector vectorAttribute( const QString& name, const PMVector& def ) const;
+ PMVector vectorAttribute( const TQString& name, const PMVector& def ) const;
/**
* Reads a matrix attribute
*/
- PMMatrix matrixAttribute( const QString& name, const PMMatrix& def ) const;
+ PMMatrix matrixAttribute( const TQString& name, const PMMatrix& def ) const;
/**
* Reads a color attribute
*/
- PMColor colorAttribute( const QString& name, const PMColor& def ) const;
+ PMColor colorAttribute( const TQString& name, const PMColor& def ) const;
/**
* Returns the "extra_data" child element or a null element, if there
* is no child element with tag name "extra_data"
*/
- QDomElement extraData( ) const;
+ TQDomElement extraData( ) const;
/**
* Returns a pointer to the part
@@ -111,7 +111,7 @@ public:
int minorDocumentFormat( ) const { return m_minor; }
private:
- QDomElement m_e;
+ TQDomElement m_e;
PMPart* m_pPart;
PMParser* m_pParser;
int m_major;
diff --git a/kpovmodeler/pmxmlparser.cpp b/kpovmodeler/pmxmlparser.cpp
index 520b19c0..11d42015 100644
--- a/kpovmodeler/pmxmlparser.cpp
+++ b/kpovmodeler/pmxmlparser.cpp
@@ -17,7 +17,7 @@
#include "pmxmlparser.h"
-#include <qbuffer.h>
+#include <tqbuffer.h>
#include <klocale.h>
#include "pmpart.h"
@@ -27,13 +27,13 @@
#include "pmdocumentformat.h"
#include "pmdebug.h"
-PMXMLParser::PMXMLParser( PMPart* part, QIODevice* dev )
+PMXMLParser::PMXMLParser( PMPart* part, TQIODevice* dev )
: PMParser( part, dev )
{
init( );
}
-PMXMLParser::PMXMLParser( PMPart* part, const QByteArray& array )
+PMXMLParser::PMXMLParser( PMPart* part, const TQByteArray& array )
: PMParser( part, array )
{
init( );
@@ -56,7 +56,7 @@ bool PMXMLParser::initDocument( )
{
if( !m_pDoc )
{
- m_pDoc = new QDomDocument( "KPOVMODELER" );
+ m_pDoc = new TQDomDocument( "KPOVMODELER" );
if( m_pDoc->setContent( m_pDevice ) )
return true;
else
@@ -73,10 +73,10 @@ void PMXMLParser::topParse( )
{
if( initDocument( ) )
{
- QDomElement e = m_pDoc->documentElement( );
+ TQDomElement e = m_pDoc->documentElement( );
// read the format number
// assume 1.0 on error
- QString fstring = e.attribute( "majorFormat", "1" );
+ TQString fstring = e.attribute( "majorFormat", "1" );
bool ok = true;
int format = fstring.toInt( &ok );
if( !ok || ( format < 1 ) )
@@ -117,14 +117,14 @@ void PMXMLParser::topParse( )
}
}
-void PMXMLParser::parseChildObjects( QDomElement& e, PMObject* parent )
+void PMXMLParser::parseChildObjects( TQDomElement& e, PMObject* parent )
{
- QDomNode c = e.firstChild( );
+ TQDomNode c = e.firstChild( );
while( !c.isNull( ) )
{
if( c.isElement( ) )
{
- QDomElement ce = c.toElement( );
+ TQDomElement ce = c.toElement( );
PMPrototypeManager* m = m_pPart->prototypeManager( );
PMObject* obj = m->newObject( m->className( ce.tagName( ) ) );
if( obj )
@@ -150,21 +150,21 @@ void PMXMLParser::parseChildObjects( QDomElement& e, PMObject* parent )
}
-void PMXMLParser::quickParse( QStringList& list )
+void PMXMLParser::quickParse( TQStringList& list )
{
if( initDocument( ) )
{
- QDomElement e = m_pDoc->documentElement( );
+ TQDomElement e = m_pDoc->documentElement( );
if( ( e.tagName( ) == "objects" ) || ( e.tagName( ) == "scene" ) )
{
- QDomNode c = e.firstChild( );
+ TQDomNode c = e.firstChild( );
while( !c.isNull( ) )
{
if( c.isElement( ) )
{
- QDomElement ce = c.toElement( );
- QString type = m_pPart->prototypeManager( )->className( ce.tagName( ) );
+ TQDomElement ce = c.toElement( );
+ TQString type = m_pPart->prototypeManager( )->className( ce.tagName( ) );
if( !type.isNull( ) )
list.append( type );
}
diff --git a/kpovmodeler/pmxmlparser.h b/kpovmodeler/pmxmlparser.h
index ca311048..2ff8f351 100644
--- a/kpovmodeler/pmxmlparser.h
+++ b/kpovmodeler/pmxmlparser.h
@@ -34,11 +34,11 @@ public:
/**
* Parser that parses the device
*/
- PMXMLParser( PMPart* part, QIODevice* device );
+ PMXMLParser( PMPart* part, TQIODevice* device );
/**
* Parser that parses the byte array
*/
- PMXMLParser( PMPart* part, const QByteArray& array );
+ PMXMLParser( PMPart* part, const TQByteArray& array );
/**
* Deletes the parser
*/
@@ -48,7 +48,7 @@ public:
* Quickly scans the top level objects. Appends all top level object
* types to the list.
*/
- virtual void quickParse( QStringList& list );
+ virtual void quickParse( TQStringList& list );
/**
* Returns true, if the parser can quickly scan the top level objects.
*/
@@ -65,7 +65,7 @@ private:
*/
void init( );
/**
- * Initializes the QDomDocument. Returns true if successful.
+ * Initializes the TQDomDocument. Returns true if successful.
*/
bool initDocument( );
@@ -73,9 +73,9 @@ private:
* Looks for child objects, parses them and appends them to the parent
* object. If parent is 0, all objects are appended to the result list.
*/
- void parseChildObjects( QDomElement& e, PMObject* parent );
+ void parseChildObjects( TQDomElement& e, PMObject* parent );
- QDomDocument* m_pDoc;
+ TQDomDocument* m_pDoc;
int m_majorDocumentFormat;
int m_minorDocumentFormat;
};
diff --git a/kruler/klineal.cpp b/kruler/klineal.cpp
index 8f03c68b..0f08d6de 100644
--- a/kruler/klineal.cpp
+++ b/kruler/klineal.cpp
@@ -32,14 +32,14 @@
#include <kwin.h>
#include <kstdguiitem.h>
-#include <qbitmap.h>
-#include <qcursor.h>
-#include <qdialog.h>
-#include <qiconset.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qwhatsthis.h>
+#include <tqbitmap.h>
+#include <tqcursor.h>
+#include <tqdialog.h>
+#include <tqiconset.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqwhatsthis.h>
#include "klineal.h"
@@ -47,7 +47,7 @@
#define CFG_KEY_SCALE_FONT "ScaleFont"
#define CFG_KEY_LENGTH "Length"
#define CFG_GROUP_SETTINGS "StoredSettings"
-#define DEFAULT_RULER_COLOR QColor(255, 200, 80)
+#define DEFAULT_RULER_COLOR TQColor(255, 200, 80)
#define FULLSCREENID 23
/**
* this is our cursor bitmap:
@@ -67,7 +67,7 @@ static const uchar cursorBits[] = {
* create the thingy with no borders and set up
* its members
*/
-KLineal::KLineal(QWidget*parent,const char* name):KMainWindow(parent,name){
+KLineal::KLineal(TQWidget*parent,const char* name):KMainWindow(parent,name){
if (!name) {
name = "klineal";
}
@@ -75,28 +75,28 @@ KLineal::KLineal(QWidget*parent,const char* name):KMainWindow(parent,name){
KWin::setType(winId(), NET::Override); // or NET::Normal
KWin::setState(winId(), NET::StaysOnTop);
setPaletteBackgroundColor(black);
- QWhatsThis::add(this,
+ TQWhatsThis::add(this,
i18n(
"This is a tool to measure pixel distances and colors on the screen. "
"It is useful for working on layouts of dialogs, web pages etc."
));
- QBitmap bim = QBitmap(QSize(8, 48), cursorBits);
- QWMatrix m;
+ TQBitmap bim = TQBitmap(TQSize(8, 48), cursorBits);
+ TQWMatrix m;
m.rotate(90.0);
- mNorthCursor = QCursor(bim, bim, 3, 47);
+ mNorthCursor = TQCursor(bim, bim, 3, 47);
bim = bim.xForm(m);
- mEastCursor = QCursor(bim, bim, 0, 3);
+ mEastCursor = TQCursor(bim, bim, 0, 3);
bim = bim.xForm(m);
- mSouthCursor = QCursor(bim, bim, 4, 0);
+ mSouthCursor = TQCursor(bim, bim, 4, 0);
bim = bim.xForm(m);
- mWestCursor = QCursor(bim, bim, 47, 4);
+ mWestCursor = TQCursor(bim, bim, 47, 4);
mCurrentCursor = mNorthCursor;
setMinimumSize(60,60);
setMaximumSize(8000,8000);
KConfig *cfg = kapp->config();
- QColor defaultColor = DEFAULT_RULER_COLOR;
- QFont defaultFont(KGlobalSettings::generalFont().family(), 8);
+ TQColor defaultColor = DEFAULT_RULER_COLOR;
+ TQFont defaultFont(KGlobalSettings::generalFont().family(), 8);
defaultFont.setPixelSize(8);
if (cfg) {
cfg->setGroup(CFG_GROUP_SETTINGS);
@@ -111,32 +111,32 @@ KLineal::KLineal(QWidget*parent,const char* name):KMainWindow(parent,name){
kdDebug() << "mLongEdgeLen=" << mLongEdgeLen << endl;
mShortEdgeLen = 70;
- mLabel = new QLabel(this);
+ mLabel = new TQLabel(this);
mLabel->setGeometry(0,height()-12,32,12);
mLabel->setBackgroundOrigin(ParentOrigin);
- QFont labelFont(KGlobalSettings::generalFont().family(), 10);
+ TQFont labelFont(KGlobalSettings::generalFont().family(), 10);
labelFont.setPixelSize(10);
mLabel->setFont(labelFont);
- QWhatsThis::add(mLabel,
+ TQWhatsThis::add(mLabel,
i18n(
"This is the current distance measured in pixels."
));
- mColorLabel = new QLabel(this);
+ mColorLabel = new TQLabel(this);
mColorLabel->resize(45,12);
mColorLabel->setPaletteBackgroundColor(mColor);
mColorLabel->hide();
- QFont colorFont(KGlobalSettings::fixedFont().family(), 10);
+ TQFont colorFont(KGlobalSettings::fixedFont().family(), 10);
colorFont.setPixelSize(10);
mColorLabel->setFont(colorFont);
- mColorLabel->move(mLabel->pos() + QPoint(0, 20));
- QWhatsThis::add(mColorLabel,
+ mColorLabel->move(mLabel->pos() + TQPoint(0, 20));
+ TQWhatsThis::add(mColorLabel,
i18n(
- "This is the current color in hexadecimal rgb representation as you may use it in HTML or as a QColor name. "
+ "This is the current color in hexadecimal rgb representation as you may use it in HTML or as a TQColor name. "
"The rectangles background shows the color of the pixel inside the "
"little square at the end of the line cursor."
));
- resize(QSize(mLongEdgeLen, mShortEdgeLen));
+ resize(TQSize(mLongEdgeLen, mShortEdgeLen));
setMouseTracking(TRUE);
mDragging = FALSE;
mOrientation = South;
@@ -146,41 +146,41 @@ KLineal::KLineal(QWidget*parent,const char* name):KMainWindow(parent,name){
mMenu = new KPopupMenu(this);
mMenu->insertTitle(i18n("KRuler"));
KPopupMenu *oriMenu = new KPopupMenu(this);
- oriMenu->insertItem(UserIconSet("kruler-north"), i18n("&North"), this, SLOT(setNorth()), Key_N);
- oriMenu->insertItem(UserIconSet("kruler-east"), i18n("&East"), this, SLOT(setEast()), Key_E);
- oriMenu->insertItem(UserIconSet("kruler-south"), i18n("&South"), this, SLOT(setSouth()), Key_S);
- oriMenu->insertItem(UserIconSet("kruler-west"), i18n("&West"), this, SLOT(setWest()), Key_W);
- oriMenu->insertItem(i18n("&Turn Right"), this, SLOT(turnRight()), Key_R);
- oriMenu->insertItem(i18n("Turn &Left"), this, SLOT(turnLeft()), Key_L);
+ oriMenu->insertItem(UserIconSet("kruler-north"), i18n("&North"), this, TQT_SLOT(setNorth()), Key_N);
+ oriMenu->insertItem(UserIconSet("kruler-east"), i18n("&East"), this, TQT_SLOT(setEast()), Key_E);
+ oriMenu->insertItem(UserIconSet("kruler-south"), i18n("&South"), this, TQT_SLOT(setSouth()), Key_S);
+ oriMenu->insertItem(UserIconSet("kruler-west"), i18n("&West"), this, TQT_SLOT(setWest()), Key_W);
+ oriMenu->insertItem(i18n("&Turn Right"), this, TQT_SLOT(turnRight()), Key_R);
+ oriMenu->insertItem(i18n("Turn &Left"), this, TQT_SLOT(turnLeft()), Key_L);
mMenu->insertItem(i18n("&Orientation"), oriMenu);
mLenMenu = new KPopupMenu(this);
- mLenMenu->insertItem(i18n("&Short"), this, SLOT(setShortLength()), CTRL+Key_S);
- mLenMenu->insertItem(i18n("&Medium"), this, SLOT(setMediumLength()), CTRL+Key_M);
- mLenMenu->insertItem(i18n("&Tall"), this, SLOT(setTallLength()), CTRL+Key_T);
- mLenMenu->insertItem(i18n("&Full Screen Width"), this, SLOT(setFullLength()), CTRL+Key_F, FULLSCREENID);
+ mLenMenu->insertItem(i18n("&Short"), this, TQT_SLOT(setShortLength()), CTRL+Key_S);
+ mLenMenu->insertItem(i18n("&Medium"), this, TQT_SLOT(setMediumLength()), CTRL+Key_M);
+ mLenMenu->insertItem(i18n("&Tall"), this, TQT_SLOT(setTallLength()), CTRL+Key_T);
+ mLenMenu->insertItem(i18n("&Full Screen Width"), this, TQT_SLOT(setFullLength()), CTRL+Key_F, FULLSCREENID);
mMenu->insertItem(i18n("&Length"), mLenMenu);
- mMenu->insertItem(SmallIcon("colorscm"), i18n("&Choose Color..."), this, SLOT(choseColor()), CTRL+Key_C);
- mMenu->insertItem(SmallIcon("font"), i18n("Choose &Font..."), this, SLOT(choseFont()), Key_F);
+ mMenu->insertItem(SmallIcon("colorscm"), i18n("&Choose Color..."), this, TQT_SLOT(choseColor()), CTRL+Key_C);
+ mMenu->insertItem(SmallIcon("font"), i18n("Choose &Font..."), this, TQT_SLOT(choseFont()), Key_F);
mMenu->insertSeparator();
mMenu->insertItem(SmallIcon( "help" ), KStdGuiItem::help().text(), helpMenu());
mMenu->insertSeparator();
- mMenu->insertItem(SmallIcon( "exit" ), KStdGuiItem::quit().text(), kapp, SLOT(quit()), CTRL+Key_Q);
- mLastClickPos = geometry().topLeft()+QPoint(width()/2, height()/2);
+ mMenu->insertItem(SmallIcon( "exit" ), KStdGuiItem::quit().text(), kapp, TQT_SLOT(quit()), CTRL+Key_Q);
+ mLastClickPos = geometry().topLeft()+TQPoint(width()/2, height()/2);
}
KLineal::~KLineal(){
}
void KLineal::move(int x, int y) {
- move(QPoint(x, y));
+ move(TQPoint(x, y));
}
-void KLineal::move(const QPoint &p) {
- setGeometry(QRect(p, size()));
+void KLineal::move(const TQPoint &p) {
+ setGeometry(TQRect(p, size()));
}
-QPoint KLineal::pos() {
- QRect r = frameGeometry();
+TQPoint KLineal::pos() {
+ TQRect r = frameGeometry();
return r.topLeft();
}
int KLineal::x() {
@@ -190,7 +190,7 @@ int KLineal::y() {
return pos().y();
}
-static void rotateRect(QRect &r, QPoint center, int nineties) {
+static void rotateRect(TQRect &r, TQPoint center, int nineties) {
static int sintab[4] = {0,1,0,-1};
static int costab[4] = {1,0,-1,0};
int i=0;
@@ -212,7 +212,7 @@ static void rotateRect(QRect &r, QPoint center, int nineties) {
}
void KLineal::setupBackground() {
- QColor a, b, bg = mColor;
+ TQColor a, b, bg = mColor;
KImageEffect::GradientType gradType = KImageEffect::HorizontalGradient;
switch (mOrientation) {
case North:
@@ -236,26 +236,26 @@ void KLineal::setupBackground() {
gradType = KImageEffect::HorizontalGradient;
break;
}
- QPixmap bgPixmap = QPixmap(KImageEffect::gradient(size(), a, b, gradType));
+ TQPixmap bgPixmap = TQPixmap(KImageEffect::gradient(size(), a, b, gradType));
setErasePixmap(bgPixmap);
mLabel->setErasePixmap(bgPixmap);
}
void KLineal::setOrientation(int inOrientation) {
- QRect r = frameGeometry();
+ TQRect r = frameGeometry();
int nineties = (int)inOrientation - (int)mOrientation;
- QPoint center = mLastClickPos;
+ TQPoint center = mLastClickPos;
if (_clicked) {
center = mLastClickPos;
_clicked = false;
} else {
- center = r.topLeft()+QPoint(width()/2, height()/2);
+ center = r.topLeft()+TQPoint(width()/2, height()/2);
}
rotateRect(r, center, nineties);
- QRect desktop = KGlobalSettings::desktopGeometry(this);
+ TQRect desktop = KGlobalSettings::desktopGeometry(this);
if (r.top() < desktop.top())
r.moveTop( desktop.top() );
if (r.bottom() > desktop.bottom())
@@ -270,22 +270,22 @@ void KLineal::setOrientation(int inOrientation) {
switch(mOrientation) {
case North:
mLabel->move(4, height()-mLabel->height()-4);
- mColorLabel->move(mLabel->pos() + QPoint(0, -20));
+ mColorLabel->move(mLabel->pos() + TQPoint(0, -20));
mCurrentCursor = mNorthCursor;
break;
case South:
mLabel->move(4, 4);
- mColorLabel->move(mLabel->pos() + QPoint(0, 20));
+ mColorLabel->move(mLabel->pos() + TQPoint(0, 20));
mCurrentCursor = mSouthCursor;
break;
case East:
mLabel->move(4, 4);
- mColorLabel->move(mLabel->pos() + QPoint(0, 20));
+ mColorLabel->move(mLabel->pos() + TQPoint(0, 20));
mCurrentCursor = mEastCursor;
break;
case West:
mLabel->move(width()-mLabel->width()-4, 4);
- mColorLabel->move(mLabel->pos() + QPoint(-5, 20));
+ mColorLabel->move(mLabel->pos() + TQPoint(-5, 20));
mCurrentCursor = mWestCursor;
break;
}
@@ -317,7 +317,7 @@ void KLineal::reLength(int percentOfScreen) {
if (percentOfScreen < 10) {
return;
}
- QRect r = KGlobalSettings::desktopGeometry(this);
+ TQRect r = KGlobalSettings::desktopGeometry(this);
if (mOrientation == North || mOrientation == South) {
mLongEdgeLen = r.width() * percentOfScreen / 100;
@@ -347,9 +347,9 @@ void KLineal::setFullLength() {
reLength(100);
}
void KLineal::choseColor() {
- QRect r = KGlobalSettings::desktopGeometry(this);
+ TQRect r = KGlobalSettings::desktopGeometry(this);
- QPoint pos = QCursor::pos();
+ TQPoint pos = TQCursor::pos();
if (pos.x() + mColorSelector.width() > r.width()) {
pos.setX(r.width() - mColorSelector.width());
}
@@ -362,14 +362,14 @@ void KLineal::choseColor() {
mColorSelector.setDefaultColor( DEFAULT_RULER_COLOR );
mColorSelector.show();
- connect(&mColorSelector, SIGNAL(okClicked()), this, SLOT(setColor()));
- connect(&mColorSelector, SIGNAL(yesClicked()), this, SLOT(setColor()));
- connect(&mColorSelector, SIGNAL(closeClicked()), this, SLOT(setColor()));
- connect(&mColorSelector, SIGNAL(defaultClicked()), this, SLOT(setColor()));
- connect(&mColorSelector, SIGNAL(colorSelected(const QColor&)), this, SLOT(setColor(const QColor&)));
+ connect(&mColorSelector, TQT_SIGNAL(okClicked()), this, TQT_SLOT(setColor()));
+ connect(&mColorSelector, TQT_SIGNAL(yesClicked()), this, TQT_SLOT(setColor()));
+ connect(&mColorSelector, TQT_SIGNAL(closeClicked()), this, TQT_SLOT(setColor()));
+ connect(&mColorSelector, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(setColor()));
+ connect(&mColorSelector, TQT_SIGNAL(colorSelected(const TQColor&)), this, TQT_SLOT(setColor(const TQColor&)));
/*
- connect(&mColorSelector, SIGNAL(cancelPressed()), this, SLOT(restoreColor()));
- connect(&mColorSelector, SIGNAL(okPressed()), this, SLOT(saveColor()));
+ connect(&mColorSelector, TQT_SIGNAL(cancelPressed()), this, TQT_SLOT(restoreColor()));
+ connect(&mColorSelector, TQT_SIGNAL(okPressed()), this, TQT_SLOT(saveColor()));
*/
}
@@ -377,7 +377,7 @@ void KLineal::choseColor() {
* slot to choose a font
*/
void KLineal::choseFont() {
- QFont font = mScaleFont;
+ TQFont font = mScaleFont;
int result = KFontDialog::getFont(font, false, this);
if (result == KFontDialog::Accepted) {
setFont(font);
@@ -387,7 +387,7 @@ void KLineal::choseFont() {
/**
* set the ruler color to the previously selected color
*/
-void KLineal::setFont(QFont &font) {
+void KLineal::setFont(TQFont &font) {
mScaleFont = font;
saveSettings();
repaint();
@@ -405,7 +405,7 @@ void KLineal::setColor() {
/**
* set the ruler color to some color
*/
-void KLineal::setColor(const QColor &color) {
+void KLineal::setColor(const TQColor &color) {
mColor = color;
if ( !mColor.isValid() )
mColor = DEFAULT_RULER_COLOR;
@@ -418,11 +418,11 @@ void KLineal::setColor(const QColor &color) {
void KLineal::saveSettings() {
KConfig *cfg = kapp->config(); // new KConfig(locateLocal("config", kapp->name()+"rc"));
if (cfg) {
- QColor color = mColor;
+ TQColor color = mColor;
cfg->setGroup(CFG_GROUP_SETTINGS);
- cfg->writeEntry(QString(CFG_KEY_BGCOLOR), color);
- cfg->writeEntry(QString(CFG_KEY_SCALE_FONT), mScaleFont);
- cfg->writeEntry(QString(CFG_KEY_LENGTH), mLongEdgeLen);
+ cfg->writeEntry(TQString(CFG_KEY_BGCOLOR), color);
+ cfg->writeEntry(TQString(CFG_KEY_SCALE_FONT), mScaleFont);
+ cfg->writeEntry(TQString(CFG_KEY_LENGTH), mLongEdgeLen);
cfg->sync();
}
}
@@ -437,21 +437,21 @@ void KLineal::restoreColor() {
* lets the context menu appear at current cursor position
*/
void KLineal::showMenu() {
- QPoint pos = QCursor::pos();
+ TQPoint pos = TQCursor::pos();
mMenu->popup(pos);
}
/**
* overwritten to switch the value label and line cursor on
*/
-void KLineal::enterEvent(QEvent * /*inEvent*/) {
+void KLineal::enterEvent(TQEvent * /*inEvent*/) {
if (!mDragging) showLabel();
}
/**
* overwritten to switch the value label and line cursor off
*/
-void KLineal::leaveEvent(QEvent * /*inEvent*/) {
- if (!geometry().contains(QCursor::pos())) {
+void KLineal::leaveEvent(TQEvent * /*inEvent*/) {
+ if (!geometry().contains(TQCursor::pos())) {
hideLabel();
}
}
@@ -474,8 +474,8 @@ void KLineal::hideLabel() {
* updates the current value label
*/
void KLineal::adjustLabel() {
- QString s;
- QPoint cpos = QCursor::pos();
+ TQString s;
+ TQPoint cpos = TQCursor::pos();
switch (mOrientation) {
case North:
s.sprintf("%d px", cpos.x()-x());
@@ -492,8 +492,8 @@ void KLineal::adjustLabel() {
}
mLabel->setText(s);
}
-void KLineal::keyPressEvent(QKeyEvent *e) {
- QPoint dist(0,0);
+void KLineal::keyPressEvent(TQKeyEvent *e) {
+ TQPoint dist(0,0);
switch (e->key()) {
case Key_F1:
kapp->invokeHelp();
@@ -518,17 +518,17 @@ void KLineal::keyPressEvent(QKeyEvent *e) {
dist *= 10;
}
move(pos()+dist);
- KNotifyClient::event(0, "cursormove", QString::null);
+ KNotifyClient::event(0, "cursormove", TQString::null);
}
/**
* overwritten to handle the line cursor which is a seperate widget outside the main
* window. Also used for dragging.
*/
-void KLineal::mouseMoveEvent(QMouseEvent * /*inEvent*/) {
+void KLineal::mouseMoveEvent(TQMouseEvent * /*inEvent*/) {
if (mDragging && this == mouseGrabber()) {
- move(QCursor::pos() - mDragOffset);
+ move(TQCursor::pos() - mDragOffset);
} else {
- QPoint p = QCursor::pos();
+ TQPoint p = TQCursor::pos();
switch (mOrientation) {
case North:
p.setY(p.y()-46);
@@ -544,7 +544,7 @@ void KLineal::mouseMoveEvent(QMouseEvent * /*inEvent*/) {
break;
}
// cerr << p.x()-x() << "," << p.y()-y() << ": " << KColorDialog::grabColor(p).name() << endl;
- QColor color = KColorDialog::grabColor(p);
+ TQColor color = KColorDialog::grabColor(p);
int h, s, v;
color.hsv(&h, &s, &v);
mColorLabel->setText(color.name().upper());
@@ -555,8 +555,8 @@ void KLineal::mouseMoveEvent(QMouseEvent * /*inEvent*/) {
v = 0;
}
color.setHsv(h, s, v);
- QPalette palette = mColorLabel->palette();
- palette.setColor(QColorGroup::Foreground, color);
+ TQPalette palette = mColorLabel->palette();
+ palette.setColor(TQColorGroup::Foreground, color);
mColorLabel->setPalette(palette);
adjustLabel();
}
@@ -565,12 +565,12 @@ void KLineal::mouseMoveEvent(QMouseEvent * /*inEvent*/) {
/**
* overwritten for dragging and contect menu
*/
-void KLineal::mousePressEvent(QMouseEvent *inEvent) {
- mLastClickPos = QCursor::pos();
+void KLineal::mousePressEvent(TQMouseEvent *inEvent) {
+ mLastClickPos = TQCursor::pos();
hideLabel();
- QRect gr = geometry();
- mDragOffset = mLastClickPos - QPoint(gr.left(), gr.top());
+ TQRect gr = geometry();
+ mDragOffset = mLastClickPos - TQPoint(gr.left(), gr.top());
if (inEvent->button() == LeftButton) {
if (!mDragging) {
grabMouse(KCursor::sizeAllCursor());
@@ -586,7 +586,7 @@ void KLineal::mousePressEvent(QMouseEvent *inEvent) {
/**
* overwritten for dragging
*/
-void KLineal::mouseReleaseEvent(QMouseEvent * /*inEvent*/) {
+void KLineal::mouseReleaseEvent(TQMouseEvent * /*inEvent*/) {
if (mDragging) {
mDragging = FALSE;
releaseMouse();
@@ -596,12 +596,12 @@ void KLineal::mouseReleaseEvent(QMouseEvent * /*inEvent*/) {
/**
* draws the scale according to the orientation
*/
-void KLineal::drawScale(QPainter &painter) {
+void KLineal::drawScale(TQPainter &painter) {
painter.setPen(black);
- QFont font = mScaleFont;
+ TQFont font = mScaleFont;
// font.setPixelSize(9);
painter.setFont(font);
- QFontMetrics metrics = painter.fontMetrics();
+ TQFontMetrics metrics = painter.fontMetrics();
int longCoo;
int longLen;
int shortStart;
@@ -658,7 +658,7 @@ void KLineal::drawScale(QPainter &painter) {
} else {
len = 15;
}
- QString units;
+ TQString units;
int digits;
if (hundred == 100 || mOrientation == West || mOrientation == East) {
digits = longCoo;
@@ -666,7 +666,7 @@ void KLineal::drawScale(QPainter &painter) {
digits = longCoo % 100;
}
units.sprintf("%d", digits);
- QSize textSize = metrics.size(SingleLine, units);
+ TQSize textSize = metrics.size(SingleLine, units);
int tw = textSize.width();
int th = textSize.height();
switch (mOrientation) {
@@ -736,8 +736,8 @@ void KLineal::drawScale(QPainter &painter) {
/**
* actually draws the ruler
*/
-void KLineal::paintEvent(QPaintEvent * /*inEvent*/) {
- QPainter painter;
+void KLineal::paintEvent(TQPaintEvent * /*inEvent*/) {
+ TQPainter painter;
painter.begin(this);
drawScale(painter);
painter.end();
diff --git a/kruler/klineal.h b/kruler/klineal.h
index 6fcf7015..ce723cce 100644
--- a/kruler/klineal.h
+++ b/kruler/klineal.h
@@ -25,59 +25,59 @@
#include <kcolordialog.h>
#include <kfontdialog.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qwidget.h>
-#include <qcursor.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqwidget.h>
+#include <tqcursor.h>
class KLineal : public KMainWindow {
Q_OBJECT
public:
enum { North=0, West=1, South=2, East=3 };
/** constructor */
- KLineal(QWidget*parent=0,const char* name=0);
+ KLineal(TQWidget*parent=0,const char* name=0);
/** destructor */
~KLineal();
void move(int x, int y);
- void move(const QPoint &p);
- QPoint pos();
+ void move(const TQPoint &p);
+ TQPoint pos();
int x();
int y();
protected:
- void keyPressEvent(QKeyEvent *e);
- void mousePressEvent(QMouseEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
- void mouseMoveEvent(QMouseEvent *e);
- void paintEvent(QPaintEvent *e);
- void enterEvent(QEvent *e);
- void leaveEvent(QEvent *e);
+ void keyPressEvent(TQKeyEvent *e);
+ void mousePressEvent(TQMouseEvent *e);
+ void mouseReleaseEvent(TQMouseEvent *e);
+ void mouseMoveEvent(TQMouseEvent *e);
+ void paintEvent(TQPaintEvent *e);
+ void enterEvent(TQEvent *e);
+ void leaveEvent(TQEvent *e);
void setupBackground();
private:
- void drawScale(QPainter &painter);
+ void drawScale(TQPainter &painter);
void reLength(int percentOfScreen);
bool mDragging;
- QPoint mLastClickPos;
- QPoint mDragOffset;
- QLabel *mLabel;
- QLabel *mColorLabel;
- QFrame *mColorRect;
+ TQPoint mLastClickPos;
+ TQPoint mDragOffset;
+ TQLabel *mLabel;
+ TQLabel *mColorLabel;
+ TQFrame *mColorRect;
int mOrientation;
int mLongEdgeLen;
int mShortEdgeLen;
KPopupMenu *mMenu;
KPopupMenu *mLenMenu;
- QColor mColor;
- QColor mStoredColor;
- QCursor mCurrentCursor;
- QCursor mNorthCursor;
- QCursor mEastCursor;
- QCursor mWestCursor;
- QCursor mSouthCursor;
- QCursor mDragCursor;
+ TQColor mColor;
+ TQColor mStoredColor;
+ TQCursor mCurrentCursor;
+ TQCursor mNorthCursor;
+ TQCursor mEastCursor;
+ TQCursor mWestCursor;
+ TQCursor mSouthCursor;
+ TQCursor mDragCursor;
KColorDialog mColorSelector;
- QFont mScaleFont;
+ TQFont mScaleFont;
bool _clicked;
public slots:
void setOrientation(int);
@@ -96,8 +96,8 @@ public slots:
void setTallLength();
void setFullLength();
void setColor();
- void setFont(QFont &);
- void setColor(const QColor &color);
+ void setFont(TQFont &);
+ void setColor(const TQColor &color);
void choseColor();
void choseFont();
void restoreColor();
diff --git a/ksnapshot/ksnapshot.cpp b/ksnapshot/ksnapshot.cpp
index a0e1d06f..f8ad1977 100644
--- a/ksnapshot/ksnapshot.cpp
+++ b/ksnapshot/ksnapshot.cpp
@@ -23,11 +23,11 @@
#include <ksavefile.h>
#include <ktempfile.h>
-#include <qbitmap.h>
-#include <qdragobject.h>
-#include <qimage.h>
-#include <qclipboard.h>
-#include <qvbox.h>
+#include <tqbitmap.h>
+#include <tqdragobject.h>
+#include <tqimage.h>
+#include <tqclipboard.h>
+#include <tqvbox.h>
#include <kaccel.h>
#include <knotifyclient.h>
@@ -36,11 +36,11 @@
#include <kpushbutton.h>
#include <kstartupinfo.h>
-#include <qcursor.h>
-#include <qregexp.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
-#include <qwhatsthis.h>
+#include <tqcursor.h>
+#include <tqregexp.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqwhatsthis.h>
#include <stdlib.h>
@@ -58,32 +58,32 @@
#define kApp KApplication::kApplication()
-KSnapshot::KSnapshot(QWidget *parent, const char *name, bool grabCurrent)
+KSnapshot::KSnapshot(TQWidget *parent, const char *name, bool grabCurrent)
: DCOPObject("interface"),
- KDialogBase(parent, name, true, QString::null, Help|User1, User1,
+ KDialogBase(parent, name, true, TQString::null, Help|User1, User1,
true, KStdGuiItem::quit() )
{
- grabber = new QWidget( 0, 0, WStyle_Customize | WX11BypassWM );
+ grabber = new TQWidget( 0, 0, WStyle_Customize | WX11BypassWM );
grabber->move( -1000, -1000 );
grabber->installEventFilter( this );
KStartupInfo::appStarted();
- QVBox *vbox = makeVBoxMainWidget();
+ TQVBox *vbox = makeVBoxMainWidget();
mainWidget = new KSnapshotWidget( vbox, "mainWidget" );
- connect(mainWidget, SIGNAL(startImageDrag()), SLOT(slotDragSnapshot()));
+ connect(mainWidget, TQT_SIGNAL(startImageDrag()), TQT_SLOT(slotDragSnapshot()));
- connect( mainWidget, SIGNAL( newClicked() ), SLOT( slotGrab() ) );
- connect( mainWidget, SIGNAL( saveClicked() ), SLOT( slotSaveAs() ) );
- connect( mainWidget, SIGNAL( printClicked() ), SLOT( slotPrint() ) );
- connect( mainWidget, SIGNAL( copyClicked() ), SLOT( slotCopy() ) );
+ connect( mainWidget, TQT_SIGNAL( newClicked() ), TQT_SLOT( slotGrab() ) );
+ connect( mainWidget, TQT_SIGNAL( saveClicked() ), TQT_SLOT( slotSaveAs() ) );
+ connect( mainWidget, TQT_SIGNAL( printClicked() ), TQT_SLOT( slotPrint() ) );
+ connect( mainWidget, TQT_SIGNAL( copyClicked() ), TQT_SLOT( slotCopy() ) );
grabber->show();
grabber->grabMouse( waitCursor );
if ( !grabCurrent )
- snapshot = QPixmap::grabWindow( qt_xrootwin() );
+ snapshot = TQPixmap::grabWindow( qt_xrootwin() );
else {
mainWidget->setMode( WindowUnderCursor );
mainWidget->setIncludeDecorations( true );
@@ -99,44 +99,44 @@ KSnapshot::KSnapshot(QWidget *parent, const char *name, bool grabCurrent)
mainWidget->setDelay(conf->readNumEntry("delay",0));
mainWidget->setMode( conf->readNumEntry( "mode", 0 ) );
mainWidget->setIncludeDecorations(conf->readBoolEntry("includeDecorations",true));
- filename = KURL::fromPathOrURL( conf->readPathEntry( "filename", QDir::currentDirPath()+"/"+i18n("snapshot")+"1.png" ));
+ filename = KURL::fromPathOrURL( conf->readPathEntry( "filename", TQDir::currentDirPath()+"/"+i18n("snapshot")+"1.png" ));
// Make sure the name is not already being used
while(KIO::NetAccess::exists( filename, false, this )) {
autoincFilename();
}
- connect( &grabTimer, SIGNAL( timeout() ), this, SLOT( grabTimerDone() ) );
- connect( &updateTimer, SIGNAL( timeout() ), this, SLOT( updatePreview() ) );
- QTimer::singleShot( 0, this, SLOT( updateCaption() ) );
+ connect( &grabTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( grabTimerDone() ) );
+ connect( &updateTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( updatePreview() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( updateCaption() ) );
KHelpMenu *helpMenu = new KHelpMenu(this, KGlobal::instance()->aboutData(), false);
- QPushButton *helpButton = actionButton( Help );
+ TQPushButton *helpButton = actionButton( Help );
helpButton->setPopup(helpMenu->menu());
KAccel* accel = new KAccel(this);
- accel->insert(KStdAccel::Quit, kapp, SLOT(quit()));
+ accel->insert(KStdAccel::Quit, kapp, TQT_SLOT(quit()));
accel->insert( "QuickSave", i18n("Quick Save Snapshot &As..."),
i18n("Save the snapshot to the file specified by the user without showing the file dialog."),
- CTRL+SHIFT+Key_S, this, SLOT(slotSave()));
- accel->insert(KStdAccel::Save, this, SLOT(slotSaveAs()));
-// accel->insert(KShortcut(CTRL+Key_A), this, SLOT(slotSaveAs()));
+ CTRL+SHIFT+Key_S, this, TQT_SLOT(slotSave()));
+ accel->insert(KStdAccel::Save, this, TQT_SLOT(slotSaveAs()));
+// accel->insert(KShortcut(CTRL+Key_A), this, TQT_SLOT(slotSaveAs()));
accel->insert( "SaveAs", i18n("Save Snapshot &As..."),
i18n("Save the snapshot to the file specified by the user."),
- CTRL+Key_A, this, SLOT(slotSaveAs()));
- accel->insert(KStdAccel::Print, this, SLOT(slotPrint()));
- accel->insert(KStdAccel::New, this, SLOT(slotGrab()));
- accel->insert(KStdAccel::Copy, this, SLOT(slotCopy()));
+ CTRL+Key_A, this, TQT_SLOT(slotSaveAs()));
+ accel->insert(KStdAccel::Print, this, TQT_SLOT(slotPrint()));
+ accel->insert(KStdAccel::New, this, TQT_SLOT(slotGrab()));
+ accel->insert(KStdAccel::Copy, this, TQT_SLOT(slotCopy()));
- accel->insert( "Quit2", Key_Q, this, SLOT(slotSave()));
- accel->insert( "Save2", Key_S, this, SLOT(slotSaveAs()));
- accel->insert( "Print2", Key_P, this, SLOT(slotPrint()));
- accel->insert( "New2", Key_N, this, SLOT(slotGrab()));
- accel->insert( "New3", Key_Space, this, SLOT(slotGrab()));
+ accel->insert( "Quit2", Key_Q, this, TQT_SLOT(slotSave()));
+ accel->insert( "Save2", Key_S, this, TQT_SLOT(slotSaveAs()));
+ accel->insert( "Print2", Key_P, this, TQT_SLOT(slotPrint()));
+ accel->insert( "New2", Key_N, this, TQT_SLOT(slotGrab()));
+ accel->insert( "New3", Key_Space, this, TQT_SLOT(slotGrab()));
setEscapeButton( User1 );
- connect( this, SIGNAL( user1Clicked() ), SLOT( reject() ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( reject() ) );
mainWidget->btnNew->setFocus();
}
@@ -145,7 +145,7 @@ KSnapshot::~KSnapshot()
{
}
-void KSnapshot::resizeEvent( QResizeEvent *event)
+void KSnapshot::resizeEvent( TQResizeEvent *event)
{
if( !updateTimer.isActive() )
updateTimer.start(200, true);
@@ -153,7 +153,7 @@ void KSnapshot::resizeEvent( QResizeEvent *event)
updateTimer.changeInterval(200);
}
-bool KSnapshot::save( const QString &filename )
+bool KSnapshot::save( const TQString &filename )
{
return save( KURL::fromPathOrURL( filename ));
}
@@ -161,15 +161,15 @@ bool KSnapshot::save( const QString &filename )
bool KSnapshot::save( const KURL& url )
{
if ( KIO::NetAccess::exists( url, false, this ) ) {
- const QString title = i18n( "File Exists" );
- const QString text = i18n( "<qt>Do you really want to overwrite <b>%1</b>?</qt>" ).arg(url.prettyURL());
+ const TQString title = i18n( "File Exists" );
+ const TQString text = i18n( "<qt>Do you really want to overwrite <b>%1</b>?</qt>" ).arg(url.prettyURL());
if (KMessageBox::Continue != KMessageBox::warningContinueCancel( this, text, title, i18n("Overwrite") ) )
{
return false;
}
}
- QString type( KImageIO::type(url.path()) );
+ TQString type( KImageIO::type(url.path()) );
if ( type.isNull() )
type = "PNG";
@@ -193,12 +193,12 @@ bool KSnapshot::save( const KURL& url )
}
}
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if ( !ok ) {
kdWarning() << "KSnapshot was unable to save the snapshot" << endl;
- QString caption = i18n("Unable to save image");
- QString text = i18n("KSnapshot was unable to save the image to\n%1.")
+ TQString caption = i18n("Unable to save image");
+ TQString text = i18n("KSnapshot was unable to save the image to\n%1.")
.arg(url.prettyURL());
KMessageBox::error(this, text, caption);
}
@@ -216,7 +216,7 @@ void KSnapshot::slotSave()
void KSnapshot::slotSaveAs()
{
- QStringList mimetypes = KImageIO::mimeTypes( KImageIO::Writing );
+ TQStringList mimetypes = KImageIO::mimeTypes( KImageIO::Writing );
KFileDialog dlg( filename.url(), mimetypes.join(" "), this, "filedialog", true);
dlg.setOperationMode( KFileDialog::Saving );
@@ -241,13 +241,13 @@ void KSnapshot::slotSaveAs()
void KSnapshot::slotCopy()
{
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
cb->setPixmap( snapshot );
}
void KSnapshot::slotDragSnapshot()
{
- QDragObject *drobj = new QImageDrag(snapshot.convertToImage(), this);
+ TQDragObject *drobj = new TQImageDrag(snapshot.convertToImage(), this);
drobj->setPixmap(mainWidget->preview());
drobj->dragCopy();
}
@@ -261,8 +261,8 @@ void KSnapshot::slotGrab()
else {
if ( mainWidget->mode() == Region ) {
rgnGrab = new RegionGrabber();
- connect( rgnGrab, SIGNAL( regionGrabbed( const QPixmap & ) ),
- SLOT( slotRegionGrabbed( const QPixmap & ) ) );
+ connect( rgnGrab, TQT_SIGNAL( regionGrabbed( const TQPixmap & ) ),
+ TQT_SLOT( slotRegionGrabbed( const TQPixmap & ) ) );
}
else {
grabber->show();
@@ -285,8 +285,8 @@ void KSnapshot::slotPrint()
{
qApp->processEvents();
- QPainter painter(&printer);
- QPaintDeviceMetrics metrics(painter.device());
+ TQPainter painter(&printer);
+ TQPaintDeviceMetrics metrics(painter.device());
float w = snapshot.width();
float dw = w - metrics.width();
@@ -299,7 +299,7 @@ void KSnapshot::slotPrint()
if ( scale ) {
- QImage img = snapshot.convertToImage();
+ TQImage img = snapshot.convertToImage();
qApp->processEvents();
float newh, neww;
@@ -312,7 +312,7 @@ void KSnapshot::slotPrint()
neww = newh/h*w;
}
- img = img.smoothScale( int(neww), int(newh), QImage::ScaleMin );
+ img = img.smoothScale( int(neww), int(newh), TQImage::ScaleMin );
qApp->processEvents();
int x = (metrics.width()-img.width())/2;
@@ -330,7 +330,7 @@ void KSnapshot::slotPrint()
qApp->processEvents();
}
-void KSnapshot::slotRegionGrabbed( const QPixmap &pix )
+void KSnapshot::slotRegionGrabbed( const TQPixmap &pix )
{
if ( !pix.isNull() )
{
@@ -341,11 +341,11 @@ void KSnapshot::slotRegionGrabbed( const QPixmap &pix )
}
delete rgnGrab;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
show();
}
-void KSnapshot::slotWindowGrabbed( const QPixmap &pix )
+void KSnapshot::slotWindowGrabbed( const TQPixmap &pix )
{
if ( !pix.isNull() )
{
@@ -355,11 +355,11 @@ void KSnapshot::slotWindowGrabbed( const QPixmap &pix )
updateCaption();
}
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
show();
}
-void KSnapshot::closeEvent( QCloseEvent * e )
+void KSnapshot::closeEvent( TQCloseEvent * e )
{
KConfig *conf=KGlobal::config();
conf->setGroup("GENERAL");
@@ -367,16 +367,16 @@ void KSnapshot::closeEvent( QCloseEvent * e )
conf->writeEntry("mode",mainWidget->mode());
conf->writeEntry("includeDecorations",mainWidget->includeDecorations());
KURL url = filename;
- url.setPass( QString::null );
+ url.setPass( TQString::null );
conf->writePathEntry("filename",url.url());
e->accept();
}
-bool KSnapshot::eventFilter( QObject* o, QEvent* e)
+bool KSnapshot::eventFilter( TQObject* o, TQEvent* e)
{
- if ( o == grabber && e->type() == QEvent::MouseButtonPress ) {
- QMouseEvent* me = (QMouseEvent*) e;
- if ( QWidget::mouseGrabber() != grabber )
+ if ( o == grabber && e->type() == TQEvent::MouseButtonPress ) {
+ TQMouseEvent* me = (TQMouseEvent*) e;
+ if ( TQWidget::mouseGrabber() != grabber )
return false;
if ( me->button() == LeftButton )
performGrab();
@@ -387,18 +387,18 @@ bool KSnapshot::eventFilter( QObject* o, QEvent* e)
void KSnapshot::autoincFilename()
{
// Extract the filename from the path
- QString name= filename.fileName();
+ TQString name= filename.fileName();
// If the name contains a number then increment it
- QRegExp numSearch("[0-9]+");
+ TQRegExp numSearch("[0-9]+");
// Does it have a number?
int start = numSearch.search(name);
if (start != -1) {
// It has a number, increment it
int len = numSearch.matchedLength();
- QString numAsStr= name.mid(start, len);
- QString number = QString::number(numAsStr.toInt() + 1);
+ TQString numAsStr= name.mid(start, len);
+ TQString number = TQString::number(numAsStr.toInt() + 1);
number = number.rightJustify( len, '0');
name.replace(start, len, number );
}
@@ -430,8 +430,8 @@ void KSnapshot::grabTimerDone()
{
if ( mainWidget->mode() == Region ) {
rgnGrab = new RegionGrabber();
- connect( rgnGrab, SIGNAL( regionGrabbed( const QPixmap & ) ),
- SLOT( slotRegionGrabbed( const QPixmap & ) ) );
+ connect( rgnGrab, TQT_SIGNAL( regionGrabbed( const TQPixmap & ) ),
+ TQT_SLOT( slotRegionGrabbed( const TQPixmap & ) ) );
}
else {
performGrab();
@@ -446,18 +446,18 @@ void KSnapshot::performGrab()
grabTimer.stop();
if ( mainWidget->mode() == ChildWindow ) {
WindowGrabber wndGrab;
- connect( &wndGrab, SIGNAL( windowGrabbed( const QPixmap & ) ),
- SLOT( slotWindowGrabbed( const QPixmap & ) ) );
+ connect( &wndGrab, TQT_SIGNAL( windowGrabbed( const TQPixmap & ) ),
+ TQT_SLOT( slotWindowGrabbed( const TQPixmap & ) ) );
wndGrab.exec();
}
else if ( mainWidget->mode() == WindowUnderCursor ) {
snapshot = WindowGrabber::grabCurrent( mainWidget->includeDecorations() );
}
else {
- snapshot = QPixmap::grabWindow( qt_xrootwin() );
+ snapshot = TQPixmap::grabWindow( qt_xrootwin() );
}
updatePreview();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
modified = true;
updateCaption();
show();
@@ -473,7 +473,7 @@ int KSnapshot::timeout()
return mainWidget->delay();
}
-void KSnapshot::setURL( const QString &url )
+void KSnapshot::setURL( const TQString &url )
{
KURL newURL = KURL::fromPathOrURL( url );
if ( newURL == filename )
@@ -500,7 +500,7 @@ void KSnapshot::updateCaption()
void KSnapshot::slotMovePointer(int x, int y)
{
- QCursor::setPos( x, y );
+ TQCursor::setPos( x, y );
}
void KSnapshot::exit()
diff --git a/ksnapshot/ksnapshot.h b/ksnapshot/ksnapshot.h
index 486c0a1b..81dadd6d 100644
--- a/ksnapshot/ksnapshot.h
+++ b/ksnapshot/ksnapshot.h
@@ -4,13 +4,13 @@
#define KSNAPSHOT_H
#include "ksnapshotiface.h"
-#include <qbitmap.h>
-#include <qcursor.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qstyle.h>
-#include <qtimer.h>
+#include <tqbitmap.h>
+#include <tqcursor.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
#include <dcopclient.h>
#include <kglobalsettings.h>
@@ -25,67 +25,67 @@ class KSnapshotPreview : public QLabel
Q_OBJECT
public:
- KSnapshotPreview(QWidget *parent, const char *name = 0)
- : QLabel(parent, name)
+ KSnapshotPreview(TQWidget *parent, const char *name = 0)
+ : TQLabel(parent, name)
{
setAlignment(AlignHCenter | AlignVCenter);
- setCursor(QCursor(Qt::PointingHandCursor));
+ setCursor(TQCursor(Qt::PointingHandCursor));
}
virtual ~KSnapshotPreview() {}
- void setPixmap(const QPixmap& pm)
+ void setPixmap(const TQPixmap& pm)
{
// if this looks convoluted, that's because it is. drawing a PE_SizeGrip
// does unexpected things when painting directly onto the pixmap
- QPixmap pixmap(pm);
- QPixmap handle(15, 15);
- QBitmap mask(15, 15, true);
+ TQPixmap pixmap(pm);
+ TQPixmap handle(15, 15);
+ TQBitmap mask(15, 15, true);
{
- QPainter p(&mask);
- style().drawPrimitive(QStyle::PE_SizeGrip, &p, QRect(0, 0, 15, 15), palette().active());
+ TQPainter p(&mask);
+ style().drawPrimitive(TQStyle::PE_SizeGrip, &p, TQRect(0, 0, 15, 15), palette().active());
p.end();
handle.setMask(mask);
}
{
- QPainter p(&handle);
- style().drawPrimitive(QStyle::PE_SizeGrip, &p, QRect(0, 0, 15, 15), palette().active());
+ TQPainter p(&handle);
+ style().drawPrimitive(TQStyle::PE_SizeGrip, &p, TQRect(0, 0, 15, 15), palette().active());
p.end();
}
- QRect rect(pixmap.width() - 16, pixmap.height() - 16, 15, 15);
- QPainter p(&pixmap);
+ TQRect rect(pixmap.width() - 16, pixmap.height() - 16, 15, 15);
+ TQPainter p(&pixmap);
p.drawPixmap(rect, handle);
p.end();
- QLabel::setPixmap(pixmap);
+ TQLabel::setPixmap(pixmap);
}
signals:
void startDrag();
protected:
- void mousePressEvent(QMouseEvent * e)
+ void mousePressEvent(TQMouseEvent * e)
{
mClickPt = e->pos();
}
- void mouseMoveEvent(QMouseEvent * e)
+ void mouseMoveEvent(TQMouseEvent * e)
{
- if (mClickPt != QPoint(0, 0) &&
+ if (mClickPt != TQPoint(0, 0) &&
(e->pos() - mClickPt).manhattanLength() > KGlobalSettings::dndEventDelay())
{
- mClickPt = QPoint(0, 0);
+ mClickPt = TQPoint(0, 0);
emit startDrag();
}
}
- void mouseReleaseEvent(QMouseEvent * /*e*/)
+ void mouseReleaseEvent(TQMouseEvent * /*e*/)
{
- mClickPt = QPoint(0, 0);
+ mClickPt = TQPoint(0, 0);
}
- QPoint mClickPt;
+ TQPoint mClickPt;
};
class KSnapshot : public KDialogBase, virtual public KSnapshotIface
@@ -93,13 +93,13 @@ class KSnapshot : public KDialogBase, virtual public KSnapshotIface
Q_OBJECT
public:
- KSnapshot(QWidget *parent= 0, const char *name= 0, bool grabCurrent=false);
+ KSnapshot(TQWidget *parent= 0, const char *name= 0, bool grabCurrent=false);
~KSnapshot();
enum CaptureMode { FullScreen=0, WindowUnderCursor=1, Region=2, ChildWindow=3 };
- bool save( const QString &filename );
- QString url() const { return filename.url(); }
+ bool save( const TQString &filename );
+ TQString url() const { return filename.url(); }
protected slots:
void slotGrab();
@@ -110,24 +110,24 @@ protected slots:
void slotMovePointer( int x, int y );
void setTime(int newTime);
- void setURL(const QString &newURL);
+ void setURL(const TQString &newURL);
void setGrabMode( int m );
void exit();
protected:
void reject() { close(); }
- virtual void closeEvent( QCloseEvent * e );
- void resizeEvent(QResizeEvent*);
- bool eventFilter( QObject*, QEvent* );
+ virtual void closeEvent( TQCloseEvent * e );
+ void resizeEvent(TQResizeEvent*);
+ bool eventFilter( TQObject*, TQEvent* );
private slots:
void grabTimerDone();
void slotDragSnapshot();
void updateCaption();
void updatePreview();
- void slotRegionGrabbed( const QPixmap & );
- void slotWindowGrabbed( const QPixmap & );
+ void slotRegionGrabbed( const TQPixmap & );
+ void slotWindowGrabbed( const TQPixmap & );
private:
bool save( const KURL& url );
@@ -136,10 +136,10 @@ private:
int grabMode();
int timeout();
- QPixmap snapshot;
- QTimer grabTimer;
- QTimer updateTimer;
- QWidget* grabber;
+ TQPixmap snapshot;
+ TQTimer grabTimer;
+ TQTimer updateTimer;
+ TQWidget* grabber;
KURL filename;
KSnapshotWidget *mainWidget;
RegionGrabber *rgnGrab;
diff --git a/ksnapshot/ksnapshotiface.h b/ksnapshot/ksnapshotiface.h
index 6b1f3477..5136b0ba 100644
--- a/ksnapshot/ksnapshotiface.h
+++ b/ksnapshot/ksnapshotiface.h
@@ -19,7 +19,7 @@ class KSnapshotIface : virtual public DCOPObject
k_dcop:
/** the current filename (as a URL) that will
be used to save to */
- virtual QString url() const = 0;
+ virtual TQString url() const = 0;
/** Grab an image **/
virtual void slotGrab() = 0;
@@ -31,7 +31,7 @@ class KSnapshotIface : virtual public DCOPObject
virtual void slotSave() = 0;
/** Save the image to the specified filename */
- virtual bool save(const QString &filename) = 0;
+ virtual bool save(const TQString &filename) = 0;
/** Saves image as **/
virtual void slotSaveAs() = 0;
@@ -46,7 +46,7 @@ class KSnapshotIface : virtual public DCOPObject
virtual int timeout() = 0;
/** Set the URL to the file to save **/
- virtual void setURL(const QString &newURL) = 0;
+ virtual void setURL(const TQString &newURL) = 0;
/** Set the ability to grab the entire screen, just the window
containing the mouse, or a region */
diff --git a/ksnapshot/ksnapshotwidget.ui.h b/ksnapshot/ksnapshotwidget.ui.h
index d7e757f5..ab811bf2 100644
--- a/ksnapshot/ksnapshotwidget.ui.h
+++ b/ksnapshot/ksnapshotwidget.ui.h
@@ -32,21 +32,21 @@ void KSnapshotWidget::slotModeChanged( int mode )
}
-void KSnapshotWidget::setPreview( const QPixmap &pm )
+void KSnapshotWidget::setPreview( const TQPixmap &pm )
{
- QImage img = pm.convertToImage();
+ TQImage img = pm.convertToImage();
double r1 = ( ( double ) pm.height() ) / pm.width();
if ( r1 * previewWidth() < previewHeight() )
img = img.smoothScale( previewWidth(),
int( previewWidth() * r1 ),
- QImage::ScaleMin );
+ TQImage::ScaleMin );
else
img = img.smoothScale( ( int ) ( ( ( double )previewHeight() ) / r1 ),
- previewHeight(), QImage::ScaleMin );
+ previewHeight(), TQImage::ScaleMin );
- QToolTip::remove( lblImage );
- QToolTip::add( lblImage,
- QString( "Preview of the snapshot image (%1 x %2)" )
+ TQToolTip::remove( lblImage );
+ TQToolTip::add( lblImage,
+ TQString( "Preview of the snapshot image (%1 x %2)" )
.arg( pm.width() ).arg( pm.height() ) );
lblImage->setPixmap( img );
@@ -115,7 +115,7 @@ void KSnapshotWidget::slotStartDrag()
}
-QPixmap KSnapshotWidget::preview()
+TQPixmap KSnapshotWidget::preview()
{
return *lblImage->pixmap();
}
diff --git a/ksnapshot/regiongrabber.cpp b/ksnapshot/regiongrabber.cpp
index c1d8ed98..3522b74b 100644
--- a/ksnapshot/regiongrabber.cpp
+++ b/ksnapshot/regiongrabber.cpp
@@ -19,29 +19,29 @@
#include "regiongrabber.h"
-#include <qapplication.h>
-#include <qpainter.h>
-#include <qpalette.h>
-#include <qstyle.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqapplication.h>
+#include <tqpainter.h>
+#include <tqpalette.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kglobalsettings.h>
-SizeTip::SizeTip( QWidget *parent, const char *name )
- : QLabel( parent, name, WStyle_Customize | WX11BypassWM |
+SizeTip::SizeTip( TQWidget *parent, const char *name )
+ : TQLabel( parent, name, WStyle_Customize | WX11BypassWM |
WStyle_StaysOnTop | WStyle_NoBorder | WStyle_Tool )
{
setMargin( 2 );
setIndent( 0 );
- setFrameStyle( QFrame::Plain | QFrame::Box );
+ setFrameStyle( TQFrame::Plain | TQFrame::Box );
- setPalette( QToolTip::palette() );
+ setPalette( TQToolTip::palette() );
}
-void SizeTip::setTip( const QRect &rect )
+void SizeTip::setTip( const TQRect &rect )
{
- QString tip = QString( "%1x%2" ).arg( rect.width() )
+ TQString tip = TQString( "%1x%2" ).arg( rect.width() )
.arg( rect.height() );
setText( tip );
@@ -50,16 +50,16 @@ void SizeTip::setTip( const QRect &rect )
positionTip( rect );
}
-void SizeTip::positionTip( const QRect &rect )
+void SizeTip::positionTip( const TQRect &rect )
{
- QRect tipRect = geometry();
- tipRect.moveTopLeft( QPoint( 0, 0 ) );
+ TQRect tipRect = geometry();
+ tipRect.moveTopLeft( TQPoint( 0, 0 ) );
if ( rect.intersects( tipRect ) )
{
- QRect deskR = KGlobalSettings::desktopGeometry( QPoint( 0, 0 ) );
+ TQRect deskR = KGlobalSettings::desktopGeometry( TQPoint( 0, 0 ) );
- tipRect.moveCenter( QPoint( deskR.width()/2, deskR.height()/2 ) );
+ tipRect.moveCenter( TQPoint( deskR.width()/2, deskR.height()/2 ) );
if ( !rect.contains( tipRect, true ) && rect.intersects( tipRect ) )
tipRect.moveBottomRight( geometry().bottomRight() );
}
@@ -68,15 +68,15 @@ void SizeTip::positionTip( const QRect &rect )
}
RegionGrabber::RegionGrabber()
- : QWidget( 0, 0, WStyle_Customize | WX11BypassWM ),
+ : TQWidget( 0, 0, WStyle_Customize | WX11BypassWM ),
mouseDown( false ), sizeTip( 0L )
{
- sizeTip = new SizeTip( ( QWidget * )0L );
+ sizeTip = new SizeTip( ( TQWidget * )0L );
- tipTimer = new QTimer( this );
- connect( tipTimer, SIGNAL( timeout() ), SLOT( updateSizeTip() ) );
+ tipTimer = new TQTimer( this );
+ connect( tipTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( updateSizeTip() ) );
- QTimer::singleShot( 200, this, SLOT( initGrabber() ) );
+ TQTimer::singleShot( 200, this, TQT_SLOT( initGrabber() ) );
}
RegionGrabber::~RegionGrabber()
@@ -86,11 +86,11 @@ RegionGrabber::~RegionGrabber()
void RegionGrabber::initGrabber()
{
- pixmap = QPixmap::grabWindow( qt_xrootwin() );
+ pixmap = TQPixmap::grabWindow( qt_xrootwin() );
setPaletteBackgroundPixmap( pixmap );
- QDesktopWidget desktopWidget;
- QRect desktopSize;
+ TQDesktopWidget desktopWidget;
+ TQRect desktopSize;
if ( desktopWidget.isVirtualDesktop() )
desktopSize = desktopWidget.geometry();
else
@@ -99,19 +99,19 @@ void RegionGrabber::initGrabber()
setGeometry( desktopSize );
showFullScreen();
- QApplication::setOverrideCursor( crossCursor );
+ TQApplication::setOverrideCursor( crossCursor );
}
-void RegionGrabber::mousePressEvent( QMouseEvent *e )
+void RegionGrabber::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() == LeftButton )
{
mouseDown = true;
- grabRect = QRect( e->pos(), e->pos() );
+ grabRect = TQRect( e->pos(), e->pos() );
}
}
-void RegionGrabber::mouseMoveEvent( QMouseEvent *e )
+void RegionGrabber::mouseMoveEvent( TQMouseEvent *e )
{
if ( mouseDown )
{
@@ -124,7 +124,7 @@ void RegionGrabber::mouseMoveEvent( QMouseEvent *e )
}
}
-void RegionGrabber::mouseReleaseEvent( QMouseEvent *e )
+void RegionGrabber::mouseReleaseEvent( TQMouseEvent *e )
{
mouseDown = false;
drawRubber();
@@ -133,20 +133,20 @@ void RegionGrabber::mouseReleaseEvent( QMouseEvent *e )
grabRect.setBottomRight( e->pos() );
grabRect = grabRect.normalize();
- QPixmap region = QPixmap::grabWindow( winId(), grabRect.x(), grabRect.y(),
+ TQPixmap region = TQPixmap::grabWindow( winId(), grabRect.x(), grabRect.y(),
grabRect.width(), grabRect.height() );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
emit regionGrabbed( region );
}
-void RegionGrabber::keyPressEvent( QKeyEvent *e )
+void RegionGrabber::keyPressEvent( TQKeyEvent *e )
{
if ( e->key() == Key_Escape )
{
- QApplication::restoreOverrideCursor();
- emit regionGrabbed( QPixmap() );
+ TQApplication::restoreOverrideCursor();
+ emit regionGrabbed( TQPixmap() );
}
else
e->ignore();
@@ -154,7 +154,7 @@ void RegionGrabber::keyPressEvent( QKeyEvent *e )
void RegionGrabber::updateSizeTip()
{
- QRect rect = grabRect.normalize();
+ TQRect rect = grabRect.normalize();
sizeTip->setTip( rect );
sizeTip->show();
@@ -162,14 +162,14 @@ void RegionGrabber::updateSizeTip()
void RegionGrabber::drawRubber()
{
- QPainter p;
+ TQPainter p;
p.begin( this );
p.setRasterOp( NotROP );
- p.setPen( QPen( color0, 1 ) );
+ p.setPen( TQPen( color0, 1 ) );
p.setBrush( NoBrush );
- style().drawPrimitive( QStyle::PE_FocusRect, &p, grabRect, colorGroup(),
- QStyle::Style_Default, QStyleOption( colorGroup().base() ) );
+ style().drawPrimitive( TQStyle::PE_FocusRect, &p, grabRect, colorGroup(),
+ TQStyle::Style_Default, TQStyleOption( colorGroup().base() ) );
p.end();
}
diff --git a/ksnapshot/regiongrabber.h b/ksnapshot/regiongrabber.h
index ee9a8238..5a9d28b9 100644
--- a/ksnapshot/regiongrabber.h
+++ b/ksnapshot/regiongrabber.h
@@ -20,19 +20,19 @@
#ifndef REGIONGRABBER_H
#define REGIONGRABBER_H
-#include <qlabel.h>
-#include <qpixmap.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
-class QTimer;
+class TQTimer;
class SizeTip : public QLabel
{
public:
- SizeTip( QWidget *parent, const char *name=0 );
+ SizeTip( TQWidget *parent, const char *name=0 );
~SizeTip() {}
- void setTip( const QRect &rect );
- void positionTip( const QRect &rect );
+ void setTip( const TQRect &rect );
+ void positionTip( const TQRect &rect );
};
class RegionGrabber : public QWidget
@@ -48,22 +48,22 @@ class RegionGrabber : public QWidget
void updateSizeTip();
signals:
- void regionGrabbed( const QPixmap & );
+ void regionGrabbed( const TQPixmap & );
protected:
- void mousePressEvent( QMouseEvent *e );
- void mouseReleaseEvent( QMouseEvent *e );
- void mouseMoveEvent( QMouseEvent *e );
- void keyPressEvent( QKeyEvent *e );
+ void mousePressEvent( TQMouseEvent *e );
+ void mouseReleaseEvent( TQMouseEvent *e );
+ void mouseMoveEvent( TQMouseEvent *e );
+ void keyPressEvent( TQKeyEvent *e );
void drawRubber();
bool mouseDown;
- QRect grabRect;
- QPixmap pixmap;
+ TQRect grabRect;
+ TQPixmap pixmap;
SizeTip *sizeTip;
- QTimer *tipTimer;
+ TQTimer *tipTimer;
};
#endif // REGIONGRABBER_H
diff --git a/ksnapshot/windowgrabber.cpp b/ksnapshot/windowgrabber.cpp
index 036764b1..7e556efc 100644
--- a/ksnapshot/windowgrabber.cpp
+++ b/ksnapshot/windowgrabber.cpp
@@ -18,9 +18,9 @@
*/
#include "windowgrabber.h"
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qptrlist.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqptrlist.h>
#include <algorithm>
#include <config.h>
@@ -34,7 +34,7 @@ static
const int minSize = 8;
static
-bool operator< ( const QRect& r1, const QRect& r2 )
+bool operator< ( const TQRect& r1, const TQRect& r2 )
{
return r1.width() * r1.height() < r2.width() * r2.height();
}
@@ -43,7 +43,7 @@ bool operator< ( const QRect& r1, const QRect& r2 )
// a tree of window descriptors. Windows in non-viewable state or with height
// or width smaller than minSize will be ignored.
static
-void getWindowsRecursive( std::vector<QRect>& windows, Window w,
+void getWindowsRecursive( std::vector<TQRect>& windows, Window w,
int rx = 0, int ry = 0, int depth = 0 )
{
XWindowAttributes atts;
@@ -56,7 +56,7 @@ void getWindowsRecursive( std::vector<QRect>& windows, Window w,
y = atts.y + ry;
}
- QRect r( x, y, atts.width, atts.height );
+ TQRect r( x, y, atts.width, atts.height );
if ( std::find( windows.begin(), windows.end(), r ) == windows.end() ) {
windows.push_back( r );
}
@@ -130,15 +130,15 @@ Window windowUnderCursor( bool includeDecorations = true )
}
static
-QPixmap grabWindow( Window child, int x, int y, uint w, uint h, uint border )
+TQPixmap grabWindow( Window child, int x, int y, uint w, uint h, uint border )
{
- QPixmap pm( QPixmap::grabWindow( qt_xrootwin(), x, y, w, h ) );
+ TQPixmap pm( TQPixmap::grabWindow( qt_xrootwin(), x, y, w, h ) );
#ifdef HAVE_X11_EXTENSIONS_SHAPE_H
int tmp1, tmp2;
//Check whether the extension is available
if ( XShapeQueryExtension( qt_xdisplay(), &tmp1, &tmp2 ) ) {
- QBitmap mask( w, h );
+ TQBitmap mask( w, h );
//As the first step, get the mask from XShape.
int count, order;
XRectangle* rects = XShapeGetRectangles( qt_xdisplay(), child,
@@ -148,30 +148,30 @@ QPixmap grabWindow( Window child, int x, int y, uint w, uint h, uint border )
//Since the border area is part of the window, we use bounding
// to limit our work region
if (rects) {
- //Create a QRegion from the rectangles describing the bounding mask.
- QRegion contents;
+ //Create a TQRegion from the rectangles describing the bounding mask.
+ TQRegion contents;
for ( int pos = 0; pos < count; pos++ )
- contents += QRegion( rects[pos].x, rects[pos].y,
+ contents += TQRegion( rects[pos].x, rects[pos].y,
rects[pos].width, rects[pos].height );
XFree( rects );
//Create the bounding box.
- QRegion bbox( 0, 0, w, h );
+ TQRegion bbox( 0, 0, w, h );
if( border > 0 ) {
contents.translate( border, border );
- contents += QRegion( 0, 0, border, h );
- contents += QRegion( 0, 0, w, border );
- contents += QRegion( 0, h - border, w, border );
- contents += QRegion( w - border, 0, border, h );
+ contents += TQRegion( 0, 0, border, h );
+ contents += TQRegion( 0, 0, w, border );
+ contents += TQRegion( 0, h - border, w, border );
+ contents += TQRegion( w - border, 0, border, h );
}
//Get the masked away area.
- QRegion maskedAway = bbox - contents;
- QMemArray<QRect> maskedAwayRects = maskedAway.rects();
+ TQRegion maskedAway = bbox - contents;
+ TQMemArray<TQRect> maskedAwayRects = maskedAway.rects();
//Construct a bitmap mask from the rectangles
- QPainter p(&mask);
+ TQPainter p(&mask);
p.fillRect(0, 0, w, h, Qt::color1);
for (uint pos = 0; pos < maskedAwayRects.count(); pos++)
p.fillRect(maskedAwayRects[pos], Qt::color0);
@@ -186,7 +186,7 @@ QPixmap grabWindow( Window child, int x, int y, uint w, uint h, uint border )
}
WindowGrabber::WindowGrabber()
-: QDialog( 0, 0, true, Qt::WStyle_Customize | Qt::WStyle_NoBorder |
+: TQDialog( 0, 0, true, Qt::WStyle_Customize | Qt::WStyle_NoBorder |
Qt::WStyle_StaysOnTop | Qt::WX11BypassWM ),
current( -1 ), yPos( -1 )
{
@@ -196,7 +196,7 @@ WindowGrabber::WindowGrabber()
XGrabServer( qt_xdisplay() );
Window child = windowUnderCursor();
XGetGeometry( qt_xdisplay(), child, &root, &x, &y, &w, &h, &border, &depth );
- QPixmap pm( grabWindow( child, x, y, w, h, border ) );
+ TQPixmap pm( grabWindow( child, x, y, w, h, border ) );
getWindowsRecursive( windows, child );
XUngrabServer( qt_xdisplay() );
@@ -210,7 +210,7 @@ WindowGrabber::~WindowGrabber()
{
}
-QPixmap WindowGrabber::grabCurrent( bool includeDecorations )
+TQPixmap WindowGrabber::grabCurrent( bool includeDecorations )
{
Window root;
int y, x;
@@ -233,19 +233,19 @@ QPixmap WindowGrabber::grabCurrent( bool includeDecorations )
y = newy;
}
}
- QPixmap pm( grabWindow( child, x, y, w, h, border ) );
+ TQPixmap pm( grabWindow( child, x, y, w, h, border ) );
XUngrabServer( qt_xdisplay() );
return pm;
}
-void WindowGrabber::mousePressEvent( QMouseEvent *e )
+void WindowGrabber::mousePressEvent( TQMouseEvent *e )
{
- if ( e->button() == QMouseEvent::RightButton )
+ if ( e->button() == TQMouseEvent::RightButton )
yPos = e->globalY();
else {
- QPixmap pm;
+ TQPixmap pm;
if ( current ) {
- QRect r( windows[ current ] );
+ TQRect r( windows[ current ] );
int w = r.width();
int h = r.height();
pm.resize( w, h );
@@ -256,16 +256,16 @@ void WindowGrabber::mousePressEvent( QMouseEvent *e )
}
}
-void WindowGrabber::mouseReleaseEvent( QMouseEvent *e )
+void WindowGrabber::mouseReleaseEvent( TQMouseEvent *e )
{
- if ( e->button() == QMouseEvent::RightButton )
+ if ( e->button() == TQMouseEvent::RightButton )
yPos = -1;
}
static
const int minDistance = 10;
-void WindowGrabber::mouseMoveEvent( QMouseEvent *e )
+void WindowGrabber::mouseMoveEvent( TQMouseEvent *e )
{
if ( yPos == -1 ) {
int w = windowIndex( e->pos() );
@@ -287,7 +287,7 @@ void WindowGrabber::mouseMoveEvent( QMouseEvent *e )
}
}
-void WindowGrabber::wheelEvent( QWheelEvent *e )
+void WindowGrabber::wheelEvent( TQWheelEvent *e )
{
if ( e->delta() > 0 )
increaseScope( e->pos() );
@@ -300,7 +300,7 @@ void WindowGrabber::wheelEvent( QWheelEvent *e )
// Increases the scope to the next-bigger window containing the mouse pointer.
// This method is activated by either rotating the mouse wheel forwards or by
// dragging the mouse forwards while keeping the right mouse button pressed.
-void WindowGrabber::increaseScope( const QPoint &pos )
+void WindowGrabber::increaseScope( const TQPoint &pos )
{
for ( uint i = current + 1; i < windows.size(); i++ ) {
if ( windows[ i ].contains( pos ) ) {
@@ -314,7 +314,7 @@ void WindowGrabber::increaseScope( const QPoint &pos )
// Decreases the scope to the next-smaller window containing the mosue pointer.
// This method is activated by either rotating the mouse wheel backwards or by
// dragging the mouse backwards while keeping the right mouse button pressed.
-void WindowGrabber::decreaseScope( const QPoint &pos )
+void WindowGrabber::decreaseScope( const TQPoint &pos )
{
for ( int i = current - 1; i >= 0; i-- ) {
if ( windows[ i ].contains( pos ) ) {
@@ -327,7 +327,7 @@ void WindowGrabber::decreaseScope( const QPoint &pos )
// Searches and returns the index of the first (=smallest) window
// containing the mouse pointer.
-int WindowGrabber::windowIndex( const QPoint &pos ) const
+int WindowGrabber::windowIndex( const TQPoint &pos ) const
{
for ( uint i = 0; i < windows.size(); i++ ) {
if ( windows[ i ].contains( pos ) )
@@ -342,9 +342,9 @@ void WindowGrabber::drawBorder()
repaint();
if ( current >= 0 ) {
- QPainter p;
+ TQPainter p;
p.begin( this );
- p.setPen( QPen( Qt::red, 3 ) );
+ p.setPen( TQPen( Qt::red, 3 ) );
p.drawRect( windows[ current ] );
p.end();
}
diff --git a/ksnapshot/windowgrabber.h b/ksnapshot/windowgrabber.h
index 43598576..d6a56d6c 100644
--- a/ksnapshot/windowgrabber.h
+++ b/ksnapshot/windowgrabber.h
@@ -20,8 +20,8 @@
#ifndef WINDOWGRABBER_H
#define WINDOWGRABBER_H
-#include <qdialog.h>
-#include <qpixmap.h>
+#include <tqdialog.h>
+#include <tqpixmap.h>
#include <vector>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
@@ -34,23 +34,23 @@ public:
WindowGrabber();
~WindowGrabber();
- static QPixmap grabCurrent( bool includeDecorations = true );
+ static TQPixmap grabCurrent( bool includeDecorations = true );
signals:
- void windowGrabbed( const QPixmap & );
+ void windowGrabbed( const TQPixmap & );
protected:
- void mousePressEvent( QMouseEvent * );
- void mouseReleaseEvent( QMouseEvent * );
- void mouseMoveEvent( QMouseEvent * );
- void wheelEvent( QWheelEvent * );
+ void mousePressEvent( TQMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
+ void mouseMoveEvent( TQMouseEvent * );
+ void wheelEvent( TQWheelEvent * );
private:
void drawBorder();
- void increaseScope( const QPoint & );
- void decreaseScope( const QPoint & );
- int windowIndex( const QPoint & ) const;
- std::vector<QRect> windows;
+ void increaseScope( const TQPoint & );
+ void decreaseScope( const TQPoint & );
+ int windowIndex( const TQPoint & ) const;
+ std::vector<TQRect> windows;
int current;
int yPos;
};
diff --git a/ksvg/core/CanvasFactory.cpp b/ksvg/core/CanvasFactory.cpp
index ca2822b2..e03bf9ea 100644
--- a/ksvg/core/CanvasFactory.cpp
+++ b/ksvg/core/CanvasFactory.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <ksimpleconfig.h>
@@ -57,14 +57,14 @@ void CanvasFactory::queryCanvas()
{
m_canvasList.clear();
- QValueList<KService::Ptr> traderList = KTrader::self()->query("KSVG/Renderer", "(Type == 'Service')");
+ TQValueList<KService::Ptr> traderList = KTrader::self()->query("KSVG/Renderer", "(Type == 'Service')");
KTrader::OfferList::Iterator it(traderList.begin());
for( ; it != traderList.end(); ++it)
{
KService::Ptr ptr = (*it);
- QString name = ptr->property("Name").toString();
- QString internal = ptr->property("X-KSVG-InternalName").toString();
+ TQString name = ptr->property("Name").toString();
+ TQString internal = ptr->property("X-KSVG-InternalName").toString();
if(name.isEmpty() || internal.isEmpty())
continue;
@@ -90,20 +90,20 @@ KSVGCanvas *CanvasFactory::loadCanvas(int width, int height)
KSimpleConfig *config = new KSimpleConfig("ksvgpluginrc", false);
config->setGroup("Canvas");
- QString load = config->readEntry("ActiveCanvas", "libart");
+ TQString load = config->readEntry("ActiveCanvas", "libart");
delete config;
- QPtrListIterator<CanvasInfo> it(m_canvasList);
+ TQPtrListIterator<CanvasInfo> it(m_canvasList);
CanvasInfo *info = it.current();
while((info = it.current()) != 0)
{
if(info->internal == load)
{
- QStringList args;
- args.prepend(QString::number(width));
- args.prepend(QString::number(height));
+ TQStringList args;
+ args.prepend(TQString::number(width));
+ args.prepend(TQString::number(height));
- info->canvas = KParts::ComponentFactory::createInstanceFromLibrary<KSVGCanvas>(QFile::encodeName(info->service->library()), 0, 0, args);
+ info->canvas = KParts::ComponentFactory::createInstanceFromLibrary<KSVGCanvas>(TQFile::encodeName(info->service->library()), 0, 0, args);
if(info->canvas)
return info->canvas;
@@ -122,7 +122,7 @@ KSVGCanvas *CanvasFactory::loadCanvas(int width, int height)
int CanvasFactory::itemInList(KSVGCanvas *canvas)
{
- QPtrListIterator<CanvasInfo> it(m_canvasList);
+ TQPtrListIterator<CanvasInfo> it(m_canvasList);
CanvasInfo *info = it.current();
unsigned int i = 0;
while((info = it.current()) != 0)
@@ -137,9 +137,9 @@ int CanvasFactory::itemInList(KSVGCanvas *canvas)
return 0;
}
-QString CanvasFactory::internalNameFor(const QString &name)
+TQString CanvasFactory::internalNameFor(const TQString &name)
{
- QPtrListIterator<CanvasInfo> it(m_canvasList);
+ TQPtrListIterator<CanvasInfo> it(m_canvasList);
CanvasInfo *info = it.current();
while((info = it.current()) != 0)
{
@@ -149,12 +149,12 @@ QString CanvasFactory::internalNameFor(const QString &name)
++it;
}
- return QString::null;
+ return TQString::null;
}
void CanvasFactory::deleteCanvas(KSVGCanvas *canvas)
{
- QPtrListIterator<CanvasInfo> it(m_canvasList);
+ TQPtrListIterator<CanvasInfo> it(m_canvasList);
CanvasInfo *info = it.current();
while((info = it.current()) != 0)
{
@@ -168,7 +168,7 @@ void CanvasFactory::deleteCanvas(KSVGCanvas *canvas)
}
}
-QPtrList<CanvasInfo> CanvasFactory::canvasList()
+TQPtrList<CanvasInfo> CanvasFactory::canvasList()
{
return m_canvasList;
}
diff --git a/ksvg/core/CanvasFactory.h b/ksvg/core/CanvasFactory.h
index dc272700..24c59ba6 100644
--- a/ksvg/core/CanvasFactory.h
+++ b/ksvg/core/CanvasFactory.h
@@ -23,8 +23,8 @@
#include <ktrader.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
namespace KSVG
{
@@ -35,7 +35,7 @@ class CanvasInfo
public:
KService::Ptr service;
KSVGCanvas *canvas;
- QString name, internal;
+ TQString name, internal;
};
class CanvasFactory
@@ -50,16 +50,16 @@ public:
KSVGCanvas *loadCanvas(int width, int height);
int itemInList(KSVGCanvas *canvas);
- QString internalNameFor(const QString &name);
+ TQString internalNameFor(const TQString &name);
void deleteCanvas(KSVGCanvas *canvas);
- QPtrList<CanvasInfo> canvasList();
+ TQPtrList<CanvasInfo> canvasList();
private:
void queryCanvas();
static CanvasFactory *s_factory;
- QPtrList<CanvasInfo> m_canvasList;
+ TQPtrList<CanvasInfo> m_canvasList;
};
}
diff --git a/ksvg/core/CanvasItem.h b/ksvg/core/CanvasItem.h
index 7ffc7ad9..1c6b1e34 100644
--- a/ksvg/core/CanvasItem.h
+++ b/ksvg/core/CanvasItem.h
@@ -21,9 +21,9 @@
#ifndef CANVASITEM_H
#define CANVASITEM_H
-#include <qrect.h>
-#include <qpoint.h>
-#include <qvaluelist.h>
+#include <tqrect.h>
+#include <tqpoint.h>
+#include <tqvaluelist.h>
#define CHUNK_SIZE_HORIZONTAL 32
#define CHUNK_SIZE_VERTICAL 32
@@ -60,9 +60,9 @@ public:
CanvasItem() { m_zIndex = 0; m_referenced = false; }
virtual ~CanvasItem() { }
- virtual QRect bbox() const = 0;
- virtual bool fillContains(const QPoint &) = 0;
- virtual bool strokeContains(const QPoint &) = 0;
+ virtual TQRect bbox() const = 0;
+ virtual bool fillContains(const TQPoint &) = 0;
+ virtual bool strokeContains(const TQPoint &) = 0;
virtual void update(CanvasItemUpdate reason, int param1 = 0, int param2 = 0) = 0;
virtual void draw() = 0;
virtual bool isVisible() = 0;
@@ -114,10 +114,10 @@ private:
CanvasItem *ptr;
};
-class CanvasItemList : public QValueList<CanvasItem *>
+class CanvasItemList : public TQValueList<CanvasItem *>
{
public:
- void sort() { qHeapSort(*((QValueList<CanvasItemPtr> *) this)); }
+ void sort() { qHeapSort(*((TQValueList<CanvasItemPtr> *) this)); }
};
class CanvasChunk
@@ -138,7 +138,7 @@ public:
short x() const { return m_x; }
short y() const { return m_y; }
- QRect bbox() const { return QRect(m_x * CHUNK_SIZE_HORIZONTAL, m_y * CHUNK_SIZE_VERTICAL, CHUNK_SIZE_HORIZONTAL, CHUNK_SIZE_VERTICAL); }
+ TQRect bbox() const { return TQRect(m_x * CHUNK_SIZE_HORIZONTAL, m_y * CHUNK_SIZE_VERTICAL, CHUNK_SIZE_HORIZONTAL, CHUNK_SIZE_VERTICAL); }
private:
CanvasItemList m_list;
diff --git a/ksvg/core/CanvasItems.cpp b/ksvg/core/CanvasItems.cpp
index 0ffd017c..333f4608 100644
--- a/ksvg/core/CanvasItems.cpp
+++ b/ksvg/core/CanvasItems.cpp
@@ -104,7 +104,7 @@ void CanvasText::handleTSpan(KSVGCanvas *canvas, const SVGMatrixImpl *screenCTM,
usey = int(tspan->y()->baseVal()->getItem(0)->value());
}
- QString text = tspan->text();
+ TQString text = tspan->text();
if(!text.isEmpty())
{
T2P::GlyphLayoutParams *params = tspan->layoutParams();
@@ -118,7 +118,7 @@ void CanvasText::handleTSpan(KSVGCanvas *canvas, const SVGMatrixImpl *screenCTM,
if(bMultipleY && i < tspan->y()->baseVal()->numberOfItems())
usey = int(tspan->y()->baseVal()->getItem(i)->value());
- textChunk->addText(QString(text.at(i)), tspan);
+ textChunk->addText(TQString(text.at(i)), tspan);
createGlyphs(textChunk, canvas, screenCTM, usex, usey, endx, endy, bpath);
textChunk->clear();
@@ -159,7 +159,7 @@ void CanvasText::handleTSpan(KSVGCanvas *canvas, const SVGMatrixImpl *screenCTM,
if(tspanFound)
{
DOM::Text text = node;
- QString temp = text.data().string();
+ TQString temp = text.data().string();
textChunk->addText(temp, tspan);
}
}
@@ -199,13 +199,13 @@ KSVGTextChunk *CanvasText::createTextChunk(KSVGCanvas *canvas, const SVGMatrixIm
if(node.nodeType() == DOM::Node::TEXT_NODE)
{
DOM::Text text = node;
- QString temp = text.data().string();
+ TQString temp = text.data().string();
if(!temp.isEmpty())
{
if(m_text->getTextDirection() != LTR)
{
- QString convert = temp;
+ TQString convert = temp;
for(int i = temp.length(); i > 0; i--)
convert[temp.length() - i] = temp[i - 1];
@@ -229,7 +229,7 @@ KSVGTextChunk *CanvasText::createTextChunk(KSVGCanvas *canvas, const SVGMatrixIm
}
SVGTextPathElementImpl *tpath = dynamic_cast<SVGTextPathElementImpl *>(element);
- QString target = SVGURIReferenceImpl::getTarget(tpath->href()->baseVal().string());
+ TQString target = SVGURIReferenceImpl::getTarget(tpath->href()->baseVal().string());
SVGPathElementImpl *path = dynamic_cast<SVGPathElementImpl *>(tpath->ownerSVGElement()->getElementById(target));
T2P::BezierPath *bpath = 0;
@@ -242,7 +242,7 @@ KSVGTextChunk *CanvasText::createTextChunk(KSVGCanvas *canvas, const SVGMatrixIm
if(iterate.nodeType() == DOM::Node::TEXT_NODE)
{
DOM::Text text = iterate;
- QString temp = text.data().string();
+ TQString temp = text.data().string();
if(!temp.isEmpty())
textChunk->addText(temp, tpath);
@@ -287,7 +287,7 @@ KSVGTextChunk *CanvasText::createTextChunk(KSVGCanvas *canvas, const SVGMatrixIm
void CanvasText::createGlyphs(KSVGTextChunk *textChunk, KSVGCanvas *canvas, const SVGMatrixImpl *screenCTM, int curx, int cury, int &endx, int &endy, T2P::BezierPath *bpath) const
{
double _curx = double(curx);
- QMemArray<double> _cury(1);
+ TQMemArray<double> _cury(1);
_cury[0] = double(cury);
T2P::GlyphLayoutParams *params = m_text->layoutParams();
@@ -296,8 +296,8 @@ void CanvasText::createGlyphs(KSVGTextChunk *textChunk, KSVGCanvas *canvas, cons
SVGTextContentElementImpl *tc0 = tc;
T2P::SharedFont font;
- QString text;
- QPtrList<T2P::GlyphSet> glyphs;
+ TQString text;
+ TQPtrList<T2P::GlyphSet> glyphs;
glyphs.setAutoDelete(true);
double pathAdvance = 0;
@@ -323,7 +323,7 @@ void CanvasText::createGlyphs(KSVGTextChunk *textChunk, KSVGCanvas *canvas, cons
text = textChunk->getText(i);
if(i != textChunk->count() - 1)
- text += QChar(' ');
+ text += TQChar(' ');
if(!canvas->fontContext()->ready())
canvas->fontContext()->init();
@@ -380,7 +380,7 @@ void CanvasText::createGlyphs(KSVGTextChunk *textChunk, KSVGCanvas *canvas, cons
params->setTextPathStartOffset(pathAdvance);
if(tp && tp->dy()->baseVal()->numberOfItems() > 0)
pathDy += tp->dy()->baseVal()->getItem(0)->value();
- QString shift = QString("%1%%").arg((pathDy / font->fontParams()->size()) * -100.0);
+ TQString shift = TQString("%1%%").arg((pathDy / font->fontParams()->size()) * -100.0);
params->setBaselineShift(shift.latin1());
}
@@ -484,7 +484,7 @@ void CanvasText::createGlyphs(KSVGTextChunk *textChunk, KSVGCanvas *canvas, cons
// #####
-void MarkerHelper::doMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle, const QString &markerId)
+void MarkerHelper::doMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle, const TQString &markerId)
{
SVGMarkerElementImpl *marker = dynamic_cast<SVGMarkerElementImpl *>(shape->ownerSVGElement()->getElementById(markerId));
if(marker)
diff --git a/ksvg/core/CanvasItems.h b/ksvg/core/CanvasItems.h
index 8959d6ba..9f5eed43 100644
--- a/ksvg/core/CanvasItems.h
+++ b/ksvg/core/CanvasItems.h
@@ -21,7 +21,7 @@
#ifndef CANVASITEMS_H
#define CANVASITEMS_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "CanvasItem.h"
#include "SVGTextElementImpl.h"
#include "SVGTextPathElementImpl.h"
@@ -85,7 +85,7 @@ protected:
void doEndMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle = 0.0);
private:
- void doMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle, const QString &marker);
+ void doMarker(SVGShapeImpl *shape, SVGStylableImpl *style, double x, double y, double angle, const TQString &marker);
};
class CanvasText : public CanvasItem
@@ -120,7 +120,7 @@ public:
bool finalized() { return m_finalized; }
virtual void finalizePaintServer() = 0;
- virtual void reference(const QString &href) = 0;
+ virtual void reference(const TQString &href) = 0;
private:
bool m_finalized;
diff --git a/ksvg/core/DocumentFactory.cpp b/ksvg/core/DocumentFactory.cpp
index bcc0ddcb..4ae743be 100644
--- a/ksvg/core/DocumentFactory.cpp
+++ b/ksvg/core/DocumentFactory.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qobject.h>
+#include <tqobject.h>
#include <kdebug.h>
#include <kstaticdeleter.h>
@@ -42,7 +42,7 @@ namespace KSVG
SVGDocumentImpl *doc() const { return m_docs.current(); }
private:
- QPtrList<SVGDocumentImpl> m_docs;
+ TQPtrList<SVGDocumentImpl> m_docs;
};
}
@@ -65,10 +65,10 @@ DocumentFactory *DocumentFactory::self()
return s_factory;
}
-SVGDocument *DocumentFactory::requestDocument(QObject *notifyObject, const char *notifySlot) const
+SVGDocument *DocumentFactory::requestDocument(TQObject *notifyObject, const char *notifySlot) const
{
SVGDocumentImpl *impl = requestDocumentImpl(false);
- QObject::connect(impl, SIGNAL(finishedParsing(bool, const QString &)), notifyObject, notifySlot);
+ TQObject::connect(impl, TQT_SIGNAL(finishedParsing(bool, const TQString &)), notifyObject, notifySlot);
return new SVGDocument(impl);
}
diff --git a/ksvg/core/DocumentFactory.h b/ksvg/core/DocumentFactory.h
index 290d54ac..6225b37d 100644
--- a/ksvg/core/DocumentFactory.h
+++ b/ksvg/core/DocumentFactory.h
@@ -22,7 +22,7 @@
#define DocumentFactory_H
#include <kurl.h>
-#include <qobject.h>
+#include <tqobject.h>
namespace KSVG
{
@@ -39,7 +39,7 @@ public:
static DocumentFactory *self();
// Creates a document and connects the parsingFinished() signal to the notifySlot...
- SVGDocument *requestDocument(QObject *notifyObject, const char *notifySlot) const;
+ SVGDocument *requestDocument(TQObject *notifyObject, const char *notifySlot) const;
// Loads 'url' and emits parsingFinisihed() signal, when done
bool startParsing(SVGDocument *document, const KURL &url);
diff --git a/ksvg/core/KSVGCanvas.cpp b/ksvg/core/KSVGCanvas.cpp
index d4e75d79..1f504c02 100644
--- a/ksvg/core/KSVGCanvas.cpp
+++ b/ksvg/core/KSVGCanvas.cpp
@@ -32,10 +32,10 @@
#include <kdebug.h>
#include <kglobal.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qpaintdevicemetrics.h>
-#include <qwmatrix.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqwmatrix.h>
#include <X11/Xlib.h>
@@ -63,12 +63,12 @@ KSVGCanvas::KSVGCanvas(unsigned int width, unsigned int height) : m_viewportWidt
m_buffer = 0;
- m_backgroundColor = QColor(250, 250, 250);
+ m_backgroundColor = TQColor(250, 250, 250);
m_immediateUpdate = false;
}
-void KSVGCanvas::setup(QPaintDevice *drawWindow, QPaintDevice *directWindow)
+void KSVGCanvas::setup(TQPaintDevice *drawWindow, TQPaintDevice *directWindow)
{
m_drawWindow = drawWindow;
m_directWindow = directWindow;
@@ -151,10 +151,10 @@ void KSVGCanvas::resize(unsigned int w, unsigned int h)
int diffw = w - m_width;
int diffh = h - m_height;
- QRect r(m_width, 0, diffw, m_height + diffh);
- QRect r3(0, m_height, m_width + diffw, diffh);
+ TQRect r(m_width, 0, diffw, m_height + diffh);
+ TQRect r3(0, m_height, m_width + diffw, diffh);
- QWMatrix mtx;
+ TQWMatrix mtx;
mtx.translate(m_pan.x(), m_pan.y());
mtx.scale(m_zoom, m_zoom);
@@ -169,7 +169,7 @@ void KSVGCanvas::resize(unsigned int w, unsigned int h)
CanvasItemList drawables;
if(diffw > 0)
{
- QRect r2 = mtx.invert().map(r);
+ TQRect r2 = mtx.invert().map(r);
// Recalc items
for(int j = r2.top() / int(m_chunkSizeVer); j <= r2.bottom() / int(m_chunkSizeVer); j++)
@@ -191,7 +191,7 @@ void KSVGCanvas::resize(unsigned int w, unsigned int h)
if(diffh > 0)
{
- QRect r4 = mtx.invert().map(r3);
+ TQRect r4 = mtx.invert().map(r3);
// Recalc items
for(int j = r4.top() / int(m_chunkSizeVer); j <= r4.bottom() / int(m_chunkSizeVer); j++)
@@ -234,7 +234,7 @@ void KSVGCanvas::setRenderBufferSize(int w, int h)
if(needsRedraw)
{
- QPaintDeviceMetrics metrics(m_drawWindow);
+ TQPaintDeviceMetrics metrics(m_drawWindow);
m_width = kMin(int(w), metrics.width());
m_height = kMin(int(h), metrics.height());
@@ -248,9 +248,9 @@ void KSVGCanvas::setRenderBufferSize(int w, int h)
fill();
}
-void KSVGCanvas::clear(const QRect &r)
+void KSVGCanvas::clear(const TQRect &r)
{
- QRect r2 = r & QRect(0, 0, m_width, m_height);
+ TQRect r2 = r & TQRect(0, 0, m_width, m_height);
if(!r2.isEmpty() && m_buffer)
{
for(int i = 0; i < r2.height(); i++)
@@ -322,7 +322,7 @@ T2P::FontVisualParams *KSVGCanvas::fontVisualParams(SVGStylableImpl *style) cons
// Calc weight & slant
int weight = 0, slant = 0;
EFontStyle fontStyle = style->getFontStyle();
- QString fontWeight = style->getFontWeight();
+ TQString fontWeight = style->getFontWeight();
if(fontWeight.contains("bold"))
weight |= FC_WEIGHT_DEMIBOLD;
@@ -372,7 +372,7 @@ void KSVGCanvas::invalidate(CanvasItem *item, bool recalc)
addToChunks(item);
}
- QPtrListIterator<CanvasChunk> it = m_chunksByItem[item];
+ TQPtrListIterator<CanvasChunk> it = m_chunksByItem[item];
for(it.toFirst(); it.current(); ++it)
{
(*it)->setDirty();
@@ -389,7 +389,7 @@ void KSVGCanvas::insert(CanvasItem *item, int z)
if(z == -1)
{
item->setZIndex(m_chunksByItem.size());
- m_chunksByItem[item] = QPtrList<CanvasChunk>();
+ m_chunksByItem[item] = TQPtrList<CanvasChunk>();
addToChunks(item);
m_items.append(item);
@@ -402,7 +402,7 @@ void KSVGCanvas::insert(CanvasItem *item, int z)
if(visible)
{
item->draw();
- QRect bbox = item->bbox();
+ TQRect bbox = item->bbox();
blit(bbox, true);
}
}
@@ -425,7 +425,7 @@ void KSVGCanvas::removeItem(CanvasItem *item)
void KSVGCanvas::removeFromChunks(CanvasItem *item)
{
- QPtrListIterator<CanvasChunk> it = m_chunksByItem[item];
+ TQPtrListIterator<CanvasChunk> it = m_chunksByItem[item];
for(it.toFirst(); it.current(); ++it)
{
(*it)->remove(item);
@@ -437,8 +437,8 @@ void KSVGCanvas::removeFromChunks(CanvasItem *item)
void KSVGCanvas::addToChunks(CanvasItem *item)
{
- QRect bbox = item->bbox();
- QWMatrix mtx;
+ TQRect bbox = item->bbox();
+ TQWMatrix mtx;
mtx.translate(m_pan.x(), m_pan.y());
mtx.scale(m_zoom, m_zoom);
@@ -498,10 +498,10 @@ unsigned int KSVGCanvas::setElementItemZIndexRecursive(SVGElementImpl *element,
return z;
}
-void KSVGCanvas::update(const QPoint &panPoint, bool erase)
+void KSVGCanvas::update(const TQPoint &panPoint, bool erase)
{
#ifdef USE_TIMER
- QTime t;
+ TQTime t;
t.start();
#endif
@@ -513,16 +513,16 @@ void KSVGCanvas::update(const QPoint &panPoint, bool erase)
fill();
// reset clip paths
- QDictIterator<CanvasClipPath> itr(m_clipPaths);
+ TQDictIterator<CanvasClipPath> itr(m_clipPaths);
for(; itr.current(); ++itr)
(*itr)->update(UPDATE_TRANSFORM);
- QWMatrix mtx;
+ TQWMatrix mtx;
mtx.translate(m_pan.x(), m_pan.y());
mtx.scale(m_zoom, m_zoom);
- QRect r(0, 0, m_width, m_height);
- QRect r2 = mtx.invert().map(r);
+ TQRect r(0, 0, m_width, m_height);
+ TQRect r2 = mtx.invert().map(r);
// pan all items
for(unsigned int i = 0; i < m_items.count(); i++)
@@ -530,7 +530,7 @@ void KSVGCanvas::update(const QPoint &panPoint, bool erase)
// recalc items
CanvasItemList drawables;
- QPtrListIterator<CanvasItem> it = m_items;
+ TQPtrListIterator<CanvasItem> it = m_items;
for(int j = r2.top() / m_chunkSizeVer; j <= (r2.bottom() / m_chunkSizeVer); j++)
{
for(int i = r2.left() / m_chunkSizeHor; i <= (r2.right() / m_chunkSizeHor); i++)
@@ -552,7 +552,7 @@ void KSVGCanvas::update(const QPoint &panPoint, bool erase)
(*it)->draw();
if(m_drawWindow)
- blit(QRect(0, 0, m_width, m_height), false);
+ blit(TQRect(0, 0, m_width, m_height), false);
m_dirtyChunks.clear();
@@ -564,7 +564,7 @@ void KSVGCanvas::update(const QPoint &panPoint, bool erase)
void KSVGCanvas::update(float zoomFactor)
{
#ifdef USE_TIMER
- QTime t;
+ TQTime t;
t.start();
#endif
@@ -578,18 +578,18 @@ void KSVGCanvas::update(float zoomFactor)
fill();
// reset clip paths
- QDictIterator<CanvasClipPath> itr(m_clipPaths);
+ TQDictIterator<CanvasClipPath> itr(m_clipPaths);
for(; itr.current(); ++itr)
(*itr)->update(UPDATE_TRANSFORM);
m_zoom = zoomFactor;
- QWMatrix mtx;
+ TQWMatrix mtx;
mtx.translate(m_pan.x(), m_pan.y());
mtx.scale(m_zoom, m_zoom);
- QRect r(0, 0, m_width, m_height);
- QRect r2 = mtx.invert().map(r);
+ TQRect r(0, 0, m_width, m_height);
+ TQRect r2 = mtx.invert().map(r);
// zoom all items
for(unsigned int i = 0; i < m_items.count(); i++)
@@ -597,7 +597,7 @@ void KSVGCanvas::update(float zoomFactor)
// recalc items
CanvasItemList drawables;
- QPtrListIterator<CanvasItem> it = m_items;
+ TQPtrListIterator<CanvasItem> it = m_items;
for(int j = r2.top() / m_chunkSizeVer; j <= (r2.bottom() / m_chunkSizeVer); j++)
{
for(int i = r2.left() / m_chunkSizeHor; i <= (r2.right() / m_chunkSizeHor); i++)
@@ -619,7 +619,7 @@ void KSVGCanvas::update(float zoomFactor)
(*it)->draw();
if(m_drawWindow)
- blit(QRect(0, 0, m_width, m_height), false);
+ blit(TQRect(0, 0, m_width, m_height), false);
m_dirtyChunks.clear();
@@ -642,24 +642,24 @@ void KSVGCanvas::reset()
void KSVGCanvas::update()
{
#ifdef USE_TIMER
- QTime t;
+ TQTime t;
t.start();
#endif
- QWMatrix mtx;
+ TQWMatrix mtx;
mtx.translate(m_pan.x(), m_pan.y());
mtx.scale(m_zoom, m_zoom);
// Process dirty chunks
- QPtrList<CanvasChunk> chunkList;
+ TQPtrList<CanvasChunk> chunkList;
CanvasItemList drawables;
for(unsigned int i = 0; i < m_dirtyChunks.count(); i++)
{
CanvasChunk *chunk = m_dirtyChunks[i];
Q_ASSERT(chunk->isDirty());
- QRect r = chunk->bbox();
- QRect chunkbox(mtx.map(r.topLeft()), mtx.map(r.bottomRight()));
+ TQRect r = chunk->bbox();
+ TQRect chunkbox(mtx.map(r.topLeft()), mtx.map(r.bottomRight()));
clear(chunkbox);
chunkList.append(chunk);
@@ -686,11 +686,11 @@ void KSVGCanvas::update()
}
// Blit dirty chunks
- QPtrListIterator<CanvasChunk> it = chunkList;
+ TQPtrListIterator<CanvasChunk> it = chunkList;
for(it.toFirst(); it.current(); ++it)
{
- QRect r = (*it)->bbox();
- QRect chunkbox(mtx.map(r.topLeft()), mtx.map(r.bottomRight()));
+ TQRect r = (*it)->bbox();
+ TQRect chunkbox(mtx.map(r.topLeft()), mtx.map(r.bottomRight()));
blit(chunkbox, false);
}
@@ -701,13 +701,13 @@ void KSVGCanvas::update()
#endif
}
-CanvasItemList KSVGCanvas::collisions(const QPoint &p, bool exact) const
+CanvasItemList KSVGCanvas::collisions(const TQPoint &p, bool exact) const
{
- QWMatrix mtx;
+ TQWMatrix mtx;
mtx.translate(m_pan.x(), m_pan.y());
mtx.scale(m_zoom, m_zoom);
- QPoint p2 = mtx.invert().map(p);
+ TQPoint p2 = mtx.invert().map(p);
if(p2.x() < 0 || p2.y() < 0)
return CanvasItemList();
@@ -734,7 +734,7 @@ CanvasItemList KSVGCanvas::collisions(const QPoint &p, bool exact) const
return list;
}
-void KSVGCanvas::blit(const QRect &rect, bool direct)
+void KSVGCanvas::blit(const TQRect &rect, bool direct)
{
if(m_drawWindow && m_width && m_height)
{
@@ -761,12 +761,12 @@ void KSVGCanvas::blit(const QRect &rect, bool direct)
void KSVGCanvas::blit()
{
- return blit(QRect(0, 0, m_width, m_height), false);
+ return blit(TQRect(0, 0, m_width, m_height), false);
}
void KSVGCanvas::ChunkManager::addChunk(CanvasChunk *chunk)
{
- QString key = QString("%1 %2").arg(chunk->x()).arg(chunk->y());
+ TQString key = TQString("%1 %2").arg(chunk->x()).arg(chunk->y());
// kdDebug(26005) << k_funcinfo << "Adding chunk : " << chunk << endl;
m_chunks.insert(key, chunk);
}
@@ -774,7 +774,7 @@ void KSVGCanvas::ChunkManager::addChunk(CanvasChunk *chunk)
CanvasChunk *KSVGCanvas::ChunkManager::getChunk(short x, short y) const
{
// kdDebug(26005) << k_funcinfo << "getting chunk from : " << x << ", " << y << endl;
- QString key = QString("%1 %2").arg(x).arg(y);
+ TQString key = TQString("%1 %2").arg(x).arg(y);
return m_chunks[key];
}
diff --git a/ksvg/core/KSVGCanvas.h b/ksvg/core/KSVGCanvas.h
index 7b26997c..aa41e6c2 100644
--- a/ksvg/core/KSVGCanvas.h
+++ b/ksvg/core/KSVGCanvas.h
@@ -21,12 +21,12 @@
#ifndef KSVGCANVAS_H
#define KSVGCANVAS_H
-#include <qmap.h>
-#include <qdict.h>
-#include <qcolor.h>
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qdict.h>
+#include <tqmap.h>
+#include <tqdict.h>
+#include <tqcolor.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
#include <Converter.h>
@@ -55,7 +55,7 @@ class CanvasItemList;
class CanvasClipPath;
class CanvasPaintServer;
-// Must be a QObject to be able to be loaded by KLibLoader...
+// Must be a TQObject to be able to be loaded by KLibLoader...
class KSVGCanvas : public QObject
{
Q_OBJECT
@@ -65,25 +65,25 @@ public:
void setViewportDimension(unsigned int w, unsigned int h);
- void setup(QPaintDevice *drawWidget, QPaintDevice *directWindow);
+ void setup(TQPaintDevice *drawWidget, TQPaintDevice *directWindow);
void setup(unsigned char *buffer, unsigned int width = 0, unsigned int height = 0);
void reset();
void update();
void update(float zoomFactor);
- void update(const QPoint &panPoint, bool erase = true);
+ void update(const TQPoint &panPoint, bool erase = true);
void resize(unsigned int w, unsigned int h);
void retune(unsigned int csh, unsigned int csv);
void invalidate(CanvasItem *item, bool recalc = true);
- CanvasItemList collisions(const QPoint &p, bool exact = false) const;
+ CanvasItemList collisions(const TQPoint &p, bool exact = false) const;
- void setBackgroundColor(const QColor &c) { m_backgroundColor = c; }
+ void setBackgroundColor(const TQColor &c) { m_backgroundColor = c; }
void blit();
- void blit(const QRect &rect, bool direct);
+ void blit(const TQRect &rect, bool direct);
float zoom() const { return m_zoom; }
- QPoint pan() const { return m_pan; }
- void setPan(const QPoint &pan) { m_pan = pan; }
+ TQPoint pan() const { return m_pan; }
+ void setPan(const TQPoint &pan) { m_pan = pan; }
int width() const { return m_width; }
int height() const { return m_height; }
@@ -112,15 +112,15 @@ public:
void setImmediateUpdate(bool immediateUpdate) { m_immediateUpdate = immediateUpdate; }
bool immediateUpdate() const { return m_immediateUpdate; }
- QPtrList<CanvasItem> allItems() const { return m_items; }
+ TQPtrList<CanvasItem> allItems() const { return m_items; }
unsigned char *renderingBuffer() const { return m_buffer; }
unsigned int nrChannels() const { return m_nrChannels; }
unsigned int rowStride() const { return m_nrChannels * m_width; }
T2P::Converter *fontContext() { return m_fontContext; }
- QPaintDevice *drawWindow() { return m_drawWindow; }
- QPaintDevice *directWindow() { return m_directWindow; }
+ TQPaintDevice *drawWindow() { return m_drawWindow; }
+ TQPaintDevice *directWindow() { return m_directWindow; }
T2P::FontVisualParams *fontVisualParams(SVGStylableImpl *style) const;
virtual T2P::BezierPath *toBezierPath(CanvasItem *item) const { Q_UNUSED(item); return 0; }
@@ -136,7 +136,7 @@ protected:
void initVars();
void fill();
- void clear(const QRect &r);
+ void clear(const TQRect &r);
virtual void setBuffer(unsigned char *buffer);
@@ -151,25 +151,25 @@ protected:
void clear();
private:
- QDict<CanvasChunk> m_chunks;
+ TQDict<CanvasChunk> m_chunks;
} m_chunkManager;
- QValueList<CanvasChunk *> m_dirtyChunks;
+ TQValueList<CanvasChunk *> m_dirtyChunks;
- QMap<CanvasItem *, QPtrList<CanvasChunk> > m_chunksByItem;
- QPtrList<CanvasItem> m_items;
+ TQMap<CanvasItem *, TQPtrList<CanvasChunk> > m_chunksByItem;
+ TQPtrList<CanvasItem> m_items;
- QDict<CanvasClipPath> m_clipPaths;
+ TQDict<CanvasClipPath> m_clipPaths;
unsigned int m_viewportWidth, m_viewportHeight;
int m_width, m_height;
int m_chunkSizeHor, m_chunkSizeVer;
- QPaintDevice *m_drawWindow;
- QPaintDevice *m_directWindow;
+ TQPaintDevice *m_drawWindow;
+ TQPaintDevice *m_directWindow;
float m_zoom;
- QPoint m_pan;
+ TQPoint m_pan;
GC m_gc;
@@ -178,7 +178,7 @@ protected:
unsigned char *m_buffer;
unsigned int m_nrChannels;
- QColor m_backgroundColor;
+ TQColor m_backgroundColor;
bool m_immediateUpdate;
};
diff --git a/ksvg/core/KSVGHelper.h b/ksvg/core/KSVGHelper.h
index e310889f..27c8b88f 100644
--- a/ksvg/core/KSVGHelper.h
+++ b/ksvg/core/KSVGHelper.h
@@ -23,8 +23,8 @@
#ifdef __cplusplus
-#include <qcolor.h>
-#include <qvaluevector.h>
+#include <tqcolor.h>
+#include <tqvaluevector.h>
#include "Affine.h"
#include "Point.h"
#include "SVGMatrixImpl.h"
@@ -62,21 +62,21 @@ public:
KSVGHelper::matrixToAffine(matrix, affine.data());
}
- static QString toColorString(QColor color)
+ static TQString toColorString(TQColor color)
{
int r = color.red();
int g = color.green();
int b = color.blue();
- return "rgb(" + QString::number(r) + "," + QString::number(g) + "," + QString::number(b) + ")";
+ return "rgb(" + TQString::number(r) + "," + TQString::number(g) + "," + TQString::number(b) + ")";
}
- static unsigned int toArtColor(const QColor &color)
+ static unsigned int toArtColor(const TQColor &color)
{
return (qRed(color.rgb()) << 24) | (qGreen(color.rgb()) << 16) | ( qBlue(color.rgb()) << 8) | (qAlpha(color.rgb()));
}
- static unsigned int toArtColor(const QColor &color, short opacity)
+ static unsigned int toArtColor(const TQColor &color, short opacity)
{
return (qRed(color.rgb()) << 24) | (qGreen(color.rgb()) << 16) | ( qBlue(color.rgb()) << 8) | (opacity);
}
@@ -113,7 +113,7 @@ public:
void clear() { m_points.clear(); }
private:
- QValueVector<KSVGPoint> m_points;
+ TQValueVector<KSVGPoint> m_points;
};
class KSVGRectangle : public KSVGPolygon
diff --git a/ksvg/core/KSVGLoader.cpp b/ksvg/core/KSVGLoader.cpp
index 7f7591d7..63c3efc8 100644
--- a/ksvg/core/KSVGLoader.cpp
+++ b/ksvg/core/KSVGLoader.cpp
@@ -18,10 +18,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qxml.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qbuffer.h>
+#include <tqxml.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqbuffer.h>
#include <kurl.h>
#include <kdebug.h>
@@ -46,21 +46,21 @@ KSVGLoader::~KSVGLoader()
{
}
-QString KSVGLoader::loadXML(::KURL url)
+TQString KSVGLoader::loadXML(::KURL url)
{
- QString tmpFile;
+ TQString tmpFile;
if(KIO::NetAccess::download(url, tmpFile, 0))
{
- QIODevice *dev = KFilterDev::deviceForFile(tmpFile, "application/x-gzip", true);
- QByteArray contents;
+ TQIODevice *dev = KFilterDev::deviceForFile(tmpFile, "application/x-gzip", true);
+ TQByteArray contents;
if(dev->open(IO_ReadOnly))
contents = dev->readAll();
delete dev;
KIO::NetAccess::removeTempFile(tmpFile);
- return QString(contents);
+ return TQString(contents);
}
- return QString::null;
+ return TQString::null;
}
void KSVGLoader::getSVGContent(::KURL url)
@@ -72,8 +72,8 @@ void KSVGLoader::getSVGContent(::KURL url)
m_job->setAutoErrorHandlingEnabled(true);
- connect(m_job, SIGNAL(data(KIO::Job *, const QByteArray &)), this, SLOT(slotData(KIO::Job *, const QByteArray &)));
- connect(m_job, SIGNAL(result(KIO::Job *)), this, SLOT(slotResult(KIO::Job *)));
+ connect(m_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
+ connect(m_job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotResult(KIO::Job *)));
}
}
@@ -86,31 +86,31 @@ void KSVGLoader::newImageJob(SVGImageElementImpl *image, ::KURL baseURL)
}
ImageStreamMap *map = new ImageStreamMap();
- map->data = new QByteArray();
+ map->data = new TQByteArray();
map->imageElement = image;
KIO::TransferJob *imageJob = KIO::get(::KURL(baseURL, map->imageElement->fileName()), false, false);
- connect(imageJob, SIGNAL(data(KIO::Job *, const QByteArray &)), this, SLOT(slotData(KIO::Job *, const QByteArray &)));
- connect(imageJob, SIGNAL(result(KIO::Job *)), this, SLOT(slotResult(KIO::Job *)));
+ connect(imageJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
+ connect(imageJob, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotResult(KIO::Job *)));
m_imageJobs.insert(imageJob, map);
}
-void KSVGLoader::slotData(KIO::Job *job, const QByteArray &data)
+void KSVGLoader::slotData(KIO::Job *job, const TQByteArray &data)
{
if(job == m_job)
{
- QDataStream dataStream(m_data, IO_WriteOnly | IO_Append);
+ TQDataStream dataStream(m_data, IO_WriteOnly | IO_Append);
dataStream.writeRawBytes(data.data(), data.size());
}
else
{
- QMap<KIO::TransferJob *, ImageStreamMap *>::Iterator it;
+ TQMap<KIO::TransferJob *, ImageStreamMap *>::Iterator it;
for(it = m_imageJobs.begin(); it != m_imageJobs.end(); ++it)
{
if(it.key() == job)
{
- QDataStream dataStream(*(it.data())->data, IO_WriteOnly | IO_Append);
+ TQDataStream dataStream(*(it.data())->data, IO_WriteOnly | IO_Append);
dataStream.writeRawBytes(data.data(), data.size());
break;
}
@@ -124,18 +124,18 @@ void KSVGLoader::slotResult(KIO::Job *job)
{
if(m_job->error() == 0)
{
- QString check = static_cast<KIO::TransferJob *>(job)->url().prettyURL();
+ TQString check = static_cast<KIO::TransferJob *>(job)->url().prettyURL();
if(check.contains(".svgz") || check.contains(".svg.gz"))
{
// decode the gzipped svg and emit it
- QIODevice *dev = KFilterDev::device(new QBuffer(m_data), "application/x-gzip");
+ TQIODevice *dev = KFilterDev::device(new TQBuffer(m_data), "application/x-gzip");
dev->open(IO_ReadOnly);
emit gotResult(dev);
}
else
{
m_job = 0;
- emit gotResult(new QBuffer(m_data));
+ emit gotResult(new TQBuffer(m_data));
m_data.resize(0);
}
}
@@ -151,29 +151,29 @@ void KSVGLoader::slotResult(KIO::Job *job)
}
else
{
- QMap<KIO::TransferJob *, ImageStreamMap *>::Iterator it;
+ TQMap<KIO::TransferJob *, ImageStreamMap *>::Iterator it;
for(it = m_imageJobs.begin(); it != m_imageJobs.end(); ++it)
{
if(it.key() == job)
{
ImageStreamMap *streamMap = it.data();
- QBuffer buffer(*(streamMap->data));
+ TQBuffer buffer(*(streamMap->data));
if(buffer.open(IO_ReadOnly))
{
- const char *imageFormat = QImageIO::imageFormat(&buffer);
+ const char *imageFormat = TQImageIO::imageFormat(&buffer);
if(imageFormat != 0)
{
- QImageIO imageIO(&buffer, imageFormat);
+ TQImageIO imageIO(&buffer, imageFormat);
// Gamma correction
imageIO.setGamma(1/0.45454);
if(imageIO.read())
{
- QImage *image = new QImage(imageIO.image());
+ TQImage *image = new TQImage(imageIO.image());
image->detach();
(streamMap->imageElement)->setImage(image);
}
@@ -193,16 +193,16 @@ void KSVGLoader::slotResult(KIO::Job *job)
}
}
-QString KSVGLoader::getUrl(::KURL url, bool local)
+TQString KSVGLoader::getUrl(::KURL url, bool local)
{
// Security issue: Only retrieve http and https
if(local || (!url.prettyURL().isEmpty()) && ((url.protocol() == "http") || (url.protocol() == "https")))
return loadXML(url);
- return QString::null;
+ return TQString::null;
}
-void KSVGLoader::postUrl(::KURL url, const QByteArray &data, const QString &mimeType, KJS::ExecState *exec, KJS::Object &callBackFunction, KJS::Object &status)
+void KSVGLoader::postUrl(::KURL url, const TQByteArray &data, const TQString &mimeType, KJS::ExecState *exec, KJS::Object &callBackFunction, KJS::Object &status)
{
KIO::TransferJob *job = KIO::http_post(url, data, false);
job->addMetaData("content-type", mimeType);
@@ -212,13 +212,13 @@ void KSVGLoader::postUrl(::KURL url, const QByteArray &data, const QString &mime
m_postUrlData.status = &status;
m_postUrlData.callBackFunction = &callBackFunction;
- connect(job, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *)));
}
class CharacterDataSearcher : public QXmlDefaultHandler
{
public:
- CharacterDataSearcher(const QString &id) : m_id(id) { }
+ CharacterDataSearcher(const TQString &id) : m_id(id) { }
virtual bool startDocument()
{
@@ -226,7 +226,7 @@ public:
return true;
}
- virtual bool startElement(const QString &, const QString &, const QString &qName, const QXmlAttributes &atts)
+ virtual bool startElement(const TQString &, const TQString &, const TQString &qName, const TQXmlAttributes &atts)
{
kdDebug(26001) << "CharacterDataSearcher::startElement, qName " << qName << endl;
@@ -240,7 +240,7 @@ public:
return true;
}
- virtual bool endElement(const QString &, const QString &, const QString &qName)
+ virtual bool endElement(const TQString &, const TQString &, const TQString &qName)
{
if(m_tagFound == qName && m_foundCount > 0)
{
@@ -252,7 +252,7 @@ public:
return true;
}
- virtual bool characters(const QString &ch)
+ virtual bool characters(const TQString &ch)
{
kdDebug(26001) << "CharacterDataSearcher::characters, read " << ch.latin1() << endl;
@@ -262,24 +262,24 @@ public:
return true;
}
- QString result() { return m_result; }
+ TQString result() { return m_result; }
private:
- QString m_id, m_result, m_tagFound;
+ TQString m_id, m_result, m_tagFound;
int m_foundCount;
};
-QString KSVGLoader::getCharacterData(::KURL url, const QString &id)
+TQString KSVGLoader::getCharacterData(::KURL url, const TQString &id)
{
- QXmlSimpleReader reader;
+ TQXmlSimpleReader reader;
CharacterDataSearcher searcher(id);
reader.setContentHandler(&searcher);
reader.setErrorHandler(&searcher);
- QString s = loadXML(url);
+ TQString s = loadXML(url);
- QXmlInputSource source;
+ TQXmlInputSource source;
source.setData(s);
reader.parse(&source);
@@ -292,7 +292,7 @@ QString KSVGLoader::getCharacterData(::KURL url, const QString &id)
class SVGFragmentSearcher : public QXmlDefaultHandler
{
public:
- SVGFragmentSearcher(SVGDocumentImpl *doc, const QString &id, ::KURL url) : m_id(id), m_url(url), m_doc(doc) { }
+ SVGFragmentSearcher(SVGDocumentImpl *doc, const TQString &id, ::KURL url) : m_id(id), m_url(url), m_doc(doc) { }
virtual bool startDocument()
{
@@ -302,7 +302,7 @@ public:
return true;
}
- virtual bool startElement(const QString &namespaceURI, const QString &, const QString &qName, const QXmlAttributes &attrs)
+ virtual bool startElement(const TQString &namespaceURI, const TQString &, const TQString &qName, const TQXmlAttributes &attrs)
{
kdDebug(26001) << "SVGFragmentSearcher::startElement, namespaceURI " << namespaceURI << ", qName " << qName << endl;
bool parse = m_result;
@@ -324,12 +324,12 @@ public:
else
m_result = newElement;
- QXmlAttributes newAttrs;
+ TQXmlAttributes newAttrs;
for(int i = 0; i < attrs.count(); i++)
{
- QString name = attrs.localName(i);
- QString value = attrs.value(i);
+ TQString name = attrs.localName(i);
+ TQString value = attrs.value(i);
if(name == "id")
{
@@ -346,7 +346,7 @@ public:
value.remove(0, 1);
// Convert the id to its mangled version.
- QString id = "@fragment@" + m_url.prettyURL() + "@" + value;
+ TQString id = "@fragment@" + m_url.prettyURL() + "@" + value;
if(m_idMap.contains(id))
{
@@ -373,7 +373,7 @@ public:
return true;
}
- virtual bool endElement(const QString &, const QString &, const QString &)
+ virtual bool endElement(const TQString &, const TQString &, const TQString &)
{
if(m_result)
{
@@ -388,7 +388,7 @@ public:
return true;
}
- virtual bool characters(const QString &ch)
+ virtual bool characters(const TQString &ch)
{
kdDebug(26001) << "SVGFragmentSearcher::characters, read " << ch.latin1() << endl;
@@ -397,7 +397,7 @@ public:
SVGElementImpl *element = m_result->ownerDoc()->getElementFromHandle(m_currentNode->handle());
if(element)
{
- QString t = ch;
+ TQString t = ch;
SVGLangSpaceImpl *langSpace = dynamic_cast<SVGLangSpaceImpl *>(element);
if(langSpace)
@@ -417,28 +417,28 @@ public:
SVGElementImpl *result() { return m_result; }
private:
- QString m_id;
+ TQString m_id;
::KURL m_url;
SVGDocumentImpl *m_doc;
SVGElementImpl *m_result;
DOM::Node *m_currentNode, m_parentNode;
- QMap<QString, SVGElementImpl *> m_idMap;
+ TQMap<TQString, SVGElementImpl *> m_idMap;
};
-SVGElementImpl *KSVGLoader::getSVGFragment(::KURL url, SVGDocumentImpl *doc, const QString &id)
+SVGElementImpl *KSVGLoader::getSVGFragment(::KURL url, SVGDocumentImpl *doc, const TQString &id)
{
- QXmlSimpleReader reader;
+ TQXmlSimpleReader reader;
kdDebug(26001) << "getSVGFragment: " << url.prettyURL() << "#" << id << endl;
SVGFragmentSearcher searcher(doc, id, url);
reader.setContentHandler(&searcher);
reader.setErrorHandler(&searcher);
- QString s = loadXML(url);
+ TQString s = loadXML(url);
- QXmlInputSource source;
+ TQXmlInputSource source;
source.setData(s);
reader.parse(&source);
diff --git a/ksvg/core/KSVGLoader.h b/ksvg/core/KSVGLoader.h
index d0418411..443d0fb7 100644
--- a/ksvg/core/KSVGLoader.h
+++ b/ksvg/core/KSVGLoader.h
@@ -21,7 +21,7 @@
#ifndef KSVGLoader_H
#define KSVGLoader_H
-#include <qobject.h>
+#include <tqobject.h>
class KURL;
@@ -62,27 +62,27 @@ public:
void getSVGContent(::KURL url);
void newImageJob(SVGImageElementImpl *impl, ::KURL url);
- static QString getUrl(::KURL url, bool local = false);
- void postUrl(::KURL url, const QByteArray &data, const QString &mimeType, KJS::ExecState *exec, KJS::Object &callBackFunction, KJS::Object &status);
- static QString getCharacterData(::KURL url, const QString &id);
- static SVGElementImpl *getSVGFragment(::KURL, SVGDocumentImpl *doc, const QString &id);
+ static TQString getUrl(::KURL url, bool local = false);
+ void postUrl(::KURL url, const TQByteArray &data, const TQString &mimeType, KJS::ExecState *exec, KJS::Object &callBackFunction, KJS::Object &status);
+ static TQString getCharacterData(::KURL url, const TQString &id);
+ static SVGElementImpl *getSVGFragment(::KURL, SVGDocumentImpl *doc, const TQString &id);
signals:
- void gotResult(QIODevice *);
+ void gotResult(TQIODevice *);
void imageReady(SVGImageElementImpl *);
private slots:
- void slotData(KIO::Job *, const QByteArray &);
+ void slotData(KIO::Job *, const TQByteArray &);
void slotResult(KIO::Job *);
private:
- static QString loadXML(::KURL);
+ static TQString loadXML(::KURL);
PostUrlData m_postUrlData;
- QByteArray m_data;
+ TQByteArray m_data;
KIO::TransferJob *m_job;
- QMap<KIO::TransferJob *, ImageStreamMap *> m_imageJobs;
+ TQMap<KIO::TransferJob *, ImageStreamMap *> m_imageJobs;
};
}
diff --git a/ksvg/core/KSVGReader.cc b/ksvg/core/KSVGReader.cc
index dd73e420..e479b9a1 100644
--- a/ksvg/core/KSVGReader.cc
+++ b/ksvg/core/KSVGReader.cc
@@ -21,7 +21,7 @@
#include <dom/dom_exception.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qmap.h>
+#include <tqmap.h>
#include <ksimpleconfig.h>
#include <KSVGCanvas.h>
#include "KSVGReader.moc"
@@ -54,18 +54,18 @@ public:
void addSVGElement(SVGSVGElementImpl *one, DOM::NodeImpl *two) { m_svgMap.insert(two, one); }
SVGSVGElementImpl *nextSVGElement(SVGElementImpl *elem);
SVGSVGElementImpl *nextSVGElement(DOM::Node elem);
- void setFinished(bool error, const QString &errorDesc = "") { m_reader->setFinished(error, errorDesc); }
+ void setFinished(bool error, const TQString &errorDesc = "") { m_reader->setFinished(error, errorDesc); }
// Error handling
- void setErrorDescription(const QString &err) { m_errorDesc = err; }
- QString errorDescription() { return m_errorDesc; }
+ void setErrorDescription(const TQString &err) { m_errorDesc = err; }
+ TQString errorDescription() { return m_errorDesc; }
bool hasError() const { return !m_errorDesc.isEmpty(); }
bool getURLMode() const { return m_getURLMode; }
void setGetURLMode(bool mode) { m_getURLMode = mode; }
- QString SVGFragmentId() const { return m_SVGFragmentId; }
- void setSVGFragmentId(const QString &SVGFragmentId) { m_SVGFragmentId = SVGFragmentId; }
+ TQString SVGFragmentId() const { return m_SVGFragmentId; }
+ void setSVGFragmentId(const TQString &SVGFragmentId) { m_SVGFragmentId = SVGFragmentId; }
protected:
Helper(KSVGReader *reader);
@@ -76,12 +76,12 @@ private:
Helper &operator=(const Helper &rhs);
static Helper *m_instance;
- QMap<DOM::NodeImpl *, SVGSVGElementImpl *> m_svgMap;
+ TQMap<DOM::NodeImpl *, SVGSVGElementImpl *> m_svgMap;
KSVGReader *m_reader;
bool m_bFit;
bool m_getURLMode;
- QString m_errorDesc;
- QString m_SVGFragmentId;
+ TQString m_errorDesc;
+ TQString m_SVGFragmentId;
};
class InputHandler : public QXmlDefaultHandler
@@ -89,17 +89,17 @@ class InputHandler : public QXmlDefaultHandler
public:
virtual bool startDocument();
virtual bool endDocument();
- virtual bool startElement(const QString &namespaceURI,
- const QString &localName,
- const QString &qName,
- const QXmlAttributes &atts);
- virtual bool endElement(const QString &namespaceURI,
- const QString &localName,
- const QString &qName);
- virtual bool characters(const QString &ch);
- virtual bool warning(const QXmlParseException &e);
- virtual bool error(const QXmlParseException &e);
- virtual bool fatalError(const QXmlParseException &e);
+ virtual bool startElement(const TQString &namespaceURI,
+ const TQString &localName,
+ const TQString &qName,
+ const TQXmlAttributes &atts);
+ virtual bool endElement(const TQString &namespaceURI,
+ const TQString &localName,
+ const TQString &qName);
+ virtual bool characters(const TQString &ch);
+ virtual bool warning(const TQXmlParseException &e);
+ virtual bool error(const TQXmlParseException &e);
+ virtual bool fatalError(const TQXmlParseException &e);
private:
DOM::Node *m_rootNode;
@@ -186,14 +186,14 @@ bool InputHandler::endDocument()
return true;
}
-bool InputHandler::characters(const QString &ch)
+bool InputHandler::characters(const TQString &ch)
{
kdDebug(26001) << "InputHandler::characters, read " << ch << endl;
if(ch.simplifyWhiteSpace().isEmpty())
return true;
- QString t = ch;
+ TQString t = ch;
SVGSVGElementImpl *root = Helper::self()->nextSVGElement(*m_currentNode);
if(root)
@@ -214,7 +214,7 @@ bool InputHandler::characters(const QString &ch)
return true;
}
-bool InputHandler::startElement(const QString &namespaceURI, const QString &, const QString &qName, const QXmlAttributes &attrs)
+bool InputHandler::startElement(const TQString &namespaceURI, const TQString &, const TQString &qName, const TQXmlAttributes &attrs)
{
kdDebug(26001) << "InputHandler::startElement, namespaceURI " << namespaceURI << " qName " << qName << endl;
@@ -245,14 +245,14 @@ bool InputHandler::startElement(const QString &namespaceURI, const QString &, co
SVGLengthImpl *height = SVGSVGElementImpl::createSVGLength();
width->setValueAsString(svg->getAttribute("width").string());
height->setValueAsString(svg->getAttribute("height").string());
- QString viewbox = QString("0 0 %1 %2").arg(width->value()).arg(height->value());
+ TQString viewbox = TQString("0 0 %1 %2").arg(width->value()).arg(height->value());
//kdDebug(26001) << "VIEWBOX : " << viewbox.latin1() << endl;
svg->setAttribute("viewBox", viewbox);
width->deref();
height->deref();
}
- svg->setAttribute("width", QString::number(Helper::self()->canvas()->width()));
- svg->setAttribute("height", QString::number(Helper::self()->canvas()->height()));
+ svg->setAttribute("width", TQString::number(Helper::self()->canvas()->width()));
+ svg->setAttribute("height", TQString::number(Helper::self()->canvas()->height()));
}
if(!Helper::self()->SVGFragmentId().isEmpty())
@@ -341,7 +341,7 @@ bool InputHandler::startElement(const QString &namespaceURI, const QString &, co
return !Helper::self()->hasError();
}
-bool InputHandler::endElement(const QString &, const QString &, const QString &qName)
+bool InputHandler::endElement(const TQString &, const TQString &, const TQString &qName)
{
kdDebug(26001) << "InputHandler::endElement, qName " << qName << endl;
@@ -364,12 +364,12 @@ bool InputHandler::endElement(const QString &, const QString &, const QString &q
Helper::self()->canvas()->blit();
- QValueList<SVGUseElementImpl *> forwardReferencingUseElements = Helper::self()->doc()->forwardReferencingUseElements();
+ TQValueList<SVGUseElementImpl *> forwardReferencingUseElements = Helper::self()->doc()->forwardReferencingUseElements();
if(!forwardReferencingUseElements.isEmpty())
{
// Create the elements again now that we have parsed the whole document.
- QValueList<SVGUseElementImpl *>::iterator it;
+ TQValueList<SVGUseElementImpl *>::iterator it;
Helper::self()->canvas()->setImmediateUpdate(false);
@@ -407,29 +407,29 @@ bool InputHandler::endElement(const QString &, const QString &, const QString &q
return true;
}
-bool InputHandler::warning(const QXmlParseException &e)
+bool InputHandler::warning(const TQXmlParseException &e)
{
kdDebug(26001) << "[" << e.lineNumber() << ":" << e.columnNumber() << "]: WARNING: " << e.message() << endl;
return true;
}
-bool InputHandler::error(const QXmlParseException &e)
+bool InputHandler::error(const TQXmlParseException &e)
{
kdDebug(26001) << "[" << e.lineNumber() << ":" << e.columnNumber() << "]: ERROR: " << e.message() << endl;
return true;
}
-bool InputHandler::fatalError(const QXmlParseException &e)
+bool InputHandler::fatalError(const TQXmlParseException &e)
{
- QString error;
+ TQString error;
if(Helper::self()->hasError())
{
error = Helper::self()->errorDescription();
- Helper::self()->setErrorDescription(QString::null);
+ Helper::self()->setErrorDescription(TQString::null);
}
else
- error = QString("[%1:%2]: FATAL ERROR: %3").arg(e.lineNumber()).arg(e.columnNumber()).arg(e.message());
+ error = TQString("[%1:%2]: FATAL ERROR: %3").arg(e.lineNumber()).arg(e.columnNumber()).arg(e.message());
kdDebug(26001) << "InputHandler::fatalError, " << error << endl;
@@ -439,18 +439,18 @@ bool InputHandler::fatalError(const QXmlParseException &e)
struct KSVGReader::Private
{
- QXmlSimpleReader *reader;
+ TQXmlSimpleReader *reader;
InputHandler *inputHandler;
SVGDocumentImpl *doc;
KSVGCanvas *canvas;
};
-KSVGReader::KSVGReader(SVGDocumentImpl *doc, KSVGCanvas *canvas, ParsingArgs args) : QObject(), d(new Private)
+KSVGReader::KSVGReader(SVGDocumentImpl *doc, KSVGCanvas *canvas, ParsingArgs args) : TQObject(), d(new Private)
{
d->doc = doc;
d->canvas = canvas;
- d->reader = new QXmlSimpleReader();
+ d->reader = new TQXmlSimpleReader();
d->inputHandler = new InputHandler();
Helper::self(this);
@@ -471,17 +471,17 @@ KSVGReader::~KSVGReader()
delete d;
}
-void KSVGReader::parse(QXmlInputSource *source)
+void KSVGReader::parse(TQXmlInputSource *source)
{
d->reader->parse(source);
}
-void KSVGReader::finishParsing(bool, const QString &errorDesc)
+void KSVGReader::finishParsing(bool, const TQString &errorDesc)
{
Helper::self()->setErrorDescription(errorDesc);
}
-void KSVGReader::setFinished(bool error, const QString &errorDesc)
+void KSVGReader::setFinished(bool error, const TQString &errorDesc)
{
kdDebug(26001) << "KSVGReader::setFinished" << endl;
emit finished(error, errorDesc);
diff --git a/ksvg/core/KSVGReader.h b/ksvg/core/KSVGReader.h
index 722720e1..49259d7d 100644
--- a/ksvg/core/KSVGReader.h
+++ b/ksvg/core/KSVGReader.h
@@ -21,8 +21,8 @@
#ifndef KSVGReader_H
#define KSVGReader_H
-#include <qxml.h>
-#include <qobject.h>
+#include <tqxml.h>
+#include <tqobject.h>
namespace KSVG
{
@@ -37,17 +37,17 @@ public:
bool fit;
bool getURLMode;
- QString SVGFragmentId;
+ TQString SVGFragmentId;
};
KSVGReader(SVGDocumentImpl *doc, KSVGCanvas *canvas, ParsingArgs args);
virtual ~KSVGReader();
- void parse(QXmlInputSource *source);
- void finishParsing(bool, const QString &);
+ void parse(TQXmlInputSource *source);
+ void finishParsing(bool, const TQString &);
signals:
- void finished(bool, const QString &);
+ void finished(bool, const TQString &);
protected:
friend class Helper;
@@ -55,7 +55,7 @@ protected:
SVGDocumentImpl *doc();
KSVGCanvas *canvas();
- void setFinished(bool error, const QString &errorDesc = 0);
+ void setFinished(bool error, const TQString &errorDesc = 0);
private:
struct Private;
diff --git a/ksvg/core/KSVGTextChunk.cpp b/ksvg/core/KSVGTextChunk.cpp
index b8eddcad..4d8111e8 100644
--- a/ksvg/core/KSVGTextChunk.cpp
+++ b/ksvg/core/KSVGTextChunk.cpp
@@ -38,7 +38,7 @@ unsigned int KSVGTextChunk::count() const
return m_text.count();
}
-QString KSVGTextChunk::getText(unsigned int index) const
+TQString KSVGTextChunk::getText(unsigned int index) const
{
return m_text[index];
}
@@ -60,7 +60,7 @@ void KSVGTextChunk::clear()
m_textElements.clear();
}
-void KSVGTextChunk::addText(const QString &text, SVGTextContentElementImpl *textElement)
+void KSVGTextChunk::addText(const TQString &text, SVGTextContentElementImpl *textElement)
{
m_text.append(text);
m_textElements.append(textElement);
diff --git a/ksvg/core/KSVGTextChunk.h b/ksvg/core/KSVGTextChunk.h
index d684087a..21efa055 100644
--- a/ksvg/core/KSVGTextChunk.h
+++ b/ksvg/core/KSVGTextChunk.h
@@ -21,7 +21,7 @@
#ifndef KSVGTEXTCHUNK_H
#define KSVGTEXTCHUNK_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace KSVG
{
@@ -35,16 +35,16 @@ public:
~KSVGTextChunk();
unsigned int count() const;
- QString getText(unsigned int index) const;
+ TQString getText(unsigned int index) const;
SVGTextPositioningElementImpl *getTextElement(unsigned int index);
SVGTextContentElementImpl *getTextContentElement(unsigned int index);
void clear();
- void addText(const QString &text, SVGTextContentElementImpl *textElement);
+ void addText(const TQString &text, SVGTextContentElementImpl *textElement);
private:
- QStringList m_text;
- QPtrList<SVGTextContentElementImpl> m_textElements;
+ TQStringList m_text;
+ TQPtrList<SVGTextContentElementImpl> m_textElements;
};
}
diff --git a/ksvg/ecma/ksvg_ecma.cpp b/ksvg/ecma/ksvg_ecma.cpp
index a2aed6ce..a42d69ad 100644
--- a/ksvg/ecma/ksvg_ecma.cpp
+++ b/ksvg/ecma/ksvg_ecma.cpp
@@ -20,7 +20,7 @@
#include <kdebug.h>
-#include <qvariant.h>
+#include <tqvariant.h>
#include <dom/dom2_events.h>
@@ -71,7 +71,7 @@ KSVGEcma::KSVGEcma(SVGDocumentImpl *doc) : m_doc(doc)
KSVGEcma::~KSVGEcma()
{
// We are 0 soon so event listeners may NOT call us
- QPtrListIterator<KSVGEcmaEventListener> it(m_ecmaEventListeners);
+ TQPtrListIterator<KSVGEcmaEventListener> it(m_ecmaEventListeners);
for(; it.current(); ++it)
it.current()->forbidRemove();
@@ -129,7 +129,7 @@ ExecState *KSVGEcma::globalExec()
SVGEventListener *KSVGEcma::createEventListener(DOM::DOMString type)
{
- QPtrListIterator<KSVGEcmaEventListener> it(m_ecmaEventListeners);
+ TQPtrListIterator<KSVGEcmaEventListener> it(m_ecmaEventListeners);
for(; it.current(); ++it)
{
@@ -159,11 +159,11 @@ SVGEventListener *KSVGEcma::createEventListener(DOM::DOMString type)
return event;
}
-QString KSVGEcma::valueOfEventListener(SVGEventListener *listener) const
+TQString KSVGEcma::valueOfEventListener(SVGEventListener *listener) const
{
KSVGEcmaEventListener *event = static_cast<KSVGEcmaEventListener *>(listener);
if(!event)
- return QString::null;
+ return TQString::null;
return event->type();
}
@@ -197,7 +197,7 @@ Value KSVGEcma::getUrl(ExecState *exec, ::KURL url)
Object *status = new Object(new AsyncStatus());
// FIXME: Security issue, allows local testing of getURL(), REMOVE BEFORE RELEASE! (Niko)
- QString svgDocument = KSVGLoader::getUrl(url, true);
+ TQString svgDocument = KSVGLoader::getUrl(url, true);
if(svgDocument.length() > 0)
{
status->put(exec, Identifier("success"), Boolean(true));
@@ -212,14 +212,14 @@ Value KSVGEcma::getUrl(ExecState *exec, ::KURL url)
return Value(*status);
}
-void KSVGEcma::postUrl(ExecState *exec, ::KURL url, const QString &data, const QString &mimeType, const QString &contentEncoding, Object &callBackFunction)
+void KSVGEcma::postUrl(ExecState *exec, ::KURL url, const TQString &data, const TQString &mimeType, const TQString &contentEncoding, Object &callBackFunction)
{
Object *status = new Object(new AsyncStatus());
status->put(exec, Identifier("content"), String(""));
status->put(exec, Identifier("success"), Boolean(false));
- QByteArray byteArray;
- QDataStream ds(byteArray, IO_WriteOnly);
+ TQByteArray byteArray;
+ TQDataStream ds(byteArray, IO_WriteOnly);
ds << data;
// Support gzip compression
@@ -310,20 +310,20 @@ DOM::Node KSVG::toNode(const Value &val)
return DOM::Node();
}
-QVariant KSVG::valueToVariant(ExecState *exec, const Value &val)
+TQVariant KSVG::valueToVariant(ExecState *exec, const Value &val)
{
- QVariant res;
+ TQVariant res;
switch(val.type())
{
case BooleanType:
- res = QVariant(val.toBoolean(exec), 0);
+ res = TQVariant(val.toBoolean(exec), 0);
break;
case NumberType:
- res = QVariant(val.toNumber(exec));
+ res = TQVariant(val.toNumber(exec));
break;
case StringType:
- res = QVariant(val.toString(exec).qstring());
+ res = TQVariant(val.toString(exec).qstring());
break;
default:
// everything else will be 'invalid'
diff --git a/ksvg/ecma/ksvg_ecma.h b/ksvg/ecma/ksvg_ecma.h
index 7c236454..ab58f67a 100644
--- a/ksvg/ecma/ksvg_ecma.h
+++ b/ksvg/ecma/ksvg_ecma.h
@@ -21,7 +21,7 @@
#ifndef KSVGEcma_H
#define KSVGEcma_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "ksvg_bridge.h"
@@ -49,7 +49,7 @@ namespace KSVG
class SVGDOMNodeBridge;
}
-class QVariant;
+class TQVariant;
class KSVGEcmaEventListener;
class KSVGScriptInterpreter;
@@ -63,7 +63,7 @@ namespace KSVG
KJS::Value getDOMEvent(KJS::ExecState *, KSVG::SVGEventImpl *);
KJS::Value getString(DOM::DOMString);
- QVariant valueToVariant(KJS::ExecState *, const KJS::Value &);
+ TQVariant valueToVariant(KJS::ExecState *, const KJS::Value &);
DOM::Node toNode(const KJS::Value &);
@@ -88,7 +88,7 @@ public:
KSVGScriptInterpreter *interpreter() { return m_interpreter; }
KSVG::SVGEventListener *createEventListener(DOM::DOMString type);
- QString valueOfEventListener(KSVG::SVGEventListener *listener) const;
+ TQString valueOfEventListener(KSVG::SVGEventListener *listener) const;
void addEventListener(KSVGEcmaEventListener *listener);
void removeEventListener(KSVGEcmaEventListener *listener);
bool hasEventListeners();
@@ -96,7 +96,7 @@ public:
void finishedWithEvent(KSVG::SVGEventImpl *event);
KJS::Value getUrl(KJS::ExecState *exec, ::KURL url);
- void postUrl(KJS::ExecState *exec, ::KURL url, const QString &data, const QString &mimeType, const QString &contentEncoding, KJS::Object &callBackFunction);
+ void postUrl(KJS::ExecState *exec, ::KURL url, const TQString &data, const TQString &mimeType, const TQString &contentEncoding, KJS::Object &callBackFunction);
private:
bool m_init, m_hasListeners;
@@ -105,7 +105,7 @@ private:
KSVG::Window *m_window;
KSVGScriptInterpreter *m_interpreter;
- QPtrList<KSVGEcmaEventListener> m_ecmaEventListeners;
+ TQPtrList<KSVGEcmaEventListener> m_ecmaEventListeners;
};
diff --git a/ksvg/ecma/ksvg_ecmaeventlistener.cpp b/ksvg/ecma/ksvg_ecmaeventlistener.cpp
index 4b59f924..2dd81131 100644
--- a/ksvg/ecma/ksvg_ecmaeventlistener.cpp
+++ b/ksvg/ecma/ksvg_ecmaeventlistener.cpp
@@ -20,7 +20,7 @@
#include <kdebug.h>
-#include <qvariant.h>
+#include <tqvariant.h>
#include "SVGDocumentImpl.h"
#include "SVGSVGElementImpl.h"
@@ -32,7 +32,7 @@
using namespace KSVG;
using namespace KJS;
-KSVGEcmaEventListener::KSVGEcmaEventListener(KJS::Object _listener, QString _type, KSVGEcma *_ecma) : SVGEventListener()
+KSVGEcmaEventListener::KSVGEcmaEventListener(KJS::Object _listener, TQString _type, KSVGEcma *_ecma) : SVGEventListener()
{
m_listener = _listener;
m_remove = true;
@@ -84,8 +84,8 @@ void KSVGEcmaEventListener::handleEvent(SVGEventImpl *evt)
}
else
{
- QVariant ret = valueToVariant(exec, retval);
- if(ret.type() == QVariant::Bool && ret.toBool() == false)
+ TQVariant ret = valueToVariant(exec, retval);
+ if(ret.type() == TQVariant::Bool && ret.toBool() == false)
evt->preventDefault();
}
}
diff --git a/ksvg/ecma/ksvg_ecmaeventlistener.h b/ksvg/ecma/ksvg_ecmaeventlistener.h
index 16ebe3bc..ee80c212 100644
--- a/ksvg/ecma/ksvg_ecmaeventlistener.h
+++ b/ksvg/ecma/ksvg_ecmaeventlistener.h
@@ -31,19 +31,19 @@ namespace KJS
class KSVGEcmaEventListener : public KSVG::SVGEventListener
{
public:
- KSVGEcmaEventListener(KJS::Object _listener, QString _type, KSVGEcma *_ecma);
+ KSVGEcmaEventListener(KJS::Object _listener, TQString _type, KSVGEcma *_ecma);
virtual ~KSVGEcmaEventListener();
virtual void handleEvent(KSVG::SVGEventImpl *evt);
virtual DOM::DOMString eventListenerType();
- QString type() { return m_type; }
+ TQString type() { return m_type; }
void forbidRemove();
private:
KSVGEcma *m_ecma;
- QString m_type;
+ TQString m_type;
bool m_remove;
KJS::Object m_listener;
diff --git a/ksvg/ecma/ksvg_helper.cpp b/ksvg/ecma/ksvg_helper.cpp
index 597f9a06..24f05101 100644
--- a/ksvg/ecma/ksvg_helper.cpp
+++ b/ksvg/ecma/ksvg_helper.cpp
@@ -37,7 +37,7 @@ KJS::UString::UString(const DOM::DOMString &d)
rep = KJS::UString::Rep::create(dat, len);
}
-KJS::UString::UString(const QString &d)
+KJS::UString::UString(const TQString &d)
{
unsigned int len = d.length();
KJS::UChar *dat = new UChar[len];
@@ -45,24 +45,24 @@ KJS::UString::UString(const QString &d)
rep = KJS::UString::Rep::create(dat, len);
}
-QString KJS::UString::qstring() const
+TQString KJS::UString::qstring() const
{
- return QString(reinterpret_cast<QChar *>(const_cast<KJS::UChar *>(data())), size());
+ return TQString(reinterpret_cast<TQChar *>(const_cast<KJS::UChar *>(data())), size());
}
DOM::DOMString KJS::UString::string() const
{
- return DOM::DOMString(reinterpret_cast<QChar *>(const_cast<KJS::UChar *>(data())), size());
+ return DOM::DOMString(reinterpret_cast<TQChar *>(const_cast<KJS::UChar *>(data())), size());
}
DOM::DOMString KJS::Identifier::string() const
{
- return DOM::DOMString((QChar*) data(), size());
+ return DOM::DOMString((TQChar*) data(), size());
}
-QString KJS::Identifier::qstring() const
+TQString KJS::Identifier::qstring() const
{
- return QString((QChar*) data(), size());
+ return TQString((TQChar*) data(), size());
}
// vim:ts=4:noet
diff --git a/ksvg/ecma/ksvg_scriptinterpreter.h b/ksvg/ecma/ksvg_scriptinterpreter.h
index ed7c6af8..e3f7cc42 100644
--- a/ksvg/ecma/ksvg_scriptinterpreter.h
+++ b/ksvg/ecma/ksvg_scriptinterpreter.h
@@ -21,7 +21,7 @@
#ifndef KSVGScriptInterpreter_H
#define KSVGScriptInterpreter_H
-#include <qptrdict.h>
+#include <tqptrdict.h>
namespace KJS
{
@@ -63,7 +63,7 @@ private:
bool m_attributeGetMode, m_attributeSetMode;
- QPtrDict<KJS::ObjectImp> m_domObjects;
+ TQPtrDict<KJS::ObjectImp> m_domObjects;
};
#endif
diff --git a/ksvg/ecma/ksvg_window.cpp b/ksvg/ecma/ksvg_window.cpp
index d4c04de3..80a4ee14 100644
--- a/ksvg/ecma/ksvg_window.cpp
+++ b/ksvg/ecma/ksvg_window.cpp
@@ -42,7 +42,7 @@
#include <kparts/part.h>
#include <assert.h>
#include <kdebug.h>
-#include <qstylesheet.h>
+#include <tqstylesheet.h>
#include <kmessagebox.h>
#include <klocale.h>
#include <kinputdialog.h>
@@ -303,7 +303,7 @@ Value WindowFunc::call(ExecState *exec, Object &thisObj, const List &args)
Window *window = static_cast<Window *>(thisObj.imp());
Value v = args[0];
UString s = v.toString(exec);
- QString str = s.qstring();
+ TQString str = s.qstring();
switch(id)
{
@@ -342,9 +342,9 @@ Value WindowFunc::call(ExecState *exec, Object &thisObj, const List &args)
case KSVG::Window::_PostURL:
{
KURL url((const_cast<Window *>(window))->doc()->baseUrl(), args[0].toString(exec).qstring());
- QString data = args[1].toString(exec).qstring();
- QString mimeType = args[3].toString(exec).qstring();
- QString contentEncoding = args[4].toString(exec).qstring();
+ TQString data = args[1].toString(exec).qstring();
+ TQString mimeType = args[3].toString(exec).qstring();
+ TQString contentEncoding = args[4].toString(exec).qstring();
Object callBackFunction = Object::dynamicCast(args[2]);
(const_cast<Window *>(window))->doc()->ecmaEngine()->postUrl(exec, url, data, mimeType, contentEncoding, callBackFunction);
@@ -364,7 +364,7 @@ Value WindowFunc::call(ExecState *exec, Object &thisObj, const List &args)
SVGDocumentImpl *curDoc = (const_cast<Window *>(window))->doc();
doc->addToDocumentDict(curDoc->handle(), curDoc);
- QXmlInputSource *svgFragment = new QXmlInputSource();
+ TQXmlInputSource *svgFragment = new TQXmlInputSource();
svgFragment->setData(args[0].toString(exec).qstring());
doc->parseSVG(svgFragment, true);
@@ -384,15 +384,15 @@ Value WindowFunc::call(ExecState *exec, Object &thisObj, const List &args)
// mop: from khtml. do we need that?
// part->xmlDocImpl()->updateRendering();
bool ok;
- QString str2;
+ TQString str2;
if (args.size() >= 2)
str2 = KInputDialog::getText(i18n("Prompt"),
- QStyleSheet::convertFromPlainText(str),
+ TQStyleSheet::convertFromPlainText(str),
args[1].toString(exec).qstring(), &ok);
else
str2 = KInputDialog::getText(i18n("Prompt"),
- QStyleSheet::convertFromPlainText(str),
- QString::null, &ok);
+ TQStyleSheet::convertFromPlainText(str),
+ TQString::null, &ok);
if ( ok )
return String(str2);
else
@@ -455,7 +455,7 @@ ScheduledAction::ScheduledAction(Object _func, List _args, bool _singleShot)
singleShot = _singleShot;
}
-ScheduledAction::ScheduledAction(QString _code, bool _singleShot)
+ScheduledAction::ScheduledAction(TQString _code, bool _singleShot)
{
code = _code;
isFunction = false;
@@ -503,7 +503,7 @@ void WindowQObject::parentDestroyed()
{
killTimers();
- QMapIterator<int, ScheduledAction *> it;
+ TQMapIterator<int, ScheduledAction *> it;
for(it = scheduledActions.begin(); it != scheduledActions.end(); ++it)
{
ScheduledAction *action = *it;
@@ -535,7 +535,7 @@ void WindowQObject::clearTimeout(int timerId, bool delAction)
if(delAction)
{
- QMapIterator<int, ScheduledAction *> it = scheduledActions.find(timerId);
+ TQMapIterator<int, ScheduledAction *> it = scheduledActions.find(timerId);
if(it != scheduledActions.end())
{
ScheduledAction *action = *it;
@@ -545,9 +545,9 @@ void WindowQObject::clearTimeout(int timerId, bool delAction)
}
}
-void WindowQObject::timerEvent(QTimerEvent *e)
+void WindowQObject::timerEvent(TQTimerEvent *e)
{
- QMapIterator<int, ScheduledAction *> it = scheduledActions.find(e->timerId());
+ TQMapIterator<int, ScheduledAction *> it = scheduledActions.find(e->timerId());
if(it != scheduledActions.end())
{
ScheduledAction *action = *it;
diff --git a/ksvg/ecma/ksvg_window.h b/ksvg/ecma/ksvg_window.h
index 28c9699e..db6ac9a3 100644
--- a/ksvg/ecma/ksvg_window.h
+++ b/ksvg/ecma/ksvg_window.h
@@ -20,7 +20,7 @@
#define KSVG_WINDOW_H
#include <kjs/object.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
namespace KSVG {
@@ -58,7 +58,7 @@ public:
*/
static Window *retrieveActive(KJS::ExecState *exec);
- QGuardedPtr<KSVG::SVGDocumentImpl> doc() const { return m_doc; }
+ TQGuardedPtr<KSVG::SVGDocumentImpl> doc() const { return m_doc; }
int installTimeout(const KJS::UString &handler, int t, bool singleShot);
void clearTimeout(int timerId);
@@ -82,23 +82,23 @@ public:
private:
WindowQObject *winq;
- QGuardedPtr<KSVG::SVGDocumentImpl> m_doc;
+ TQGuardedPtr<KSVG::SVGDocumentImpl> m_doc;
};
class ScheduledAction {
public:
ScheduledAction(KJS::Object _func, KJS::List _args, bool _singleShot);
- ScheduledAction(QString _code, bool _singleShot);
+ ScheduledAction(TQString _code, bool _singleShot);
~ScheduledAction();
void execute(Window *window);
KJS::Object func;
KJS::List args;
- QString code;
+ TQString code;
bool isFunction;
bool singleShot;
};
-class WindowQObject : public QObject {
+class WindowQObject : public TQObject {
Q_OBJECT
public:
WindowQObject(Window *w);
@@ -111,11 +111,11 @@ public slots:
protected slots:
void parentDestroyed();
protected:
- void timerEvent(QTimerEvent *e);
+ void timerEvent(TQTimerEvent *e);
private:
Window *parent;
//KHTMLPart *part; // not guarded, may be dangling
- QMap<int, ScheduledAction*> scheduledActions;
+ TQMap<int, ScheduledAction*> scheduledActions;
};
}
diff --git a/ksvg/impl/LRUCache.h b/ksvg/impl/LRUCache.h
index 879f1856..f9045262 100644
--- a/ksvg/impl/LRUCache.h
+++ b/ksvg/impl/LRUCache.h
@@ -21,7 +21,7 @@
#ifndef LRUCACHE_H
#define LRUCACHE_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
namespace KSVG
{
@@ -61,7 +61,7 @@ protected:
int m_cost;
};
- typedef QValueList<CacheItem> CacheItemList;
+ typedef TQValueList<CacheItem> CacheItemList;
typename CacheItemList::iterator find(const keyType& key);
void enforceCostConstraint();
diff --git a/ksvg/impl/SVGAngleImpl.cc b/ksvg/impl/SVGAngleImpl.cc
index 6102329d..26e70b1b 100644
--- a/ksvg/impl/SVGAngleImpl.cc
+++ b/ksvg/impl/SVGAngleImpl.cc
@@ -89,7 +89,7 @@ void SVGAngleImpl::setValueAsString(const DOM::DOMString &valueAsString)
{
m_valueAsString = valueAsString;
- QString s = valueAsString.string();
+ TQString s = valueAsString.string();
bool bOK;
m_valueInSpecifiedUnits = s.toFloat(&bOK);
diff --git a/ksvg/impl/SVGAnimateColorElementImpl.cc b/ksvg/impl/SVGAnimateColorElementImpl.cc
index c4cc0ad4..55d71e40 100644
--- a/ksvg/impl/SVGAnimateColorElementImpl.cc
+++ b/ksvg/impl/SVGAnimateColorElementImpl.cc
@@ -75,14 +75,14 @@ void SVGAnimateColorElementImpl::handleTimerEvent()
}
else
{
- QColor fromColor(m_fromColor->rgbColor().color());
- QColor toColor(m_toColor->rgbColor().color());
+ TQColor fromColor(m_fromColor->rgbColor().color());
+ TQColor toColor(m_toColor->rgbColor().color());
int red = (int) rint(((toColor.red() - fromColor.red()) / static_cast<double>(m_steps)) * m_step + fromColor.red());
int green = (int) rint(((toColor.green() - fromColor.green()) / static_cast<double>(m_steps)) * m_step + fromColor.green());
int blue = (int) rint(((toColor.blue() - fromColor.blue()) / static_cast<double>(m_steps)) * m_step + fromColor.blue());
- QString color = "rgb(" + QString::number(red) + "," + QString::number(green) + "," + QString::number(blue) + ")";
+ TQString color = "rgb(" + TQString::number(red) + "," + TQString::number(green) + "," + TQString::number(blue) + ")";
applyAttribute(getAttributeName(), color);
}
diff --git a/ksvg/impl/SVGAnimateColorElementImpl.h b/ksvg/impl/SVGAnimateColorElementImpl.h
index 2832802e..5e6fc24d 100644
--- a/ksvg/impl/SVGAnimateColorElementImpl.h
+++ b/ksvg/impl/SVGAnimateColorElementImpl.h
@@ -25,7 +25,7 @@
#include "SVGAnimationElementImpl.h"
-class QTimer;
+class TQTimer;
namespace KSVG
{
diff --git a/ksvg/impl/SVGAnimateElementImpl.cc b/ksvg/impl/SVGAnimateElementImpl.cc
index ab9bc52c..ccf8565d 100644
--- a/ksvg/impl/SVGAnimateElementImpl.cc
+++ b/ksvg/impl/SVGAnimateElementImpl.cc
@@ -81,7 +81,7 @@ void SVGAnimateElementImpl::handleTimerEvent()
else
{
m_animVal += m_addStep;
- applyAttribute(getAttributeName(), QString::number(m_animVal));
+ applyAttribute(getAttributeName(), TQString::number(m_animVal));
}
if(m_step < m_steps)
@@ -130,7 +130,7 @@ void SVGAnimateElementImpl::handleTimerEvent()
if(m_additive == "replace" && needCombine)
needCombine = false;
- applyAttribute(m_attributeName, QString::number(m_from), needCombine);
+ applyAttribute(m_attributeName, TQString::number(m_from), needCombine);
m_step++;
diff --git a/ksvg/impl/SVGAnimateElementImpl.h b/ksvg/impl/SVGAnimateElementImpl.h
index 855ced6e..7418f7b1 100644
--- a/ksvg/impl/SVGAnimateElementImpl.h
+++ b/ksvg/impl/SVGAnimateElementImpl.h
@@ -24,7 +24,7 @@
#include "ksvg_lookup.h"
#include "SVGAnimationElementImpl.h"
-class QTimer;
+class TQTimer;
namespace KSVG
{
@@ -40,7 +40,7 @@ public:
private:
double m_addStep, m_animVal;
- QTimer *m_timer;
+ TQTimer *m_timer;
int m_steps, m_step;
diff --git a/ksvg/impl/SVGAnimateMotionElementImpl.cc b/ksvg/impl/SVGAnimateMotionElementImpl.cc
index ce756d55..fe816769 100644
--- a/ksvg/impl/SVGAnimateMotionElementImpl.cc
+++ b/ksvg/impl/SVGAnimateMotionElementImpl.cc
@@ -85,9 +85,9 @@ void SVGAnimateMotionElementImpl::handleTimerEvent(bool /*needCombine*/)
if(m_step <= m_pathArray->count() - 1)
{
- QPoint p = m_pathArray->point(m_step - 50);
- applyAttribute("x", QString::number(p.x()));
- applyAttribute("y", QString::number(p.y()));
+ TQPoint p = m_pathArray->point(m_step - 50);
+ applyAttribute("x", TQString::number(p.x()));
+ applyAttribute("y", TQString::number(p.y()));
kdDebug() << " X " << p.x() << " Y " << p.y() << " (" << m_pathArray->count() << "; " << m_step << ")" <<endl;
}
diff --git a/ksvg/impl/SVGAnimateTransformElementImpl.cc b/ksvg/impl/SVGAnimateTransformElementImpl.cc
index d2634bb1..cf3922f8 100644
--- a/ksvg/impl/SVGAnimateTransformElementImpl.cc
+++ b/ksvg/impl/SVGAnimateTransformElementImpl.cc
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "SVGLengthImpl.h"
#include "SVGHelperImpl.h"
@@ -85,7 +85,7 @@ void SVGAnimateTransformElementImpl::setAttributes()
m_from = list->getFirst()->angle();
- QStringList stringList = QStringList::split(' ', list->getFirst()->toString());
+ TQStringList stringList = TQStringList::split(' ', list->getFirst()->toString());
m_rotateX = stringList[1].toInt();
m_rotateY = stringList[2].mid(0, stringList[2].length() - 1).toInt();
@@ -127,13 +127,13 @@ void SVGAnimateTransformElementImpl::setAttributes()
DOM::DOMString _values = getAttribute("values");
if(!_values.isNull())
{
- QString test = _values.string();
+ TQString test = _values.string();
if(test.contains(";"))
{
SVGLengthImpl *temp = SVGSVGElementImpl::createSVGLength();
- QStringList list = QStringList::split(';', test);
+ TQStringList list = TQStringList::split(';', test);
temp->setValueAsString(list[0]);
m_from = temp->value();
temp->setValueAsString(list[1]);
@@ -192,8 +192,8 @@ void SVGAnimateTransformElementImpl::handleTimerEvent(bool)
else if(m_type == "skewy")
transform->setSkewY(m_from);
- QString trans = transform->toString();
- QString last = trans;
+ TQString trans = transform->toString();
+ TQString last = trans;
if(targetElement()->hasAttribute("transform"))
{
@@ -203,7 +203,7 @@ void SVGAnimateTransformElementImpl::handleTimerEvent(bool)
{
int pos = trans.find(m_lastTransform);
- QString extract;
+ TQString extract;
extract += trans.mid(0, pos);
extract += trans.mid(pos + m_lastTransform.length() + 1, trans.length());
diff --git a/ksvg/impl/SVGAnimateTransformElementImpl.h b/ksvg/impl/SVGAnimateTransformElementImpl.h
index 7e6e2653..ddd73989 100644
--- a/ksvg/impl/SVGAnimateTransformElementImpl.h
+++ b/ksvg/impl/SVGAnimateTransformElementImpl.h
@@ -25,7 +25,7 @@
#include "SVGAnimationElementImpl.h"
-class QTimer;
+class TQTimer;
namespace KSVG
{
@@ -42,7 +42,7 @@ public:
virtual void setAttributes();
private:
- QString m_type, m_lastTransform;
+ TQString m_type, m_lastTransform;
int m_times;
@@ -53,7 +53,7 @@ private:
double m_from, m_to, m_newFrom, m_newTo;
double m_addStep;
- QTimer *m_transformTimer;
+ TQTimer *m_transformTimer;
SVGTransformListImpl *m_transformList;
bool m_firstEvent;
diff --git a/ksvg/impl/SVGAnimatedPointsImpl.cc b/ksvg/impl/SVGAnimatedPointsImpl.cc
index 093ded77..07db7d3b 100644
--- a/ksvg/impl/SVGAnimatedPointsImpl.cc
+++ b/ksvg/impl/SVGAnimatedPointsImpl.cc
@@ -20,7 +20,7 @@
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "CanvasItem.h"
#include "SVGPointListImpl.h"
@@ -62,7 +62,7 @@ SVGPointListImpl *SVGAnimatedPointsImpl::animatedPoints() const
return m_animatedPoints;
}
-void SVGAnimatedPointsImpl::parsePoints(QString _points, SVGPointListImpl *points)
+void SVGAnimatedPointsImpl::parsePoints(TQString _points, SVGPointListImpl *points)
{
if(_points.isEmpty())
return;
@@ -73,13 +73,13 @@ void SVGAnimatedPointsImpl::parsePoints(QString _points, SVGPointListImpl *point
return;
_points.replace(',', ' ');
- _points.replace('\r', QString::null);
- _points.replace('\n', QString::null);
+ _points.replace('\r', TQString::null);
+ _points.replace('\n', TQString::null);
_points = _points.simplifyWhiteSpace();
- QStringList pointList = QStringList::split(' ', _points);
- for(QStringList::Iterator it = pointList.begin(); it != pointList.end(); it++)
+ TQStringList pointList = TQStringList::split(' ', _points);
+ for(TQStringList::Iterator it = pointList.begin(); it != pointList.end(); it++)
{
SVGPointImpl *point = SVGSVGElementImpl::createSVGPoint();
point->setX((*(it++)).toFloat());
diff --git a/ksvg/impl/SVGAnimatedPointsImpl.h b/ksvg/impl/SVGAnimatedPointsImpl.h
index ef4dafca..9c4c88d7 100644
--- a/ksvg/impl/SVGAnimatedPointsImpl.h
+++ b/ksvg/impl/SVGAnimatedPointsImpl.h
@@ -25,7 +25,7 @@
#include "ksvg_lookup.h"
-class QString;
+class TQString;
namespace KSVG
{
@@ -40,7 +40,7 @@ public:
SVGPointListImpl *points() const;
SVGPointListImpl *animatedPoints() const;
- static void parsePoints(QString _points, SVGPointListImpl *points);
+ static void parsePoints(TQString _points, SVGPointListImpl *points);
protected:
SVGPointListImpl *m_points;
diff --git a/ksvg/impl/SVGAnimationElementImpl.cc b/ksvg/impl/SVGAnimationElementImpl.cc
index 454a323e..45c4af2b 100644
--- a/ksvg/impl/SVGAnimationElementImpl.cc
+++ b/ksvg/impl/SVGAnimationElementImpl.cc
@@ -22,7 +22,7 @@
#include <kdebug.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include "CanvasItem.h"
#include "SVGHelperImpl.h"
@@ -74,10 +74,10 @@ SVGElementImpl *SVGAnimationElementImpl::targetElement() const
return m_targetElement;
}
-double SVGAnimationElementImpl::parseClockValue(const QString &data) const
+double SVGAnimationElementImpl::parseClockValue(const TQString &data) const
{
- QString parse = data.stripWhiteSpace();
- QString debugOutput = "parseClockValue(" + parse + ") -> ";
+ TQString parse = data.stripWhiteSpace();
+ TQString debugOutput = "parseClockValue(" + parse + ") -> ";
if(parse == "indefinite") // Saves some time...
return -1;
@@ -98,7 +98,7 @@ double SVGAnimationElementImpl::parseClockValue(const QString &data) const
if(parse.find('.') != -1)
{
- QString temp = parse.mid(9, 2);
+ TQString temp = parse.mid(9, 2);
milliseconds = temp.toUInt();
result += (milliseconds * (1 / pow(10.0, temp.length())));
}
@@ -113,7 +113,7 @@ double SVGAnimationElementImpl::parseClockValue(const QString &data) const
if(parse.find('.') != -1)
{
- QString temp = parse.mid(6, 2);
+ TQString temp = parse.mid(6, 2);
milliseconds = temp.toUInt();
result += (milliseconds * (1 / pow(10.0, temp.length())));
}
@@ -129,7 +129,7 @@ double SVGAnimationElementImpl::parseClockValue(const QString &data) const
else
{
result = parse.mid(0, dotPosition).toUInt() * 3600;
- QString temp = parse.mid(dotPosition + 1, parse.length() - dotPosition - 2);
+ TQString temp = parse.mid(dotPosition + 1, parse.length() - dotPosition - 2);
result += (3600.0 * temp.toUInt()) * (1 / pow(10.0, temp.length()));
}
}
@@ -140,7 +140,7 @@ double SVGAnimationElementImpl::parseClockValue(const QString &data) const
else
{
result = parse.mid(0, dotPosition).toUInt() * 60;
- QString temp = parse.mid(dotPosition + 1, parse.length() - dotPosition - 4);
+ TQString temp = parse.mid(dotPosition + 1, parse.length() - dotPosition - 4);
result += (60.0 * temp.toUInt()) * (1 / pow(10.0, temp.length()));
}
}
@@ -151,7 +151,7 @@ double SVGAnimationElementImpl::parseClockValue(const QString &data) const
else
{
result = parse.mid(0, dotPosition).toUInt() / 1000.0;
- QString temp = parse.mid(dotPosition + 1, parse.length() - dotPosition - 3);
+ TQString temp = parse.mid(dotPosition + 1, parse.length() - dotPosition - 3);
result += (temp.toUInt() / 1000.0) * (1 / pow(10.0, temp.length()));
}
}
@@ -162,7 +162,7 @@ double SVGAnimationElementImpl::parseClockValue(const QString &data) const
else
{
result = parse.mid(0, dotPosition).toUInt();
- QString temp = parse.mid(dotPosition + 1, parse.length() - dotPosition - 2);
+ TQString temp = parse.mid(dotPosition + 1, parse.length() - dotPosition - 2);
result += temp.toUInt() * (1 / pow(10.0, temp.length()));
}
}
@@ -229,7 +229,7 @@ void SVGAnimationElementImpl::putValueProperty(ExecState *exec, int token, const
if(!(attr & KJS::Internal))
return;
- QString val = value.toString(exec).qstring();
+ TQString val = value.toString(exec).qstring();
switch(token)
{
case Href:
@@ -293,12 +293,12 @@ void SVGAnimationElementImpl::putValueProperty(ExecState *exec, int token, const
// Parse data
for(unsigned int i = 0; i < temp->numberOfItems(); i++)
{
- QString current = temp->getItem(i)->string();
+ TQString current = temp->getItem(i)->string();
if(current.startsWith("accessKey"))
{
// Register keyDownEventListener for the character
- QString character = current.mid(current.length() - 2, 1);
+ TQString character = current.mid(current.length() - 2, 1);
kdDebug() << "ACCESSKEY CHARACTER " << character << endl;
}
@@ -307,7 +307,7 @@ void SVGAnimationElementImpl::putValueProperty(ExecState *exec, int token, const
int firstBrace = current.find("(");
int secondBrace = current.find(")");
- QString wallclockValue = current.mid(firstBrace + 1, secondBrace - firstBrace - 2);
+ TQString wallclockValue = current.mid(firstBrace + 1, secondBrace - firstBrace - 2);
kdDebug() << "WALLCLOCK VALUE " << wallclockValue << endl;
}
@@ -315,8 +315,8 @@ void SVGAnimationElementImpl::putValueProperty(ExecState *exec, int token, const
{
int dotPosition = current.find(".");
- QString element = current.mid(0, dotPosition);
- QString clockValue;
+ TQString element = current.mid(0, dotPosition);
+ TQString clockValue;
if(current.contains("begin"))
clockValue = current.mid(dotPosition + 6);
@@ -333,7 +333,7 @@ void SVGAnimationElementImpl::putValueProperty(ExecState *exec, int token, const
else if(current.contains("-"))
plusMinusPosition = current.find("-");
- QString event = current.mid(dotPosition + 1, plusMinusPosition - dotPosition - 1);
+ TQString event = current.mid(dotPosition + 1, plusMinusPosition - dotPosition - 1);
clockValue = current.mid(dotPosition + event.length() + 1);
kdDebug() << "EVENT " << event << endl;
@@ -427,7 +427,7 @@ void SVGAnimationElementImpl::setTargetElement(SVGElementImpl *target)
m_targetElement->ref();
}
-void SVGAnimationElementImpl::applyAttribute(const QString &name, const QString &value)
+void SVGAnimationElementImpl::applyAttribute(const TQString &name, const TQString &value)
{
SVGElementImpl *target = targetElement();
if(!target)
diff --git a/ksvg/impl/SVGAnimationElementImpl.h b/ksvg/impl/SVGAnimationElementImpl.h
index 9fd9446e..7a42a77e 100644
--- a/ksvg/impl/SVGAnimationElementImpl.h
+++ b/ksvg/impl/SVGAnimationElementImpl.h
@@ -81,7 +81,7 @@ public:
SVGElementImpl *targetElement() const;
void setTargetElement(SVGElementImpl *target);
- void applyAttribute(const QString &name, const QString &value);
+ void applyAttribute(const TQString &name, const TQString &value);
virtual void handleTimerEvent() { } //= 0;
virtual void setAttributes();
@@ -90,16 +90,16 @@ public:
double getCurrentTime() const;
double getSimpleDuration() const;
- QString getRepeatCount() const { return m_repeatCount; }
- QString getRepeatDuration() const { return m_repeatDur; }
+ TQString getRepeatCount() const { return m_repeatCount; }
+ TQString getRepeatDuration() const { return m_repeatDur; }
- QString getAttributeName() const { return m_attributeName; }
- QString getFrom() const { return m_from; }
- QString getTo() const { return m_to; }
- QString getBy() const { return m_by; }
+ TQString getAttributeName() const { return m_attributeName; }
+ TQString getFrom() const { return m_from; }
+ TQString getTo() const { return m_to; }
+ TQString getBy() const { return m_by; }
protected:
- double parseClockValue(const QString &data) const;
+ double parseClockValue(const TQString &data) const;
bool m_connected;
EFillMode m_fill : 1;
@@ -110,13 +110,13 @@ protected:
EAttributeType m_attributeType : 2;
SVGElementImpl *m_targetElement;
- QString m_href;
- QString m_attributeName;
- QString m_from, m_to, m_by;
+ TQString m_href;
+ TQString m_attributeName;
+ TQString m_from, m_to, m_by;
double m_begin, m_end, m_duration;
- QString m_repeatCount, m_repeatDur;
+ TQString m_repeatCount, m_repeatDur;
SVGStringListImpl *m_values, *m_keyTimes, *m_keySplines;
diff --git a/ksvg/impl/SVGColorImpl.cc b/ksvg/impl/SVGColorImpl.cc
index a01e1113..799c43ec 100644
--- a/ksvg/impl/SVGColorImpl.cc
+++ b/ksvg/impl/SVGColorImpl.cc
@@ -20,7 +20,7 @@
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "SVGColor.h"
@@ -83,7 +83,7 @@ SVGICCColorImpl *SVGColorImpl::iccColor() const
return m_iccColor;
}
-void SVGColorImpl::setRGBColor(QColor color)
+void SVGColorImpl::setRGBColor(TQColor color)
{
m_colorType = SVG_COLORTYPE_RGBCOLOR;
m_rgbColor = DOM::RGBColor(color.rgb());
@@ -92,7 +92,7 @@ void SVGColorImpl::setRGBColor(QColor color)
void SVGColorImpl::setRGBColor(int r, int g, int b)
{
m_colorType = SVG_COLORTYPE_RGBCOLOR;
- m_rgbColor = DOM::RGBColor(QColor(r, g, b).rgb());
+ m_rgbColor = DOM::RGBColor(TQColor(r, g, b).rgb());
}
void SVGColorImpl::setRGBColor(const DOM::DOMString &rgbColor)
@@ -395,15 +395,15 @@ void SVGColorImpl::setRGBColor(const DOM::DOMString &rgbColor)
void SVGColorImpl::setRGBColorICCColor(const DOM::DOMString &rgbColor, const DOM::DOMString &iccColor)
{
- QColor color;
+ TQColor color;
- QString content = iccColor.string().right(iccColor.string().length() - 10);
- QString iccTarget = content.mid(0, content.find(','));
+ TQString content = iccColor.string().right(iccColor.string().length() - 10);
+ TQString iccTarget = content.mid(0, content.find(','));
- QStringList colors = QStringList::split(',', content);
- QString r = colors[1];
- QString g = colors[2];
- QString b = colors[3].left(colors[3].length() - 1);
+ TQStringList colors = TQStringList::split(',', content);
+ TQString r = colors[1];
+ TQString g = colors[2];
+ TQString b = colors[3].left(colors[3].length() - 1);
iccTarget = SVGURIReferenceImpl::getTarget(iccTarget);
diff --git a/ksvg/impl/SVGColorImpl.h b/ksvg/impl/SVGColorImpl.h
index d49c6f82..abefd069 100644
--- a/ksvg/impl/SVGColorImpl.h
+++ b/ksvg/impl/SVGColorImpl.h
@@ -47,7 +47,7 @@ public:
virtual void setRGBColor(const DOM::DOMString &rgbColor);
virtual void setRGBColor(int r, int g, int b);
- virtual void setRGBColor(QColor color);
+ virtual void setRGBColor(TQColor color);
virtual void setRGBColorICCColor(const DOM::DOMString &rgbColor, const DOM::DOMString &iccColor);
virtual void setColor(unsigned short colorType, const DOM::DOMString &rgbColor, const DOM::DOMString &iccColor);
diff --git a/ksvg/impl/SVGColorProfileElementImpl.cc b/ksvg/impl/SVGColorProfileElementImpl.cc
index f898188b..385a836b 100644
--- a/ksvg/impl/SVGColorProfileElementImpl.cc
+++ b/ksvg/impl/SVGColorProfileElementImpl.cc
@@ -22,7 +22,7 @@
#include <kdebug.h>
#include <kio/netaccess.h>
-#include <qimage.h>
+#include <tqimage.h>
#include "SVGDocumentImpl.h"
#include "SVGSVGElementImpl.h"
@@ -97,7 +97,7 @@ void SVGColorProfileElementImpl::putValueProperty(ExecState *exec, int token, co
break;
case RenderingIntent:
{
- QString compare = value.toString(exec).qstring().lower();
+ TQString compare = value.toString(exec).qstring().lower();
if(compare == "perceptual")
m_renderingIntent = RENDERING_INTENT_PERCEPTUAL;
@@ -148,12 +148,12 @@ unsigned short SVGColorProfileElementImpl::renderingIntent() const
bool SVGColorProfileElementImpl::canLoad()
{
- QString open;
+ TQString open;
bool temp;
return canLoad(false, temp, open, true);
}
-bool SVGColorProfileElementImpl::canLoad(bool remote, bool &tempFile, QString &open, bool verbose)
+bool SVGColorProfileElementImpl::canLoad(bool remote, bool &tempFile, TQString &open, bool verbose)
{
KURL file;
@@ -174,7 +174,7 @@ bool SVGColorProfileElementImpl::canLoad(bool remote, bool &tempFile, QString &o
{
open = file.path();
- if(!QFile::exists(open))
+ if(!TQFile::exists(open))
{
if(verbose)
kdDebug() << "Couldn't load color profile " << file.path() << "! It does not exist." << endl;
@@ -196,7 +196,7 @@ bool SVGColorProfileElementImpl::canLoad(bool remote, bool &tempFile, QString &o
bool SVGColorProfileElementImpl::loadColorProfile()
{
- QString open;
+ TQString open;
bool tempFile = false;
if(!canLoad(true, tempFile, open, false))
@@ -251,7 +251,7 @@ QRgb SVGColorProfileElementImpl::correctPixel(float r, float g, float b)
return qRgb(0, 0, 0);
}
-QImage *SVGColorProfileElementImpl::correctImage(QImage *input)
+TQImage *SVGColorProfileElementImpl::correctImage(TQImage *input)
{
if(!canLoad())
return input;
diff --git a/ksvg/impl/SVGColorProfileElementImpl.h b/ksvg/impl/SVGColorProfileElementImpl.h
index 2f735f03..ad498c4b 100644
--- a/ksvg/impl/SVGColorProfileElementImpl.h
+++ b/ksvg/impl/SVGColorProfileElementImpl.h
@@ -33,7 +33,7 @@
#include "ksvg_lookup.h"
-class QImage;
+class TQImage;
namespace KSVG
{
@@ -54,7 +54,7 @@ public:
void setRenderingIntent(unsigned short renderingIntent);
unsigned short renderingIntent() const;
- QImage *correctImage(QImage *input);
+ TQImage *correctImage(TQImage *input);
QRgb correctPixel(float r, float g, float b);
private:
@@ -62,7 +62,7 @@ private:
void closeColorProfile();
bool canLoad();
- bool canLoad(bool remote, bool &tempFile, QString &open, bool verbose);
+ bool canLoad(bool remote, bool &tempFile, TQString &open, bool verbose);
DOM::DOMString m_local;
DOM::DOMString m_name;
diff --git a/ksvg/impl/SVGContainerImpl.cc b/ksvg/impl/SVGContainerImpl.cc
index 88fb87a8..e4a7c0db 100644
--- a/ksvg/impl/SVGContainerImpl.cc
+++ b/ksvg/impl/SVGContainerImpl.cc
@@ -37,7 +37,7 @@ SVGContainerImpl::~SVGContainerImpl()
SVGRectImpl *SVGContainerImpl::getBBox()
{
// just get the union of the children bboxes
- QRect rect;
+ TQRect rect;
DOM::Node node = firstChild();
for(; !node.isNull(); node = node.nextSibling())
{
diff --git a/ksvg/impl/SVGDocumentImpl.cc b/ksvg/impl/SVGDocumentImpl.cc
index 4bbe2664..c2b412f3 100644
--- a/ksvg/impl/SVGDocumentImpl.cc
+++ b/ksvg/impl/SVGDocumentImpl.cc
@@ -42,7 +42,7 @@
#include "KSVGCanvas.h"
#include "CanvasItem.h"
-#include <qpaintdevicemetrics.h>
+#include <tqpaintdevicemetrics.h>
using namespace KSVG;
@@ -53,7 +53,7 @@ using namespace KSVG;
// A sequence of prime numbers that sets the m_elemDict's hash table size as the
// number of elements in the dictionary passes each level. This keeps the lookup
-// performance high as the number of elements grows. See the QDict documentation.
+// performance high as the number of elements grows. See the TQDict documentation.
unsigned int SVGDocumentImpl::elemDictHashSizes [] =
{
101,
@@ -74,7 +74,7 @@ unsigned int SVGDocumentImpl::elemDictHashSizes [] =
const int SVGDocumentImpl::numElemDictHashSizes = sizeof(elemDictHashSizes) / sizeof(elemDictHashSizes[0]);
-SVGDocumentImpl::SVGDocumentImpl(bool anim, bool fit, SVGImageElementImpl *parentImage) : QObject(), DOM::DomShared(), DOM::Document(), SVGDOMNodeBridge(static_cast<DOM::Node>(*this))
+SVGDocumentImpl::SVGDocumentImpl(bool anim, bool fit, SVGImageElementImpl *parentImage) : TQObject(), DOM::DomShared(), DOM::Document(), SVGDOMNodeBridge(static_cast<DOM::Node>(*this))
{
m_animations = anim;
@@ -107,7 +107,7 @@ SVGDocumentImpl::~SVGDocumentImpl()
if(rootElement() && rootElement()->hasEventListener(SVGEvent::UNLOAD_EVENT, true))
rootElement()->dispatchEvent(SVGEvent::UNLOAD_EVENT, false, false);
- QPtrList<SVGShapeImpl> killList;
+ TQPtrList<SVGShapeImpl> killList;
DOM::Node node = firstChild();
for(; !node.isNull(); node = node.nextSibling())
@@ -148,7 +148,7 @@ float SVGDocumentImpl::screenPixelsPerMillimeterX() const
{
if(canvas() && canvas()->drawWindow())
{
- QPaintDeviceMetrics metrics(canvas()->drawWindow());
+ TQPaintDeviceMetrics metrics(canvas()->drawWindow());
return float(metrics.width()) / float(metrics.widthMM());
}
else
@@ -159,7 +159,7 @@ float SVGDocumentImpl::screenPixelsPerMillimeterY() const
{
if(canvas() && canvas()->drawWindow())
{
- QPaintDeviceMetrics metrics(canvas()->drawWindow());
+ TQPaintDeviceMetrics metrics(canvas()->drawWindow());
return float(metrics.height()) / float(metrics.heightMM());
}
else
@@ -231,7 +231,7 @@ bool SVGDocumentImpl::open(const ::KURL &url)
if(!m_loader)
m_loader = new KSVGLoader();
- connect(m_loader, SIGNAL(gotResult(QIODevice *)), this, SLOT(slotSVGContent(QIODevice *)));
+ connect(m_loader, TQT_SIGNAL(gotResult(TQIODevice *)), this, TQT_SLOT(slotSVGContent(TQIODevice *)));
m_loader->getSVGContent(url);
}
else
@@ -240,9 +240,9 @@ bool SVGDocumentImpl::open(const ::KURL &url)
return true;
}
-void SVGDocumentImpl::slotSVGContent(QIODevice *dev)
+void SVGDocumentImpl::slotSVGContent(TQIODevice *dev)
{
- QXmlInputSource *inputSource = new QXmlInputSource(dev);
+ TQXmlInputSource *inputSource = new TQXmlInputSource(dev);
if(m_reader)
delete m_reader;
@@ -251,13 +251,13 @@ void SVGDocumentImpl::slotSVGContent(QIODevice *dev)
args.fit = m_fit;
args.getURLMode = false;
- QString url = m_baseURL.prettyURL();
+ TQString url = m_baseURL.prettyURL();
int pos = url.find('#'); // url can become like this.svg#svgView(viewBox(63,226,74,74)), get part after '#'
if(pos > -1)
args.SVGFragmentId = url.mid(pos + 1);
m_reader = new KSVGReader(this, m_canvas, args);
- connect(m_reader, SIGNAL(finished(bool, const QString &)), this, SLOT(slotFinishedParsing(bool, const QString &)));
+ connect(m_reader, TQT_SIGNAL(finished(bool, const TQString &)), this, TQT_SLOT(slotFinishedParsing(bool, const TQString &)));
m_t.start();
#if USE_VALGRIND
@@ -268,7 +268,7 @@ void SVGDocumentImpl::slotSVGContent(QIODevice *dev)
delete dev;
}
-void SVGDocumentImpl::parseSVG(QXmlInputSource *inputSource, bool getURLMode)
+void SVGDocumentImpl::parseSVG(TQXmlInputSource *inputSource, bool getURLMode)
{
if(m_reader)
delete m_reader;
@@ -277,7 +277,7 @@ void SVGDocumentImpl::parseSVG(QXmlInputSource *inputSource, bool getURLMode)
args.fit = m_fit;
args.getURLMode = getURLMode;
m_reader = new KSVGReader(this, 0, args);
- connect(m_reader, SIGNAL(finished(bool, const QString &)), this, SLOT(slotFinishedParsing(bool, const QString &)));
+ connect(m_reader, TQT_SIGNAL(finished(bool, const TQString &)), this, TQT_SLOT(slotFinishedParsing(bool, const TQString &)));
#if USE_VALGRIND
CALLTREE_ZERO_STATS();
@@ -286,13 +286,13 @@ void SVGDocumentImpl::parseSVG(QXmlInputSource *inputSource, bool getURLMode)
m_reader->parse(inputSource);
}
-void SVGDocumentImpl::finishParsing(bool error, const QString &errorDesc)
+void SVGDocumentImpl::finishParsing(bool error, const TQString &errorDesc)
{
if(m_reader)
m_reader->finishParsing(error, errorDesc);
}
-void SVGDocumentImpl::slotFinishedParsing(bool error, const QString &errorDesc)
+void SVGDocumentImpl::slotFinishedParsing(bool error, const TQString &errorDesc)
{
kdDebug(26000) << k_funcinfo << "total time : " << m_t.elapsed() << endl;
@@ -454,7 +454,7 @@ void SVGDocumentImpl::executeScripts()
bool test = executeScriptsRecursiveCheck(*rootElement());
if(!test)
- QTimer::singleShot(50, this, SLOT(executeScripts()));
+ TQTimer::singleShot(50, this, TQT_SLOT(executeScripts()));
else
{
executeScriptsRecursive(*rootElement());
@@ -690,7 +690,7 @@ SVGElementImpl *SVGDocumentImpl::getElementByIdRecursive(SVGSVGElementImpl *star
// #3 Search in other documents
if(!dontSearch)
{
- QPtrDictIterator<SVGDocumentImpl> it(m_documentDict);
+ TQPtrDictIterator<SVGDocumentImpl> it(m_documentDict);
for(; it.current(); ++it)
{
SVGElementImpl *temp = it.current()->getElementByIdRecursive(0, elementId, true);
diff --git a/ksvg/impl/SVGDocumentImpl.h b/ksvg/impl/SVGDocumentImpl.h
index c4156910..10eae77e 100644
--- a/ksvg/impl/SVGDocumentImpl.h
+++ b/ksvg/impl/SVGDocumentImpl.h
@@ -23,12 +23,12 @@
#include <kurl.h>
-#include <qxml.h>
-#include <qobject.h>
-#include <qptrdict.h>
-#include <qptrlist.h>
-#include <qdatetime.h>
-#include <qstringlist.h>
+#include <tqxml.h>
+#include <tqobject.h>
+#include <tqptrdict.h>
+#include <tqptrlist.h>
+#include <tqdatetime.h>
+#include <tqstringlist.h>
#include <kjs/object.h>
@@ -66,7 +66,7 @@ class SVGScriptElementImpl;
class SVGDescElementImpl;
class SVGTitleElementImpl;
class SVGUseElementImpl;
-class SVGDocumentImpl : public QObject,
+class SVGDocumentImpl : public TQObject,
public DOM::DomShared,
public DOM::Document,
public SVGDOMNodeBridge
@@ -109,7 +109,7 @@ public:
// Ecma stuff
KSVGEcma *ecmaEngine() { return m_ecmaEngine; }
- void parseSVG(QXmlInputSource *inputSource, bool getURLMode = false);
+ void parseSVG(TQXmlInputSource *inputSource, bool getURLMode = false);
virtual bool implementsCall() const { return true; }
@@ -139,7 +139,7 @@ public:
SVGElementImpl *recursiveSearch(DOM::Node start, const DOM::DOMString &id);
- void finishParsing(bool error, const QString &errorDesc);
+ void finishParsing(bool error, const TQString &errorDesc);
void newImageJob(SVGImageElementImpl *);
@@ -148,7 +148,7 @@ public:
void resortZIndicesOnFinishedLoading() { m_resortZIndicesOnFinishedLoading = true; }
void addForwardReferencingUseElement(SVGUseElementImpl *use);
- QValueList<SVGUseElementImpl *> forwardReferencingUseElements() const { return m_forwardReferencingUseElements; }
+ TQValueList<SVGUseElementImpl *> forwardReferencingUseElements() const { return m_forwardReferencingUseElements; }
// Traverse the element hierarchy and update any cached matrices that are
// no longer valid.
@@ -159,18 +159,18 @@ public slots:
void executeScripts();
private slots:
- void slotSVGContent(QIODevice *);
- void slotFinishedParsing(bool error, const QString &errorDesc);
+ void slotSVGContent(TQIODevice *);
+ void slotFinishedParsing(bool error, const TQString &errorDesc);
// KDE invents public signals :)
#undef signals
#define signals public
signals:
- void gotDescription(const QString &);
- void gotTitle(const QString &);
- void gotURL(const QString &);
+ void gotDescription(const TQString &);
+ void gotTitle(const TQString &);
+ void gotURL(const TQString &);
- void finishedParsing(bool error, const QString &errorDesc);
+ void finishedParsing(bool error, const TQString &errorDesc);
void finishedRendering();
void finishedLoading();
@@ -195,8 +195,8 @@ private:
KSVGEcma *m_ecmaEngine;
- QPtrDict<SVGElementImpl> m_elemDict;
- QPtrDict<SVGDocumentImpl> m_documentDict;
+ TQPtrDict<SVGElementImpl> m_elemDict;
+ TQPtrDict<SVGDocumentImpl> m_documentDict;
static uint elemDictHashSizes[];
static const int numElemDictHashSizes;
@@ -211,12 +211,12 @@ private:
bool m_fit;
- QTime m_t;
+ TQTime m_t;
- QValueList<SVGImageElementImpl *> m_imagesLoading;
+ TQValueList<SVGImageElementImpl *> m_imagesLoading;
bool m_resortZIndicesOnFinishedLoading;
- QValueList<SVGUseElementImpl *> m_forwardReferencingUseElements;
+ TQValueList<SVGUseElementImpl *> m_forwardReferencingUseElements;
public:
KSVG_BASECLASS_GET
diff --git a/ksvg/impl/SVGEcma.cc b/ksvg/impl/SVGEcma.cc
index 08870d0c..39843a07 100644
--- a/ksvg/impl/SVGEcma.cc
+++ b/ksvg/impl/SVGEcma.cc
@@ -405,7 +405,7 @@ Value SVGDOMNodeBridgeProtoFunc::call(ExecState *exec, Object &thisObj, const Li
{
SVGEvent::EventId eventId = SVGEvent::typeToId(args[0].toString(exec).string());
if(eventId != SVGEvent::UNKNOWN_EVENT)
- element->setEventListener(eventId, new KSVGEcmaEventListener(Object::dynamicCast(args[1]), QString::null, doc->ecmaEngine()));
+ element->setEventListener(eventId, new KSVGEcmaEventListener(Object::dynamicCast(args[1]), TQString::null, doc->ecmaEngine()));
}
return Undefined();
}
diff --git a/ksvg/impl/SVGElementImpl.cc b/ksvg/impl/SVGElementImpl.cc
index 2f3d70c6..940790f2 100644
--- a/ksvg/impl/SVGElementImpl.cc
+++ b/ksvg/impl/SVGElementImpl.cc
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qxml.h>
+#include <tqxml.h>
#include <kdebug.h>
@@ -78,7 +78,7 @@ int SVGElementImpl::getEventListeners(bool local)
{
int events = 0;
- QPtrListIterator<SVGRegisteredEventListener> it(m_eventListeners);
+ TQPtrListIterator<SVGRegisteredEventListener> it(m_eventListeners);
for(; it.current(); ++it)
events |= (1 << it.current()->id);
@@ -91,7 +91,7 @@ int SVGElementImpl::getEventListeners(bool local)
if(element)
{
- QPtrListIterator<SVGRegisteredEventListener> it(element->m_eventListeners);
+ TQPtrListIterator<SVGRegisteredEventListener> it(element->m_eventListeners);
for(; it.current(); ++it)
events |= (1 << it.current()->id);
}
@@ -109,12 +109,12 @@ void SVGElementImpl::setupEventListeners(SVGDocumentImpl *doc, SVGDocumentImpl *
// Needed for parseXML'ed elements with events, their listeners
// are created in the temporary document fragment and need to be
// registered in the main document (Niko)
- QPtrListIterator<SVGRegisteredEventListener> it(m_eventListeners);
+ TQPtrListIterator<SVGRegisteredEventListener> it(m_eventListeners);
for(; it.current(); ++it)
{
SVGRegisteredEventListener *current = it.current();
- QString valueOfCurrent = newDoc->ecmaEngine()->valueOfEventListener(current->listener);
+ TQString valueOfCurrent = newDoc->ecmaEngine()->valueOfEventListener(current->listener);
setEventListener(current->id, doc->createEventListener(valueOfCurrent));
}
}
@@ -122,7 +122,7 @@ void SVGElementImpl::setupEventListeners(SVGDocumentImpl *doc, SVGDocumentImpl *
bool SVGElementImpl::hasEventListener(int id, bool local)
{
// First check if we have the listener, locally
- QPtrListIterator<SVGRegisteredEventListener> it(m_eventListeners);
+ TQPtrListIterator<SVGRegisteredEventListener> it(m_eventListeners);
for(; it.current(); ++it)
{
if(it.current()->id == id)
@@ -141,7 +141,7 @@ bool SVGElementImpl::hasEventListener(int id, bool local)
if(element)
{
- QPtrListIterator<SVGRegisteredEventListener> it(element->m_eventListeners);
+ TQPtrListIterator<SVGRegisteredEventListener> it(element->m_eventListeners);
for(; it.current(); ++it)
{
if(it.current()->id == id)
@@ -155,7 +155,7 @@ bool SVGElementImpl::hasEventListener(int id, bool local)
void SVGElementImpl::removeEventListener(int id)
{
- QPtrListIterator<SVGRegisteredEventListener> it(m_eventListeners);
+ TQPtrListIterator<SVGRegisteredEventListener> it(m_eventListeners);
for(; it.current(); ++it)
{
if(it.current()->id == id)
@@ -168,7 +168,7 @@ void SVGElementImpl::removeEventListener(int id)
void SVGElementImpl::handleLocalEvents(SVGEventImpl *evt, bool useCapture)
{
- QPtrListIterator<SVGRegisteredEventListener> it(m_eventListeners);
+ TQPtrListIterator<SVGRegisteredEventListener> it(m_eventListeners);
for(; it.current(); ++it)
{
if(it.current()->id == evt->id() && it.current()->useCapture == useCapture)
@@ -320,7 +320,7 @@ Value SVGElementImplProtoFunc::call(ExecState *exec, Object &thisObj, const List
return Undefined();
}
-QDict<DOM::DOMString> &SVGElementImpl::attributes()
+TQDict<DOM::DOMString> &SVGElementImpl::attributes()
{
return m_attributes;
}
@@ -376,11 +376,11 @@ bool SVGElementImpl::hasAttributes()
return m_attributes.count() > 0;
}
-void SVGElementImpl::setApplyAttribute(const QString &name, const QString &value)
+void SVGElementImpl::setApplyAttribute(const TQString &name, const TQString &value)
{
if(hasAttribute(name))
{
- QString cur = getAttribute(name).string();
+ TQString cur = getAttribute(name).string();
cur = cur.simplifyWhiteSpace();
if(!cur.endsWith(";"))
@@ -451,7 +451,7 @@ SVGElementImpl *SVGElementImpl::viewportElement() const
return m_viewportElement;
}
-void SVGElementImpl::setAttributes(const QXmlAttributes &attrs)
+void SVGElementImpl::setAttributes(const TQXmlAttributes &attrs)
{
for(int i = 0; i < attrs.length(); i++)
{
@@ -494,7 +494,7 @@ void SVGElementImpl::setAttributes(bool deep)
}
}
-bool SVGElementImpl::prepareMouseEvent(const QPoint &p, const QPoint &a, SVGMouseEventImpl *mev)
+bool SVGElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &a, SVGMouseEventImpl *mev)
{
SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(this);
if(shape)
@@ -519,7 +519,7 @@ bool SVGElementImpl::dispatchEvent(SVGEventImpl *evt, bool tempEvent)
evt->setTarget(this);
// Find out, where to send to -> collect parent nodes
- QPtrList<SVGElementImpl> nodeChain;
+ TQPtrList<SVGElementImpl> nodeChain;
for(DOM::Element e = *this; !e.isNull(); e = e.parentNode())
nodeChain.prepend(ownerDoc()->getElementFromHandle(e.handle()));
@@ -527,7 +527,7 @@ bool SVGElementImpl::dispatchEvent(SVGEventImpl *evt, bool tempEvent)
// Trigger any capturing event handlers on our way down
evt->setEventPhase(DOM::Event::CAPTURING_PHASE);
- QPtrListIterator<SVGElementImpl> it(nodeChain);
+ TQPtrListIterator<SVGElementImpl> it(nodeChain);
for(; it.current() && it.current() != this && !evt->propagationStopped(); ++it)
{
evt->setCurrentTarget(it.current());
@@ -583,17 +583,17 @@ bool SVGElementImpl::dispatchEvent(SVGEventImpl *evt, bool tempEvent)
return !evt->defaultPrevented(); // ### what if defaultPrevented was called before dispatchEvent?
}
-bool SVGElementImpl::dispatchKeyEvent(QKeyEvent *ke)
+bool SVGElementImpl::dispatchKeyEvent(TQKeyEvent *ke)
{
DOM::AbstractView temp;
SVGEvent::EventId evtId = SVGEvent::UNKNOWN_EVENT;
- if(ke->type() == QEvent::KeyRelease && !ke->isAutoRepeat())
+ if(ke->type() == TQEvent::KeyRelease && !ke->isAutoRepeat())
evtId = SVGEvent::KEYUP_EVENT;
else if(ke->isAutoRepeat())
evtId = SVGEvent::KEYPRESS_EVENT;
- else if(ke->type() == QEvent::KeyPress)
+ else if(ke->type() == TQEvent::KeyPress)
evtId = SVGEvent::KEYDOWN_EVENT;
if(evtId == SVGEvent::KEYUP_EVENT && hasEventListener(SVGEvent::DOMACTIVATE_EVENT, false))
@@ -679,7 +679,7 @@ void SVGElementImpl::cloneChildNodes(SVGElementImpl *clone)
}
}
-void SVGElementImpl::gotError(const QString &errorDesc)
+void SVGElementImpl::gotError(const TQString &errorDesc)
{
if(ownerDoc())
{
@@ -689,9 +689,9 @@ void SVGElementImpl::gotError(const QString &errorDesc)
}
}
-QString SVGElementImpl::collectText()
+TQString SVGElementImpl::collectText()
{
- QString text;
+ TQString text;
if(hasChildNodes())
{
diff --git a/ksvg/impl/SVGElementImpl.h b/ksvg/impl/SVGElementImpl.h
index c69a83e8..a12098ab 100644
--- a/ksvg/impl/SVGElementImpl.h
+++ b/ksvg/impl/SVGElementImpl.h
@@ -24,8 +24,8 @@
#include <map>
#include <string>
-#include <qdict.h>
-#include <qptrlist.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
#include <dom/dom_string.h>
@@ -33,8 +33,8 @@
#include "ksvg_lookup.h"
-class QKeyEvent;
-class QXmlAttributes;
+class TQKeyEvent;
+class TQXmlAttributes;
namespace KJS
{
@@ -70,8 +70,8 @@ public:
bool hasAttribute(const DOM::DOMString &name);
bool hasAttributes();
- QDict<DOM::DOMString> &attributes();
- void setApplyAttribute(const QString &name, const QString &value);
+ TQDict<DOM::DOMString> &attributes();
+ void setApplyAttribute(const TQString &name, const TQString &value);
void setId(DOM::DOMString);
DOM::DOMString id() const;
@@ -85,11 +85,11 @@ public:
SVGSVGElementImpl *ownerSVGElement() const;
SVGElementImpl *viewportElement() const;
- void setAttributes(const QXmlAttributes &);
+ void setAttributes(const TQXmlAttributes &);
virtual void setAttributes();
void setAttributes(bool deep);
- QString collectText();
+ TQString collectText();
void setOwnerDoc(SVGDocumentImpl *doc);
SVGDocumentImpl *ownerDoc() const;
@@ -101,7 +101,7 @@ public:
bool dispatchEvent(int id, bool canBubbleArg, bool cancelableArg);
bool dispatchEvent(SVGEventImpl *evt, bool tempEvent);
bool dispatchMouseEvent(int id, bool canBubbleArg, bool cancelableArg, long detailArg, long screenXArg, long screenYArg, long clientXArg, long clientYArg, bool ctrlKeyArg, bool altKeyArg, bool shiftKeyArg, bool metaKeyArg, unsigned short buttonArg, SVGElementImpl *relatedTargetArg);
- bool dispatchKeyEvent(QKeyEvent *ke);
+ bool dispatchKeyEvent(TQKeyEvent *ke);
void setEventListener(int id, SVGEventListener *listener);
bool hasEventListener(int id, bool local);
@@ -110,7 +110,7 @@ public:
void setupEventListeners(SVGDocumentImpl *doc, SVGDocumentImpl *newDoc);
// Use with care! Internal only.
- const QPtrList<SVGRegisteredEventListener> &eventListeners() { return m_eventListeners; }
+ const TQPtrList<SVGRegisteredEventListener> &eventListeners() { return m_eventListeners; }
void handleLocalEvents(SVGEventImpl *evt, bool useCapture);
virtual void defaultEventHandler(SVGEventImpl *evt);
@@ -121,7 +121,7 @@ public:
bool focus() { return m_focus; }
void setFocus(bool v) { m_focus = v; }
- virtual bool prepareMouseEvent(const QPoint &, const QPoint &, SVGMouseEventImpl *);
+ virtual bool prepareMouseEvent(const TQPoint &, const TQPoint &, SVGMouseEventImpl *);
virtual void createItem(KSVGCanvas *c = 0) { Q_UNUSED(c); }
virtual void removeItem(KSVGCanvas *c) { Q_UNUSED(c); }
@@ -183,7 +183,7 @@ public:
static SVGElementImpl::Registrar<Class> Class##Registrar(Tag);
protected:
- void gotError(const QString &errorDesc);
+ void gotError(const TQString &errorDesc);
private:
SVGSVGElementImpl *m_ownerSVGElement;
@@ -193,8 +193,8 @@ private:
bool m_mouseOver : 1;
bool m_focus : 1;
- QPtrList<SVGRegisteredEventListener> m_eventListeners;
- QDict<DOM::DOMString> m_attributes;
+ TQPtrList<SVGRegisteredEventListener> m_eventListeners;
+ TQDict<DOM::DOMString> m_attributes;
public:
KSVG_BASECLASS_GET
diff --git a/ksvg/impl/SVGEventImpl.cc b/ksvg/impl/SVGEventImpl.cc
index 418e0044..17338f45 100644
--- a/ksvg/impl/SVGEventImpl.cc
+++ b/ksvg/impl/SVGEventImpl.cc
@@ -43,7 +43,7 @@ SVGEventImpl::SVGEventImpl()
m_defaultPrevented = false;
m_id = SVGEvent::UNKNOWN_EVENT;
m_eventPhase = 0;
- m_createTime = QDateTime::currentDateTime();
+ m_createTime = TQDateTime::currentDateTime();
m_defaultHandled = false;
m_target = 0;
@@ -62,7 +62,7 @@ SVGEventImpl::SVGEventImpl(SVGEvent::EventId _id, bool canBubbleArg, bool cancel
m_defaultPrevented = false;
m_id = _id;
m_eventPhase = 0;
- m_createTime = QDateTime::currentDateTime();
+ m_createTime = TQDateTime::currentDateTime();
m_defaultHandled = false;
m_target = 0;
@@ -120,7 +120,7 @@ bool SVGEventImpl::cancelable() const
DOM::DOMTimeStamp SVGEventImpl::timeStamp()
{
- QDateTime epoch(QDate(1970, 1, 1), QTime(0, 0));
+ TQDateTime epoch(TQDate(1970, 1, 1), TQTime(0, 0));
// ### kjs does not yet support long long (?) so the value wraps around
return epoch.secsTo(m_createTime) * 1000 + m_createTime.time().msec();
@@ -341,9 +341,9 @@ SVGKeyEventImpl::SVGKeyEventImpl() : SVGUIEventImpl()
qKeyEvent = 0;
}
-SVGKeyEventImpl::SVGKeyEventImpl(QKeyEvent *key, DOM::AbstractView &view, SVGEvent::EventId _id) : SVGUIEventImpl(_id, true, true, view, 0)
+SVGKeyEventImpl::SVGKeyEventImpl(TQKeyEvent *key, DOM::AbstractView &view, SVGEvent::EventId _id) : SVGUIEventImpl(_id, true, true, view, 0)
{
- qKeyEvent = new QKeyEvent(key->type(), key->key(), key->ascii(), key->state(), key->text(), key->isAutoRepeat(), key->count());
+ qKeyEvent = new TQKeyEvent(key->type(), key->key(), key->ascii(), key->state(), key->text(), key->isAutoRepeat(), key->count());
// Events are supposed to be accepted by default in Qt!
// This line made QLineEdit's keyevents be ignored, so they were sent to the khtmlview
diff --git a/ksvg/impl/SVGEventImpl.h b/ksvg/impl/SVGEventImpl.h
index a123b09e..2c70c0d2 100644
--- a/ksvg/impl/SVGEventImpl.h
+++ b/ksvg/impl/SVGEventImpl.h
@@ -25,8 +25,8 @@
#ifndef SVGEventImpl_H
#define SVGEventImpl_H
-#include <qevent.h>
-#include <qdatetime.h>
+#include <tqevent.h>
+#include <tqdatetime.h>
#include <dom/dom_misc.h>
#include <dom/dom_node.h>
@@ -98,7 +98,7 @@ protected:
SVGElementImpl *m_target;
unsigned short m_eventPhase;
- QDateTime m_createTime;
+ TQDateTime m_createTime;
public:
KSVG_BASECLASS_GET
@@ -278,7 +278,7 @@ public:
bool inputGeneratedArg,
bool numPadArg);
- SVGKeyEventImpl(QKeyEvent *key, DOM::AbstractView &view, SVGEvent::EventId _id);
+ SVGKeyEventImpl(TQKeyEvent *key, DOM::AbstractView &view, SVGEvent::EventId _id);
virtual bool isKeyEvent() { return true; }
@@ -363,7 +363,7 @@ public:
unsigned long virtKeyVal() const { return m_virtKeyVal; }
- QKeyEvent *qKeyEvent;
+ TQKeyEvent *qKeyEvent;
private:
unsigned long m_keyVal;
diff --git a/ksvg/impl/SVGFitToViewBoxImpl.cc b/ksvg/impl/SVGFitToViewBoxImpl.cc
index fee367b9..aaee3045 100644
--- a/ksvg/impl/SVGFitToViewBoxImpl.cc
+++ b/ksvg/impl/SVGFitToViewBoxImpl.cc
@@ -20,8 +20,8 @@
#include <kdebug.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "SVGPreserveAspectRatio.h"
@@ -65,7 +65,7 @@ SVGAnimatedPreserveAspectRatioImpl *SVGFitToViewBoxImpl::preserveAspectRatio() c
return m_preserveAspectRatio;
}
-void SVGFitToViewBoxImpl::parseViewBox(const QString &s)
+void SVGFitToViewBoxImpl::parseViewBox(const TQString &s)
{
// Set default if preserveAspectRatio wasnt parsed earlier (Rob)
if(m_preserveAspectRatio->baseVal()->align() == SVG_PRESERVEASPECTRATIO_UNKNOWN)
@@ -74,8 +74,8 @@ void SVGFitToViewBoxImpl::parseViewBox(const QString &s)
m_preserveAspectRatio->baseVal()->setMeetOrSlice(SVG_MEETORSLICE_MEET);
// allow for viewbox def with ',' or whitespace
- QString viewbox(s);
- QStringList points = QStringList::split(' ', viewbox.replace(',', ' ').simplifyWhiteSpace());
+ TQString viewbox(s);
+ TQStringList points = TQStringList::split(' ', viewbox.replace(',', ' ').simplifyWhiteSpace());
viewBox()->baseVal()->setX(points[0].toFloat());
viewBox()->baseVal()->setY(points[1].toFloat());
diff --git a/ksvg/impl/SVGFitToViewBoxImpl.h b/ksvg/impl/SVGFitToViewBoxImpl.h
index b511d63e..501a4061 100644
--- a/ksvg/impl/SVGFitToViewBoxImpl.h
+++ b/ksvg/impl/SVGFitToViewBoxImpl.h
@@ -23,7 +23,7 @@
#include "ksvg_lookup.h"
-class QString;
+class TQString;
namespace KSVG
{
@@ -40,7 +40,7 @@ public:
SVGAnimatedRectImpl *viewBox() const;
SVGAnimatedPreserveAspectRatioImpl *preserveAspectRatio() const;
- void parseViewBox(const QString &);
+ void parseViewBox(const TQString &);
SVGMatrixImpl *viewBoxToViewTransform(float viewWidth, float viewHeight) const;
diff --git a/ksvg/impl/SVGGlyphElementImpl.cc b/ksvg/impl/SVGGlyphElementImpl.cc
index dd201466..4fbc6bb7 100644
--- a/ksvg/impl/SVGGlyphElementImpl.cc
+++ b/ksvg/impl/SVGGlyphElementImpl.cc
@@ -35,7 +35,7 @@ SVGGlyphElementImpl::~SVGGlyphElementImpl()
{
}
-QString SVGGlyphElementImpl::d() const
+TQString SVGGlyphElementImpl::d() const
{
return m_d;
}
diff --git a/ksvg/impl/SVGGlyphElementImpl.h b/ksvg/impl/SVGGlyphElementImpl.h
index 35781b2c..576e554e 100644
--- a/ksvg/impl/SVGGlyphElementImpl.h
+++ b/ksvg/impl/SVGGlyphElementImpl.h
@@ -36,10 +36,10 @@ public:
SVGGlyphElementImpl(DOM::ElementImpl *);
virtual ~SVGGlyphElementImpl();
- QString d() const;
+ TQString d() const;
private:
- QString m_d;
+ TQString m_d;
public:
KSVG_GET
diff --git a/ksvg/impl/SVGGradientElementImpl.cc b/ksvg/impl/SVGGradientElementImpl.cc
index 180b230a..eae9059e 100644
--- a/ksvg/impl/SVGGradientElementImpl.cc
+++ b/ksvg/impl/SVGGradientElementImpl.cc
@@ -129,7 +129,7 @@ void SVGGradientElementImpl::putValueProperty(ExecState *exec, int token, const
break;
case SpreadMethod:
{
- QString spreadMethod = value.toString(exec).qstring();
+ TQString spreadMethod = value.toString(exec).qstring();
if(spreadMethod == "repeat")
m_spreadMethod->setBaseVal(SVG_SPREADMETHOD_REPEAT);
@@ -160,7 +160,7 @@ void SVGGradientElementImpl::setAttributes()
void SVGGradientElementImpl::setAttributesFromHref()
{
- QString _href = SVGURIReferenceImpl::getTarget(href()->baseVal().string());
+ TQString _href = SVGURIReferenceImpl::getTarget(href()->baseVal().string());
if(!_href.isEmpty())
{
@@ -168,12 +168,12 @@ void SVGGradientElementImpl::setAttributesFromHref()
if(refGradient)
{
- QMap<QString, DOM::DOMString> refAttributes = refGradient->gradientAttributes();
- QMap<QString, DOM::DOMString>::iterator it;
+ TQMap<TQString, DOM::DOMString> refAttributes = refGradient->gradientAttributes();
+ TQMap<TQString, DOM::DOMString>::iterator it;
for(it = refAttributes.begin(); it != refAttributes.end(); ++it)
{
- QString name = it.key();
+ TQString name = it.key();
DOM::DOMString value = it.data();
if(!hasAttribute(name))
@@ -210,7 +210,7 @@ SVGGradientElementImpl *SVGGradientElementImpl::stopsSource()
if(!haveStops)
{
- QString _href = SVGURIReferenceImpl::getTarget(href()->baseVal().string());
+ TQString _href = SVGURIReferenceImpl::getTarget(href()->baseVal().string());
if(!_href.isEmpty())
{
diff --git a/ksvg/impl/SVGGradientElementImpl.h b/ksvg/impl/SVGGradientElementImpl.h
index e9be92d8..60b9d3a9 100644
--- a/ksvg/impl/SVGGradientElementImpl.h
+++ b/ksvg/impl/SVGGradientElementImpl.h
@@ -21,7 +21,7 @@
#ifndef SVGGradientElementImpl_H
#define SVGGradientElementImpl_H
-#include <qmap.h>
+#include <tqmap.h>
#include "SVGElementImpl.h"
#include "SVGStylableImpl.h"
@@ -64,7 +64,7 @@ public:
// Returns the linear/radial gradient attributes set on this element,
// taking into account indirection through href.
- virtual QMap<QString, DOM::DOMString> gradientAttributes() = 0;
+ virtual TQMap<TQString, DOM::DOMString> gradientAttributes() = 0;
protected:
void setAttributesFromHref();
diff --git a/ksvg/impl/SVGHelperImpl.cc b/ksvg/impl/SVGHelperImpl.cc
index ed7e8be4..7378b8f4 100644
--- a/ksvg/impl/SVGHelperImpl.cc
+++ b/ksvg/impl/SVGHelperImpl.cc
@@ -20,7 +20,7 @@
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include "SVGRectImpl.h"
#include "SVGMatrixImpl.h"
@@ -77,7 +77,7 @@ void SVGHelperImpl::updateItem(KJS::ExecState *exec, const DOM::Node node)
void SVGHelperImpl::copyAttributes(SVGElementImpl *src, SVGElementImpl *dst)
{
- QDictIterator<DOM::DOMString> it(src->attributes());
+ TQDictIterator<DOM::DOMString> it(src->attributes());
for(; it.current(); ++it)
{
DOM::DOMString name = it.currentKey();
@@ -91,14 +91,14 @@ void SVGHelperImpl::copyAttributes(SVGElementImpl *src, SVGElementImpl *dst)
}
}
-void SVGHelperImpl::parseList(SVGStringListImpl *list, char seperator, const QString &data)
+void SVGHelperImpl::parseList(SVGStringListImpl *list, char seperator, const TQString &data)
{
// TODO : more error checking/reporting
list->clear();
- QStringList substrings = QStringList::split(seperator, data);
- QStringList::ConstIterator it = substrings.begin();
- QStringList::ConstIterator end = substrings.end();
+ TQStringList substrings = TQStringList::split(seperator, data);
+ TQStringList::ConstIterator it = substrings.begin();
+ TQStringList::ConstIterator end = substrings.end();
for(; it != end; ++it)
{
SharedString *string = new SharedString(*it);
@@ -108,13 +108,13 @@ void SVGHelperImpl::parseList(SVGStringListImpl *list, char seperator, const QSt
}
}
-void SVGHelperImpl::parseLengthList(SVGAnimatedLengthListImpl *list, const QString &lengths, LengthMode mode, SVGElementImpl *object)
+void SVGHelperImpl::parseLengthList(SVGAnimatedLengthListImpl *list, const TQString &lengths, LengthMode mode, SVGElementImpl *object)
{
// get either comma or space delimited lists
// TODO : more error checking/reporting
- QStringList sublengths = QStringList::split(QRegExp("[, ]"), lengths);
- QStringList::ConstIterator it = sublengths.begin();
- QStringList::ConstIterator end = sublengths.end();
+ TQStringList sublengths = TQStringList::split(TQRegExp("[, ]"), lengths);
+ TQStringList::ConstIterator it = sublengths.begin();
+ TQStringList::ConstIterator end = sublengths.end();
SVGLengthImpl *lengthImpl = 0;
for(; it != end; ++it)
@@ -127,32 +127,32 @@ void SVGHelperImpl::parseLengthList(SVGAnimatedLengthListImpl *list, const QStri
}
}
-void SVGHelperImpl::parseCommaSeperatedList(SVGStringListImpl *list, const QString &data)
+void SVGHelperImpl::parseCommaSeperatedList(SVGStringListImpl *list, const TQString &data)
{
parseList(list, ',', data);
}
-void SVGHelperImpl::parseSemicolonSeperatedList(SVGStringListImpl *list, const QString &data)
+void SVGHelperImpl::parseSemicolonSeperatedList(SVGStringListImpl *list, const TQString &data)
{
parseList(list, ';', data);
}
-void SVGHelperImpl::parseTransformAttribute(SVGTransformListImpl *list, const QString &transform)
+void SVGHelperImpl::parseTransformAttribute(SVGTransformListImpl *list, const TQString &transform)
{
// Split string for handling 1 transform statement at a time
- QStringList subtransforms = QStringList::split(')', transform);
- QStringList::ConstIterator it = subtransforms.begin();
- QStringList::ConstIterator end = subtransforms.end();
+ TQStringList subtransforms = TQStringList::split(')', transform);
+ TQStringList::ConstIterator it = subtransforms.begin();
+ TQStringList::ConstIterator end = subtransforms.end();
for(; it != end; ++it)
{
- QStringList subtransform = QStringList::split('(', (*it));
+ TQStringList subtransform = TQStringList::split('(', (*it));
subtransform[0] = subtransform[0].stripWhiteSpace().lower();
subtransform[1] = subtransform[1].simplifyWhiteSpace();
- QRegExp reg("([-]?\\d*\\.?\\d+(?:e[-]?\\d+)?)");
+ TQRegExp reg("([-]?\\d*\\.?\\d+(?:e[-]?\\d+)?)");
int pos = 0;
- QStringList params;
+ TQStringList params;
while(pos >= 0)
{
@@ -215,9 +215,9 @@ void SVGHelperImpl::parseTransformAttribute(SVGTransformListImpl *list, const QS
}
/// convert from user space to "real" pixels on rendering area
-QRect SVGHelperImpl::fromUserspace(SVGElementImpl *obj, const QRect &r)
+TQRect SVGHelperImpl::fromUserspace(SVGElementImpl *obj, const TQRect &r)
{
- QRect sr;
+ TQRect sr;
SVGLocatableImpl *locate = dynamic_cast<SVGLocatableImpl *>(obj);
diff --git a/ksvg/impl/SVGHelperImpl.h b/ksvg/impl/SVGHelperImpl.h
index e8bbdb39..86edbf66 100644
--- a/ksvg/impl/SVGHelperImpl.h
+++ b/ksvg/impl/SVGHelperImpl.h
@@ -30,8 +30,8 @@
#include "ksvg_lookup.h"
-class QRect;
-class QString;
+class TQRect;
+class TQString;
namespace KSVG
{
@@ -47,7 +47,7 @@ public:
// Dynamic attribute updating
template<class T>
- static void applyContainer(T *obj, int token, const QString &value)
+ static void applyContainer(T *obj, int token, const TQString &value)
{
SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(obj);
if(!element || !element->hasChildNodes())
@@ -67,18 +67,18 @@ public:
static void copyAttributes(SVGElementImpl *src, SVGElementImpl *dst);
// SVGAnimatedLengthList
- static void parseLengthList(SVGAnimatedLengthListImpl *list, const QString &lengths, LengthMode mode = LENGTHMODE_UNKNOWN, SVGElementImpl *object = 0);
+ static void parseLengthList(SVGAnimatedLengthListImpl *list, const TQString &lengths, LengthMode mode = LENGTHMODE_UNKNOWN, SVGElementImpl *object = 0);
// SVGStringList
- static void parseList(SVGStringListImpl *list, char seperator, const QString &data);
- static void parseCommaSeperatedList(SVGStringListImpl *list, const QString &data);
- static void parseSemicolonSeperatedList(SVGStringListImpl *list, const QString &data);
+ static void parseList(SVGStringListImpl *list, char seperator, const TQString &data);
+ static void parseCommaSeperatedList(SVGStringListImpl *list, const TQString &data);
+ static void parseSemicolonSeperatedList(SVGStringListImpl *list, const TQString &data);
// SVGTransformList
- static void parseTransformAttribute(SVGTransformListImpl *list, const QString &transform);
+ static void parseTransformAttribute(SVGTransformListImpl *list, const TQString &transform);
// Tools
- static QRect fromUserspace(SVGElementImpl *, const QRect &);
+ static TQRect fromUserspace(SVGElementImpl *, const TQRect &);
};
}
diff --git a/ksvg/impl/SVGImageElementImpl.cc b/ksvg/impl/SVGImageElementImpl.cc
index 608dbda5..49f48e7d 100644
--- a/ksvg/impl/SVGImageElementImpl.cc
+++ b/ksvg/impl/SVGImageElementImpl.cc
@@ -18,8 +18,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qimage.h>
-#include <qtimer.h>
+#include <tqimage.h>
+#include <tqtimer.h>
#include <kdebug.h>
@@ -51,7 +51,7 @@ using namespace KSVG;
#include "ksvg_bridge.h"
#include "ksvg_ecma.h"
-SVGImageElementImpl::SVGImageElementImpl(DOM::ElementImpl *impl) : QObject(), SVGShapeImpl(impl), SVGURIReferenceImpl(), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGTransformableImpl()
+SVGImageElementImpl::SVGImageElementImpl(DOM::ElementImpl *impl) : TQObject(), SVGShapeImpl(impl), SVGURIReferenceImpl(), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGTransformableImpl()
{
KSVG_EMPTY_FLAGS
@@ -240,7 +240,7 @@ void SVGImageElementImpl::setAttributes()
}
}
-void SVGImageElementImpl::slotParsingFinished(bool error, const QString &errorDesc)
+void SVGImageElementImpl::slotParsingFinished(bool error, const TQString &errorDesc)
{
if(error)
kdDebug(26003) << "Finished with error : " << errorDesc << endl;
@@ -273,8 +273,8 @@ void SVGImageElementImpl::createItem(KSVGCanvas *c)
m_doc->ref();
m_doc->attach(c);
- connect(m_doc, SIGNAL(finishedParsing(bool, const QString &)), this, SLOT(slotParsingFinished(bool, const QString &)));
- connect(m_doc, SIGNAL(finishedLoading()), this, SLOT(slotLoadingFinished()));
+ connect(m_doc, TQT_SIGNAL(finishedParsing(bool, const TQString &)), this, TQT_SLOT(slotParsingFinished(bool, const TQString &)));
+ connect(m_doc, TQT_SIGNAL(finishedLoading()), this, TQT_SLOT(slotLoadingFinished()));
KURL file;
@@ -320,12 +320,12 @@ void SVGImageElementImpl::removeItem(KSVGCanvas *c)
void SVGImageElementImpl::setupSVGElement(SVGSVGElementImpl *svg)
{
// Set up the root svg for an svg image.
- svg->setAttributeInternal("x", QString("%1").arg(x()->baseVal()->value()));
- svg->setAttributeInternal("y", QString("%1").arg(y()->baseVal()->value()));
- svg->setAttributeInternal("width", QString("%1").arg(width()->baseVal()->value()));
- svg->setAttributeInternal("height", QString("%1").arg(height()->baseVal()->value()));
+ svg->setAttributeInternal("x", TQString("%1").arg(x()->baseVal()->value()));
+ svg->setAttributeInternal("y", TQString("%1").arg(y()->baseVal()->value()));
+ svg->setAttributeInternal("width", TQString("%1").arg(width()->baseVal()->value()));
+ svg->setAttributeInternal("height", TQString("%1").arg(height()->baseVal()->value()));
- QString par = getAttribute("preserveAspectRatio").string().stripWhiteSpace();
+ TQString par = getAttribute("preserveAspectRatio").string().stripWhiteSpace();
if(par.startsWith("defer"))
{
@@ -358,7 +358,7 @@ void SVGImageElementImpl::onScreenCTMUpdated()
}
}
-bool SVGImageElementImpl::prepareMouseEvent(const QPoint &p, const QPoint &, SVGMouseEventImpl *mev)
+bool SVGImageElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &, SVGMouseEventImpl *mev)
{
// TODO : pointer-events should be stored here, not in SVGStylableImpl.
SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(this);
@@ -390,7 +390,7 @@ bool SVGImageElementImpl::prepareMouseEvent(const QPoint &p, const QPoint &, SVG
return false;
}
-void SVGImageElementImpl::setImage(QImage *image)
+void SVGImageElementImpl::setImage(TQImage *image)
{
m_image = image;
@@ -416,7 +416,7 @@ void SVGImageElementImpl::setImage(QImage *image)
ownerDoc()->notifyImageLoaded(this);
}
-QImage SVGImageElementImpl::scaledImage()
+TQImage SVGImageElementImpl::scaledImage()
{
SVGMatrixImpl *matrix = imageMatrix();
double sx, sy;
@@ -424,7 +424,7 @@ QImage SVGImageElementImpl::scaledImage()
matrix->removeScale(&sx, &sy);
matrix->deref();
- QImage img;
+ TQImage img;
if(sx != 1 || sy != 1)
{
@@ -488,7 +488,7 @@ KSVGPolygon SVGImageElementImpl::clippingShape()
return p;
}
-QString SVGImageElementImpl::fileName() const
+TQString SVGImageElementImpl::fileName() const
{
return href()->baseVal().string();
}
diff --git a/ksvg/impl/SVGImageElementImpl.h b/ksvg/impl/SVGImageElementImpl.h
index 35ae161f..922ef3f8 100644
--- a/ksvg/impl/SVGImageElementImpl.h
+++ b/ksvg/impl/SVGImageElementImpl.h
@@ -21,7 +21,7 @@
#ifndef SVGImageElementImpl_H
#define SVGImageElementImpl_H
-#include <qobject.h>
+#include <tqobject.h>
#include "ksvg_lookup.h"
@@ -42,7 +42,7 @@ class SVGSVGElementImpl;
class SVGAnimatedLengthImpl;
class SVGColorProfileElementImpl;
class SVGAnimatedPreserveAspectRatioImpl;
-class SVGImageElementImpl : public QObject,
+class SVGImageElementImpl : public TQObject,
public SVGShapeImpl,
public SVGURIReferenceImpl,
public SVGTestsImpl,
@@ -67,12 +67,12 @@ public:
virtual void setAttributes();
- virtual bool prepareMouseEvent(const QPoint &p, const QPoint &a, SVGMouseEventImpl *mev);
+ virtual bool prepareMouseEvent(const TQPoint &p, const TQPoint &a, SVGMouseEventImpl *mev);
- void setImage(QImage *image);
- QImage *image() { return m_image; }
+ void setImage(TQImage *image);
+ TQImage *image() { return m_image; }
- QImage scaledImage();
+ TQImage scaledImage();
SVGMatrixImpl *imageMatrix();
SVGMatrixImpl *scaledImageMatrix();
@@ -81,7 +81,7 @@ public:
void applyColorProfile();
static void applyColorProfile(SVGColorProfileElementImpl *profile, SVGImageElementImpl *image);
- QString fileName() const;
+ TQString fileName() const;
virtual SVGRectImpl *getBBox();
@@ -93,7 +93,7 @@ public:
void setupSVGElement(SVGSVGElementImpl *svg);
private slots:
- void slotParsingFinished(bool error, const QString &errorDesc);
+ void slotParsingFinished(bool error, const TQString &errorDesc);
void slotLoadingFinished();
private:
@@ -102,7 +102,7 @@ private:
SVGAnimatedLengthImpl *m_width;
SVGAnimatedLengthImpl *m_height;
- QImage *m_image;
+ TQImage *m_image;
bool m_colorProfileApplied;
SVGAnimatedPreserveAspectRatioImpl *m_preserveAspectRatio;
@@ -127,7 +127,7 @@ public:
struct ImageStreamMap
{
- QByteArray *data;
+ TQByteArray *data;
SVGImageElementImpl *imageElement;
};
diff --git a/ksvg/impl/SVGLangSpaceImpl.cc b/ksvg/impl/SVGLangSpaceImpl.cc
index 0eaada47..92919698 100644
--- a/ksvg/impl/SVGLangSpaceImpl.cc
+++ b/ksvg/impl/SVGLangSpaceImpl.cc
@@ -59,16 +59,16 @@ DOM::DOMString SVGLangSpaceImpl::xmlspace() const
return m_xmlspace;
}
-QString SVGLangSpaceImpl::handleText(const QString &data) const
+TQString SVGLangSpaceImpl::handleText(const TQString &data) const
{
- QString result = data;
+ TQString result = data;
if(xmlspace() == "preserve")
{
// Spec: What to do here?
// It will convert all newline and tab characters into space characters
- result.replace("\n\r", QString(" "));
- result.replace("\r\n", QString(" "));
+ result.replace("\n\r", TQString(" "));
+ result.replace("\r\n", TQString(" "));
result.replace('\t', ' ');
}
else if(xmlspace() == "default")
@@ -78,8 +78,8 @@ QString SVGLangSpaceImpl::handleText(const QString &data) const
// Then it will convert all tab characters into space characters (simplifyWhiteSpace)
// Then, it will strip off all leading and trailing space characters (stripWhiteSpace)
// Then, all contiguous space characters will be consolidated. (simplifyWhiteSpace)
- result.replace('\n', QString::null);
- result.replace('\r', QString::null);
+ result.replace('\n', TQString::null);
+ result.replace('\r', TQString::null);
result = result.stripWhiteSpace().simplifyWhiteSpace();
}
diff --git a/ksvg/impl/SVGLangSpaceImpl.h b/ksvg/impl/SVGLangSpaceImpl.h
index 4a8c199a..099884dc 100644
--- a/ksvg/impl/SVGLangSpaceImpl.h
+++ b/ksvg/impl/SVGLangSpaceImpl.h
@@ -40,7 +40,7 @@ public:
void setXmlspace(const DOM::DOMString &xmlspace);
DOM::DOMString xmlspace() const;
- QString handleText(const QString &data) const;
+ TQString handleText(const TQString &data) const;
private:
DOM::DOMString m_xmllang;
diff --git a/ksvg/impl/SVGLengthImpl.cc b/ksvg/impl/SVGLengthImpl.cc
index 46529022..a8c9080c 100644
--- a/ksvg/impl/SVGLengthImpl.cc
+++ b/ksvg/impl/SVGLengthImpl.cc
@@ -20,10 +20,10 @@
#include <kdebug.h>
-#include <qfont.h>
-#include <qregexp.h>
-#include <qwidget.h>
-#include <qpaintdevicemetrics.h>
+#include <tqfont.h>
+#include <tqregexp.h>
+#include <tqwidget.h>
+#include <tqpaintdevicemetrics.h>
#include "SVGLength.h"
@@ -48,7 +48,7 @@ using namespace KSVG;
#include "ksvg_cacheimpl.h"
// keep track of textual description of the unit type
-QString UnitText[] =
+TQString UnitText[] =
{
"", "", "%", "em", "ex", "px", "cm", "mm", "in", "pt", "pc"
};
@@ -153,7 +153,7 @@ void SVGLengthImpl::setValueAsString(const DOM::DOMString &valueAsString)
DOM::DOMString SVGLengthImpl::valueAsString() const
{
- DOM::DOMString valueAsString = QString::number(m_valueInSpecifiedUnits);
+ DOM::DOMString valueAsString = TQString::number(m_valueInSpecifiedUnits);
valueAsString += UnitText[m_unitType];
return valueAsString;
}
@@ -209,7 +209,7 @@ bool SVGLengthImpl::getValFromPx()
return true;
}
-void SVGLengthImpl::convertStringToPx(QString s)
+void SVGLengthImpl::convertStringToPx(TQString s)
{
if(s.isEmpty())
return;
@@ -289,7 +289,7 @@ void SVGLengthImpl::convertNumToPx()
// Look up font-size in a SAFE way, because at this place
// processStyle() has NOT yet been called, so we need
// a different solution (Niko)
- QString useFont = "Arial";
+ TQString useFont = "Arial";
double useSize = 12;
if(sizeLocal)
@@ -307,10 +307,10 @@ void SVGLengthImpl::convertNumToPx()
else
{
// Easiest way, use qfont (Niko)
- QFont font(useFont);
+ TQFont font(useFont);
font.setPixelSize(static_cast<int>(useSize));
- QFontMetrics fm(font);
+ TQFontMetrics fm(font);
m_value = m_valueInSpecifiedUnits * fm.boundingRect('x').height();
}
}
@@ -318,7 +318,7 @@ void SVGLengthImpl::convertNumToPx()
};
}
-void SVGLengthImpl::convertPercentageToFloat(const QString &perc, float &result)
+void SVGLengthImpl::convertPercentageToFloat(const TQString &perc, float &result)
{
// TODO : more error checking ?
if(perc.endsWith("%"))
@@ -327,12 +327,12 @@ void SVGLengthImpl::convertPercentageToFloat(const QString &perc, float &result)
result = perc.toFloat();
}
-QString SVGLengthImpl::convertValToPercentage(const QString &val, float benchmark)
+TQString SVGLengthImpl::convertValToPercentage(const TQString &val, float benchmark)
{
if(val.endsWith("%"))
return val;
- QString result;
+ TQString result;
float temp = val.toFloat();
temp = (temp / benchmark) * 100.0;
@@ -388,7 +388,7 @@ float SVGLengthImpl::percentageOfViewport()
if(!m_context->ownerDoc()->canvas()) // Happens when parsing <svg width="100%"> with printnodetest
return 0.0;
- QPaintDeviceMetrics metrics(m_context->ownerDoc()->canvas()->drawWindow());
+ TQPaintDeviceMetrics metrics(m_context->ownerDoc()->canvas()->drawWindow());
if(m_mode == LENGTHMODE_WIDTH)
return value * metrics.width();
diff --git a/ksvg/impl/SVGLengthImpl.h b/ksvg/impl/SVGLengthImpl.h
index 5879a091..f1254c25 100644
--- a/ksvg/impl/SVGLengthImpl.h
+++ b/ksvg/impl/SVGLengthImpl.h
@@ -64,7 +64,7 @@ public:
operator float();
- static void convertPercentageToFloat(const QString &perc, float &result);
+ static void convertPercentageToFloat(const TQString &perc, float &result);
// This method converts the value val to percentage notation ("xxx%").
// If the value string ends with the percentage sign it is returned,
@@ -72,7 +72,7 @@ public:
// for benchmark 1.0. This method should be useful in contexts that
// know the values should be in percentages up front, like bbox
// calculations.
- static QString convertValToPercentage(const QString &val, float benchmark = 1.0);
+ static TQString convertValToPercentage(const TQString &val, float benchmark = 1.0);
SVGElementImpl *context() const;
void setContext(SVGElementImpl *context);
@@ -84,7 +84,7 @@ private:
float percentageOfViewport();
- void convertStringToPx(QString s);
+ void convertStringToPx(TQString s);
void convertNumToPx();
bool getValFromPx();
diff --git a/ksvg/impl/SVGLinearGradientElementImpl.cc b/ksvg/impl/SVGLinearGradientElementImpl.cc
index 54c97f01..c08f1417 100644
--- a/ksvg/impl/SVGLinearGradientElementImpl.cc
+++ b/ksvg/impl/SVGLinearGradientElementImpl.cc
@@ -177,12 +177,12 @@ void SVGLinearGradientElementImpl::setAttributes()
KSVG_SET_ALT_ATTRIBUTE(Y2, "0")
}
-QMap<QString, DOM::DOMString> SVGLinearGradientElementImpl::gradientAttributes()
+TQMap<TQString, DOM::DOMString> SVGLinearGradientElementImpl::gradientAttributes()
{
setAttributes();
- QMap<QString, DOM::DOMString> gradAttributes;
- QDictIterator<DOM::DOMString> it(attributes());
+ TQMap<TQString, DOM::DOMString> gradAttributes;
+ TQDictIterator<DOM::DOMString> it(attributes());
for(; it.current(); ++it)
{
diff --git a/ksvg/impl/SVGLinearGradientElementImpl.h b/ksvg/impl/SVGLinearGradientElementImpl.h
index a230a0fe..87744708 100644
--- a/ksvg/impl/SVGLinearGradientElementImpl.h
+++ b/ksvg/impl/SVGLinearGradientElementImpl.h
@@ -42,7 +42,7 @@ public:
virtual void setAttributes();
- virtual QMap<QString, DOM::DOMString> gradientAttributes();
+ virtual TQMap<TQString, DOM::DOMString> gradientAttributes();
private:
SVGAnimatedLengthImpl *m_x1;
diff --git a/ksvg/impl/SVGList.h b/ksvg/impl/SVGList.h
index dfa07dd0..fdf13bd9 100644
--- a/ksvg/impl/SVGList.h
+++ b/ksvg/impl/SVGList.h
@@ -24,7 +24,7 @@
#include "ksvg_bridge.h"
#include "ksvg_lookup.h"
#include "ksvg_scriptinterpreter.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <dom/dom_misc.h>
namespace KSVG
@@ -162,7 +162,7 @@ public:
}
private:
- QPtrList<T> m_impl;
+ TQPtrList<T> m_impl;
};
}
diff --git a/ksvg/impl/SVGMarkerElementImpl.cc b/ksvg/impl/SVGMarkerElementImpl.cc
index 0fc1d263..a621b47f 100644
--- a/ksvg/impl/SVGMarkerElementImpl.cc
+++ b/ksvg/impl/SVGMarkerElementImpl.cc
@@ -356,7 +356,7 @@ void SVGMarkerElementImpl::putValueProperty(ExecState *exec, int token, const Va
break;
case Orient:
{
- QString param = value.toString(exec).qstring();
+ TQString param = value.toString(exec).qstring();
if(param == "auto")
orientType()->setBaseVal(SVG_MARKER_ORIENT_AUTO);
diff --git a/ksvg/impl/SVGMaskElementImpl.cc b/ksvg/impl/SVGMaskElementImpl.cc
index 5cd2151e..d0f90974 100644
--- a/ksvg/impl/SVGMaskElementImpl.cc
+++ b/ksvg/impl/SVGMaskElementImpl.cc
@@ -21,7 +21,7 @@
#include <cfloat>
#include <kdebug.h>
-#include <qimage.h>
+#include <tqimage.h>
#include "SVGMaskElement.h"
@@ -336,12 +336,12 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin
{
// Note: r and b reversed
- //QImage maskImage(reinterpret_cast<unsigned char *>(imageBits), imageWidth, imageHeight, 32, 0, 0, QImage::IgnoreEndian);
+ //TQImage maskImage(reinterpret_cast<unsigned char *>(imageBits), imageWidth, imageHeight, 32, 0, 0, TQImage::IgnoreEndian);
//maskImage.setAlphaBuffer(true);
//maskImage.save("mask.png", "PNG");
}
- QByteArray maskData(imageWidth * imageHeight);
+ TQByteArray maskData(imageWidth * imageHeight);
const double epsilon = DBL_EPSILON;
// Convert the rgba image into an 8-bit mask, according to the specs.
@@ -390,7 +390,7 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin
// The screenToMask matrix is calculated each time the mask is used so we don't
// need to set it here.
- QWMatrix tempMatrix;
+ TQWMatrix tempMatrix;
return Mask(maskData, tempMatrix, imageWidth, imageHeight);
}
@@ -444,7 +444,7 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin
matrix->scaleNonUniform(1 / xScale, 1 / yScale);
- QWMatrix screenToMask = matrix->qmatrix().invert();
+ TQWMatrix screenToMask = matrix->qmatrix().invert();
matrix->deref();
mask.setScreenToMask(screenToMask);
@@ -453,9 +453,9 @@ SVGMaskElementImpl::Mask SVGMaskElementImpl::createMask(SVGShapeImpl *referencin
return mask;
}
-QByteArray SVGMaskElementImpl::maskRectangle(SVGShapeImpl *shape, const QRect& screenRectangle)
+TQByteArray SVGMaskElementImpl::maskRectangle(SVGShapeImpl *shape, const TQRect& screenRectangle)
{
- QByteArray cumulativeMask;
+ TQByteArray cumulativeMask;
do
{
@@ -475,7 +475,7 @@ QByteArray SVGMaskElementImpl::maskRectangle(SVGShapeImpl *shape, const QRect& s
if(!mask.isEmpty())
{
- QByteArray maskData = mask.rectangle(screenRectangle);
+ TQByteArray maskData = mask.rectangle(screenRectangle);
if(cumulativeMask.size() == 0)
cumulativeMask = maskData;
@@ -514,14 +514,14 @@ QByteArray SVGMaskElementImpl::maskRectangle(SVGShapeImpl *shape, const QRect& s
return cumulativeMask;
}
-SVGMaskElementImpl::Mask::Mask(const QByteArray& mask, const QWMatrix& screenToMask, int width, int height)
+SVGMaskElementImpl::Mask::Mask(const TQByteArray& mask, const TQWMatrix& screenToMask, int width, int height)
: m_width(width), m_height(height), m_mask(mask), m_screenToMask(screenToMask)
{
}
-QByteArray SVGMaskElementImpl::Mask::rectangle(int screenX, int screenY, int width, int height)
+TQByteArray SVGMaskElementImpl::Mask::rectangle(int screenX, int screenY, int width, int height)
{
- QByteArray rect(width * height);
+ TQByteArray rect(width * height);
for(int x = 0; x < width; x++)
{
@@ -534,7 +534,7 @@ QByteArray SVGMaskElementImpl::Mask::rectangle(int screenX, int screenY, int wid
return rect;
}
-QByteArray SVGMaskElementImpl::Mask::rectangle(const QRect& rect)
+TQByteArray SVGMaskElementImpl::Mask::rectangle(const TQRect& rect)
{
return rectangle(rect.x(), rect.y(), rect.width(), rect.height());
}
diff --git a/ksvg/impl/SVGMaskElementImpl.h b/ksvg/impl/SVGMaskElementImpl.h
index cdd1c125..2a96967c 100644
--- a/ksvg/impl/SVGMaskElementImpl.h
+++ b/ksvg/impl/SVGMaskElementImpl.h
@@ -21,7 +21,7 @@
#ifndef SVGMaskElementImpl_H
#define SVGMaskElementImpl_H
-#include <qwmatrix.h>
+#include <tqwmatrix.h>
#include "SVGTestsImpl.h"
#include "SVGBBoxTarget.h"
@@ -56,20 +56,20 @@ public:
{
public:
Mask() : m_width(0), m_height(0) {}
- Mask(const QByteArray& mask, const QWMatrix& screenToMask, int width, int height);
+ Mask(const TQByteArray& mask, const TQWMatrix& screenToMask, int width, int height);
~Mask() {}
bool isEmpty() const { return m_width == 0; }
unsigned char value(int screenX, int screenY) const;
- QByteArray rectangle(int screenX, int screenY, int width, int height);
- QByteArray rectangle(const QRect& rect);
- void setScreenToMask(const QWMatrix& matrix) { m_screenToMask = matrix; }
+ TQByteArray rectangle(int screenX, int screenY, int width, int height);
+ TQByteArray rectangle(const TQRect& rect);
+ void setScreenToMask(const TQWMatrix& matrix) { m_screenToMask = matrix; }
private:
int m_width;
int m_height;
- QByteArray m_mask;
- QWMatrix m_screenToMask;
+ TQByteArray m_mask;
+ TQWMatrix m_screenToMask;
};
SVGMaskElementImpl(DOM::ElementImpl *);
@@ -92,7 +92,7 @@ public:
// Compute the mask on a given shape, taking into account all masks defined
// on the shape's ancestors. This is a workaround for us not having a buffer
// for container elements, so we can't mask containers directly.
- static QByteArray maskRectangle(SVGShapeImpl *shape, const QRect& screenRectangle);
+ static TQByteArray maskRectangle(SVGShapeImpl *shape, const TQRect& screenRectangle);
private:
class CacheKey
diff --git a/ksvg/impl/SVGMatrixImpl.cc b/ksvg/impl/SVGMatrixImpl.cc
index 81f14f66..0210b8f7 100644
--- a/ksvg/impl/SVGMatrixImpl.cc
+++ b/ksvg/impl/SVGMatrixImpl.cc
@@ -37,7 +37,7 @@ SVGMatrixImpl::SVGMatrixImpl()
KSVG_EMPTY_FLAGS
}
-SVGMatrixImpl::SVGMatrixImpl(QWMatrix mat)
+SVGMatrixImpl::SVGMatrixImpl(TQWMatrix mat)
{
m_mat = mat;
}
@@ -118,7 +118,7 @@ void SVGMatrixImpl::copy(const SVGMatrixImpl *other)
SVGMatrixImpl *SVGMatrixImpl::postMultiply(const SVGMatrixImpl *secondMatrix)
{
- QWMatrix temp(secondMatrix->a(), secondMatrix->b(), secondMatrix->c(), secondMatrix->d(), secondMatrix->e(), secondMatrix->f());
+ TQWMatrix temp(secondMatrix->a(), secondMatrix->b(), secondMatrix->c(), secondMatrix->d(), secondMatrix->e(), secondMatrix->f());
m_mat *= temp;
return this;
}
@@ -132,7 +132,7 @@ SVGMatrixImpl *SVGMatrixImpl::inverse()
SVGMatrixImpl *SVGMatrixImpl::postTranslate(const double &x, const double &y)
{
// Could optimise these.
- QWMatrix temp;
+ TQWMatrix temp;
temp.translate(x, y);
m_mat *= temp;
return this;
@@ -140,7 +140,7 @@ SVGMatrixImpl *SVGMatrixImpl::postTranslate(const double &x, const double &y)
SVGMatrixImpl *SVGMatrixImpl::postScale(const double &scaleFactor)
{
- QWMatrix temp;
+ TQWMatrix temp;
temp.scale(scaleFactor, scaleFactor);
m_mat *= temp;
return this;
@@ -148,7 +148,7 @@ SVGMatrixImpl *SVGMatrixImpl::postScale(const double &scaleFactor)
SVGMatrixImpl *SVGMatrixImpl::postScaleNonUniform(const double &scaleFactorX, const double &scaleFactorY)
{
- QWMatrix temp;
+ TQWMatrix temp;
temp.scale(scaleFactorX, scaleFactorY);
m_mat *= temp;
return this;
@@ -156,7 +156,7 @@ SVGMatrixImpl *SVGMatrixImpl::postScaleNonUniform(const double &scaleFactorX, co
SVGMatrixImpl *SVGMatrixImpl::postRotate(const double &angle)
{
- QWMatrix temp;
+ TQWMatrix temp;
temp.rotate(angle);
m_mat *= temp;
return this;
@@ -164,7 +164,7 @@ SVGMatrixImpl *SVGMatrixImpl::postRotate(const double &angle)
SVGMatrixImpl *SVGMatrixImpl::postRotateFromVector(const double &x, const double &y)
{
- QWMatrix temp;
+ TQWMatrix temp;
temp.rotate(SVGAngleImpl::todeg(atan2(y, x)));
m_mat *= temp;
return this;
@@ -172,21 +172,21 @@ SVGMatrixImpl *SVGMatrixImpl::postRotateFromVector(const double &x, const double
SVGMatrixImpl *SVGMatrixImpl::postFlipX()
{
- QWMatrix temp(-1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F);
+ TQWMatrix temp(-1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F);
m_mat *= temp;
return this;
}
SVGMatrixImpl *SVGMatrixImpl::postFlipY()
{
- QWMatrix temp(1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F);
+ TQWMatrix temp(1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F);
m_mat *= temp;
return this;
}
SVGMatrixImpl *SVGMatrixImpl::postSkewX(const double &angle)
{
- QWMatrix temp;
+ TQWMatrix temp;
temp.shear(tan(SVGAngleImpl::torad(angle)), 0.0F);
m_mat *= temp;
return this;
@@ -194,7 +194,7 @@ SVGMatrixImpl *SVGMatrixImpl::postSkewX(const double &angle)
SVGMatrixImpl *SVGMatrixImpl::postSkewY(const double &angle)
{
- QWMatrix temp;
+ TQWMatrix temp;
temp.shear(0.0F, tan(SVGAngleImpl::torad(angle)));
m_mat *= temp;
return this;
@@ -202,7 +202,7 @@ SVGMatrixImpl *SVGMatrixImpl::postSkewY(const double &angle)
SVGMatrixImpl *SVGMatrixImpl::multiply(const SVGMatrixImpl *secondMatrix)
{
- QWMatrix temp(secondMatrix->a(), secondMatrix->b(), secondMatrix->c(), secondMatrix->d(), secondMatrix->e(), secondMatrix->f());
+ TQWMatrix temp(secondMatrix->a(), secondMatrix->b(), secondMatrix->c(), secondMatrix->d(), secondMatrix->e(), secondMatrix->f());
temp *= m_mat;
m_mat = temp;
return this;
@@ -262,17 +262,17 @@ SVGMatrixImpl *SVGMatrixImpl::skewY(const double &angle)
return this;
}
-void SVGMatrixImpl::setMatrix(QWMatrix mat)
+void SVGMatrixImpl::setMatrix(TQWMatrix mat)
{
m_mat = mat;
}
-QWMatrix &SVGMatrixImpl::qmatrix()
+TQWMatrix &SVGMatrixImpl::qmatrix()
{
return m_mat;
}
-const QWMatrix &SVGMatrixImpl::qmatrix() const
+const TQWMatrix &SVGMatrixImpl::qmatrix() const
{
return m_mat;
}
@@ -315,7 +315,7 @@ KSVGPolygon SVGMatrixImpl::map(const KSVGPolygon& polygon) const
KSVGPolygon SVGMatrixImpl::inverseMap(const KSVGPolygon& polygon) const
{
- QWMatrix inverse = m_mat.invert();
+ TQWMatrix inverse = m_mat.invert();
KSVGPolygon mapped;
for(unsigned int i = 0; i < polygon.numPoints(); i++)
diff --git a/ksvg/impl/SVGMatrixImpl.h b/ksvg/impl/SVGMatrixImpl.h
index a5d8edf3..7cf7ed92 100644
--- a/ksvg/impl/SVGMatrixImpl.h
+++ b/ksvg/impl/SVGMatrixImpl.h
@@ -21,7 +21,7 @@
#ifndef SVGMatrixImpl_H
#define SVGMatrixImpl_H
-#include <qwmatrix.h>
+#include <tqwmatrix.h>
#include <dom/dom_misc.h>
@@ -35,7 +35,7 @@ class SVGMatrixImpl : public DOM::DomShared
{
public:
SVGMatrixImpl();
- SVGMatrixImpl(QWMatrix mat);
+ SVGMatrixImpl(TQWMatrix mat);
SVGMatrixImpl(double, double, double, double, double, double);
~SVGMatrixImpl();
@@ -88,8 +88,8 @@ public:
void reset();
// KSVG helper method
- QWMatrix &qmatrix();
- const QWMatrix &qmatrix() const;
+ TQWMatrix &qmatrix();
+ const TQWMatrix &qmatrix() const;
// Determine the scaling component of the matrix and factor it out. After
// this operation, the matrix has x and y scale of one.
@@ -99,8 +99,8 @@ public:
KSVGPolygon inverseMap(const KSVGPolygon& polygon) const;
private:
- void setMatrix(QWMatrix mat);
- QWMatrix m_mat;
+ void setMatrix(TQWMatrix mat);
+ TQWMatrix m_mat;
public:
KSVG_GET
diff --git a/ksvg/impl/SVGPaintImpl.cc b/ksvg/impl/SVGPaintImpl.cc
index c1818892..aa52811a 100644
--- a/ksvg/impl/SVGPaintImpl.cc
+++ b/ksvg/impl/SVGPaintImpl.cc
@@ -77,7 +77,7 @@ void SVGPaintImpl::setPaint(unsigned short paintType, const DOM::DOMString &/*ur
m_paintType = paintType;
}
-void SVGPaintImpl::setRGBColor(QColor color)
+void SVGPaintImpl::setRGBColor(TQColor color)
{
m_paintType = SVG_PAINTTYPE_RGBCOLOR;
SVGColorImpl::setRGBColor(color);
diff --git a/ksvg/impl/SVGPaintImpl.h b/ksvg/impl/SVGPaintImpl.h
index f2aa0691..03cb2153 100644
--- a/ksvg/impl/SVGPaintImpl.h
+++ b/ksvg/impl/SVGPaintImpl.h
@@ -46,7 +46,7 @@ public:
virtual void setRGBColor(const DOM::DOMString &rgbColor);
virtual void setRGBColor(int r, int g, int b);
- virtual void setRGBColor(QColor color);
+ virtual void setRGBColor(TQColor color);
virtual void setRGBColorICCColor(const DOM::DOMString &rgbColor, const DOM::DOMString &iccColor);
virtual void setColor(unsigned short colorType, const DOM::DOMString &rgbColor, const DOM::DOMString &iccColor);
diff --git a/ksvg/impl/SVGPaintServerImpl.cc b/ksvg/impl/SVGPaintServerImpl.cc
index b3275231..e87882b1 100644
--- a/ksvg/impl/SVGPaintServerImpl.cc
+++ b/ksvg/impl/SVGPaintServerImpl.cc
@@ -35,7 +35,7 @@ SVGPaintServerImpl::~SVGPaintServerImpl()
{
}
-CanvasPaintServer *SVGPaintServerImpl::paintServer(SVGDocumentImpl *doc, const QString& id)
+CanvasPaintServer *SVGPaintServerImpl::paintServer(SVGDocumentImpl *doc, const TQString& id)
{
CanvasPaintServer *pserver = 0;
SVGElementImpl *element = doc->rootElement()->getElementById(id);
diff --git a/ksvg/impl/SVGPaintServerImpl.h b/ksvg/impl/SVGPaintServerImpl.h
index df276758..d9f4a898 100644
--- a/ksvg/impl/SVGPaintServerImpl.h
+++ b/ksvg/impl/SVGPaintServerImpl.h
@@ -36,7 +36,7 @@ public:
CanvasPaintServer *paintServer() { return m_paintServer; }
- static CanvasPaintServer *paintServer(SVGDocumentImpl *doc, const QString& id);
+ static CanvasPaintServer *paintServer(SVGDocumentImpl *doc, const TQString& id);
protected:
CanvasPaintServer *m_paintServer;
diff --git a/ksvg/impl/SVGPathElementImpl.cc b/ksvg/impl/SVGPathElementImpl.cc
index f34600b8..506ad01a 100644
--- a/ksvg/impl/SVGPathElementImpl.cc
+++ b/ksvg/impl/SVGPathElementImpl.cc
@@ -446,7 +446,7 @@ Value SVGPathElementImpl::getValueProperty(ExecState *exec, int token) const
case D:
// if(!attributeMode)
{
- QString d;
+ TQString d;
unsigned int nrSegs = pathSegList()->numberOfItems();
SVGPathSegImpl *curseg = 0;
for(unsigned int i = 0; i < nrSegs; i++)
@@ -475,7 +475,7 @@ void SVGPathElementImpl::putValueProperty(ExecState *exec, int token, const Valu
case D:
{
pathSegList()->clear();
- QString d = value.toString(exec).qstring();
+ TQString d = value.toString(exec).qstring();
parseSVG(d, false);
if(hasMarkers())
m_markerData = MarkerData(pathSegList());
@@ -596,7 +596,7 @@ SVGPathElementImpl::MarkerData::MarkerData(SVGPathSegListImpl *path)
double previousCubicX2 = 0;
double previousCubicY2 = 0;
- QValueVector<SegmentData> pathSegmentData(numSegments);
+ TQValueVector<SegmentData> pathSegmentData(numSegments);
for(unsigned int i = 0; i < numSegments; i++)
{
@@ -797,7 +797,7 @@ SVGPathElementImpl::MarkerData::MarkerData(SVGPathSegListImpl *path)
}
}
-bool SVGPathElementImpl::MarkerData::getStartSlope(QValueVector<SegmentData> segments, unsigned int i, double *pStartSlope)
+bool SVGPathElementImpl::MarkerData::getStartSlope(TQValueVector<SegmentData> segments, unsigned int i, double *pStartSlope)
{
if(i > segments.count() - 1 || segments[i].type == PATHSEG_MOVETO_ABS || segments[i].type == PATHSEG_MOVETO_REL)
return false;
@@ -831,7 +831,7 @@ bool SVGPathElementImpl::MarkerData::getStartSlope(QValueVector<SegmentData> seg
}
}
-bool SVGPathElementImpl::MarkerData::getEndSlope(QValueVector<SegmentData> segments, unsigned int i, double *pEndSlope)
+bool SVGPathElementImpl::MarkerData::getEndSlope(TQValueVector<SegmentData> segments, unsigned int i, double *pEndSlope)
{
if(i > segments.count() - 1 || segments[i].type == PATHSEG_MOVETO_ABS || segments[i].type == PATHSEG_MOVETO_REL)
return false;
diff --git a/ksvg/impl/SVGPathElementImpl.h b/ksvg/impl/SVGPathElementImpl.h
index a9af56fc..8dda0f8f 100644
--- a/ksvg/impl/SVGPathElementImpl.h
+++ b/ksvg/impl/SVGPathElementImpl.h
@@ -21,7 +21,7 @@
#ifndef SVGPathElementImpl_H
#define SVGPathElementImpl_H
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#include "svgpathparser.h"
@@ -133,10 +133,10 @@ public:
int type;
};
- static bool getStartSlope(QValueVector<SegmentData> segments, unsigned int i, double *pStartSlope);
- static bool getEndSlope(QValueVector<SegmentData> segments, unsigned int i, double *pEndSlope);
+ static bool getStartSlope(TQValueVector<SegmentData> segments, unsigned int i, double *pStartSlope);
+ static bool getEndSlope(TQValueVector<SegmentData> segments, unsigned int i, double *pEndSlope);
- QValueVector<Marker> m_markers;
+ TQValueVector<Marker> m_markers;
};
MarkerData markerData() const { return m_markerData; }
diff --git a/ksvg/impl/SVGPathSegArcImpl.h b/ksvg/impl/SVGPathSegArcImpl.h
index f0e375d6..d8a1f8f9 100644
--- a/ksvg/impl/SVGPathSegArcImpl.h
+++ b/ksvg/impl/SVGPathSegArcImpl.h
@@ -36,7 +36,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_ARC_ABS; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "A"; }
- virtual QString toString() const { return QString("A %1 %2 %3 %4 %5 %6 %7").arg(m_r1).arg(m_r2).arg(m_angle).arg(m_largeArcFlag).arg(m_sweepFlag).arg(m_x).arg(m_y); }
+ virtual TQString toString() const { return TQString("A %1 %2 %3 %4 %5 %6 %7").arg(m_r1).arg(m_r2).arg(m_angle).arg(m_largeArcFlag).arg(m_sweepFlag).arg(m_x).arg(m_y); }
void setX(double x);
double x() const;
@@ -94,7 +94,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_ARC_REL; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "a"; }
- virtual QString toString() const { return QString("a %1 %2 %3 %4 %5 %6 %7").arg(m_r1).arg(m_r2).arg(m_angle).arg(m_largeArcFlag).arg(m_sweepFlag).arg(m_x).arg(m_y); }
+ virtual TQString toString() const { return TQString("a %1 %2 %3 %4 %5 %6 %7").arg(m_r1).arg(m_r2).arg(m_angle).arg(m_largeArcFlag).arg(m_sweepFlag).arg(m_x).arg(m_y); }
void setX(double x);
double x() const;
diff --git a/ksvg/impl/SVGPathSegClosePathImpl.h b/ksvg/impl/SVGPathSegClosePathImpl.h
index c4cf63ce..c9c93ca0 100644
--- a/ksvg/impl/SVGPathSegClosePathImpl.h
+++ b/ksvg/impl/SVGPathSegClosePathImpl.h
@@ -36,7 +36,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_CLOSEPATH; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "Z"; }
- virtual QString toString() const { return "Z"; }
+ virtual TQString toString() const { return "Z"; }
void setX(double x) { m_x = x; }
void setY(double y) { m_y = y; }
diff --git a/ksvg/impl/SVGPathSegCurvetoCubicImpl.h b/ksvg/impl/SVGPathSegCurvetoCubicImpl.h
index 8f408f91..83f4de6b 100644
--- a/ksvg/impl/SVGPathSegCurvetoCubicImpl.h
+++ b/ksvg/impl/SVGPathSegCurvetoCubicImpl.h
@@ -36,7 +36,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_ABS; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "C"; }
- virtual QString toString() const { return QString("C %1 %2 %3 %4 %5 %6").arg(m_x1).arg(m_y1).arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); }
+ virtual TQString toString() const { return TQString("C %1 %2 %3 %4 %5 %6").arg(m_x1).arg(m_y1).arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); }
void setX(const double &);
double x() const;
@@ -88,7 +88,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_REL; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "c"; }
- virtual QString toString() const { return QString("c %1 %2 %3 %4 %5 %6").arg(m_x1).arg(m_y1).arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); }
+ virtual TQString toString() const { return TQString("c %1 %2 %3 %4 %5 %6").arg(m_x1).arg(m_y1).arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); }
void setX(const double &);
double x() const;
diff --git a/ksvg/impl/SVGPathSegCurvetoCubicSmoothImpl.h b/ksvg/impl/SVGPathSegCurvetoCubicSmoothImpl.h
index 0def6514..3bcc8c87 100644
--- a/ksvg/impl/SVGPathSegCurvetoCubicSmoothImpl.h
+++ b/ksvg/impl/SVGPathSegCurvetoCubicSmoothImpl.h
@@ -36,7 +36,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_ABS; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "S"; }
- virtual QString toString() const { return QString("S %1 %2 %3 %4").arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); }
+ virtual TQString toString() const { return TQString("S %1 %2 %3 %4").arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); }
void setX(const double &);
double x() const;
@@ -88,7 +88,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_REL; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "s"; }
- virtual QString toString() const { return QString("s %1 %2 %3 %4").arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); }
+ virtual TQString toString() const { return TQString("s %1 %2 %3 %4").arg(m_x2).arg(m_y2).arg(m_x).arg(m_y); }
void setX(const double &);
double x() const;
diff --git a/ksvg/impl/SVGPathSegCurvetoQuadraticImpl.h b/ksvg/impl/SVGPathSegCurvetoQuadraticImpl.h
index 6fe9ef15..6772605f 100644
--- a/ksvg/impl/SVGPathSegCurvetoQuadraticImpl.h
+++ b/ksvg/impl/SVGPathSegCurvetoQuadraticImpl.h
@@ -36,7 +36,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_ABS; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "Q"; }
- virtual QString toString() const { return QString("Q %1 %2 %3 %4").arg(m_x1).arg(m_y1).arg(m_x).arg(m_y); }
+ virtual TQString toString() const { return TQString("Q %1 %2 %3 %4").arg(m_x1).arg(m_y1).arg(m_x).arg(m_y); }
void setX(const double &);
double x() const;
@@ -80,7 +80,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_REL; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "q"; }
- virtual QString toString() const { return QString("q %1 %2 %3 %4").arg(m_x1).arg(m_y1).arg(m_x).arg(m_y); }
+ virtual TQString toString() const { return TQString("q %1 %2 %3 %4").arg(m_x1).arg(m_y1).arg(m_x).arg(m_y); }
void setX(const double &);
double x() const;
diff --git a/ksvg/impl/SVGPathSegCurvetoQuadraticSmoothImpl.h b/ksvg/impl/SVGPathSegCurvetoQuadraticSmoothImpl.h
index dffa3355..6c471bd6 100644
--- a/ksvg/impl/SVGPathSegCurvetoQuadraticSmoothImpl.h
+++ b/ksvg/impl/SVGPathSegCurvetoQuadraticSmoothImpl.h
@@ -36,7 +36,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "T"; }
- virtual QString toString() const { return QString("T %1 %2").arg(m_x).arg(m_y); }
+ virtual TQString toString() const { return TQString("T %1 %2").arg(m_x).arg(m_y); }
void setX(const double &);
double x() const;
@@ -80,7 +80,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "t"; }
- virtual QString toString() const { return QString("t %1 %2").arg(m_x).arg(m_y); }
+ virtual TQString toString() const { return TQString("t %1 %2").arg(m_x).arg(m_y); }
void setX(const double &);
double x() const;
diff --git a/ksvg/impl/SVGPathSegImpl.h b/ksvg/impl/SVGPathSegImpl.h
index 64d8b5b0..8f07baea 100644
--- a/ksvg/impl/SVGPathSegImpl.h
+++ b/ksvg/impl/SVGPathSegImpl.h
@@ -39,7 +39,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_UNKNOWN; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return ""; }
- virtual QString toString() const { return ""; }
+ virtual TQString toString() const { return ""; }
virtual void getDeltasAndSlopes(double curx, double cury, double *dx, double *dy, double *startSlope, double *endSlope) const;
diff --git a/ksvg/impl/SVGPathSegLinetoHorizontalImpl.h b/ksvg/impl/SVGPathSegLinetoHorizontalImpl.h
index 020d29d7..52355c5d 100644
--- a/ksvg/impl/SVGPathSegLinetoHorizontalImpl.h
+++ b/ksvg/impl/SVGPathSegLinetoHorizontalImpl.h
@@ -36,7 +36,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_LINETO_HORIZONTAL_ABS; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "H"; }
- virtual QString toString() const { return QString("H %1").arg(m_x); }
+ virtual TQString toString() const { return TQString("H %1").arg(m_x); }
void setX(const double &);
double x() const;
@@ -68,7 +68,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_LINETO_HORIZONTAL_REL; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "h"; }
- virtual QString toString() const { return QString("h %1").arg(m_x); }
+ virtual TQString toString() const { return TQString("h %1").arg(m_x); }
void setX(const double &);
double x() const;
diff --git a/ksvg/impl/SVGPathSegLinetoImpl.h b/ksvg/impl/SVGPathSegLinetoImpl.h
index 3e315022..78df51b9 100644
--- a/ksvg/impl/SVGPathSegLinetoImpl.h
+++ b/ksvg/impl/SVGPathSegLinetoImpl.h
@@ -36,7 +36,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_LINETO_ABS; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "L"; }
- virtual QString toString() const { return QString("L %1 %2").arg(m_x).arg(m_y); }
+ virtual TQString toString() const { return TQString("L %1 %2").arg(m_x).arg(m_y); }
void setX(const double &);
double x() const;
@@ -72,7 +72,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_LINETO_REL; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "l"; }
- virtual QString toString() const { return QString("l %1 %2").arg(m_x).arg(m_y); }
+ virtual TQString toString() const { return TQString("l %1 %2").arg(m_x).arg(m_y); }
void setX(const double &);
double x() const;
diff --git a/ksvg/impl/SVGPathSegLinetoVerticalImpl.h b/ksvg/impl/SVGPathSegLinetoVerticalImpl.h
index c50906d9..1bbf41f4 100644
--- a/ksvg/impl/SVGPathSegLinetoVerticalImpl.h
+++ b/ksvg/impl/SVGPathSegLinetoVerticalImpl.h
@@ -36,7 +36,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_LINETO_VERTICAL_ABS; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "V"; }
- virtual QString toString() const { return QString("V %1").arg(m_y); }
+ virtual TQString toString() const { return TQString("V %1").arg(m_y); }
void setY(const double &);
double y() const;
@@ -68,7 +68,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_LINETO_VERTICAL_REL; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "v"; }
- virtual QString toString() const { return QString("v %1").arg(m_y); }
+ virtual TQString toString() const { return TQString("v %1").arg(m_y); }
void setY(const double &);
double y() const;
diff --git a/ksvg/impl/SVGPathSegMovetoImpl.h b/ksvg/impl/SVGPathSegMovetoImpl.h
index dfbad355..6db95702 100644
--- a/ksvg/impl/SVGPathSegMovetoImpl.h
+++ b/ksvg/impl/SVGPathSegMovetoImpl.h
@@ -36,7 +36,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_MOVETO_ABS; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "M"; }
- virtual QString toString() const { return QString("M %1 %2").arg(m_x).arg(m_y); }
+ virtual TQString toString() const { return TQString("M %1 %2").arg(m_x).arg(m_y); }
void setX(const double &);
double x() const;
@@ -72,7 +72,7 @@ public:
virtual unsigned short pathSegType() const { return PATHSEG_MOVETO_REL; }
virtual DOM::DOMString pathSegTypeAsLetter() const { return "m"; }
- virtual QString toString() const { return QString("m %1 %2").arg(m_x).arg(m_y); }
+ virtual TQString toString() const { return TQString("m %1 %2").arg(m_x).arg(m_y); }
void setX(const double &);
double x() const;
diff --git a/ksvg/impl/SVGPatternElementImpl.cc b/ksvg/impl/SVGPatternElementImpl.cc
index 0b591487..24d03239 100644
--- a/ksvg/impl/SVGPatternElementImpl.cc
+++ b/ksvg/impl/SVGPatternElementImpl.cc
@@ -47,7 +47,7 @@ using namespace KSVG;
#include "ksvg_bridge.h"
#include "ksvg_ecma.h"
-QValueList<SVGPatternElementImpl *> SVGPatternElementImpl::m_patternElements;
+TQValueList<SVGPatternElementImpl *> SVGPatternElementImpl::m_patternElements;
SVGPatternElementImpl::SVGPatternElementImpl(DOM::ElementImpl *impl) : SVGElementImpl(impl), SVGURIReferenceImpl(), SVGTestsImpl(), SVGLangSpaceImpl(), SVGExternalResourcesRequiredImpl(), SVGStylableImpl(this), SVGFitToViewBoxImpl(), SVGPaintServerImpl()
{
@@ -293,7 +293,7 @@ void SVGPatternElementImpl::setAttributes()
void SVGPatternElementImpl::flushCachedTiles()
{
- QValueList<SVGPatternElementImpl *>::iterator it;
+ TQValueList<SVGPatternElementImpl *>::iterator it;
for(it = m_patternElements.begin(); it != m_patternElements.end(); it++)
{
@@ -304,11 +304,11 @@ void SVGPatternElementImpl::flushCachedTiles()
}
}
-QImage SVGPatternElementImpl::createTile(SVGShapeImpl *referencingElement, int imageWidth, int imageHeight)
+TQImage SVGPatternElementImpl::createTile(SVGShapeImpl *referencingElement, int imageWidth, int imageHeight)
{
converter()->finalize(referencingElement, ownerSVGElement(), patternUnits()->baseVal());
- QImage image(imageWidth, imageHeight, 32);
+ TQImage image(imageWidth, imageHeight, 32);
image.setAlphaBuffer(true);
if(m_canvas == 0)
@@ -376,15 +376,15 @@ QImage SVGPatternElementImpl::createTile(SVGShapeImpl *referencingElement, int i
if(getOverflow())
{
- QPtrList<CanvasItem> items = m_canvas->allItems();
- QRect allItemsBBox;
+ TQPtrList<CanvasItem> items = m_canvas->allItems();
+ TQRect allItemsBBox;
- QPtrListIterator<CanvasItem> it(items);
+ TQPtrListIterator<CanvasItem> it(items);
CanvasItem *item;
while((item = *it) != 0)
{
- QRect bbox = item->bbox();
+ TQRect bbox = item->bbox();
allItemsBBox |= bbox;
++it;
}
@@ -404,7 +404,7 @@ QImage SVGPatternElementImpl::createTile(SVGShapeImpl *referencingElement, int i
{
if(tileX != 0 || tileY !=0)
{
- QPoint panPoint(-(tileX * imageWidth), -(tileY * imageHeight));
+ TQPoint panPoint(-(tileX * imageWidth), -(tileY * imageHeight));
m_canvas->update(panPoint, false);
}
}
@@ -423,7 +423,7 @@ QImage SVGPatternElementImpl::createTile(SVGShapeImpl *referencingElement, int i
return image;
}
-void SVGPatternElementImpl::reference(const QString &href)
+void SVGPatternElementImpl::reference(const TQString &href)
{
// Copy attributes
SVGElementImpl *src = ownerSVGElement()->getElementById(href);
@@ -445,7 +445,7 @@ void SVGPatternElementImpl::finalizePaintServer()
// inside a pattern has finished loading.
m_tileCache.clear();
- QString _href = SVGURIReferenceImpl::getTarget(href()->baseVal().string());
+ TQString _href = SVGURIReferenceImpl::getTarget(href()->baseVal().string());
if(!_href.isEmpty())
reference(_href);
}
@@ -483,8 +483,8 @@ SVGPatternElementImpl::Tile SVGPatternElementImpl::createTile(SVGShapeImpl *refe
if(imageWidth > 0 && imageHeight > 0)
{
- QSize size(imageWidth, imageHeight);
- QImage image;
+ TQSize size(imageWidth, imageHeight);
+ TQImage image;
if(!m_tileCache.find(size, image))
{
@@ -497,7 +497,7 @@ SVGPatternElementImpl::Tile SVGPatternElementImpl::createTile(SVGShapeImpl *refe
double adjustYScale = tileHeight / imageHeight;
matrix->scaleNonUniform(adjustXScale, adjustYScale);
- QWMatrix screenToTile = matrix->qmatrix().invert();
+ TQWMatrix screenToTile = matrix->qmatrix().invert();
tile = Tile(image, screenToTile);
}
diff --git a/ksvg/impl/SVGPatternElementImpl.h b/ksvg/impl/SVGPatternElementImpl.h
index 612fcfae..0c9abc8e 100644
--- a/ksvg/impl/SVGPatternElementImpl.h
+++ b/ksvg/impl/SVGPatternElementImpl.h
@@ -21,8 +21,8 @@
#ifndef SVGPatternElementImpl_H
#define SVGPatternElementImpl_H
-#include <qimage.h>
-#include <qwmatrix.h>
+#include <tqimage.h>
+#include <tqwmatrix.h>
#include "SVGTestsImpl.h"
#include "SVGElementImpl.h"
@@ -72,21 +72,21 @@ public:
SVGUnitConverter *converter() const { return m_converter; }
- void reference(const QString &href);
+ void reference(const TQString &href);
void finalizePaintServer();
class Tile
{
public:
Tile() {}
- Tile(const QImage& image, const QWMatrix& screenToTile) : m_image(image), m_screenToTile(screenToTile) {}
+ Tile(const TQImage& image, const TQWMatrix& screenToTile) : m_image(image), m_screenToTile(screenToTile) {}
- QImage image() const { return m_image; }
- const QWMatrix& screenToTile() const { return m_screenToTile; }
+ TQImage image() const { return m_image; }
+ const TQWMatrix& screenToTile() const { return m_screenToTile; }
private:
- QImage m_image;
- QWMatrix m_screenToTile;
+ TQImage m_image;
+ TQWMatrix m_screenToTile;
};
Tile createTile(SVGShapeImpl *referencingElement);
@@ -94,7 +94,7 @@ public:
static void flushCachedTiles();
private:
- QImage createTile(SVGShapeImpl *referencingElement, int imageWidth, int imageHeight);
+ TQImage createTile(SVGShapeImpl *referencingElement, int imageWidth, int imageHeight);
SVGAnimatedEnumerationImpl *m_patternUnits;
SVGAnimatedEnumerationImpl *m_patternContentUnits;
@@ -108,9 +108,9 @@ private:
KSVGCanvas *m_canvas;
SVGElementImpl *m_location; // the referenced element
- MinOneLRUCache<QSize, QImage> m_tileCache;
+ MinOneLRUCache<TQSize, TQImage> m_tileCache;
- static QValueList<SVGPatternElementImpl *> m_patternElements;
+ static TQValueList<SVGPatternElementImpl *> m_patternElements;
public:
KSVG_GET
diff --git a/ksvg/impl/SVGPreserveAspectRatioImpl.cc b/ksvg/impl/SVGPreserveAspectRatioImpl.cc
index c8660e61..f9e95405 100644
--- a/ksvg/impl/SVGPreserveAspectRatioImpl.cc
+++ b/ksvg/impl/SVGPreserveAspectRatioImpl.cc
@@ -20,8 +20,8 @@
#include <kdebug.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "SVGPreserveAspectRatio.h"
@@ -68,13 +68,13 @@ unsigned short SVGPreserveAspectRatioImpl::meetOrSlice() const
return m_meetOrSlice;
}
-void SVGPreserveAspectRatioImpl::parsePreserveAspectRatio(const QString &str)
+void SVGPreserveAspectRatioImpl::parsePreserveAspectRatio(const TQString &str)
{
// Spec: set the defaults
setAlign(SVG_PRESERVEASPECTRATIO_NONE);
setMeetOrSlice(SVG_MEETORSLICE_MEET);
- QStringList params = QStringList::split(' ', str.simplifyWhiteSpace());
+ TQStringList params = TQStringList::split(' ', str.simplifyWhiteSpace());
if(params[0].compare("none") == 0)
m_align = SVG_PRESERVEASPECTRATIO_NONE;
diff --git a/ksvg/impl/SVGPreserveAspectRatioImpl.h b/ksvg/impl/SVGPreserveAspectRatioImpl.h
index 4a14a6b0..2a768521 100644
--- a/ksvg/impl/SVGPreserveAspectRatioImpl.h
+++ b/ksvg/impl/SVGPreserveAspectRatioImpl.h
@@ -25,7 +25,7 @@
#include "ksvg_lookup.h"
-class QString;
+class TQString;
namespace KSVG
{
@@ -43,7 +43,7 @@ public:
void setMeetOrSlice(unsigned short);
unsigned short meetOrSlice() const;
- void parsePreserveAspectRatio(const QString &);
+ void parsePreserveAspectRatio(const TQString &);
SVGMatrixImpl *getCTM(float logicX, float logicY, float logicWidth, float logicHeight,
float physX, float physY, float physWidth, float physHeight);
diff --git a/ksvg/impl/SVGRadialGradientElementImpl.cc b/ksvg/impl/SVGRadialGradientElementImpl.cc
index 8d00cf15..44ece001 100644
--- a/ksvg/impl/SVGRadialGradientElementImpl.cc
+++ b/ksvg/impl/SVGRadialGradientElementImpl.cc
@@ -192,12 +192,12 @@ void SVGRadialGradientElementImpl::setAttributes()
KSVG_SET_ALT_ATTRIBUTE(R, "50%")
}
-QMap<QString, DOM::DOMString> SVGRadialGradientElementImpl::gradientAttributes()
+TQMap<TQString, DOM::DOMString> SVGRadialGradientElementImpl::gradientAttributes()
{
setAttributes();
- QMap<QString, DOM::DOMString> gradAttributes;
- QDictIterator<DOM::DOMString> it(attributes());
+ TQMap<TQString, DOM::DOMString> gradAttributes;
+ TQDictIterator<DOM::DOMString> it(attributes());
for(; it.current(); ++it)
{
diff --git a/ksvg/impl/SVGRadialGradientElementImpl.h b/ksvg/impl/SVGRadialGradientElementImpl.h
index 2f6c58c1..54edea08 100644
--- a/ksvg/impl/SVGRadialGradientElementImpl.h
+++ b/ksvg/impl/SVGRadialGradientElementImpl.h
@@ -43,7 +43,7 @@ public:
virtual void setAttributes();
- virtual QMap<QString, DOM::DOMString> gradientAttributes();
+ virtual TQMap<TQString, DOM::DOMString> gradientAttributes();
private:
SVGAnimatedLengthImpl *m_cx;
diff --git a/ksvg/impl/SVGRectImpl.cc b/ksvg/impl/SVGRectImpl.cc
index 1f6c0d51..3889ec79 100644
--- a/ksvg/impl/SVGRectImpl.cc
+++ b/ksvg/impl/SVGRectImpl.cc
@@ -20,7 +20,7 @@
#include <kdebug.h>
-#include <qrect.h>
+#include <tqrect.h>
#include "SVGRectImpl.h"
@@ -40,7 +40,7 @@ SVGRectImpl::SVGRectImpl()
m_height = 0;
}
-SVGRectImpl::SVGRectImpl(const QRect &other)
+SVGRectImpl::SVGRectImpl(const TQRect &other)
{
(*this) = other;
}
@@ -89,13 +89,13 @@ float SVGRectImpl::height() const
return m_height;
}
-QRect SVGRectImpl::qrect() const
+TQRect SVGRectImpl::qrect() const
{
// ceil() so the integer rectangle contains the whole real one.
- return QRect(int(m_x), int(m_y), int(ceil(m_width)), int(ceil(m_height)));
+ return TQRect(int(m_x), int(m_y), int(ceil(m_width)), int(ceil(m_height)));
}
-SVGRectImpl &SVGRectImpl::operator=(const QRect &other)
+SVGRectImpl &SVGRectImpl::operator=(const TQRect &other)
{
m_x = other.x();
m_y = other.y();
diff --git a/ksvg/impl/SVGRectImpl.h b/ksvg/impl/SVGRectImpl.h
index e0b0e889..dab7bbcf 100644
--- a/ksvg/impl/SVGRectImpl.h
+++ b/ksvg/impl/SVGRectImpl.h
@@ -25,7 +25,7 @@
#include "ksvg_lookup.h"
-class QRect;
+class TQRect;
namespace KSVG
{
@@ -34,7 +34,7 @@ class SVGRectImpl : public DOM::DomShared
{
public:
SVGRectImpl();
- SVGRectImpl(const QRect &);
+ SVGRectImpl(const TQRect &);
virtual ~SVGRectImpl();
void setX(float x);
@@ -49,9 +49,9 @@ public:
void setHeight(float height);
float height() const;
- QRect qrect() const;
+ TQRect qrect() const;
- SVGRectImpl &operator=(const QRect &);
+ SVGRectImpl &operator=(const TQRect &);
private:
float m_x;
diff --git a/ksvg/impl/SVGSVGElementImpl.cc b/ksvg/impl/SVGSVGElementImpl.cc
index b54cf521..c9b82445 100644
--- a/ksvg/impl/SVGSVGElementImpl.cc
+++ b/ksvg/impl/SVGSVGElementImpl.cc
@@ -20,9 +20,9 @@
#include <kdebug.h>
-#include <qtimer.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqtimer.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
#define USE_VALGRIND 0
@@ -283,7 +283,7 @@ float SVGSVGElementImpl::currentScale() const
return m_currentScale;
}
-void SVGSVGElementImpl::setCurrentTranslate(const QPoint &p)
+void SVGSVGElementImpl::setCurrentTranslate(const TQPoint &p)
{
if(m_currentTranslate->x() != p.x() || m_currentTranslate->y() != p.y())
{
@@ -319,7 +319,7 @@ void SVGSVGElementImpl::forceRedraw()
CALLTREE_ZERO_STATS();
#endif
- QTime timer;
+ TQTime timer;
timer.start();
if(ownerDoc() && ownerDoc()->canvas())
@@ -461,7 +461,7 @@ SVGMatrixImpl *SVGSVGElementImpl::createSVGMatrix()
{
// Spec: Creates an SVGMatrix object outside of any document
// trees. The object is initialized to the identity matrix.
- SVGMatrixImpl *ret = new SVGMatrixImpl(QWMatrix(1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F));
+ SVGMatrixImpl *ret = new SVGMatrixImpl(TQWMatrix(1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F));
ret->ref();
return ret;
}
@@ -503,7 +503,7 @@ SVGElementImpl *SVGSVGElementImpl::getElementById(const DOM::DOMString &elementI
return m_map[elementId.string()];
}
-void SVGSVGElementImpl::addToIdMap(const QString &id, SVGElementImpl *obj)
+void SVGSVGElementImpl::addToIdMap(const TQString &id, SVGElementImpl *obj)
{
m_map.insert(id, obj);
}
@@ -542,15 +542,15 @@ const SVGMatrixImpl *SVGSVGElementImpl::localMatrix()
return m_localMatrix;
}
-void SVGSVGElementImpl::setClip(const QString &clip)
+void SVGSVGElementImpl::setClip(const TQString &clip)
{
// TODO : this routine should probably be shared between all classes that establish new viewports (Rob)
if(!clip.startsWith("rect(") || !clip.endsWith(")"))
return;
- QString work = clip.mid(5, clip.length() - 6);
- QStringList substrings = QStringList::split(',', clip);
- QStringList::ConstIterator it = substrings.begin();
+ TQString work = clip.mid(5, clip.length() - 6);
+ TQStringList substrings = TQStringList::split(',', clip);
+ TQStringList::ConstIterator it = substrings.begin();
if(m_clip[0])
m_clip[0]->deref();
@@ -584,13 +584,13 @@ void SVGSVGElementImpl::setClip(const QString &clip)
m_clip[3]->setValueAsString(*it);
}
-QRect SVGSVGElementImpl::clip()
+TQRect SVGSVGElementImpl::clip()
{
// Get viewport in user coordinates.
- QRect v(0, 0, m_viewport->qrect().width(), m_viewport->qrect().height());
+ TQRect v(0, 0, m_viewport->qrect().width(), m_viewport->qrect().height());
SVGMatrixImpl *ctm = getCTM();
- QRect r = ctm->qmatrix().invert().mapRect(v);
+ TQRect r = ctm->qmatrix().invert().mapRect(v);
ctm->deref();
if(m_clip[0])
@@ -614,14 +614,14 @@ void SVGSVGElementImpl::setRootParentScreenCTM(SVGMatrixImpl *screenCTM)
screenCTM->ref();
}
-bool SVGSVGElementImpl::prepareMouseEvent(const QPoint &p, const QPoint &a, SVGMouseEventImpl *mev)
+bool SVGSVGElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &a, SVGMouseEventImpl *mev)
{
// mop: central bool var which turns to true once the current "mouseover" element has been found
bool ret = false, dorerender = false;
SVGElementImpl *elem = 0;
SVGMatrixImpl *ctm = getCTM();
- QPoint userA = ctm->qmatrix().invert().map(a);
+ TQPoint userA = ctm->qmatrix().invert().map(a);
ctm->deref();
// Just check the lastTarget once (mop)
diff --git a/ksvg/impl/SVGSVGElementImpl.h b/ksvg/impl/SVGSVGElementImpl.h
index 2405458e..d2667a35 100644
--- a/ksvg/impl/SVGSVGElementImpl.h
+++ b/ksvg/impl/SVGSVGElementImpl.h
@@ -23,7 +23,7 @@
#include <dom/dom_string.h>
-#include <qmap.h>
+#include <tqmap.h>
#include "SVGTestsImpl.h"
#include "SVGElementImpl.h"
@@ -91,7 +91,7 @@ public:
float currentScale() const;
SVGPointImpl *currentTranslate();
- void setCurrentTranslate(const QPoint &p);
+ void setCurrentTranslate(const TQPoint &p);
unsigned long suspendRedraw(unsigned long max_wait_milliseconds);
void unsuspendRedraw(unsigned long suspend_handle_id);
@@ -122,19 +122,19 @@ public:
static SVGTransformImpl *createSVGTransformFromMatrix(SVGMatrixImpl *matrix);
SVGElementImpl *getElementById(const DOM::DOMString &elementId);
- void addToIdMap(const QString &id, SVGElementImpl *obj);
+ void addToIdMap(const TQString &id, SVGElementImpl *obj);
virtual SVGMatrixImpl *getCTM();
virtual const SVGMatrixImpl *localMatrix();
void setAttributes();
- bool prepareMouseEvent(const QPoint &p, const QPoint &a, SVGMouseEventImpl *event);
+ bool prepareMouseEvent(const TQPoint &p, const TQPoint &a, SVGMouseEventImpl *event);
virtual bool isContainer() const { return true; }
- virtual void setClip(const QString &clip);
- virtual QRect clip();
+ virtual void setClip(const TQString &clip);
+ virtual TQRect clip();
void setRootParentScreenCTM(SVGMatrixImpl *screenCTM);
@@ -156,7 +156,7 @@ private:
SVGLengthImpl *m_clip[4];
- QMap<QString, SVGElementImpl *> m_map;
+ TQMap<TQString, SVGElementImpl *> m_map;
// Transformation provided by the 'parent' of the outermost svg element
SVGMatrixImpl *m_rootParentScreenCTM;
diff --git a/ksvg/impl/SVGScriptElementImpl.cc b/ksvg/impl/SVGScriptElementImpl.cc
index 9a211425..230adf25 100644
--- a/ksvg/impl/SVGScriptElementImpl.cc
+++ b/ksvg/impl/SVGScriptElementImpl.cc
@@ -22,7 +22,7 @@
#include <kio/job.h>
#include <kfilterdev.h>
-#include <qbuffer.h>
+#include <tqbuffer.h>
#include "SVGDocumentImpl.h"
#include "SVGAnimatedStringImpl.h"
@@ -35,7 +35,7 @@ using namespace KSVG;
#include "ksvg_bridge.h"
#include "ksvg_ecma.h"
-SVGScriptElementImpl::SVGScriptElementImpl(DOM::ElementImpl *impl) : QObject(), SVGElementImpl(impl), SVGURIReferenceImpl(), SVGExternalResourcesRequiredImpl()
+SVGScriptElementImpl::SVGScriptElementImpl(DOM::ElementImpl *impl) : TQObject(), SVGElementImpl(impl), SVGURIReferenceImpl(), SVGExternalResourcesRequiredImpl()
{
KSVG_EMPTY_FLAGS
@@ -66,7 +66,7 @@ void SVGScriptElementImpl::setAttributes()
KSVG_SET_ALT_ATTRIBUTE(Type, "text/ecmascript")
// Remote downloading
- QString href = m_href->baseVal().string();
+ TQString href = m_href->baseVal().string();
if(!href.isEmpty())
{
@@ -75,14 +75,14 @@ void SVGScriptElementImpl::setAttributes()
if(m_job == 0)
m_job = KIO::get(url, false, false);
- connect(m_job, SIGNAL(data(KIO::Job *, const QByteArray &)), this, SLOT(slotData(KIO::Job *, const QByteArray &)));
- connect(m_job, SIGNAL(result(KIO::Job *)), this, SLOT(slotResult(KIO::Job *)));
+ connect(m_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
+ connect(m_job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotResult(KIO::Job *)));
}
}
-void SVGScriptElementImpl::slotData(KIO::Job *, const QByteArray &data)
+void SVGScriptElementImpl::slotData(KIO::Job *, const TQByteArray &data)
{
- QDataStream dataStream(m_data, IO_WriteOnly | IO_Append);
+ TQDataStream dataStream(m_data, IO_WriteOnly | IO_Append);
dataStream.writeRawBytes(data.data(), data.size());
}
@@ -94,13 +94,13 @@ void SVGScriptElementImpl::slotResult(KIO::Job *)
m_data.resize(m_data.size() + 1);
m_data[m_data.size() - 1] = '\0';
- QBuffer buf(m_data);
- QIODevice *dev = KFilterDev::device(&buf, "application/x-gzip", false);
- QByteArray contents;
+ TQBuffer buf(m_data);
+ TQIODevice *dev = KFilterDev::device(&buf, "application/x-gzip", false);
+ TQByteArray contents;
if(dev->open(IO_ReadOnly))
contents = dev->readAll();
delete dev;
- m_text = QString::fromUtf8(contents.data());
+ m_text = TQString::fromUtf8(contents.data());
m_data.resize(0);
}
@@ -124,7 +124,7 @@ bool SVGScriptElementImpl::executeScript(DOM::Node node)
return SVGScriptElementImpl::executeScript(node, ownerDoc(), m_text);
}
-bool SVGScriptElementImpl::executeScript(DOM::Node node, SVGDocumentImpl *document, const QString &text)
+bool SVGScriptElementImpl::executeScript(DOM::Node node, SVGDocumentImpl *document, const TQString &text)
{
#ifdef KJS_VERBOSE
kdDebug(6070) << "SVGScriptElementImpl::executeScript n=" << node.nodeName().string().latin1() << "(" << (node.isNull() ? 0 : node.nodeType()) << ") " << text << endl;
diff --git a/ksvg/impl/SVGScriptElementImpl.h b/ksvg/impl/SVGScriptElementImpl.h
index 95affee2..f3662fa6 100644
--- a/ksvg/impl/SVGScriptElementImpl.h
+++ b/ksvg/impl/SVGScriptElementImpl.h
@@ -25,7 +25,7 @@
#include <kio/jobclasses.h>
-#include <qobject.h>
+#include <tqobject.h>
#include "SVGElementImpl.h"
#include "SVGURIReferenceImpl.h"
@@ -36,7 +36,7 @@
namespace KSVG
{
-class SVGScriptElementImpl : public QObject,
+class SVGScriptElementImpl : public TQObject,
public SVGElementImpl,
public SVGURIReferenceImpl,
public SVGExternalResourcesRequiredImpl
@@ -54,16 +54,16 @@ public:
bool canExecuteScript();
bool executeScript(DOM::Node node);
- static bool executeScript(DOM::Node node, SVGDocumentImpl *document, const QString &text);
+ static bool executeScript(DOM::Node node, SVGDocumentImpl *document, const TQString &text);
private slots:
- void slotData(KIO::Job *, const QByteArray &);
+ void slotData(KIO::Job *, const TQByteArray &);
void slotResult(KIO::Job *);
private:
KIO::TransferJob *m_job;
- QByteArray m_data;
- QString m_text;
+ TQByteArray m_data;
+ TQString m_text;
bool m_added;
public:
diff --git a/ksvg/impl/SVGSetElementImpl.h b/ksvg/impl/SVGSetElementImpl.h
index ab9f5ec5..0a0c050c 100644
--- a/ksvg/impl/SVGSetElementImpl.h
+++ b/ksvg/impl/SVGSetElementImpl.h
@@ -25,7 +25,7 @@
#include "SVGAnimationElementImpl.h"
-class QTimer;
+class TQTimer;
namespace KSVG
{
diff --git a/ksvg/impl/SVGShapeImpl.cc b/ksvg/impl/SVGShapeImpl.cc
index 68e89aaa..d8ef45c5 100644
--- a/ksvg/impl/SVGShapeImpl.cc
+++ b/ksvg/impl/SVGShapeImpl.cc
@@ -77,7 +77,7 @@ SVGRectImpl *SVGShapeImpl::getBBoxInternal()
SVGRectImpl *ret = SVGSVGElementImpl::createSVGRect();
if(m_item)
{
- QRect r = m_item->bbox();
+ TQRect r = m_item->bbox();
ret->setX(r.x());
ret->setY(r.y());
ret->setWidth(r.width());
@@ -86,7 +86,7 @@ SVGRectImpl *SVGShapeImpl::getBBoxInternal()
return ret;
}
-bool SVGShapeImpl::prepareMouseEvent(const QPoint &p, const QPoint &, SVGMouseEventImpl *mev)
+bool SVGShapeImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &, SVGMouseEventImpl *mev)
{
// TODO : pointer-events should be stored here, not in SVGStylableImpl.
SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(this);
diff --git a/ksvg/impl/SVGShapeImpl.h b/ksvg/impl/SVGShapeImpl.h
index ae183251..c61038d2 100644
--- a/ksvg/impl/SVGShapeImpl.h
+++ b/ksvg/impl/SVGShapeImpl.h
@@ -24,7 +24,7 @@
#include "SVGElementImpl.h"
#include "CanvasItem.h"
-class QPoint;
+class TQPoint;
namespace KSVG
{
@@ -43,7 +43,7 @@ public:
virtual SVGRectImpl *getBBox();
virtual SVGRectImpl *getBBoxInternal();
- virtual bool prepareMouseEvent(const QPoint &p, const QPoint &a, SVGMouseEventImpl *mev);
+ virtual bool prepareMouseEvent(const TQPoint &p, const TQPoint &a, SVGMouseEventImpl *mev);
virtual bool directRender();
virtual bool isContainer() const { return false; }
diff --git a/ksvg/impl/SVGStringListImpl.cc b/ksvg/impl/SVGStringListImpl.cc
index b70adfdd..58a0dc0f 100644
--- a/ksvg/impl/SVGStringListImpl.cc
+++ b/ksvg/impl/SVGStringListImpl.cc
@@ -68,11 +68,11 @@ Value SVGStringListImplProtoFunc::call(ExecState *exec, Object &thisObj, const L
return obj->call(exec, static_cast<SVGList<SharedString> *>(obj), args, id);
}
-QString SVGStringListImpl::join(const QString &seperator) const
+TQString SVGStringListImpl::join(const TQString &seperator) const
{
SVGStringListImpl *self = const_cast<SVGStringListImpl *>(this);
- QString result;
+ TQString result;
if(!self->getItem(0))
return result;
diff --git a/ksvg/impl/SVGStringListImpl.h b/ksvg/impl/SVGStringListImpl.h
index 7f69a3c9..8d92b660 100644
--- a/ksvg/impl/SVGStringListImpl.h
+++ b/ksvg/impl/SVGStringListImpl.h
@@ -35,7 +35,7 @@ class SharedString : public DOM::DomShared,
{
public:
SharedString() : DOM::DomShared(), DOM::DOMString() { }
- SharedString(const QString &string) : DOM::DomShared(), DOM::DOMString(string) { }
+ SharedString(const TQString &string) : DOM::DomShared(), DOM::DOMString(string) { }
SharedString(const SharedString &string) : DOM::DomShared(), DOM::DOMString(string) { }
SharedString(DOM::DOMString *string) : DOM::DomShared(), DOM::DOMString(string->implementation()) { }
virtual ~SharedString() { }
@@ -69,7 +69,7 @@ public:
KJS::Value getValueProperty(KJS::ExecState *exec, int token) const;
- QString join(const QString &seperator) const;
+ TQString join(const TQString &seperator) const;
};
}
diff --git a/ksvg/impl/SVGStylableImpl.cc b/ksvg/impl/SVGStylableImpl.cc
index 096ebf93..17a3e8cd 100644
--- a/ksvg/impl/SVGStylableImpl.cc
+++ b/ksvg/impl/SVGStylableImpl.cc
@@ -20,7 +20,7 @@
#include <kdebug.h>
-#include <qrect.h>
+#include <tqrect.h>
#include "CanvasItem.h"
#include "KSVGCanvas.h"
@@ -484,7 +484,7 @@ void SVGStylableImpl::processStyle()
if(parentStyle)
m_startMarker = parentStyle->getStartMarker();
else
- m_startMarker = QString::null;
+ m_startMarker = TQString::null;
}
// Spec: default "none"
@@ -493,7 +493,7 @@ void SVGStylableImpl::processStyle()
if(parentStyle)
m_midMarker = parentStyle->getMidMarker();
else
- m_midMarker = QString::null;
+ m_midMarker = TQString::null;
}
// Spec: default "none"
@@ -502,7 +502,7 @@ void SVGStylableImpl::processStyle()
if(parentStyle)
m_endMarker = parentStyle->getEndMarker();
else
- m_endMarker = QString::null;
+ m_endMarker = TQString::null;
}
}
@@ -526,9 +526,9 @@ bool SVGStylableImpl::isFilled() const
m_fillColor->paintType() != SVG_PAINTTYPE_URI_NONE;
}
-QString SVGStylableImpl::extractUrlId(const QString &url)
+TQString SVGStylableImpl::extractUrlId(const TQString &url)
{
- QString id;
+ TQString id;
if(url.startsWith("url(#"))
{
@@ -541,14 +541,14 @@ QString SVGStylableImpl::extractUrlId(const QString &url)
return id;
}
-void SVGStylableImpl::setMarkers(const QString &marker)
+void SVGStylableImpl::setMarkers(const TQString &marker)
{
setStartMarker(marker);
setMidMarker(marker);
setEndMarker(marker);
}
-void SVGStylableImpl::setStartMarker(const QString &startMarker)
+void SVGStylableImpl::setStartMarker(const TQString &startMarker)
{
if(startMarker.startsWith("url(#"))
{
@@ -556,10 +556,10 @@ void SVGStylableImpl::setStartMarker(const QString &startMarker)
m_startMarker = startMarker.mid(idstart, startMarker.length() - idstart - 1);
}
else if(startMarker == "none")
- m_startMarker = QString::null;
+ m_startMarker = TQString::null;
}
-void SVGStylableImpl::setMidMarker(const QString &midMarker)
+void SVGStylableImpl::setMidMarker(const TQString &midMarker)
{
if(midMarker.startsWith("url(#"))
{
@@ -567,10 +567,10 @@ void SVGStylableImpl::setMidMarker(const QString &midMarker)
m_midMarker = midMarker.mid(idstart, midMarker.length() - idstart - 1);
}
else if(midMarker == "none")
- m_midMarker = QString::null;
+ m_midMarker = TQString::null;
}
-void SVGStylableImpl::setEndMarker(const QString &endMarker)
+void SVGStylableImpl::setEndMarker(const TQString &endMarker)
{
if(endMarker.startsWith("url(#"))
{
@@ -578,7 +578,7 @@ void SVGStylableImpl::setEndMarker(const QString &endMarker)
m_endMarker = endMarker.mid(idstart, endMarker.length() - idstart - 1);
}
else if(endMarker == "none")
- m_endMarker = QString::null;
+ m_endMarker = TQString::null;
}
bool SVGStylableImpl::hasMarkers() const
@@ -586,7 +586,7 @@ bool SVGStylableImpl::hasMarkers() const
return !m_startMarker.isEmpty() || !m_midMarker.isEmpty() || !m_endMarker.isEmpty();
}
-void SVGStylableImpl::setPaint(const QString &param, SVGPaintImpl *svgPaint)
+void SVGStylableImpl::setPaint(const TQString &param, SVGPaintImpl *svgPaint)
{
if(param.stripWhiteSpace() == "none")
svgPaint->setPaint(SVG_PAINTTYPE_NONE, DOM::DOMString(""), DOM::DOMString(""));
@@ -596,48 +596,48 @@ void SVGStylableImpl::setPaint(const QString &param, SVGPaintImpl *svgPaint)
setColor(param, svgPaint);
}
-void SVGStylableImpl::setColor(const QString &param, SVGColorImpl *svgColor)
+void SVGStylableImpl::setColor(const TQString &param, SVGColorImpl *svgColor)
{
if(param.stripWhiteSpace().startsWith("#"))
{
if(param.contains("icc-color"))
{
- QString first = param.left(7);
- QString last = param.right(param.length() - 8);
+ TQString first = param.left(7);
+ TQString last = param.right(param.length() - 8);
svgColor->setRGBColorICCColor(first, last);
}
else
{
- QColor color;
+ TQColor color;
color.setNamedColor(param.stripWhiteSpace());
svgColor->setRGBColor(color);
}
}
else if(param.stripWhiteSpace().startsWith("rgb("))
{
- QString parse = param.stripWhiteSpace();
- QStringList colors = QStringList::split(',', parse);
- QString r = colors[0].right((colors[0].length() - 4));
- QString g = colors[1];
- QString b = colors[2].left((colors[2].length() - 1));
+ TQString parse = param.stripWhiteSpace();
+ TQStringList colors = TQStringList::split(',', parse);
+ TQString r = colors[0].right((colors[0].length() - 4));
+ TQString g = colors[1];
+ TQString b = colors[2].left((colors[2].length() - 1));
if(r.contains("%"))
{
r = r.left(r.length() - 1);
- r = QString::number(int((double(255 * r.toDouble()) / 100.0)));
+ r = TQString::number(int((double(255 * r.toDouble()) / 100.0)));
}
if(g.contains("%"))
{
g = g.left(g.length() - 1);
- g = QString::number(int((double(255 * g.toDouble()) / 100.0)));
+ g = TQString::number(int((double(255 * g.toDouble()) / 100.0)));
}
if(b.contains("%"))
{
b = b.left(b.length() - 1);
- b = QString::number(int((double(255 * b.toDouble()) / 100.0)));
+ b = TQString::number(int((double(255 * b.toDouble()) / 100.0)));
}
svgColor->setRGBColor(int(r.toFloat()), int(g.toFloat()), int(b.toFloat()));
@@ -651,16 +651,16 @@ void SVGStylableImpl::setColor(const QString &param, SVGColorImpl *svgColor)
}
}
-QRect SVGStylableImpl::clip()
+TQRect SVGStylableImpl::clip()
{
- return QRect();
+ return TQRect();
}
-void SVGStylableImpl::setClip(const QString &)
+void SVGStylableImpl::setClip(const TQString &)
{
}
-float SVGStylableImpl::fontSizeForText(const QString &value)
+float SVGStylableImpl::fontSizeForText(const TQString &value)
{
float ret = -1;
@@ -772,7 +772,7 @@ void SVGStylableImpl::putValueProperty(ExecState *exec, int token, const Value &
if(!(attr & KJS::Internal))
return;
- QString param = value.toString(exec).qstring();
+ TQString param = value.toString(exec).qstring();
if (param.isEmpty())
return;
@@ -788,10 +788,10 @@ void SVGStylableImpl::putValueProperty(ExecState *exec, int token, const Value &
if(!m_object)
return;
- QStringList substyles = QStringList::split(';', param);
- for(QStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it)
+ TQStringList substyles = TQStringList::split(';', param);
+ for(TQStringList::Iterator it = substyles.begin(); it != substyles.end(); ++it)
{
- QStringList substyle = QStringList::split(':', (*it));
+ TQStringList substyle = TQStringList::split(':', (*it));
m_object->setAttributeInternal(substyle[0].stripWhiteSpace(), substyle[1].stripWhiteSpace());
}
break;
@@ -946,7 +946,7 @@ void SVGStylableImpl::putValueProperty(ExecState *exec, int token, const Value &
// Hacks
// #1 Replace "'" characters by ""
- param = param.replace('\'', QString::null);
+ param = param.replace('\'', TQString::null);
// #2 Replace "MS-Gothic" by "MS Gothic"
param = param.replace("MS-Gothic", "MS Gothic");
// #3 Replace "Helvetica" by "Arial"
@@ -983,8 +983,8 @@ void SVGStylableImpl::putValueProperty(ExecState *exec, int token, const Value &
{
// CSS2 allows multiple decorations
m_textDecoration = TDNONE;
- QStringList decorations = QStringList::split(' ', param);
- for(QStringList::Iterator it = decorations.begin(); it != decorations.end(); ++it)
+ TQStringList decorations = TQStringList::split(' ', param);
+ for(TQStringList::Iterator it = decorations.begin(); it != decorations.end(); ++it)
{
if(*it == "underline")
m_textDecoration |= UNDERLINE;
diff --git a/ksvg/impl/SVGStylableImpl.h b/ksvg/impl/SVGStylableImpl.h
index 0a399a4c..50a37568 100644
--- a/ksvg/impl/SVGStylableImpl.h
+++ b/ksvg/impl/SVGStylableImpl.h
@@ -21,14 +21,14 @@
#ifndef SVGStylableImpl_H
#define SVGStylableImpl_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <dom/dom_string.h>
#include "ksvg_lookup.h"
-class QRect;
+class TQRect;
// from libart, but now no dependency
typedef enum
@@ -210,7 +210,7 @@ public:
SVGStylableImpl(SVGElementImpl *object);
virtual ~SVGStylableImpl();
- static void setColor(const QString &, SVGColorImpl *);
+ static void setColor(const TQString &, SVGColorImpl *);
STYLE_GET(SVGAnimatedLengthImpl *, DashOffset, m_dashOffset)
STYLE_GET(SVGAnimatedLengthListImpl *, DashArray, m_dashArray)
@@ -221,17 +221,17 @@ public:
STYLE_GET(SVGAnimatedLengthImpl *, StrokeWidth, m_strokeWidth)
STYLE_GET(SVGStringListImpl *, FontFamily, m_fontFamily);
STYLE_GET(float, FontSize, m_fontSize)
- STYLE_GET(QString, LetterSpacing, m_letterSpacing)
- STYLE_GET(QString, WordSpacing, m_wordSpacing)
- STYLE_GET(QString, FontWeight, m_fontWeight)
- STYLE_GET(QString, ClipPath, m_clipPath)
- STYLE_GET(QString, Mask, m_mask)
- STYLE_GET(QString, StartMarker, m_startMarker)
- STYLE_GET(QString, MidMarker, m_midMarker)
- STYLE_GET(QString, EndMarker, m_endMarker)
- STYLE_GET(QString, BaselineShift, m_baselineShift)
- STYLE_GET(QString, GlyphOrientationVertical, m_glyphOrientationVertical)
- STYLE_GET(QString, GlyphOrientationHorizontal, m_glyphOrientationHorizontal)
+ STYLE_GET(TQString, LetterSpacing, m_letterSpacing)
+ STYLE_GET(TQString, WordSpacing, m_wordSpacing)
+ STYLE_GET(TQString, FontWeight, m_fontWeight)
+ STYLE_GET(TQString, ClipPath, m_clipPath)
+ STYLE_GET(TQString, Mask, m_mask)
+ STYLE_GET(TQString, StartMarker, m_startMarker)
+ STYLE_GET(TQString, MidMarker, m_midMarker)
+ STYLE_GET(TQString, EndMarker, m_endMarker)
+ STYLE_GET(TQString, BaselineShift, m_baselineShift)
+ STYLE_GET(TQString, GlyphOrientationVertical, m_glyphOrientationVertical)
+ STYLE_GET(TQString, GlyphOrientationHorizontal, m_glyphOrientationHorizontal)
STYLE_GET(float, Opacity, m_opacity)
STYLE_GET(float, FillOpacity, m_fillOpacity)
STYLE_GET(float, StrokeOpacity, m_strokeOpacity)
@@ -261,10 +261,10 @@ public:
STYLE_HAS(EndMarker, m_endMarker)
// Special "set" cases
- void setStartMarker(const QString &);
- void setMidMarker(const QString &);
- void setEndMarker(const QString &);
- void setMarkers(const QString &);
+ void setStartMarker(const TQString &);
+ void setMidMarker(const TQString &);
+ void setEndMarker(const TQString &);
+ void setMarkers(const TQString &);
// Special "has" cases
bool hasMarkers() const;
@@ -277,17 +277,17 @@ public:
void processStyle();
// Special virtual functions
- virtual void setClip(const QString &clip);
- virtual QRect clip();
+ virtual void setClip(const TQString &clip);
+ virtual TQRect clip();
protected:
- float fontSizeForText(const QString &);
+ float fontSizeForText(const TQString &);
SVGElementImpl *m_object;
private:
- void setPaint(const QString &, SVGPaintImpl *);
- QString extractUrlId(const QString& string);
+ void setPaint(const TQString &, SVGPaintImpl *);
+ TQString extractUrlId(const TQString& string);
unsigned long long m_flags;
diff --git a/ksvg/impl/SVGTRefElementImpl.cc b/ksvg/impl/SVGTRefElementImpl.cc
index c1c7e540..73cb2532 100644
--- a/ksvg/impl/SVGTRefElementImpl.cc
+++ b/ksvg/impl/SVGTRefElementImpl.cc
@@ -46,9 +46,9 @@ void SVGTRefElementImpl::setAttributes()
href()->setBaseVal(DOM::DOMString(SVGURIReferenceImpl::getTarget(_href.string())));
// get the text of the referenced element
- QString text;
+ TQString text;
- QString url = _href.string().stripWhiteSpace(), filename, id;
+ TQString url = _href.string().stripWhiteSpace(), filename, id;
if(!SVGURIReferenceImpl::parseURIReference(url, filename, id))
return;
diff --git a/ksvg/impl/SVGTSpanElementImpl.cc b/ksvg/impl/SVGTSpanElementImpl.cc
index 7265c66e..2d3fef15 100644
--- a/ksvg/impl/SVGTSpanElementImpl.cc
+++ b/ksvg/impl/SVGTSpanElementImpl.cc
@@ -44,7 +44,7 @@ long SVGTSpanElementImpl::getNumberOfChars()
return text().length();
}
-QString SVGTSpanElementImpl::text()
+TQString SVGTSpanElementImpl::text()
{
// Otherwhise some js scripts which require a child, don't work (Niko)
if(!hasChildNodes())
diff --git a/ksvg/impl/SVGTSpanElementImpl.h b/ksvg/impl/SVGTSpanElementImpl.h
index 26e4903d..631b7896 100644
--- a/ksvg/impl/SVGTSpanElementImpl.h
+++ b/ksvg/impl/SVGTSpanElementImpl.h
@@ -34,7 +34,7 @@ public:
SVGTSpanElementImpl(DOM::ElementImpl *);
virtual ~SVGTSpanElementImpl();
- QString text();
+ TQString text();
virtual long getNumberOfChars();
diff --git a/ksvg/impl/SVGTestsImpl.cc b/ksvg/impl/SVGTestsImpl.cc
index 8bbccf80..b88de60a 100644
--- a/ksvg/impl/SVGTestsImpl.cc
+++ b/ksvg/impl/SVGTestsImpl.cc
@@ -52,17 +52,17 @@ SVGTestsImpl::~SVGTestsImpl()
m_systemLanguage->deref();
}
-void SVGTestsImpl::parseRequiredFeatures(const QString &/*value*/)
+void SVGTestsImpl::parseRequiredFeatures(const TQString &/*value*/)
{
// FIXME
}
-void SVGTestsImpl::parseRequiredExtensions(const QString &value)
+void SVGTestsImpl::parseRequiredExtensions(const TQString &value)
{
m_requiredExtensions->appendItem(new SharedString(value));
}
-void SVGTestsImpl::parseSystemLanguage(const QString &value)
+void SVGTestsImpl::parseSystemLanguage(const TQString &value)
{
m_systemLanguage->appendItem(new SharedString(value));
}
@@ -91,7 +91,7 @@ bool SVGTestsImpl::ok()
}
for(unsigned int i = 0;i < m_systemLanguage->numberOfItems();i++)
{
- QString value = m_systemLanguage->getItem(i)->string();
+ TQString value = m_systemLanguage->getItem(i)->string();
if(value.isEmpty() || value != (KGlobal::locale()->language()).left(2))
return false;
}
diff --git a/ksvg/impl/SVGTestsImpl.h b/ksvg/impl/SVGTestsImpl.h
index c5b05a5f..25c0e02b 100644
--- a/ksvg/impl/SVGTestsImpl.h
+++ b/ksvg/impl/SVGTestsImpl.h
@@ -35,9 +35,9 @@ public:
SVGTestsImpl();
~SVGTestsImpl();
- void parseRequiredFeatures(const QString &value);
- void parseRequiredExtensions(const QString &value);
- void parseSystemLanguage(const QString &value);
+ void parseRequiredFeatures(const TQString &value);
+ void parseRequiredExtensions(const TQString &value);
+ void parseSystemLanguage(const TQString &value);
SVGStringListImpl *requiredFeatures() const;
SVGStringListImpl *requiredExtensions() const;
diff --git a/ksvg/impl/SVGTextContentElementImpl.cc b/ksvg/impl/SVGTextContentElementImpl.cc
index f51d8807..302b54b7 100644
--- a/ksvg/impl/SVGTextContentElementImpl.cc
+++ b/ksvg/impl/SVGTextContentElementImpl.cc
@@ -59,9 +59,9 @@ SVGTextContentElementImpl::~SVGTextContentElementImpl()
m_textLength->deref();
}
-QString SVGTextContentElementImpl::textDirectionAwareText()
+TQString SVGTextContentElementImpl::textDirectionAwareText()
{
- QString text;
+ TQString text;
if(hasChildNodes())
{
@@ -73,11 +73,11 @@ QString SVGTextContentElementImpl::textDirectionAwareText()
if(node.nodeType() == TEXT_NODE)
{
DOM::Text textNode = node;
- QString temp = textNode.data().string();
+ TQString temp = textNode.data().string();
if(!ltr)
{
- QString convert = temp;
+ TQString convert = temp;
for(int i = temp.length(); i > 0; i--)
convert[temp.length() - i] = temp[i - 1];
@@ -237,7 +237,7 @@ void SVGTextContentElementImpl::putValueProperty(ExecState *exec, int token, con
break;
case LengthAdjust:
{
- QString temp = value.toString(exec).qstring();
+ TQString temp = value.toString(exec).qstring();
if(temp == "spacingAndGlyphs")
m_lengthAdjust->setBaseVal(LENGTHADJUST_SPACINGANDGLYPHS);
else if(temp == "spacing")
diff --git a/ksvg/impl/SVGTextContentElementImpl.h b/ksvg/impl/SVGTextContentElementImpl.h
index 26bbc041..bd962037 100644
--- a/ksvg/impl/SVGTextContentElementImpl.h
+++ b/ksvg/impl/SVGTextContentElementImpl.h
@@ -50,7 +50,7 @@ public:
SVGTextContentElementImpl(DOM::ElementImpl *impl);
virtual ~SVGTextContentElementImpl();
- QString textDirectionAwareText();
+ TQString textDirectionAwareText();
virtual T2P::GlyphLayoutParams *layoutParams() const;
diff --git a/ksvg/impl/SVGTextElementImpl.cc b/ksvg/impl/SVGTextElementImpl.cc
index 634c227d..82a53ea9 100644
--- a/ksvg/impl/SVGTextElementImpl.cc
+++ b/ksvg/impl/SVGTextElementImpl.cc
@@ -49,7 +49,7 @@ long SVGTextElementImpl::getNumberOfChars()
return text().length();
}
-QString SVGTextElementImpl::text()
+TQString SVGTextElementImpl::text()
{
// Otherwhise some js scripts which require a child, don't work (Niko)
if(!hasChildNodes())
@@ -80,7 +80,7 @@ void SVGTextElementImpl::createItem(KSVGCanvas *c )
{
m_item = c->createText(this);
// Set up bbox before insert(), as that may render the item
- QRect rect = m_item->bbox();
+ TQRect rect = m_item->bbox();
m_bboxX = rect.x();
m_bboxY = rect.y();
m_bboxWidth = rect.width();
@@ -89,7 +89,7 @@ void SVGTextElementImpl::createItem(KSVGCanvas *c )
}
}
-bool SVGTextElementImpl::prepareMouseEvent(const QPoint &p, const QPoint &, SVGMouseEventImpl *mev)
+bool SVGTextElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &, SVGMouseEventImpl *mev)
{
// TODO : pointer-events should be stored here, not in SVGStylableImpl.
SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(this);
diff --git a/ksvg/impl/SVGTextElementImpl.h b/ksvg/impl/SVGTextElementImpl.h
index e0c2ca8d..fe87848a 100644
--- a/ksvg/impl/SVGTextElementImpl.h
+++ b/ksvg/impl/SVGTextElementImpl.h
@@ -37,7 +37,7 @@ public:
SVGTextElementImpl(DOM::ElementImpl *);
virtual ~SVGTextElementImpl();
- QString text();
+ TQString text();
virtual long getNumberOfChars();
@@ -45,7 +45,7 @@ public:
virtual SVGRectImpl *getBBox();
- virtual bool prepareMouseEvent(const QPoint &p, const QPoint &a, SVGMouseEventImpl *mev);
+ virtual bool prepareMouseEvent(const TQPoint &p, const TQPoint &a, SVGMouseEventImpl *mev);
private:
int m_bboxX, m_bboxY, m_bboxWidth, m_bboxHeight;
diff --git a/ksvg/impl/SVGTextPathElementImpl.cc b/ksvg/impl/SVGTextPathElementImpl.cc
index ec218046..78c272f8 100644
--- a/ksvg/impl/SVGTextPathElementImpl.cc
+++ b/ksvg/impl/SVGTextPathElementImpl.cc
@@ -75,7 +75,7 @@ SVGAnimatedEnumerationImpl *SVGTextPathElementImpl::spacing() const
return m_spacing;
}
-QString SVGTextPathElementImpl::text()
+TQString SVGTextPathElementImpl::text()
{
// Otherwhise some js scripts which require a child, don't work (Niko)
if(!hasChildNodes())
@@ -161,11 +161,11 @@ void SVGTextPathElementImpl::putValueProperty(ExecState *exec, int token, const
{
case StartOffset:
{
- QString param = value.toString(exec).qstring();
+ TQString param = value.toString(exec).qstring();
if(param.endsWith("%"))
{
- QString value = param.left(param.length() - 1);
+ TQString value = param.left(param.length() - 1);
bool ok = false;
double dValue = value.toDouble(&ok);
if(ok)
@@ -182,7 +182,7 @@ void SVGTextPathElementImpl::putValueProperty(ExecState *exec, int token, const
}
case Method:
{
- QString param = value.toString(exec).qstring();
+ TQString param = value.toString(exec).qstring();
if(param == "align")
method()->setBaseVal(TEXTPATH_METHODTYPE_ALIGN);
@@ -195,7 +195,7 @@ void SVGTextPathElementImpl::putValueProperty(ExecState *exec, int token, const
}
case Spacing:
{
- QString param = value.toString(exec).qstring();
+ TQString param = value.toString(exec).qstring();
if(param == "auto")
spacing()->setBaseVal(TEXTPATH_SPACINGTYPE_AUTO);
diff --git a/ksvg/impl/SVGTextPathElementImpl.h b/ksvg/impl/SVGTextPathElementImpl.h
index 8231f0cd..98a88d33 100644
--- a/ksvg/impl/SVGTextPathElementImpl.h
+++ b/ksvg/impl/SVGTextPathElementImpl.h
@@ -34,7 +34,7 @@ public:
SVGTextPathElementImpl(DOM::ElementImpl *);
virtual ~SVGTextPathElementImpl();
- QString text();
+ TQString text();
SVGAnimatedLengthImpl *startOffset() const;
SVGAnimatedEnumerationImpl *method() const;
diff --git a/ksvg/impl/SVGTimeScheduler.cc b/ksvg/impl/SVGTimeScheduler.cc
index efff77ac..caddf81f 100644
--- a/ksvg/impl/SVGTimeScheduler.cc
+++ b/ksvg/impl/SVGTimeScheduler.cc
@@ -26,11 +26,11 @@
using namespace KSVG;
-SVGTimer::SVGTimer(QObject *scheduler, unsigned int ms, bool singleShot)
+SVGTimer::SVGTimer(TQObject *scheduler, unsigned int ms, bool singleShot)
{
m_ms = ms;
m_singleShot = singleShot;
- m_timer = new QTimer(scheduler);
+ m_timer = new TQTimer(scheduler);
}
SVGTimer::~SVGTimer()
@@ -38,19 +38,19 @@ SVGTimer::~SVGTimer()
delete m_timer;
}
-bool SVGTimer::operator==(const QTimer *timer)
+bool SVGTimer::operator==(const TQTimer *timer)
{
return (m_timer == timer);
}
-const QTimer *SVGTimer::qtimer() const
+const TQTimer *SVGTimer::qtimer() const
{
return m_timer;
}
-void SVGTimer::start(QObject *receiver, const char *member)
+void SVGTimer::start(TQObject *receiver, const char *member)
{
- QObject::connect(m_timer, SIGNAL(timeout()), receiver, member);
+ TQObject::connect(m_timer, TQT_SIGNAL(timeout()), receiver, member);
m_timer->start(m_ms, m_singleShot);
}
@@ -79,7 +79,7 @@ void SVGTimer::notifyAll()
if(m_notifyList.isEmpty())
return;
- QValueList<SVGElementImpl *> elements;
+ TQValueList<SVGElementImpl *> elements;
for(unsigned int i = m_notifyList.count();i > 0; i--)
{
SVGElementImpl *element = m_notifyList[i - 1];
@@ -98,7 +98,7 @@ void SVGTimer::notifyAll()
}
// Optimized update logic (to avoid 4 updates, on the same element)
- QValueList<SVGElementImpl *>::iterator it2;
+ TQValueList<SVGElementImpl *>::iterator it2;
for(it2 = elements.begin(); it2 != elements.end(); ++it2)
{
SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(*it2);
@@ -122,7 +122,7 @@ void SVGTimer::removeNotify(SVGElementImpl *element)
const unsigned int SVGTimeScheduler::staticTimerInterval = 15; // milliseconds
-SVGTimeScheduler::SVGTimeScheduler(SVGDocumentImpl *doc) : QObject(), m_doc(doc)
+SVGTimeScheduler::SVGTimeScheduler(SVGDocumentImpl *doc) : TQObject(), m_doc(doc)
{
// Create static interval timers but don't start it yet!
m_intervalTimer = new SVGTimer(this, staticTimerInterval, false);
@@ -165,7 +165,7 @@ void SVGTimeScheduler::startAnimations()
{
SVGTimer *svgTimer = *it;
if(svgTimer && !svgTimer->isActive())
- svgTimer->start(this, SLOT(slotTimerNotify()));
+ svgTimer->start(this, TQT_SLOT(slotTimerNotify()));
}
}
@@ -174,7 +174,7 @@ void SVGTimeScheduler::toggleAnimations()
if(m_intervalTimer->isActive())
m_intervalTimer->stop();
else
- m_intervalTimer->start(this, SLOT(slotTimerNotify()));
+ m_intervalTimer->start(this, TQT_SLOT(slotTimerNotify()));
}
bool SVGTimeScheduler::animationsPaused() const
@@ -184,7 +184,7 @@ bool SVGTimeScheduler::animationsPaused() const
void SVGTimeScheduler::slotTimerNotify()
{
- QTimer *senderTimer = const_cast<QTimer *>(static_cast<const QTimer *>(sender()));
+ TQTimer *senderTimer = const_cast<TQTimer *>(static_cast<const TQTimer *>(sender()));
SVGTimer *svgTimer = 0;
SVGTimerList::iterator it;
@@ -223,7 +223,7 @@ void SVGTimeScheduler::slotTimerNotify()
// by the previous call, and now all connections to the interval timer
// are created and now we just need to fire that timer (Niko)
if(svgTimer != m_intervalTimer && !m_intervalTimer->isActive())
- m_intervalTimer->start(this, SLOT(slotTimerNotify()));
+ m_intervalTimer->start(this, TQT_SLOT(slotTimerNotify()));
}
float SVGTimeScheduler::elapsed() const
diff --git a/ksvg/impl/SVGTimeScheduler.h b/ksvg/impl/SVGTimeScheduler.h
index ae4c6d37..52f9c9b9 100644
--- a/ksvg/impl/SVGTimeScheduler.h
+++ b/ksvg/impl/SVGTimeScheduler.h
@@ -21,10 +21,10 @@
#ifndef SVGTimeScheduler_H
#define SVGTimeScheduler_H
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
#include "SVGElementImpl.h"
#include "SVGAnimationElementImpl.h"
@@ -32,17 +32,17 @@
namespace KSVG
{
-typedef QValueList<SVGElementImpl *> SVGNotifyList;
+typedef TQValueList<SVGElementImpl *> SVGNotifyList;
class SVGTimer
{
public:
- SVGTimer(QObject *scheduler, unsigned int ms, bool singleShot);
+ SVGTimer(TQObject *scheduler, unsigned int ms, bool singleShot);
~SVGTimer();
- bool operator==(const QTimer *timer);
- const QTimer *qtimer() const;
+ bool operator==(const TQTimer *timer);
+ const TQTimer *qtimer() const;
- void start(QObject *receiver, const char *member);
+ void start(TQObject *receiver, const char *member);
void stop();
bool isActive() const;
@@ -58,11 +58,11 @@ private:
unsigned int m_ms;
bool m_invoked, m_singleShot;
- QTimer *m_timer;
+ TQTimer *m_timer;
SVGNotifyList m_notifyList;
};
-typedef QValueList<SVGTimer *> SVGTimerList;
+typedef TQValueList<SVGTimer *> SVGTimerList;
class SVGDocumentImpl;
class SVGTimeScheduler : public QObject
{
@@ -94,7 +94,7 @@ private:
SVGDocumentImpl *m_doc;
SVGTimerList m_timerList;
SVGTimer *m_intervalTimer;
- QTime m_creationTime;
+ TQTime m_creationTime;
};
}
diff --git a/ksvg/impl/SVGTransformImpl.cc b/ksvg/impl/SVGTransformImpl.cc
index 53ea9bf3..5b2d754a 100644
--- a/ksvg/impl/SVGTransformImpl.cc
+++ b/ksvg/impl/SVGTransformImpl.cc
@@ -120,27 +120,27 @@ void SVGTransformImpl::setSkewY(double angle)
m_matrix->skewY(angle);
}
-QString SVGTransformImpl::toString() const
+TQString SVGTransformImpl::toString() const
{
switch (m_type)
{
case SVG_TRANSFORM_UNKNOWN:
- return QString();
+ return TQString();
case SVG_TRANSFORM_MATRIX:
- return QString("matrix(" + QString::number(m_matrix->a()) + " " + QString::number(m_matrix->b()) + " " + QString::number(m_matrix->c()) + " " + QString::number(m_matrix->d()) + " " + QString::number(m_matrix->e()) + " " + QString::number(m_matrix->f()) + ")");
+ return TQString("matrix(" + TQString::number(m_matrix->a()) + " " + TQString::number(m_matrix->b()) + " " + TQString::number(m_matrix->c()) + " " + TQString::number(m_matrix->d()) + " " + TQString::number(m_matrix->e()) + " " + TQString::number(m_matrix->f()) + ")");
case SVG_TRANSFORM_TRANSLATE:
- return QString("translate(" + QString::number(m_matrix->e()) + " " + QString::number(m_matrix->f()) + ")");
+ return TQString("translate(" + TQString::number(m_matrix->e()) + " " + TQString::number(m_matrix->f()) + ")");
case SVG_TRANSFORM_SCALE:
- return QString("scale(" + QString::number(m_matrix->a()) + " " + QString::number(m_matrix->d()) + ")");
+ return TQString("scale(" + TQString::number(m_matrix->a()) + " " + TQString::number(m_matrix->d()) + ")");
case SVG_TRANSFORM_ROTATE:
- return QString("rotate(" + QString::number(m_angle) + " " + QString::number(m_cx) + " " + QString::number(m_cy) + ")");
+ return TQString("rotate(" + TQString::number(m_angle) + " " + TQString::number(m_cx) + " " + TQString::number(m_cy) + ")");
case SVG_TRANSFORM_SKEWX:
- return QString("skewX(" + QString::number(m_angle) + ")");
+ return TQString("skewX(" + TQString::number(m_angle) + ")");
case SVG_TRANSFORM_SKEWY:
- return QString("skewY(" + QString::number(m_angle) + ")");
+ return TQString("skewY(" + TQString::number(m_angle) + ")");
default:
kdWarning() << "Unknown transform type " << m_type << endl;
- return QString();
+ return TQString();
}
}
diff --git a/ksvg/impl/SVGTransformImpl.h b/ksvg/impl/SVGTransformImpl.h
index 69d71b8f..c52ffdf2 100644
--- a/ksvg/impl/SVGTransformImpl.h
+++ b/ksvg/impl/SVGTransformImpl.h
@@ -26,7 +26,7 @@
#include "ksvg_lookup.h"
-class QString;
+class TQString;
namespace KSVG
{
@@ -51,7 +51,7 @@ public:
void setSkewX(double);
void setSkewY(double);
- QString toString() const;
+ TQString toString() const;
private:
// mop: we have to store the optional rotate stuff :( anyone with a better solution please fix that ;)
diff --git a/ksvg/impl/SVGTransformableImpl.h b/ksvg/impl/SVGTransformableImpl.h
index edff5831..0ccd4908 100644
--- a/ksvg/impl/SVGTransformableImpl.h
+++ b/ksvg/impl/SVGTransformableImpl.h
@@ -21,7 +21,7 @@
#ifndef SVGTransformableImpl_H
#define SVGTransformableImpl_H
-#include <qstring.h>
+#include <tqstring.h>
#include "SVGLocatableImpl.h"
diff --git a/ksvg/impl/SVGURIReferenceImpl.cc b/ksvg/impl/SVGURIReferenceImpl.cc
index a68b7442..8a6fda76 100644
--- a/ksvg/impl/SVGURIReferenceImpl.cc
+++ b/ksvg/impl/SVGURIReferenceImpl.cc
@@ -48,7 +48,7 @@ SVGAnimatedStringImpl *SVGURIReferenceImpl::href() const
return m_href;
}
-bool SVGURIReferenceImpl::parseURIReference(const QString &urireference, QString &uri, QString &elementreference)
+bool SVGURIReferenceImpl::parseURIReference(const TQString &urireference, TQString &uri, TQString &elementreference)
{
int seperator = urireference.find("#");
@@ -61,13 +61,13 @@ bool SVGURIReferenceImpl::parseURIReference(const QString &urireference, QString
return true;
}
-bool SVGURIReferenceImpl::isUrl(const QString &url)
+bool SVGURIReferenceImpl::isUrl(const TQString &url)
{
- QString temp = url.stripWhiteSpace();
+ TQString temp = url.stripWhiteSpace();
return temp.startsWith("url(#") && temp.endsWith(")");
}
-QString SVGURIReferenceImpl::getTarget(const QString &url)
+TQString SVGURIReferenceImpl::getTarget(const TQString &url)
{
if(url.startsWith("url(")) // URI References, ie. fill:url(#target)
{
diff --git a/ksvg/impl/SVGURIReferenceImpl.h b/ksvg/impl/SVGURIReferenceImpl.h
index d6ee42c5..8d6500b0 100644
--- a/ksvg/impl/SVGURIReferenceImpl.h
+++ b/ksvg/impl/SVGURIReferenceImpl.h
@@ -23,7 +23,7 @@
#include "ksvg_lookup.h"
-class QString;
+class TQString;
namespace KSVG
{
@@ -36,9 +36,9 @@ public:
~SVGURIReferenceImpl();
SVGAnimatedStringImpl *href() const;
- static QString getTarget(const QString &url);
- static bool isUrl(const QString &url);
- static bool parseURIReference(const QString &urireference, QString &uri, QString &elementreference);
+ static TQString getTarget(const TQString &url);
+ static bool isUrl(const TQString &url);
+ static bool parseURIReference(const TQString &urireference, TQString &uri, TQString &elementreference);
protected:
SVGAnimatedStringImpl *m_href;
diff --git a/ksvg/impl/SVGUnitConverter.h b/ksvg/impl/SVGUnitConverter.h
index 90c95796..78eb2528 100644
--- a/ksvg/impl/SVGUnitConverter.h
+++ b/ksvg/impl/SVGUnitConverter.h
@@ -21,7 +21,7 @@
#ifndef SVGUnitConverter_H
#define SVGUnitConverter_H
-#include <qptrdict.h>
+#include <tqptrdict.h>
#include <dom/dom_string.h>
@@ -41,12 +41,12 @@ public:
void add(SVGAnimatedLengthImpl *obj)
{
UnitData *data = new UnitData();
- data->valueAsString = QString::null;
+ data->valueAsString = TQString::null;
m_dict.insert(obj, data);
}
- void modify(SVGAnimatedLengthImpl *obj, const QString &value)
+ void modify(SVGAnimatedLengthImpl *obj, const TQString &value)
{
UnitData *data = m_dict.find(obj);
@@ -62,7 +62,7 @@ public:
if(!user && !bbox) // Invalid unit type
return;
- QPtrDictIterator<UnitData> it(m_dict);
+ TQPtrDictIterator<UnitData> it(m_dict);
for(; it.current(); ++it)
{
UnitData *data = it.current();
@@ -87,10 +87,10 @@ public:
private:
typedef struct
{
- QString valueAsString; // Original value
+ TQString valueAsString; // Original value
} UnitData;
- QPtrDict<UnitData> m_dict;
+ TQPtrDict<UnitData> m_dict;
};
}
diff --git a/ksvg/impl/SVGUseElementImpl.cc b/ksvg/impl/SVGUseElementImpl.cc
index 3bd38a42..457436cb 100644
--- a/ksvg/impl/SVGUseElementImpl.cc
+++ b/ksvg/impl/SVGUseElementImpl.cc
@@ -20,7 +20,7 @@
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "KSVGLoader.h"
#include "KSVGCanvas.h"
@@ -169,7 +169,7 @@ void SVGUseElementImpl::putValueProperty(ExecState *exec, int token, const Value
break;
case Href:
{
- QString url = value.toString(exec).qstring();
+ TQString url = value.toString(exec).qstring();
href()->setBaseVal(SVGURIReferenceImpl::getTarget(url));
break;
}
@@ -212,7 +212,7 @@ void SVGUseElementImpl::createItem(KSVGCanvas *c)
{
// ownerSVGElement()->getElementById() is wrong here.
// It could reference elements from other documents when using getURL (Niko)
- QString filename, id;
+ TQString filename, id;
DOM::DOMString url = getAttribute("href");
if(!SVGURIReferenceImpl::parseURIReference(url.string(), filename, id))
return;
@@ -223,7 +223,7 @@ void SVGUseElementImpl::createItem(KSVGCanvas *c)
KURL fragmentUrl(ownerDoc()->baseUrl(), url.string());
id = fragmentUrl.ref();
- fragmentUrl.setRef(QString::null);
+ fragmentUrl.setRef(TQString::null);
orig = KSVGLoader::getSVGFragment(fragmentUrl, ownerDoc(), id);
}
@@ -250,11 +250,11 @@ void SVGUseElementImpl::createItem(KSVGCanvas *c)
SVGElementImpl *clone = orig->cloneNode(true);
// Apply the use-correction
- QString trans;
+ TQString trans;
trans += " translate(";
- trans += QString::number(x()->baseVal()->value());
+ trans += TQString::number(x()->baseVal()->value());
trans += " ";
- trans += QString::number(y()->baseVal()->value());
+ trans += TQString::number(y()->baseVal()->value());
trans += ")";
// Apply the transform attribute and render the element
@@ -304,7 +304,7 @@ void SVGUseElementImpl::createItem(KSVGCanvas *c)
dynamic_cast<SVGLocatableImpl *>(parent)->updateCachedScreenCTM(screenCTM());
// Redirect local ecma event handlers to the correspondingElement
- QPtrListIterator<SVGRegisteredEventListener> it(eventListeners());
+ TQPtrListIterator<SVGRegisteredEventListener> it(eventListeners());
SVGRegisteredEventListener *eventListener;
while((eventListener = it.current()) != 0)
{
diff --git a/ksvg/impl/SVGViewSpecImpl.cc b/ksvg/impl/SVGViewSpecImpl.cc
index 07412cc5..6a225626 100644
--- a/ksvg/impl/SVGViewSpecImpl.cc
+++ b/ksvg/impl/SVGViewSpecImpl.cc
@@ -20,7 +20,7 @@
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "SVGElementImpl.h"
#include "SVGViewSpecImpl.h"
@@ -75,15 +75,15 @@ DOM::DOMString SVGViewSpecImpl::viewTargetString() const
return m_viewTargetString;
}
-bool SVGViewSpecImpl::parseViewSpec(const QString &s)
+bool SVGViewSpecImpl::parseViewSpec(const TQString &s)
{
if(!s.startsWith("svgView("))
return false;
// remove 'svgView(' and ')'
- QStringList subAttrs = QStringList::split(';', s.mid(8));
+ TQStringList subAttrs = TQStringList::split(';', s.mid(8));
- for(QStringList::ConstIterator it = subAttrs.begin() ; it != subAttrs.end(); ++it)
+ for(TQStringList::ConstIterator it = subAttrs.begin() ; it != subAttrs.end(); ++it)
{
if((*it).startsWith("viewBox("))
m_viewBoxString = (*it).mid(8);
diff --git a/ksvg/impl/SVGViewSpecImpl.h b/ksvg/impl/SVGViewSpecImpl.h
index f9e01e48..2bdf849b 100644
--- a/ksvg/impl/SVGViewSpecImpl.h
+++ b/ksvg/impl/SVGViewSpecImpl.h
@@ -47,7 +47,7 @@ public:
DOM::DOMString transformString() const;
DOM::DOMString viewTargetString() const;
- bool parseViewSpec(const QString &);
+ bool parseViewSpec(const TQString &);
private:
SVGTransformListImpl *m_transform;
diff --git a/ksvg/impl/SVGWindowImpl.cc b/ksvg/impl/SVGWindowImpl.cc
index b19847a4..476185f1 100644
--- a/ksvg/impl/SVGWindowImpl.cc
+++ b/ksvg/impl/SVGWindowImpl.cc
@@ -26,7 +26,7 @@
#include <ksvg_ecma.h>
#include <ksvg_scriptinterpreter.h>
-#include <qstylesheet.h>
+#include <tqstylesheet.h>
#include <kurl.h>
#include <kmessagebox.h>
@@ -113,7 +113,7 @@ void SVGWindowImpl::postURL(const DOM::DOMString &/*uri*/, const DOM::DOMString
DOM::DOMString SVGWindowImpl::printNode(const DOM::Node &node, unsigned short level)
{
- QString ret;
+ TQString ret;
if(node.isNull()) return ret;
SVGElementImpl *elem = m_document->getElementFromHandle(node.handle());
if(node.nodeType() == DOM::Node::DOCUMENT_NODE)
@@ -130,7 +130,7 @@ DOM::DOMString SVGWindowImpl::printNode(const DOM::Node &node, unsigned short le
printIndentation(ret, level);
ret += "<" + elem->tagName().string();
// handle attrs
- QDictIterator<DOM::DOMString> it(elem->attributes());
+ TQDictIterator<DOM::DOMString> it(elem->attributes());
for(;it.current(); ++it)
ret += " " + it.currentKey() + "=\"" + it.current()->string() + '\"';
if(elem->firstChild().isNull()) // no children
@@ -147,7 +147,7 @@ DOM::DOMString SVGWindowImpl::printNode(const DOM::Node &node, unsigned short le
return ret;
}
-void SVGWindowImpl::printIndentation(QString &ret, unsigned short level, unsigned short indent)
+void SVGWindowImpl::printIndentation(TQString &ret, unsigned short level, unsigned short indent)
{
for(int i = 0;i < indent * level;i++)
ret += " ";
@@ -163,21 +163,21 @@ long SVGWindowImpl::setTimeout(const DOM::DOMString &/*code*/, const long &/*del
return 0;
}
-void SVGWindowImpl::alert(const DOM::DOMString &message, const QString &title)
+void SVGWindowImpl::alert(const DOM::DOMString &message, const TQString &title)
{
- KMessageBox::error(0L, QStyleSheet::convertFromPlainText(message.string()), title);
+ KMessageBox::error(0L, TQStyleSheet::convertFromPlainText(message.string()), title);
}
-bool SVGWindowImpl::confirm(const DOM::DOMString &message, const QString &title)
+bool SVGWindowImpl::confirm(const DOM::DOMString &message, const TQString &title)
{
- return KMessageBox::warningContinueCancel(0L, QStyleSheet::convertFromPlainText(message.string()), title, KStdGuiItem::ok()) == KMessageBox::Continue;
+ return KMessageBox::warningContinueCancel(0L, TQStyleSheet::convertFromPlainText(message.string()), title, KStdGuiItem::ok()) == KMessageBox::Continue;
}
-DOM::DOMString SVGWindowImpl::prompt(const DOM::DOMString &message, const DOM::DOMString &_default, const QString &)
+DOM::DOMString SVGWindowImpl::prompt(const DOM::DOMString &message, const DOM::DOMString &_default, const TQString &)
{
bool ok;
- QString str;
- str = KInputDialog::getText(i18n("Prompt"), QStyleSheet::convertFromPlainText(message.string()), _default.string(), &ok);
+ TQString str;
+ str = KInputDialog::getText(i18n("Prompt"), TQStyleSheet::convertFromPlainText(message.string()), _default.string(), &ok);
if(ok)
return str;
else
diff --git a/ksvg/impl/SVGWindowImpl.h b/ksvg/impl/SVGWindowImpl.h
index 0861809e..72e95741 100644
--- a/ksvg/impl/SVGWindowImpl.h
+++ b/ksvg/impl/SVGWindowImpl.h
@@ -54,12 +54,12 @@ public:
DOM::DOMString printNode(const DOM::Node &node, unsigned short level = 0);
long setInterval(const DOM::DOMString &code, const long &delay);
long setTimeout(const DOM::DOMString &code, const long &delay);
- static void alert(const DOM::DOMString &message, const QString &title = "SVG Window");
- static bool confirm(const DOM::DOMString &message, const QString &title = "SVG Window");
- static DOM::DOMString prompt(const DOM::DOMString &message, const DOM::DOMString &_default, const QString &title = "SVG Window");
+ static void alert(const DOM::DOMString &message, const TQString &title = "SVG Window");
+ static bool confirm(const DOM::DOMString &message, const TQString &title = "SVG Window");
+ static DOM::DOMString prompt(const DOM::DOMString &message, const DOM::DOMString &_default, const TQString &title = "SVG Window");
private:
- void printIndentation(QString &ret, unsigned short level, unsigned short indent = 2);
+ void printIndentation(TQString &ret, unsigned short level, unsigned short indent = 2);
private:
//StyleSheet m_defaultStyleSheet;
diff --git a/ksvg/impl/libs/libtext2path/src/QtUnicode.cpp b/ksvg/impl/libs/libtext2path/src/QtUnicode.cpp
index 694ed5c7..33855a81 100644
--- a/ksvg/impl/libs/libtext2path/src/QtUnicode.cpp
+++ b/ksvg/impl/libs/libtext2path/src/QtUnicode.cpp
@@ -38,8 +38,8 @@
using namespace T2P;
// START OF GENERATED DATA
-// copied form qfont.h, as we can't include it in tools. Do not modify without
-// changing the script enum in qfont.h aswell.
+// copied form tqfont.h, as we can't include it in tools. Do not modify without
+// changing the script enum in tqfont.h aswell.
const unsigned char QtUnicode::otherScripts [120] = {
#define SCRIPTS_02 0
0xaf, Latin, 0xff, SpacingModifiers, // row 0x02, index 0
diff --git a/ksvg/impl/svgpathparser.cc b/ksvg/impl/svgpathparser.cc
index 0f7521e0..590ac2ba 100644
--- a/ksvg/impl/svgpathparser.cc
+++ b/ksvg/impl/svgpathparser.cc
@@ -18,7 +18,7 @@
*/
#include "svgpathparser.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <math.h>
// parses the number into parameter number
@@ -95,11 +95,11 @@ SVGPathParser::getCoord( const char *ptr, double &number )
}
void
-SVGPathParser::parseSVG( const QString &s, bool process )
+SVGPathParser::parseSVG( const TQString &s, bool process )
{
if(!s.isEmpty())
{
- QString d = s;
+ TQString d = s;
d = d.replace(',', ' ');
d = d.simplifyWhiteSpace();
const char *ptr = d.latin1();
diff --git a/ksvg/impl/svgpathparser.h b/ksvg/impl/svgpathparser.h
index 3a9495d0..efbe4b79 100644
--- a/ksvg/impl/svgpathparser.h
+++ b/ksvg/impl/svgpathparser.h
@@ -20,7 +20,7 @@
#ifndef __SVGPATHPARSER_H__
#define __SVGPATHPARSER_H__
-class QString;
+class TQString;
namespace KSVG
{
@@ -41,7 +41,7 @@ namespace KSVG
class SVGPathParser
{
public:
- void parseSVG( const QString &d, bool process = false );
+ void parseSVG( const TQString &d, bool process = false );
static const char *getCoord( const char *, double & );
diff --git a/ksvg/plugin/backends/agg/AggCanvasFactory.cpp b/ksvg/plugin/backends/agg/AggCanvasFactory.cpp
index 439623ad..368cb252 100644
--- a/ksvg/plugin/backends/agg/AggCanvasFactory.cpp
+++ b/ksvg/plugin/backends/agg/AggCanvasFactory.cpp
@@ -35,7 +35,7 @@ AggCanvasFactory::~AggCanvasFactory()
{
}
-QObject *AggCanvasFactory::createObject(QObject *, const char *, const char *, const QStringList &args)
+TQObject *AggCanvasFactory::createObject(TQObject *, const char *, const char *, const TQStringList &args)
{
unsigned int width = (*args.at(1)).toUInt();
unsigned int height = (*args.at(0)).toUInt();
diff --git a/ksvg/plugin/backends/agg/AggCanvasFactory.h b/ksvg/plugin/backends/agg/AggCanvasFactory.h
index 9fb3ffbf..8e7d4747 100644
--- a/ksvg/plugin/backends/agg/AggCanvasFactory.h
+++ b/ksvg/plugin/backends/agg/AggCanvasFactory.h
@@ -35,7 +35,7 @@ public:
AggCanvasFactory();
virtual ~AggCanvasFactory();
- virtual QObject *createObject(QObject *parent = 0, const char *pname = 0, const char *name = "QObject", const QStringList &args = QStringList());
+ virtual TQObject *createObject(TQObject *parent = 0, const char *pname = 0, const char *name = "TQObject", const TQStringList &args = TQStringList());
};
};
diff --git a/ksvg/plugin/backends/agg/AggCanvasItems.cpp b/ksvg/plugin/backends/agg/AggCanvasItems.cpp
index 4ceb6109..be4727ac 100644
--- a/ksvg/plugin/backends/agg/AggCanvasItems.cpp
+++ b/ksvg/plugin/backends/agg/AggCanvasItems.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qimage.h>
+#include <tqimage.h>
#include "SVGPaint.h"
#include "SVGRectImpl.h"
@@ -207,12 +207,12 @@ AggShape::~AggShape()
delete m_strokePainter;
}
-QRect AggShape::bbox() const
+TQRect AggShape::bbox() const
{
return m_bbox;
}
-bool AggShape::fillContains(const QPoint &p)
+bool AggShape::fillContains(const TQPoint &p)
{
agg::rasterizer_scanline_aa<> ras;
ras.filling_rule(m_style->getFillRule() == RULE_EVENODD ? agg::fill_even_odd : agg::fill_non_zero);
@@ -221,7 +221,7 @@ bool AggShape::fillContains(const QPoint &p)
return b;
}
-bool AggShape::strokeContains(const QPoint &p)
+bool AggShape::strokeContains(const TQPoint &p)
{
agg::rasterizer_scanline_aa<> ras;
ras.add_path(m_curved_stroked_trans);
@@ -287,7 +287,7 @@ void AggShape::draw(SVGShapeImpl *shape)
double x1, y1, x2, y2;
agg::bounding_rect(m_curved_trans, *this, 0, 1, &x1, &y1, &x2, &y2);
- m_bbox = QRect(int(x1), int(y1), int(x2 - x1), int(y2 - y1));
+ m_bbox = TQRect(int(x1), int(y1), int(x2 - x1), int(y2 - y1));
m_curved.approximation_scale(pow(m_transform.scale(), 0.75));
@@ -309,7 +309,7 @@ void AggShape::calcSVPs(const SVGMatrixImpl *matrix)
double x1, y1, x2, y2;
agg::bounding_rect(m_curved_trans, *this, 0, 1, &x1, &y1, &x2, &y2);
- m_bbox = QRect(int(x1), int(y1), int(x2 - x1), int(y2 - y1));
+ m_bbox = TQRect(int(x1), int(y1), int(x2 - x1), int(y2 - y1));
}
void AggShape::init(const SVGMatrixImpl *)
@@ -358,7 +358,7 @@ void AggStrokePaintServer::update(SVGStylableImpl *style)
{
if(style->getStrokeColor()->paintType() != SVG_PAINTTYPE_URI)
{
- QColor qcolor;
+ TQColor qcolor;
if(style->getStrokeColor()->paintType() == SVG_PAINTTYPE_CURRENTCOLOR)
qcolor = style->getColor()->rgbColor().color();
else
@@ -407,7 +407,7 @@ void AggFillPaintServer::update(SVGStylableImpl *style)
{
if(style->getFillColor()->paintType() != SVG_PAINTTYPE_URI)
{
- QColor qcolor;
+ TQColor qcolor;
if(style->getFillColor()->paintType() == SVG_PAINTTYPE_CURRENTCOLOR)
qcolor = style->getColor()->rgbColor().color();
else
@@ -678,7 +678,7 @@ void AggLine::draw()
{
m_canvas->m_ras.reset();
m_canvas->m_ras.add_path(m_curved_stroked_trans);
- QColor qcolor;
+ TQColor qcolor;
if(m_style->getStrokeColor()->paintType() == SVG_PAINTTYPE_CURRENTCOLOR)
qcolor = m_style->getColor()->rgbColor().color();
else
@@ -995,9 +995,9 @@ void AggImage::draw()
{
//KSVGPolygon clippingPolygon = m_image->clippingShape();
- QImage *img = m_image->image();
+ TQImage *img = m_image->image();
if(!img) return;
- QImage image = m_image->scaledImage();
+ TQImage image = m_image->scaledImage();
agg::rendering_buffer source_buffer;
source_buffer.attach(image.bits(), image.width(), image.height(), image.width() * 4);
@@ -1053,9 +1053,9 @@ void AggImage::init()
{
}
-QRect AggImage::bbox() const
+TQRect AggImage::bbox() const
{
- QRect bbox(static_cast<int>(m_image->x()->baseVal()->value()),
+ TQRect bbox(static_cast<int>(m_image->x()->baseVal()->value()),
static_cast<int>(m_image->y()->baseVal()->value()),
static_cast<int>(m_image->width()->baseVal()->value()),
static_cast<int>(m_image->height()->baseVal()->value()));
@@ -1077,9 +1077,9 @@ AggText::~AggText()
{
}
-bool AggText::fillContains(const QPoint &p)
+bool AggText::fillContains(const TQPoint &p)
{
- QPtrListIterator<SVPElement> it(m_drawItems);
+ TQPtrListIterator<SVPElement> it(m_drawItems);
SVPElement *fill = it.current();
while(fill)
@@ -1099,9 +1099,9 @@ bool AggText::fillContains(const QPoint &p)
return false;
}
-bool AggText::strokeContains(const QPoint &p)
+bool AggText::strokeContains(const TQPoint &p)
{
- QPtrListIterator<SVPElement> it(m_drawItems);
+ TQPtrListIterator<SVPElement> it(m_drawItems);
SVPElement *stroke = it.current();
while(stroke)
@@ -1121,11 +1121,11 @@ bool AggText::strokeContains(const QPoint &p)
return false;
}
-QRect AggText::bbox() const
+TQRect AggText::bbox() const
{
- QRect result, rect;
+ TQRect result, rect;
- QPtrListIterator<SVPElement> it(m_drawItems);
+ TQPtrListIterator<SVPElement> it(m_drawItems);
SVPElement *elem = it.current();
while(elem)
@@ -1152,7 +1152,7 @@ void AggText::update(CanvasItemUpdate reason, int param1, int param2)
{
if(reason == UPDATE_STYLE)
{
- QPtrListIterator<SVPElement> it(m_drawItems);
+ TQPtrListIterator<SVPElement> it(m_drawItems);
SVPElement *svpelement = it.current();
SVGTextContentElementImpl *text;
@@ -1181,7 +1181,7 @@ void AggText::update(CanvasItemUpdate reason, int param1, int param2)
}
else if(reason == UPDATE_PAN)
{
- QPtrListIterator<SVPElement> it(m_drawItems);
+ TQPtrListIterator<SVPElement> it(m_drawItems);
SVPElement *svpelement = it.current();
T2P::BezierPathAgg *bpath;
@@ -1202,7 +1202,7 @@ void AggText::update(CanvasItemUpdate reason, int param1, int param2)
void AggText::draw()
{
- QPtrListIterator<SVPElement> it(m_drawItems);
+ TQPtrListIterator<SVPElement> it(m_drawItems);
SVPElement *svpelement = it.current();
BezierPathAggStroked *bpath;
@@ -1229,7 +1229,7 @@ void AggText::draw()
bool AggText::isVisible()
{
bool foundVisible = false;
- QPtrListIterator<SVPElement> it(m_drawItems);
+ TQPtrListIterator<SVPElement> it(m_drawItems);
SVPElement *svpelement = it.current();
SVGTextContentElementImpl *text;
@@ -1361,7 +1361,7 @@ void AggGradient::parseGradientStops(SVGGradientElementImpl *gradient)
//offsets++;
// Get color
- QColor qStopColor;
+ TQColor qStopColor;
if(elem->getStopColor()->colorType() == SVG_COLORTYPE_CURRENTCOLOR)
qStopColor = elem->getColor()->rgbColor().color();
@@ -1369,7 +1369,7 @@ void AggGradient::parseGradientStops(SVGGradientElementImpl *gradient)
qStopColor = elem->getStopColor()->rgbColor().color();
// Convert in an agg suitable form
- QString tempName = qStopColor.name();
+ TQString tempName = qStopColor.name();
const char *str = tempName.latin1();
// We need to take into account fill/stroke opacity, if available (Rob)
@@ -1449,14 +1449,14 @@ void AggGradient::finalizePaintServer()
{
parseGradientStops(m_gradient->stopsSource());
- QString _href = SVGURIReferenceImpl::getTarget(m_gradient->href()->baseVal().string());
+ TQString _href = SVGURIReferenceImpl::getTarget(m_gradient->href()->baseVal().string());
if(!_href.isEmpty())
reference(_href);
setFinalized();
}
-void AggGradient::reference(const QString &/*href*/)
+void AggGradient::reference(const TQString &/*href*/)
{
}
@@ -1475,7 +1475,7 @@ void AggLinearGradient::render(AggCanvas *c)
SVGMatrixImpl *gradTrans = linear->gradientTransform()->baseVal()->concatenate();
if(gradTrans)
{
- QWMatrix m = gradTrans->qmatrix();
+ TQWMatrix m = gradTrans->qmatrix();
m.map(_x1, _y1, &_x1, &_y1);
m.map(_x2, _y2, &_x2, &_y2);
gradTrans->deref();
@@ -1613,7 +1613,7 @@ void AggRadialGradient::render(AggCanvas *c)
if(gradTrans)
{
agg::trans_affine mtx;
- QWMatrix m = gradTrans->qmatrix();
+ TQWMatrix m = gradTrans->qmatrix();
mtx = agg::trans_affine(m.m11(), m.m12(), m.m21(), m.m22(), m.dx(), m.dy());
gradTrans->deref();
mtx_g1 *= mtx;
@@ -1693,7 +1693,7 @@ void AggPattern::finalizePaintServer()
setFinalized();
}
-void AggPattern::reference(const QString &href)
+void AggPattern::reference(const TQString &href)
{
m_pattern->reference(href);
}
@@ -1704,7 +1704,7 @@ void AggPattern::render(AggCanvas *c)
if(!tile.image().isNull())
{
- QWMatrix m = tile.screenToTile();
+ TQWMatrix m = tile.screenToTile();
double affine[6];
affine[0] = m.m11();
diff --git a/ksvg/plugin/backends/agg/AggCanvasItems.h b/ksvg/plugin/backends/agg/AggCanvasItems.h
index a8c242ec..b5599952 100644
--- a/ksvg/plugin/backends/agg/AggCanvasItems.h
+++ b/ksvg/plugin/backends/agg/AggCanvasItems.h
@@ -200,7 +200,7 @@ namespace KSVG
virtual ~AggPaintServer() {}
virtual void finalizePaintServer() = 0;
- virtual void reference(const QString &href) = 0;
+ virtual void reference(const TQString &href) = 0;
virtual void render(AggCanvas *c) = 0;
};
@@ -214,7 +214,7 @@ namespace KSVG
void parseGradientStops(SVGGradientElementImpl *gradient);
virtual void finalizePaintServer();
- virtual void reference(const QString &href);
+ virtual void reference(const TQString &href);
protected:
SVGGradientElementImpl *m_gradient;
@@ -254,7 +254,7 @@ namespace KSVG
virtual ~AggPattern() {}
virtual void finalizePaintServer();
- virtual void reference(const QString &);
+ virtual void reference(const TQString &);
virtual void render(AggCanvas *c);
@@ -307,9 +307,9 @@ namespace KSVG
AggShape(AggCanvas *c, SVGStylableImpl *style);
virtual ~AggShape();
- virtual QRect bbox() const;
- virtual bool fillContains(const QPoint &p);
- virtual bool strokeContains(const QPoint &p);
+ virtual TQRect bbox() const;
+ virtual bool fillContains(const TQPoint &p);
+ virtual bool strokeContains(const TQPoint &p);
virtual void update(CanvasItemUpdate reason, int param1 = 0, int param2 = 0);
void draw(SVGShapeImpl *shape);
void calcSVPs(const SVGMatrixImpl *matrix);
@@ -416,9 +416,9 @@ namespace KSVG
AggMarker(AggCanvas *c, SVGMarkerElementImpl *marker);
virtual ~AggMarker();
- virtual QRect bbox() const { return QRect(); }
- virtual bool fillContains(const QPoint &) { return true; }
- virtual bool strokeContains(const QPoint &) { return true; }
+ virtual TQRect bbox() const { return TQRect(); }
+ virtual bool fillContains(const TQPoint &) { return true; }
+ virtual bool strokeContains(const TQPoint &) { return true; }
virtual void update(CanvasItemUpdate, int = 0, int = 0) { }
virtual void init();
virtual void draw();
@@ -438,9 +438,9 @@ namespace KSVG
AggImage(AggCanvas *c, SVGImageElementImpl *image);
virtual ~AggImage();
- virtual QRect bbox() const;
- virtual bool fillContains(const QPoint &) { return true; }
- virtual bool strokeContains(const QPoint &) { return true; }
+ virtual TQRect bbox() const;
+ virtual bool fillContains(const TQPoint &) { return true; }
+ virtual bool strokeContains(const TQPoint &) { return true; }
virtual void update(CanvasItemUpdate, int = 0, int = 0) { }
virtual void init();
virtual void draw();
@@ -459,9 +459,9 @@ namespace KSVG
AggText(AggCanvas *c, SVGTextElementImpl *text);
virtual ~AggText();
- virtual QRect bbox() const;
- virtual bool fillContains(const QPoint &p);
- virtual bool strokeContains(const QPoint &p);
+ virtual TQRect bbox() const;
+ virtual bool fillContains(const TQPoint &p);
+ virtual bool strokeContains(const TQPoint &p);
virtual void update(CanvasItemUpdate, int param1 = 0, int param2 = 0);
virtual void draw();
virtual bool isVisible();
@@ -491,7 +491,7 @@ namespace KSVG
AggStrokePaintServer *strokePainter;
};
- mutable QPtrList<SVPElement> m_drawItems;
+ mutable TQPtrList<SVPElement> m_drawItems;
};
};
diff --git a/ksvg/plugin/backends/libart/BezierPathLibart.h b/ksvg/plugin/backends/libart/BezierPathLibart.h
index a6dfd2b9..dd8fda6f 100644
--- a/ksvg/plugin/backends/libart/BezierPathLibart.h
+++ b/ksvg/plugin/backends/libart/BezierPathLibart.h
@@ -22,7 +22,7 @@
#define T2P_BEZIERPATH_LIBART_H
#include "BezierPath.h"
-#include <qmemarray.h>
+#include <tqmemarray.h>
class _ArtBpath;
@@ -42,7 +42,7 @@ namespace T2P
virtual void boundingBox(Point *topLeft, Point *bottomRight);
// Don't make those private members, these are all internal anyway...
- QMemArray<_ArtBpath> m_array;
+ TQMemArray<_ArtBpath> m_array;
double m_length;
};
}
diff --git a/ksvg/plugin/backends/libart/LibartCanvas.cpp b/ksvg/plugin/backends/libart/LibartCanvas.cpp
index 5697b623..55b371dd 100644
--- a/ksvg/plugin/backends/libart/LibartCanvas.cpp
+++ b/ksvg/plugin/backends/libart/LibartCanvas.cpp
@@ -44,9 +44,9 @@
#include "SVGPaint.h"
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qimage.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqimage.h>
#include "KSVGHelper.h"
#include "KSVGTextChunk.h"
@@ -91,7 +91,7 @@ ArtSVP *art_svp_from_irect(ArtIRect *bbox)
return art_svp_from_rect(bbox->x0, bbox->y0, bbox->x1, bbox->y1);
}
-ArtSVP *art_svp_from_qrect(const QRect& rect)
+ArtSVP *art_svp_from_qrect(const TQRect& rect)
{
return art_svp_from_rect(rect.left(), rect.top(), rect.right() + 1, rect.bottom() + 1);
}
@@ -153,7 +153,7 @@ CanvasItem *LibartCanvas::createPath(SVGPathElementImpl *path)
CanvasItem *LibartCanvas::createClipPath(SVGClipPathElementImpl *clippath)
{
CanvasClipPath *result = new LibartClipPath(this, clippath);
- QString index = clippath->id().string();
+ TQString index = clippath->id().string();
m_clipPaths.insert(index, result);
return result;
}
@@ -185,7 +185,7 @@ CanvasPaintServer *LibartCanvas::createPaintServer(SVGElementImpl *pserver)
return result;
}
-void LibartCanvas::drawImage(QImage image, SVGStylableImpl *style, const SVGMatrixImpl *matrix, const KSVGPolygon& clippingPolygon)
+void LibartCanvas::drawImage(TQImage image, SVGStylableImpl *style, const SVGMatrixImpl *matrix, const KSVGPolygon& clippingPolygon)
{
SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(style);
@@ -212,9 +212,9 @@ void LibartCanvas::drawImage(QImage image, SVGStylableImpl *style, const SVGMatr
{
clipToBuffer(x0, y0, x1, y1);
- QRect screenBBox(x0, y0, x1 - x0 + 1, y1 - y0 + 1);
+ TQRect screenBBox(x0, y0, x1 - x0 + 1, y1 - y0 + 1);
- QByteArray mask = SVGMaskElementImpl::maskRectangle(shape, screenBBox);
+ TQByteArray mask = SVGMaskElementImpl::maskRectangle(shape, screenBBox);
double affine[6];
KSVGHelper::matrixToAffine(matrix, affine);
@@ -227,7 +227,7 @@ void LibartCanvas::drawImage(QImage image, SVGStylableImpl *style, const SVGMatr
}
}
-ArtSVP *LibartCanvas::clippingRect(const QRect &rect, const SVGMatrixImpl *ctm)
+ArtSVP *LibartCanvas::clippingRect(const TQRect &rect, const SVGMatrixImpl *ctm)
{
ArtVpath *vec = allocVPath(6);
// Order of points in clipping rectangle must be counter-clockwise
@@ -273,7 +273,7 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *shape)
if(style)
{
- QString clipPathRef = style->getClipPath();
+ TQString clipPathRef = style->getClipPath();
if(!clipPathRef.isEmpty())
{
@@ -354,7 +354,7 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *shape)
return clippedSvp;
}
-void LibartCanvas::drawSVP(ArtSVP *svp, art_u32 color, QByteArray mask, QRect screenBBox)
+void LibartCanvas::drawSVP(ArtSVP *svp, art_u32 color, TQByteArray mask, TQRect screenBBox)
{
int x0 = screenBBox.left();
int y0 = screenBBox.top();
diff --git a/ksvg/plugin/backends/libart/LibartCanvas.h b/ksvg/plugin/backends/libart/LibartCanvas.h
index e0da1682..9232789a 100644
--- a/ksvg/plugin/backends/libart/LibartCanvas.h
+++ b/ksvg/plugin/backends/libart/LibartCanvas.h
@@ -32,8 +32,8 @@
#include <Converter.h>
#include "GlyphTracerLibart.h"
-class QString;
-class QImage;
+class TQString;
+class TQImage;
struct _ArtSVP;
@@ -50,8 +50,8 @@ class LibartCanvas : public KSVGCanvas
public:
LibartCanvas(unsigned int width, unsigned int height);
- void drawSVP(_ArtSVP *svp, art_u32 color, QByteArray mask, QRect screenBBox);
- void drawImage(QImage image, SVGStylableImpl *style, const SVGMatrixImpl *matrix, const KSVGPolygon& clippingPolygon);
+ void drawSVP(_ArtSVP *svp, art_u32 color, TQByteArray mask, TQRect screenBBox);
+ void drawImage(TQImage image, SVGStylableImpl *style, const SVGMatrixImpl *matrix, const KSVGPolygon& clippingPolygon);
virtual T2P::BezierPath *toBezierPath(CanvasItem *item) const;
@@ -69,7 +69,7 @@ public:
virtual CanvasItem *createText(SVGTextElementImpl *text);
virtual CanvasPaintServer *createPaintServer(SVGElementImpl *pserver);
- _ArtSVP *clippingRect(const QRect &rect, const SVGMatrixImpl *ctm);
+ _ArtSVP *clippingRect(const TQRect &rect, const SVGMatrixImpl *ctm);
_ArtSVP *svpFromPolygon(const KSVGPolygon& polygon);
static ArtSVP *copy_svp(const ArtSVP *svp);
diff --git a/ksvg/plugin/backends/libart/LibartCanvasFactory.cpp b/ksvg/plugin/backends/libart/LibartCanvasFactory.cpp
index 48d37f05..9360389c 100644
--- a/ksvg/plugin/backends/libart/LibartCanvasFactory.cpp
+++ b/ksvg/plugin/backends/libart/LibartCanvasFactory.cpp
@@ -35,7 +35,7 @@ LibartCanvasFactory::~LibartCanvasFactory()
{
}
-QObject *LibartCanvasFactory::createObject(QObject *, const char *, const char *, const QStringList &args)
+TQObject *LibartCanvasFactory::createObject(TQObject *, const char *, const char *, const TQStringList &args)
{
int width = (*args.at(1)).toInt();
int height = (*args.at(0)).toInt();
diff --git a/ksvg/plugin/backends/libart/LibartCanvasFactory.h b/ksvg/plugin/backends/libart/LibartCanvasFactory.h
index 5b3ed0b3..58ad5047 100644
--- a/ksvg/plugin/backends/libart/LibartCanvasFactory.h
+++ b/ksvg/plugin/backends/libart/LibartCanvasFactory.h
@@ -35,7 +35,7 @@ public:
LibartCanvasFactory();
virtual ~LibartCanvasFactory();
- virtual QObject *createObject(QObject *parent = 0, const char *pname = 0, const char *name = "QObject", const QStringList &args = QStringList());
+ virtual TQObject *createObject(TQObject *parent = 0, const char *pname = 0, const char *name = "TQObject", const TQStringList &args = TQStringList());
};
}
diff --git a/ksvg/plugin/backends/libart/LibartCanvasItems.cpp b/ksvg/plugin/backends/libart/LibartCanvasItems.cpp
index 5dd97be1..998fb51f 100644
--- a/ksvg/plugin/backends/libart/LibartCanvasItems.cpp
+++ b/ksvg/plugin/backends/libart/LibartCanvasItems.cpp
@@ -20,8 +20,8 @@
#include <cfloat>
-#include <qimage.h>
-#include <qwmatrix.h>
+#include <tqimage.h>
+#include <tqwmatrix.h>
#include "SVGPaint.h"
#include "SVGRectImpl.h"
@@ -108,9 +108,9 @@ LibartShape::~LibartShape()
delete m_strokePainter;
}
-QRect LibartShape::bbox() const
+TQRect LibartShape::bbox() const
{
- QRect rect;
+ TQRect rect;
if(m_strokeSVP || m_fillSVP)
{
ArtIRect *irect = new ArtIRect();
@@ -134,7 +134,7 @@ bool LibartShape::isVisible(SVGShapeImpl *shape)
return m_referenced || (m_style->getVisible() && m_style->getDisplay() && shape->directRender());
}
-bool LibartShape::fillContains(const QPoint &p)
+bool LibartShape::fillContains(const TQPoint &p)
{
if(m_fillSVP)
return art_svp_point_wind(m_fillSVP, p.x(), p.y()) != 0;
@@ -142,7 +142,7 @@ bool LibartShape::fillContains(const QPoint &p)
return false;
}
-bool LibartShape::strokeContains(const QPoint &p)
+bool LibartShape::strokeContains(const TQPoint &p)
{
if(m_strokeSVP)
return art_svp_point_wind(m_strokeSVP, p.x(), p.y()) != 0;
@@ -214,7 +214,7 @@ void LibartPainter::update(SVGStylableImpl *style)
{
if(paintType(style) != SVG_PAINTTYPE_URI)
{
- QColor qcolor;
+ TQColor qcolor;
if(paintType(style) == SVG_PAINTTYPE_CURRENTCOLOR)
qcolor = style->getColor()->rgbColor().color();
else
@@ -250,9 +250,9 @@ void LibartPainter::draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *st
{
canvas->clipToBuffer(x0, y0, x1, y1);
- QRect screenBBox(x0, y0, x1 - x0 + 1, y1 - y0 + 1);
+ TQRect screenBBox(x0, y0, x1 - x0 + 1, y1 - y0 + 1);
- QByteArray mask = SVGMaskElementImpl::maskRectangle(shape, screenBBox);
+ TQByteArray mask = SVGMaskElementImpl::maskRectangle(shape, screenBBox);
if(paintType(style) == SVG_PAINTTYPE_URI)
{
@@ -1356,7 +1356,7 @@ void LibartImage::draw()
if(isVisible())
{
SVGMatrixImpl *ctm = m_image->scaledImageMatrix();
- QImage image = m_image->scaledImage();
+ TQImage image = m_image->scaledImage();
KSVGPolygon clippingPolygon = m_image->clippingShape();
m_canvas->drawImage(image, m_image, ctm, clippingPolygon);
@@ -1374,9 +1374,9 @@ void LibartImage::init()
{
}
-QRect LibartImage::bbox() const
+TQRect LibartImage::bbox() const
{
- QRect bbox(static_cast<int>(m_image->x()->baseVal()->value()),
+ TQRect bbox(static_cast<int>(m_image->x()->baseVal()->value()),
static_cast<int>(m_image->y()->baseVal()->value()),
static_cast<int>(m_image->width()->baseVal()->value()),
static_cast<int>(m_image->height()->baseVal()->value()));
@@ -1428,12 +1428,12 @@ LibartText::SVPElement::~SVPElement()
art_svp_free(svp);
}
-QRect LibartText::bbox() const
+TQRect LibartText::bbox() const
{
- QRect result, rect;
+ TQRect result, rect;
- QPtrListIterator<SVPElement> it1(m_drawFillItems);
- QPtrListIterator<SVPElement> it2(m_drawStrokeItems);
+ TQPtrListIterator<SVPElement> it1(m_drawFillItems);
+ TQPtrListIterator<SVPElement> it2(m_drawStrokeItems);
SVPElement *fill = it1.current(), *stroke = it2.current();
while(fill != 0 || stroke != 0)
@@ -1458,9 +1458,9 @@ QRect LibartText::bbox() const
return result;
}
-bool LibartText::fillContains(const QPoint &p)
+bool LibartText::fillContains(const TQPoint &p)
{
- QPtrListIterator<SVPElement> it(m_drawFillItems);
+ TQPtrListIterator<SVPElement> it(m_drawFillItems);
SVPElement *fill = it.current();
while(fill && fill->svp)
@@ -1474,9 +1474,9 @@ bool LibartText::fillContains(const QPoint &p)
return false;
}
-bool LibartText::strokeContains(const QPoint &p)
+bool LibartText::strokeContains(const TQPoint &p)
{
- QPtrListIterator<SVPElement> it(m_drawStrokeItems);
+ TQPtrListIterator<SVPElement> it(m_drawStrokeItems);
SVPElement *stroke = it.current();
while(stroke && stroke->svp)
@@ -1494,8 +1494,8 @@ void LibartText::update(CanvasItemUpdate reason, int param1, int param2)
{
if(reason == UPDATE_STYLE)
{
- QPtrListIterator<SVPElement> it1(m_drawFillItems);
- QPtrListIterator<SVPElement> it2(m_drawStrokeItems);
+ TQPtrListIterator<SVPElement> it1(m_drawFillItems);
+ TQPtrListIterator<SVPElement> it2(m_drawStrokeItems);
SVPElement *fill = it1.current(), *stroke = it2.current();
while(fill != 0 || stroke != 0)
{
@@ -1529,8 +1529,8 @@ void LibartText::update(CanvasItemUpdate reason, int param1, int param2)
}
else if(reason == UPDATE_PAN)
{
- QPtrListIterator<SVPElement> it1(m_drawFillItems);
- QPtrListIterator<SVPElement> it2(m_drawStrokeItems);
+ TQPtrListIterator<SVPElement> it1(m_drawFillItems);
+ TQPtrListIterator<SVPElement> it2(m_drawStrokeItems);
double affine[6];
KSVGHelper::matrixToAffine(m_text->screenCTM(), affine);
@@ -1559,8 +1559,8 @@ void LibartText::update(CanvasItemUpdate reason, int param1, int param2)
void LibartText::draw()
{
- QPtrListIterator<SVPElement> it1(m_drawFillItems);
- QPtrListIterator<SVPElement> it2(m_drawStrokeItems);
+ TQPtrListIterator<SVPElement> it1(m_drawFillItems);
+ TQPtrListIterator<SVPElement> it2(m_drawStrokeItems);
SVPElement *fill = it1.current(), *stroke = it2.current();
while(fill != 0 || stroke != 0)
@@ -1588,8 +1588,8 @@ void LibartText::draw()
bool LibartText::isVisible()
{
bool foundVisible = false;
- QPtrListIterator<SVPElement> it1(m_drawFillItems);
- QPtrListIterator<SVPElement> it2(m_drawStrokeItems);
+ TQPtrListIterator<SVPElement> it1(m_drawFillItems);
+ TQPtrListIterator<SVPElement> it2(m_drawStrokeItems);
SVPElement *fill = it1.current(), *stroke = it2.current();
while(fill != 0 || stroke != 0)
@@ -1767,7 +1767,7 @@ void LibartText::initClipItem()
ArtSVP *LibartText::clipSVP()
{
ArtSVP *svp = 0;
- QPtrListIterator<SVPElement> it(m_drawFillItems);
+ TQPtrListIterator<SVPElement> it(m_drawFillItems);
SVPElement *fill = it.current();
while(fill && fill->svp)
@@ -1787,7 +1787,7 @@ ArtSVP *LibartText::clipSVP()
return svp;
}
-ArtRender *LibartPaintServer::createRenderer(QRect bbox, KSVGCanvas *c)
+ArtRender *LibartPaintServer::createRenderer(TQRect bbox, KSVGCanvas *c)
{
int x0 = bbox.x();
int y0 = bbox.y();
@@ -1836,7 +1836,7 @@ void LibartGradient::parseGradientStops(SVGGradientElementImpl *gradient)
stop->offset = (stop - 1)->offset;
// Get color
- QColor qStopColor;
+ TQColor qStopColor;
if(elem->getStopColor()->colorType() == SVG_COLORTYPE_CURRENTCOLOR)
qStopColor = elem->getColor()->rgbColor().color();
@@ -1844,7 +1844,7 @@ void LibartGradient::parseGradientStops(SVGGradientElementImpl *gradient)
qStopColor = elem->getStopColor()->rgbColor().color();
// Convert in a libart suitable form
- QString tempName = qStopColor.name();
+ TQString tempName = qStopColor.name();
const char *str = tempName.latin1();
int stopColor = 0;
@@ -1888,18 +1888,18 @@ void LibartGradient::finalizePaintServer()
{
parseGradientStops(m_gradient->stopsSource());
- QString _href = SVGURIReferenceImpl::getTarget(m_gradient->href()->baseVal().string());
+ TQString _href = SVGURIReferenceImpl::getTarget(m_gradient->href()->baseVal().string());
if(!_href.isEmpty())
reference(_href);
setFinalized();
}
-void LibartGradient::reference(const QString &)
+void LibartGradient::reference(const TQString &)
{
}
-void LibartLinearGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, QByteArray mask, QRect screenBBox)
+void LibartLinearGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox)
{
if(!m_stops.isEmpty())
{
@@ -1995,7 +1995,7 @@ void LibartLinearGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, QBy
matrix->deref();
- QMemArray<ArtGradientStop> stops = m_stops;
+ TQMemArray<ArtGradientStop> stops = m_stops;
stops.detach();
for(unsigned int i = 0; i < stops.size(); i++)
@@ -2032,7 +2032,7 @@ void LibartLinearGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, QBy
}
}
-void LibartRadialGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, QByteArray mask, QRect screenBBox)
+void LibartRadialGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox)
{
if(!m_stops.isEmpty())
{
@@ -2146,7 +2146,7 @@ void LibartRadialGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, QBy
matrix->deref();
- QMemArray<ArtGradientStop> stops = m_stops;
+ TQMemArray<ArtGradientStop> stops = m_stops;
stops.detach();
for(unsigned int i = 0; i < stops.size(); i++)
@@ -2179,18 +2179,18 @@ void LibartPattern::finalizePaintServer()
setFinalized();
}
-void LibartPattern::reference(const QString &href)
+void LibartPattern::reference(const TQString &href)
{
m_pattern->reference(href);
}
-void LibartPattern::render(KSVGCanvas *c, ArtSVP *svp, float opacity, QByteArray mask, QRect screenBBox)
+void LibartPattern::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox)
{
SVGPatternElementImpl::Tile tile = m_pattern->createTile(getBBoxTarget());
if(!tile.image().isNull())
{
- QWMatrix m = tile.screenToTile();
+ TQWMatrix m = tile.screenToTile();
double affine[6];
affine[0] = m.m11();
diff --git a/ksvg/plugin/backends/libart/LibartCanvasItems.h b/ksvg/plugin/backends/libart/LibartCanvasItems.h
index c62224e5..d34ec9f4 100644
--- a/ksvg/plugin/backends/libart/LibartCanvasItems.h
+++ b/ksvg/plugin/backends/libart/LibartCanvasItems.h
@@ -21,7 +21,7 @@
#ifndef LIBARTCANVASITEMS_H
#define LIBARTCANVASITEMS_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "CanvasItems.h"
#include "LibartCanvas.h"
@@ -73,9 +73,9 @@ namespace KSVG
LibartPaintServer() : CanvasPaintServer() {}
virtual ~LibartPaintServer() {}
- virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, QByteArray mask, QRect screenBBox) = 0;
+ virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox) = 0;
- _ArtRender *createRenderer(QRect rect, KSVGCanvas *c);
+ _ArtRender *createRenderer(TQRect rect, KSVGCanvas *c);
};
class LibartGradient : public LibartPaintServer
@@ -87,11 +87,11 @@ namespace KSVG
void parseGradientStops(SVGGradientElementImpl *gradient);
virtual void finalizePaintServer();
- virtual void reference(const QString &href);
+ virtual void reference(const TQString &href);
protected:
SVGGradientElementImpl *m_gradient;
- QMemArray<_ArtGradientStop> m_stops;
+ TQMemArray<_ArtGradientStop> m_stops;
};
class LibartLinearGradient : public LibartGradient
@@ -99,7 +99,7 @@ namespace KSVG
public:
LibartLinearGradient(SVGLinearGradientElementImpl *linear) : LibartGradient(linear), m_linear(linear) {}
- virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, QByteArray mask, QRect screenBBox);
+ virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox);
protected:
SVGLinearGradientElementImpl *m_linear;
@@ -110,7 +110,7 @@ namespace KSVG
public:
LibartRadialGradient(SVGRadialGradientElementImpl *radial) : LibartGradient(radial), m_radial(radial) {}
- virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, QByteArray mask, QRect screenBBox);
+ virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox);
protected:
SVGRadialGradientElementImpl *m_radial;
@@ -123,9 +123,9 @@ namespace KSVG
virtual ~LibartPattern() {}
virtual void finalizePaintServer();
- virtual void reference(const QString &href);
+ virtual void reference(const TQString &href);
- virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, QByteArray mask, QRect screenBBox);
+ virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox);
protected:
SVGPatternElementImpl *m_pattern;
@@ -142,7 +142,7 @@ namespace KSVG
virtual float opacity(SVGStylableImpl *style) const = 0;
virtual unsigned short paintType(SVGStylableImpl *style) const = 0;
- virtual QString paintUri(SVGStylableImpl *style) const = 0;
+ virtual TQString paintUri(SVGStylableImpl *style) const = 0;
virtual QRgb color(SVGStylableImpl *style) const = 0;
protected:
@@ -156,7 +156,7 @@ namespace KSVG
float opacity(SVGStylableImpl *style) const { return style->getFillOpacity() * style->getOpacity(); }
unsigned short paintType(SVGStylableImpl *style) const { return style->getFillColor()->paintType(); }
- QString paintUri(SVGStylableImpl *style) const { return style->getFillColor()->uri().string(); }
+ TQString paintUri(SVGStylableImpl *style) const { return style->getFillColor()->uri().string(); }
QRgb color(SVGStylableImpl *style) const { return style->getFillColor()->rgbColor().color(); }
};
@@ -167,7 +167,7 @@ namespace KSVG
float opacity(SVGStylableImpl *style) const { return style->getStrokeOpacity() * style->getOpacity(); }
unsigned short paintType(SVGStylableImpl *style) const { return style->getStrokeColor()->paintType(); }
- QString paintUri(SVGStylableImpl *style) const { return style->getStrokeColor()->uri().string(); }
+ TQString paintUri(SVGStylableImpl *style) const { return style->getStrokeColor()->uri().string(); }
QRgb color(SVGStylableImpl *style) const { return style->getStrokeColor()->rgbColor().color(); }
};
@@ -191,9 +191,9 @@ namespace KSVG
LibartShape(LibartCanvas *c, SVGStylableImpl *style);
virtual ~LibartShape();
- virtual QRect bbox() const;
- virtual bool fillContains(const QPoint &p);
- virtual bool strokeContains(const QPoint &p);
+ virtual TQRect bbox() const;
+ virtual bool fillContains(const TQPoint &p);
+ virtual bool strokeContains(const TQPoint &p);
virtual void update(CanvasItemUpdate reason, int param1 = 0, int param2 = 0);
void draw(SVGShapeImpl *shape);
bool isVisible(SVGShapeImpl *shape);
@@ -307,9 +307,9 @@ namespace KSVG
LibartClipPath(LibartCanvas *c, SVGClipPathElementImpl *clipPath);
virtual ~LibartClipPath();
- virtual QRect bbox() const { return QRect(); }
- virtual bool fillContains(const QPoint &) { return true; }
- virtual bool strokeContains(const QPoint &) { return true; }
+ virtual TQRect bbox() const { return TQRect(); }
+ virtual bool fillContains(const TQPoint &) { return true; }
+ virtual bool strokeContains(const TQPoint &) { return true; }
virtual void update(CanvasItemUpdate, int param1 = 0, int param2 = 0);
virtual void init();
virtual void draw();
@@ -321,7 +321,7 @@ namespace KSVG
LibartCanvas *m_canvas;
_ArtSVP *m_clipSVP;
- QPtrList<CanvasItem> m_clipItems;
+ TQPtrList<CanvasItem> m_clipItems;
};
class LibartImage : public CanvasItem
@@ -330,9 +330,9 @@ namespace KSVG
LibartImage(LibartCanvas *c, SVGImageElementImpl *image);
virtual ~LibartImage();
- virtual QRect bbox() const;
- virtual bool fillContains(const QPoint &) { return true; }
- virtual bool strokeContains(const QPoint &) { return true; }
+ virtual TQRect bbox() const;
+ virtual bool fillContains(const TQPoint &) { return true; }
+ virtual bool strokeContains(const TQPoint &) { return true; }
virtual void update(CanvasItemUpdate, int = 0, int = 0) { }
virtual void init();
virtual void draw();
@@ -353,9 +353,9 @@ namespace KSVG
LibartMarker(LibartCanvas *c, SVGMarkerElementImpl *marker);
virtual ~LibartMarker();
- virtual QRect bbox() const { return QRect(); }
- virtual bool fillContains(const QPoint &) { return true; }
- virtual bool strokeContains(const QPoint &) { return true; }
+ virtual TQRect bbox() const { return TQRect(); }
+ virtual bool fillContains(const TQPoint &) { return true; }
+ virtual bool strokeContains(const TQPoint &) { return true; }
virtual void update(CanvasItemUpdate, int = 0, int = 0) { }
virtual void init();
virtual void draw();
@@ -371,9 +371,9 @@ namespace KSVG
LibartText(LibartCanvas *c, SVGTextElementImpl *text);
virtual ~LibartText();
- virtual QRect bbox() const;
- virtual bool fillContains(const QPoint &p);
- virtual bool strokeContains(const QPoint &p);
+ virtual TQRect bbox() const;
+ virtual bool fillContains(const TQPoint &p);
+ virtual bool strokeContains(const TQPoint &p);
virtual void update(CanvasItemUpdate reason, int param1 = 0, int param2 = 0);
virtual void draw();
virtual bool isVisible();
@@ -403,10 +403,10 @@ namespace KSVG
};
// renderCallback() is const.
- mutable QPtrList<SVPElement> m_drawFillItems;
- mutable QPtrList<SVPElement> m_drawStrokeItems;
- mutable QPtrDict<LibartFillPainter> m_fillPainters;
- mutable QPtrDict<LibartStrokePainter> m_strokePainters;
+ mutable TQPtrList<SVPElement> m_drawFillItems;
+ mutable TQPtrList<SVPElement> m_drawStrokeItems;
+ mutable TQPtrDict<LibartFillPainter> m_fillPainters;
+ mutable TQPtrDict<LibartStrokePainter> m_strokePainters;
};
}
diff --git a/ksvg/plugin/ksvg_factory.cpp b/ksvg/plugin/ksvg_factory.cpp
index b231783c..d5e5e1dc 100644
--- a/ksvg/plugin/ksvg_factory.cpp
+++ b/ksvg/plugin/ksvg_factory.cpp
@@ -28,8 +28,8 @@
#include "ksvg_factory.moc"
#include <kdebug.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
extern "C"
{
@@ -43,7 +43,7 @@ extern "C"
KInstance *KSVGPluginFactory::s_instance = 0;
KAboutData *KSVGPluginFactory::s_about = 0;
-KSVGPluginFactory::KSVGPluginFactory(QObject *parent, const char *name) : KParts::Factory(parent, name)
+KSVGPluginFactory::KSVGPluginFactory(TQObject *parent, const char *name) : KParts::Factory(parent, name)
{
}
@@ -56,15 +56,15 @@ KSVGPluginFactory::~KSVGPluginFactory()
s_about = 0;
}
-KParts::Part *KSVGPluginFactory::createPartObject(QWidget *parentWidget, const char *wname, QObject *parent, const char *name, const char *, const QStringList &args)
+KParts::Part *KSVGPluginFactory::createPartObject(TQWidget *parentWidget, const char *wname, TQObject *parent, const char *name, const char *, const TQStringList &args)
{
// Get the width and height of the <embed>
// TODO : <object>
unsigned int width = 0, height = 0;
bool dummy;
- QRegExp r1("(WIDTH)(\\s*=\\s*\")(\\d+)(\\w*)(\")");
- QRegExp r2("(HEIGHT)(\\s*=\\s*\")(\\d+)(\\w*)(\")");
- for(QValueListConstIterator<QString> it = args.begin(); it != args.end(); ++it)
+ TQRegExp r1("(WIDTH)(\\s*=\\s*\")(\\d+)(\\w*)(\")");
+ TQRegExp r2("(HEIGHT)(\\s*=\\s*\")(\\d+)(\\w*)(\")");
+ for(TQValueListConstIterator<TQString> it = args.begin(); it != args.end(); ++it)
{
if(r1.search(*it) > -1)
width = r1.cap(3).toUInt(&dummy);
diff --git a/ksvg/plugin/ksvg_factory.h b/ksvg/plugin/ksvg_factory.h
index b462c782..c931e503 100644
--- a/ksvg/plugin/ksvg_factory.h
+++ b/ksvg/plugin/ksvg_factory.h
@@ -31,10 +31,10 @@ class KSVGPluginFactory : public KParts::Factory
{
Q_OBJECT
public:
- KSVGPluginFactory(QObject *parent = 0, const char *name = 0);
+ KSVGPluginFactory(TQObject *parent = 0, const char *name = 0);
virtual ~KSVGPluginFactory();
- virtual KParts::Part *createPartObject(QWidget *parentWidget = 0, const char *widgetName = 0, QObject *parent = 0, const char *name = 0, const char *classname = "KParts::Part", const QStringList &args = QStringList());
+ virtual KParts::Part *createPartObject(TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject *parent = 0, const char *name = 0, const char *classname = "KParts::Part", const TQStringList &args = TQStringList());
static KInstance *instance();
diff --git a/ksvg/plugin/ksvg_plugin.cpp b/ksvg/plugin/ksvg_plugin.cpp
index 37e0a0dd..75699ec7 100644
--- a/ksvg/plugin/ksvg_plugin.cpp
+++ b/ksvg/plugin/ksvg_plugin.cpp
@@ -42,7 +42,7 @@
#include "SVGDocumentImpl.h"
#include "SVGSVGElementImpl.h"
-#include <qimage.h>
+#include <tqimage.h>
using namespace KSVG;
@@ -67,21 +67,21 @@ struct KSVGPlugin::Private
KToggleAction *progressiveAction;
KSelectAction *renderingBackendAction;
- QString description;
+ TQString description;
- QPoint panPoint;
+ TQPoint panPoint;
float zoomFactor;
SVGDocumentImpl *doc;
KSVGCanvas *canvas;
- QPixmap *backgroundPixmap;
+ TQPixmap *backgroundPixmap;
KAboutApplication *aboutKSVG;
unsigned int width;
unsigned int height;
};
-KSVGPlugin::KSVGPlugin(QWidget *wparent, const char *, QObject *parent, const char *name, unsigned int width, unsigned int height) : KParts::ReadOnlyPart(parent, name)
+KSVGPlugin::KSVGPlugin(TQWidget *wparent, const char *, TQObject *parent, const char *name, unsigned int width, unsigned int height) : KParts::ReadOnlyPart(parent, name)
{
kdDebug(26003) << "KSVGPlugin::KSVGPlugin" << endl;
setInstance(KSVGPluginFactory::instance());
@@ -96,14 +96,14 @@ KSVGPlugin::KSVGPlugin(QWidget *wparent, const char *, QObject *parent, const ch
ksvgd->doc = 0;
ksvgd->window = new KSVGWidget(this, wparent, "Rendering Widget");
- connect(ksvgd->window, SIGNAL(browseURL(const QString &)), this, SLOT(browseURL(const QString &)));
+ connect(ksvgd->window, TQT_SIGNAL(browseURL(const TQString &)), this, TQT_SLOT(browseURL(const TQString &)));
ksvgd->window->show();
KParts::Part::setWidget(ksvgd->window);
ksvgd->extension = new KSVGPluginBrowserExtension(this);
- ksvgd->backgroundPixmap = new QPixmap(width > 0 ? width : DEFAULT_WIDTH, height > 0 ? height : DEFAULT_HEIGHT);
+ ksvgd->backgroundPixmap = new TQPixmap(width > 0 ? width : DEFAULT_WIDTH, height > 0 ? height : DEFAULT_HEIGHT);
ksvgd->backgroundPixmap->fill();
ksvgd->canvas = KSVG::CanvasFactory::self()->loadCanvas(width > 0 ? width : DEFAULT_WIDTH, height > 0 ? height : DEFAULT_HEIGHT);
@@ -112,28 +112,28 @@ KSVGPlugin::KSVGPlugin(QWidget *wparent, const char *, QObject *parent, const ch
ksvgd->canvas->setup(ksvgd->backgroundPixmap, ksvgd->window);
- ksvgd->zoomInAction = KStdAction::zoomIn(this, SLOT(slotZoomIn()), actionCollection());
- ksvgd->zoomOutAction = KStdAction::zoomOut(this, SLOT(slotZoomOut()), actionCollection());
- ksvgd->zoomResetAction = new KAction(i18n("Zoom &Reset"), "viewmag", this, SLOT(slotZoomReset()), actionCollection(), "zoom_reset");
- ksvgd->stopAnimationsAction = new KAction(i18n("&Stop Animations"), "stop", Key_Escape, this, SLOT(slotStop()), actionCollection(), "stop_anims");
- ksvgd->viewSourceAction = new KAction(i18n("View &Source"), "document2", Key_F6, this, SLOT(slotViewSource()), actionCollection(), "view_source");
- ksvgd->viewMemoryAction = new KAction(i18n("View &Memory"), "document2", Key_F7, this, SLOT(slotViewMemory()), actionCollection(), "view_memory");
- ksvgd->saveToPNG = new KAction(i18n("Save to PNG..."), "save", 0, this, SLOT(slotSaveToPNG()), actionCollection(), "save_to_png");
-// ksvgd->aboutApp = KStdAction::aboutApp(this, SLOT(slotAboutKSVG()), actionCollection());//, "KSVG");
- ksvgd->aboutApp = new KAction(i18n("About KSVG"), "vectorgfx", 0, this, SLOT(slotAboutKSVG()), actionCollection(), "help_about_app");
- ksvgd->fontKerningAction = new KToggleAction(i18n("Use Font &Kerning"), "viewmagfit", Key_F8, this, SLOT(slotFontKerning()), actionCollection(), "font_kerning");
- ksvgd->progressiveAction = new KToggleAction(i18n("Use &Progressive Rendering"), "", Key_F9, this, SLOT(slotProgressiveRendering()), actionCollection(), "progressive");
+ ksvgd->zoomInAction = KStdAction::zoomIn(this, TQT_SLOT(slotZoomIn()), actionCollection());
+ ksvgd->zoomOutAction = KStdAction::zoomOut(this, TQT_SLOT(slotZoomOut()), actionCollection());
+ ksvgd->zoomResetAction = new KAction(i18n("Zoom &Reset"), "viewmag", this, TQT_SLOT(slotZoomReset()), actionCollection(), "zoom_reset");
+ ksvgd->stopAnimationsAction = new KAction(i18n("&Stop Animations"), "stop", Key_Escape, this, TQT_SLOT(slotStop()), actionCollection(), "stop_anims");
+ ksvgd->viewSourceAction = new KAction(i18n("View &Source"), "document2", Key_F6, this, TQT_SLOT(slotViewSource()), actionCollection(), "view_source");
+ ksvgd->viewMemoryAction = new KAction(i18n("View &Memory"), "document2", Key_F7, this, TQT_SLOT(slotViewMemory()), actionCollection(), "view_memory");
+ ksvgd->saveToPNG = new KAction(i18n("Save to PNG..."), "save", 0, this, TQT_SLOT(slotSaveToPNG()), actionCollection(), "save_to_png");
+// ksvgd->aboutApp = KStdAction::aboutApp(this, TQT_SLOT(slotAboutKSVG()), actionCollection());//, "KSVG");
+ ksvgd->aboutApp = new KAction(i18n("About KSVG"), "vectorgfx", 0, this, TQT_SLOT(slotAboutKSVG()), actionCollection(), "help_about_app");
+ ksvgd->fontKerningAction = new KToggleAction(i18n("Use Font &Kerning"), "viewmagfit", Key_F8, this, TQT_SLOT(slotFontKerning()), actionCollection(), "font_kerning");
+ ksvgd->progressiveAction = new KToggleAction(i18n("Use &Progressive Rendering"), "", Key_F9, this, TQT_SLOT(slotProgressiveRendering()), actionCollection(), "progressive");
KSimpleConfig config("ksvgpluginrc", true);
config.setGroup("Rendering");
ksvgd->fontKerningAction->setChecked(config.readBoolEntry("FontKerning", true));
ksvgd->progressiveAction->setChecked(config.readBoolEntry("ProgressiveRendering", true));
- ksvgd->renderingBackendAction = new KSelectAction(i18n("Rendering &Backend"), 0, this, SLOT(slotRenderingBackend()), actionCollection(), "rendering_backend");
+ ksvgd->renderingBackendAction = new KSelectAction(i18n("Rendering &Backend"), 0, this, TQT_SLOT(slotRenderingBackend()), actionCollection(), "rendering_backend");
- QStringList items;
- QPtrList<KSVG::CanvasInfo> canvasList = KSVG::CanvasFactory::self()->canvasList();
- QPtrListIterator<KSVG::CanvasInfo> it(canvasList);
+ TQStringList items;
+ TQPtrList<KSVG::CanvasInfo> canvasList = KSVG::CanvasFactory::self()->canvasList();
+ TQPtrListIterator<KSVG::CanvasInfo> it(canvasList);
KSVG::CanvasInfo *canvasInfo = 0;
while((canvasInfo = it.current()) != 0)
{
@@ -184,7 +184,7 @@ void KSVGPlugin::reset()
ksvgd->zoomFactor = 1;
ksvgd->window->reset();
- ksvgd->panPoint = QPoint(0, 0);
+ ksvgd->panPoint = TQPoint(0, 0);
}
bool KSVGPlugin::openURL(const KURL &url)
@@ -204,12 +204,12 @@ bool KSVGPlugin::openURL(const KURL &url)
ksvgd->doc->addToDocumentDict(ksvgd->doc->handle(), ksvgd->doc);
ksvgd->doc->setReferrer(ksvgd->extension->urlArgs().metaData()["referrer"]);
- connect(ksvgd->doc, SIGNAL(finishedParsing(bool, const QString &)), this, SLOT(slotParsingFinished(bool, const QString &)));
- connect(ksvgd->doc, SIGNAL(finishedRendering()), this, SLOT(slotRenderingFinished()));
- connect(ksvgd->doc, SIGNAL(gotDescription(const QString &)), this, SLOT(slotSetDescription(const QString &)));
- connect(ksvgd->doc, SIGNAL(gotTitle(const QString &)), this, SLOT(slotSetTitle(const QString &)));
- connect(ksvgd->doc, SIGNAL(gotURL(const QString &)), this, SLOT(slotGotURL(const QString &)));
- connect(ksvgd->window, SIGNAL(redraw(const QRect &)), this, SLOT(slotRedraw(const QRect &)));
+ connect(ksvgd->doc, TQT_SIGNAL(finishedParsing(bool, const TQString &)), this, TQT_SLOT(slotParsingFinished(bool, const TQString &)));
+ connect(ksvgd->doc, TQT_SIGNAL(finishedRendering()), this, TQT_SLOT(slotRenderingFinished()));
+ connect(ksvgd->doc, TQT_SIGNAL(gotDescription(const TQString &)), this, TQT_SLOT(slotSetDescription(const TQString &)));
+ connect(ksvgd->doc, TQT_SIGNAL(gotTitle(const TQString &)), this, TQT_SLOT(slotSetTitle(const TQString &)));
+ connect(ksvgd->doc, TQT_SIGNAL(gotURL(const TQString &)), this, TQT_SLOT(slotGotURL(const TQString &)));
+ connect(ksvgd->window, TQT_SIGNAL(redraw(const TQRect &)), this, TQT_SLOT(slotRedraw(const TQRect &)));
ksvgd->backgroundPixmap->fill();
bitBlt(ksvgd->window, 0, 0, ksvgd->backgroundPixmap, 0, 0, ksvgd->backgroundPixmap->width(), ksvgd->backgroundPixmap->height());
@@ -225,7 +225,7 @@ bool KSVGPlugin::openURL(const KURL &url)
return true;
}
-void KSVGPlugin::browseURL(const QString &url)
+void KSVGPlugin::browseURL(const TQString &url)
{
ksvgd->doc->rootElement()->pauseAnimations();
KParts::URLArgs args;
@@ -233,7 +233,7 @@ void KSVGPlugin::browseURL(const QString &url)
emit ksvgd->extension->openURLRequest(KURL(m_url, url), args);
}
-void KSVGPlugin::slotRedraw(const QRect &r)
+void KSVGPlugin::slotRedraw(const TQRect &r)
{
if(ksvgd->window->width() != ksvgd->backgroundPixmap->width() ||
ksvgd->window->height() != ksvgd->backgroundPixmap->height())
@@ -316,7 +316,7 @@ void KSVGPlugin::slotStop()
ksvgd->doc->rootElement()->pauseAnimations();
}
-void KSVGPlugin::slotParsingFinished(bool error, const QString &errorDesc)
+void KSVGPlugin::slotParsingFinished(bool error, const TQString &errorDesc)
{
emit completed();
@@ -356,14 +356,14 @@ void KSVGPlugin::slotSaveToPNG()
{
if(ksvgd && ksvgd->backgroundPixmap)
{
- QImage img = ksvgd->backgroundPixmap->convertToImage();
- QString filename = KFileDialog::getSaveFileName();
+ TQImage img = ksvgd->backgroundPixmap->convertToImage();
+ TQString filename = KFileDialog::getSaveFileName();
if(!filename.isEmpty())
img.save(filename, "PNG");
}
}
-void KSVGPlugin::setPanPoint(const QPoint &translate)
+void KSVGPlugin::setPanPoint(const TQPoint &translate)
{
ksvgd->panPoint = translate;
update();
@@ -391,22 +391,22 @@ void KSVGPlugin::update()
ksvgd->doc->canvas()->update(ksvgd->panPoint);
// Fixes drawing glitches
- slotRedraw(QRect(0, 0, ksvgd->backgroundPixmap->width(), ksvgd->backgroundPixmap->height()));
+ slotRedraw(TQRect(0, 0, ksvgd->backgroundPixmap->width(), ksvgd->backgroundPixmap->height()));
}
}
-void KSVGPlugin::slotSetDescription(const QString &desc)
+void KSVGPlugin::slotSetDescription(const TQString &desc)
{
ksvgd->description = desc;
emit setStatusBarText(i18n("Description: %1").arg(desc));
}
-void KSVGPlugin::slotSetTitle(const QString &title)
+void KSVGPlugin::slotSetTitle(const TQString &title)
{
emit setWindowCaption(title);
}
-void KSVGPlugin::slotGotURL(const QString &text)
+void KSVGPlugin::slotGotURL(const TQString &text)
{
if(text.isNull() && !ksvgd->description.isEmpty())
emit setStatusBarText(i18n("Description: %1").arg(ksvgd->description));
diff --git a/ksvg/plugin/ksvg_plugin.h b/ksvg/plugin/ksvg_plugin.h
index 87286be9..669d3661 100644
--- a/ksvg/plugin/ksvg_plugin.h
+++ b/ksvg/plugin/ksvg_plugin.h
@@ -21,7 +21,7 @@
#ifndef KSVGPlugin_H
#define KSVGPlugin_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kparts/part.h>
namespace KSVG
@@ -36,7 +36,7 @@ class KSVGPlugin : public KParts::ReadOnlyPart
{
Q_OBJECT
public:
- KSVGPlugin(QWidget *parentWidget, const char *wname, QObject *parent, const char *name, unsigned int width = 0, unsigned int height = 0);
+ KSVGPlugin(TQWidget *parentWidget, const char *wname, TQObject *parent, const char *name, unsigned int width = 0, unsigned int height = 0);
virtual ~KSVGPlugin();
virtual bool openFile() { return false; }
@@ -46,19 +46,19 @@ public:
KSVG::SVGDocumentImpl *docImpl();
void reset();
- void setPanPoint(const QPoint &translate);
+ void setPanPoint(const TQPoint &translate);
void update();
void setPopupActive(bool);
signals:
- void gotHyperlink(const QString &);
- void gotHyperlinkCoordinate(const QRect &);
+ void gotHyperlink(const TQString &);
+ void gotHyperlinkCoordinate(const TQRect &);
public slots:
- void slotRedraw(const QRect &);
+ void slotRedraw(const TQRect &);
private slots:
- void browseURL(const QString &url);
+ void browseURL(const TQString &url);
void slotStop();
void slotViewSource();
void slotViewMemory();
@@ -71,11 +71,11 @@ private slots:
void slotAboutKSVG();
void slotSaveToPNG();
- void slotParsingFinished(bool error, const QString &errorDesc);
+ void slotParsingFinished(bool error, const TQString &errorDesc);
void slotRenderingFinished();
- void slotSetDescription(const QString &);
- void slotSetTitle(const QString &);
- void slotGotURL(const QString &);
+ void slotSetDescription(const TQString &);
+ void slotSetTitle(const TQString &);
+ void slotGotURL(const TQString &);
private:
class Private;
diff --git a/ksvg/plugin/ksvg_widget.cpp b/ksvg/plugin/ksvg_widget.cpp
index 073e60a5..0f1b9d3e 100644
--- a/ksvg/plugin/ksvg_widget.cpp
+++ b/ksvg/plugin/ksvg_widget.cpp
@@ -27,8 +27,8 @@
#include "SVGDocumentImpl.h"
#include "SVGSVGElementImpl.h"
-KSVGWidget::KSVGWidget(KSVGPlugin *part, QWidget *parent, const char *name)
-: QWidget(parent, name), m_part(part)
+KSVGWidget::KSVGWidget(KSVGPlugin *part, TQWidget *parent, const char *name)
+: TQWidget(parent, name), m_part(part)
{
setMouseTracking(true);
setFocusPolicy(WheelFocus);
@@ -55,12 +55,12 @@ void KSVGWidget::reset()
m_panningPos.setY(0);
}
-void KSVGWidget::paintEvent(QPaintEvent *e)
+void KSVGWidget::paintEvent(TQPaintEvent *e)
{
emit redraw(e->rect());
}
-KSVG::SVGMouseEventImpl *KSVGWidget::newMouseEvent(KSVG::SVGEvent::EventId id, QMouseEvent *event)
+KSVG::SVGMouseEventImpl *KSVGWidget::newMouseEvent(KSVG::SVGEvent::EventId id, TQMouseEvent *event)
{
DOM::AbstractView temp;
@@ -102,9 +102,9 @@ KSVG::SVGMouseEventImpl *KSVGWidget::newMouseEvent(KSVG::SVGEvent::EventId id, Q
return mev;
}
-void KSVGWidget::mouseMoveEvent(QMouseEvent *event)
+void KSVGWidget::mouseMoveEvent(TQMouseEvent *event)
{
- if(event->state() & QMouseEvent::ControlButton && event->state() & QMouseEvent::LeftButton)
+ if(event->state() & TQMouseEvent::ControlButton && event->state() & TQMouseEvent::LeftButton)
{
if(m_panningPos.isNull())
m_panningPos = event->pos();
@@ -113,7 +113,7 @@ void KSVGWidget::mouseMoveEvent(QMouseEvent *event)
return;
}
- else if(event->state() & QMouseEvent::ControlButton)
+ else if(event->state() & TQMouseEvent::ControlButton)
return;
KSVG::SVGMouseEventImpl *mev = newMouseEvent(KSVG::SVGEvent::MOUSEMOVE_EVENT, event);
@@ -181,16 +181,16 @@ void KSVGWidget::mouseMoveEvent(QMouseEvent *event)
mev->deref();
}
-void KSVGWidget::mousePressEvent(QMouseEvent *event)
+void KSVGWidget::mousePressEvent(TQMouseEvent *event)
{
- if(event->state() & QMouseEvent::ControlButton)
+ if(event->state() & TQMouseEvent::ControlButton)
return;
if(event->button() == RightButton)
{
if(part() && part()->factory())
{
- QPopupMenu *popup = static_cast<QPopupMenu *>(part()->factory()->container("popupmenu", part()));
+ TQPopupMenu *popup = static_cast<TQPopupMenu *>(part()->factory()->container("popupmenu", part()));
if(popup)
popup->popup(event->globalPos());
}
@@ -204,7 +204,7 @@ void KSVGWidget::mousePressEvent(QMouseEvent *event)
mev->deref();
}
-void KSVGWidget::mouseReleaseEvent(QMouseEvent *event)
+void KSVGWidget::mouseReleaseEvent(TQMouseEvent *event)
{
if(!m_panningPos.isNull())
{
@@ -213,7 +213,7 @@ void KSVGWidget::mouseReleaseEvent(QMouseEvent *event)
m_panningPos.setY(0);
}
- if(event->state() & QMouseEvent::ControlButton)
+ if(event->state() & TQMouseEvent::ControlButton)
return;
KSVG::SVGMouseEventImpl *mev = newMouseEvent(KSVG::SVGEvent::MOUSEUP_EVENT, event);
@@ -223,7 +223,7 @@ void KSVGWidget::mouseReleaseEvent(QMouseEvent *event)
if(!mev->url().string().isEmpty())
{
- QString url = mev->url().string();
+ TQString url = mev->url().string();
if(url.startsWith("#"))
url.prepend(part()->docImpl()->baseUrl().prettyURL());
emit browseURL(url);
@@ -232,9 +232,9 @@ void KSVGWidget::mouseReleaseEvent(QMouseEvent *event)
mev->deref();
}
-void KSVGWidget::keyPressEvent(QKeyEvent *ke)
+void KSVGWidget::keyPressEvent(TQKeyEvent *ke)
{
- if(ke->stateAfter() & QMouseEvent::ControlButton)
+ if(ke->stateAfter() & TQMouseEvent::ControlButton)
{
setCursor(KCursor::sizeAllCursor());
return;
@@ -244,9 +244,9 @@ void KSVGWidget::keyPressEvent(QKeyEvent *ke)
part()->docImpl()->lastTarget()->dispatchKeyEvent(ke);
}
-void KSVGWidget::keyReleaseEvent(QKeyEvent *ke)
+void KSVGWidget::keyReleaseEvent(TQKeyEvent *ke)
{
- if(ke->state() & QMouseEvent::ControlButton)
+ if(ke->state() & TQMouseEvent::ControlButton)
{
setCursor(KCursor::arrowCursor());
return;
@@ -256,12 +256,12 @@ void KSVGWidget::keyReleaseEvent(QKeyEvent *ke)
part()->docImpl()->lastTarget()->dispatchKeyEvent(ke);
}
-void KSVGWidget::resizeEvent(QResizeEvent *e)
+void KSVGWidget::resizeEvent(TQResizeEvent *e)
{
if(part()->docImpl() && part()->docImpl()->rootElement())
part()->docImpl()->rootElement()->dispatchEvent(KSVG::SVGEvent::RESIZE_EVENT, true, false);
- emit redraw(QRect(0, 0, e->size().width(), e->size().height()));
+ emit redraw(TQRect(0, 0, e->size().width(), e->size().height()));
}
// vim:ts=4:noet
diff --git a/ksvg/plugin/ksvg_widget.h b/ksvg/plugin/ksvg_widget.h
index 3cd94849..c25fddbc 100644
--- a/ksvg/plugin/ksvg_widget.h
+++ b/ksvg/plugin/ksvg_widget.h
@@ -21,7 +21,7 @@
#ifndef KSVGWidget_H
#define KSVGWidget_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kpopupmenu.h>
@@ -32,7 +32,7 @@ class KSVGWidget : public QWidget
{
Q_OBJECT
public:
- KSVGWidget(KSVGPlugin *part, QWidget *parent, const char *name);
+ KSVGWidget(KSVGPlugin *part, TQWidget *parent, const char *name);
virtual ~KSVGWidget();
KSVGPlugin *part() const;
@@ -40,26 +40,26 @@ public:
void reset();
protected:
- virtual void paintEvent(QPaintEvent *);
+ virtual void paintEvent(TQPaintEvent *);
- virtual void mouseMoveEvent(QMouseEvent *);
- virtual void mousePressEvent(QMouseEvent *);
- virtual void mouseReleaseEvent(QMouseEvent *);
+ virtual void mouseMoveEvent(TQMouseEvent *);
+ virtual void mousePressEvent(TQMouseEvent *);
+ virtual void mouseReleaseEvent(TQMouseEvent *);
- virtual void keyPressEvent(QKeyEvent *);
- virtual void keyReleaseEvent(QKeyEvent *);
+ virtual void keyPressEvent(TQKeyEvent *);
+ virtual void keyReleaseEvent(TQKeyEvent *);
- virtual void resizeEvent(QResizeEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
signals:
- void browseURL(const QString &);
- void redraw(const QRect &);
+ void browseURL(const TQString &);
+ void redraw(const TQRect &);
private:
- KSVG::SVGMouseEventImpl *newMouseEvent(KSVG::SVGEvent::EventId id, QMouseEvent *event);
+ KSVG::SVGMouseEventImpl *newMouseEvent(KSVG::SVGEvent::EventId id, TQMouseEvent *event);
- QPoint m_panningPos;
- QPoint m_oldPanningPos;
+ TQPoint m_panningPos;
+ TQPoint m_oldPanningPos;
KSVGPlugin *m_part;
};
diff --git a/ksvg/plugin/svgcreator.cpp b/ksvg/plugin/svgcreator.cpp
index c6689c9a..dc20e06f 100644
--- a/ksvg/plugin/svgcreator.cpp
+++ b/ksvg/plugin/svgcreator.cpp
@@ -21,8 +21,8 @@
#include <time.h>
-#include <qpixmap.h>
-#include <qimage.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
#include "KSVGCanvas.h"
#include "CanvasFactory.h"
@@ -50,19 +50,19 @@ SVGCreator::~SVGCreator()
{
}
-bool SVGCreator::create(const QString &path, int width, int height, QImage &img)
+bool SVGCreator::create(const TQString &path, int width, int height, TQImage &img)
{
KSVG::SVGDocumentImpl *doc = new KSVG::SVGDocumentImpl(false, true);
doc->ref();
- QPixmap pix(width, height);
+ TQPixmap pix(width, height);
pix.fill(Qt::white);
KSVG::KSVGCanvas *c = KSVG::CanvasFactory::self()->loadCanvas(width, height);
c->setup(&pix, &pix);
doc->attach(c);
- connect(doc, SIGNAL(finishedRendering()), SLOT(slotFinished()));
+ connect(doc, TQT_SIGNAL(finishedRendering()), TQT_SLOT(slotFinished()));
doc->open( KURL::fromPathOrURL(path));
m_finished = false;
diff --git a/ksvg/plugin/svgcreator.h b/ksvg/plugin/svgcreator.h
index ad1b8f30..403f0a78 100644
--- a/ksvg/plugin/svgcreator.h
+++ b/ksvg/plugin/svgcreator.h
@@ -24,13 +24,13 @@
#include <kio/thumbcreator.h>
-class SVGCreator : public QObject, public ThumbCreator
+class SVGCreator : public TQObject, public ThumbCreator
{
Q_OBJECT
public:
SVGCreator();
virtual ~SVGCreator();
- virtual bool create(const QString &path, int width, int height, QImage &img);
+ virtual bool create(const TQString &path, int width, int height, TQImage &img);
virtual Flags flags() const;
private slots:
diff --git a/ksvg/test/external/SVGTestWidget.cc b/ksvg/test/external/SVGTestWidget.cc
index b954e94b..aa968e24 100644
--- a/ksvg/test/external/SVGTestWidget.cc
+++ b/ksvg/test/external/SVGTestWidget.cc
@@ -20,7 +20,7 @@ SVGTestWidget::SVGTestWidget(const KURL &url)
setMouseTracking(true);
setFocusPolicy(WheelFocus);
- m_doc = DocumentFactory::self()->requestDocument(this, SLOT(slotRenderingFinished()));
+ m_doc = DocumentFactory::self()->requestDocument(this, TQT_SLOT(slotRenderingFinished()));
if(!m_doc)
return;
@@ -46,7 +46,7 @@ SVGTestWidget::~SVGTestWidget()
void SVGTestWidget::slotRenderingFinished()
{
- QRect rect(0, 0, width(), height());
+ TQRect rect(0, 0, width(), height());
m_canvas->blit(rect, true);
SVGElement test = m_doc->rootElement().getElementById("test");
@@ -58,13 +58,13 @@ void SVGTestWidget::slotRenderingFinished()
}
}
-void SVGTestWidget::paintEvent(QPaintEvent *event)
+void SVGTestWidget::paintEvent(TQPaintEvent *event)
{
m_canvas->update();
m_canvas->blit(event->rect(), true);
}
-void SVGTestWidget::resizeEvent(QResizeEvent *event)
+void SVGTestWidget::resizeEvent(TQResizeEvent *event)
{
int w = event->size().width();
int h = event->size().height();
@@ -74,7 +74,7 @@ void SVGTestWidget::resizeEvent(QResizeEvent *event)
m_canvas->blit();
}
/*
-KSVG::SVGMouseEventImpl *newMouseEvent(SVGDocument *doc, KSVG::SVGEventImpl::EventId id, QMouseEvent *event)
+KSVG::SVGMouseEventImpl *newMouseEvent(SVGDocument *doc, KSVG::SVGEventImpl::EventId id, TQMouseEvent *event)
{
DOM::AbstractView temp;
@@ -116,28 +116,28 @@ KSVG::SVGMouseEventImpl *newMouseEvent(SVGDocument *doc, KSVG::SVGEventImpl::Eve
return mev;
}
-void SVGTestWidget::mouseMoveEvent(QMouseEvent *event)
+void SVGTestWidget::mouseMoveEvent(TQMouseEvent *event)
{
- if(event->state() & QMouseEvent::ControlButton && event->state() & QMouseEvent::LeftButton)
+ if(event->state() & TQMouseEvent::ControlButton && event->state() & TQMouseEvent::LeftButton)
{
if(m_panningPos.isNull())
m_panningPos = event->pos();
else
{
- QPoint panPoint = m_oldPanningPos - (m_panningPos - event->pos());
+ TQPoint panPoint = m_oldPanningPos - (m_panningPos - event->pos());
m_doc->rootElement()->setCurrentTranslate(panPoint);
// m_doc->syncCachedMatrices(); FIXME
m_canvas->update(panPoint);
}
return;
}
- else if(event->state() & QMouseEvent::ControlButton)
+ else if(event->state() & TQMouseEvent::ControlButton)
return;
}
-void SVGTestWidget::mousePressEvent(QMouseEvent *event)
+void SVGTestWidget::mousePressEvent(TQMouseEvent *event)
{
- if(event->state() & QMouseEvent::ControlButton)
+ if(event->state() & TQMouseEvent::ControlButton)
return;
KSVG::SVGMouseEventImpl *mev = newMouseEvent(m_doc, KSVG::SVGEventImpl::MOUSEDOWN_EVENT, event);
@@ -147,7 +147,7 @@ void SVGTestWidget::mousePressEvent(QMouseEvent *event)
mev->deref();
}
-void SVGTestWidget::mouseReleaseEvent(QMouseEvent *event)
+void SVGTestWidget::mouseReleaseEvent(TQMouseEvent *event)
{
if(!m_panningPos.isNull())
{
@@ -156,7 +156,7 @@ void SVGTestWidget::mouseReleaseEvent(QMouseEvent *event)
m_panningPos.setY(0);
}
- if(event->state() & QMouseEvent::ControlButton)
+ if(event->state() & TQMouseEvent::ControlButton)
return;
// only simulate mouse clicks for now
@@ -167,18 +167,18 @@ void SVGTestWidget::mouseReleaseEvent(QMouseEvent *event)
mev->deref();
}
-void SVGTestWidget::keyPressEvent(QKeyEvent *event)
+void SVGTestWidget::keyPressEvent(TQKeyEvent *event)
{
- if(event->stateAfter() & QMouseEvent::ControlButton)
+ if(event->stateAfter() & TQMouseEvent::ControlButton)
{
setCursor(KCursor::sizeAllCursor());
return;
}
}
-void SVGTestWidget::keyReleaseEvent(QKeyEvent *event)
+void SVGTestWidget::keyReleaseEvent(TQKeyEvent *event)
{
- if(event->state() & QMouseEvent::ControlButton)
+ if(event->state() & TQMouseEvent::ControlButton)
{
setCursor(KCursor::arrowCursor());
return;
diff --git a/ksvg/test/external/SVGTestWidget.h b/ksvg/test/external/SVGTestWidget.h
index 10ece576..676f3269 100644
--- a/ksvg/test/external/SVGTestWidget.h
+++ b/ksvg/test/external/SVGTestWidget.h
@@ -1,8 +1,8 @@
#ifndef _SVGTESTWIDGET_H
#define _SVGTESTWIDGET_H
-#include <qwidget.h>
-#include <qobject.h>
+#include <tqwidget.h>
+#include <tqobject.h>
#include "SVGDocument.h"
#include "KSVGCanvas.h"
@@ -17,17 +17,17 @@ private slots:
void slotRenderingFinished();
protected:
- virtual void paintEvent(QPaintEvent *event);
- virtual void resizeEvent(QResizeEvent *event);
-/* virtual void mousePressEvent(QMouseEvent *event);
- virtual void mouseReleaseEvent(QMouseEvent *event);
- virtual void keyPressEvent(QKeyEvent *event);
- virtual void keyReleaseEvent(QKeyEvent *event);
- virtual void mouseMoveEvent(QMouseEvent *event);
+ virtual void paintEvent(TQPaintEvent *event);
+ virtual void resizeEvent(TQResizeEvent *event);
+/* virtual void mousePressEvent(TQMouseEvent *event);
+ virtual void mouseReleaseEvent(TQMouseEvent *event);
+ virtual void keyPressEvent(TQKeyEvent *event);
+ virtual void keyReleaseEvent(TQKeyEvent *event);
+ virtual void mouseMoveEvent(TQMouseEvent *event);
*/
private:
- QPoint m_panningPos;
- QPoint m_oldPanningPos;
+ TQPoint m_panningPos;
+ TQPoint m_oldPanningPos;
KSVG::SVGDocument *m_doc;
KSVG::KSVGCanvas *m_canvas;
diff --git a/ksvg/test/external/printnodetest.cpp b/ksvg/test/external/printnodetest.cpp
index b2547e7f..1c2921f4 100644
--- a/ksvg/test/external/printnodetest.cpp
+++ b/ksvg/test/external/printnodetest.cpp
@@ -21,7 +21,7 @@ static KCmdLineOptions options[] =
Worker::Worker(const KURL &url)
{
- m_doc = DocumentFactory::self()->requestDocument(this, SLOT(slotParsingFinished(bool, const QString &)));
+ m_doc = DocumentFactory::self()->requestDocument(this, TQT_SLOT(slotParsingFinished(bool, const TQString &)));
if(!m_doc)
return;
@@ -35,7 +35,7 @@ Worker::~Worker()
delete m_doc;
}
-void Worker::slotParsingFinished(bool, const QString &)
+void Worker::slotParsingFinished(bool, const TQString &)
{
SVGWindow win = m_doc->window();
SVGSVGElement root = m_doc->rootElement();
diff --git a/ksvg/test/external/printnodetest.h b/ksvg/test/external/printnodetest.h
index e95a46a9..19385014 100644
--- a/ksvg/test/external/printnodetest.h
+++ b/ksvg/test/external/printnodetest.h
@@ -2,7 +2,7 @@
#define PRINTNODETEST_H
#include <kurl.h>
-#include <qobject.h>
+#include <tqobject.h>
namespace KSVG
{
@@ -16,7 +16,7 @@ public:
~Worker();
private slots:
- void slotParsingFinished(bool error, const QString &errorDesc);
+ void slotParsingFinished(bool error, const TQString &errorDesc);
private:
// It's not allowed to store a m_doc object here,
diff --git a/kuickshow/src/aboutwidget.cpp b/kuickshow/src/aboutwidget.cpp
index 2ae41102..fc9825fd 100644
--- a/kuickshow/src/aboutwidget.cpp
+++ b/kuickshow/src/aboutwidget.cpp
@@ -16,11 +16,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdatetime.h>
-#include <qevent.h>
-#include <qglobal.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
+#include <tqdatetime.h>
+#include <tqevent.h>
+#include <tqglobal.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
#include <kwin.h>
#include <kstandarddirs.h>
@@ -31,31 +31,31 @@
#include "aboutwidget.h"
-AboutWidget::AboutWidget( QWidget *parent, const char *name )
- : QVBox( parent, name, Qt::WShowModal )
+AboutWidget::AboutWidget( TQWidget *parent, const char *name )
+ : TQVBox( parent, name, Qt::WShowModal )
{
KWin::setType( winId(), NET::Override );
KWin::setState( winId(), NET::SkipTaskbar );
setFrameStyle( WinPanel | Raised );
- QGroupBox *gBox = new QGroupBox( 1, Horizontal, this);
+ TQGroupBox *gBox = new TQGroupBox( 1, Horizontal, this);
gBox->setGeometry( 10, 10, width()-20, height()-20 );
gBox->setAlignment( AlignHCenter );
gBox->installEventFilter( this );
- gBox->setPalette( QPalette( QColor( white ) ) );
+ gBox->setPalette( TQPalette( TQColor( white ) ) );
gBox->setBackgroundMode( PaletteBackground );
- int hour = QTime::currentTime().hour();
- QString file;
+ int hour = TQTime::currentTime().hour();
+ TQString file;
if ( hour >= 10 && hour < 16 )
file = locate("appdata", "pics/kuickshow-day.jpg");
else
file = locate("appdata", "pics/kuickshow-night.jpg");
- QLabel *authors = new QLabel("Kuickshow " KUICKSHOWVERSION
+ TQLabel *authors = new TQLabel("Kuickshow " KUICKSHOWVERSION
" was brought to you by", gBox);
authors->setAlignment( AlignCenter );
@@ -63,7 +63,7 @@ AboutWidget::AboutWidget( QWidget *parent, const char *name )
m_homepage->setURL( "http://devel-home.kde.org/~pfeiffer/kuickshow/" );
m_homepage->setAlignment( AlignCenter );
- QLabel *copy = new QLabel("(C) 1998-2006", gBox);
+ TQLabel *copy = new TQLabel("(C) 1998-2006", gBox);
copy->setAlignment( AlignCenter );
ImlibWidget *im = new ImlibWidget( 0L, gBox, "KuickShow Logo" );
@@ -80,16 +80,16 @@ AboutWidget::~AboutWidget()
{
}
-bool AboutWidget::eventFilter( QObject *o, QEvent *e )
+bool AboutWidget::eventFilter( TQObject *o, TQEvent *e )
{
- if ( e->type() == QEvent::MouseButtonPress ) {
- QMouseEvent *ev = static_cast<QMouseEvent*>( e );
+ if ( e->type() == TQEvent::MouseButtonPress ) {
+ TQMouseEvent *ev = static_cast<TQMouseEvent*>( e );
if ( !m_homepage->geometry().contains( ev->pos() ) ) {
deleteLater();
return true;
}
}
- return QVBox::eventFilter( o, e );
+ return TQVBox::eventFilter( o, e );
}
#include "aboutwidget.moc"
diff --git a/kuickshow/src/aboutwidget.h b/kuickshow/src/aboutwidget.h
index b9bc79d1..0f70ccaa 100644
--- a/kuickshow/src/aboutwidget.h
+++ b/kuickshow/src/aboutwidget.h
@@ -19,8 +19,8 @@
#ifndef ABOUTWIDGET_H
#define ABOUTWIDGET_H
-#include <qevent.h>
-#include <qvbox.h>
+#include <tqevent.h>
+#include <tqvbox.h>
class KURLWidget;
@@ -29,11 +29,11 @@ class AboutWidget : public QVBox
Q_OBJECT
public:
- AboutWidget(QWidget *parent = 0, const char *name = 0);
+ AboutWidget(TQWidget *parent = 0, const char *name = 0);
protected:
~AboutWidget();
- bool eventFilter( QObject*, QEvent * );
+ bool eventFilter( TQObject*, TQEvent * );
private:
KURLWidget *m_homepage;
diff --git a/kuickshow/src/defaultswidget.cpp b/kuickshow/src/defaultswidget.cpp
index 69807251..7e94b1b1 100644
--- a/kuickshow/src/defaultswidget.cpp
+++ b/kuickshow/src/defaultswidget.cpp
@@ -16,11 +16,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qvgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqvgroupbox.h>
#include <kcombobox.h>
#include <kdialog.h>
@@ -31,40 +31,40 @@
#include "imlibwidget.h"
#include "defaultswidget.h"
-DefaultsWidget::DefaultsWidget( QWidget *parent, const char *name)
- : QWidget( parent, name )
+DefaultsWidget::DefaultsWidget( TQWidget *parent, const char *name)
+ : TQWidget( parent, name )
{
imFiltered = 0L;
- cbEnableMods = new QCheckBox( i18n("Apply default image modifications"), this );
- connect( cbEnableMods, SIGNAL( toggled(bool) ), SLOT( enableWidgets(bool) ));
+ cbEnableMods = new TQCheckBox( i18n("Apply default image modifications"), this );
+ connect( cbEnableMods, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( enableWidgets(bool) ));
// create all the widgets
- gbScale = new QGroupBox( i18n("Scaling"), this );
+ gbScale = new TQGroupBox( i18n("Scaling"), this );
gbScale->setColumnLayout( 0, Qt::Horizontal );
- cbDownScale = new QCheckBox( i18n("Shrink image to screen size, if larger"),
+ cbDownScale = new TQCheckBox( i18n("Shrink image to screen size, if larger"),
gbScale, "shrinktoscreen" );
- cbUpScale = new QCheckBox( i18n("Scale image to screen size, if smaller, up to factor:"), gbScale, "upscale checkbox" );
+ cbUpScale = new TQCheckBox( i18n("Scale image to screen size, if smaller, up to factor:"), gbScale, "upscale checkbox" );
sbMaxUpScaleFactor = new KIntNumInput( gbScale, "upscale factor" );
sbMaxUpScaleFactor->setRange( 1, 100, 1, false );
- connect(cbUpScale, SIGNAL( toggled(bool)), sbMaxUpScaleFactor,
- SLOT( setEnabled(bool) ));
+ connect(cbUpScale, TQT_SIGNAL( toggled(bool)), sbMaxUpScaleFactor,
+ TQT_SLOT( setEnabled(bool) ));
// --
- gbGeometry = new QGroupBox( i18n("Geometry"), this );
+ gbGeometry = new TQGroupBox( i18n("Geometry"), this );
gbGeometry->setColumnLayout( 0, Qt::Horizontal );
- cbFlipVertically = new QCheckBox( i18n("Flip vertically"), gbGeometry );
+ cbFlipVertically = new TQCheckBox( i18n("Flip vertically"), gbGeometry );
- cbFlipHorizontally = new QCheckBox( i18n("Flip horizontally"), gbGeometry );
+ cbFlipHorizontally = new TQCheckBox( i18n("Flip horizontally"), gbGeometry );
- lbRotate = new QLabel( i18n("Rotate image:"), gbGeometry );
+ lbRotate = new TQLabel( i18n("Rotate image:"), gbGeometry );
comboRotate = new KComboBox( gbGeometry, "rotate combobox" );
comboRotate->insertItem( i18n("0 Degrees") );
@@ -74,7 +74,7 @@ DefaultsWidget::DefaultsWidget( QWidget *parent, const char *name)
// --
- gbAdjust = new QVGroupBox( i18n("Adjustments"), this );
+ gbAdjust = new TQVGroupBox( i18n("Adjustments"), this );
sbBrightness = new KIntNumInput( gbAdjust, "brightness spinbox" );
sbBrightness->setRange( -256, 256, 1, true );
@@ -91,37 +91,37 @@ DefaultsWidget::DefaultsWidget( QWidget *parent, const char *name)
// --
- gbPreview = new QGroupBox( i18n("Preview"), this );
+ gbPreview = new TQGroupBox( i18n("Preview"), this );
gbPreview->setAlignment( AlignCenter );
- lbImOrig = new QLabel( i18n("Original"), gbPreview );
+ lbImOrig = new TQLabel( i18n("Original"), gbPreview );
imOrig = new ImlibWidget( 0L, gbPreview, "original image" );
- lbImFiltered = new QLabel( i18n("Modified"), gbPreview );
+ lbImFiltered = new TQLabel( i18n("Modified"), gbPreview );
imFiltered = new ImlibWidget( 0L, imOrig->getImlibData(), gbPreview, "" );
- connect( imFiltered, SIGNAL( destroyed() ), SLOT( slotNoImage() ));
+ connect( imFiltered, TQT_SIGNAL( destroyed() ), TQT_SLOT( slotNoImage() ));
////
////////////////
// layout management
- QVBoxLayout *mainLayout = new QVBoxLayout( this, 0,
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 0,
KDialog::spacingHint(), "main layout" );
- QVBoxLayout *gbScaleLayout = new QVBoxLayout( gbScale->layout(),
+ TQVBoxLayout *gbScaleLayout = new TQVBoxLayout( gbScale->layout(),
KDialog::spacingHint());
- QVBoxLayout *gbGeometryLayout = new QVBoxLayout(gbGeometry->layout(),
+ TQVBoxLayout *gbGeometryLayout = new TQVBoxLayout(gbGeometry->layout(),
KDialog::spacingHint());
- QGridLayout *gbPreviewLayout = new QGridLayout(gbPreview, 2, 3, 0,
+ TQGridLayout *gbPreviewLayout = new TQGridLayout(gbPreview, 2, 3, 0,
KDialog::spacingHint());
- QHBoxLayout *scaleLayout = new QHBoxLayout();
- QHBoxLayout *rotateLayout = new QHBoxLayout();
+ TQHBoxLayout *scaleLayout = new TQHBoxLayout();
+ TQHBoxLayout *rotateLayout = new TQHBoxLayout();
mainLayout->addWidget( cbEnableMods );
mainLayout->addWidget( gbScale );
- QHBoxLayout *hl = new QHBoxLayout();
+ TQHBoxLayout *hl = new TQHBoxLayout();
hl->addWidget( gbGeometry );
hl->addWidget( gbAdjust );
mainLayout->addLayout( hl );
@@ -159,19 +159,19 @@ DefaultsWidget::DefaultsWidget( QWidget *parent, const char *name)
////////////////
// connect them all to the update slot
- connect( cbDownScale, SIGNAL( clicked() ), SLOT( updatePreview() ));
- connect( cbUpScale, SIGNAL( clicked() ), SLOT( updatePreview() ));
- connect( cbFlipVertically, SIGNAL( clicked() ), SLOT( updatePreview() ));
- connect( cbFlipHorizontally, SIGNAL( clicked() ), SLOT( updatePreview() ));
- connect( sbMaxUpScaleFactor, SIGNAL( valueChanged(int) ), SLOT( updatePreview() ));
- connect( sbBrightness, SIGNAL( valueChanged(int) ), SLOT( updatePreview() ));
- connect( sbContrast, SIGNAL( valueChanged(int) ), SLOT( updatePreview() ));
- connect( sbGamma, SIGNAL( valueChanged(int) ), SLOT( updatePreview() ));
+ connect( cbDownScale, TQT_SIGNAL( clicked() ), TQT_SLOT( updatePreview() ));
+ connect( cbUpScale, TQT_SIGNAL( clicked() ), TQT_SLOT( updatePreview() ));
+ connect( cbFlipVertically, TQT_SIGNAL( clicked() ), TQT_SLOT( updatePreview() ));
+ connect( cbFlipHorizontally, TQT_SIGNAL( clicked() ), TQT_SLOT( updatePreview() ));
+ connect( sbMaxUpScaleFactor, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( updatePreview() ));
+ connect( sbBrightness, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( updatePreview() ));
+ connect( sbContrast, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( updatePreview() ));
+ connect( sbGamma, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( updatePreview() ));
- connect( comboRotate, SIGNAL( activated(int) ), SLOT( updatePreview() ));
+ connect( comboRotate, TQT_SIGNAL( activated(int) ), TQT_SLOT( updatePreview() ));
- QString filename = locate( "data", "kuickshow/pics/calibrate.png" );
+ TQString filename = locate( "data", "kuickshow/pics/calibrate.png" );
if ( !imOrig->loadImage( filename ) )
imOrig = 0L; // FIXME - display some errormessage!
if ( !imFiltered->loadImage( filename ) )
diff --git a/kuickshow/src/defaultswidget.h b/kuickshow/src/defaultswidget.h
index 3febb098..5eeae365 100644
--- a/kuickshow/src/defaultswidget.h
+++ b/kuickshow/src/defaultswidget.h
@@ -24,8 +24,8 @@
class ImlibWidget;
class ImData;
-class QCheckBox;
-class QLabel;
+class TQCheckBox;
+class TQLabel;
class KComboBox;
class KIntNumInput;
@@ -35,7 +35,7 @@ class DefaultsWidget : public QWidget
Q_OBJECT
public:
- DefaultsWidget( QWidget *parent, const char *name );
+ DefaultsWidget( TQWidget *parent, const char *name );
~DefaultsWidget();
void loadSettings( const KuickData& data );
@@ -44,22 +44,22 @@ public:
private:
Rotation currentRotation() const;
- QCheckBox *cbEnableMods;
+ TQCheckBox *cbEnableMods;
- QGroupBox *gbScale;
- QCheckBox *cbUpScale, *cbDownScale;
+ TQGroupBox *gbScale;
+ TQCheckBox *cbUpScale, *cbDownScale;
KIntNumInput *sbMaxUpScaleFactor;
- QGroupBox *gbAdjust;
+ TQGroupBox *gbAdjust;
KIntNumInput *sbBrightness, *sbContrast, *sbGamma;
- QGroupBox *gbGeometry;
- QLabel *lbRotate;
+ TQGroupBox *gbGeometry;
+ TQLabel *lbRotate;
KComboBox *comboRotate;
- QCheckBox *cbFlipVertically, *cbFlipHorizontally;
+ TQCheckBox *cbFlipVertically, *cbFlipHorizontally;
- QGroupBox *gbPreview;
- QLabel *lbImOrig, *lbImFiltered;
+ TQGroupBox *gbPreview;
+ TQLabel *lbImOrig, *lbImFiltered;
ImlibWidget *imOrig, *imFiltered;
diff --git a/kuickshow/src/filecache.cpp b/kuickshow/src/filecache.cpp
index c1c1affe..006bf46e 100644
--- a/kuickshow/src/filecache.cpp
+++ b/kuickshow/src/filecache.cpp
@@ -1,6 +1,6 @@
#include <unistd.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -41,7 +41,7 @@ FileCache * FileCache::self()
KuickFile * FileCache::getFile( const KURL& url )
{
- QString urlString = url.prettyURL();
+ TQString urlString = url.prettyURL();
KuickFile *file = m_files.find( urlString );
if ( !file ) {
file = new KuickFile( url );
@@ -51,14 +51,14 @@ KuickFile * FileCache::getFile( const KURL& url )
return file;
}
-QString FileCache::tempDir()
+TQString FileCache::tempDir()
{
if ( !m_tempDir ) {
m_tempDir = createTempDir();
if ( !m_tempDir ) {
kdWarning() << "Unable to create temporary directory for KuickShow" << endl;
- return QString::null;
+ return TQString::null;
}
}
@@ -68,9 +68,9 @@ QString FileCache::tempDir()
KTempDir * FileCache::createTempDir()
{
- QString tmpName = QString::fromLatin1( KGlobal::instance()->instanceName() );
- tmpName.append( QString::number( getpid() ) );
- QString dirName = locateLocal( "tmp", tmpName );
+ TQString tmpName = TQString::fromLatin1( KGlobal::instance()->instanceName() );
+ tmpName.append( TQString::number( getpid() ) );
+ TQString dirName = locateLocal( "tmp", tmpName );
KTempDir *dir = new KTempDir( dirName );
dir->setAutoDelete( true );
if ( dir->status() != 0L )
diff --git a/kuickshow/src/filecache.h b/kuickshow/src/filecache.h
index 16e53261..7cb97526 100644
--- a/kuickshow/src/filecache.h
+++ b/kuickshow/src/filecache.h
@@ -10,7 +10,7 @@
#ifndef FILECACHE_H
#define FILECACHE_H
-#include <qcache.h>
+#include <tqcache.h>
#include "kuickfile.h"
@@ -27,9 +27,9 @@ public:
int getLimit() const { return m_limit; }
/**
- * @return the temporary directory or QString::null if none available
+ * @return the temporary directory or TQString::null if none available
*/
- QString tempDir();
+ TQString tempDir();
private:
static FileCache *s_self;
@@ -37,7 +37,7 @@ private:
~FileCache();
KTempDir * createTempDir();
- QCache<KuickFile> m_files;
+ TQCache<KuickFile> m_files;
int m_limit;
KTempDir *m_tempDir;
diff --git a/kuickshow/src/filefinder.cpp b/kuickshow/src/filefinder.cpp
index 9dda0046..35bb382a 100644
--- a/kuickshow/src/filefinder.cpp
+++ b/kuickshow/src/filefinder.cpp
@@ -16,7 +16,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qkeycode.h>
+#include <tqkeycode.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -26,7 +26,7 @@
#include "filefinder.h"
-FileFinder::FileFinder( QWidget *parent, const char *name )
+FileFinder::FileFinder( TQWidget *parent, const char *name )
: KLineEdit( parent, name )
{
// make this widget just as large, as the font is + 8 Pixels
@@ -37,12 +37,12 @@ FileFinder::FileFinder( QWidget *parent, const char *name )
setHandleSignals( true ); // we want the completionbox signals
completionBox()->setTabHandling( true );
- connect( completionBox(), SIGNAL( userCancelled(const QString&) ),
- SLOT( hide() ));
- connect( completionBox(), SIGNAL( activated( const QString& ) ),
- SLOT( slotAccept( const QString& )));
- connect( this, SIGNAL( returnPressed( const QString& )),
- SLOT( slotAccept( const QString& ) ));
+ connect( completionBox(), TQT_SIGNAL( userCancelled(const TQString&) ),
+ TQT_SLOT( hide() ));
+ connect( completionBox(), TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_SLOT( slotAccept( const TQString& )));
+ connect( this, TQT_SIGNAL( returnPressed( const TQString& )),
+ TQT_SLOT( slotAccept( const TQString& ) ));
KURLCompletion *comp = new KURLCompletion();
comp->setReplaceHome( true );
@@ -65,13 +65,13 @@ FileFinder::~FileFinder()
config->writeEntry( "FileFinderCompletionMode", completionMode() );
}
-void FileFinder::focusOutEvent( QFocusEvent *e )
+void FileFinder::focusOutEvent( TQFocusEvent *e )
{
- if ( e->reason() != QFocusEvent::Popup )
+ if ( e->reason() != TQFocusEvent::Popup )
hide();
}
-void FileFinder::keyPressEvent( QKeyEvent *e )
+void FileFinder::keyPressEvent( TQKeyEvent *e )
{
int key = e->key();
if ( key == Key_Escape ) {
@@ -90,7 +90,7 @@ void FileFinder::hide()
parentWidget()->setFocus();
}
-void FileFinder::slotAccept( const QString& dir )
+void FileFinder::slotAccept( const TQString& dir )
{
hide();
emit enterDir( dir );
diff --git a/kuickshow/src/filefinder.h b/kuickshow/src/filefinder.h
index f75c69a4..fc94bd71 100644
--- a/kuickshow/src/filefinder.h
+++ b/kuickshow/src/filefinder.h
@@ -19,7 +19,7 @@
#ifndef FILEFINDER_H
#define FILEFINDER_H
-#include <qevent.h>
+#include <tqevent.h>
#include <klineedit.h>
@@ -30,7 +30,7 @@ class FileFinder : public KLineEdit
Q_OBJECT
public:
- FileFinder( QWidget *parent=0, const char *name=0 );
+ FileFinder( TQWidget *parent=0, const char *name=0 );
~FileFinder();
KURLCompletion *completion() {
@@ -40,14 +40,14 @@ public:
virtual void hide();
signals:
- void enterDir( const QString& );
+ void enterDir( const TQString& );
protected:
- virtual void focusOutEvent( QFocusEvent * );
- virtual void keyPressEvent( QKeyEvent * );
+ virtual void focusOutEvent( TQFocusEvent * );
+ virtual void keyPressEvent( TQKeyEvent * );
private slots:
- void slotAccept( const QString& );
+ void slotAccept( const TQString& );
};
diff --git a/kuickshow/src/filewidget.cpp b/kuickshow/src/filewidget.cpp
index d4b99f0a..d697db21 100644
--- a/kuickshow/src/filewidget.cpp
+++ b/kuickshow/src/filewidget.cpp
@@ -16,7 +16,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qkeycode.h>
+#include <tqkeycode.h>
#include <kdeversion.h>
#include <kglobal.h>
@@ -35,7 +35,7 @@
#undef KeyPress
#endif
-FileWidget::FileWidget( const KURL& url, QWidget *parent, const char *name )
+FileWidget::FileWidget( const KURL& url, TQWidget *parent, const char *name )
: KDirOperator( url, parent, name ),
m_validCompletion( false ),
m_fileFinder( 0L )
@@ -55,21 +55,21 @@ FileWidget::FileWidget( const KURL& url, QWidget *parent, const char *name )
dirCompletionObject()->setCompletionMode( KGlobalSettings::CompletionAuto);
slotViewChanged();
- connect( this, SIGNAL( viewChanged( KFileView * )),
- SLOT( slotViewChanged() ));
+ connect( this, TQT_SIGNAL( viewChanged( KFileView * )),
+ TQT_SLOT( slotViewChanged() ));
- connect( dirLister(), SIGNAL( clear() ), SLOT( slotItemsCleared() ));
- connect( dirLister(), SIGNAL( deleteItem( KFileItem * ) ),
- SLOT( slotItemDeleted( KFileItem *) ));
+ connect( dirLister(), TQT_SIGNAL( clear() ), TQT_SLOT( slotItemsCleared() ));
+ connect( dirLister(), TQT_SIGNAL( deleteItem( KFileItem * ) ),
+ TQT_SLOT( slotItemDeleted( KFileItem *) ));
- connect( this, SIGNAL( fileHighlighted( const KFileItem * )),
- SLOT( slotHighlighted( const KFileItem * )));
+ connect( this, TQT_SIGNAL( fileHighlighted( const KFileItem * )),
+ TQT_SLOT( slotHighlighted( const KFileItem * )));
- connect( this, SIGNAL(urlEntered(const KURL&)),
- SLOT( slotURLEntered( const KURL& )));
+ connect( this, TQT_SIGNAL(urlEntered(const KURL&)),
+ TQT_SLOT( slotURLEntered( const KURL& )));
// should actually be KDirOperator's job!
- connect( this, SIGNAL( finishedLoading() ), SLOT( slotFinishedLoading() ));
+ connect( this, TQT_SIGNAL( finishedLoading() ), TQT_SLOT( slotFinishedLoading() ));
}
FileWidget::~FileWidget()
@@ -97,9 +97,9 @@ void FileWidget::initActions()
// so we move it to the real bottom
menu->remove( coll->action( "properties" ) );
- QPopupMenu *pMenu = menu->popupMenu();
+ TQPopupMenu *pMenu = menu->popupMenu();
int lastItemId = pMenu->idAt( pMenu->count() - 1 );
- QMenuItem *mItem = pMenu->findItem( lastItemId );
+ TQMenuItem *mItem = pMenu->findItem( lastItemId );
if ( mItem && !mItem->isSeparator() )
menu->insert( sep );
@@ -113,7 +113,7 @@ void FileWidget::reloadConfiguration()
{
if ( kdata->fileFilter != nameFilter() ) {
// At first, our list must have folders
- QStringList mimes;
+ TQStringList mimes;
mimes.append("inode/directory");
// Then, all the images!
@@ -133,7 +133,7 @@ bool FileWidget::hasFiles() const
return (numFiles() > 0);
}
-void FileWidget::activatedMenu( const KFileItem *item, const QPoint& pos )
+void FileWidget::activatedMenu( const KFileItem *item, const TQPoint& pos )
{
bool image = isImage( item );
actionCollection()->action("kuick_showInSameWindow")->setEnabled( image );
@@ -149,11 +149,11 @@ void FileWidget::activatedMenu( const KFileItem *item, const QPoint& pos )
KDirOperator::activatedMenu( item, pos );
}
-void FileWidget::findCompletion( const QString& text )
+void FileWidget::findCompletion( const TQString& text )
{
if ( text.at(0) == '/' || text.at(0) == '~' ||
text.find('/') != -1 ) {
- QString t = m_fileFinder->completion()->makeCompletion( text );
+ TQString t = m_fileFinder->completion()->makeCompletion( text );
if (m_fileFinder->completionMode() == KGlobalSettings::CompletionPopup ||
m_fileFinder->completionMode() == KGlobalSettings::CompletionPopupAuto)
@@ -166,7 +166,7 @@ void FileWidget::findCompletion( const QString& text )
return;
}
- QString file = makeDirCompletion( text );
+ TQString file = makeDirCompletion( text );
if ( file.isNull() )
file = makeCompletion( text );
@@ -176,10 +176,10 @@ void FileWidget::findCompletion( const QString& text )
KDirOperator::setCurrentItem( file );
}
-bool FileWidget::eventFilter( QObject *o, QEvent *e )
+bool FileWidget::eventFilter( TQObject *o, TQEvent *e )
{
- if ( e->type() == QEvent::KeyPress ) {
- QKeyEvent *k = static_cast<QKeyEvent*>( e );
+ if ( e->type() == TQEvent::KeyPress ) {
+ TQKeyEvent *k = static_cast<TQKeyEvent*>( e );
if ( (k->state() & (ControlButton | AltButton)) == 0 ) {
int key = k->key();
@@ -195,17 +195,17 @@ bool FileWidget::eventFilter( QObject *o, QEvent *e )
return true;
}
- const QString& text = k->text();
+ const TQString& text = k->text();
if ( !text.isEmpty() && text.unicode()->isPrint() ) {
k->accept();
if ( !m_fileFinder ) {
m_fileFinder = new FileFinder( this, "file finder" );
- connect( m_fileFinder, SIGNAL( completion(const QString&)),
- SLOT( findCompletion( const QString& )));
+ connect( m_fileFinder, TQT_SIGNAL( completion(const TQString&)),
+ TQT_SLOT( findCompletion( const TQString& )));
connect( m_fileFinder,
- SIGNAL( enterDir( const QString& ) ),
- SLOT( slotReturnPressed( const QString& )));
+ TQT_SIGNAL( enterDir( const TQString& ) ),
+ TQT_SLOT( slotReturnPressed( const TQString& )));
m_fileFinder->move( width() - m_fileFinder->width(),
height() - m_fileFinder->height() );
}
@@ -360,7 +360,7 @@ void FileWidget::slotViewChanged()
void FileWidget::slotItemsCleared()
{
- m_currentURL = QString::null;
+ m_currentURL = TQString::null;
}
void FileWidget::slotItemDeleted( KFileItem *item )
@@ -383,16 +383,16 @@ void FileWidget::slotHighlighted( const KFileItem *item )
m_currentURL = item->url().url();
}
-void FileWidget::slotReturnPressed( const QString& t )
+void FileWidget::slotReturnPressed( const TQString& t )
{
// we need a / at the end, otherwise replacedPath() will cut off the dir,
// assuming it is a filename
- QString text = t;
+ TQString text = t;
if ( text.at( text.length()-1 ) != '/' )
text += '/';
if ( text.at(0) == '/' || text.at(0) == '~' ) {
- QString dir = m_fileFinder->completion()->replacedPath( text );
+ TQString dir = m_fileFinder->completion()->replacedPath( text );
KURL url;
url.setPath( dir );
@@ -400,7 +400,7 @@ void FileWidget::slotReturnPressed( const QString& t )
}
else if ( text.find('/') != (int) text.length() -1 ) { // relative path
- QString dir = m_fileFinder->completion()->replacedPath( text );
+ TQString dir = m_fileFinder->completion()->replacedPath( text );
KURL u( url(), dir );
setURL( u, true );
}
@@ -425,7 +425,7 @@ void FileWidget::setCurrentItem( const KFileItem *item )
}
}
-void FileWidget::setInitialItem( const QString& filename )
+void FileWidget::setInitialItem( const TQString& filename )
{
m_initialName = filename;
}
@@ -444,16 +444,16 @@ void FileWidget::slotFinishedLoading()
else if ( !current )
setCurrentItem( view()->items()->getFirst() );
- m_initialName = QString::null;
+ m_initialName = TQString::null;
emit finished();
}
-QSize FileWidget::sizeHint() const
+TQSize FileWidget::sizeHint() const
{
- return QSize( 300, 300 );
+ return TQSize( 300, 300 );
}
-void FileWidget::resizeEvent( QResizeEvent *e )
+void FileWidget::resizeEvent( TQResizeEvent *e )
{
KDirOperator::resizeEvent( e );
if ( m_fileFinder )
diff --git a/kuickshow/src/filewidget.h b/kuickshow/src/filewidget.h
index a785fd85..2022bdbc 100644
--- a/kuickshow/src/filewidget.h
+++ b/kuickshow/src/filewidget.h
@@ -19,7 +19,7 @@
#ifndef FILEWIDGET_H
#define FILEWIDGET_H
-#include <qevent.h>
+#include <tqevent.h>
#include <kdiroperator.h>
@@ -33,20 +33,20 @@ class FileWidget : public KDirOperator
public:
enum WhichItem { Previous, Next, Current };
- FileWidget( const KURL& url, QWidget *parent = 0L, const char *name = 0L );
+ FileWidget( const KURL& url, TQWidget *parent = 0L, const char *name = 0L );
~FileWidget();
bool hasFiles() const;
void reloadConfiguration();
- void setInitialItem( const QString& filename );
+ void setInitialItem( const TQString& filename );
KFileItem *getCurrentItem( bool onlyImage ) const {
return getItem( Current, onlyImage );
}
void setCurrentItem( const KFileItem * );
- void setCurrentItem( const QString& filename ) {
+ void setCurrentItem( const TQString& filename ) {
KDirOperator::setCurrentItem( filename );
}
@@ -67,14 +67,14 @@ signals:
void finished();
protected:
- virtual bool eventFilter( QObject *o, QEvent * );
- virtual void resizeEvent( QResizeEvent * );
- virtual void activatedMenu( const KFileItem *, const QPoint& );
- virtual QSize sizeHint() const;
+ virtual bool eventFilter( TQObject *o, TQEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
+ virtual void activatedMenu( const KFileItem *, const TQPoint& );
+ virtual TQSize sizeHint() const;
private slots:
- void slotReturnPressed( const QString& text );
- void findCompletion( const QString& );
+ void slotReturnPressed( const TQString& text );
+ void findCompletion( const TQString& );
void slotViewChanged();
void slotItemsCleared();
@@ -89,8 +89,8 @@ private:
bool m_validCompletion;
FileFinder *m_fileFinder;
- QString m_currentURL;
- QString m_initialName;
+ TQString m_currentURL;
+ TQString m_initialName;
};
diff --git a/kuickshow/src/generalwidget.cpp b/kuickshow/src/generalwidget.cpp
index 3b718d69..1308885a 100644
--- a/kuickshow/src/generalwidget.cpp
+++ b/kuickshow/src/generalwidget.cpp
@@ -16,11 +16,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qvgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqvgroupbox.h>
#include <kapplication.h>
#include <kcolorbutton.h>
@@ -33,13 +33,13 @@
#include "generalwidget.h"
-GeneralWidget::GeneralWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+GeneralWidget::GeneralWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
layout->setSpacing( KDialog::spacingHint() );
- QPixmap pixmap = UserIcon( "logo" );
+ TQPixmap pixmap = UserIcon( "logo" );
KURLLabel *logo = new KURLLabel( this );
logo->setURL( "http://devel-home.kde.org/~pfeiffer/kuickshow/" );
logo->setPixmap( pixmap );
@@ -47,22 +47,22 @@ GeneralWidget::GeneralWidget( QWidget *parent, const char *name )
logo->setTipText( i18n( "Open KuickShow Website" ) );
logo->setUseTips( true );
- connect( logo, SIGNAL( leftClickedURL( const QString & ) ),
- SLOT( slotURLClicked( const QString & ) ) );
+ connect( logo, TQT_SIGNAL( leftClickedURL( const TQString & ) ),
+ TQT_SLOT( slotURLClicked( const TQString & ) ) );
layout->addWidget( logo, 0, AlignRight );
- cbFullscreen = new QCheckBox( i18n("Fullscreen mode"), this, "boscreen" );
+ cbFullscreen = new TQCheckBox( i18n("Fullscreen mode"), this, "boscreen" );
- cbPreload = new QCheckBox( i18n("Preload next image"), this, "preload");
- cbLastdir = new QCheckBox( i18n("Remember last folder"), this, "restart_lastdir");
+ cbPreload = new TQCheckBox( i18n("Preload next image"), this, "preload");
+ cbLastdir = new TQCheckBox( i18n("Remember last folder"), this, "restart_lastdir");
- QGridLayout *gridLayout = new QGridLayout( 2, 2 );
+ TQGridLayout *gridLayout = new TQGridLayout( 2, 2 );
gridLayout->setSpacing( KDialog::spacingHint() );
- QLabel *l0 = new QLabel( i18n("Background color:"), this );
+ TQLabel *l0 = new TQLabel( i18n("Background color:"), this );
colorButton = new KColorButton( this );
- QLabel *l1 = new QLabel( i18n("Show only files with extension: "), this, "label" );
+ TQLabel *l1 = new TQLabel( i18n("Show only files with extension: "), this, "label" );
editFilter = new KLineEdit( this, "filteredit" );
gridLayout->addWidget( l0, 0, 0 );
@@ -77,24 +77,24 @@ GeneralWidget::GeneralWidget( QWidget *parent, const char *name )
////////////////////////////////////////////////////////////////////////
- QVGroupBox *gbox2 = new QVGroupBox( i18n("Quality/Speed"),
+ TQVGroupBox *gbox2 = new TQVGroupBox( i18n("Quality/Speed"),
this, "qualitybox" );
layout->addWidget( gbox2 );
layout->addStretch();
- cbSmoothScale = new QCheckBox( i18n("Smooth scaling"), gbox2, "smoothscale" );
- cbFastRender = new QCheckBox( i18n("Fast rendering"), gbox2, "fastrender" );
- cbDither16bit = new QCheckBox( i18n("Dither in HiColor (15/16bit) modes"),
+ cbSmoothScale = new TQCheckBox( i18n("Smooth scaling"), gbox2, "smoothscale" );
+ cbFastRender = new TQCheckBox( i18n("Fast rendering"), gbox2, "fastrender" );
+ cbDither16bit = new TQCheckBox( i18n("Dither in HiColor (15/16bit) modes"),
gbox2, "dither16bit" );
- cbDither8bit = new QCheckBox( i18n("Dither in LowColor (<=8bit) modes"),
+ cbDither8bit = new TQCheckBox( i18n("Dither in LowColor (<=8bit) modes"),
gbox2, "dither8bit" );
- cbOwnPalette = new QCheckBox( i18n("Use own color palette"),
+ cbOwnPalette = new TQCheckBox( i18n("Use own color palette"),
gbox2, "pal");
- connect( cbOwnPalette, SIGNAL( clicked() ), this, SLOT( useOwnPalette() ) );
+ connect( cbOwnPalette, TQT_SIGNAL( clicked() ), this, TQT_SLOT( useOwnPalette() ) );
- cbFastRemap = new QCheckBox( i18n("Fast palette remapping"), gbox2, "remap");
+ cbFastRemap = new TQCheckBox( i18n("Fast palette remapping"), gbox2, "remap");
maxCacheSpinBox = new KIntNumInput( gbox2, "editmaxcache" );
maxCacheSpinBox->setLabel( i18n("Maximum cache size: "), AlignVCenter );
@@ -110,7 +110,7 @@ GeneralWidget::~GeneralWidget()
{
}
-void GeneralWidget::slotURLClicked( const QString & url )
+void GeneralWidget::slotURLClicked( const TQString & url )
{
kapp->invokeBrowser( url );
}
diff --git a/kuickshow/src/generalwidget.h b/kuickshow/src/generalwidget.h
index e39eef18..e84c46ac 100644
--- a/kuickshow/src/generalwidget.h
+++ b/kuickshow/src/generalwidget.h
@@ -19,11 +19,11 @@
#ifndef GENERALWIDGET_H
#define GENERALWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kuickdata.h"
-class QCheckBox;
+class TQCheckBox;
class KColorButton;
class KLineEdit;
class KIntNumInput;
@@ -34,16 +34,16 @@ class GeneralWidget : public QWidget
Q_OBJECT
public:
- GeneralWidget( QWidget *parent, const char *name );
+ GeneralWidget( TQWidget *parent, const char *name );
~GeneralWidget();
void loadSettings( const KuickData& data );
void applySettings( KuickData& data );
private:
- QCheckBox *cbFullscreen, *cbActiveWindow, *cbPreload, *cbLastdir;
- QCheckBox *cbSmoothScale, *cbFastRemap, *cbFastRender;
- QCheckBox *cbDither16bit, *cbDither8bit, *cbOwnPalette;
+ TQCheckBox *cbFullscreen, *cbActiveWindow, *cbPreload, *cbLastdir;
+ TQCheckBox *cbSmoothScale, *cbFastRemap, *cbFastRender;
+ TQCheckBox *cbDither16bit, *cbDither8bit, *cbOwnPalette;
KLineEdit *editFilter;
KIntNumInput *maxCacheSpinBox;
@@ -55,7 +55,7 @@ private:
private slots:
void useOwnPalette();
- void slotURLClicked( const QString & );
+ void slotURLClicked( const TQString & );
};
diff --git a/kuickshow/src/imagewindow.cpp b/kuickshow/src/imagewindow.cpp
index c63a3c67..72de91c1 100644
--- a/kuickshow/src/imagewindow.cpp
+++ b/kuickshow/src/imagewindow.cpp
@@ -18,23 +18,23 @@
#include <stdlib.h>
-#include <qcheckbox.h>
-#include <qcursor.h>
-#include <qdrawutil.h>
-#include <qfileinfo.h>
-#include <qkeycode.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qpopupmenu.h>
+#include <tqcheckbox.h>
+#include <tqcursor.h>
+#include <tqdrawutil.h>
+#include <tqfileinfo.h>
+#include <tqkeycode.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqpopupmenu.h>
#ifdef KDE_USE_FINAL
#undef GrayScale
#undef Color
#endif
-#include <qrect.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqrect.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -72,16 +72,16 @@
#undef GrayScale
-QCursor *ImageWindow::s_handCursor = 0L;
+TQCursor *ImageWindow::s_handCursor = 0L;
-ImageWindow::ImageWindow( ImData *_idata, ImlibData *id, QWidget *parent,
+ImageWindow::ImageWindow( ImData *_idata, ImlibData *id, TQWidget *parent,
const char *name )
: ImlibWidget( _idata, id, parent, name )
{
init();
}
-ImageWindow::ImageWindow( ImData *_idata, QWidget *parent, const char *name )
+ImageWindow::ImageWindow( ImData *_idata, TQWidget *parent, const char *name )
: ImlibWidget( _idata, parent, name )
{
init();
@@ -94,7 +94,7 @@ ImageWindow::~ImageWindow()
void ImageWindow::init()
{
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
KCursor::setAutoHideCursor( this, true, true );
KCursor::setHideCursorDelay( 1500 );
@@ -114,11 +114,11 @@ void ImageWindow::init()
m_actions = new KActionCollection( this );
if ( !s_handCursor ) {
- QString file = locate( "appdata", "pics/handcursor.png" );
+ TQString file = locate( "appdata", "pics/handcursor.png" );
if ( !file.isEmpty() )
- s_handCursor = new QCursor( file );
+ s_handCursor = new TQCursor( file );
else
- s_handCursor = new QCursor( arrowCursor );
+ s_handCursor = new TQCursor( arrowCursor );
}
setupActions();
@@ -133,8 +133,8 @@ void ImageWindow::init()
setAcceptDrops( true );
setBackgroundColor( kdata->backgroundColor );
- static QPixmap imageIcon = UserIcon( "imageviewer-medium" );
- static QPixmap miniImageIcon = UserIcon( "imageviewer-small" );
+ static TQPixmap imageIcon = UserIcon( "imageviewer-medium" );
+ static TQPixmap miniImageIcon = UserIcon( "imageviewer-small" );
KWin::setIcons( winId(), imageIcon, miniImageIcon );
}
@@ -146,103 +146,103 @@ void ImageWindow::updateActions()
void ImageWindow::setupActions()
{
new KAction( i18n("Show Next Image"), KStdAccel::next(),
- this, SLOT( slotRequestNext() ),
+ this, TQT_SLOT( slotRequestNext() ),
m_actions, "next_image" );
new KAction( i18n("Show Previous Image"), KStdAccel::prior(),
- this, SLOT( slotRequestPrevious() ),
+ this, TQT_SLOT( slotRequestPrevious() ),
m_actions, "previous_image" );
new KAction( i18n("Delete Image"), SHIFT + Key_Delete,
- this, SLOT( imageDelete() ),
+ this, TQT_SLOT( imageDelete() ),
m_actions, "delete_image" );
new KAction( i18n("Move Image to Trash"), Key_Delete,
- this, SLOT( imageTrash() ),
+ this, TQT_SLOT( imageTrash() ),
m_actions, "trash_image" );
new KAction( i18n("Zoom In"), Key_Plus,
- this, SLOT( zoomIn() ),
+ this, TQT_SLOT( zoomIn() ),
m_actions, "zoom_in" );
new KAction( i18n("Zoom Out"), Key_Minus,
- this, SLOT( zoomOut() ),
+ this, TQT_SLOT( zoomOut() ),
m_actions, "zoom_out" );
new KAction( i18n("Restore Original Size"), Key_O,
- this, SLOT( showImageOriginalSize() ),
+ this, TQT_SLOT( showImageOriginalSize() ),
m_actions, "original_size" );
new KAction( i18n("Maximize"), Key_M,
- this, SLOT( maximize() ),
+ this, TQT_SLOT( maximize() ),
m_actions, "maximize" );
new KAction( i18n("Rotate 90 Degrees"), Key_9,
- this, SLOT( rotate90() ),
+ this, TQT_SLOT( rotate90() ),
m_actions, "rotate90" );
new KAction( i18n("Rotate 180 Degrees"), Key_8,
- this, SLOT( rotate180() ),
+ this, TQT_SLOT( rotate180() ),
m_actions, "rotate180" );
new KAction( i18n("Rotate 270 Degrees"), Key_7,
- this, SLOT( rotate270() ),
+ this, TQT_SLOT( rotate270() ),
m_actions, "rotate270" );
new KAction( i18n("Flip Horizontally"), Key_Asterisk,
- this, SLOT( flipHoriz() ),
+ this, TQT_SLOT( flipHoriz() ),
m_actions, "flip_horicontally" );
new KAction( i18n("Flip Vertically"), Key_Slash,
- this, SLOT( flipVert() ),
+ this, TQT_SLOT( flipVert() ),
m_actions, "flip_vertically" );
new KAction( i18n("Print Image..."), KStdAccel::print(),
- this, SLOT( printImage() ),
+ this, TQT_SLOT( printImage() ),
m_actions, "print_image" );
- KStdAction::saveAs( this, SLOT( saveImage() ),
+ KStdAction::saveAs( this, TQT_SLOT( saveImage() ),
m_actions, "save_image_as" );
- KStdAction::close( this, SLOT( close() ),
+ KStdAction::close( this, TQT_SLOT( close() ),
m_actions, "close_image" );
// --------
new KAction( i18n("More Brightness"), Key_B,
- this, SLOT( moreBrightness() ),
+ this, TQT_SLOT( moreBrightness() ),
m_actions, "more_brightness" );
new KAction( i18n("Less Brightness"), SHIFT + Key_B,
- this, SLOT( lessBrightness() ),
+ this, TQT_SLOT( lessBrightness() ),
m_actions, "less_brightness" );
new KAction( i18n("More Contrast"), Key_C,
- this, SLOT( moreContrast() ),
+ this, TQT_SLOT( moreContrast() ),
m_actions, "more_contrast" );
new KAction( i18n("Less Contrast"), SHIFT + Key_C,
- this, SLOT( lessContrast() ),
+ this, TQT_SLOT( lessContrast() ),
m_actions, "less_contrast" );
new KAction( i18n("More Gamma"), Key_G,
- this, SLOT( moreGamma() ),
+ this, TQT_SLOT( moreGamma() ),
m_actions, "more_gamma" );
new KAction( i18n("Less Gamma"), SHIFT + Key_G,
- this, SLOT( lessGamma() ),
+ this, TQT_SLOT( lessGamma() ),
m_actions, "less_gamma" );
// --------
new KAction( i18n("Scroll Up"), Key_Up,
- this, SLOT( scrollUp() ),
+ this, TQT_SLOT( scrollUp() ),
m_actions, "scroll_up" );
new KAction( i18n("Scroll Down"), Key_Down,
- this, SLOT( scrollDown() ),
+ this, TQT_SLOT( scrollDown() ),
m_actions, "scroll_down" );
new KAction( i18n("Scroll Left"), Key_Left,
- this, SLOT( scrollLeft() ),
+ this, TQT_SLOT( scrollLeft() ),
m_actions, "scroll_left" );
new KAction( i18n("Scroll Right"), Key_Right,
- this, SLOT( scrollRight() ),
+ this, TQT_SLOT( scrollRight() ),
m_actions, "scroll_right" );
// --------
new KAction( i18n("Pause Slideshow"), Key_P,
- this, SLOT( pauseSlideShow() ),
+ this, TQT_SLOT( pauseSlideShow() ),
m_actions, "kuick_slideshow_pause" );
- KAction *fullscreenAction = KStdAction::fullScreen(this, SLOT( toggleFullscreen() ), m_actions, 0 );
+ KAction *fullscreenAction = KStdAction::fullScreen(this, TQT_SLOT( toggleFullscreen() ), m_actions, 0 );
KAction *reloadAction = new KAction( i18n("Reload Image"), KStdAccel::shortcut(KStdAccel::Reload),
- this, SLOT( reload() ),
+ this, TQT_SLOT( reload() ),
m_actions, "reload_image" );
new KAction( i18n("Properties"), ALT + Key_Return,
- this, SLOT( slotProperties() ),
+ this, TQT_SLOT( slotProperties() ),
m_actions, "properties" );
m_actions->readShortcutSettings();
@@ -308,7 +308,7 @@ void ImageWindow::updateGeometry( int imWidth, int imHeight )
updateCursor();
- QString caption = i18n( "Filename (Imagewidth x Imageheight)",
+ TQString caption = i18n( "Filename (Imagewidth x Imageheight)",
"%3 (%1 x %2)" );
caption = caption.arg( m_kuim->originalWidth() ).
arg( m_kuim->originalHeight() ).arg( m_kuim->url().prettyURL() );
@@ -321,7 +321,7 @@ void ImageWindow::centerImage()
int w, h;
if ( myIsFullscreen )
{
- QRect desktopRect = KGlobalSettings::desktopGeometry( this );
+ TQRect desktopRect = KGlobalSettings::desktopGeometry( this );
w = desktopRect.width();
h = desktopRect.height();
}
@@ -412,7 +412,7 @@ bool ImageWindow::showNextImage( const KURL& url )
switch ( file->waitForDownload( this ) ) {
case KuickFile::ERROR:
{
- QString tmp = i18n("Unable to download the image from %1.").arg(url.prettyURL());
+ TQString tmp = i18n("Unable to download the image from %1.").arg(url.prettyURL());
emit sigImageError( file, tmp );
return false;
}
@@ -428,7 +428,7 @@ bool ImageWindow::showNextImage( const KURL& url )
bool ImageWindow::showNextImage( KuickFile *file )
{
if ( !loadImage( file ) ) {
- QString tmp = i18n("Unable to load the image %1.\n"
+ TQString tmp = i18n("Unable to load the image %1.\n"
"Perhaps the file format is unsupported or "
"your Imlib is not installed properly.").arg(file->url().prettyURL());
emit sigImageError( file, tmp );
@@ -573,7 +573,7 @@ void ImageWindow::imageTrash()
////
// event handlers
-void ImageWindow::wheelEvent( QWheelEvent *e )
+void ImageWindow::wheelEvent( TQWheelEvent *e )
{
e->accept();
static const int WHEEL_DELTA = 120;
@@ -586,7 +586,7 @@ void ImageWindow::wheelEvent( QWheelEvent *e )
emit requestImage( this, -steps );
}
-void ImageWindow::keyPressEvent( QKeyEvent *e )
+void ImageWindow::keyPressEvent( TQKeyEvent *e )
{
uint key = e->key();
@@ -606,7 +606,7 @@ void ImageWindow::keyPressEvent( QKeyEvent *e )
e->accept();
}
-void ImageWindow::keyReleaseEvent( QKeyEvent *e )
+void ImageWindow::keyReleaseEvent( TQKeyEvent *e )
{
if ( e->state() & ShiftButton ) { // Shift-key released
updateCursor();
@@ -619,7 +619,7 @@ void ImageWindow::keyReleaseEvent( QKeyEvent *e )
e->accept();
}
-void ImageWindow::mousePressEvent( QMouseEvent *e )
+void ImageWindow::mousePressEvent( TQMouseEvent *e )
{
xmove = e->x(); // for moving the image with the mouse
ymove = e->y();
@@ -640,7 +640,7 @@ void ImageWindow::mousePressEvent( QMouseEvent *e )
ImlibWidget::mousePressEvent( e );
}
-void ImageWindow::contextMenuEvent( QContextMenuEvent *e )
+void ImageWindow::contextMenuEvent( TQContextMenuEvent *e )
{
e->accept();
@@ -673,7 +673,7 @@ void ImageWindow::updateCursor( KuickCursor cursor )
}
}
-void ImageWindow::mouseMoveEvent( QMouseEvent *e )
+void ImageWindow::mouseMoveEvent( TQMouseEvent *e )
{
if ( !(e->state() & LeftButton) ) { // only handle LeftButton actions
return;
@@ -682,13 +682,13 @@ void ImageWindow::mouseMoveEvent( QMouseEvent *e )
if ( e->state() & ShiftButton ) {
if ( !transWidget ) {
- transWidget = new QWidget( this );
+ transWidget = new TQWidget( this );
transWidget->setGeometry( 0, 0, width(), height() );
transWidget->setBackgroundMode( NoBackground );
}
transWidget->hide();
- QPainter p( transWidget );
+ TQPainter p( transWidget );
// really required?
p.eraseRect( transWidget->rect() );
transWidget->show();
@@ -707,7 +707,7 @@ void ImageWindow::mouseMoveEvent( QMouseEvent *e )
yzoom = e->y();
}
- QPen pen( Qt::white, 1, DashLine );
+ TQPen pen( Qt::white, 1, DashLine );
p.setPen( pen ); // for drawing white dashed line
p.drawRect( xzoom, yzoom, width, height );
p.setPen( DotLine ); // defaults to black dotted line pen
@@ -725,7 +725,7 @@ void ImageWindow::mouseMoveEvent( QMouseEvent *e )
}
}
-void ImageWindow::mouseReleaseEvent( QMouseEvent *e )
+void ImageWindow::mouseReleaseEvent( TQMouseEvent *e )
{
updateCursor();
@@ -806,14 +806,14 @@ void ImageWindow::mouseReleaseEvent( QMouseEvent *e )
}
-void ImageWindow::focusInEvent( QFocusEvent *ev )
+void ImageWindow::focusInEvent( TQFocusEvent *ev )
{
ImlibWidget::focusInEvent( ev );
emit sigFocusWindow( this );
}
-void ImageWindow::resizeEvent( QResizeEvent *e )
+void ImageWindow::resizeEvent( TQResizeEvent *e )
{
ImlibWidget::resizeEvent( e );
@@ -822,7 +822,7 @@ void ImageWindow::resizeEvent( QResizeEvent *e )
}
-void ImageWindow::dragEnterEvent( QDragEnterEvent *e )
+void ImageWindow::dragEnterEvent( TQDragEnterEvent *e )
{
// if ( e->provides( "image/*" ) ) // can't do this right now with Imlib
if ( e->provides( "text/uri-list" ) )
@@ -832,12 +832,12 @@ void ImageWindow::dragEnterEvent( QDragEnterEvent *e )
}
-void ImageWindow::dropEvent( QDropEvent *e )
+void ImageWindow::dropEvent( TQDropEvent *e )
{
// FIXME - only preliminary drop-support for now
KURL::List list;
if ( KURLDrag::decode( e, list ) && !list.isEmpty()) {
- QString tmpFile;
+ TQString tmpFile;
const KURL &url = list.first();
if (KIO::NetAccess::download( url, tmpFile, this ) )
{
@@ -858,21 +858,21 @@ void ImageWindow::dropEvent( QDropEvent *e )
void ImageWindow::setPopupMenu()
{
- viewerMenu = new QPopupMenu( this );
+ viewerMenu = new TQPopupMenu( this );
m_actions->action("next_image")->plug( viewerMenu );
m_actions->action("previous_image")->plug( viewerMenu );
viewerMenu->insertSeparator();
- brightnessMenu = new QPopupMenu( viewerMenu );
+ brightnessMenu = new TQPopupMenu( viewerMenu );
m_actions->action("more_brightness")->plug(brightnessMenu);
m_actions->action("less_brightness")->plug(brightnessMenu);
- contrastMenu = new QPopupMenu( viewerMenu );
+ contrastMenu = new TQPopupMenu( viewerMenu );
m_actions->action("more_contrast")->plug(contrastMenu);
m_actions->action("less_contrast")->plug(contrastMenu);
- gammaMenu = new QPopupMenu( viewerMenu );
+ gammaMenu = new TQPopupMenu( viewerMenu );
m_actions->action("more_gamma")->plug(gammaMenu);
m_actions->action("less_gamma")->plug(gammaMenu);
@@ -922,7 +922,7 @@ void ImageWindow::saveImage()
return;
KuickData tmp;
- QCheckBox *keepSize = new QCheckBox( i18n("Keep original image size"), 0L);
+ TQCheckBox *keepSize = new TQCheckBox( i18n("Keep original image size"), 0L);
keepSize->setChecked( true );
KFileDialog dlg( m_saveDirectory, tmp.fileFilter, this, "filedialog", true
#if KDE_VERSION >= 310
@@ -930,21 +930,21 @@ void ImageWindow::saveImage()
#endif
);
- QString selection = m_saveDirectory.isEmpty() ?
+ TQString selection = m_saveDirectory.isEmpty() ?
m_kuim->url().url() :
m_kuim->url().fileName();
dlg.setOperationMode( KFileDialog::Saving );
dlg.setMode( KFile::File );
dlg.setSelection( selection );
dlg.setCaption( i18n("Save As") );
- if ( dlg.exec() == QDialog::Accepted )
+ if ( dlg.exec() == TQDialog::Accepted )
{
KURL url = dlg.selectedURL();
if ( url.isValid() )
{
if ( !saveImage( url, keepSize->isChecked() ) )
{
- QString tmp = i18n("Couldn't save the file.\n"
+ TQString tmp = i18n("Couldn't save the file.\n"
"Perhaps the disk is full, or you don't "
"have write permission to the file.");
KMessageBox::sorry( this, tmp, i18n("File Saving Failed"));
@@ -958,7 +958,7 @@ void ImageWindow::saveImage()
}
}
- QString lastDir = dlg.baseURL().path(+1);
+ TQString lastDir = dlg.baseURL().path(+1);
if ( lastDir != m_saveDirectory )
m_saveDirectory = lastDir;
@@ -978,16 +978,16 @@ bool ImageWindow::saveImage( const KURL& dest, bool keepOriginalSize )
w, h );
bool success = false;
- QString saveFile;
+ TQString saveFile;
if ( dest.isLocalFile() )
saveFile = dest.path();
else
{
- QString extension = QFileInfo( dest.fileName() ).extension();
+ TQString extension = TQFileInfo( dest.fileName() ).extension();
if ( !extension.isEmpty() )
extension.prepend( '.' );
- KTempFile tmpFile( QString::null, extension );
+ KTempFile tmpFile( TQString::null, extension );
if ( tmpFile.status() != 0 )
return false;
tmpFile.close();
@@ -1000,7 +1000,7 @@ bool ImageWindow::saveImage( const KURL& dest, bool keepOriginalSize )
{
Imlib_apply_modifiers_to_rgb( id, saveIm );
success = Imlib_save_image( id, saveIm,
- QFile::encodeName( saveFile ).data(),
+ TQFile::encodeName( saveFile ).data(),
NULL );
if ( success && !dest.isLocalFile() )
{
@@ -1040,7 +1040,7 @@ void ImageWindow::autoScale( KuickImage *kuim )
int newW = kuim->originalWidth();
int newH = kuim->originalHeight();
- QSize s = maxImageSize();
+ TQSize s = maxImageSize();
int mw = s.width();
int mh = s.height();
@@ -1143,7 +1143,7 @@ int ImageWindow::desktopHeight( bool totalScreen ) const
}
}
-QSize ImageWindow::maxImageSize() const
+TQSize ImageWindow::maxImageSize() const
{
if ( myIsFullscreen ) {
return KGlobalSettings::desktopGeometry(topLevelWidget()).size();
@@ -1155,7 +1155,7 @@ QSize ImageWindow::maxImageSize() const
void ImageWindow::resizeOptimal( int w, int h )
{
- QSize s = maxImageSize();
+ TQSize s = maxImageSize();
int mw = s.width();
int mh = s.height();
int neww = (w >= mw) ? mw : w;
@@ -1193,7 +1193,7 @@ bool ImageWindow::canZoomTo( int newWidth, int newHeight )
if ( !ImlibWidget::canZoomTo( newWidth, newHeight ) )
return false;
- QSize desktopSize = KGlobalSettings::desktopGeometry(topLevelWidget()).size();
+ TQSize desktopSize = KGlobalSettings::desktopGeometry(topLevelWidget()).size();
int desktopArea = desktopSize.width() * desktopSize.height();
int imageArea = newWidth * newHeight;
@@ -1204,7 +1204,7 @@ bool ImageWindow::canZoomTo( int newWidth, int newHeight )
this,
i18n("You are about to view a very large image (%1 x %2 pixels), which can be very resource-consuming and even make your computer hang.\nDo you want to continue?")
.arg( newWidth ).arg( newHeight ),
- QString::null,
+ TQString::null,
KStdGuiItem::cont(),
"ImageWindow_confirm_very_large_window"
) == KMessageBox::Continue;
diff --git a/kuickshow/src/imagewindow.h b/kuickshow/src/imagewindow.h
index 4a823a0a..19dc7462 100644
--- a/kuickshow/src/imagewindow.h
+++ b/kuickshow/src/imagewindow.h
@@ -19,19 +19,19 @@
#ifndef IMAGEWINDOW_H
#define IMAGEWINDOW_H
-#include <qevent.h>
+#include <tqevent.h>
#include <kaction.h>
#include <kurl.h>
#include "imlibwidget.h"
-class QCursor;
-class QPopupMenu;
-class QRect;
-class QString;
-class QTimer;
-class QWidget;
+class TQCursor;
+class TQPopupMenu;
+class TQRect;
+class TQString;
+class TQTimer;
+class TQWidget;
class KuickFile;
@@ -40,9 +40,9 @@ class ImageWindow : public ImlibWidget
Q_OBJECT
public:
- ImageWindow( ImData *_idata, ImlibData *id, QWidget *parent=0,
+ ImageWindow( ImData *_idata, ImlibData *id, TQWidget *parent=0,
const char *name=0 );
- ImageWindow( ImData *_idata=0, QWidget *parent=0, const char *name=0 );
+ ImageWindow( ImData *_idata=0, TQWidget *parent=0, const char *name=0 );
bool showNextImage( KuickFile * file );
bool showNextImage( const KURL& url );
@@ -105,17 +105,17 @@ protected:
virtual bool canZoomTo( int newWidth, int newHeight );
virtual void rotated( KuickImage *kuim, int rotation );
- virtual void wheelEvent( QWheelEvent * );
- virtual void keyPressEvent( QKeyEvent * );
- virtual void keyReleaseEvent( QKeyEvent * );
- virtual void mousePressEvent( QMouseEvent * );
- virtual void mouseReleaseEvent( QMouseEvent * );
- virtual void mouseMoveEvent( QMouseEvent * );
- virtual void focusInEvent( QFocusEvent * );
- virtual void resizeEvent( QResizeEvent * );
- virtual void dragEnterEvent( QDragEnterEvent * );
- virtual void dropEvent( QDropEvent * );
- virtual void contextMenuEvent( QContextMenuEvent * );
+ virtual void wheelEvent( TQWheelEvent * );
+ virtual void keyPressEvent( TQKeyEvent * );
+ virtual void keyReleaseEvent( TQKeyEvent * );
+ virtual void mousePressEvent( TQMouseEvent * );
+ virtual void mouseReleaseEvent( TQMouseEvent * );
+ virtual void mouseMoveEvent( TQMouseEvent * );
+ virtual void focusInEvent( TQFocusEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
+ virtual void dragEnterEvent( TQDragEnterEvent * );
+ virtual void dropEvent( TQDropEvent * );
+ virtual void contextMenuEvent( TQContextMenuEvent * );
void showWindow();
enum KuickCursor { DefaultCursor = 0, ZoomCursor, MoveCursor };
@@ -138,8 +138,8 @@ protected:
uint xposPress, yposPress;
- QPopupMenu *viewerMenu, *gammaMenu, *brightnessMenu, *contrastMenu;
- QWidget *transWidget;
+ TQPopupMenu *viewerMenu, *gammaMenu, *brightnessMenu, *contrastMenu;
+ TQWidget *transWidget;
protected slots:
@@ -165,11 +165,11 @@ private:
bool myIsFullscreen;
int m_numHeads;
- QString m_saveDirectory;
+ TQString m_saveDirectory;
KActionCollection *m_actions;
- static QCursor * s_handCursor;
+ static TQCursor * s_handCursor;
};
diff --git a/kuickshow/src/imlibwidget.cpp b/kuickshow/src/imlibwidget.cpp
index 5b5cb84b..8386e1ab 100644
--- a/kuickshow/src/imlibwidget.cpp
+++ b/kuickshow/src/imlibwidget.cpp
@@ -24,12 +24,12 @@
#include <stdlib.h>
#include <assert.h>
-#include <qcolor.h>
-#include <qfile.h>
-#include <qglobal.h>
-#include <qimage.h>
-#include <qobject.h>
-#include <qpalette.h>
+#include <tqcolor.h>
+#include <tqfile.h>
+#include <tqglobal.h>
+#include <tqimage.h>
+#include <tqobject.h>
+#include <tqpalette.h>
#include <kcursor.h>
#include <kdebug.h>
@@ -43,8 +43,8 @@
const int ImlibWidget::ImlibOffset = 256;
-ImlibWidget::ImlibWidget( ImData *_idata, QWidget *parent, const char *name ) :
- QWidget( parent, name, WDestructiveClose )
+ImlibWidget::ImlibWidget( ImData *_idata, TQWidget *parent, const char *name ) :
+ TQWidget( parent, name, WDestructiveClose )
{
idata = _idata;
deleteImData = false;
@@ -82,9 +82,9 @@ ImlibWidget::ImlibWidget( ImData *_idata, QWidget *parent, const char *name ) :
}
-ImlibWidget::ImlibWidget( ImData *_idata, ImlibData *_id, QWidget *parent,
+ImlibWidget::ImlibWidget( ImData *_idata, ImlibData *_id, TQWidget *parent,
const char *name )
- : QWidget( parent, name, WDestructiveClose )
+ : TQWidget( parent, name, WDestructiveClose )
{
id = _id;
idata = _idata;
@@ -113,12 +113,12 @@ void ImlibWidget::init()
setAutoRender( true );
- setPalette( QPalette( myBackgroundColor ));
+ setPalette( TQPalette( myBackgroundColor ));
setBackgroundMode( PaletteBackground );
imageCache = new ImageCache( id, 4 ); // cache 4 images (FIXME?)
- connect( imageCache, SIGNAL( sigBusy() ), SLOT( setBusyCursor() ));
- connect( imageCache, SIGNAL( sigIdle() ), SLOT( restoreCursor() ));
+ connect( imageCache, TQT_SIGNAL( sigBusy() ), TQT_SLOT( setBusyCursor() ));
+ connect( imageCache, TQT_SIGNAL( sigIdle() ), TQT_SLOT( restoreCursor() ));
win = XCreateSimpleWindow(x11Display(), winId(), 0,0,w,h,0,0,0);
}
@@ -206,7 +206,7 @@ bool ImlibWidget::cacheImage( const KURL& url )
if ( !file->download() ) {
return false;
}
- connect( file, SIGNAL( downloaded( KuickFile * )), SLOT( cacheImage( KuickFile * )) );
+ connect( file, TQT_SIGNAL( downloaded( KuickFile * )), TQT_SLOT( cacheImage( KuickFile * )) );
return true; // optimistic
}
}
@@ -466,21 +466,21 @@ void ImlibWidget::updateGeometry( int w, int h )
}
-void ImlibWidget::closeEvent( QCloseEvent *e )
+void ImlibWidget::closeEvent( TQCloseEvent *e )
{
e->accept();
- QWidget::closeEvent( e );
+ TQWidget::closeEvent( e );
}
-void ImlibWidget::setBackgroundColor( const QColor& color )
+void ImlibWidget::setBackgroundColor( const TQColor& color )
{
myBackgroundColor = color;
- setPalette( QPalette( myBackgroundColor ));
+ setPalette( TQPalette( myBackgroundColor ));
repaint( false); // FIXME - false? necessary at all?
}
-const QColor& ImlibWidget::backgroundColor() const
+const TQColor& ImlibWidget::backgroundColor() const
{
return myBackgroundColor;
}
@@ -510,7 +510,7 @@ void ImlibWidget::setBusyCursor()
if ( ownCursor() )
m_oldCursor = cursor();
else
- m_oldCursor = QCursor();
+ m_oldCursor = TQCursor();
setCursor( KCursor::waitCursor() );
}
@@ -527,13 +527,13 @@ void ImlibWidget::restoreCursor()
// destroying the Imlib image X window. Therefore it needs to be temporarily reparented
// away and reparented back to the new X window.
// Reparenting may happen e.g. when doing the old-style (non-NETWM) fullscreen changes.
-void ImlibWidget::reparent( QWidget* parent, WFlags f, const QPoint& p, bool showIt )
+void ImlibWidget::reparent( TQWidget* parent, WFlags f, const TQPoint& p, bool showIt )
{
XWindowAttributes attr;
XGetWindowAttributes( x11Display(), win, &attr );
XUnmapWindow( x11Display(), win );
XReparentWindow( x11Display(), win, attr.root, 0, 0 );
- QWidget::reparent( parent, f, p, showIt );
+ TQWidget::reparent( parent, f, p, showIt );
XReparentWindow( x11Display(), win, winId(), attr.x, attr.y );
if( attr.map_state != IsUnmapped )
XMapWindow( x11Display(), win );
@@ -630,7 +630,7 @@ KuickImage * ImageCache::getKuimage( KuickFile * file,
// #endif
ImlibImage *im = Imlib_load_image( myId,
- QFile::encodeName( file->localFile() ).data() );
+ TQFile::encodeName( file->localFile() ).data() );
// #ifndef NDEBUG
// gettimeofday( &tms2, NULL );
@@ -649,8 +649,8 @@ KuickImage * ImageCache::getKuimage( KuickFile * file,
Imlib_set_image_modifier( myId, im, &mod );
kuim = new KuickImage( file, im, myId );
- connect( kuim, SIGNAL( startRendering() ), SLOT( slotBusy() ));
- connect( kuim, SIGNAL( stoppedRendering() ), SLOT( slotIdle() ));
+ connect( kuim, TQT_SIGNAL( startRendering() ), TQT_SLOT( slotBusy() ));
+ connect( kuim, TQT_SIGNAL( stoppedRendering() ), TQT_SLOT( slotIdle() ));
kuickList.insert( 0, kuim );
fileList.prepend( file );
@@ -668,13 +668,13 @@ KuickImage * ImageCache::getKuimage( KuickFile * file,
// Note: the returned image's filename will not be the real filename (which it usually
// isn't anyway, according to Imlib's sources).
-ImlibImage * ImageCache::loadImageWithQt( const QString& fileName ) const
+ImlibImage * ImageCache::loadImageWithQt( const TQString& fileName ) const
{
kdDebug() << "Trying to load " << fileName << " with KImageIO..." << endl;
KImageIO::registerFormats();
- QImage image( fileName );
+ TQImage image( fileName );
if ( image.isNull() )
return 0L;
if ( image.depth() != 32 ) {
diff --git a/kuickshow/src/imlibwidget.h b/kuickshow/src/imlibwidget.h
index 5f6e89e1..de13cad8 100644
--- a/kuickshow/src/imlibwidget.h
+++ b/kuickshow/src/imlibwidget.h
@@ -12,13 +12,13 @@
#ifndef IMLIBWIDGET_H
#define IMLIBWIDGET_H
-#include <qvariant.h>
+#include <tqvariant.h>
-#include <qcursor.h>
-#include <qevent.h>
-#include <qptrlist.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqcursor.h>
+#include <tqevent.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
#include <kurl.h>
@@ -48,12 +48,12 @@ public:
KuickImage * getKuimage( KuickFile * file, ImlibColorModifier );
private:
- ImlibImage * loadImageWithQt( const QString& filename ) const;
+ ImlibImage * loadImageWithQt( const TQString& filename ) const;
int myMaxImages;
- QValueList<KuickFile*>fileList;
- QPtrList<KuickImage> kuickList;
- // QPtrList<ImlibImage> imList;
+ TQValueList<KuickFile*>fileList;
+ TQPtrList<KuickImage> kuickList;
+ // TQPtrList<ImlibImage> imList;
ImlibData * myId;
int idleCount;
@@ -70,7 +70,7 @@ signals:
// ------------------------------------------
-class QColor;
+class TQColor;
class ImlibWidget : public QWidget
{
@@ -78,8 +78,8 @@ class ImlibWidget : public QWidget
public:
- ImlibWidget( ImData *_idata=0, QWidget *parent=0, const char *name=0 );
- ImlibWidget( ImData *_idata, ImlibData *id, QWidget *parent=0,
+ ImlibWidget( ImData *_idata=0, TQWidget *parent=0, const char *name=0 );
+ ImlibWidget( ImData *_idata, ImlibData *id, TQWidget *parent=0,
const char *name=0 );
virtual ~ImlibWidget();
@@ -108,8 +108,8 @@ public:
bool isAutoRenderEnabled() const { return isAutoRendering; }
void setMaxImageCache( int );
int maxImageCache() const { return myMaxImageCache; }
- const QColor& backgroundColor() const;
- void setBackgroundColor( const QColor& );
+ const TQColor& backgroundColor() const;
+ void setBackgroundColor( const TQColor& );
/**
* @return true if auto-rotation is not possible, e.g. because no metadata
@@ -119,7 +119,7 @@ public:
ImlibData* getImlibData() const { return id; }
- virtual void reparent( QWidget* parent, WFlags f, const QPoint& p, bool showIt = FALSE );
+ virtual void reparent( TQWidget* parent, WFlags f, const TQPoint& p, bool showIt = FALSE );
public slots:
void rotate90();
@@ -142,7 +142,7 @@ protected:
virtual bool canZoomTo( int newWidth, int newHeight );
virtual void rotated( KuickImage *kuim, int rotation );
- void closeEvent( QCloseEvent * );
+ void closeEvent( TQCloseEvent * );
inline void autoUpdate( bool geometryUpdate=false ) {
if ( isAutoRendering )
@@ -160,7 +160,7 @@ protected:
ImlibColorModifier mod;
KuickFile *m_kuickFile;
- QCursor m_oldCursor;
+ TQCursor m_oldCursor;
static const int ImlibOffset;
@@ -169,7 +169,7 @@ private:
void init();
bool isAutoRendering;
int myMaxImageCache;
- QColor myBackgroundColor;
+ TQColor myBackgroundColor;
protected slots:
@@ -179,7 +179,7 @@ protected slots:
signals:
- void sigImageError( const KuickFile * file, const QString& );
+ void sigImageError( const KuickFile * file, const TQString& );
};
diff --git a/kuickshow/src/kuick.cpp b/kuickshow/src/kuick.cpp
index 43eadb50..24f1677f 100644
--- a/kuickshow/src/kuick.cpp
+++ b/kuickshow/src/kuick.cpp
@@ -1,4 +1,4 @@
#include "kuick.h"
Kuick * Kuick::s_self = 0L;
-QSize Kuick::s_frameSize;
+TQSize Kuick::s_frameSize;
diff --git a/kuickshow/src/kuick.h b/kuickshow/src/kuick.h
index bc86d5d2..98289dfc 100644
--- a/kuickshow/src/kuick.h
+++ b/kuickshow/src/kuick.h
@@ -19,8 +19,8 @@
#ifndef KUICKGLOBALS_H
#define KUICKGLOBALS_H
-#include <qrect.h>
-#include <qsize.h>
+#include <tqrect.h>
+#include <tqsize.h>
#include <kwin.h>
#include <kwinmodule.h>
@@ -28,11 +28,11 @@
class Kuick
{
public:
- static QRect workArea() {
+ static TQRect workArea() {
return self()->winModule.workArea();
}
- static QSize frameSize( WId win = 0L ) {
+ static TQSize frameSize( WId win = 0L ) {
if ( win ) {
KWin::WindowInfo info = KWin::windowInfo(win, NET::WMKDEFrameStrut | NET::WMGeometry);
int wborder = info.frameGeometry().width() - info.geometry().width();
@@ -45,7 +45,7 @@ public:
}
if ( !s_frameSize.isValid() )
- return QSize( 0, 0 );
+ return TQSize( 0, 0 );
return s_frameSize;
}
@@ -63,7 +63,7 @@ private:
Kuick() {}
static Kuick * s_self;
- static QSize s_frameSize;
+ static TQSize s_frameSize;
};
diff --git a/kuickshow/src/kuickconfigdlg.cpp b/kuickshow/src/kuickconfigdlg.cpp
index 6ece8883..140c90d5 100644
--- a/kuickshow/src/kuickconfigdlg.cpp
+++ b/kuickshow/src/kuickconfigdlg.cpp
@@ -22,8 +22,8 @@
#endif
#include "kuickconfigdlg.h"
-#include <qkeycode.h>
-#include <qvbox.h>
+#include <tqkeycode.h>
+#include <tqvbox.h>
#include <kaccel.h>
#include <kconfig.h>
@@ -38,14 +38,14 @@
#include "kuickdata.h"
-KuickConfigDialog::KuickConfigDialog( KActionCollection *_coll, QWidget *parent,
+KuickConfigDialog::KuickConfigDialog( KActionCollection *_coll, TQWidget *parent,
const char *name, bool modal )
: KDialogBase( Tabbed, i18n("Configure"),
Help | Default | Ok | Apply | Cancel, Ok,
parent, name, modal )
{
coll = _coll;
- QVBox *box = addVBoxPage( i18n("&General") );
+ TQVBox *box = addVBoxPage( i18n("&General") );
generalWidget = new GeneralWidget( box, "general widget" );
box = addVBoxPage( i18n("&Modifications") );
@@ -64,7 +64,7 @@ KuickConfigDialog::KuickConfigDialog( KActionCollection *_coll, QWidget *parent,
box = addVBoxPage( i18n("Bro&wser Shortcuts") );
browserKeyChooser = new KKeyChooser( coll, box );
- connect( this, SIGNAL( defaultClicked() ), SLOT( resetDefaults() ));
+ connect( this, TQT_SIGNAL( defaultClicked() ), TQT_SLOT( resetDefaults() ));
}
KuickConfigDialog::~KuickConfigDialog()
diff --git a/kuickshow/src/kuickconfigdlg.h b/kuickshow/src/kuickconfigdlg.h
index 884d91dc..a19a6e97 100644
--- a/kuickshow/src/kuickconfigdlg.h
+++ b/kuickshow/src/kuickconfigdlg.h
@@ -19,7 +19,7 @@
#ifndef KUICKCONFIGDLG_H
#define KUICKCONFIGDLG_H
-#include <qevent.h>
+#include <tqevent.h>
#include <kkeydialog.h>
@@ -35,7 +35,7 @@ class KuickConfigDialog : public KDialogBase
Q_OBJECT
public:
- KuickConfigDialog( KActionCollection *coll, QWidget *parent=0,
+ KuickConfigDialog( KActionCollection *coll, TQWidget *parent=0,
const char *name=0, bool modal=true);
~KuickConfigDialog();
diff --git a/kuickshow/src/kuickdata.cpp b/kuickshow/src/kuickdata.cpp
index c6aa47c2..a68a9d3e 100644
--- a/kuickshow/src/kuickdata.cpp
+++ b/kuickshow/src/kuickdata.cpp
@@ -18,7 +18,7 @@
#include <stdlib.h>
-#include <qcolor.h>
+#include <tqcolor.h>
#include <kconfig.h>
#include <kglobal.h>
diff --git a/kuickshow/src/kuickdata.h b/kuickshow/src/kuickdata.h
index d05b3e99..e24d3bc4 100644
--- a/kuickshow/src/kuickdata.h
+++ b/kuickshow/src/kuickdata.h
@@ -19,8 +19,8 @@
#ifndef KUICKDATA_H
#define KUICKDATA_H
-#include <qcolor.h>
-#include <qstring.h>
+#include <tqcolor.h>
+#include <tqstring.h>
#include "imdata.h"
@@ -44,7 +44,7 @@ public:
ImData *idata;
- QString fileFilter;
+ TQString fileFilter;
uint slideDelay;
uint slideshowCycles;
bool slideshowFullscreen :1;
@@ -75,7 +75,7 @@ public:
uint maxCachedImages;
Rotation rotation;
- QColor backgroundColor;
+ TQColor backgroundColor;
};
diff --git a/kuickshow/src/kuickfile.cpp b/kuickshow/src/kuickfile.cpp
index 1dd259d6..da38fdee 100644
--- a/kuickshow/src/kuickfile.cpp
+++ b/kuickshow/src/kuickfile.cpp
@@ -1,4 +1,4 @@
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kdeversion.h>
@@ -13,7 +13,7 @@
#include "kuickfile.h"
KuickFile::KuickFile(const KURL& url)
- : QObject(),
+ : TQObject(),
m_url( url ),
m_job( 0L ),
m_progress( 0L ),
@@ -33,15 +33,15 @@ KuickFile::~KuickFile()
delete m_job;
if ( hasDownloaded() )
- QFile::remove( m_localFile );
+ TQFile::remove( m_localFile );
}
-QString KuickFile::localFile() const
+TQString KuickFile::localFile() const
{
// Note: never call isAvailable() from here, directly or indirectly
if ( isDownloading() )
- return QString::null;
+ return TQString::null;
return m_localFile;
}
@@ -61,17 +61,17 @@ bool KuickFile::download()
return true;
// reinitialize
- m_localFile = QString::null;
+ m_localFile = TQString::null;
m_currentProgress = 0;
- QString ext;
- QString fileName = m_url.fileName();
+ TQString ext;
+ TQString fileName = m_url.fileName();
int extIndex = fileName.findRev('.');
if ( extIndex > 0 )
ext = fileName.mid( extIndex + 1 );
- QString tempDir = FileCache::self()->tempDir();
+ TQString tempDir = FileCache::self()->tempDir();
KTempFile tempFile( tempDir, ext );
tempFile.setAutoDelete( tempDir.isNull() ); // in case there is no proper tempdir, make sure to delete those files!
if ( tempFile.status() != 0 )
@@ -86,15 +86,15 @@ bool KuickFile::download()
m_job = KIO::file_copy( m_url, destURL, -1, true, false, false ); // handling progress ourselves
m_job->setAutoErrorHandlingEnabled( true );
- connect( m_job, SIGNAL( result( KIO::Job * )), SLOT( slotResult( KIO::Job * ) ));
- connect( m_job, SIGNAL( percent( KIO::Job *, unsigned long )), SLOT( slotProgress( KIO::Job *, unsigned long ) ));
+ connect( m_job, TQT_SIGNAL( result( KIO::Job * )), TQT_SLOT( slotResult( KIO::Job * ) ));
+ connect( m_job, TQT_SIGNAL( percent( KIO::Job *, unsigned long )), TQT_SLOT( slotProgress( KIO::Job *, unsigned long ) ));
// TODO: generify background/foreground downloading?
return m_job != 0L;
}
-KuickFile::DownloadStatus KuickFile::waitForDownload( QWidget *parent )
+KuickFile::DownloadStatus KuickFile::waitForDownload( TQWidget *parent )
{
if ( isAvailable() )
return OK;
@@ -150,8 +150,8 @@ void KuickFile::slotResult( KIO::Job *job )
if ( job->error() != KIO::ERR_USER_CANCELED )
kdWarning() << "ERROR: KuickFile::slotResult: " << job->errorString() << endl;
- QString canceledFile = static_cast<KIO::FileCopyJob*>(job)->destURL().path();
- QFile::remove( canceledFile );
+ TQString canceledFile = static_cast<KIO::FileCopyJob*>(job)->destURL().path();
+ TQFile::remove( canceledFile );
m_progress->topLevelWidget()->hide();
}
else {
diff --git a/kuickshow/src/kuickfile.h b/kuickshow/src/kuickfile.h
index 957db6ee..2076e612 100644
--- a/kuickshow/src/kuickfile.h
+++ b/kuickshow/src/kuickfile.h
@@ -10,8 +10,8 @@
#ifndef KUICKFILE_H
#define KUICKFILE_H
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kurl.h>
#include <kprogress.h>
@@ -43,7 +43,7 @@ public:
const KURL& url() const { return m_url; }
- QString localFile() const;
+ TQString localFile() const;
bool download();
@@ -71,7 +71,7 @@ public:
* immediately.
* @return true when the download has finished or false when the user aborted the dialog
*/
- KuickFile::DownloadStatus waitForDownload( QWidget *parent );
+ KuickFile::DownloadStatus waitForDownload( TQWidget *parent );
// bool needsDownload();
@@ -87,7 +87,7 @@ private slots:
private:
KURL m_url;
- QString m_localFile;
+ TQString m_localFile;
KIO::FileCopyJob *m_job;
KProgress *m_progress;
int m_currentProgress;
diff --git a/kuickshow/src/kuickimage.cpp b/kuickshow/src/kuickimage.cpp
index 29e5de1c..36fa97c2 100644
--- a/kuickshow/src/kuickimage.cpp
+++ b/kuickshow/src/kuickimage.cpp
@@ -1,7 +1,7 @@
#include "kuickimage.h"
KuickImage::KuickImage( const KuickFile * file, ImlibImage *im, ImlibData *id)
- : QObject( 0L, 0L )
+ : TQObject( 0L, 0L )
{
myFile = file;
myOrigIm = 0L;
@@ -212,9 +212,9 @@ bool KuickImage::smoothResize( int newWidth, int newHeight )
{
// qDebug("-- smoothResize: %i x %i", newWidth, newHeight);
- QImage *image = newQImage();
- // Note: QImage::ScaleMin seems to have a bug (off-by-one, sometimes results in width being 1 pixel too small)
- QImage scaledImage = image->smoothScale(newWidth, newHeight, QImage::ScaleFree);
+ TQImage *image = newQImage();
+ // Note: TQImage::ScaleMin seems to have a bug (off-by-one, sometimes results in width being 1 pixel too small)
+ TQImage scaledImage = image->smoothScale(newWidth, newHeight, TQImage::ScaleFree);
delete image;
@@ -235,7 +235,7 @@ bool KuickImage::smoothResize( int newWidth, int newHeight )
return false;
}
-QImage * KuickImage::newQImage() const
+TQImage * KuickImage::newQImage() const
{
ImlibImage *im;
@@ -255,7 +255,7 @@ QImage * KuickImage::newQImage() const
int w = im->rgb_width;
int h = im->rgb_height;
- QImage *image = new QImage( w, h, 32 );
+ TQImage *image = new TQImage( w, h, 32 );
uchar *rgb = im->rgb_data;
QRgb **destImageData = reinterpret_cast<QRgb**>( image->jumpTable() );
@@ -282,7 +282,7 @@ QImage * KuickImage::newQImage() const
return image;
}
-ImlibImage * KuickImage::toImage( ImlibData *id, QImage& image )
+ImlibImage * KuickImage::toImage( ImlibData *id, TQImage& image )
{
if ( image.isNull() )
return 0L;
@@ -339,7 +339,7 @@ bool KuickImage::smoothResize( int newWidth, int newHeight )
// int w = myOrigWidth; //myViewport.width();
//int h = myOrigHeight; //myViewport.height();
- //QImage dst(w, h, myIm->depth(), myIm->numColors(), myIm->bitOrder());
+ //TQImage dst(w, h, myIm->depth(), myIm->numColors(), myIm->bitOrder());
//QRgb *scanline;
diff --git a/kuickshow/src/kuickimage.h b/kuickshow/src/kuickimage.h
index 745facf4..4463e83a 100644
--- a/kuickshow/src/kuickimage.h
+++ b/kuickshow/src/kuickimage.h
@@ -10,8 +10,8 @@
#ifndef KUICKIMAGE_H
#define KUICKIMAGE_H
-#include <qimage.h>
-#include <qobject.h>
+#include <tqimage.h>
+#include <tqobject.h>
#include <kurl.h>
@@ -49,7 +49,7 @@ public:
ImlibImage * imlibImage() const { return myIm; }
Pixmap& pixmap();
void renderPixmap();
-// const QString& filename() const { return myFilename;}
+// const TQString& filename() const { return myFilename;}
const KuickFile& file() const { return *myFile; }
const KURL& url() const { return myFile->url(); }
@@ -58,7 +58,7 @@ public:
Rotation absRotation() const { return myRotation; }
FlipMode flipMode() const { return myFlipMode; }
- static ImlibImage * toImage( ImlibData *id, QImage& image );
+ static ImlibImage * toImage( ImlibData *id, TQImage& image );
private:
void fastResize( int newWidth, int newHeight );
@@ -66,7 +66,7 @@ private:
/**
* Note: caller must delete it!
*/
- QImage * newQImage() const;
+ TQImage * newQImage() const;
const KuickFile * myFile;
diff --git a/kuickshow/src/kuickshow.cpp b/kuickshow/src/kuickshow.cpp
index 7e8718fb..570e626b 100644
--- a/kuickshow/src/kuickshow.cpp
+++ b/kuickshow/src/kuickshow.cpp
@@ -19,14 +19,14 @@
#include <stdio.h>
#include <assert.h>
-#include <qdir.h>
-#include <qdesktopwidget.h>
-#include <qdialog.h>
-#include <qglobal.h>
-#include <qkeycode.h>
-#include <qlayout.h>
-#include <qsize.h>
-#include <qstring.h>
+#include <tqdir.h>
+#include <tqdesktopwidget.h>
+#include <tqdialog.h>
+#include <tqglobal.h>
+#include <tqkeycode.h>
+#include <tqlayout.h>
+#include <tqsize.h>
+#include <tqstring.h>
#include <kaboutdata.h>
#include <kaccel.h>
@@ -89,7 +89,7 @@ KuickData* kdata;
static const int URL_ITEM = 0;
static const int META_ITEM = 1;
-QValueList<ImageWindow*> KuickShow::s_viewers;
+TQValueList<ImageWindow*> KuickShow::s_viewers;
KuickShow::KuickShow( const char *name )
: KMainWindow( 0L, name ),
@@ -110,8 +110,8 @@ KuickShow::KuickShow( const char *name )
initImlib();
resize( 400, 500 );
- m_slideTimer = new QTimer( this );
- connect( m_slideTimer, SIGNAL( timeout() ), SLOT( nextSlide() ));
+ m_slideTimer = new TQTimer( this );
+ connect( m_slideTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( nextSlide() ));
KConfig *kc = KGlobal::config();
@@ -124,7 +124,7 @@ KuickShow::KuickShow( const char *name )
// files to display
// either a directory to display, an absolute path, a relative path, or a URL
KURL startDir;
- startDir.setPath( QDir::currentDirPath() + '/' );
+ startDir.setPath( TQDir::currentDirPath() + '/' );
int numArgs = args->count();
if ( numArgs >= 10 )
@@ -164,7 +164,7 @@ KuickShow::KuickShow( const char *name )
else if ( !url.isLocalFile() )
{
KMimeType::Ptr mime = KMimeType::findByURL( url );
- QString name = mime->name();
+ TQString name = mime->name();
if ( name == "application/octet-stream" ) // unknown -> stat()
name = KIO::NetAccess::mimetype( url, this );
@@ -231,39 +231,39 @@ void KuickShow::initGUI( const KURL& startDir )
redirectDeleteAndTrashActions(coll);
- connect( fileWidget, SIGNAL( fileSelected( const KFileItem * ) ),
- this, SLOT( slotSelected( const KFileItem * ) ));
+ connect( fileWidget, TQT_SIGNAL( fileSelected( const KFileItem * ) ),
+ this, TQT_SLOT( slotSelected( const KFileItem * ) ));
- connect( fileWidget, SIGNAL( fileHighlighted( const KFileItem * )),
- this, SLOT( slotHighlighted( const KFileItem * ) ));
+ connect( fileWidget, TQT_SIGNAL( fileHighlighted( const KFileItem * )),
+ this, TQT_SLOT( slotHighlighted( const KFileItem * ) ));
- connect( fileWidget, SIGNAL( urlEntered( const KURL& )),
- this, SLOT( dirSelected( const KURL& )) );
+ connect( fileWidget, TQT_SIGNAL( urlEntered( const KURL& )),
+ this, TQT_SLOT( dirSelected( const KURL& )) );
fileWidget->setAcceptDrops(true);
- connect( fileWidget, SIGNAL( dropped( const KFileItem *, QDropEvent *, const KURL::List & )),
- this, SLOT( slotDropped( const KFileItem *, QDropEvent *, const KURL::List &)) );
+ connect( fileWidget, TQT_SIGNAL( dropped( const KFileItem *, TQDropEvent *, const KURL::List & )),
+ this, TQT_SLOT( slotDropped( const KFileItem *, TQDropEvent *, const KURL::List &)) );
// setup actions
- KAction *open = KStdAction::open( this, SLOT( slotOpenURL() ),
+ KAction *open = KStdAction::open( this, TQT_SLOT( slotOpenURL() ),
coll, "openURL" );
- KAction *print = KStdAction::print( this, SLOT( slotPrint() ),
+ KAction *print = KStdAction::print( this, TQT_SLOT( slotPrint() ),
coll, "kuick_print" );
print->setText( i18n("Print Image...") );
KAction *configure = new KAction( i18n("Configure %1...").arg( KGlobal::instance()->aboutData()->programName() ), "configure",
KShortcut(),
- this, SLOT( configuration() ),
+ this, TQT_SLOT( configuration() ),
coll, "kuick_configure" );
KAction *slide = new KAction( i18n("Start Slideshow" ), "ksslide",
KShortcut( Key_F2 ),
- this, SLOT( startSlideShow() ),
+ this, TQT_SLOT( startSlideShow() ),
coll, "kuick_slideshow" );
KAction *about = new KAction( i18n( "About KuickShow" ), "about",
KShortcut(),
- this, SLOT( about() ), coll, "about" );
+ this, TQT_SLOT( about() ), coll, "about" );
oneWindowAction = new KToggleAction( i18n("Open Only One Image Window"),
"window_new",
@@ -272,29 +272,29 @@ void KuickShow::initGUI( const KURL& startDir )
m_toggleBrowserAction = new KToggleAction( i18n("Show File Browser"), KShortcut( Key_Space ), coll, "toggleBrowser" );
m_toggleBrowserAction->setCheckedState(i18n("Hide File Browser"));
- connect( m_toggleBrowserAction, SIGNAL( toggled( bool ) ),
- SLOT( toggleBrowser() ));
+ connect( m_toggleBrowserAction, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( toggleBrowser() ));
KAction *showInOther = new KAction( i18n("Show Image"), KShortcut(),
- this, SLOT( slotShowInOtherWindow() ),
+ this, TQT_SLOT( slotShowInOtherWindow() ),
coll, "kuick_showInOtherWindow" );
KAction *showInSame = new KAction( i18n("Show Image in Active Window"),
KShortcut(),
- this, SLOT( slotShowInSameWindow() ),
+ this, TQT_SLOT( slotShowInSameWindow() ),
coll, "kuick_showInSameWindow" );
KAction *showFullscreen = new KAction( i18n("Show Image in Fullscreen Mode"),
- KShortcut(), this, SLOT( slotShowFullscreen() ),
+ KShortcut(), this, TQT_SLOT( slotShowFullscreen() ),
coll, "kuick_showFullscreen" );
- KAction *quit = KStdAction::quit( this, SLOT(slotQuit()), coll, "quit");
+ KAction *quit = KStdAction::quit( this, TQT_SLOT(slotQuit()), coll, "quit");
- // remove QString::null parameter -- ellis
- coll->readShortcutSettings( QString::null );
+ // remove TQString::null parameter -- ellis
+ coll->readShortcutSettings( TQString::null );
m_accel = coll->accel();
// menubar
KMenuBar *mBar = menuBar();
- QPopupMenu *fileMenu = new QPopupMenu( mBar, "file" );
+ TQPopupMenu *fileMenu = new TQPopupMenu( mBar, "file" );
open->plug( fileMenu );
showInOther->plug( fileMenu );
showInSame->plug( fileMenu );
@@ -305,7 +305,7 @@ void KuickShow::initGUI( const KURL& startDir )
fileMenu->insertSeparator();
quit->plug( fileMenu );
- QPopupMenu *editMenu = new QPopupMenu( mBar, "edit" );
+ TQPopupMenu *editMenu = new TQPopupMenu( mBar, "edit" );
coll->action("mkdir")->plug( editMenu );
coll->action("delete")->plug( editMenu );
editMenu->insertSeparator();
@@ -316,10 +316,10 @@ void KuickShow::initGUI( const KURL& startDir )
// from the main contextmenu
KActionMenu *sortingMenu = static_cast<KActionMenu*>( coll->action("sorting menu"));
KActionMenu *mainActionMenu = static_cast<KActionMenu*>( coll->action("popupMenu"));
- QPopupMenu *mainPopup = mainActionMenu->popupMenu();
+ TQPopupMenu *mainPopup = mainActionMenu->popupMenu();
int sortingIndex = mainPopup->indexOf( sortingMenu->itemId( 0 ) );
int separatorId = mainPopup->idAt( sortingIndex + 1 );
- QMenuItem *separatorItem = mainPopup->findItem( separatorId );
+ TQMenuItem *separatorItem = mainPopup->findItem( separatorId );
if ( separatorItem && separatorItem->isSeparator() )
mainPopup->removeItem( separatorId );
mainActionMenu->remove( sortingMenu );
@@ -330,7 +330,7 @@ void KuickShow::initGUI( const KURL& startDir )
sortingMenu->plug( viewActionMenu->popupMenu(), 0 ); // on top of the menu
- QPopupMenu *settingsMenu = new QPopupMenu( mBar, "settings" );
+ TQPopupMenu *settingsMenu = new TQPopupMenu( mBar, "settings" );
configure->plug( settingsMenu );
mBar->insertItem( i18n("&File"), fileMenu );
@@ -363,14 +363,14 @@ void KuickShow::initGUI( const KURL& startDir )
tBar->insertSeparator();
about->plug( tBar );
- QPopupMenu *help = helpMenu( QString::null, false );
+ TQPopupMenu *help = helpMenu( TQString::null, false );
mBar->insertItem( KStdGuiItem::help().text() , help );
KStatusBar* sBar = statusBar();
sBar->insertItem( " ", URL_ITEM, 10 );
sBar->insertItem( " ", META_ITEM, 2 );
- sBar->setItemAlignment(URL_ITEM, QLabel::AlignVCenter | QLabel::AlignLeft);
+ sBar->setItemAlignment(URL_ITEM, TQLabel::AlignVCenter | TQLabel::AlignLeft);
fileWidget->setFocus();
@@ -394,10 +394,10 @@ void KuickShow::initGUI( const KURL& startDir )
addressToolBar->insertWidget( ID_ADDRESSBAR, 1, cmbPath);
addressToolBar->setItemAutoSized( ID_ADDRESSBAR );
- connect( cmbPath, SIGNAL( urlActivated( const KURL& )),
- this, SLOT( slotSetURL( const KURL& )));
- connect( cmbPath, SIGNAL( returnPressed()),
- this, SLOT( slotURLComboReturnPressed()));
+ connect( cmbPath, TQT_SIGNAL( urlActivated( const KURL& )),
+ this, TQT_SLOT( slotSetURL( const KURL& )));
+ connect( cmbPath, TQT_SIGNAL( returnPressed()),
+ this, TQT_SLOT( slotURLComboReturnPressed()));
fileWidget->initActions();
@@ -422,14 +422,14 @@ void KuickShow::redirectDeleteAndTrashActions(KActionCollection *coll)
if (action)
{
action->disconnect(fileWidget);
- connect(action, SIGNAL(activated()), this, SLOT(slotDeleteCurrentImage()));
+ connect(action, TQT_SIGNAL(activated()), this, TQT_SLOT(slotDeleteCurrentImage()));
}
action = coll->action("trash");
if (action)
{
action->disconnect(fileWidget);
- connect(action, SIGNAL(activated()), this, SLOT(slotTrashCurrentImage()));
+ connect(action, TQT_SIGNAL(activated()), this, TQT_SLOT(slotTrashCurrentImage()));
}
}
@@ -478,7 +478,7 @@ void KuickShow::slotHighlighted( const KFileItem *fi )
statusBar()->changeItem( item->getStatusBarInfo(), URL_ITEM );
bool image = FileWidget::isImage( fi );
- QString meta;
+ TQString meta;
if ( image )
{
KFileMetaInfo info = item->metaInfo();
@@ -488,7 +488,7 @@ void KuickShow::slotHighlighted( const KFileItem *fi )
KFileMetaInfoGroup group = info.group( "Technical" );
if ( group.isValid() )
{
- QString bpp = group.item( "BitDepth" ).string();
+ TQString bpp = group.item( "BitDepth" ).string();
if ( !bpp.isEmpty() )
meta.append( ", " ).append( bpp );
}
@@ -537,19 +537,19 @@ bool KuickShow::showImage( const KFileItem *fi,
m_viewer->setFullscreen( fullscreen );
s_viewers.append( m_viewer );
- connect( m_viewer, SIGNAL( destroyed() ), SLOT( viewerDeleted() ));
- connect( m_viewer, SIGNAL( sigFocusWindow( ImageWindow *) ),
- this, SLOT( slotSetActiveViewer( ImageWindow * ) ));
- connect( m_viewer, SIGNAL( sigImageError(const KuickFile *, const QString& ) ),
- this, SLOT( messageCantLoadImage(const KuickFile *, const QString &) ));
- connect( m_viewer, SIGNAL( requestImage( ImageWindow *, int )),
- this, SLOT( slotAdvanceImage( ImageWindow *, int )));
- connect( m_viewer, SIGNAL( pauseSlideShowSignal() ),
- this, SLOT( pauseSlideShow() ) );
- connect( m_viewer, SIGNAL (deleteImage (ImageWindow *)),
- this, SLOT (slotDeleteCurrentImage (ImageWindow *)));
- connect( m_viewer, SIGNAL (trashImage (ImageWindow *)),
- this, SLOT (slotTrashCurrentImage (ImageWindow *)));
+ connect( m_viewer, TQT_SIGNAL( destroyed() ), TQT_SLOT( viewerDeleted() ));
+ connect( m_viewer, TQT_SIGNAL( sigFocusWindow( ImageWindow *) ),
+ this, TQT_SLOT( slotSetActiveViewer( ImageWindow * ) ));
+ connect( m_viewer, TQT_SIGNAL( sigImageError(const KuickFile *, const TQString& ) ),
+ this, TQT_SLOT( messageCantLoadImage(const KuickFile *, const TQString &) ));
+ connect( m_viewer, TQT_SIGNAL( requestImage( ImageWindow *, int )),
+ this, TQT_SLOT( slotAdvanceImage( ImageWindow *, int )));
+ connect( m_viewer, TQT_SIGNAL( pauseSlideShowSignal() ),
+ this, TQT_SLOT( pauseSlideShow() ) );
+ connect( m_viewer, TQT_SIGNAL (deleteImage (ImageWindow *)),
+ this, TQT_SLOT (slotDeleteCurrentImage (ImageWindow *)));
+ connect( m_viewer, TQT_SIGNAL (trashImage (ImageWindow *)),
+ this, TQT_SLOT (slotTrashCurrentImage (ImageWindow *)));
if ( s_viewers.count() == 1 && moveToTopLeft ) {
// we have to move to 0x0 before showing _and_
// after showing, otherwise we get some bogus geometry()
@@ -568,7 +568,7 @@ bool KuickShow::showImage( const KFileItem *fi,
ImageWindow *safeViewer = m_viewer;
// file->waitForDownload( this );
-// QString filename;
+// TQString filename;
// KIO::NetAccess::download(fi->url(), filename, this);
if ( !safeViewer->showNextImage( fi->url() ) ) {
@@ -631,7 +631,7 @@ void KuickShow::slotTrashCurrentImage(ImageWindow *viewer)
performTrashCurrentImage(viewer);
}
-void KuickShow::performDeleteCurrentImage(QWidget *parent)
+void KuickShow::performDeleteCurrentImage(TQWidget *parent)
{
assert(fileWidget != 0L);
@@ -654,7 +654,7 @@ void KuickShow::performDeleteCurrentImage(QWidget *parent)
fileWidget->del(list, false, false);
}
-void KuickShow::performTrashCurrentImage(QWidget *parent)
+void KuickShow::performTrashCurrentImage(TQWidget *parent)
{
assert(fileWidget != 0L);
@@ -698,7 +698,7 @@ void KuickShow::tryShowNextImage()
if (!haveBrowser())
{
// ### when simply calling toggleBrowser(), this main window is completely messed up
- QTimer::singleShot(0, this, SLOT(toggleBrowser()));
+ TQTimer::singleShot(0, this, TQT_SLOT(toggleBrowser()));
}
m_viewer->deleteLater();
}
@@ -805,7 +805,7 @@ void KuickShow::slotShowFullscreen()
showImage( fileWidget->getCurrentItem( false ), false, true );
}
-void KuickShow::slotDropped( const KFileItem *, QDropEvent *, const KURL::List &urls)
+void KuickShow::slotDropped( const KFileItem *, TQDropEvent *, const KURL::List &urls)
{
KURL::List::ConstIterator it = urls.begin();
for ( ; it != urls.end(); ++it )
@@ -855,7 +855,7 @@ void KuickShow::slotAdvanceImage( ImageWindow *view, int steps )
}
if ( FileWidget::isImage( item ) ) {
-// QString filename;
+// TQString filename;
// KIO::NetAccess::download(item->url(), filename, this);
view->showNextImage( item->url() );
if (m_slideTimer->isActive() && kdata->slideDelay)
@@ -869,7 +869,7 @@ void KuickShow::slotAdvanceImage( ImageWindow *view, int steps )
}
}
-bool KuickShow::eventFilter( QObject *o, QEvent *e )
+bool KuickShow::eventFilter( TQObject *o, TQEvent *e )
{
if ( m_delayedRepeatItem ) // we probably need to install an eventFilter over
{
@@ -878,9 +878,9 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
bool ret = false;
int eventType = e->type();
- QKeyEvent *k = 0L;
- if ( eventType == QEvent::KeyPress )
- k = static_cast<QKeyEvent *>( e );
+ TQKeyEvent *k = 0L;
+ if ( eventType == TQEvent::KeyPress )
+ k = static_cast<TQKeyEvent *>( e );
if ( k ) {
if ( KStdAccel::quit().contains( KKey( k ) ) ) {
@@ -903,11 +903,11 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
// switching images, causing enter- and leaveevents for this
// ImageWindow, leading to the cursor being unhidden. So we simply
// don't pass those events to KCursor to prevent that.
- if ( eventType != QEvent::Leave && eventType != QEvent::Enter )
+ if ( eventType != TQEvent::Leave && eventType != TQEvent::Enter )
KCursor::autoHideEventFilter( o, e );
m_viewer = window;
- QString img;
+ TQString img;
KFileItem *item = 0L; // the image to be shown
KFileItem *item_next = 0L; // the image to be cached
@@ -925,7 +925,7 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
if ( key != Key_Escape && key != Key_Shift && key != Key_Alt )
{
KuickFile *file = m_viewer->currentFile();
-// QFileInfo fi( m_viewer->filename() );
+// TQFileInfo fi( m_viewer->filename() );
// start.setPath( fi.dirPath( true ) );
initGUI( file->url().upURL() );
@@ -952,7 +952,7 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
if ( fileWidget->dirLister()->rootItem() )
{
fileWidget->setCurrentItem( file->url().fileName() );
- QTimer::singleShot( 0, this, SLOT( slotReplayEvent()));
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotReplayEvent()));
}
else // finished, but no root-item -- probably an error, kill repeat-item!
{
@@ -962,8 +962,8 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
else // not finished yet
{
fileWidget->setInitialItem( file->url().fileName() );
- connect( fileWidget, SIGNAL( finished() ),
- SLOT( slotReplayEvent() ));
+ connect( fileWidget, TQT_SIGNAL( finished() ),
+ TQT_SLOT( slotReplayEvent() ));
}
return true;
@@ -1018,7 +1018,7 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
if ( FileWidget::isImage( item ) ) {
-// QString filename;
+// TQString filename;
// KIO::NetAccess::download(item->url(), filename, this);
m_viewer->showNextImage( item->url() );
@@ -1034,9 +1034,9 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
// doubleclick closes image window
// and shows browser when last window closed via doubleclick
- else if ( eventType == QEvent::MouseButtonDblClick )
+ else if ( eventType == TQEvent::MouseButtonDblClick )
{
- QMouseEvent *ev = static_cast<QMouseEvent*>( e );
+ TQMouseEvent *ev = static_cast<TQMouseEvent*>( e );
if ( ev->button() == LeftButton )
{
if ( s_viewers.count() == 1 )
@@ -1044,7 +1044,7 @@ bool KuickShow::eventFilter( QObject *o, QEvent *e )
if ( !fileWidget )
{
// KURL start;
-// QFileInfo fi( window->filename() );
+// TQFileInfo fi( window->filename() );
// start.setPath( fi.dirPath( true ) );
initGUI( window->currentFile()->url().fileName() );
}
@@ -1072,8 +1072,8 @@ void KuickShow::configuration()
{
if ( !m_accel ) {
KURL start;
- start.setPath( QDir::homeDirPath() );
- initGUI( KURL::fromPathOrURL( QDir::homeDirPath() ) );
+ start.setPath( TQDir::homeDirPath() );
+ initGUI( KURL::fromPathOrURL( TQDir::homeDirPath() ) );
}
dialog = new KuickConfigDialog( fileWidget->actionCollection(), 0L,
@@ -1081,12 +1081,12 @@ void KuickShow::configuration()
dialog->resize( 540, 510 );
dialog->setIcon( kapp->miniIcon() );
- connect( dialog, SIGNAL( okClicked() ),
- this, SLOT( slotConfigApplied() ) );
- connect( dialog, SIGNAL( applyClicked() ),
- this, SLOT( slotConfigApplied() ) );
- connect( dialog, SIGNAL( finished() ),
- this, SLOT( slotConfigClosed() ) );
+ connect( dialog, TQT_SIGNAL( okClicked() ),
+ this, TQT_SLOT( slotConfigApplied() ) );
+ connect( dialog, TQT_SIGNAL( applyClicked() ),
+ this, TQT_SLOT( slotConfigApplied() ) );
+ connect( dialog, TQT_SIGNAL( finished() ),
+ this, TQT_SLOT( slotConfigClosed() ) );
fileWidget->actionCollection()->action( "kuick_configure" )->setEnabled( false );
dialog->show();
@@ -1101,7 +1101,7 @@ void KuickShow::slotConfigApplied()
kdata->save();
ImageWindow *viewer;
- QValueListIterator<ImageWindow*> it = s_viewers.begin();
+ TQValueListIterator<ImageWindow*> it = s_viewers.begin();
while ( it != s_viewers.end() ) {
viewer = *it;
viewer->updateActions();
@@ -1129,12 +1129,12 @@ void KuickShow::about()
KDialog::centerOnScreen( aboutWidget );
#else
// Not fixed because it must be dead code now.
- QDesktopWidget *desktop = QApplication::desktop();
+ TQDesktopWidget *desktop = TQApplication::desktop();
int screen = desktop->screenNumber( aboutWidget );
if ( screen == -1 )
screen = desktop->primaryScreen();
- QRect r = desktop->screenGeometry( screen );
+ TQRect r = desktop->screenGeometry( screen );
aboutWidget->move( r.center().x() - aboutWidget->width()/2,
r.center().y() - aboutWidget->height()/2 );
#endif
@@ -1146,15 +1146,15 @@ void KuickShow::about()
void KuickShow::readProperties( KConfig *kc )
{
assert( fileWidget ); // from SM, we should always have initGUI on startup
- QString dir = kc->readPathEntry( "CurrentDirectory" );
+ TQString dir = kc->readPathEntry( "CurrentDirectory" );
if ( !dir.isEmpty() ) {
fileWidget->setURL( KURL::fromPathOrURL( dir ), true );
fileWidget->clearHistory();
}
const KURL& listedURL = fileWidget->url();
- QStringList images = kc->readPathListEntry( "Images shown" );
- QStringList::Iterator it;
+ TQStringList images = kc->readPathListEntry( "Images shown" );
+ TQStringList::Iterator it;
bool hasCurrentURL = false;
for ( it = images.begin(); it != images.end(); ++it ) {
@@ -1179,8 +1179,8 @@ void KuickShow::saveProperties( KConfig *kc )
if (fileWidget)
kc->writePathEntry( "CurrentDirectory", fileWidget->url().url() );
- QStringList urls;
- QValueListIterator<ImageWindow*> it;
+ TQStringList urls;
+ TQValueListIterator<ImageWindow*> it;
for ( it = s_viewers.begin(); it != s_viewers.end(); ++it )
{
const KURL& url = (*it)->currentFile()->url();
@@ -1212,7 +1212,7 @@ void KuickShow::saveSettings()
}
-void KuickShow::messageCantLoadImage( const KuickFile *, const QString& message )
+void KuickShow::messageCantLoadImage( const KuickFile *, const TQString& message )
{
m_viewer->clearFocus();
KMessageBox::information( m_viewer, message, i18n("Error"), "kuick_cant_load_image" );
@@ -1229,7 +1229,7 @@ void KuickShow::initImlib()
initImlibParams( idata, &par );
qWarning("*** KuickShow: Whoops, can't initialize imlib, trying my own palettefile now.");
- QString paletteFile = locate( "data", "kuickshow/im_palette.pal" );
+ TQString paletteFile = locate( "data", "kuickshow/im_palette.pal" );
// ### - does the qstrdup() cure the segfault in imlib eventually?
char *file = qstrdup( paletteFile.local8Bit() );
par.palettefile = file;
@@ -1240,7 +1240,7 @@ void KuickShow::initImlib()
id = Imlib_init_with_params( x11Display(), &par );
if ( !id ) {
- QString tmp = i18n("Unable to initialize \"Imlib\".\n"
+ TQString tmp = i18n("Unable to initialize \"Imlib\".\n"
"Start kuickshow from the command line "
"and look for error messages.\n"
"The program will now quit.");
@@ -1281,9 +1281,9 @@ bool KuickShow::haveBrowser() const
return fileWidget && fileWidget->isVisible();
}
-void KuickShow::delayedRepeatEvent( ImageWindow *w, QKeyEvent *e )
+void KuickShow::delayedRepeatEvent( ImageWindow *w, TQKeyEvent *e )
{
- m_delayedRepeatItem = new DelayedRepeatEvent( w, new QKeyEvent( *e ) );
+ m_delayedRepeatItem = new DelayedRepeatEvent( w, new TQKeyEvent( *e ) );
}
void KuickShow::abortDelayedEvent()
@@ -1294,8 +1294,8 @@ void KuickShow::abortDelayedEvent()
void KuickShow::slotReplayEvent()
{
- disconnect( fileWidget, SIGNAL( finished() ),
- this, SLOT( slotReplayEvent() ));
+ disconnect( fileWidget, TQT_SIGNAL( finished() ),
+ this, TQT_SLOT( slotReplayEvent() ));
DelayedRepeatEvent *e = m_delayedRepeatItem;
m_delayedRepeatItem = 0L; // otherwise, eventFilter aborts
@@ -1303,10 +1303,10 @@ void KuickShow::slotReplayEvent()
eventFilter( e->viewer, e->event );
delete e;
- // ### WORKAROUND for QIconView bug in Qt <= 3.0.3 at least
+ // ### WORKAROUND for TQIconView bug in Qt <= 3.0.3 at least
if ( fileWidget && fileWidget->view() ) {
- QWidget *widget = fileWidget->view()->widget();
- if ( widget->inherits( "QIconView" ) || widget->child(0, "QIconView" ) ){
+ TQWidget *widget = fileWidget->view()->widget();
+ if ( widget->inherits( "TQIconView" ) || widget->child(0, "TQIconView" ) ){
fileWidget->setSorting( fileWidget->sorting() );
}
}
@@ -1315,12 +1315,12 @@ void KuickShow::slotReplayEvent()
void KuickShow::replayAdvance(DelayedRepeatEvent *event)
{
- // ### WORKAROUND for QIconView bug in Qt <= 3.0.3 at least
+ // ### WORKAROUND for TQIconView bug in Qt <= 3.0.3 at least
// Sigh. According to qt-bugs, they won't fix this bug ever. So you can't
- // rely on sorting to be correct before the QIconView has been show()n.
+ // rely on sorting to be correct before the TQIconView has been show()n.
if ( fileWidget && fileWidget->view() ) {
- QWidget *widget = fileWidget->view()->widget();
- if ( widget->inherits( "QIconView" ) || widget->child(0, "QIconView" ) ){
+ TQWidget *widget = fileWidget->view()->widget();
+ if ( widget->inherits( "TQIconView" ) || widget->child(0, "TQIconView" ) ){
fileWidget->setSorting( fileWidget->sorting() );
}
}
@@ -1337,7 +1337,7 @@ void KuickShow::delayAction(DelayedRepeatEvent *event)
m_delayedRepeatItem = event;
KURL url = event->viewer->currentFile()->url();
-// QFileInfo fi( event->viewer->filename() );
+// TQFileInfo fi( event->viewer->filename() );
// start.setPath( fi.dirPath( true ) );
initGUI( url.upURL() );
@@ -1346,13 +1346,13 @@ void KuickShow::delayAction(DelayedRepeatEvent *event)
fileWidget->dirLister()->rootItem() )
{
fileWidget->setCurrentItem( url.fileName() );
- QTimer::singleShot( 0, this, SLOT( doReplay()));
+ TQTimer::singleShot( 0, this, TQT_SLOT( doReplay()));
}
else
{
fileWidget->setInitialItem( url.fileName() );
- connect( fileWidget, SIGNAL( finished() ),
- SLOT( doReplay() ));
+ connect( fileWidget, TQT_SIGNAL( finished() ),
+ TQT_SLOT( doReplay() ));
}
}
@@ -1361,16 +1361,16 @@ void KuickShow::doReplay()
if (!m_delayedRepeatItem)
return;
- disconnect( fileWidget, SIGNAL( finished() ),
- this, SLOT( doReplay() ));
+ disconnect( fileWidget, TQT_SIGNAL( finished() ),
+ this, TQT_SLOT( doReplay() ));
switch (m_delayedRepeatItem->action)
{
case DelayedRepeatEvent::DeleteCurrentFile:
- performDeleteCurrentImage((QWidget *) m_delayedRepeatItem->data);
+ performDeleteCurrentImage((TQWidget *) m_delayedRepeatItem->data);
break;
case DelayedRepeatEvent::TrashCurrentFile:
- performTrashCurrentImage((QWidget *) m_delayedRepeatItem->data);
+ performTrashCurrentImage((TQWidget *) m_delayedRepeatItem->data);
break;
case DelayedRepeatEvent::AdvanceViewer:
replayAdvance(m_delayedRepeatItem);
@@ -1401,11 +1401,11 @@ void KuickShow::toggleBrowser()
void KuickShow::slotOpenURL()
{
- KFileDialog dlg(QString::null, kdata->fileFilter, this, "filedialog", true);
+ KFileDialog dlg(TQString::null, kdata->fileFilter, this, "filedialog", true);
dlg.setMode( KFile::Files | KFile::Directory );
dlg.setCaption( i18n("Select Files or Folder to Open") );
- if ( dlg.exec() == QDialog::Accepted )
+ if ( dlg.exec() == TQDialog::Accepted )
{
KURL::List urls = dlg.selectedURLs();
KURL::List::ConstIterator it = urls.begin();
@@ -1422,9 +1422,9 @@ void KuickShow::slotOpenURL()
void KuickShow::deleteAllViewers()
{
- QValueListIterator<ImageWindow*> it = s_viewers.begin();
+ TQValueListIterator<ImageWindow*> it = s_viewers.begin();
for ( ; it != s_viewers.end(); ++it ) {
- (*it)->disconnect( SIGNAL( destroyed() ), this, SLOT( viewerDeleted() ));
+ (*it)->disconnect( TQT_SIGNAL( destroyed() ), this, TQT_SLOT( viewerDeleted() ));
(*it)->close( true );
}
diff --git a/kuickshow/src/kuickshow.h b/kuickshow/src/kuickshow.h
index d6239b64..4aeb1f2e 100644
--- a/kuickshow/src/kuickshow.h
+++ b/kuickshow/src/kuickshow.h
@@ -19,10 +19,10 @@
#ifndef KUICKSHOW_H
#define KUICKSHOW_H
-#include <qevent.h>
-#include <qguardedptr.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqevent.h>
+#include <tqguardedptr.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <kfileitem.h>
#include <kmainwindow.h>
@@ -50,7 +50,7 @@ class KuickFile;
class DelayedRepeatEvent
{
public:
- DelayedRepeatEvent( ImageWindow *view, QKeyEvent *ev ) {
+ DelayedRepeatEvent( ImageWindow *view, TQKeyEvent *ev ) {
viewer = view;
event = ev;
}
@@ -73,7 +73,7 @@ public:
};
ImageWindow *viewer;
- QKeyEvent *event;
+ TQKeyEvent *event;
int action;
void *data;
};
@@ -88,7 +88,7 @@ public:
~KuickShow();
virtual void show();
- static QValueList<ImageWindow*> s_viewers;
+ static TQValueList<ImageWindow*> s_viewers;
// overridden to make KDCOPActionProxy work -- all our actions are not
// in the mainwindow's collection, but in the filewidget's.
@@ -106,7 +106,7 @@ private slots:
void slotPrint();
void slotConfigApplied();
void slotConfigClosed();
- void messageCantLoadImage( const KuickFile * file, const QString& message);
+ void messageCantLoadImage( const KuickFile * file, const TQString& message);
bool showImage(const KFileItem *, bool newWindow = false,
bool fullscreen = false, bool moveToTopLeft = true );
void showFileItem( ImageWindow *, const KFileItem * );
@@ -120,7 +120,7 @@ private slots:
void nextSlide();
void nextSlide( KFileItem *item );
void viewerDeleted();
- void slotDropped( const KFileItem *, QDropEvent *, const KURL::List &);
+ void slotDropped( const KFileItem *, TQDropEvent *, const KURL::List &);
void slotSetActiveViewer( ImageWindow *i ) { m_viewer = i; }
void slotAdvanceImage( ImageWindow *, int steps );
@@ -142,12 +142,12 @@ private slots:
private:
void initGUI( const KURL& startDir );
- bool eventFilter( QObject *, QEvent * );
+ bool eventFilter( TQObject *, TQEvent * );
void initImlib();
void saveProperties( KConfig * );
void saveSettings();
bool haveBrowser() const;
- void delayedRepeatEvent( ImageWindow *, QKeyEvent * );
+ void delayedRepeatEvent( ImageWindow *, TQKeyEvent * );
void abortDelayedEvent();
void deleteAllViewers();
void redirectDeleteAndTrashActions(KActionCollection *coll);
@@ -155,8 +155,8 @@ private:
void delayAction(DelayedRepeatEvent *event);
void replayAdvance(DelayedRepeatEvent *event);
- void performDeleteCurrentImage(QWidget *parent);
- void performTrashCurrentImage(QWidget *parent);
+ void performDeleteCurrentImage(TQWidget *parent);
+ void performTrashCurrentImage(TQWidget *parent);
uint viewItem, renameItem, deleteItem, printItem;
uint m_slideshowCycle;
@@ -169,10 +169,10 @@ private:
KToggleAction *oneWindowAction;
KAccel *m_accel;
DelayedRepeatEvent *m_delayedRepeatItem;
- QTimer *m_slideTimer;
+ TQTimer *m_slideTimer;
bool m_slideShowStopped;
KToggleAction *m_toggleBrowserAction;
- QGuardedPtr<AboutWidget> aboutWidget;
+ TQGuardedPtr<AboutWidget> aboutWidget;
};
#endif
diff --git a/kuickshow/src/kurlwidget.cpp b/kuickshow/src/kurlwidget.cpp
index 0a23fa3a..342c78c5 100644
--- a/kuickshow/src/kurlwidget.cpp
+++ b/kuickshow/src/kurlwidget.cpp
@@ -16,18 +16,18 @@
Boston, MA 02110-1301, USA.
*/
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <kurl.h>
#include <krun.h>
#include "kurlwidget.h"
-KURLWidget::KURLWidget(const QString& text, QWidget *parent, const char *name)
+KURLWidget::KURLWidget(const TQString& text, TQWidget *parent, const char *name)
: KURLLabel( parent, name )
{
setText( text );
- connect( this, SIGNAL( leftClickedURL() ), SLOT( run() ));
+ connect( this, TQT_SIGNAL( leftClickedURL() ), TQT_SLOT( run() ));
setUseTips( true );
}
diff --git a/kuickshow/src/kurlwidget.h b/kuickshow/src/kurlwidget.h
index 2f35e009..68b621fc 100644
--- a/kuickshow/src/kurlwidget.h
+++ b/kuickshow/src/kurlwidget.h
@@ -26,7 +26,7 @@ class KURLWidget : public KURLLabel
Q_OBJECT
public:
- KURLWidget( const QString& text, QWidget *, const char *name=0 );
+ KURLWidget( const TQString& text, TQWidget *, const char *name=0 );
protected slots:
virtual void run();
diff --git a/kuickshow/src/main.cpp b/kuickshow/src/main.cpp
index dfb462f0..41fcbace 100644
--- a/kuickshow/src/main.cpp
+++ b/kuickshow/src/main.cpp
@@ -16,7 +16,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
+#include <tqstring.h>
#include <kaboutdata.h>
#include <kapplication.h>
diff --git a/kuickshow/src/mainwidget.cpp b/kuickshow/src/mainwidget.cpp
index caa6700c..47b3d837 100644
--- a/kuickshow/src/mainwidget.cpp
+++ b/kuickshow/src/mainwidget.cpp
@@ -21,10 +21,10 @@
#include "mainwidget.h"
-MainWidget::MainWidget( QString startDir, QWidget *parent,
- const char *name ) : QWidget ( parent, name )
+MainWidget::MainWidget( TQString startDir, TQWidget *parent,
+ const char *name ) : TQWidget ( parent, name )
{
- box = new FileView( startDir, true, (QDir::Dirs | QDir::Files),
+ box = new FileView( startDir, true, (TQDir::Dirs | TQDir::Files),
this, "fileview" );
}
@@ -36,7 +36,7 @@ MainWidget::~MainWidget()
// for now, no layout managers
-void MainWidget::resizeEvent( QResizeEvent * )
+void MainWidget::resizeEvent( TQResizeEvent * )
{
box->resize( width(), height() );
}
diff --git a/kuickshow/src/mainwidget.h b/kuickshow/src/mainwidget.h
index 36285dd8..bb633ba8 100644
--- a/kuickshow/src/mainwidget.h
+++ b/kuickshow/src/mainwidget.h
@@ -19,9 +19,9 @@
#ifndef MAINWIDGET_H
#define MAINWIDGET_H
-#include <qevent.h>
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqevent.h>
+#include <tqstring.h>
+#include <tqwidget.h>
class FileView;
@@ -30,13 +30,13 @@ class MainWidget : public QWidget
Q_OBJECT
public:
- MainWidget( QString, QWidget *parent, const char *name=0L);
+ MainWidget( TQString, TQWidget *parent, const char *name=0L);
~MainWidget();
FileView* getFileBox() { return box; }
protected:
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
private:
FileView *box;
diff --git a/kuickshow/src/printing.cpp b/kuickshow/src/printing.cpp
index be57ca7f..64687e55 100644
--- a/kuickshow/src/printing.cpp
+++ b/kuickshow/src/printing.cpp
@@ -16,19 +16,19 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qgrid.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qimage.h>
+#include <tqcheckbox.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqgrid.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqimage.h>
#include <kimageeffect.h>
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
-#include <qradiobutton.h>
-#include <qvbuttongroup.h>
-#include <qcolor.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqradiobutton.h>
+#include <tqvbuttongroup.h>
+#include <tqcolor.h>
#include <kcombobox.h>
#include <kdialog.h>
@@ -43,9 +43,9 @@
#include "printing.h"
#include "version.h"
-bool Printing::printImage( ImageWindow& imageWin, QWidget *parent )
+bool Printing::printImage( ImageWindow& imageWin, TQWidget *parent )
{
- QString imageURL = imageWin.url().prettyURL();
+ TQString imageURL = imageWin.url().prettyURL();
KPrinter printer;
printer.setDocName( imageURL );
printer.setCreator( "KuickShow-" KUICKSHOWVERSION );
@@ -54,7 +54,7 @@ bool Printing::printImage( ImageWindow& imageWin, QWidget *parent )
if ( printer.setup( parent, i18n("Print %1").arg(printer.docName().section('/', -1)) ) )
{
- KTempFile tmpFile( QString::null, ".png" );
+ KTempFile tmpFile( TQString::null, ".png" );
if ( tmpFile.status() == 0 )
{
tmpFile.setAutoDelete( true );
@@ -69,27 +69,27 @@ bool Printing::printImage( ImageWindow& imageWin, QWidget *parent )
return true; // user aborted
}
-bool Printing::printImageWithQt( const QString& filename, KPrinter& printer,
- const QString& originalFileName )
+bool Printing::printImageWithQt( const TQString& filename, KPrinter& printer,
+ const TQString& originalFileName )
{
- QImage image( filename );
+ TQImage image( filename );
if ( image.isNull() ) {
kdWarning() << "Can't load image: " << filename << " for printing.\n";
return false;
}
- QPainter p;
+ TQPainter p;
p.begin( &printer );
- QPaintDeviceMetrics metrics( &printer );
+ TQPaintDeviceMetrics metrics( &printer );
p.setFont( KGlobalSettings::generalFont() );
- QFontMetrics fm = p.fontMetrics();
+ TQFontMetrics fm = p.fontMetrics();
int w = metrics.width();
int h = metrics.height();
- QString t = "true";
- QString f = "false";
+ TQString t = "true";
+ TQString f = "false";
// Black & white print?
if ( printer.option( "app-kuickshow-blackwhite" ) != f) {
@@ -107,9 +107,9 @@ bool Printing::printImageWithQt( const QString& filename, KPrinter& printer,
// shrink image to pagesize, if necessary
//
bool shrinkToFit = (printer.option( "app-kuickshow-shrinkToFit" ) != f);
- QSize imagesize = image.size();
+ TQSize imagesize = image.size();
if ( shrinkToFit && (image.width() > w || image.height() > h) ) {
- imagesize.scale( w, h, QSize::ScaleMin );
+ imagesize.scale( w, h, TQSize::ScaleMin );
}
@@ -144,11 +144,11 @@ bool Printing::printImageWithQt( const QString& filename, KPrinter& printer,
//
// perform the actual drawing
//
- p.drawImage( QRect( x, y, imagesize.width(), imagesize.height()), image );
+ p.drawImage( TQRect( x, y, imagesize.width(), imagesize.height()), image );
if ( printFilename )
{
- QString fname = minimizeString( originalFileName, fm, w );
+ TQString fname = minimizeString( originalFileName, fm, w );
if ( !fname.isEmpty() )
{
int fw = fm.width( fname );
@@ -163,11 +163,11 @@ bool Printing::printImageWithQt( const QString& filename, KPrinter& printer,
return true;
}
-QString Printing::minimizeString( QString text, const QFontMetrics&
+TQString Printing::minimizeString( TQString text, const TQFontMetrics&
metrics, int maxWidth )
{
if ( text.length() <= 5 )
- return QString::null; // no sense to cut that tiny little string
+ return TQString::null; // no sense to cut that tiny little string
bool changed = false;
while ( metrics.width( text ) > maxWidth )
@@ -181,7 +181,7 @@ QString Printing::minimizeString( QString text, const QFontMetrics&
{
int mid = text.length() / 2;
if ( mid <= 5 ) // sanity check
- return QString::null;
+ return TQString::null;
text.replace( mid - 1, 3, "..." );
}
@@ -194,42 +194,42 @@ QString Printing::minimizeString( QString text, const QFontMetrics&
///////////////////////////////////////////////////////////////////
-KuickPrintDialogPage::KuickPrintDialogPage( QWidget *parent, const char *name )
+KuickPrintDialogPage::KuickPrintDialogPage( TQWidget *parent, const char *name )
: KPrintDialogPage( parent, name )
{
setTitle( i18n("Image Settings") );
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
layout->setMargin( KDialog::marginHint() );
layout->setSpacing( KDialog::spacingHint() );
- m_addFileName = new QCheckBox( i18n("Print fi&lename below image"), this);
+ m_addFileName = new TQCheckBox( i18n("Print fi&lename below image"), this);
m_addFileName->setChecked( true );
layout->addWidget( m_addFileName );
- m_blackwhite = new QCheckBox ( i18n("Print image in &black and white"), this);
+ m_blackwhite = new TQCheckBox ( i18n("Print image in &black and white"), this);
m_blackwhite->setChecked( false );
layout->addWidget (m_blackwhite );
- QVButtonGroup *group = new QVButtonGroup( i18n("Scaling"), this );
+ TQVButtonGroup *group = new TQVButtonGroup( i18n("Scaling"), this );
group->setRadioButtonExclusive( true );
layout->addWidget( group );
- // m_shrinkToFit = new QRadioButton( i18n("Shrink image to &fit, if necessary"), group );
- m_shrinkToFit = new QCheckBox( i18n("Shrink image to &fit, if necessary"), group );
+ // m_shrinkToFit = new TQRadioButton( i18n("Shrink image to &fit, if necessary"), group );
+ m_shrinkToFit = new TQCheckBox( i18n("Shrink image to &fit, if necessary"), group );
m_shrinkToFit->setChecked( true );
- QWidget *widget = new QWidget( group );
- QGridLayout *grid = new QGridLayout( widget, 3, 3 );
+ TQWidget *widget = new TQWidget( group );
+ TQGridLayout *grid = new TQGridLayout( widget, 3, 3 );
grid->addColSpacing( 0, 30 );
grid->setColStretch( 0, 0 );
grid->setColStretch( 1, 1 );
grid->setColStretch( 2, 10 );
- m_scale = new QRadioButton( i18n("Print e&xact size: "), widget );
+ m_scale = new TQRadioButton( i18n("Print e&xact size: "), widget );
m_scale->setEnabled( false ); // ###
grid->addMultiCellWidget( m_scale, 0, 0, 0, 1 );
group->insert( m_scale );
- connect( m_scale, SIGNAL( toggled( bool )), SLOT( toggleScaling( bool )));
+ connect( m_scale, TQT_SIGNAL( toggled( bool )), TQT_SLOT( toggleScaling( bool )));
m_units = new KComboBox( false, widget, "unit combobox" );
grid->addWidget( m_units, 0, 2, AlignLeft );
@@ -252,11 +252,11 @@ KuickPrintDialogPage::~KuickPrintDialogPage()
{
}
-void KuickPrintDialogPage::getOptions( QMap<QString,QString>& opts,
+void KuickPrintDialogPage::getOptions( TQMap<TQString,TQString>& opts,
bool /*incldef*/ )
{
- QString t = "true";
- QString f = "false";
+ TQString t = "true";
+ TQString f = "false";
// ### opts["app-kuickshow-alignment"] = ;
opts["app-kuickshow-printFilename"] = m_addFileName->isChecked() ? t : f;
@@ -264,14 +264,14 @@ void KuickPrintDialogPage::getOptions( QMap<QString,QString>& opts,
opts["app-kuickshow-shrinkToFit"] = m_shrinkToFit->isChecked() ? t : f;
opts["app-kuickshow-scale"] = m_scale->isChecked() ? t : f;
opts["app-kuickshow-scale-unit"] = m_units->currentText();
- opts["app-kuickshow-scale-width-pixels"] = QString::number( scaleWidth() );
- opts["app-kuickshow-scale-height-pixels"] = QString::number( scaleHeight() );
+ opts["app-kuickshow-scale-width-pixels"] = TQString::number( scaleWidth() );
+ opts["app-kuickshow-scale-height-pixels"] = TQString::number( scaleHeight() );
}
-void KuickPrintDialogPage::setOptions( const QMap<QString,QString>& opts )
+void KuickPrintDialogPage::setOptions( const TQMap<TQString,TQString>& opts )
{
- QString t = "true";
- QString f = "false";
+ TQString t = "true";
+ TQString f = "false";
m_addFileName->setChecked( opts["app-kuickshow-printFilename"] != f );
// This sound strange, but if I copy the code on the line above, the checkbox
diff --git a/kuickshow/src/printing.h b/kuickshow/src/printing.h
index eb679f7e..43365bf4 100644
--- a/kuickshow/src/printing.h
+++ b/kuickshow/src/printing.h
@@ -19,13 +19,13 @@
#ifndef PRINTING_H
#define PRINTING_H
-#include <qfontmetrics.h>
-#include <qstring.h>
+#include <tqfontmetrics.h>
+#include <tqstring.h>
#include <kdeprint/kprintdialogpage.h>
-class QCheckBox;
-class QRadioButton;
+class TQCheckBox;
+class TQRadioButton;
class KComboBox;
class KPrinter;
class KIntNumInput;
@@ -36,13 +36,13 @@ class ImageWindow;
class Printing
{
public:
- static bool printImage( ImageWindow& imageWin, QWidget *parent = 0L);
- static bool printImageWithQt( const QString& filename, KPrinter& printer,
- const QString& originalFileName );
+ static bool printImage( ImageWindow& imageWin, TQWidget *parent = 0L);
+ static bool printImageWithQt( const TQString& filename, KPrinter& printer,
+ const TQString& originalFileName );
private:
static void addConfigPages();
- static QString minimizeString( QString text, const QFontMetrics& metrics,
+ static TQString minimizeString( TQString text, const TQFontMetrics& metrics,
int maxWidth );
};
@@ -52,11 +52,11 @@ class KuickPrintDialogPage : public KPrintDialogPage
Q_OBJECT
public:
- KuickPrintDialogPage( QWidget *parent = 0L, const char *name = 0 );
+ KuickPrintDialogPage( TQWidget *parent = 0L, const char *name = 0 );
~KuickPrintDialogPage();
- virtual void getOptions(QMap<QString,QString>& opts, bool incldef = false);
- virtual void setOptions(const QMap<QString,QString>& opts);
+ virtual void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
+ virtual void setOptions(const TQMap<TQString,TQString>& opts);
private slots:
void toggleScaling( bool enable );
@@ -72,13 +72,13 @@ private:
int fromUnitToPixels( float val ) const;
float pixelsToUnit( int pixels ) const;
- QCheckBox *m_shrinkToFit;
- QRadioButton *m_scale;
+ TQCheckBox *m_shrinkToFit;
+ TQRadioButton *m_scale;
KIntNumInput *m_width;
KIntNumInput *m_height;
KComboBox *m_units;
- QCheckBox *m_addFileName;
- QCheckBox *m_blackwhite;
+ TQCheckBox *m_addFileName;
+ TQCheckBox *m_blackwhite;
};
diff --git a/kuickshow/src/slideshowwidget.cpp b/kuickshow/src/slideshowwidget.cpp
index 447b996e..9727c203 100644
--- a/kuickshow/src/slideshowwidget.cpp
+++ b/kuickshow/src/slideshowwidget.cpp
@@ -16,8 +16,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
#include <kdialog.h>
#include <klocale.h>
@@ -26,16 +26,16 @@
#include "slideshowwidget.h"
-SlideShowWidget::SlideShowWidget( QWidget *parent, const char *name )
- : QWidget( parent, name )
+SlideShowWidget::SlideShowWidget( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
// setTitle( i18n("Slideshow") );
- QVBoxLayout *layout = new QVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
layout->setSpacing( KDialog::spacingHint() );
- m_fullScreen = new QCheckBox( i18n("Switch to &full-screen"), this );
- m_startWithCurrent = new QCheckBox( i18n("S&tart with current image"), this);
+ m_fullScreen = new TQCheckBox( i18n("Switch to &full-screen"), this );
+ m_startWithCurrent = new TQCheckBox( i18n("S&tart with current image"), this);
m_delayTime = new KIntNumInput( this, "delay time" );
m_delayTime->setLabel( i18n("De&lay between slides:") );
diff --git a/kuickshow/src/slideshowwidget.h b/kuickshow/src/slideshowwidget.h
index c651103d..182a977d 100644
--- a/kuickshow/src/slideshowwidget.h
+++ b/kuickshow/src/slideshowwidget.h
@@ -21,14 +21,14 @@
#include "kuickdata.h"
-class QCheckBox;
+class TQCheckBox;
class KIntNumInput;
class SlideShowWidget : public QWidget
{
Q_OBJECT
public:
- SlideShowWidget( QWidget *parent, const char *name );
+ SlideShowWidget( TQWidget *parent, const char *name );
~SlideShowWidget();
virtual void loadSettings( const KuickData& data );
@@ -37,8 +37,8 @@ public:
private:
KIntNumInput *m_delayTime;
KIntNumInput *m_cycles;
- QCheckBox *m_fullScreen;
- QCheckBox *m_startWithCurrent;
+ TQCheckBox *m_fullScreen;
+ TQCheckBox *m_startWithCurrent;
};
#endif // SLIDESHOWWIDGET_H
diff --git a/kview/config/kviewconfmodules.cpp b/kview/config/kviewconfmodules.cpp
index 23f6a1ef..e994d8ed 100644
--- a/kview/config/kviewconfmodules.cpp
+++ b/kview/config/kviewconfmodules.cpp
@@ -18,34 +18,34 @@
#include "kviewconfmodules.h"
-#include <qlayout.h>
-#include <qvbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqlayout.h>
+#include <tqvbuttongroup.h>
+#include <tqradiobutton.h>
#include <klocale.h>
#include <kdialog.h>
#include <kglobal.h>
#include <kconfig.h>
#include <kgenericfactory.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
-typedef KGenericFactory<KViewGeneralConfig, QWidget> KViewGeneralConfigFactory;
+typedef KGenericFactory<KViewGeneralConfig, TQWidget> KViewGeneralConfigFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kviewgeneralconfig, KViewGeneralConfigFactory( "kcm_kviewgeneralconfig" ) )
-KViewGeneralConfig::KViewGeneralConfig( QWidget * parent, const char * /*name*/, const QStringList & args )
+KViewGeneralConfig::KViewGeneralConfig( TQWidget * parent, const char * /*name*/, const TQStringList & args )
: KCModule( KViewGeneralConfigFactory::instance(), parent, args )
{
- QBoxLayout * layout = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ TQBoxLayout * layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
- m_pResizeGroup = new QVButtonGroup( i18n( "Resizing" ), this );
- m_pResizeGroup->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) );
- connect( m_pResizeGroup, SIGNAL( clicked( int ) ), this, SLOT( resizeChanged( int ) ) );
+ m_pResizeGroup = new TQVButtonGroup( i18n( "Resizing" ), this );
+ m_pResizeGroup->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
+ connect( m_pResizeGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( resizeChanged( int ) ) );
layout->addWidget( m_pResizeGroup );
- ( void )new QRadioButton( i18n( "Only resize window" ), m_pResizeGroup );
- ( void )new QRadioButton( i18n( "Resize image to fit window" ), m_pResizeGroup );
- ( void )new QRadioButton( i18n( "Don't resize anything" ), m_pResizeGroup );
- QWhatsThis::add( new QRadioButton( i18n( "Best fit" ), m_pResizeGroup ),
+ ( void )new TQRadioButton( i18n( "Only resize window" ), m_pResizeGroup );
+ ( void )new TQRadioButton( i18n( "Resize image to fit window" ), m_pResizeGroup );
+ ( void )new TQRadioButton( i18n( "Don't resize anything" ), m_pResizeGroup );
+ TQWhatsThis::add( new TQRadioButton( i18n( "Best fit" ), m_pResizeGroup ),
i18n( "<p>KView will resize the window to fit the image. The image will never be scaled up but if it is too large for the screen the image will be scaled down.</p>" ) );
load();
diff --git a/kview/config/kviewconfmodules.h b/kview/config/kviewconfmodules.h
index d064b386..1c9c1e7f 100644
--- a/kview/config/kviewconfmodules.h
+++ b/kview/config/kviewconfmodules.h
@@ -21,13 +21,13 @@
#include <kcmodule.h>
-class QVButtonGroup;
+class TQVButtonGroup;
class KViewGeneralConfig : public KCModule
{
Q_OBJECT
public:
- KViewGeneralConfig( QWidget * parent, const char * name = 0, const QStringList & args = QStringList() );
+ KViewGeneralConfig( TQWidget * parent, const char * name = 0, const TQStringList & args = TQStringList() );
~KViewGeneralConfig();
virtual void load();
@@ -38,7 +38,7 @@ class KViewGeneralConfig : public KCModule
void resizeChanged( int );
private:
- QVButtonGroup * m_pResizeGroup;
+ TQVButtonGroup * m_pResizeGroup;
int m_savedPosition;
};
diff --git a/kview/config/plugins/kviewpluginsconfig.cpp b/kview/config/plugins/kviewpluginsconfig.cpp
index e093366c..bad5bd55 100644
--- a/kview/config/plugins/kviewpluginsconfig.cpp
+++ b/kview/config/plugins/kviewpluginsconfig.cpp
@@ -25,14 +25,14 @@
#include <ksimpleconfig.h>
#include <kplugininfo.h>
-typedef KGenericFactory<KViewPluginsConfig, QWidget> KViewPluginsConfigFactory;
+typedef KGenericFactory<KViewPluginsConfig, TQWidget> KViewPluginsConfigFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kviewpluginsconfig, KViewPluginsConfigFactory( "kcm_kviewpluginsconfig" ) )
-KViewPluginsConfig::KViewPluginsConfig( QWidget * parent, const char *, const QStringList & args )
+KViewPluginsConfig::KViewPluginsConfig( TQWidget * parent, const char *, const TQStringList & args )
: KSettings::PluginPage( KViewPluginsConfigFactory::instance(), parent, args )
{
m_config = new KSimpleConfig( "kviewrc" );
- pluginSelector()->addPlugins( QString::fromAscii( "kview" ), i18n( "Application" ), QString::null, m_config );
+ pluginSelector()->addPlugins( TQString::fromAscii( "kview" ), i18n( "Application" ), TQString::null, m_config );
pluginSelector()->setShowEmptyConfigPage( false );
}
diff --git a/kview/config/plugins/kviewpluginsconfig.h b/kview/config/plugins/kviewpluginsconfig.h
index 815a4de7..4095944d 100644
--- a/kview/config/plugins/kviewpluginsconfig.h
+++ b/kview/config/plugins/kviewpluginsconfig.h
@@ -27,7 +27,7 @@ class KViewPluginsConfig : public KSettings::PluginPage
{
Q_OBJECT
public:
- KViewPluginsConfig( QWidget * parent, const char * name = 0, const QStringList & args = QStringList() );
+ KViewPluginsConfig( TQWidget * parent, const char * name = 0, const TQStringList & args = TQStringList() );
~KViewPluginsConfig();
private:
KConfig * m_config;
diff --git a/kview/kimageviewer/canvas.h b/kview/kimageviewer/canvas.h
index 61b565b4..18aae3be 100644
--- a/kview/kimageviewer/canvas.h
+++ b/kview/kimageviewer/canvas.h
@@ -21,14 +21,14 @@
#ifndef KIMAGEVIEWER_CANVAS_H
#define KIMAGEVIEWER_CANVAS_H
-class QColor;
-class QSize;
-class QImage;
-class QRect;
-class QPoint;
-class QWidget;
-
-#include <qstring.h>
+class TQColor;
+class TQSize;
+class TQImage;
+class TQRect;
+class TQPoint;
+class TQWidget;
+
+#include <tqstring.h>
#include <qobjectdefs.h>
#include <kdemacros.h>
namespace KImageViewer
@@ -47,7 +47,7 @@ namespace KImageViewer
* your program:
*
* <pre>
- QWidget * widget = KParts::ComponentFactory::createInstanceFromQuery<QWidget>( "KImageViewer/Canvas", QString::null, this );
+ TQWidget * widget = KParts::ComponentFactory::createInstanceFromQuery<TQWidget>( "KImageViewer/Canvas", TQString::null, this );
m_canvas = static_cast<KImageViewer::Canvas *>( widget->qt_cast( "KImageViewer::Canvas" ) );
if( ! ( widget && m_canvas ) )
{
@@ -55,13 +55,13 @@ namespace KImageViewer
kapp->quit();
}
setCentralWidget( widget );
- connect( widget, SIGNAL( contextPress( const QPoint & ) ), SLOT( mySlot( const QPoint & ) ) );
- connect( m_canvas->widget(), SIGNAL( contextPress( const QPoint & ) ), SLOT( mySlot( const QPoint & ) ) );
+ connect( widget, TQT_SIGNAL( contextPress( const TQPoint & ) ), TQT_SLOT( mySlot( const TQPoint & ) ) );
+ connect( m_canvas->widget(), TQT_SIGNAL( contextPress( const TQPoint & ) ), TQT_SLOT( mySlot( const TQPoint & ) ) );
</pre>
*
* You can't connect signals or slots using KImageViewer::Canvas, because this interface
- * doesn't inherit from QObject. But you can cast to QWidget and use that instead (or just
- * keep the original pointer to QWidget around, like shown in the example).
+ * doesn't inherit from TQObject. But you can cast to TQWidget and use that instead (or just
+ * keep the original pointer to TQWidget around, like shown in the example).
*
* This interface is not guaranteed to be kept binary or source compatible
* until it's finished. So if you're using this interface please get in contact
@@ -73,12 +73,12 @@ class KDE_EXPORT Canvas
/**
* set the background color of the canvas
*/
- virtual void setBgColor( const QColor & ) = 0;
+ virtual void setBgColor( const TQColor & ) = 0;
/**
* returns the current background color
*/
- virtual const QColor & bgColor() const = 0;
+ virtual const TQColor & bgColor() const = 0;
/**
* the depth of the contained image
@@ -88,12 +88,12 @@ class KDE_EXPORT Canvas
/**
* the size of the unzoomed image
*/
- virtual QSize imageSize() const = 0;
+ virtual TQSize imageSize() const = 0;
/**
* the size of the zoomed (current) image
*/
- virtual QSize currentSize() const = 0;
+ virtual TQSize currentSize() const = 0;
/**
* returns the zoom factor
@@ -105,7 +105,7 @@ class KDE_EXPORT Canvas
* Take care that the canas may delete the image so you probably need to
* make a copy of the image if you want to keep it around.
*/
- virtual const QImage * image() const = 0;
+ virtual const TQImage * image() const = 0;
/**
* Scrolls the content so that the point (x, y) is in the top-left corner.
@@ -136,7 +136,7 @@ class KDE_EXPORT Canvas
* Return the selected rectangle. If nothing is selected the rectangle is
* empty but doesn't have to be null.
*/
- virtual QRect selection() const = 0;
+ virtual TQRect selection() const = 0;
/**
* Returns whether the aspect ratio of the image is kept
@@ -151,7 +151,7 @@ class KDE_EXPORT Canvas
/**
* @return the description of the blend effect
*/
- virtual QString blendEffectDescription( unsigned int ) const { return QString::null; }
+ virtual TQString blendEffectDescription( unsigned int ) const { return TQString::null; }
/**
* Sets the blending effect used to create a transition between images
@@ -166,23 +166,23 @@ class KDE_EXPORT Canvas
/**
* @return the current maximum image size
*/
- virtual const QSize & maximumImageSize() const = 0;
+ virtual const TQSize & maximumImageSize() const = 0;
/**
* @return the current minimum image size
*/
- virtual const QSize & minimumImageSize() const = 0;
+ virtual const TQSize & minimumImageSize() const = 0;
/**
- * @return a pointer to the QWidget interface of this object
+ * @return a pointer to the TQWidget interface of this object
*/
- virtual QWidget * widget() = 0;
+ virtual TQWidget * widget() = 0;
signals:
/**
* a mouse button was pressed and a context menu should be openend
*/
- virtual void contextPress( const QPoint & ) = 0;
+ virtual void contextPress( const TQPoint & ) = 0;
/**
* the size of the image has changed (a new image was loaded, or the
@@ -190,7 +190,7 @@ class KDE_EXPORT Canvas
*
* it passes the new size of the image
*/
- virtual void imageSizeChanged( const QSize & ) = 0;
+ virtual void imageSizeChanged( const TQSize & ) = 0;
/**
* The zoom of the image has changed.
@@ -201,7 +201,7 @@ class KDE_EXPORT Canvas
* The selection has changed. Connect to this signal if you want to
* do something with a selection of the image (e.g. crop).
*/
- virtual void selectionChanged( const QRect & ) = 0;
+ virtual void selectionChanged( const TQRect & ) = 0;
/**
* Emitted when an image is finished being shown. If a blend effect is being used
@@ -227,7 +227,7 @@ class KDE_EXPORT Canvas
/**
* The current mouse cursor position on the image.
*/
- virtual void cursorPos( const QPoint & ) = 0;
+ virtual void cursorPos( const TQPoint & ) = 0;
public slots:
/**
@@ -239,7 +239,7 @@ class KDE_EXPORT Canvas
/**
* Give the canvas a new image to show. The zoom level is kept.
*/
- virtual void setImage( const QImage & ) = 0;
+ virtual void setImage( const TQImage & ) = 0;
/**
* Give the canvas a new image to show.
@@ -247,7 +247,7 @@ class KDE_EXPORT Canvas
* You have to pass the size the image should have when it appears
* on screen.
*/
- virtual void setImage( const QImage &, const QSize & ) = 0;
+ virtual void setImage( const TQImage &, const TQSize & ) = 0;
/**
* Set the zoom to be used when showing the image.
@@ -257,7 +257,7 @@ class KDE_EXPORT Canvas
/**
* Fit the image into the requested width and height.
*/
- virtual void boundImageTo( const QSize & size ) = 0;
+ virtual void boundImageTo( const TQSize & size ) = 0;
/**
* Set the maximum size of the image. If this is set the image will
@@ -265,7 +265,7 @@ class KDE_EXPORT Canvas
*
* If you set this to 0x0 the image size may be as big as possible
*/
- virtual void setMaximumImageSize( const QSize & ) = 0;
+ virtual void setMaximumImageSize( const TQSize & ) = 0;
/**
* Set the minimum size of the image. If this is set the image will
@@ -273,14 +273,14 @@ class KDE_EXPORT Canvas
*
* If you set this to 0x0 the image size can be as small as possible
*/
- virtual void setMinimumImageSize( const QSize & ) = 0;
+ virtual void setMinimumImageSize( const TQSize & ) = 0;
/**
* Resize the image to the given size. It will keep the aspect ratio
* as long as keepAspectRatio is true (default). The image will be as
* large as possible within the given constraints.
*/
- virtual void resizeImage( const QSize & ) = 0;
+ virtual void resizeImage( const TQSize & ) = 0;
/**
* Hides the scrollbars of the canvas. It's still possible to scroll
diff --git a/kview/kimageviewer/viewer.cpp b/kview/kimageviewer/viewer.cpp
index a74e0de9..1a5890d6 100644
--- a/kview/kimageviewer/viewer.cpp
+++ b/kview/kimageviewer/viewer.cpp
@@ -22,7 +22,7 @@
namespace KImageViewer
{
- Viewer::Viewer( QObject * parent, const char * name )
+ Viewer::Viewer( TQObject * parent, const char * name )
: KParts::ReadWritePart( parent, name )
{
}
diff --git a/kview/kimageviewer/viewer.h b/kview/kimageviewer/viewer.h
index 647fd9ba..995be8b9 100644
--- a/kview/kimageviewer/viewer.h
+++ b/kview/kimageviewer/viewer.h
@@ -49,7 +49,7 @@ class KDE_EXPORT Viewer : public KParts::ReadWritePart
{
Q_OBJECT
public:
- Viewer( QObject * parent = 0, const char * name = 0 );
+ Viewer( TQObject * parent = 0, const char * name = 0 );
virtual ~Viewer();
@@ -77,7 +77,7 @@ class KDE_EXPORT Viewer : public KParts::ReadWritePart
* So if you want to display a new image (not change the one shown) this
* is the method to use. Else take a look at Canvas::setImage().
*/
- virtual void newImage( const QImage & ) = 0;
+ virtual void newImage( const TQImage & ) = 0;
/**
* Tell the view to reload the current image. The host for this view
diff --git a/kview/kview.cpp b/kview/kview.cpp
index a9af213e..44d792df 100644
--- a/kview/kview.cpp
+++ b/kview/kview.cpp
@@ -42,15 +42,15 @@
#include <kstdaccel.h>
#include <kprogress.h>
-#include <qimage.h>
-#include <qsize.h>
-#include <qscrollbar.h>
-#include <qstyle.h>
-#include <qclipboard.h>
-#include <qdragobject.h>
-#include <qvaluelist.h>
-#include <qtimer.h>
-#include <qdockarea.h>
+#include <tqimage.h>
+#include <tqsize.h>
+#include <tqscrollbar.h>
+#include <tqstyle.h>
+#include <tqclipboard.h>
+#include <tqdragobject.h>
+#include <tqvaluelist.h>
+#include <tqtimer.h>
+#include <tqdockarea.h>
#include <assert.h>
#include <kplugininfo.h>
@@ -82,28 +82,28 @@ KView::KView()
setStandardToolBarMenuEnabled( true );
- connect( part->widget(), SIGNAL( imageSizeChanged( const QSize & ) ),
- SLOT( imageSizeChanged( const QSize & ) ) );
- connect( part->widget(), SIGNAL( selectionChanged( const QRect & ) ),
- SLOT( selectionChanged( const QRect & ) ) );
- connect( part->widget(), SIGNAL( contextPress( const QPoint & ) ),
- SLOT( contextPress( const QPoint & ) ) );
-
- connect( QApplication::clipboard(), SIGNAL( dataChanged() ),
- SLOT( clipboardDataChanged() ) );
-
- connect( m_pViewer, SIGNAL( started( KIO::Job * ) ),
- this, SLOT( jobStarted( KIO::Job * ) ) );
- connect( m_pViewer, SIGNAL( completed() ),
- this, SLOT( jobCompleted() ) );
- connect( m_pViewer, SIGNAL( completed( bool ) ),
- this, SLOT( jobCompleted( bool ) ) );
- connect( m_pViewer, SIGNAL( canceled( const QString & ) ),
- this, SLOT( jobCanceled( const QString & ) ) );
- connect( m_pViewer, SIGNAL( imageOpened( const KURL & ) ),
- m_paRecent, SLOT( addURL( const KURL & ) ) );
-
- connect( m_pCanvas->widget(), SIGNAL( cursorPos( const QPoint & ) ), SLOT( cursorPos( const QPoint & ) ) );
+ connect( part->widget(), TQT_SIGNAL( imageSizeChanged( const TQSize & ) ),
+ TQT_SLOT( imageSizeChanged( const TQSize & ) ) );
+ connect( part->widget(), TQT_SIGNAL( selectionChanged( const TQRect & ) ),
+ TQT_SLOT( selectionChanged( const TQRect & ) ) );
+ connect( part->widget(), TQT_SIGNAL( contextPress( const TQPoint & ) ),
+ TQT_SLOT( contextPress( const TQPoint & ) ) );
+
+ connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ),
+ TQT_SLOT( clipboardDataChanged() ) );
+
+ connect( m_pViewer, TQT_SIGNAL( started( KIO::Job * ) ),
+ this, TQT_SLOT( jobStarted( KIO::Job * ) ) );
+ connect( m_pViewer, TQT_SIGNAL( completed() ),
+ this, TQT_SLOT( jobCompleted() ) );
+ connect( m_pViewer, TQT_SIGNAL( completed( bool ) ),
+ this, TQT_SLOT( jobCompleted( bool ) ) );
+ connect( m_pViewer, TQT_SIGNAL( canceled( const TQString & ) ),
+ this, TQT_SLOT( jobCanceled( const TQString & ) ) );
+ connect( m_pViewer, TQT_SIGNAL( imageOpened( const KURL & ) ),
+ m_paRecent, TQT_SLOT( addURL( const KURL & ) ) );
+
+ connect( m_pCanvas->widget(), TQT_SIGNAL( cursorPos( const TQPoint & ) ), TQT_SLOT( cursorPos( const TQPoint & ) ) );
m_paRecent->loadEntries( KGlobal::config() );
if (!initialGeometrySet())
@@ -112,7 +112,7 @@ KView::KView()
m_pViewer->widget()->installEventFilter( this );
// reload configuration when it's changed by the conf dlg
- KSettings::Dispatcher::self()->registerInstance( instance(), this, SLOT( readSettings() ) );
+ KSettings::Dispatcher::self()->registerInstance( instance(), this, TQT_SLOT( readSettings() ) );
setPluginLoadingMode( LoadPluginsIfEnabled );
createGUI( part );
@@ -126,7 +126,7 @@ KView::KView()
statusBar()->insertItem( "", STATUSBAR_SIZE_ID, 0, true );
statusBar()->setItemFixed( STATUSBAR_SIZE_ID, 8 + fontMetrics().width( "8888 x 8888" ) );
- statusBar()->insertItem( QString::null, STATUSBAR_SELECTION_ID );
+ statusBar()->insertItem( TQString::null, STATUSBAR_SELECTION_ID );
m_pProgressBar = new KProgress( statusBar() );
m_pProgressBar->setFixedSize( 140, fontMetrics().height() );
@@ -145,7 +145,7 @@ KView::KView()
else
{
KMessageBox::error( this, i18n( "An error occurred while loading the KViewViewer KPart. Check your installation." ) );
- QTimer::singleShot( 0, kapp, SLOT( quit() ) );
+ TQTimer::singleShot( 0, kapp, TQT_SLOT( quit() ) );
}
}
@@ -163,14 +163,14 @@ void KView::load( const KURL & url )
if( url.isLocalFile() )
{
// XXX: this code is what
- //KRecentDirs::add( QString::fromLatin1( ":load_image" ), url.directory() );
+ //KRecentDirs::add( TQString::fromLatin1( ":load_image" ), url.directory() );
// would do:
- QString directory = url.directory();
- QString key = QString::fromLatin1( "load_image" );
+ TQString directory = url.directory();
+ TQString key = TQString::fromLatin1( "load_image" );
KConfig * config = KGlobal::config();
- config->setGroup( QString::fromLatin1( "Recent Dirs" ) );
- QStringList result = config->readPathListEntry( key );
+ config->setGroup( TQString::fromLatin1( "Recent Dirs" ) );
+ TQStringList result = config->readPathListEntry( key );
// make sure the dir is first in history
result.remove( directory );
result.prepend( directory );
@@ -186,15 +186,15 @@ void KView::loadFromStdin()
{
if( m_pViewer )
{
- QFile file;
+ TQFile file;
file.open( IO_ReadOnly, stdin );
- QImage image( file.readAll() );
+ TQImage image( file.readAll() );
file.close();
m_pViewer->newImage( image );
}
}
-QSize KView::sizeForCentralWidgetSize( QSize size )
+TQSize KView::sizeForCentralWidgetSize( TQSize size )
{
// add size of the dockareas
kdDebug( 4600 ) << "sizeForCentralWidgetSize " << size << endl;
@@ -208,7 +208,7 @@ QSize KView::sizeForCentralWidgetSize( QSize size )
if( ! mb->isHidden() )
{
size.rheight() += mb->heightForWidth( width() );
- if( style().styleHint( QStyle::SH_MainWindow_SpaceBelowMenuBar, this ) )
+ if( style().styleHint( TQStyle::SH_MainWindow_SpaceBelowMenuBar, this ) )
size.rheight() += dockWindowsMovable() ? 1 : 2;
}
kdDebug( 4600 ) << "added Menubar: " << size << endl;
@@ -249,9 +249,9 @@ void KView::readSettings() // KConfig * config )
loadPlugins();
}
-bool KView::eventFilter( QObject * obj, QEvent * ev )
+bool KView::eventFilter( TQObject * obj, TQEvent * ev )
{
- if( obj == m_pViewer->widget() && ev->type() == QEvent::Resize )
+ if( obj == m_pViewer->widget() && ev->type() == TQEvent::Resize )
{
if( m_nResizeMode == ResizeImage )
handleResize();
@@ -259,26 +259,26 @@ bool KView::eventFilter( QObject * obj, QEvent * ev )
return KParts::MainWindow::eventFilter( obj, ev );
}
-void KView::imageSizeChanged( const QSize & /*size*/ )
+void KView::imageSizeChanged( const TQSize & /*size*/ )
{
- QSize size = m_pCanvas->imageSize();
- statusBar()->changeItem( QString( "%1 x %2" ).arg( size.width() ).arg( size.height() ), STATUSBAR_SIZE_ID );
+ TQSize size = m_pCanvas->imageSize();
+ statusBar()->changeItem( TQString( "%1 x %2" ).arg( size.width() ).arg( size.height() ), STATUSBAR_SIZE_ID );
handleResize();
}
-void KView::selectionChanged( const QRect & rect )
+void KView::selectionChanged( const TQRect & rect )
{
kdDebug( 4600 ) << k_funcinfo << rect << endl;
if( rect.isNull() )
- statusBar()->changeItem( QString::null, STATUSBAR_SELECTION_ID );
+ statusBar()->changeItem( TQString::null, STATUSBAR_SELECTION_ID );
else
- statusBar()->changeItem( QString( "%1, %2 - %3 x %4" ).arg( rect.x() ).arg( rect.y() ).arg( rect.width() ).arg( rect.height() ), STATUSBAR_SELECTION_ID );
+ statusBar()->changeItem( TQString( "%1, %2 - %3 x %4" ).arg( rect.x() ).arg( rect.y() ).arg( rect.width() ).arg( rect.height() ), STATUSBAR_SELECTION_ID );
action( "crop" )->setEnabled( ! rect.isNull() );
}
-void KView::contextPress( const QPoint & point )
+void KView::contextPress( const TQPoint & point )
{
- QPopupMenu * pop = ( QPopupMenu* )factory()->container( "popupmenu", this );
+ TQPopupMenu * pop = ( TQPopupMenu* )factory()->container( "popupmenu", this );
pop->popup( point );
}
@@ -301,10 +301,10 @@ void KView::slotClose()
void KView::slotCopy()
{
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
cb->setSelectionMode( false );
- QRect selectarea = m_pCanvas->selection();
+ TQRect selectarea = m_pCanvas->selection();
if( selectarea.isEmpty() )
{
kdDebug( 4600 ) << k_funcinfo << " copy whole image" << endl;
@@ -319,21 +319,21 @@ void KView::slotCopy()
void KView::slotPaste()
{
- // Get QImage from clipboard and create a new image.
- QClipboard *cb = QApplication::clipboard();
- QImage img = cb->image();
+ // Get TQImage from clipboard and create a new image.
+ QClipboard *cb = TQApplication::clipboard();
+ TQImage img = cb->image();
if( ! img.isNull() )
m_pViewer->newImage( img );
}
void KView::slotCrop()
{
- QRect selectarea = m_pCanvas->selection();
+ TQRect selectarea = m_pCanvas->selection();
kdDebug( 4600 ) << "Crop following area: " << selectarea.x() << ", " << selectarea.y() << ", " << selectarea.width() << ", " << selectarea.height() << endl;
if( selectarea.isNull() )
return;
- const QImage * origimg = m_pCanvas->image();
+ const TQImage * origimg = m_pCanvas->image();
if( origimg == 0 )
return;
@@ -387,7 +387,7 @@ void KView::slotConfigureToolbars()
{
saveMainWindowSettings( KGlobal::config(), "MainWindow" );
KEditToolbar dlg( factory() );
- connect( &dlg, SIGNAL( newToolbarConfig() ), SLOT( slotNewToolbarConfig() ) );
+ connect( &dlg, TQT_SIGNAL( newToolbarConfig() ), TQT_SLOT( slotNewToolbarConfig() ) );
dlg.exec();
}
@@ -412,9 +412,9 @@ void KView::enableAction( const char * name, bool b )
void KView::clipboardDataChanged()
{
- QClipboard * cb = QApplication::clipboard();
+ QClipboard * cb = TQApplication::clipboard();
cb->setSelectionMode( false );
- bool hasImage = QImageDrag::canDecode( cb->data( QClipboard::Clipboard ) );
+ bool hasImage = TQImageDrag::canDecode( cb->data( QClipboard::Clipboard ) );
m_paPaste->setEnabled( hasImage );
}
@@ -422,9 +422,9 @@ void KView::jobStarted( KIO::Job * job )
{
if( job )
{
- connect( job, SIGNAL( percent( KIO::Job *, unsigned long ) ), this, SLOT( loadingProgress( KIO::Job *, unsigned long ) ) );
- connect( job, SIGNAL( speed( KIO::Job *, unsigned long ) ), this, SLOT( speedProgress( KIO::Job *, unsigned long ) ) );
- //connect( job, SIGNAL( infoMessage( KIO::Job *, const QString & ) ), this, SLOT() );
+ connect( job, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ), this, TQT_SLOT( loadingProgress( KIO::Job *, unsigned long ) ) );
+ connect( job, TQT_SIGNAL( speed( KIO::Job *, unsigned long ) ), this, TQT_SLOT( speedProgress( KIO::Job *, unsigned long ) ) );
+ //connect( job, TQT_SIGNAL( infoMessage( KIO::Job *, const TQString & ) ), this, TQT_SLOT() );
loadingProgress( job, 0 );
speedProgress( job, 0 );
}
@@ -441,7 +441,7 @@ void KView::jobCompleted( bool /*hasPending*/ )
statusBar()->changeItem( "", STATUSBAR_SPEED_ID );
}
-void KView::jobCanceled( const QString & errorMsg )
+void KView::jobCanceled( const TQString & errorMsg )
{
statusBar()->message( errorMsg );
jobCompleted();
@@ -463,7 +463,7 @@ void KView::loadingProgress( KIO::Job *, unsigned long percent )
void KView::speedProgress( KIO::Job *, unsigned long bytesPerSecond )
{
- QString sizeStr;
+ TQString sizeStr;
if( bytesPerSecond > 0 )
sizeStr = i18n( "%1/s" ).arg( KIO::convertSize( bytesPerSecond ) );
@@ -473,7 +473,7 @@ void KView::speedProgress( KIO::Job *, unsigned long bytesPerSecond )
statusBar()->changeItem( sizeStr, STATUSBAR_SPEED_ID );
}
-void KView::slotSetStatusBarText( const QString & msg )
+void KView::slotSetStatusBarText( const TQString & msg )
{
kdDebug( 4600 ) << k_funcinfo << endl;
statusBar()->message( msg );
@@ -481,59 +481,59 @@ void KView::slotSetStatusBarText( const QString & msg )
KMessageBox::information( this, msg );
}
-void KView::cursorPos( const QPoint & pos )
+void KView::cursorPos( const TQPoint & pos )
{
- statusBar()->changeItem( QString( "%1, %2" ).arg( pos.x() ).arg( pos.y() ), STATUSBAR_CURSOR_ID );
+ statusBar()->changeItem( TQString( "%1, %2" ).arg( pos.x() ).arg( pos.y() ), STATUSBAR_CURSOR_ID );
}
-void KView::setupActions( QObject * partobject )
+void KView::setupActions( TQObject * partobject )
{
// File
- KStdAction::open( this, SLOT( slotOpenFile() ), actionCollection() );
- m_paRecent = KStdAction::openRecent( this, SLOT( slotOpenRecent( const KURL & ) ), actionCollection() );
- KAction * aClose = KStdAction::close( this, SLOT( slotClose() ), actionCollection() );
+ KStdAction::open( this, TQT_SLOT( slotOpenFile() ), actionCollection() );
+ m_paRecent = KStdAction::openRecent( this, TQT_SLOT( slotOpenRecent( const KURL & ) ), actionCollection() );
+ KAction * aClose = KStdAction::close( this, TQT_SLOT( slotClose() ), actionCollection() );
aClose->setEnabled( false );
- connect( m_pViewer->widget(), SIGNAL( hasImage( bool ) ), aClose, SLOT( setEnabled( bool ) ) );
+ connect( m_pViewer->widget(), TQT_SIGNAL( hasImage( bool ) ), aClose, TQT_SLOT( setEnabled( bool ) ) );
- QObject * extension = partobject->child( 0, "KParts::BrowserExtension", false );
+ TQObject * extension = partobject->child( 0, "KParts::BrowserExtension", false );
if( extension )
{
- QStrList slotNames = extension->metaObject()->slotNames();
+ TQStrList slotNames = extension->metaObject()->slotNames();
if( slotNames.contains( "print()" ) )
- KStdAction::print( extension, SLOT( print() ), actionCollection(), "print" );
+ KStdAction::print( extension, TQT_SLOT( print() ), actionCollection(), "print" );
if( slotNames.contains( "del()" ) )
( void )new KAction( i18n( "&Delete" ), "editdelete", SHIFT+Key_Delete,
- extension, SLOT( del() ), actionCollection(), "del" );
- connect( extension, SIGNAL( enableAction( const char *, bool ) ), SLOT( enableAction( const char *, bool ) ) );
+ extension, TQT_SLOT( del() ), actionCollection(), "del" );
+ connect( extension, TQT_SIGNAL( enableAction( const char *, bool ) ), TQT_SLOT( enableAction( const char *, bool ) ) );
}
- KStdAction::quit( this, SLOT( close() ), actionCollection() );
+ KStdAction::quit( this, TQT_SLOT( close() ), actionCollection() );
// Edit
- KAction * aCopy = KStdAction::copy( this, SLOT( slotCopy() ), actionCollection() );
+ KAction * aCopy = KStdAction::copy( this, TQT_SLOT( slotCopy() ), actionCollection() );
aCopy->setEnabled( false );
- connect( m_pViewer->widget(), SIGNAL( hasImage( bool ) ), aCopy, SLOT( setEnabled( bool ) ) );
- m_paPaste = KStdAction::paste( this, SLOT( slotPaste() ), actionCollection() );
+ connect( m_pViewer->widget(), TQT_SIGNAL( hasImage( bool ) ), aCopy, TQT_SLOT( setEnabled( bool ) ) );
+ m_paPaste = KStdAction::paste( this, TQT_SLOT( slotPaste() ), actionCollection() );
clipboardDataChanged(); //enable or disable paste
- KAction * aCrop = new KAction( i18n( "Cr&op" ), Key_C, this, SLOT( slotCrop() ), actionCollection(), "crop" );
+ KAction * aCrop = new KAction( i18n( "Cr&op" ), Key_C, this, TQT_SLOT( slotCrop() ), actionCollection(), "crop" );
aCrop->setEnabled( false );
KAction * aReload = new KAction( i18n( "&Reload" ), "reload", KStdAccel::shortcut( KStdAccel::Reload ), partobject,
- SLOT( reload() ), actionCollection(), "reload" );
+ TQT_SLOT( reload() ), actionCollection(), "reload" );
aReload->setEnabled( false );
- connect( m_pViewer->widget(), SIGNAL( hasImage( bool ) ), aReload, SLOT( setEnabled( bool ) ) );
+ connect( m_pViewer->widget(), TQT_SIGNAL( hasImage( bool ) ), aReload, TQT_SLOT( setEnabled( bool ) ) );
// Settings
- m_paShowMenubar = KStdAction::showMenubar( this, SLOT( slotToggleMenubar() ), actionCollection() );
+ m_paShowMenubar = KStdAction::showMenubar( this, TQT_SLOT( slotToggleMenubar() ), actionCollection() );
createStandardStatusBarAction();
m_paShowStatusBar = ::qt_cast<KToggleAction*>( action( "options_show_statusbar" ) );
if( m_paShowStatusBar )
- connect( m_paShowStatusBar, SIGNAL( toggled( bool ) ), SLOT( statusbarToggled( bool ) ) );
+ connect( m_paShowStatusBar, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( statusbarToggled( bool ) ) );
m_paShowFullScreen = KStdAction::fullScreen( 0, 0, actionCollection(), this );
- connect( m_paShowFullScreen, SIGNAL( toggled( bool )), this, SLOT( slotUpdateFullScreen( bool )));
- KStdAction::preferences( this, SLOT( slotPreferences() ), actionCollection() );
- KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()),
+ connect( m_paShowFullScreen, TQT_SIGNAL( toggled( bool )), this, TQT_SLOT( slotUpdateFullScreen( bool )));
+ KStdAction::preferences( this, TQT_SLOT( slotPreferences() ), actionCollection() );
+ KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()),
actionCollection());
- KStdAction::configureToolbars( this, SLOT( slotConfigureToolbars() ), actionCollection() );
+ KStdAction::configureToolbars( this, TQT_SLOT( slotConfigureToolbars() ), actionCollection() );
}
void KView::handleResize()
@@ -552,13 +552,13 @@ void KView::handleResize()
m_pCanvas->boundImageTo( m_pViewer->widget()->size() );
break;
case BestFit:
- QSize imageSize = m_pCanvas->imageSize();
+ TQSize imageSize = m_pCanvas->imageSize();
if( imageSize.isEmpty() )
return;
// Compare the image size and the maximum available space in the
// display canvas i.e. will the image fit without resizing ?
- QSize maxCanvas = maxCanvasSize();
+ TQSize maxCanvas = maxCanvasSize();
if( ( maxCanvas.height() >= imageSize.height() )
&& ( maxCanvas.width() >= imageSize.width() ) )
{
@@ -588,14 +588,14 @@ void KView::fitWindowToImage()
bool centeredOrig = m_pCanvas->centered();
m_pCanvas->setCentered( false );
- QSize imagesize = m_pCanvas->currentSize();
+ TQSize imagesize = m_pCanvas->currentSize();
if( imagesize.isEmpty() )
return;
- QSize winsize = sizeForCentralWidgetSize( imagesize );
- QRect workarea = m_pWinModule->workArea();
+ TQSize winsize = sizeForCentralWidgetSize( imagesize );
+ TQRect workarea = m_pWinModule->workArea();
- QScrollBar * sb = new QScrollBar( Qt::Horizontal, this );
+ TQScrollBar * sb = new TQScrollBar( Qt::Horizontal, this );
int scrollbarwidth = sb->height();
delete sb;
@@ -614,7 +614,7 @@ void KView::fitWindowToImage()
winsize.setWidth( workarea.width() );
}
- QRect winrect( geometry() );
+ TQRect winrect( geometry() );
winrect.setSize( winsize );
int xdiff = winrect.x() + winrect.width() - workarea.x() - workarea.width();
@@ -636,7 +636,7 @@ void KView::fitWindowToImage()
m_pCanvas->setCentered( centeredOrig );
}
-QSize KView::barSize( int mainwinwidth, BarSizeFrom from )
+TQSize KView::barSize( int mainwinwidth, BarSizeFrom from )
{
int height = 0;
int width = 0;
@@ -653,7 +653,7 @@ QSize KView::barSize( int mainwinwidth, BarSizeFrom from )
width += toolBar()->width();
break;
case KToolBar::Flat:
- height += kapp->style().pixelMetric( QStyle::PM_DockWindowHandleExtent );
+ height += kapp->style().pixelMetric( TQStyle::PM_DockWindowHandleExtent );
break;
case KToolBar::Floating:
break;
@@ -666,14 +666,14 @@ QSize KView::barSize( int mainwinwidth, BarSizeFrom from )
if( statusBar()->isVisibleTo( this ) )
height += statusBar()->height();
- return QSize( width, height );
+ return TQSize( width, height );
}
-QSize KView::maxCanvasSize()
+TQSize KView::maxCanvasSize()
{
- QSize workarea = m_pWinModule->workArea().size();
- QSize framesize = frameSize() - size();
- QSize maxcanvassize = workarea - framesize - barSize( workarea.width() - framesize.width(), FromWidgetSize );
+ TQSize workarea = m_pWinModule->workArea().size();
+ TQSize framesize = frameSize() - size();
+ TQSize maxcanvassize = workarea - framesize - barSize( workarea.width() - framesize.width(), FromWidgetSize );
kdDebug( 4600 ) << "maxcanvassize = " << maxcanvassize.width() << "x" << maxcanvassize.height() << endl;
return maxcanvassize;
}
diff --git a/kview/kview.h b/kview/kview.h
index 0f523efc..6726fb8b 100644
--- a/kview/kview.h
+++ b/kview/kview.h
@@ -31,13 +31,13 @@ namespace KImageViewer {
class Canvas;
class Viewer;
}
-class QSize;
-class QRect;
+class TQSize;
+class TQRect;
class KAction;
class KToggleAction;
class KRecentFilesAction;
class KWinModule;
-class QStringList;
+class TQStringList;
class KProgress;
class KView : public KParts::MainWindow
@@ -48,7 +48,7 @@ class KView : public KParts::MainWindow
virtual ~KView();
void load( const KURL & url );
void loadFromStdin();
- QSize sizeForCentralWidgetSize( QSize );
+ TQSize sizeForCentralWidgetSize( TQSize );
KImageViewer::Viewer * viewer() const { return m_pViewer; }
protected:
@@ -57,13 +57,13 @@ class KView : public KParts::MainWindow
void readProperties( KConfig * );
void saveSettings( KConfig * );
- virtual bool eventFilter( QObject *, QEvent * );
+ virtual bool eventFilter( TQObject *, TQEvent * );
protected slots:
void readSettings(); //KConfig * );
- void imageSizeChanged( const QSize & );
- void selectionChanged( const QRect & );
- void contextPress( const QPoint & );
+ void imageSizeChanged( const TQSize & );
+ void selectionChanged( const TQRect & );
+ void contextPress( const TQPoint & );
void slotOpenFile();
void slotOpenRecent( const KURL & );
void slotClose();
@@ -81,11 +81,11 @@ class KView : public KParts::MainWindow
void jobStarted( KIO::Job * );
void jobCompleted();
void jobCompleted( bool );
- void jobCanceled( const QString & );
+ void jobCanceled( const TQString & );
void loadingProgress( KIO::Job *, unsigned long );
void speedProgress( KIO::Job *, unsigned long );
- void slotSetStatusBarText( const QString & );
- void cursorPos( const QPoint & ); // write the cursor pos to the statusbar
+ void slotSetStatusBarText( const TQString & );
+ void cursorPos( const TQPoint & ); // write the cursor pos to the statusbar
void loadPlugins();
void statusbarToggled( bool );
@@ -93,11 +93,11 @@ class KView : public KParts::MainWindow
enum BarSizeFrom { FromImageSize, FromWidgetSize };
enum ResizeMode { ResizeWindow = 0, ResizeImage = 1, NoResize = 2, BestFit = 3 };
enum StatusBarItem { STATUSBAR_SPEED_ID, STATUSBAR_CURSOR_ID, STATUSBAR_SIZE_ID, STATUSBAR_SELECTION_ID };
- void setupActions( QObject * );
+ void setupActions( TQObject * );
void handleResize();
void fitWindowToImage();
- QSize barSize( int, BarSizeFrom );
- QSize maxCanvasSize();
+ TQSize barSize( int, BarSizeFrom );
+ TQSize maxCanvasSize();
KImageViewer::Viewer * m_pViewer;
KImageViewer::Canvas * m_pCanvas;
diff --git a/kview/kviewcanvas/config/confmodules.cpp b/kview/kviewcanvas/config/confmodules.cpp
index c5e47dac..4ecf07b9 100644
--- a/kview/kviewcanvas/config/confmodules.cpp
+++ b/kview/kviewcanvas/config/confmodules.cpp
@@ -20,9 +20,9 @@
#include "generalconfigwidget.h"
#include "defaults.h"
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qframe.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqframe.h>
#include <klocale.h>
#include <ksimpleconfig.h>
@@ -31,14 +31,14 @@
#include <knuminput.h>
#include <kgenericfactory.h>
-typedef KGenericFactory<KViewCanvasConfig, QWidget> KViewCanvasConfigFactory;
+typedef KGenericFactory<KViewCanvasConfig, TQWidget> KViewCanvasConfigFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kviewcanvasconfig, KViewCanvasConfigFactory( "kcm_kviewcanvasconfig" ) )
-KViewCanvasConfig::KViewCanvasConfig( QWidget * parent, const char *, const QStringList & args )
+KViewCanvasConfig::KViewCanvasConfig( TQWidget * parent, const char *, const TQStringList & args )
: KCModule( KViewCanvasConfigFactory::instance(), parent, args )
, m_config( new KConfig( "kviewcanvasrc" ) )
{
- QBoxLayout * layout = new QVBoxLayout( this );
+ TQBoxLayout * layout = new TQVBoxLayout( this );
layout->setAutoAdd( true );
m_pWidget = new GeneralConfigWidget( this );
@@ -52,21 +52,21 @@ KViewCanvasConfig::KViewCanvasConfig( QWidget * parent, const char *, const QStr
for( unsigned int i = 1; i <= Defaults::numOfBlendEffects; ++i )
{
- QCheckListItem * item = new QCheckListItem( m_pWidget->m_pListView, i18n( Defaults::blendEffectDescription[ i ] ), QCheckListItem::CheckBox );
+ TQCheckListItem * item = new TQCheckListItem( m_pWidget->m_pListView, i18n( Defaults::blendEffectDescription[ i ] ), TQCheckListItem::CheckBox );
m_items.append( item );
}
- connect( m_pWidget->m_pListView, SIGNAL( clicked( QListViewItem * ) ), this, SLOT( configChanged() ) );
- connect( m_pWidget->m_pListView, SIGNAL( spacePressed( QListViewItem * ) ), this, SLOT( configChanged() ) );
+ connect( m_pWidget->m_pListView, TQT_SIGNAL( clicked( TQListViewItem * ) ), this, TQT_SLOT( configChanged() ) );
+ connect( m_pWidget->m_pListView, TQT_SIGNAL( spacePressed( TQListViewItem * ) ), this, TQT_SLOT( configChanged() ) );
- connect( m_pWidget->m_pSmoothScaling, SIGNAL( toggled( bool ) ), this, SLOT( configChanged() ) );
- connect( m_pWidget->m_pKeepRatio, SIGNAL( toggled( bool ) ), this, SLOT( configChanged() ) );
- connect( m_pWidget->m_pCenterImage, SIGNAL( toggled( bool ) ), this, SLOT( configChanged() ) );
- connect( m_pWidget->m_bgColor, SIGNAL( changed( const QColor & ) ), this, SLOT( configChanged() ) );
- connect( m_pWidget->m_pMinWidth, SIGNAL( valueChanged( int ) ), this, SLOT( configChanged() ) );
- connect( m_pWidget->m_pMaxWidth, SIGNAL( valueChanged( int ) ), this, SLOT( configChanged() ) );
- connect( m_pWidget->m_pMinHeight, SIGNAL( valueChanged( int ) ), this, SLOT( configChanged() ) );
- connect( m_pWidget->m_pMaxHeight, SIGNAL( valueChanged( int ) ), this, SLOT( configChanged() ) );
+ connect( m_pWidget->m_pSmoothScaling, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( configChanged() ) );
+ connect( m_pWidget->m_pKeepRatio, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( configChanged() ) );
+ connect( m_pWidget->m_pCenterImage, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( configChanged() ) );
+ connect( m_pWidget->m_bgColor, TQT_SIGNAL( changed( const TQColor & ) ), this, TQT_SLOT( configChanged() ) );
+ connect( m_pWidget->m_pMinWidth, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( configChanged() ) );
+ connect( m_pWidget->m_pMaxWidth, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( configChanged() ) );
+ connect( m_pWidget->m_pMinHeight, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( configChanged() ) );
+ connect( m_pWidget->m_pMaxHeight, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( configChanged() ) );
load();
}
@@ -90,9 +90,9 @@ void KViewCanvasConfig::save()
cfgGroup.writeEntry( "Maximum Height", m_pWidget->m_pMaxHeight->value() );
KConfigGroup cfgGroup2( m_config, "Blend Effects" );
- QCheckListItem *item = m_items.first();
+ TQCheckListItem *item = m_items.first();
for( int i = 1; item; item = m_items.next(), ++i )
- cfgGroup2.writeEntry( QString::number( i ), item->isOn() );
+ cfgGroup2.writeEntry( TQString::number( i ), item->isOn() );
m_config->sync();
}
@@ -111,9 +111,9 @@ void KViewCanvasConfig::load()
m_pWidget->m_pMaxHeight->setValue( cfgGroup.readNumEntry( "Maximum Height", Defaults::maxSize.height() ) );
KConfigGroup cfgGroup2( m_config, "Blend Effects" );
- QCheckListItem * item = m_items.first();
+ TQCheckListItem * item = m_items.first();
for( int i = 1; item; item = m_items.next(), ++i )
- item->setOn( cfgGroup2.readBoolEntry( QString::number( i ), false ) );
+ item->setOn( cfgGroup2.readBoolEntry( TQString::number( i ), false ) );
}
void KViewCanvasConfig::defaults()
@@ -129,7 +129,7 @@ void KViewCanvasConfig::defaults()
m_pWidget->m_pMaxWidth ->setValue( Defaults::maxSize.width() );
m_pWidget->m_pMaxHeight->setValue( Defaults::maxSize.height() );
- QCheckListItem * item = m_items.first();
+ TQCheckListItem * item = m_items.first();
for( int i = 1; item; item = m_items.next(), ++i )
item->setOn( false );
emit changed( true );
diff --git a/kview/kviewcanvas/config/confmodules.h b/kview/kviewcanvas/config/confmodules.h
index f7dfe262..e513a9cd 100644
--- a/kview/kviewcanvas/config/confmodules.h
+++ b/kview/kviewcanvas/config/confmodules.h
@@ -20,17 +20,17 @@
#define CONFMODULES_H
#include <kcmodule.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
class GeneralConfigWidget;
-class QCheckListItem;
+class TQCheckListItem;
class KConfig;
class KViewCanvasConfig : public KCModule
{
Q_OBJECT
public:
- KViewCanvasConfig( QWidget * parent, const char * name = 0, const QStringList & args = QStringList() );
+ KViewCanvasConfig( TQWidget * parent, const char * name = 0, const TQStringList & args = TQStringList() );
~KViewCanvasConfig();
void load();
@@ -43,7 +43,7 @@ class KViewCanvasConfig : public KCModule
private:
KConfig * m_config;
GeneralConfigWidget * m_pWidget;
- QPtrList<QCheckListItem> m_items;
+ TQPtrList<TQCheckListItem> m_items;
};
// vim:sw=4:ts=4
diff --git a/kview/kviewcanvas/config/defaults.h b/kview/kviewcanvas/config/defaults.h
index 0a92d651..02abbb19 100644
--- a/kview/kviewcanvas/config/defaults.h
+++ b/kview/kviewcanvas/config/defaults.h
@@ -20,16 +20,16 @@
#define DEFAULTS_H
#include <klocale.h>
-#include <qsize.h>
-#include <qcolor.h>
+#include <tqsize.h>
+#include <tqcolor.h>
namespace Defaults {
static const bool smoothScaling = false;
static const bool keepAspectRatio = true;
static const bool centerImage = true;
- static const QColor bgColor( Qt::black );
- static const QSize minSize( 1, 1 );
- static const QSize maxSize( 10000, 10000 );
+ static const TQColor bgColor( Qt::black );
+ static const TQSize minSize( 1, 1 );
+ static const TQSize maxSize( 10000, 10000 );
static const unsigned int numOfBlendEffects = 4;
static const char * blendEffectDescription[ 6 ] = {
I18N_NOOP( "No Blending" ),
diff --git a/kview/kviewcanvas/kimagecanvas.cpp b/kview/kviewcanvas/kimagecanvas.cpp
index 6c54850f..97001670 100644
--- a/kview/kviewcanvas/kimagecanvas.cpp
+++ b/kview/kviewcanvas/kimagecanvas.cpp
@@ -21,11 +21,11 @@
#include "version.h"
#include "config/defaults.h"
-#include <qcolor.h>
-#include <qimage.h>
-#include <qapplication.h>
-#include <qwmatrix.h>
-#include <qtimer.h>
+#include <tqcolor.h>
+#include <tqimage.h>
+#include <tqapplication.h>
+#include <tqwmatrix.h>
+#include <tqtimer.h>
#include <kpixmap.h>
#include <kdebug.h>
@@ -43,14 +43,14 @@ typedef KGenericFactory<KImageCanvas> KImageCanvasFactory;
K_EXPORT_COMPONENT_FACTORY( libkviewcanvas,
KImageCanvasFactory( "kviewcanvas" ) )
-KImageCanvas::KImageCanvas( QWidget * parent, const char * name, const QStringList & )
- : QScrollView( parent, name, WResizeNoErase | WStaticContents )
+KImageCanvas::KImageCanvas( TQWidget * parent, const char * name, const TQStringList & )
+ : TQScrollView( parent, name, WResizeNoErase | WStaticContents )
, m_client( 0 )
, m_oldClient( 0 )
, m_image( 0 )
, m_imageTransformed( 0 )
, m_pixmap( 0 )
- , m_pTimer( new QTimer( this, "KImageCanvas/Timer" ) )
+ , m_pTimer( new TQTimer( this, "KImageCanvas/Timer" ) )
, m_maxsize( Defaults::maxSize )
, m_minsize( Defaults::minSize )
, m_currentsize( 0, 0 )
@@ -66,22 +66,22 @@ KImageCanvas::KImageCanvas( QWidget * parent, const char * name, const QStringLi
, m_iBlendTimerId( 0 )
{
kdDebug( 4620 ) << k_funcinfo << endl;
- setFrameStyle( QFrame::NoFrame );
- setResizePolicy( QScrollView::Manual );
+ setFrameStyle( TQFrame::NoFrame );
+ setResizePolicy( TQScrollView::Manual );
setMinimumSize( 0, 0 );
setBgColor( Defaults::bgColor );
- connect( this, SIGNAL( imageChanged() ), this, SLOT( slotImageChanged() ) );
- connect( m_pTimer, SIGNAL( timeout() ), this, SLOT( hideCursor() ) );
+ connect( this, TQT_SIGNAL( imageChanged() ), this, TQT_SLOT( slotImageChanged() ) );
+ connect( m_pTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( hideCursor() ) );
KSettings::Dispatcher::self()->registerInstance(
KImageCanvasFactory::instance(), this,
- SLOT( loadSettings() ) );
+ TQT_SLOT( loadSettings() ) );
viewport()->setFocusProxy( this );
clear();
- QWidget::setMouseTracking( true );
+ TQWidget::setMouseTracking( true );
viewport()->setMouseTracking( true );
m_cursor.setShape( Qt::CrossCursor );
viewport()->setCursor( m_cursor );
@@ -97,7 +97,7 @@ KImageCanvas::~KImageCanvas()
delete m_pixmap; m_pixmap = 0;
}
-void KImageCanvas::setBgColor( const QColor & color )
+void KImageCanvas::setBgColor( const TQColor & color )
{
kdDebug( 4620 ) << k_funcinfo << endl;
viewport()->setPaletteBackgroundColor( color );
@@ -105,7 +105,7 @@ void KImageCanvas::setBgColor( const QColor & color )
m_client->setPaletteBackgroundColor( color );
}
-const QColor & KImageCanvas::bgColor() const
+const TQColor & KImageCanvas::bgColor() const
{
kdDebug( 4620 ) << k_funcinfo << endl;
return viewport()->paletteBackgroundColor();
@@ -120,38 +120,38 @@ int KImageCanvas::imageDepth() const
return m_image->depth();
}
-QSize KImageCanvas::imageSize() const
+TQSize KImageCanvas::imageSize() const
{
//kdDebug( 4620 ) << k_funcinfo << endl;
if( ! m_image )
- return QSize( 0, 0 );
+ return TQSize( 0, 0 );
- return m_matrix.isIdentity() ? m_image->size() : m_matrix.mapRect( QRect( QPoint(), m_image->size() ) ).size();
+ return m_matrix.isIdentity() ? m_image->size() : m_matrix.mapRect( TQRect( TQPoint(), m_image->size() ) ).size();
}
-QSize KImageCanvas::currentSize() const
+TQSize KImageCanvas::currentSize() const
{
kdDebug( 4620 ) << k_funcinfo << endl;
if( ! m_image )
- return QSize( 0, 0 );
+ return TQSize( 0, 0 );
return m_currentsize;
}
-const QImage * KImageCanvas::image() const
+const TQImage * KImageCanvas::image() const
{
if( m_imageTransformed )
return m_imageTransformed;
return m_image;
}
-QRect KImageCanvas::selection() const
+TQRect KImageCanvas::selection() const
{
kdDebug( 4620 ) << k_funcinfo << endl;
if( m_client )
return m_selection;
else
- return QRect();
+ return TQRect();
}
void KImageCanvas::setCentered( bool centered )
@@ -164,13 +164,13 @@ void KImageCanvas::setCentered( bool centered )
}
}
-void KImageCanvas::setImage( const QImage & newimage )
+void KImageCanvas::setImage( const TQImage & newimage )
{
bool emitHasImage = m_image ? false : true;
m_matrix.reset();
matrixChanged();
delete m_image;
- m_image = new QImage( newimage );
+ m_image = new TQImage( newimage );
m_bNewImage = true;
// don't emit the signal here - call the slot directly
slotImageChanged();
@@ -181,14 +181,14 @@ void KImageCanvas::setImage( const QImage & newimage )
emit hasImage( true );
}
-void KImageCanvas::setImage( const QImage & newimage, const QSize & size )
+void KImageCanvas::setImage( const TQImage & newimage, const TQSize & size )
{
kdDebug( 4620 ) << k_funcinfo << size << endl;
bool emitHasImage = m_image ? false : true;
m_matrix.reset();
matrixChanged();
delete m_image;
- m_image = new QImage( newimage );
+ m_image = new TQImage( newimage );
m_bNewImage = true;
// don't emit the signal here - call the slot directly
slotImageChanged();
@@ -214,7 +214,7 @@ void KImageCanvas::setZoom( double zoom )
}
}
-void KImageCanvas::boundImageTo( const QSize & size )
+void KImageCanvas::boundImageTo( const TQSize & size )
{
bool keepAspectRatio = m_keepaspectratio;
m_keepaspectratio = true;
@@ -222,7 +222,7 @@ void KImageCanvas::boundImageTo( const QSize & size )
m_keepaspectratio = keepAspectRatio;
}
-void KImageCanvas::setMaximumImageSize( const QSize & maxsize )
+void KImageCanvas::setMaximumImageSize( const TQSize & maxsize )
{
kdDebug( 4620 ) << k_funcinfo << maxsize << endl;
if( ( ! m_minsize.isEmpty() ) &&
@@ -237,7 +237,7 @@ void KImageCanvas::setMaximumImageSize( const QSize & maxsize )
resizeImage( m_currentsize );
}
-void KImageCanvas::setMinimumImageSize( const QSize & minsize )
+void KImageCanvas::setMinimumImageSize( const TQSize & minsize )
{
kdDebug( 4620 ) << k_funcinfo << minsize << endl;
if( ( ! m_maxsize.isEmpty() ) &&
@@ -252,13 +252,13 @@ void KImageCanvas::setMinimumImageSize( const QSize & minsize )
resizeImage( m_currentsize );
}
-void KImageCanvas::resizeImage( const QSize & newsize )
+void KImageCanvas::resizeImage( const TQSize & newsize )
{
kdDebug( 4620 ) << k_funcinfo << endl;
if( m_image == 0 )
return;
- QSize size = newsize;
+ TQSize size = newsize;
// check that it fits into min and max sizes
checkBounds( size );
@@ -301,7 +301,7 @@ unsigned int KImageCanvas::numOfBlendEffects() const
return Defaults::numOfBlendEffects;
}
-QString KImageCanvas::blendEffectDescription( unsigned int idx ) const
+TQString KImageCanvas::blendEffectDescription( unsigned int idx ) const
{
kdDebug( 4620 ) << k_funcinfo << endl;
switch( idx )
@@ -321,14 +321,14 @@ QString KImageCanvas::blendEffectDescription( unsigned int idx ) const
return i18n( Defaults::blendEffectDescription[ 4 ] );
}
kdError( 4620 ) << "Effect description for effect with index " << idx << " doesn't exist\n";
- return QString::null;
+ return TQString::null;
}
-bool KImageCanvas::eventFilter( QObject * obj, QEvent * ev )
+bool KImageCanvas::eventFilter( TQObject * obj, TQEvent * ev )
{
- if( ( obj == m_client || obj == m_oldClient ) && ev->type() == QEvent::MouseMove )
- mouseMoveEvent( static_cast<QMouseEvent*>( ev ) );
- return QScrollView::eventFilter( obj, ev );
+ if( ( obj == m_client || obj == m_oldClient ) && ev->type() == TQEvent::MouseMove )
+ mouseMoveEvent( static_cast<TQMouseEvent*>( ev ) );
+ return TQScrollView::eventFilter( obj, ev );
}
void KImageCanvas::setFastScale( bool fastscale )
@@ -370,7 +370,7 @@ void KImageCanvas::flipHorizontal( bool change )
if( change )
{
- QWMatrix matrix( 1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F );
+ TQWMatrix matrix( 1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F );
*m_image = m_image->xForm( matrix );
emit imageChanged();
}
@@ -391,7 +391,7 @@ void KImageCanvas::flipVertical( bool change )
if( change )
{
- QWMatrix matrix( -1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F );
+ TQWMatrix matrix( -1.0F, 0.0F, 0.0F, 1.0F, 0.0F, 0.0F );
*m_image = m_image->xForm( matrix );
emit imageChanged();
}
@@ -412,7 +412,7 @@ void KImageCanvas::rotate( double a, bool change )
if( change )
{
- QWMatrix matrix;
+ TQWMatrix matrix;
matrix.rotate( a );
*m_image = m_image->xForm( matrix );
emit imageChanged();
@@ -427,13 +427,13 @@ void KImageCanvas::rotate( double a, bool change )
updateImage();
}
-void KImageCanvas::checkBounds( QSize & newsize )
+void KImageCanvas::checkBounds( TQSize & newsize )
{
kdDebug( 4620 ) << k_funcinfo << endl;
if( m_keepaspectratio )
{
// check that the new size has the same aspect ratio the original image had
- QSize origsize = imageSize();
+ TQSize origsize = imageSize();
double x1 = double( origsize.height() ) / double( newsize.height() );
double x2 = double( origsize.width() ) / double( newsize.width() );
if( ( newsize * x1 != origsize ) || ( newsize * x2 != origsize ) )
@@ -485,13 +485,13 @@ void KImageCanvas::checkBounds( QSize & newsize )
}
}
-void KImageCanvas::zoomFromSize( const QSize & newsize )
+void KImageCanvas::zoomFromSize( const TQSize & newsize )
{
kdDebug( 4620 ) << k_funcinfo << endl;
if( ! m_image )
return;
- QSize originalsize = imageSize();
+ TQSize originalsize = imageSize();
double widthzoom = double( newsize.width() ) / double( originalsize.width() );
double heightzoom = double( newsize.height() ) / double( originalsize.height() );
double zoom = ( widthzoom + heightzoom ) / 2;
@@ -508,7 +508,7 @@ void KImageCanvas::sizeFromZoom( double zoom )
if( ! m_image )
return;
- QSize newsize = zoom * imageSize();
+ TQSize newsize = zoom * imageSize();
kdDebug( 4620 ) << "change size from " << imageSize() << " to " << newsize << endl;
resizeImage( newsize );
}
@@ -517,7 +517,7 @@ void KImageCanvas::updateImage()
{
kdDebug( 4620 ) << k_funcinfo << endl;
if( ! m_bImageUpdateScheduled )
- QTimer::singleShot( 0, this, SLOT( slotUpdateImage() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotUpdateImage() ) );
m_bImageUpdateScheduled = true;
}
@@ -532,7 +532,7 @@ void KImageCanvas::slotUpdateImage()
if( m_bImageChanged || m_bSizeChanged || m_bMatrixChanged )
{
kdDebug( 4620 ) << "actually updating the image now" << endl;
- QApplication::setOverrideCursor( WaitCursor );
+ TQApplication::setOverrideCursor( WaitCursor );
if( m_bNewImage || ! m_client )
{
finishNewClient();
@@ -543,14 +543,14 @@ void KImageCanvas::slotUpdateImage()
if( m_bSizeChanged || m_bNewImage )
{
- QSize sh = m_client->sizeHint();
+ TQSize sh = m_client->sizeHint();
if( ! sh.isValid() )
- sh = QSize( 0, 0 );
+ sh = TQSize( 0, 0 );
m_client->resize( sh );
resizeContents( sh.width(), sh.height() );
center();
}
- QRect drawRect = m_client->drawRect();
+ TQRect drawRect = m_client->drawRect();
switch( m_iBlendEffect )
{
case NoBlending:
@@ -576,7 +576,7 @@ void KImageCanvas::slotUpdateImage()
}
m_client->update();
m_iBlendTimerId = startTimer( 5 );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
m_bNewImage = false;
@@ -585,7 +585,7 @@ void KImageCanvas::slotUpdateImage()
m_bMatrixChanged = false;
}
-void KImageCanvas::mouseMoveEvent( QMouseEvent * )
+void KImageCanvas::mouseMoveEvent( TQMouseEvent * )
{
if( m_cursor.shape() == Qt::BlankCursor )
{
@@ -598,21 +598,21 @@ void KImageCanvas::mouseMoveEvent( QMouseEvent * )
}
-void KImageCanvas::resizeEvent( QResizeEvent * ev )
+void KImageCanvas::resizeEvent( TQResizeEvent * ev )
{
kdDebug( 4620 ) << "KImageCanvas resized to " << ev->size() << endl;
- QScrollView::resizeEvent( ev );
+ TQScrollView::resizeEvent( ev );
center();
}
-void KImageCanvas::contentsMousePressEvent( QMouseEvent * ev )
+void KImageCanvas::contentsMousePressEvent( TQMouseEvent * ev )
{
if ( ev->button() == RightButton )
emit contextPress( ev->globalPos() );
- QScrollView::contentsMousePressEvent( ev );
+ TQScrollView::contentsMousePressEvent( ev );
}
-void KImageCanvas::contentsWheelEvent( QWheelEvent * ev )
+void KImageCanvas::contentsWheelEvent( TQWheelEvent * ev )
{
//kdDebug( 4620 ) << k_funcinfo << endl;
// Ctrl+Wheelmouse changes the zoom.
@@ -673,10 +673,10 @@ void KImageCanvas::contentsWheelEvent( QWheelEvent * ev )
setFastScale( oldscale );
}
else
- QScrollView::contentsWheelEvent( ev );
+ TQScrollView::contentsWheelEvent( ev );
}
-void KImageCanvas::keyPressEvent( QKeyEvent * ev )
+void KImageCanvas::keyPressEvent( TQKeyEvent * ev )
{
//kdDebug( 4620 ) << k_funcinfo << endl;
switch( ev->key() )
@@ -711,11 +711,11 @@ void KImageCanvas::keyPressEvent( QKeyEvent * ev )
}
}
-void KImageCanvas::timerEvent( QTimerEvent * ev )
+void KImageCanvas::timerEvent( TQTimerEvent * ev )
{
if( ev->timerId() == m_iBlendTimerId )
{
- QRect drawRect = m_client->drawRect();
+ TQRect drawRect = m_client->drawRect();
switch( m_iBlendEffect )
{
case NoBlending:
@@ -795,7 +795,7 @@ const KPixmap KImageCanvas::pixmap()
{
delete m_imageTransformed;
// we create a new image transformed by the matrix
- m_imageTransformed = new QImage( m_matrix.isIdentity() ? *m_image : m_image->xForm( m_matrix ) );
+ m_imageTransformed = new TQImage( m_matrix.isIdentity() ? *m_image : m_image->xForm( m_matrix ) );
kdDebug( 4620 ) << "Size of m_image: " << m_image->size() << endl;
kdDebug( 4620 ) << "Size of m_imageTransformed: " << m_imageTransformed->size() << endl;
}
@@ -806,7 +806,7 @@ const KPixmap KImageCanvas::pixmap()
if( m_fastscale )
{
// fast scaling is needed so we need to scale now
- QWMatrix matrix( m_matrix );
+ TQWMatrix matrix( m_matrix );
matrix.scale( m_zoom, m_zoom );
if( ! matrix.isIdentity() )
return m_pixmap->xForm( matrix );
@@ -832,10 +832,10 @@ void KImageCanvas::loadSettings()
setBgColor( cfgGroup.readColorEntry( "Background Color", &bgColor() ) );
- setMinimumImageSize( QSize( cfgGroup.readNumEntry( "Minimum Width",
+ setMinimumImageSize( TQSize( cfgGroup.readNumEntry( "Minimum Width",
minimumImageSize().width() ), cfgGroup.readNumEntry(
"Minimum Height", minimumImageSize().height() ) ) );
- setMaximumImageSize( QSize( cfgGroup.readNumEntry( "Maximum Width",
+ setMaximumImageSize( TQSize( cfgGroup.readNumEntry( "Maximum Width",
maximumImageSize().width() ), cfgGroup.readNumEntry(
"Maximum Height", maximumImageSize().height() ) ) );
@@ -845,7 +845,7 @@ void KImageCanvas::loadSettings()
m_vEffects.clear();
for( unsigned int i = 1; i <= numOfBlendEffects(); ++i )
{
- if( blendConfig.readBoolEntry( QString::number( i ), false ) )
+ if( blendConfig.readBoolEntry( TQString::number( i ), false ) )
m_vEffects.push_back( i );
}
// and now tell the canvas what blend effect to use
@@ -853,7 +853,7 @@ void KImageCanvas::loadSettings()
*/
}
-void KImageCanvas::selected( const QRect & rect )
+void KImageCanvas::selected( const TQRect & rect )
{
//kdDebug( 4620 ) << k_funcinfo << rect << endl;
m_selection = rect;
@@ -868,9 +868,9 @@ void KImageCanvas::selected( const QRect & rect )
emit selectionChanged( m_selection );
}
-void KImageCanvas::mapCursorPos( const QPoint & pos )
+void KImageCanvas::mapCursorPos( const TQPoint & pos )
{
- QPoint mapped( static_cast<int>( ( pos.x() + 0.5 ) / m_zoom ), static_cast<int>( ( pos.y() + 0.5 ) / m_zoom ) );
+ TQPoint mapped( static_cast<int>( ( pos.x() + 0.5 ) / m_zoom ), static_cast<int>( ( pos.y() + 0.5 ) / m_zoom ) );
//kdDebug( 4620 ) << k_funcinfo << pos << " -> " << mapped << endl;
emit cursorPos( mapped );
}
@@ -935,15 +935,15 @@ KImageHolder * KImageCanvas::createNewClient()
client->setMouseTracking( true );
client->installEventFilter( this );
setFocusProxy( client );
- client->setFocusPolicy( QWidget::StrongFocus );
+ client->setFocusPolicy( TQWidget::StrongFocus );
client->setFocus();
addChild( client, 0, 0 );
- connect( client, SIGNAL( contextPress( const QPoint& ) ), SIGNAL( contextPress( const QPoint& ) ) );
- connect( client, SIGNAL( cursorPos( const QPoint & ) ), SLOT( mapCursorPos( const QPoint & ) ) );
- connect( client, SIGNAL( selected( const QRect & ) ), SLOT( selected( const QRect & ) ) );
- connect( client, SIGNAL( wannaScroll( int, int ) ), SLOT( scrollBy( int, int ) ) );
+ connect( client, TQT_SIGNAL( contextPress( const TQPoint& ) ), TQT_SIGNAL( contextPress( const TQPoint& ) ) );
+ connect( client, TQT_SIGNAL( cursorPos( const TQPoint & ) ), TQT_SLOT( mapCursorPos( const TQPoint & ) ) );
+ connect( client, TQT_SIGNAL( selected( const TQRect & ) ), TQT_SLOT( selected( const TQRect & ) ) );
+ connect( client, TQT_SIGNAL( wannaScroll( int, int ) ), TQT_SLOT( scrollBy( int, int ) ) );
return client;
}
diff --git a/kview/kviewcanvas/kimagecanvas.h b/kview/kviewcanvas/kimagecanvas.h
index 8a0bffda..04934c74 100644
--- a/kview/kviewcanvas/kimagecanvas.h
+++ b/kview/kviewcanvas/kimagecanvas.h
@@ -22,16 +22,16 @@
#include "kimageviewer/canvas.h"
-#include <qscrollview.h>
-#include <qwmatrix.h>
-#include <qcursor.h>
-#include <qrect.h>
+#include <tqscrollview.h>
+#include <tqwmatrix.h>
+#include <tqcursor.h>
+#include <tqrect.h>
#include <kdemacros.h>
class KImageHolder;
-class QColor;
-class QImage;
+class TQColor;
+class TQImage;
class KPixmap;
/**
@@ -39,14 +39,14 @@ class KPixmap;
* @author Matthias Kretz <kretz@kde.org>
* @version $Id$
*/
-class KDE_EXPORT KImageCanvas : public QScrollView, public KImageViewer::Canvas
+class KDE_EXPORT KImageCanvas : public TQScrollView, public KImageViewer::Canvas
{
Q_OBJECT
public:
/**
* KImageCanvas Constructor
*/
- KImageCanvas( QWidget * parent, const char * name, const QStringList & args );
+ KImageCanvas( TQWidget * parent, const char * name, const TQStringList & args );
/**
* KImageCanvas Destructor
@@ -56,12 +56,12 @@ class KDE_EXPORT KImageCanvas : public QScrollView, public KImageViewer::Canvas
/**
* set the background color of the canvas
*/
- void setBgColor( const QColor & );
+ void setBgColor( const TQColor & );
/**
* returns the current background color
*/
- const QColor & bgColor() const;
+ const TQColor & bgColor() const;
/**
* the depth of the contained image
@@ -71,12 +71,12 @@ class KDE_EXPORT KImageCanvas : public QScrollView, public KImageViewer::Canvas
/**
* the size of the unzoomed image
*/
- QSize imageSize() const;
+ TQSize imageSize() const;
/**
* the size of the zoomed (current) image
*/
- QSize currentSize() const;
+ TQSize currentSize() const;
/**
* returns the zoom factor
@@ -86,7 +86,7 @@ class KDE_EXPORT KImageCanvas : public QScrollView, public KImageViewer::Canvas
/**
* returns the current (unzoomed) image
*/
- const QImage * image() const;
+ const TQImage * image() const;
/**
* Scrolls the content so that the point (x, y) is in the top-left corner.
@@ -116,7 +116,7 @@ class KDE_EXPORT KImageCanvas : public QScrollView, public KImageViewer::Canvas
/**
* Return the selected rectangle
*/
- QRect selection() const;
+ TQRect selection() const;
/**
* Returns whether the aspect ratio of the image is kept
@@ -131,30 +131,30 @@ class KDE_EXPORT KImageCanvas : public QScrollView, public KImageViewer::Canvas
/**
* @return the description of the blend effect
*/
- QString blendEffectDescription( unsigned int ) const;
+ TQString blendEffectDescription( unsigned int ) const;
/**
* @return the current maximum image size
*/
- const QSize & maximumImageSize() const { return m_maxsize; }
+ const TQSize & maximumImageSize() const { return m_maxsize; }
/**
* @return the current minimum image size
*/
- const QSize & minimumImageSize() const { return m_minsize; }
+ const TQSize & minimumImageSize() const { return m_minsize; }
/**
- * @return a pointer to the QWidget interface of this object
+ * @return a pointer to the TQWidget interface of this object
*/
- QWidget * widget() { return static_cast<QWidget *>( this ); }
+ TQWidget * widget() { return static_cast<TQWidget *>( this ); }
- bool eventFilter( QObject *, QEvent * );
+ bool eventFilter( TQObject *, TQEvent * );
signals:
/**
* a mouse button was pressed and a context menu should be openend
*/
- void contextPress( const QPoint& );
+ void contextPress( const TQPoint& );
/**
* the size of the image has changed (a new image was loaded, or the
@@ -162,7 +162,7 @@ class KDE_EXPORT KImageCanvas : public QScrollView, public KImageViewer::Canvas
*
* it passes the new size of the image
*/
- void imageSizeChanged( const QSize & );
+ void imageSizeChanged( const TQSize & );
/**
* The zoom of the image has changed.
@@ -173,7 +173,7 @@ class KDE_EXPORT KImageCanvas : public QScrollView, public KImageViewer::Canvas
* The selection has changed. Connect to this signal if you want to
* do something with a selection of the image (e.g. crop).
*/
- void selectionChanged( const QRect & );
+ void selectionChanged( const TQRect & );
/**
* Emitted when an image is finished being shown. If a blend effect is being used
@@ -199,7 +199,7 @@ class KDE_EXPORT KImageCanvas : public QScrollView, public KImageViewer::Canvas
/**
* The current mouse cursor position on the image.
*/
- void cursorPos( const QPoint & );
+ void cursorPos( const TQPoint & );
public slots:
/**
@@ -211,7 +211,7 @@ class KDE_EXPORT KImageCanvas : public QScrollView, public KImageViewer::Canvas
/**
* give the canvas a new image to show. The zoom level is kept.
*/
- void setImage( const QImage & );
+ void setImage( const TQImage & );
/**
* Give the canvas a new image to show.
@@ -219,7 +219,7 @@ class KDE_EXPORT KImageCanvas : public QScrollView, public KImageViewer::Canvas
* You have to pass the size the image should have when it appears
* on screen.
*/
- void setImage( const QImage &, const QSize & );
+ void setImage( const TQImage &, const TQSize & );
/**
* set the zoom to be used when showing the image
@@ -229,7 +229,7 @@ class KDE_EXPORT KImageCanvas : public QScrollView, public KImageViewer::Canvas
/**
* Fit the image into the requested width and height.
*/
- void boundImageTo( const QSize & size );
+ void boundImageTo( const TQSize & size );
/**
* Set the maximum size of the image. If this is set the image will
@@ -237,7 +237,7 @@ class KDE_EXPORT KImageCanvas : public QScrollView, public KImageViewer::Canvas
*
* If you set this to 0x0 the image size may be as big as possible
*/
- void setMaximumImageSize( const QSize & );
+ void setMaximumImageSize( const TQSize & );
/**
* Set the minimum size of the image. If this is set the image will
@@ -245,14 +245,14 @@ class KDE_EXPORT KImageCanvas : public QScrollView, public KImageViewer::Canvas
*
* If you set this to 0x0 the image size can be as small as possible
*/
- void setMinimumImageSize( const QSize & );
+ void setMinimumImageSize( const TQSize & );
/**
* Resize the image to the given size. It will keep the aspect ratio
* as long as keepAspectRatio is true (default). The image will be as
* large as possible within the given constraints.
*/
- void resizeImage( const QSize & );
+ void resizeImage( const TQSize & );
/**
* Hides the scrollbars of the canvas. It's still possible to scroll
@@ -295,17 +295,17 @@ class KDE_EXPORT KImageCanvas : public QScrollView, public KImageViewer::Canvas
void rotate( double a, bool change = false );
protected:
- void checkBounds( QSize & newsize );
- void zoomFromSize( const QSize & );
+ void checkBounds( TQSize & newsize );
+ void zoomFromSize( const TQSize & );
void sizeFromZoom( double );
void updateImage();
- void mouseMoveEvent( QMouseEvent * );
- void resizeEvent( QResizeEvent * );
- void contentsMousePressEvent( QMouseEvent * );
- void contentsWheelEvent( QWheelEvent * );
- void keyPressEvent( QKeyEvent * );
- void timerEvent( QTimerEvent * );
+ void mouseMoveEvent( TQMouseEvent * );
+ void resizeEvent( TQResizeEvent * );
+ void contentsMousePressEvent( TQMouseEvent * );
+ void contentsWheelEvent( TQWheelEvent * );
+ void keyPressEvent( TQKeyEvent * );
+ void timerEvent( TQTimerEvent * );
protected slots:
void slotUpdateImage();
@@ -314,8 +314,8 @@ class KDE_EXPORT KImageCanvas : public QScrollView, public KImageViewer::Canvas
void loadSettings();
private slots:
- void selected( const QRect & ); // map rect to unzoomed rect
- void mapCursorPos( const QPoint & );
+ void selected( const TQRect & ); // map rect to unzoomed rect
+ void mapCursorPos( const TQPoint & );
private:
enum BlendEffect {
@@ -335,16 +335,16 @@ class KDE_EXPORT KImageCanvas : public QScrollView, public KImageViewer::Canvas
KImageHolder * m_client;
KImageHolder * m_oldClient;
- QImage * m_image; //unzoomed copy of the current image
- QImage * m_imageTransformed; //xForm( m_matrix ) copy of the current image
+ TQImage * m_image; //unzoomed copy of the current image
+ TQImage * m_imageTransformed; //xForm( m_matrix ) copy of the current image
KPixmap * m_pixmap; //copy of the current pixmap (if ( m_fastscale ) it's unzoomed else it's m_imageTransformed.smoothScale()d)
- QTimer * m_pTimer; // timer for single shot to hide the cursor
- QCursor m_cursor; // the cursor show in the canvas (for auto-hiding)
+ TQTimer * m_pTimer; // timer for single shot to hide the cursor
+ TQCursor m_cursor; // the cursor show in the canvas (for auto-hiding)
- QWMatrix m_matrix; // the current transformation matrix
- QSize m_maxsize, m_minsize;
- QSize m_currentsize;
+ TQWMatrix m_matrix; // the current transformation matrix
+ TQSize m_maxsize, m_minsize;
+ TQSize m_currentsize;
double m_zoom;
bool m_fastscale;
@@ -358,7 +358,7 @@ class KDE_EXPORT KImageCanvas : public QScrollView, public KImageViewer::Canvas
bool m_bNewImage;
int m_iBlendTimerId;
- QRect m_selection; //unzoomed selection rect
+ TQRect m_selection; //unzoomed selection rect
};
// vim:sw=4:ts=4
diff --git a/kview/kviewcanvas/kimageholder.cpp b/kview/kviewcanvas/kimageholder.cpp
index 9009c7fc..6ca63698 100644
--- a/kview/kviewcanvas/kimageholder.cpp
+++ b/kview/kviewcanvas/kimageholder.cpp
@@ -20,32 +20,32 @@
#include <assert.h>
-#include <qcolor.h>
-#include <qwidget.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qmovie.h>
-#include <qpixmap.h>
+#include <tqcolor.h>
+#include <tqwidget.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqmovie.h>
+#include <tqpixmap.h>
#include <kpixmap.h>
#include <kdebug.h>
#include "kimageholder.h"
-KImageHolder::KImageHolder( QWidget * parent, const char * name )
- : QWidget( parent, name, Qt::WResizeNoErase | Qt::WRepaintNoErase )
+KImageHolder::KImageHolder( TQWidget * parent, const char * name )
+ : TQWidget( parent, name, Qt::WResizeNoErase | Qt::WRepaintNoErase )
, m_selected( false )
, m_bSelecting( false )
, m_scrollTimerId( 0 )
, m_xOffset( 0 )
, m_yOffset( 0 )
- , m_pen( new QPen( QColor( 255, 255, 255 ), 0, DashLine ) )
+ , m_pen( new TQPen( TQColor( 255, 255, 255 ), 0, DashLine ) )
, m_pPixmap( 0 )
, m_pDoubleBuffer( 0 )
, m_pCheckboardPixmap( 0 )
{
- setBackgroundMode( QWidget::NoBackground );
+ setBackgroundMode( TQWidget::NoBackground );
}
KImageHolder::~KImageHolder()
@@ -60,7 +60,7 @@ KImageHolder::~KImageHolder()
m_pCheckboardPixmap = 0;
}
-void KImageHolder::mousePressEvent( QMouseEvent *ev )
+void KImageHolder::mousePressEvent( TQMouseEvent *ev )
{
//kdDebug( 4620 ) << k_funcinfo << " ev->state() = " << ev->state() << endl;
// if the right mouse button is pressed emit the contextPress signal
@@ -80,7 +80,7 @@ void KImageHolder::mousePressEvent( QMouseEvent *ev )
}
}
-void KImageHolder::mouseMoveEvent( QMouseEvent *ev )
+void KImageHolder::mouseMoveEvent( TQMouseEvent *ev )
{
//FIXME: when scrolling the cursorpos shouldn't change
if( this->rect().contains( ev->pos(), false ) )
@@ -91,12 +91,12 @@ void KImageHolder::mouseMoveEvent( QMouseEvent *ev )
// scroll when a modifier and left button or the middle button is pressed
if( ev->state() & AltButton || ev->state() & ControlButton || ev->state() & ShiftButton || ev->state() & MidButton )
{
- QPoint difference = m_scrollpos - ev->globalPos();
+ TQPoint difference = m_scrollpos - ev->globalPos();
emit wannaScroll( difference.x(), difference.y() );
}
else // create a selection
{
- QWidget * parentwidget = ( QWidget* )parent();
+ TQWidget * parentwidget = ( TQWidget* )parent();
if( ! m_bSelecting )
{
m_bSelecting = true;
@@ -161,7 +161,7 @@ void KImageHolder::mouseMoveEvent( QMouseEvent *ev )
m_selection.setBottom( b );
emit selected( m_selection.normalize() );
- QPainter painter( this );
+ TQPainter painter( this );
drawSelect( painter );
}
}
@@ -170,7 +170,7 @@ void KImageHolder::mouseMoveEvent( QMouseEvent *ev )
}
}
-void KImageHolder::mouseReleaseEvent( QMouseEvent * ev )
+void KImageHolder::mouseReleaseEvent( TQMouseEvent * ev )
{
if( m_bSelecting )
{
@@ -188,7 +188,7 @@ void KImageHolder::mouseReleaseEvent( QMouseEvent * ev )
clearSelection();
}
-void KImageHolder::drawSelect( QPainter & painter )
+void KImageHolder::drawSelect( TQPainter & painter )
{
painter.save();
painter.setRasterOp( XorROP );
@@ -199,15 +199,15 @@ void KImageHolder::drawSelect( QPainter & painter )
void KImageHolder::eraseSelect()
{
- QRegion r( m_selection.normalize() );
- QRect inner = m_selection.normalize();
+ TQRegion r( m_selection.normalize() );
+ TQRect inner = m_selection.normalize();
inner.rLeft() += 1;
inner.rTop() += 1;
inner.rRight() -= 1;
inner.rBottom() -= 1;
r -= inner;
- QMemArray<QRect> rects = r.rects();
+ TQMemArray<TQRect> rects = r.rects();
if( m_pDoubleBuffer )
for( unsigned int i = 0; i < rects.size(); ++i )
@@ -224,7 +224,7 @@ void KImageHolder::clearSelection()
eraseSelect();
m_selected = false;
}
- m_selection.setSize( QSize( 0, 0 ) );
+ m_selection.setSize( TQSize( 0, 0 ) );
emit selected( m_selection );
}
@@ -235,7 +235,7 @@ void KImageHolder::setImage( const KPixmap & pix )
setPixmap( pix );
}
-void KImageHolder::setImage( const QImage & image )
+void KImageHolder::setImage( const TQImage & image )
{
clearSelection();
kdDebug( 4620 ) << "converting Image to Pixmap" << endl;
@@ -244,11 +244,11 @@ void KImageHolder::setImage( const QImage & image )
setPixmap( pix );
}
-void KImageHolder::setImage( const QMovie & /*movie*/ )
+void KImageHolder::setImage( const TQMovie & /*movie*/ )
{
clearSelection();
//setMovie( movie );
- kdWarning( 4620 ) << "setImage( QMovie ) not implemented" << endl;
+ kdWarning( 4620 ) << "setImage( TQMovie ) not implemented" << endl;
}
void KImageHolder::clear()
@@ -261,24 +261,24 @@ void KImageHolder::clear()
clearSelection();
}
-QRect KImageHolder::selection() const
+TQRect KImageHolder::selection() const
{
if( m_selected )
return m_selection.normalize();
else
- return QRect();
+ return TQRect();
}
-QSize KImageHolder::sizeHint() const
+TQSize KImageHolder::sizeHint() const
{
if( m_pPixmap )
return m_pPixmap->size();
- return QSize( 0, 0 );
+ return TQSize( 0, 0 );
}
-void KImageHolder::paintEvent( QPaintEvent *ev )
+void KImageHolder::paintEvent( TQPaintEvent *ev )
{
- QPainter painter( this );
+ TQPainter painter( this );
painter.setClipRegion( ev->region().intersect( m_drawRect ) );
if( m_pPixmap )
{
@@ -287,10 +287,10 @@ void KImageHolder::paintEvent( QPaintEvent *ev )
if( ! m_pDoubleBuffer )
{
m_pDoubleBuffer = new KPixmap( m_pPixmap->size() );
- QPainter p( m_pDoubleBuffer );
+ TQPainter p( m_pDoubleBuffer );
p.drawTiledPixmap( m_pDoubleBuffer->rect(), checkboardPixmap() );
p.end();
- bitBlt( m_pDoubleBuffer, QPoint( 0, 0 ), m_pPixmap, m_pPixmap->rect() );
+ bitBlt( m_pDoubleBuffer, TQPoint( 0, 0 ), m_pPixmap, m_pPixmap->rect() );
}
painter.drawPixmap( 0, 0, *m_pDoubleBuffer );
}
@@ -301,7 +301,7 @@ void KImageHolder::paintEvent( QPaintEvent *ev )
drawSelect( painter );
}
-void KImageHolder::timerEvent( QTimerEvent * ev )
+void KImageHolder::timerEvent( TQTimerEvent * ev )
{
if( ev->timerId() != m_scrollTimerId )
return;
diff --git a/kview/kviewcanvas/kimageholder.h b/kview/kviewcanvas/kimageholder.h
index 780ce372..73148cbf 100644
--- a/kview/kviewcanvas/kimageholder.h
+++ b/kview/kviewcanvas/kimageholder.h
@@ -20,13 +20,13 @@
#ifndef _KIMAGEHOLDER_H
#define _KIMAGEHOLDER_H
-#include <qwidget.h>
-class QRect;
-class QPainter;
-class QPen;
-class QPixmap;
+#include <tqwidget.h>
+class TQRect;
+class TQPainter;
+class TQPen;
+class TQPixmap;
class KPixmap;
-class QPoint;
+class TQPoint;
/**
* @short Image widget
@@ -36,15 +36,15 @@ class KImageHolder : public QWidget
{
Q_OBJECT
public:
- KImageHolder( QWidget *parent = 0, const char * name = 0 );
+ KImageHolder( TQWidget *parent = 0, const char * name = 0 );
virtual ~KImageHolder();
void clearSelection();
void setImage( const KPixmap & );
- void setImage( const QImage & );
- void setImage( const QMovie & );
+ void setImage( const TQImage & );
+ void setImage( const TQMovie & );
/**
* clears the ImageHolder
@@ -54,37 +54,37 @@ class KImageHolder : public QWidget
/**
* the selected rect
*/
- QRect selection() const;
+ TQRect selection() const;
- QSize sizeHint() const;
+ TQSize sizeHint() const;
- void setDrawRect( const QRect & rect ) { m_drawRect = rect; }
- const QRect & drawRect() const { return m_drawRect; }
+ void setDrawRect( const TQRect & rect ) { m_drawRect = rect; }
+ const TQRect & drawRect() const { return m_drawRect; }
signals:
- void contextPress( const QPoint& );
- void selected( const QRect & );
+ void contextPress( const TQPoint& );
+ void selected( const TQRect & );
void wannaScroll( int dx, int dy );
- void cursorPos( const QPoint & );
+ void cursorPos( const TQPoint & );
protected:
- void mousePressEvent( QMouseEvent * );
- void mouseMoveEvent( QMouseEvent * );
- void mouseReleaseEvent( QMouseEvent * );
- void paintEvent( QPaintEvent * );
- virtual void timerEvent( QTimerEvent * );
+ void mousePressEvent( TQMouseEvent * );
+ void mouseMoveEvent( TQMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
+ void paintEvent( TQPaintEvent * );
+ virtual void timerEvent( TQTimerEvent * );
private:
- void drawSelect( QPainter & );
+ void drawSelect( TQPainter & );
void eraseSelect();
void setPixmap( const KPixmap & );
private:
- QRect m_selection;
- QRect m_drawRect;
- QPoint m_scrollpos;
- QPoint m_selectionStartPoint;
+ TQRect m_selection;
+ TQRect m_drawRect;
+ TQPoint m_scrollpos;
+ TQPoint m_selectionStartPoint;
const KPixmap & checkboardPixmap();
@@ -93,7 +93,7 @@ class KImageHolder : public QWidget
int m_scrollTimerId;
int m_xOffset, m_yOffset;
- QPen *m_pen;
+ TQPen *m_pen;
KPixmap * m_pPixmap;
KPixmap * m_pDoubleBuffer;
diff --git a/kview/kviewcanvas/test/test.cpp b/kview/kviewcanvas/test/test.cpp
index 8422f944..e913ab59 100644
--- a/kview/kviewcanvas/test/test.cpp
+++ b/kview/kviewcanvas/test/test.cpp
@@ -11,13 +11,13 @@
#include <kmessagebox.h>
#include <kparts/componentfactory.h>
-#include <qimage.h>
+#include <tqimage.h>
KImageViewerTest::KImageViewerTest()
: KParts::MainWindow( 0L, "KImageViewerTest" )
{
- QWidget * widget = KParts::ComponentFactory::createInstanceFromQuery<QWidget>(
- "KImageViewer/Canvas", QString::null, this );
+ TQWidget * widget = KParts::ComponentFactory::createInstanceFromQuery<TQWidget>(
+ "KImageViewer/Canvas", TQString::null, this );
if( widget )
{
m_part = dynamic_cast<KImageViewer::Canvas *>( widget );
@@ -36,7 +36,7 @@ KImageViewerTest::~KImageViewerTest()
void KImageViewerTest::load(const KURL& url)
{
- QImage image( url.fileName() );
+ TQImage image( url.fileName() );
if( m_part )
m_part->setImage( image );
else
diff --git a/kview/kviewviewer/config/kviewviewerpluginsconfig.cpp b/kview/kviewviewer/config/kviewviewerpluginsconfig.cpp
index 04b9e982..ea876950 100644
--- a/kview/kviewviewer/config/kviewviewerpluginsconfig.cpp
+++ b/kview/kviewviewer/config/kviewviewerpluginsconfig.cpp
@@ -25,16 +25,16 @@
#include <ksimpleconfig.h>
#include <kplugininfo.h>
-#include <qstring.h>
+#include <tqstring.h>
-typedef KGenericFactory<KViewViewerPluginsConfig, QWidget> KViewViewerPluginsConfigFactory;
+typedef KGenericFactory<KViewViewerPluginsConfig, TQWidget> KViewViewerPluginsConfigFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kviewviewerpluginsconfig, KViewViewerPluginsConfigFactory( "kcm_kviewviewerpluginsconfig" ) )
-KViewViewerPluginsConfig::KViewViewerPluginsConfig( QWidget * parent, const char *, const QStringList & args )
+KViewViewerPluginsConfig::KViewViewerPluginsConfig( TQWidget * parent, const char *, const TQStringList & args )
: KSettings::PluginPage( KViewViewerPluginsConfigFactory::instance(), parent, args )
{
m_config = new KSimpleConfig( "kviewviewerrc" );
- pluginSelector()->addPlugins( QString::fromAscii( "kviewviewer" ), i18n( "Viewer" ), QString::null, m_config );
+ pluginSelector()->addPlugins( TQString::fromAscii( "kviewviewer" ), i18n( "Viewer" ), TQString::null, m_config );
pluginSelector()->setShowEmptyConfigPage( false );
}
diff --git a/kview/kviewviewer/config/kviewviewerpluginsconfig.h b/kview/kviewviewer/config/kviewviewerpluginsconfig.h
index 4f2b30ab..1dbe39c3 100644
--- a/kview/kviewviewer/config/kviewviewerpluginsconfig.h
+++ b/kview/kviewviewer/config/kviewviewerpluginsconfig.h
@@ -27,7 +27,7 @@ class KViewViewerPluginsConfig : public KSettings::PluginPage
{
Q_OBJECT
public:
- KViewViewerPluginsConfig( QWidget * parent, const char * name = 0, const QStringList & args = QStringList() );
+ KViewViewerPluginsConfig( TQWidget * parent, const char * name = 0, const TQStringList & args = TQStringList() );
~KViewViewerPluginsConfig();
private:
KConfig * m_config;
diff --git a/kview/kviewviewer/imagesettings.cpp b/kview/kviewviewer/imagesettings.cpp
index 4f483db7..0ee58b78 100644
--- a/kview/kviewviewer/imagesettings.cpp
+++ b/kview/kviewviewer/imagesettings.cpp
@@ -18,23 +18,23 @@
#include "imagesettings.h"
-#include <qcheckbox.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kdialog.h>
-ImageSettings::ImageSettings( QWidget * parent, const char * name )
+ImageSettings::ImageSettings( TQWidget * parent, const char * name )
: KPrintDialogPage( parent, name )
, m_pFitImage( 0 )
{
setTitle( i18n( "Image Settings" ) );
- QBoxLayout * layout = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
- m_pFitImage = new QCheckBox( i18n( "Fit image to page size" ), this );
+ TQBoxLayout * layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ m_pFitImage = new TQCheckBox( i18n( "Fit image to page size" ), this );
m_pFitImage->setChecked( true );
layout->addWidget( m_pFitImage );
- m_pCenter = new QCheckBox( i18n( "Center image on page" ), this );
+ m_pCenter = new TQCheckBox( i18n( "Center image on page" ), this );
m_pCenter->setChecked( true );
layout->addWidget( m_pCenter );
layout->insertStretch( -1, 0 );
@@ -44,13 +44,13 @@ ImageSettings::~ImageSettings()
{
}
-void ImageSettings::setOptions( const QMap<QString, QString> & opts )
+void ImageSettings::setOptions( const TQMap<TQString, TQString> & opts )
{
m_pFitImage->setChecked( opts[ "app-kviewviewer-fitimage" ] == "1" );
m_pCenter->setChecked( opts[ "app-kviewviewer-center" ] == "1" );
}
-void ImageSettings::getOptions( QMap<QString, QString> & opts, bool include_def )
+void ImageSettings::getOptions( TQMap<TQString, TQString> & opts, bool include_def )
{
if( m_pFitImage->isChecked() )
opts[ "app-kviewviewer-fitimage" ] = "1";
@@ -63,7 +63,7 @@ void ImageSettings::getOptions( QMap<QString, QString> & opts, bool include_def
opts[ "app-kviewviewer-center" ] = "0";
}
-bool ImageSettings::isValid( QString & /*msg*/ )
+bool ImageSettings::isValid( TQString & /*msg*/ )
{
return true;
}
diff --git a/kview/kviewviewer/imagesettings.h b/kview/kviewviewer/imagesettings.h
index 5d7bf88e..f627cbac 100644
--- a/kview/kviewviewer/imagesettings.h
+++ b/kview/kviewviewer/imagesettings.h
@@ -21,22 +21,22 @@
#include <kdeprint/kprintdialogpage.h>
-class QCheckBox;
+class TQCheckBox;
class ImageSettings : public KPrintDialogPage
{
Q_OBJECT
public:
- ImageSettings( QWidget * parent = 0, const char * name = 0 );
+ ImageSettings( TQWidget * parent = 0, const char * name = 0 );
~ImageSettings();
- void setOptions( const QMap<QString, QString> & opts );
- void getOptions( QMap<QString, QString> & opts, bool include_def = false );
- bool isValid( QString & msg );
+ void setOptions( const TQMap<TQString, TQString> & opts );
+ void getOptions( TQMap<TQString, TQString> & opts, bool include_def = false );
+ bool isValid( TQString & msg );
private:
- QCheckBox * m_pFitImage;
- QCheckBox * m_pCenter;
+ TQCheckBox * m_pFitImage;
+ TQCheckBox * m_pCenter;
};
// vim:sw=4:ts=4
diff --git a/kview/kviewviewer/kviewkonqextension.cpp b/kview/kviewviewer/kviewkonqextension.cpp
index 40876b7c..b3f16a93 100644
--- a/kview/kviewviewer/kviewkonqextension.cpp
+++ b/kview/kviewviewer/kviewkonqextension.cpp
@@ -23,9 +23,9 @@
#include "kimageviewer/canvas.h"
#include "imagesettings.h"
-#include <qpainter.h>
-#include <qimage.h>
-#include <qpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqpaintdevicemetrics.h>
#include <kprinter.h>
#include <kdebug.h>
@@ -64,23 +64,23 @@ void KViewKonqExtension::print()
return;
}
- KPrinter printer;//( true, QPrinter::ScreenResolution );
+ KPrinter printer;//( true, TQPrinter::ScreenResolution );
printer.addDialogPage( new ImageSettings );
printer.setDocName( "KView: " + m_pViewer->url().fileName( false ) );
if ( !printer.setup( ((KViewViewer *)parent())->widget(), i18n("Print %1").arg(m_pViewer->url().fileName( false )) ) )
return;
- QPainter painter;
+ TQPainter painter;
painter.begin( &printer );
- QPaintDeviceMetrics metrics( painter.device() );
+ TQPaintDeviceMetrics metrics( painter.device() );
kdDebug( 4610 ) << "metrics: " << metrics.width() << "x" << metrics.height() << endl;
- QPoint pos( 0, 0 );
+ TQPoint pos( 0, 0 );
- QImage imagetoprint;
+ TQImage imagetoprint;
if( printer.option( "app-kviewviewer-fitimage" ) == "1" )
- imagetoprint = m_pCanvas->image()->smoothScale( metrics.width(), metrics.height(), QImage::ScaleMin );
+ imagetoprint = m_pCanvas->image()->smoothScale( metrics.width(), metrics.height(), TQImage::ScaleMin );
else
imagetoprint = *m_pCanvas->image();
diff --git a/kview/kviewviewer/kviewviewer.cpp b/kview/kviewviewer/kviewviewer.cpp
index bab325ec..06dd1716 100644
--- a/kview/kviewviewer/kviewviewer.cpp
+++ b/kview/kviewviewer/kviewviewer.cpp
@@ -28,11 +28,11 @@
#include <unistd.h>
#include <assert.h>
-#include <qbuffer.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qregexp.h>
+#include <tqbuffer.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
#include <kpushbutton.h>
#include <kpassivepopup.h>
@@ -55,8 +55,8 @@
typedef KParts::GenericFactory<KViewViewer> KViewViewerFactory;
K_EXPORT_COMPONENT_FACTORY( libkviewviewer, KViewViewerFactory )
-KViewViewer::KViewViewer( QWidget *parentWidget, const char * /*widgetName*/,
- QObject *parent, const char *name, const QStringList & )
+KViewViewer::KViewViewer( TQWidget *parentWidget, const char * /*widgetName*/,
+ TQObject *parent, const char *name, const TQStringList & )
: KImageViewer::Viewer( parent, name )
, m_pParentWidget( parentWidget )
, m_pJob( 0 )
@@ -68,8 +68,8 @@ KViewViewer::KViewViewer( QWidget *parentWidget, const char * /*widgetName*/,
{
KImageIO::registerFormats();
- QWidget * widget = KParts::ComponentFactory::createInstanceFromQuery<QWidget>(
- "KImageViewer/Canvas", QString::null, m_pParentWidget );
+ TQWidget * widget = KParts::ComponentFactory::createInstanceFromQuery<TQWidget>(
+ "KImageViewer/Canvas", TQString::null, m_pParentWidget );
m_pCanvas = static_cast<KImageViewer::Canvas *>( widget->qt_cast( "KImageViewer::Canvas" ) );
kdDebug( 4610 ) << "KImageViewer::Canvas at " << m_pCanvas << endl;
if( ! ( widget && m_pCanvas ) )
@@ -88,7 +88,7 @@ KViewViewer::KViewViewer( QWidget *parentWidget, const char * /*widgetName*/,
setInstance( KViewViewerFactory::instance() );
// m_url isn't set from ReadOnlyPart so we set it here to the CWD
- m_url = QDir::currentDirPath() + "/";
+ m_url = TQDir::currentDirPath() + "/";
m_sCaption = i18n( "Title caption when no image loaded", "no image loaded" );
setWidget( widget );
@@ -104,21 +104,21 @@ KViewViewer::KViewViewer( QWidget *parentWidget, const char * /*widgetName*/,
else
setXMLFile( "kviewviewer_ro.rc" );
- connect( widget, SIGNAL( contextPress( const QPoint & ) ),
- this, SLOT( slotPopupMenu( const QPoint & ) ) );
- connect( widget, SIGNAL( zoomChanged( double ) ),
- this, SLOT( zoomChanged( double ) ) );
- connect( widget, SIGNAL( showingImageDone() ),
- this, SLOT( switchBlendEffect() ) );
- connect( widget, SIGNAL( hasImage( bool ) ),
- this, SLOT( hasImage( bool ) ) );
- connect( widget, SIGNAL( imageChanged() ),
- this, SLOT( setModified() ) );
+ connect( widget, TQT_SIGNAL( contextPress( const TQPoint & ) ),
+ this, TQT_SLOT( slotPopupMenu( const TQPoint & ) ) );
+ connect( widget, TQT_SIGNAL( zoomChanged( double ) ),
+ this, TQT_SLOT( zoomChanged( double ) ) );
+ connect( widget, TQT_SIGNAL( showingImageDone() ),
+ this, TQT_SLOT( switchBlendEffect() ) );
+ connect( widget, TQT_SIGNAL( hasImage( bool ) ),
+ this, TQT_SLOT( hasImage( bool ) ) );
+ connect( widget, TQT_SIGNAL( imageChanged() ),
+ this, TQT_SLOT( setModified() ) );
- connect( m_pFileWatch, SIGNAL( dirty( const QString & ) ),
- this, SLOT( slotFileDirty( const QString & ) ) );
+ connect( m_pFileWatch, TQT_SIGNAL( dirty( const TQString & ) ),
+ this, TQT_SLOT( slotFileDirty( const TQString & ) ) );
- KSettings::Dispatcher::self()->registerInstance( instance(), this, SLOT( readSettings() ) );
+ KSettings::Dispatcher::self()->registerInstance( instance(), this, TQT_SLOT( readSettings() ) );
// by default disable progress info (so it won't open the dialog in Konqueror)
setProgressInfoEnabled( false );
@@ -148,10 +148,10 @@ KViewViewer::~KViewViewer()
int res = m_url.isEmpty() ?
KMessageBox::warningYesNo( widget(),
i18n( "This is a new document.\nDo you want to save it ?" ),
- QString::null, KStdGuiItem::saveAs(), KStdGuiItem::discard() ):
+ TQString::null, KStdGuiItem::saveAs(), KStdGuiItem::discard() ):
KMessageBox::warningYesNo( widget(),
i18n( "The document has been modified.\nDo you want to save it ?" ),
- QString::null, KStdGuiItem::saveAs(), KStdGuiItem::dontSave() );
+ TQString::null, KStdGuiItem::saveAs(), KStdGuiItem::dontSave() );
if( res == KMessageBox::Yes )
{
@@ -195,15 +195,15 @@ bool KViewViewer::saveAs( const KURL & kurl )
return KParts::ReadWritePart::saveAs( kurl ); // sets m_bClosing = false
// if the image wasn't modified and should be saved in the same format we just copy the file - no need
- // to lose some quality or information by calling QImage::save()
+ // to lose some quality or information by calling TQImage::save()
if( ! ( isModified() && isReadWrite() ) && m_mimeType == m_newMimeType )
{
kdDebug( 4610 ) << "copy image from " << m_file << " to " << kurl.prettyURL() << endl;
KIO::Job * job = KIO::copy( KURL( m_file ), kurl, isProgressInfoEnabled() );
emit started( job );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotResultSaveAs( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotResultSaveAs( KIO::Job * ) ) );
return true;
}
kdDebug( 4610 ) << "call KParts::ReadWritePart::saveAs( " << kurl.prettyURL() << " )" << endl;
@@ -257,19 +257,19 @@ bool KViewViewer::openURL( const KURL & url )
emit setWindowCaption( m_sCaption );
m_bTemp = true;
// Use same extension as remote file. This is important for mimetype-determination (e.g. koffice)
- QString extension;
- QString fileName = url.fileName();
+ TQString extension;
+ TQString fileName = url.fileName();
int extensionPos = fileName.findRev( '.' );
if ( extensionPos != -1 )
extension = fileName.mid( extensionPos ); // keep the '.'
delete m_pTempFile;
- m_pTempFile = new KTempFile( QString::null, extension );
+ m_pTempFile = new KTempFile( TQString::null, extension );
m_file = m_pTempFile->name();
m_pJob = KIO::get( m_url, m_pExtension->urlArgs().reload, isProgressInfoEnabled() );
emit started( m_pJob );
- connect( m_pJob, SIGNAL( result( KIO::Job * ) ), SLOT( slotJobFinished ( KIO::Job * ) ) );
- connect( m_pJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ), SLOT( slotData( KIO::Job *, const QByteArray & ) ) );
+ connect( m_pJob, TQT_SIGNAL( result( KIO::Job * ) ), TQT_SLOT( slotJobFinished ( KIO::Job * ) ) );
+ connect( m_pJob, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), TQT_SLOT( slotData( KIO::Job *, const TQByteArray & ) ) );
return true;
}
}
@@ -278,7 +278,7 @@ bool KViewViewer::closeURL()
{
kdDebug( 4610 ) << k_funcinfo << endl;
abortLoad();
- QString file = m_file;
+ TQString file = m_file;
bool ret = KParts::ReadWritePart::closeURL();
if( ret )
if( ! file.isEmpty() )
@@ -289,12 +289,12 @@ bool KViewViewer::closeURL()
return ret;
}
-void KViewViewer::newImage( const QImage & newimg )
+void KViewViewer::newImage( const TQImage & newimg )
{
if( closeURL() )
{
m_url = "";
- m_file = QString::null;
+ m_file = TQString::null;
m_sCaption = i18n( "Title caption when new image selected", "new image" );
m_pCanvas->setImage( newimg );
if( isReadWrite() )
@@ -311,12 +311,12 @@ void KViewViewer::reload()
return;
//load from file
- QImage image( m_file );
+ TQImage image( m_file );
m_pCanvas->setImage( image );
setModified( false );
}
-bool KViewViewer::eventFilter( QObject * o, QEvent * e )
+bool KViewViewer::eventFilter( TQObject * o, TQEvent * e )
{
KImageViewer::Canvas * canvas = static_cast<KImageViewer::Canvas*>( o->qt_cast( "KImageViewer::Canvas" ) );
if( canvas )
@@ -324,24 +324,24 @@ bool KViewViewer::eventFilter( QObject * o, QEvent * e )
// intercept drops onto the Canvas
switch( e->type() )
{
- case QEvent::DragEnter:
+ case TQEvent::DragEnter:
{
- QDragEnterEvent * ev = static_cast<QDragEnterEvent*>( e );
+ TQDragEnterEvent * ev = static_cast<TQDragEnterEvent*>( e );
kdDebug( 4610 ) << "DragEnter Event in the Canvas: " << endl;
for( int i = 0; ev->format( i ); ++i )
kdDebug( 4610 ) << " - " << ev->format( i ) << endl;
- ev->accept( KURLDrag::canDecode( ev ) || QImageDrag::canDecode( ev ) );
+ ev->accept( KURLDrag::canDecode( ev ) || TQImageDrag::canDecode( ev ) );
return true;
}
- case QEvent::Drop:
+ case TQEvent::Drop:
{
- QDropEvent * ev = static_cast<QDropEvent*>( e );
+ TQDropEvent * ev = static_cast<TQDropEvent*>( e );
kdDebug( 4610 ) << "Drop Event in the Canvas" << endl;
- QStringList l;
- QImage image;
+ TQStringList l;
+ TQImage image;
if( KURLDrag::decodeToUnicodeUris( ev, l ) )
openURL( KURL( l.first() ) );
- else if( QImageDrag::decode( ev, image ) )
+ else if( TQImageDrag::decode( ev, image ) )
newImage( image );
return true;
}
@@ -363,7 +363,7 @@ void KViewViewer::abortLoad()
bool KViewViewer::openFile()
{
- //m_pCanvas->setMaximumImageSize( QSize( widget()->width(), widget()->height() ) );
+ //m_pCanvas->setMaximumImageSize( TQSize( widget()->width(), widget()->height() ) );
if( m_pBuffer )
{
kdDebug( 4610 ) << k_funcinfo << " load from buffer\n";
@@ -387,12 +387,12 @@ bool KViewViewer::openFile()
}
}
- QImage image( m_pBuffer->buffer() );
+ TQImage image( m_pBuffer->buffer() );
delete m_pBuffer;
m_pBuffer = 0;
if( ! image.isNull() )
{
- QSize size = image.size();
+ TQSize size = image.size();
m_pCanvas->setImage( image, size );
}
else
@@ -404,12 +404,12 @@ bool KViewViewer::openFile()
else
{ //load from local file
kdDebug( 4610 ) << k_funcinfo << " load from file: " << m_file << endl;
- if( ! QFile::exists( m_file ) )
+ if( ! TQFile::exists( m_file ) )
{
emit setStatusBarText( i18n( "No such file: %1" ).arg( m_file ) );
return false;
}
- if( QImage::imageFormat( m_file ) == 0 )
+ if( TQImage::imageFormat( m_file ) == 0 )
{
emit setStatusBarText( i18n( "Unknown image format: %1" ).arg( m_file ) );
return false;
@@ -422,8 +422,8 @@ bool KViewViewer::openFile()
}
//load from file
- QImage image( m_file );
- QSize size = image.size();
+ TQImage image( m_file );
+ TQSize size = image.size();
m_pCanvas->setImage( image, size );
}
m_pFileWatch->addFile( m_file );
@@ -443,16 +443,16 @@ bool KViewViewer::saveFile()
// 2. The image should be saved in a different format or was modified, so
// that copying isn't possible anymore.
- const QImage * image = m_pCanvas->image();
+ const TQImage * image = m_pCanvas->image();
if( ! image )
return false;
if( ! m_newMimeType.isNull() )
{
m_mimeType = m_newMimeType;
- m_newMimeType = QString::null;
+ m_newMimeType = TQString::null;
}
- QString type = KImageIO::typeForMime( m_mimeType );
+ TQString type = KImageIO::typeForMime( m_mimeType );
kdDebug( 4610 ) << "save m_pCanvas->image() to " << m_file << " as " << type << endl;
int quality = 100; // TODO: ask user for quality. Keep it at 100 so that our
// users don't lose quality when working with KView.
@@ -466,33 +466,33 @@ bool KViewViewer::saveFile()
void KViewViewer::setupActions()
{
m_paZoomIn = new KAction( i18n( "Zoom In" ), "viewmag+", KStdAccel::shortcut( KStdAccel::ZoomIn ), this,
- SLOT( slotZoomIn() ), actionCollection(), "zoomin" );
+ TQT_SLOT( slotZoomIn() ), actionCollection(), "zoomin" );
m_paZoomOut = new KAction( i18n( "Zoom Out" ), "viewmag-", KStdAccel::shortcut( KStdAccel::ZoomOut ), this,
- SLOT( slotZoomOut() ), actionCollection(), "zoomout" );
+ TQT_SLOT( slotZoomOut() ), actionCollection(), "zoomout" );
m_paZoom = new KSelectAction( i18n( "Zoom" ), "viewmag", 0, actionCollection(), "view_zoom" );
- connect( m_paZoom, SIGNAL( activated( const QString & ) ), this, SLOT( setZoom( const QString & ) ) );
+ connect( m_paZoom, TQT_SIGNAL( activated( const TQString & ) ), this, TQT_SLOT( setZoom( const TQString & ) ) );
m_paZoom->setEditable( true );
m_paZoom->clear();
- m_paZoom->setItems( QStringList::split( '|', "20%|25%|33%|50%|75%|100%|125%|150%|200%|250%|300%|350%|400%|450%|500%" ) );
+ m_paZoom->setItems( TQStringList::split( '|', "20%|25%|33%|50%|75%|100%|125%|150%|200%|250%|300%|350%|400%|450%|500%" ) );
m_paZoom->setCurrentItem( 5 );
m_paFlipMenu = new KActionMenu( i18n( "&Flip" ), actionCollection(), "flip" );
- m_paFlipV = new KAction( i18n( "&Vertical" ), Key_V, this, SLOT( slotFlipV() ), actionCollection(), "flip_vertical" );
- m_paFlipH = new KAction( i18n( "&Horizontal" ), Key_H, this, SLOT( slotFlipH() ), actionCollection(), "flip_horizontal" );
+ m_paFlipV = new KAction( i18n( "&Vertical" ), Key_V, this, TQT_SLOT( slotFlipV() ), actionCollection(), "flip_vertical" );
+ m_paFlipH = new KAction( i18n( "&Horizontal" ), Key_H, this, TQT_SLOT( slotFlipH() ), actionCollection(), "flip_horizontal" );
m_paFlipMenu->insert( m_paFlipV );
m_paFlipMenu->insert( m_paFlipH );
m_paRotateCCW = new KAction( i18n( "Ro&tate Counter-Clockwise" ), "rotate_ccw", 0, this,
- SLOT( slotRotateCCW() ), actionCollection(), "rotateCCW" );
+ TQT_SLOT( slotRotateCCW() ), actionCollection(), "rotateCCW" );
m_paRotateCW = new KAction( i18n( "Rotate Clockwise" ), "rotate_cw", 0, this,
- SLOT( slotRotateCW() ), actionCollection(), "rotateCW" );
- m_paSave = KStdAction::save( this, SLOT( slotSave() ), actionCollection() );
+ TQT_SLOT( slotRotateCW() ), actionCollection(), "rotateCW" );
+ m_paSave = KStdAction::save( this, TQT_SLOT( slotSave() ), actionCollection() );
m_paSave->setEnabled( false );
- m_paSaveAs = KStdAction::saveAs( this, SLOT( slotSaveAs() ), actionCollection() );
+ m_paSaveAs = KStdAction::saveAs( this, TQT_SLOT( slotSaveAs() ), actionCollection() );
m_paFitToWin = new KAction( i18n( "Fit Image to Window" ), 0, 0, this,
- SLOT( slotFitToWin() ), actionCollection(), "fittowin" );
+ TQT_SLOT( slotFitToWin() ), actionCollection(), "fittowin" );
m_paZoomIn->setEnabled( false );
m_paZoomOut->setEnabled( false );
m_paZoom->setEnabled( false );
@@ -503,18 +503,18 @@ void KViewViewer::setupActions()
m_paFlipMenu->setEnabled( false );
m_paFlipV->setEnabled( false );
m_paFlipH->setEnabled( false );
- connect( widget(), SIGNAL( hasImage( bool ) ), m_paZoomIn, SLOT( setEnabled( bool ) ) );
- connect( widget(), SIGNAL( hasImage( bool ) ), m_paZoomOut, SLOT( setEnabled( bool ) ) );
- connect( widget(), SIGNAL( hasImage( bool ) ), m_paZoom, SLOT( setEnabled( bool ) ) );
- connect( widget(), SIGNAL( hasImage( bool ) ), m_paRotateCCW, SLOT( setEnabled( bool ) ) );
- connect( widget(), SIGNAL( hasImage( bool ) ), m_paRotateCW, SLOT( setEnabled( bool ) ) );
- connect( widget(), SIGNAL( hasImage( bool ) ), m_paSaveAs, SLOT( setEnabled( bool ) ) );
- connect( widget(), SIGNAL( hasImage( bool ) ), m_paFitToWin, SLOT( setEnabled( bool ) ) );
- connect( widget(), SIGNAL( hasImage( bool ) ), m_paFlipMenu, SLOT( setEnabled( bool ) ) );
- connect( widget(), SIGNAL( hasImage( bool ) ), m_paFlipV, SLOT( setEnabled( bool ) ) );
- connect( widget(), SIGNAL( hasImage( bool ) ), m_paFlipH, SLOT( setEnabled( bool ) ) );
-
- m_paShowScrollbars = new KToggleAction( i18n( "Show Scrollbars" ), 0, this, SLOT( slotToggleScrollbars() ),
+ connect( widget(), TQT_SIGNAL( hasImage( bool ) ), m_paZoomIn, TQT_SLOT( setEnabled( bool ) ) );
+ connect( widget(), TQT_SIGNAL( hasImage( bool ) ), m_paZoomOut, TQT_SLOT( setEnabled( bool ) ) );
+ connect( widget(), TQT_SIGNAL( hasImage( bool ) ), m_paZoom, TQT_SLOT( setEnabled( bool ) ) );
+ connect( widget(), TQT_SIGNAL( hasImage( bool ) ), m_paRotateCCW, TQT_SLOT( setEnabled( bool ) ) );
+ connect( widget(), TQT_SIGNAL( hasImage( bool ) ), m_paRotateCW, TQT_SLOT( setEnabled( bool ) ) );
+ connect( widget(), TQT_SIGNAL( hasImage( bool ) ), m_paSaveAs, TQT_SLOT( setEnabled( bool ) ) );
+ connect( widget(), TQT_SIGNAL( hasImage( bool ) ), m_paFitToWin, TQT_SLOT( setEnabled( bool ) ) );
+ connect( widget(), TQT_SIGNAL( hasImage( bool ) ), m_paFlipMenu, TQT_SLOT( setEnabled( bool ) ) );
+ connect( widget(), TQT_SIGNAL( hasImage( bool ) ), m_paFlipV, TQT_SLOT( setEnabled( bool ) ) );
+ connect( widget(), TQT_SIGNAL( hasImage( bool ) ), m_paFlipH, TQT_SLOT( setEnabled( bool ) ) );
+
+ m_paShowScrollbars = new KToggleAction( i18n( "Show Scrollbars" ), 0, this, TQT_SLOT( slotToggleScrollbars() ),
actionCollection(), "show_scrollbars" );
m_paShowScrollbars->setCheckedState(i18n("Hide Scrollbars"));
}
@@ -541,16 +541,16 @@ void KViewViewer::readSettings()
m_pCanvas->setBgColor( cfgGroup.readColorEntry( "Background Color", &m_pCanvas->bgColor() ) );
- m_pCanvas->setMinimumImageSize( QSize( cfgGroup.readNumEntry( "Minimum Width", m_pCanvas->minimumImageSize().width() ),
+ m_pCanvas->setMinimumImageSize( TQSize( cfgGroup.readNumEntry( "Minimum Width", m_pCanvas->minimumImageSize().width() ),
cfgGroup.readNumEntry( "Minimum Height", m_pCanvas->minimumImageSize().height() ) ) );
- m_pCanvas->setMaximumImageSize( QSize( cfgGroup.readNumEntry( "Maximum Width", m_pCanvas->maximumImageSize().width() ),
+ m_pCanvas->setMaximumImageSize( TQSize( cfgGroup.readNumEntry( "Maximum Width", m_pCanvas->maximumImageSize().width() ),
cfgGroup.readNumEntry( "Maximum Height", m_pCanvas->maximumImageSize().height() ) ) );
KConfigGroup blendConfig( instance()->config(), "Blend Effects" );
m_vEffects.clear();
for( unsigned int i = 1; i <= m_pCanvas->numOfBlendEffects(); ++i )
{
- if( blendConfig.readBoolEntry( QString::number( i ), false ) )
+ if( blendConfig.readBoolEntry( TQString::number( i ), false ) )
m_vEffects.push_back( i );
}
// and now tell the canvas what blend effect to use
@@ -567,7 +567,7 @@ void KViewViewer::writeSettings()
void KViewViewer::zoomChanged( double zoom )
{
kdDebug( 4610 ) << k_funcinfo << endl;
- emit setWindowCaption( m_sCaption + QString( " (%1%)" ).arg( zoom * 100, 0, 'f', 0 ) );
+ emit setWindowCaption( m_sCaption + TQString( " (%1%)" ).arg( zoom * 100, 0, 'f', 0 ) );
updateZoomMenu( zoom );
}
@@ -584,11 +584,11 @@ void KViewViewer::slotJobFinished( KIO::Job * job )
}
}
-void KViewViewer::slotData( KIO::Job *, const QByteArray & data )
+void KViewViewer::slotData( KIO::Job *, const TQByteArray & data )
{
if( ! m_pBuffer )
{
- m_pBuffer = new QBuffer();
+ m_pBuffer = new TQBuffer();
m_pBuffer->open( IO_ReadWrite );
}
m_pBuffer->writeBlock( data.data(), data.size() );
@@ -597,7 +597,7 @@ void KViewViewer::slotData( KIO::Job *, const QByteArray & data )
//No. :) It takes forever like this.
//OK. So I really have to look at khtml...
//later...
- //m_pCanvas->setImage( QImage( m_pBuffer->buffer() ) );
+ //m_pCanvas->setImage( TQImage( m_pBuffer->buffer() ) );
}
void KViewViewer::slotSave()
@@ -610,7 +610,7 @@ void KViewViewer::slotSave()
void KViewViewer::slotSaveAs()
{
kdDebug( 4610 ) << k_funcinfo << endl;
- KFileDialog dlg( QString::null, QString::null, widget(), "filedialog", true );
+ KFileDialog dlg( TQString::null, TQString::null, widget(), "filedialog", true );
dlg.setMimeFilter( KImageIO::mimeTypes( KImageIO::Writing ) );
dlg.setSelection( m_url.fileName() );
dlg.setCaption( i18n( "Save As" ) );
@@ -640,11 +640,11 @@ void KViewViewer::slotZoomOut()
m_pCanvas->setZoom( zoom );
}
-void KViewViewer::setZoom( const QString & newZoom )
+void KViewViewer::setZoom( const TQString & newZoom )
{
kdDebug( 4610 ) << k_funcinfo << newZoom << endl;
double zoom;
- QString z = newZoom;
+ TQString z = newZoom;
z.remove( z.find( '%' ), 1 );
if( newZoom == "33%" )
zoom = 1.0 / 3.0;
@@ -656,37 +656,37 @@ void KViewViewer::setZoom( const QString & newZoom )
void KViewViewer::updateZoomMenu( double zoom )
{
- QStringList lst;
+ TQStringList lst;
if( zoom > 0.0 )
{
//lst << i18n( "Maxpect" );
- QValueList<int> list;
- QString z;
+ TQValueList<int> list;
+ TQString z;
int val;
bool ok;
- QStringList itemsList = m_paZoom->items();
- for( QStringList::Iterator it = itemsList.begin(); it != itemsList.end(); ++it )
+ TQStringList itemsList = m_paZoom->items();
+ for( TQStringList::Iterator it = itemsList.begin(); it != itemsList.end(); ++it )
{
- z = ( *it ).replace( QRegExp( "%" ), "" );
+ z = ( *it ).replace( TQRegExp( "%" ), "" );
z = z.simplifyWhiteSpace();
val = z.toInt( &ok );
if( ok && val > 0 && list.contains( val ) == 0 )
list << val;
}
- val = QString::number( zoom * 100, 'f', 0 ).toInt(); // round/lround from math.h doesn't work - dunno
+ val = TQString::number( zoom * 100, 'f', 0 ).toInt(); // round/lround from math.h doesn't work - dunno
if( list.contains( val ) == 0 )
list.append( val );
qHeapSort( list );
- for( QValueList<int>::Iterator it = list.begin(); it != list.end(); ++it )
- lst << QString::number( *it ) + '%';
+ for( TQValueList<int>::Iterator it = list.begin(); it != list.end(); ++it )
+ lst << TQString::number( *it ) + '%';
m_paZoom->setItems( lst );
}
// first look if it's a new value (not in the list yet)
- QString z = QString( "%1%" ).arg( zoom * 100, 0, 'f', 0 );
- QStringList items = m_paZoom->items();
+ TQString z = TQString( "%1%" ).arg( zoom * 100, 0, 'f', 0 );
+ TQStringList items = m_paZoom->items();
int idx = items.findIndex( z );
if( -1 == idx )
{
@@ -743,18 +743,18 @@ void KViewViewer::slotDel()
class PopupGUIClient : public KXMLGUIClient
{
public:
- PopupGUIClient( KInstance *inst, const QString &doc )
+ PopupGUIClient( KInstance *inst, const TQString &doc )
{
setInstance( inst );
setXML( doc );
}
};
-void KViewViewer::slotPopupMenu( const QPoint &pos )
+void KViewViewer::slotPopupMenu( const TQPoint &pos )
{
KXMLGUIClient *popupGUIClient = new PopupGUIClient( instance(), m_popupDoc );
- (void) new KAction( i18n( "Save Image As..." ), 0, this, SLOT( slotSaveAs() ),
+ (void) new KAction( i18n( "Save Image As..." ), 0, this, TQT_SLOT( slotSaveAs() ),
popupGUIClient->actionCollection(), "saveimageas" );
// ### HACK treat the image as dir to get the back/fwd/reload buttons (Simon)
@@ -791,36 +791,36 @@ void KViewViewer::slotResultSaveAs( KIO::Job *job )
{
if( m_bTemp )
{
- unlink( QFile::encodeName( m_file ) );
+ unlink( TQFile::encodeName( m_file ) );
m_bTemp = false;
}
m_file = m_url.path();
}
}
-void KViewViewer::slotFileDirty( const QString & )
+void KViewViewer::slotFileDirty( const TQString & )
{
if( isModified() && isReadWrite() )
{
KPassivePopup * pop = new KPassivePopup( m_pParentWidget );
- QVBox * vb = pop->standardView( i18n( "Load changed image? - %1" ).arg( kapp->aboutData()->programName() ),
- QString::null, kapp->miniIcon() );
- ( void )new QLabel( i18n( "The image %1 which you have modified has changed on disk.\n"
+ TQVBox * vb = pop->standardView( i18n( "Load changed image? - %1" ).arg( kapp->aboutData()->programName() ),
+ TQString::null, kapp->miniIcon() );
+ ( void )new TQLabel( i18n( "The image %1 which you have modified has changed on disk.\n"
"Do you want to reload the file and lose your changes?\n"
"If you don't and subsequently save the image, you will lose the\n"
"changes that have already been saved." ).arg( url().fileName() ), vb );
- QWidget * hb = new QWidget( vb );
- QHBoxLayout * layout = new QHBoxLayout( hb );
- layout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Minimum ) );
+ TQWidget * hb = new TQWidget( vb );
+ TQHBoxLayout * layout = new TQHBoxLayout( hb );
+ layout->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
KPushButton * yes = new KPushButton( i18n("Reload"), hb );
layout->addWidget( yes );
- layout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Minimum ) );
+ layout->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
KPushButton * no = new KPushButton( i18n("Do Not Reload"), hb );
layout->addWidget( no );
- layout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Minimum ) );
- connect( yes, SIGNAL( clicked() ), this, SLOT( slotReloadUnmodified() ) );
- connect( yes, SIGNAL( clicked() ), pop, SLOT( hide() ) );
- connect( no, SIGNAL( clicked() ), pop, SLOT( hide() ) );
+ layout->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
+ connect( yes, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotReloadUnmodified() ) );
+ connect( yes, TQT_SIGNAL( clicked() ), pop, TQT_SLOT( hide() ) );
+ connect( no, TQT_SIGNAL( clicked() ), pop, TQT_SLOT( hide() ) );
pop->setView( vb );
pop->setTimeout( 0 );
pop->setAutoDelete( true );
@@ -848,7 +848,7 @@ void KViewViewer::loadPlugins()
KImageViewer::Viewer::loadPlugins( this, this, instance() );
if( factory() )
{
- QPtrList<KParts::Plugin> plugins = KParts::Plugin::pluginObjects( this );
+ TQPtrList<KParts::Plugin> plugins = KParts::Plugin::pluginObjects( this );
KParts::Plugin * plugin;
for( plugin = plugins.first(); plugin; plugin = plugins.next() )
factory()->addClient( plugin );
diff --git a/kview/kviewviewer/kviewviewer.h b/kview/kviewviewer/kviewviewer.h
index 4c5f13a0..0dc5d6a3 100644
--- a/kview/kviewviewer/kviewviewer.h
+++ b/kview/kviewviewer/kviewviewer.h
@@ -23,7 +23,7 @@
#include "kimageviewer/viewer.h"
#include "kviewkonqextension.h"
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#include "kviewvieweriface.h"
#include <kdemacros.h>
@@ -36,11 +36,11 @@ class KActionMenu;
class KToggleAction;
class KSelectAction;
class KAboutData;
-class QBuffer;
-class QSize;
+class TQBuffer;
+class TQSize;
class KDirWatch;
template<class T>
-class QCache;
+class TQCache;
class KDE_EXPORT KViewViewer : public KImageViewer::Viewer, public KViewViewerIface
{
@@ -48,8 +48,8 @@ class KDE_EXPORT KViewViewer : public KImageViewer::Viewer, public KViewViewerIf
friend class KViewKonqExtension;
public:
- KViewViewer( QWidget * parentWidget, const char * widgetName,
- QObject * parent, const char * name, const QStringList & );
+ KViewViewer( TQWidget * parentWidget, const char * widgetName,
+ TQObject * parent, const char * name, const TQStringList & );
virtual ~KViewViewer();
KImageViewer::Canvas * canvas() const { return m_pCanvas; }
@@ -63,11 +63,11 @@ class KDE_EXPORT KViewViewer : public KImageViewer::Viewer, public KViewViewerIf
public slots:
virtual bool openURL( const KURL & );
virtual bool closeURL();
- virtual void newImage( const QImage & );
+ virtual void newImage( const TQImage & );
virtual void reload();
protected:
- bool eventFilter( QObject *, QEvent * ); // for DnD
+ bool eventFilter( TQObject *, TQEvent * ); // for DnD
void abortLoad();
virtual bool openFile();
virtual bool saveFile();
@@ -81,13 +81,13 @@ class KDE_EXPORT KViewViewer : public KImageViewer::Viewer, public KViewViewerIf
void readSettings();
void zoomChanged( double );
void slotJobFinished( KIO::Job * );
- void slotData( KIO::Job *, const QByteArray & );
+ void slotData( KIO::Job *, const TQByteArray & );
void slotSave();
void slotSaveAs();
void slotZoomIn();
void slotZoomOut();
- void setZoom( const QString & );
+ void setZoom( const TQString & );
void updateZoomMenu( double zoom );
void slotFlipH();
void slotFlipV();
@@ -96,10 +96,10 @@ class KDE_EXPORT KViewViewer : public KImageViewer::Viewer, public KViewViewerIf
void slotFitToWin();
void slotDel();
- void slotPopupMenu( const QPoint & );
+ void slotPopupMenu( const TQPoint & );
void slotResultSaveAs( KIO::Job * );
- void slotFileDirty( const QString & );
+ void slotFileDirty( const TQString & );
void slotReloadUnmodified();
void slotToggleScrollbars();
@@ -110,12 +110,12 @@ class KDE_EXPORT KViewViewer : public KImageViewer::Viewer, public KViewViewerIf
void hasImage( bool );
private:
- QWidget * m_pParentWidget;
+ TQWidget * m_pParentWidget;
KIO::Job * m_pJob;
KViewKonqExtension * m_pExtension;
KImageViewer::Canvas * m_pCanvas;
KTempFile * m_pTempFile;
- QBuffer * m_pBuffer;
+ TQBuffer * m_pBuffer;
KDirWatch * m_pFileWatch;
// Actions:
@@ -132,12 +132,12 @@ class KDE_EXPORT KViewViewer : public KImageViewer::Viewer, public KViewViewerIf
KAction * m_paFitToWin;
KToggleAction * m_paShowScrollbars;
- QString m_popupDoc;
- QString m_mimeType;
- QString m_newMimeType;
- QString m_sCaption;
+ TQString m_popupDoc;
+ TQString m_mimeType;
+ TQString m_newMimeType;
+ TQString m_sCaption;
- QValueVector<unsigned int> m_vEffects;
+ TQValueVector<unsigned int> m_vEffects;
};
// vim:sw=4:ts=4
diff --git a/kview/kviewviewer/test/test.cpp b/kview/kviewviewer/test/test.cpp
index d4659e6c..2bc20372 100644
--- a/kview/kviewviewer/test/test.cpp
+++ b/kview/kviewviewer/test/test.cpp
@@ -11,7 +11,7 @@
#include <kparts/componentfactory.h>
#include <kapplication.h>
-#include <qimage.h>
+#include <tqimage.h>
Test::Test()
: KParts::MainWindow( 0, "KView Viewer Test" ),
diff --git a/kview/main.cpp b/kview/main.cpp
index e84bc65d..80e752be 100644
--- a/kview/main.cpp
+++ b/kview/main.cpp
@@ -56,7 +56,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char ** argv )
// to tell the presenter plugin to add those urls to it's list
if( args->count() > 0 )
{
- if( args->url( 0 ) == QString( "-" ) )
+ if( args->url( 0 ) == TQString( "-" ) )
kview->loadFromStdin();
else
kview->load( args->url( 0 ) );
diff --git a/kview/modules/browser/kmyfileitemlist.cpp b/kview/modules/browser/kmyfileitemlist.cpp
index 534e0876..28c3cb08 100644
--- a/kview/modules/browser/kmyfileitemlist.cpp
+++ b/kview/modules/browser/kmyfileitemlist.cpp
@@ -21,14 +21,14 @@
#include <kfileitem.h>
KMyFileItemList::KMyFileItemList() {}
-KMyFileItemList::KMyFileItemList( const QPtrList<KFileItem> & l ) : QPtrList<KFileItem>( l ) {}
+KMyFileItemList::KMyFileItemList( const TQPtrList<KFileItem> & l ) : TQPtrList<KFileItem>( l ) {}
-KMyFileItemList & KMyFileItemList::operator=( const QPtrList<KFileItem> & l )
+KMyFileItemList & KMyFileItemList::operator=( const TQPtrList<KFileItem> & l )
{
- return (KMyFileItemList &)QPtrList<KFileItem>::operator=( l );
+ return (KMyFileItemList &)TQPtrList<KFileItem>::operator=( l );
}
-int KMyFileItemList::compareItems( QPtrCollection::Item item1, QPtrCollection::Item item2 )
+int KMyFileItemList::compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 )
{
KFileItem * fileitem1 = static_cast<KFileItem *>( item1 );
KFileItem * fileitem2 = static_cast<KFileItem *>( item2 );
diff --git a/kview/modules/browser/kmyfileitemlist.h b/kview/modules/browser/kmyfileitemlist.h
index 052fce53..80f01013 100644
--- a/kview/modules/browser/kmyfileitemlist.h
+++ b/kview/modules/browser/kmyfileitemlist.h
@@ -20,18 +20,18 @@
#ifndef __kmyfileitemlist_h__
#define __kmyfileitemlist_h__
-#include <qptrlist.h>
+#include <tqptrlist.h>
class KFileItem;
-class KMyFileItemList : public QPtrList<KFileItem>
+class KMyFileItemList : public TQPtrList<KFileItem>
{
public:
KMyFileItemList();
- KMyFileItemList( const QPtrList<KFileItem> & );
- KMyFileItemList & operator=( const QPtrList<KFileItem> & );
+ KMyFileItemList( const TQPtrList<KFileItem> & );
+ KMyFileItemList & operator=( const TQPtrList<KFileItem> & );
protected:
- virtual int compareItems( QPtrCollection::Item item1, QPtrCollection::Item item2 );
+ virtual int compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 );
};
// vim:sw=4:ts=4
diff --git a/kview/modules/browser/kviewbrowser.cpp b/kview/modules/browser/kviewbrowser.cpp
index 6da318b7..936061eb 100644
--- a/kview/modules/browser/kviewbrowser.cpp
+++ b/kview/modules/browser/kviewbrowser.cpp
@@ -20,7 +20,7 @@
#include "kviewbrowser.h"
#include "kmyfileitemlist.h"
-#include <qcursor.h>
+#include <tqcursor.h>
#include <kdirlister.h>
#include <kaction.h>
@@ -36,7 +36,7 @@
typedef KGenericFactory<KViewBrowser> KViewBrowserFactory;
K_EXPORT_COMPONENT_FACTORY( kview_browserplugin, KViewBrowserFactory( "kviewbrowserplugin" ) )
-KViewBrowser::KViewBrowser( QObject* parent, const char* name, const QStringList & )
+KViewBrowser::KViewBrowser( TQObject* parent, const char* name, const TQStringList & )
: Plugin( parent, name )
, m_pDirLister( 0 )
, m_pFileItemList( 0 )
@@ -45,9 +45,9 @@ KViewBrowser::KViewBrowser( QObject* parent, const char* name, const QStringList
m_pViewer = static_cast<KImageViewer::Viewer *>( parent );
if( m_pViewer )
{
- m_paBack = KStdAction::back ( this, SLOT( slotBack() ), actionCollection(), "previous_image" );
+ m_paBack = KStdAction::back ( this, TQT_SLOT( slotBack() ), actionCollection(), "previous_image" );
m_paBack->setShortcut( SHIFT+Key_Left );
- m_paForward = KStdAction::forward( this, SLOT( slotForward() ), actionCollection(), "next_image" );
+ m_paForward = KStdAction::forward( this, TQT_SLOT( slotForward() ), actionCollection(), "next_image" );
m_paForward->setShortcut( SHIFT+Key_Right );
m_pExtension = m_pViewer->browserExtension();
}
@@ -156,13 +156,13 @@ void KViewBrowser::setupDirLister()
m_pDirLister = new KDirLister();
m_pDirLister->setMimeFilter( KImageIO::mimeTypes( KImageIO::Reading ) );
m_pDirLister->setShowingDotFiles( true );
- connect( m_pDirLister, SIGNAL( newItems( const KFileItemList & ) ), SLOT( slotNewItems( const KFileItemList & ) ) );
- connect( m_pDirLister, SIGNAL( deleteItem( KFileItem * ) ), SLOT( slotDeleteItem( KFileItem * ) ) );
+ connect( m_pDirLister, TQT_SIGNAL( newItems( const KFileItemList & ) ), TQT_SLOT( slotNewItems( const KFileItemList & ) ) );
+ connect( m_pDirLister, TQT_SIGNAL( deleteItem( KFileItem * ) ), TQT_SLOT( slotDeleteItem( KFileItem * ) ) );
}
if( m_pDirLister->url() != KURL( m_pViewer->url().directory( true, false ) ) )
{
- QApplication::setOverrideCursor( WaitCursor );
- QString url = m_pViewer->url().prettyURL();
+ TQApplication::setOverrideCursor( WaitCursor );
+ TQString url = m_pViewer->url().prettyURL();
int pos = url.findRev( "/" );
url = url.left( (unsigned int)pos );
kdDebug( 4630 ) << "open KDirLister for " << url << endl;
@@ -171,7 +171,7 @@ void KViewBrowser::setupDirLister()
kapp->processEvents();
//while( ! m_pFileItemList )
//kapp->processEvents();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
}
diff --git a/kview/modules/browser/kviewbrowser.h b/kview/modules/browser/kviewbrowser.h
index 3ed918b6..96e8b17f 100644
--- a/kview/modules/browser/kviewbrowser.h
+++ b/kview/modules/browser/kviewbrowser.h
@@ -34,7 +34,7 @@ class KViewBrowser : public KParts::Plugin
{
Q_OBJECT
public:
- KViewBrowser( QObject* parent, const char* name, const QStringList & );
+ KViewBrowser( TQObject* parent, const char* name, const TQStringList & );
virtual ~KViewBrowser();
private slots:
diff --git a/kview/modules/effects/kvieweffects.cpp b/kview/modules/effects/kvieweffects.cpp
index 9295c876..a2e57327 100644
--- a/kview/modules/effects/kvieweffects.cpp
+++ b/kview/modules/effects/kvieweffects.cpp
@@ -4,7 +4,7 @@
#include "kvieweffects.h"
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
#include <kaction.h>
#include <klocale.h>
@@ -15,16 +15,16 @@
#include <kdialogbase.h>
#include <knuminput.h>
#include <kiconeffect.h>
-#include <qvbox.h>
+#include <tqvbox.h>
#include <kcolorbutton.h>
#include <kimageeffect.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <assert.h>
typedef KGenericFactory<KViewEffects> KViewEffectsFactory;
K_EXPORT_COMPONENT_FACTORY( kview_effectsplugin, KViewEffectsFactory( "kvieweffectsplugin" ) )
-KViewEffects::KViewEffects( QObject* parent, const char* name, const QStringList & )
+KViewEffects::KViewEffects( TQObject* parent, const char* name, const TQStringList & )
: Plugin( parent, name )
, m_gamma( 0.5 ), m_lastgamma( -1.0 )
, m_opacity( 50 ), m_lastopacity( -1 )
@@ -32,26 +32,26 @@ KViewEffects::KViewEffects( QObject* parent, const char* name, const QStringList
, m_color( white )
, m_image( 0 )
{
- QObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false );
+ TQObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false );
m_pViewer = static_cast<KImageViewer::Viewer *>( viewerList->getFirst() );
delete viewerList;
if( m_pViewer )
{
KAction * gammaaction = new KAction( i18n( "&Gamma Correction..." ), 0, 0,
- this, SLOT( gamma() ),
+ this, TQT_SLOT( gamma() ),
actionCollection(), "plugin_effects_gamma" );
KAction * blendaction = new KAction( i18n( "&Blend Color..." ), 0, 0,
- this, SLOT( blend() ),
+ this, TQT_SLOT( blend() ),
actionCollection(), "plugin_effects_blend" );
KAction * intensityaction = new KAction( i18n( "Change &Intensity (Brightness)..." ), 0, 0,
- this, SLOT( intensity() ),
+ this, TQT_SLOT( intensity() ),
actionCollection(), "plugin_effects_intensity" );
gammaaction->setEnabled( m_pViewer->canvas()->image() != 0 );
blendaction->setEnabled( m_pViewer->canvas()->image() != 0 );
intensityaction->setEnabled( m_pViewer->canvas()->image() != 0 );
- connect( m_pViewer->widget(), SIGNAL( hasImage( bool ) ), gammaaction, SLOT( setEnabled( bool ) ) );
- connect( m_pViewer->widget(), SIGNAL( hasImage( bool ) ), blendaction, SLOT( setEnabled( bool ) ) );
- connect( m_pViewer->widget(), SIGNAL( hasImage( bool ) ), intensityaction, SLOT( setEnabled( bool ) ) );
+ connect( m_pViewer->widget(), TQT_SIGNAL( hasImage( bool ) ), gammaaction, TQT_SLOT( setEnabled( bool ) ) );
+ connect( m_pViewer->widget(), TQT_SIGNAL( hasImage( bool ) ), blendaction, TQT_SLOT( setEnabled( bool ) ) );
+ connect( m_pViewer->widget(), TQT_SIGNAL( hasImage( bool ) ), intensityaction, TQT_SLOT( setEnabled( bool ) ) );
}
else
kdWarning( 4630 ) << "no KImageViewer interface found - the effects plugin won't work" << endl;
@@ -67,20 +67,20 @@ KViewEffects::~KViewEffects()
void KViewEffects::intensity()
{
KDialogBase dlg( m_pViewer->widget(), "Intensity Dialog", true /*modal*/, i18n( "Change Intensity" ), KDialogBase::Ok | KDialogBase::Try | KDialogBase::Cancel );
- connect( &dlg, SIGNAL( tryClicked() ), this, SLOT( applyIntensity() ) );
+ connect( &dlg, TQT_SIGNAL( tryClicked() ), this, TQT_SLOT( applyIntensity() ) );
- QVBox * vbox = new QVBox( &dlg );
+ TQVBox * vbox = new TQVBox( &dlg );
vbox->setSpacing( KDialog::spacingHint() );
dlg.setMainWidget( vbox );
KIntNumInput * percent = new KIntNumInput( vbox, "Intensity Input" );
percent->setRange( 0, 100, 1, true );
percent->setValue( m_intensity );
percent->setLabel( i18n( "&Intensity:" ) );
- percent->setSuffix( QString::fromAscii( "%" ) );
- connect( percent, SIGNAL( valueChanged( int ) ), this, SLOT( setIntensity( int ) ) );
+ percent->setSuffix( TQString::fromAscii( "%" ) );
+ connect( percent, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( setIntensity( int ) ) );
int result = dlg.exec();
- if( result == QDialog::Accepted )
+ if( result == TQDialog::Accepted )
{
applyIntensity();
m_pViewer->setModified( true );
@@ -104,7 +104,7 @@ void KViewEffects::applyIntensity()
if( m_intensity == m_lastintensity )
return; // nothing to do
- QImage * work = workImage();
+ TQImage * work = workImage();
if( work )
{
KImageEffect::intensity( *work, m_intensity * 0.01 );
@@ -117,24 +117,24 @@ void KViewEffects::applyIntensity()
void KViewEffects::blend()
{
KDialogBase dlg( m_pViewer->widget(), "Blend Color Dialog", true /*modal*/, i18n( "Blend Color" ), KDialogBase::Ok | KDialogBase::Try | KDialogBase::Cancel );
- connect( &dlg, SIGNAL( tryClicked() ), this, SLOT( applyBlend() ) );
+ connect( &dlg, TQT_SIGNAL( tryClicked() ), this, TQT_SLOT( applyBlend() ) );
- QVBox * vbox = new QVBox( &dlg );
+ TQVBox * vbox = new TQVBox( &dlg );
vbox->setSpacing( KDialog::spacingHint() );
dlg.setMainWidget( vbox );
KIntNumInput * opacity = new KIntNumInput( vbox, "Opacity Input" );
opacity->setRange( 0, 100, 1, true );
opacity->setValue( m_opacity );
opacity->setLabel( i18n( "O&pacity:" ) );
- opacity->setSuffix( QString::fromAscii( "%" ) );
- connect( opacity, SIGNAL( valueChanged( int ) ), this, SLOT( setOpacity( int ) ) );
- QLabel * label = new QLabel( i18n( "Blend c&olor:" ), vbox );
+ opacity->setSuffix( TQString::fromAscii( "%" ) );
+ connect( opacity, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( setOpacity( int ) ) );
+ TQLabel * label = new TQLabel( i18n( "Blend c&olor:" ), vbox );
KColorButton * color = new KColorButton( m_color, vbox, "Color Input Button" );
label->setBuddy( color );
- connect( color, SIGNAL( changed( const QColor & ) ), this, SLOT( setColor( const QColor & ) ) );
+ connect( color, TQT_SIGNAL( changed( const TQColor & ) ), this, TQT_SLOT( setColor( const TQColor & ) ) );
int result = dlg.exec();
- if( result == QDialog::Accepted )
+ if( result == TQDialog::Accepted )
{
applyBlend();
m_pViewer->setModified( true );
@@ -152,7 +152,7 @@ void KViewEffects::setOpacity( int opacity )
m_opacity = opacity;
}
-void KViewEffects::setColor( const QColor & color )
+void KViewEffects::setColor( const TQColor & color )
{
m_color = color;
}
@@ -162,7 +162,7 @@ void KViewEffects::applyBlend()
if( m_opacity == m_lastopacity )
return; // nothing to do
- QImage * work = workImage();
+ TQImage * work = workImage();
if( work )
{
KImageEffect::blend( m_color, *work, m_opacity * 0.01 );
@@ -175,17 +175,17 @@ void KViewEffects::applyBlend()
void KViewEffects::gamma()
{
KDialogBase dlg( m_pViewer->widget(), "Gamma Correction Dialog", true /*modal*/, i18n( "Gamma Correction" ), KDialogBase::Ok | KDialogBase::Try | KDialogBase::Cancel );
- connect( &dlg, SIGNAL( tryClicked() ), this, SLOT( applyGammaCorrection() ) );
+ connect( &dlg, TQT_SIGNAL( tryClicked() ), this, TQT_SLOT( applyGammaCorrection() ) );
// create dialog
KDoubleNumInput * gammavalue = new KDoubleNumInput( 0.0, 1.0, 0.5, 0.01, 4, &dlg, "Gamma value input" );
gammavalue->setRange( 0.0, 1.0, 0.01, true );
- connect( gammavalue, SIGNAL( valueChanged( double ) ), this, SLOT( setGammaValue( double ) ) );
+ connect( gammavalue, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( setGammaValue( double ) ) );
gammavalue->setLabel( i18n( "Gamma value:" ) );
dlg.setMainWidget( gammavalue );
int result = dlg.exec();
- if( result == QDialog::Accepted )
+ if( result == TQDialog::Accepted )
{
// apply gamma correction
applyGammaCorrection();
@@ -213,7 +213,7 @@ void KViewEffects::applyGammaCorrection()
if( m_gamma == m_lastgamma )
return; // nothing to do
- QImage * corrected = workImage();
+ TQImage * corrected = workImage();
if( corrected )
{
KIconEffect::toGamma( *corrected, m_gamma );
@@ -223,17 +223,17 @@ void KViewEffects::applyGammaCorrection()
}
}
-inline QImage * KViewEffects::workImage()
+inline TQImage * KViewEffects::workImage()
{
if( ! m_image )
{
- const QImage * canvasimage = m_pViewer->canvas()->image();
+ const TQImage * canvasimage = m_pViewer->canvas()->image();
if( canvasimage )
- m_image = new QImage( *canvasimage );
+ m_image = new TQImage( *canvasimage );
}
if( m_image )
{
- QImage * changed = new QImage( *m_image );
+ TQImage * changed = new TQImage( *m_image );
changed->detach();
return changed;
}
diff --git a/kview/modules/effects/kvieweffects.h b/kview/modules/effects/kvieweffects.h
index 0bf92a8e..821b99c8 100644
--- a/kview/modules/effects/kvieweffects.h
+++ b/kview/modules/effects/kvieweffects.h
@@ -6,7 +6,7 @@
#define KVIEWEFFECTS_H
#include <kparts/plugin.h>
-#include <qcolor.h>
+#include <tqcolor.h>
namespace KImageViewer { class Viewer; }
@@ -14,7 +14,7 @@ class KViewEffects : public KParts::Plugin
{
Q_OBJECT
public:
- KViewEffects( QObject* parent, const char* name, const QStringList & );
+ KViewEffects( TQObject* parent, const char* name, const TQStringList & );
virtual ~KViewEffects();
private slots:
@@ -24,7 +24,7 @@ private slots:
void blend();
void setOpacity( int );
- void setColor( const QColor & );
+ void setColor( const TQColor & );
void applyBlend();
void gamma();
@@ -32,14 +32,14 @@ private slots:
void applyGammaCorrection();
private:
- QImage * workImage();
+ TQImage * workImage();
KImageViewer::Viewer * m_pViewer;
double m_gamma, m_lastgamma;
int m_opacity, m_lastopacity;
int m_intensity, m_lastintensity;
- QColor m_color;
- QImage * m_image;
+ TQColor m_color;
+ TQImage * m_image;
};
// vim:sw=4:ts=4:cindent
diff --git a/kview/modules/presenter/config/kviewpresenterconfig.cpp b/kview/modules/presenter/config/kviewpresenterconfig.cpp
index 92dd8627..e44889ed 100644
--- a/kview/modules/presenter/config/kviewpresenterconfig.cpp
+++ b/kview/modules/presenter/config/kviewpresenterconfig.cpp
@@ -18,9 +18,9 @@
#include "kviewpresenterconfig.h"
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qframe.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqframe.h>
#include <klocale.h>
#include <kdialog.h>
@@ -28,17 +28,17 @@
#include <kconfig.h>
#include <kgenericfactory.h>
-typedef KGenericFactory<KViewPresenterConfig, QWidget> KViewPresenterConfigFactory;
+typedef KGenericFactory<KViewPresenterConfig, TQWidget> KViewPresenterConfigFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kviewpresenterconfig, KViewPresenterConfigFactory( "kcm_kviewpresenterconfig" ) )
-KViewPresenterConfig::KViewPresenterConfig( QWidget * parent, const char *, const QStringList & args )
+KViewPresenterConfig::KViewPresenterConfig( TQWidget * parent, const char *, const TQStringList & args )
: KCModule( KViewPresenterConfigFactory::instance(), parent, args )
{
- QBoxLayout * layout = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
+ TQBoxLayout * layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() );
layout->setAutoAdd( true );
- m_pCheckBox = new QCheckBox( "This is only for testing...", this );
- connect( m_pCheckBox, SIGNAL( clicked() ), this, SLOT( checkChanged() ) );
+ m_pCheckBox = new TQCheckBox( "This is only for testing...", this );
+ connect( m_pCheckBox, TQT_SIGNAL( clicked() ), this, TQT_SLOT( checkChanged() ) );
}
KViewPresenterConfig::~KViewPresenterConfig()
diff --git a/kview/modules/presenter/config/kviewpresenterconfig.h b/kview/modules/presenter/config/kviewpresenterconfig.h
index c839690a..ae257cea 100644
--- a/kview/modules/presenter/config/kviewpresenterconfig.h
+++ b/kview/modules/presenter/config/kviewpresenterconfig.h
@@ -21,13 +21,13 @@
#include <kcmodule.h>
-class QCheckBox;
+class TQCheckBox;
class KViewPresenterConfig : public KCModule
{
Q_OBJECT
public:
- KViewPresenterConfig( QWidget * parent, const char * name = 0, const QStringList & args = QStringList() );
+ KViewPresenterConfig( TQWidget * parent, const char * name = 0, const TQStringList & args = TQStringList() );
~KViewPresenterConfig();
virtual void load();
@@ -38,7 +38,7 @@ class KViewPresenterConfig : public KCModule
void checkChanged();
private:
- QCheckBox * m_pCheckBox;
+ TQCheckBox * m_pCheckBox;
};
// vim:sw=4:ts=4
diff --git a/kview/modules/presenter/imagelistitem.cpp b/kview/modules/presenter/imagelistitem.cpp
index 4236dfe7..547de656 100644
--- a/kview/modules/presenter/imagelistitem.cpp
+++ b/kview/modules/presenter/imagelistitem.cpp
@@ -20,14 +20,14 @@
#include "imagelistitem.h"
-#include <qimage.h>
+#include <tqimage.h>
#include <klistview.h>
ImageListItem::ImageListItem( KListView * parent, const KURL & url )
: KListViewItem( parent, parent->lastItem(), url.prettyURL() )
, m_pImage( 0 )
- , m_filename( QString::null )
+ , m_filename( TQString::null )
, m_url( url )
{
setDragEnabled( true );
@@ -39,13 +39,13 @@ ImageListItem::ImageListItem( KListView * parent, const KURL & url )
{
// download file
/*
- QString extension;
- QString fileName = m_url.fileName();
+ TQString extension;
+ TQString fileName = m_url.fileName();
int extensionPos = fileName.findRev( '.' );
if ( extensionPos != -1 )
extension = fileName.mid( extensionPos ); // keep the '.'
delete m_pTempFile;
- m_pTempFile = new KTempFile( QString::null, extension );
+ m_pTempFile = new KTempFile( TQString::null, extension );
m_filename = m_pTempFile->name();
m_pJob = KIO::get( m_url, m_pExtension->urlArgs().reload, false );
@@ -62,15 +62,15 @@ ImageListItem::~ImageListItem()
}
}
-const QImage * ImageListItem::image() const
+const TQImage * ImageListItem::image() const
{
return m_pImage;
}
-const QString & ImageListItem::file() const
+const TQString & ImageListItem::file() const
{
if( m_url.isLocalFile() )
- return QString::null;
+ return TQString::null;
return m_filename;
}
diff --git a/kview/modules/presenter/imagelistitem.h b/kview/modules/presenter/imagelistitem.h
index 63761af8..ee143a90 100644
--- a/kview/modules/presenter/imagelistitem.h
+++ b/kview/modules/presenter/imagelistitem.h
@@ -23,9 +23,9 @@
#include <klistview.h>
#include <kurl.h>
-#include <qstring.h>
+#include <tqstring.h>
-class QImage;
+class TQImage;
class ImageListItem : public KListViewItem
{
@@ -33,15 +33,15 @@ class ImageListItem : public KListViewItem
ImageListItem( KListView * parent, const KURL & url );
~ImageListItem();
- const QImage * image() const;
- const QString & file() const;
+ const TQImage * image() const;
+ const TQString & file() const;
const KURL & url() const;
virtual int rtti() const { return 48294; }
private:
- QImage * m_pImage;
- QString m_filename;
+ TQImage * m_pImage;
+ TQString m_filename;
KURL m_url;
};
diff --git a/kview/modules/presenter/kviewpresenter.cpp b/kview/modules/presenter/kviewpresenter.cpp
index bbc5e8eb..3cf54d15 100644
--- a/kview/modules/presenter/kviewpresenter.cpp
+++ b/kview/modules/presenter/kviewpresenter.cpp
@@ -22,13 +22,13 @@
#include "imagelistdialog.h"
#include "imagelistitem.h"
-#include <qvbox.h>
-#include <qobjectlist.h>
-#include <qsignalslotimp.h>
-#include <qtimer.h>
-#include <qevent.h>
-#include <qdragobject.h>
-#include <qstringlist.h>
+#include <tqvbox.h>
+#include <tqobjectlist.h>
+#include <tqsignalslotimp.h>
+#include <tqtimer.h>
+#include <tqevent.h>
+#include <tqdragobject.h>
+#include <tqstringlist.h>
#include <kpushbutton.h>
#include <kapplication.h>
@@ -51,35 +51,35 @@
typedef KGenericFactory<KViewPresenter> KViewPresenterFactory;
K_EXPORT_COMPONENT_FACTORY( kview_presenterplugin, KViewPresenterFactory( "kviewpresenterplugin" ) )
-KViewPresenter::KViewPresenter( QObject* parent, const char* name, const QStringList & )
+KViewPresenter::KViewPresenter( TQObject* parent, const char* name, const TQStringList & )
: Plugin( parent, name )
, m_pImageList( new ImageListDialog() )
, m_paFileOpen( 0 )
, m_bDontAdd( false )
, m_pCurrentItem( 0 )
- , m_pSlideshowTimer( new QTimer( this ) )
+ , m_pSlideshowTimer( new TQTimer( this ) )
{
kdDebug( 4630 ) << k_funcinfo << endl;
m_imagelist.setAutoDelete( true );
- QObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false );
+ TQObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false );
m_pViewer = static_cast<KImageViewer::Viewer *>( viewerList->getFirst() );
delete viewerList;
if( m_pViewer )
{
( void ) new KAction( i18n( "&Image List..." ), 0, 0,
- this, SLOT( slotImageList() ),
+ this, TQT_SLOT( slotImageList() ),
actionCollection(), "plugin_presenter_imageList" );
m_paSlideshow = new KToggleAction( i18n( "Start &Slideshow" ), Key_S, actionCollection(), "plugin_presenter_slideshow" );
( void ) new KAction( i18n( "&Previous Image in List" ), "previous", ALT+Key_Left,
- this, SLOT( prev() ),
+ this, TQT_SLOT( prev() ),
actionCollection(), "plugin_presenter_prev" );
( void ) new KAction( i18n( "&Next Image in List" ), "next", ALT+Key_Right,
- this, SLOT( next() ),
+ this, TQT_SLOT( next() ),
actionCollection(), "plugin_presenter_next" );
- connect( m_paSlideshow, SIGNAL( toggled( bool ) ), m_pImageList->m_pSlideshow, SLOT( setOn( bool ) ) );
- connect( m_pImageList->m_pSlideshow, SIGNAL( toggled( bool ) ), m_paSlideshow, SLOT( setChecked( bool ) ) );
+ connect( m_paSlideshow, TQT_SIGNAL( toggled( bool ) ), m_pImageList->m_pSlideshow, TQT_SLOT( setOn( bool ) ) );
+ connect( m_pImageList->m_pSlideshow, TQT_SIGNAL( toggled( bool ) ), m_paSlideshow, TQT_SLOT( setChecked( bool ) ) );
// search for file_open action
KXMLGUIClient * parentClient = static_cast<KXMLGUIClient*>( parent->qt_cast( "KXMLGUIClient" ) );
@@ -89,48 +89,48 @@ KViewPresenter::KViewPresenter( QObject* parent, const char* name, const QString
m_paFileClose = parentClient->actionCollection()->action( "file_close" );
}
if( m_paFileClose )
- connect( m_paFileClose, SIGNAL( activated() ), this, SLOT( slotClose() ) );
+ connect( m_paFileClose, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotClose() ) );
if( m_paFileOpen )
{
- disconnect( m_paFileOpen, SIGNAL( activated() ), parent, SLOT( slotOpenFile() ) );
- connect( m_paFileOpen, SIGNAL( activated() ), this, SLOT( slotOpenFiles() ) );
+ disconnect( m_paFileOpen, TQT_SIGNAL( activated() ), parent, TQT_SLOT( slotOpenFile() ) );
+ connect( m_paFileOpen, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotOpenFiles() ) );
}
else
{
(void) new KAction( i18n( "Open &Multiple Files..." ), "queue", CTRL+SHIFT+Key_O,
- this, SLOT( slotOpenFiles() ),
+ this, TQT_SLOT( slotOpenFiles() ),
actionCollection(), "plugin_presenter_openFiles" );
}
- connect( m_pViewer, SIGNAL( imageOpened( const KURL & ) ),
- SLOT( slotImageOpened( const KURL & ) ) );
+ connect( m_pViewer, TQT_SIGNAL( imageOpened( const KURL & ) ),
+ TQT_SLOT( slotImageOpened( const KURL & ) ) );
}
else
kdWarning( 4630 ) << "no KImageViewer interface found - the presenter plugin won't work" << endl;
//( void )new KViewPresenterConfModule( this );
- connect( m_pImageList->m_pListView, SIGNAL( executed( QListViewItem* ) ),
- this, SLOT( changeItem( QListViewItem* ) ) );
- connect( m_pImageList->m_pPrevious, SIGNAL( clicked() ),
- this, SLOT( prev() ) );
- connect( m_pImageList->m_pNext, SIGNAL( clicked() ),
- this, SLOT( next() ) );
- connect( m_pImageList->m_pListView, SIGNAL( spacePressed( QListViewItem* ) ),
- this, SLOT( changeItem( QListViewItem* ) ) );
- connect( m_pImageList->m_pListView, SIGNAL( returnPressed( QListViewItem* ) ),
- this, SLOT( changeItem( QListViewItem* ) ) );
- connect( m_pImageList->m_pSlideshow, SIGNAL( toggled( bool ) ),
- this, SLOT( slideshow( bool ) ) );
- connect( m_pImageList->m_pInterval, SIGNAL( valueChanged( int ) ),
- this, SLOT( setSlideshowInterval( int ) ) );
- connect( m_pImageList->m_pShuffle, SIGNAL( clicked() ),
- this, SLOT( shuffle() ) );
- connect( m_pImageList->m_pLoad, SIGNAL( clicked() ),
- this, SLOT( loadList() ) );
- connect( m_pImageList->m_pSave, SIGNAL( clicked() ),
- this, SLOT( saveList() ) );
- connect( m_pImageList->m_pCloseAll, SIGNAL( clicked() ),
- this, SLOT( closeAll() ) );
+ connect( m_pImageList->m_pListView, TQT_SIGNAL( executed( TQListViewItem* ) ),
+ this, TQT_SLOT( changeItem( TQListViewItem* ) ) );
+ connect( m_pImageList->m_pPrevious, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( prev() ) );
+ connect( m_pImageList->m_pNext, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( next() ) );
+ connect( m_pImageList->m_pListView, TQT_SIGNAL( spacePressed( TQListViewItem* ) ),
+ this, TQT_SLOT( changeItem( TQListViewItem* ) ) );
+ connect( m_pImageList->m_pListView, TQT_SIGNAL( returnPressed( TQListViewItem* ) ),
+ this, TQT_SLOT( changeItem( TQListViewItem* ) ) );
+ connect( m_pImageList->m_pSlideshow, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slideshow( bool ) ) );
+ connect( m_pImageList->m_pInterval, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( setSlideshowInterval( int ) ) );
+ connect( m_pImageList->m_pShuffle, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( shuffle() ) );
+ connect( m_pImageList->m_pLoad, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( loadList() ) );
+ connect( m_pImageList->m_pSave, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( saveList() ) );
+ connect( m_pImageList->m_pCloseAll, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( closeAll() ) );
// allow drop on the dialog
m_pImageList->installEventFilter( this );
@@ -140,8 +140,8 @@ KViewPresenter::KViewPresenter( QObject* parent, const char* name, const QString
// grab drops on the main view
m_pViewer->widget()->installEventFilter( this );
- connect( m_pSlideshowTimer, SIGNAL( timeout() ),
- this, SLOT( next() ) );
+ connect( m_pSlideshowTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( next() ) );
}
KViewPresenter::~KViewPresenter()
@@ -149,46 +149,46 @@ KViewPresenter::~KViewPresenter()
kdDebug( 4630 ) << k_funcinfo << endl;
if( m_paFileOpen )
{
- disconnect( m_paFileOpen, SIGNAL( activated() ), this, SLOT( slotOpenFiles() ) );
+ disconnect( m_paFileOpen, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotOpenFiles() ) );
// If the parent() doesn't exist we either leave the "File Open" action
// in an unusable state or KView was just shutting down and therefor we
// can ignore this. I've only seen the second one happening and to get
- // rid of the QObject::connect warning we do the parent() check.
+ // rid of the TQObject::connect warning we do the parent() check.
if( parent() )
- connect( m_paFileOpen, SIGNAL( activated() ), parent(), SLOT( slotOpenFile() ) );
+ connect( m_paFileOpen, TQT_SIGNAL( activated() ), parent(), TQT_SLOT( slotOpenFile() ) );
}
}
-bool KViewPresenter::eventFilter( QObject *obj, QEvent *ev )
+bool KViewPresenter::eventFilter( TQObject *obj, TQEvent *ev )
{
if( obj == m_pImageList || obj == m_pImageList->m_pListView || obj == m_pImageList->m_pListView->viewport() || obj == m_pViewer->widget() )
{
switch( ev->type() )
{
- case QEvent::DragEnter:
- case QEvent::DragMove:
+ case TQEvent::DragEnter:
+ case TQEvent::DragMove:
{
// drag enter event in the image list
//kdDebug( 4630 ) << "DragEnterEvent in the image list: " << obj->className() << endl;
- QDragEnterEvent * e = static_cast<QDragEnterEvent*>( ev );
+ TQDragEnterEvent * e = static_cast<TQDragEnterEvent*>( ev );
//for( int i = 0; e->format( i ); ++i )
//kdDebug( 4630 ) << " - " << e->format( i ) << endl;
- if( KURLDrag::canDecode( e ) )// || QImageDrag::canDecode( e ) )
+ if( KURLDrag::canDecode( e ) )// || TQImageDrag::canDecode( e ) )
{
e->accept();
return true;
}
}
- case QEvent::Drop:
+ case TQEvent::Drop:
{
// drop event in the image list
kdDebug( 4630 ) << "DropEvent in the image list: " << obj->className() << endl;
- QDropEvent * e = static_cast<QDropEvent*>( ev );
- QStringList l;
- //QImage image;
+ TQDropEvent * e = static_cast<TQDropEvent*>( ev );
+ TQStringList l;
+ //TQImage image;
if( KURLDrag::decodeToUnicodeUris( e, l ) )
{
- for( QStringList::const_iterator it = l.begin(); it != l.end(); ++it )
+ for( TQStringList::const_iterator it = l.begin(); it != l.end(); ++it )
{
ImageInfo * info = new ImageInfo( KURL( *it ) );
if( ! m_imagelist.contains( info ) )
@@ -201,7 +201,7 @@ bool KViewPresenter::eventFilter( QObject *obj, QEvent *ev )
}
return true;
}
- //else if( QImageDrag::decode( e, image ) )
+ //else if( TQImageDrag::decode( e, image ) )
//newImage( image );
}
default: // do nothing
@@ -221,7 +221,7 @@ void KViewPresenter::slotImageOpened( const KURL & url )
if( ! m_imagelist.contains( info ) )
{
m_imagelist.inSort( info );
- QListViewItem * item = new ImageListItem( m_pImageList->m_pListView, url );
+ TQListViewItem * item = new ImageListItem( m_pImageList->m_pListView, url );
makeCurrent( item );
}
else
@@ -260,7 +260,7 @@ void KViewPresenter::slotOpenFiles()
void KViewPresenter::slotClose()
{
- QListViewItem * next = m_pCurrentItem->itemBelow() ? m_pCurrentItem->itemBelow() : m_pImageList->m_pListView->firstChild();
+ TQListViewItem * next = m_pCurrentItem->itemBelow() ? m_pCurrentItem->itemBelow() : m_pImageList->m_pListView->firstChild();
if( next == m_pCurrentItem )
next = 0;
@@ -273,7 +273,7 @@ void KViewPresenter::slotClose()
changeItem( next );
}
-void KViewPresenter::changeItem( QListViewItem * qitem )
+void KViewPresenter::changeItem( TQListViewItem * qitem )
{
kdDebug( 4630 ) << k_funcinfo << endl;
if( qitem->rtti() == 48294 )
@@ -281,14 +281,14 @@ void KViewPresenter::changeItem( QListViewItem * qitem )
ImageListItem * item = static_cast<ImageListItem*>( qitem );
if( ! item->url().isEmpty() )
{
- if( item->url().isLocalFile() && ! QFile::exists( item->url().path() ) )
+ if( item->url().isLocalFile() && ! TQFile::exists( item->url().path() ) )
{
kdDebug( 4630 ) << "file doesn't exist. removed." << endl;
ImageInfo info( item->url() );
m_imagelist.remove( &info );
if( m_pCurrentItem == item )
{
- QListViewItem * next = m_pCurrentItem->itemBelow() ? m_pCurrentItem->itemBelow() : m_pImageList->m_pListView->firstChild();
+ TQListViewItem * next = m_pCurrentItem->itemBelow() ? m_pCurrentItem->itemBelow() : m_pImageList->m_pListView->firstChild();
if( next->rtti() != 48294 )
kdWarning( 4630 ) << "unknown ListView item" << endl;
else
@@ -327,7 +327,7 @@ void KViewPresenter::prev()
kdDebug( 4630 ) << k_funcinfo << endl;
if( m_pCurrentItem )
{
- QListViewItem * prev = m_pCurrentItem->itemAbove() ? m_pCurrentItem->itemAbove() : m_pImageList->m_pListView->lastItem();
+ TQListViewItem * prev = m_pCurrentItem->itemAbove() ? m_pCurrentItem->itemAbove() : m_pImageList->m_pListView->lastItem();
if( prev )
changeItem( prev );
}
@@ -338,16 +338,16 @@ void KViewPresenter::next()
kdDebug( 4630 ) << k_funcinfo << endl;
if( m_pCurrentItem )
{
- QListViewItem * next = m_pCurrentItem->itemBelow() ? m_pCurrentItem->itemBelow() : m_pImageList->m_pListView->firstChild();
+ TQListViewItem * next = m_pCurrentItem->itemBelow() ? m_pCurrentItem->itemBelow() : m_pImageList->m_pListView->firstChild();
if( next )
changeItem( next );
}
}
-void KViewPresenter::makeCurrent( QListViewItem * item )
+void KViewPresenter::makeCurrent( TQListViewItem * item )
{
if( m_pCurrentItem )
- m_pCurrentItem->setPixmap( 0, QPixmap() );
+ m_pCurrentItem->setPixmap( 0, TQPixmap() );
if( item->rtti() != 48294 )
kdWarning( 4630 ) << "unknown ListView item" << endl;
else
@@ -384,8 +384,8 @@ void KViewPresenter::shuffle()
{
m_pImageList->noSort();
KListView * listview = m_pImageList->m_pListView;
- QPtrList<QListViewItem> items;
- for( QListViewItem * item = listview->firstChild(); item; item = listview->firstChild() )
+ TQPtrList<TQListViewItem> items;
+ for( TQListViewItem * item = listview->firstChild(); item; item = listview->firstChild() )
{
items.append( item );
listview->takeItem( item );
@@ -405,26 +405,26 @@ void KViewPresenter::closeAll()
void KViewPresenter::loadList()
{
- KURL url = KFileDialog::getOpenURL( ":load_list", QString::null, m_pImageList );
+ KURL url = KFileDialog::getOpenURL( ":load_list", TQString::null, m_pImageList );
if( url.isEmpty() )
return;
- QString tempfile;
+ TQString tempfile;
if( ! KIO::NetAccess::download( url, tempfile, m_pViewer->widget() ) )
{
KMessageBox::error( m_pImageList, i18n( "Could not load\n%1" ).arg( url.prettyURL() ) );
return;
}
- QFile file( tempfile );
+ TQFile file( tempfile );
if( file.open( IO_ReadOnly ) )
{
- QTextStream t( &file );
+ TQTextStream t( &file );
if( t.readLine() == "[KView Image List]" )
{
//clear old image list
closeAll();
- QStringList list;
+ TQStringList list;
if( ! t.eof() )
m_pViewer->openURL( KURL( t.readLine() ) );
while( ! t.eof() )
@@ -451,12 +451,12 @@ void KViewPresenter::loadList()
void KViewPresenter::saveList()
{
- KURL url = KFileDialog::getSaveURL( ":save_list", QString::null, m_pImageList );
+ KURL url = KFileDialog::getSaveURL( ":save_list", TQString::null, m_pImageList );
if( url.isEmpty() )
return;
- QString tempfile;
+ TQString tempfile;
if( url.isLocalFile() )
tempfile = url.path();
else
@@ -465,13 +465,13 @@ void KViewPresenter::saveList()
tempfile = ktempf.name();
}
- QFile file( tempfile );
+ TQFile file( tempfile );
if( file.open( IO_WriteOnly ) )
{
- QTextStream t( &file );
+ TQTextStream t( &file );
// write header
t << "[KView Image List]" << endl;
- QListViewItem * item = m_pImageList->m_pListView->firstChild();
+ TQListViewItem * item = m_pImageList->m_pListView->firstChild();
while( item )
{
if( item->rtti() == 48294 )
diff --git a/kview/modules/presenter/kviewpresenter.h b/kview/modules/presenter/kviewpresenter.h
index 29fc106b..e607f92b 100644
--- a/kview/modules/presenter/kviewpresenter.h
+++ b/kview/modules/presenter/kviewpresenter.h
@@ -24,14 +24,14 @@
#include <kparts/plugin.h>
#include <kurl.h>
-#include <qsortedlist.h>
+#include <tqsortedlist.h>
namespace KImageViewer { class Viewer; }
class ImageListDialog;
class ImageListItem;
-class QListViewItem;
-class QTimer;
+class TQListViewItem;
+class TQTimer;
class KToggleAction;
class KAction;
@@ -39,7 +39,7 @@ class KViewPresenter : public KParts::Plugin
{
Q_OBJECT
public:
- KViewPresenter( QObject* parent, const char* name, const QStringList & );
+ KViewPresenter( TQObject* parent, const char* name, const TQStringList & );
virtual ~KViewPresenter();
protected:
@@ -67,14 +67,14 @@ protected:
return url.prettyURL() < i1.url.prettyURL();
}
};
- bool eventFilter( QObject *, QEvent * );
+ bool eventFilter( TQObject *, TQEvent * );
private slots:
void slotImageOpened( const KURL & );
void slotImageList();
void slotOpenFiles();
void slotClose();
- void changeItem( QListViewItem * );
+ void changeItem( TQListViewItem * );
void prev();
void next();
void slideshow( bool );
@@ -85,7 +85,7 @@ private slots:
void saveList();
private:
- void makeCurrent( QListViewItem * );
+ void makeCurrent( TQListViewItem * );
KImageViewer::Viewer * m_pViewer;
ImageListDialog * m_pImageList;
@@ -93,10 +93,10 @@ private:
KAction * m_paFileOpen;
KAction * m_paFileClose;
- QSortedList<ImageInfo> m_imagelist;
+ TQSortedList<ImageInfo> m_imagelist;
bool m_bDontAdd;
ImageListItem * m_pCurrentItem;
- QTimer * m_pSlideshowTimer;
+ TQTimer * m_pSlideshowTimer;
};
// vim:sw=4:ts=4:cindent
diff --git a/kview/modules/presenter/kviewpresenterconfmodule.cpp b/kview/modules/presenter/kviewpresenterconfmodule.cpp
index a39ea378..1c79ee15 100644
--- a/kview/modules/presenter/kviewpresenterconfmodule.cpp
+++ b/kview/modules/presenter/kviewpresenterconfmodule.cpp
@@ -20,16 +20,16 @@
#include "kviewpresenterconfmodule.h"
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qframe.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqframe.h>
#include <klocale.h>
#include <kdialog.h>
#include <kglobal.h>
#include <kconfig.h>
-KViewPresenterConfModule::KViewPresenterConfModule( QObject * parent )
+KViewPresenterConfModule::KViewPresenterConfModule( TQObject * parent )
: KPreferencesModule( "kviewpresenter", parent, "KView Presenter Config Module" )
{
}
@@ -47,12 +47,12 @@ void KViewPresenterConfModule::reset()
{
}
-void KViewPresenterConfModule::createPage( QFrame * page )
+void KViewPresenterConfModule::createPage( TQFrame * page )
{
- QBoxLayout * layout = new QVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() );
+ TQBoxLayout * layout = new TQVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() );
layout->setAutoAdd( true );
- m_pCheckBox = new QCheckBox( "This is only for testing...", page );
+ m_pCheckBox = new TQCheckBox( "This is only for testing...", page );
}
// vim:sw=4:ts=4
diff --git a/kview/modules/presenter/kviewpresenterconfmodule.h b/kview/modules/presenter/kviewpresenterconfmodule.h
index dd7e5cf2..6e3dcb46 100644
--- a/kview/modules/presenter/kviewpresenterconfmodule.h
+++ b/kview/modules/presenter/kviewpresenterconfmodule.h
@@ -23,13 +23,13 @@
#include "kpreferencesmodule.h"
-class QCheckBox;
+class TQCheckBox;
class KViewPresenterConfModule : public KPreferencesModule
{
Q_OBJECT
public:
- KViewPresenterConfModule( QObject * parent );
+ KViewPresenterConfModule( TQObject * parent );
~KViewPresenterConfModule();
signals:
@@ -38,10 +38,10 @@ class KViewPresenterConfModule : public KPreferencesModule
protected:
virtual void applyChanges();
virtual void reset();
- virtual void createPage( QFrame * page );
+ virtual void createPage( TQFrame * page );
private:
- QCheckBox * m_pCheckBox;
+ TQCheckBox * m_pCheckBox;
};
// vim:sw=4:ts=4
diff --git a/kview/modules/scale/kfloatspinbox.cpp b/kview/modules/scale/kfloatspinbox.cpp
index e5ce8465..936713f6 100644
--- a/kview/modules/scale/kfloatspinbox.cpp
+++ b/kview/modules/scale/kfloatspinbox.cpp
@@ -21,7 +21,7 @@
#include "kfloatspinbox.h"
#if defined(QT_ACCESSIBILITY_SUPPORT)
-#include <qaccessible.h>
+#include <tqaccessible.h>
#endif
#include <knumvalidator.h>
@@ -37,12 +37,12 @@ int pow( int a, int b )
return ret;
}
-KFloatSpinBox::KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, QWidget * parent, const char * name )
- : QSpinBox( parent, name )
+KFloatSpinBox::KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, TQWidget * parent, const char * name )
+ : TQSpinBox( parent, name )
, m_doselection( true )
{
setRange( minValue, maxValue, step, precision );
- connect( this, SIGNAL( valueChanged( int ) ), this, SLOT( slotValueChanged( int ) ) );
+ connect( this, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotValueChanged( int ) ) );
}
KFloatSpinBox::~KFloatSpinBox()
@@ -55,7 +55,7 @@ void KFloatSpinBox::setRange( float minValue, float maxValue, float step, unsign
m_min = (int)( minValue * m_factor );
m_max = (int)( maxValue * m_factor );
m_step = (int)( step * m_factor );
- QSpinBox::setRange( m_min, m_max );
+ TQSpinBox::setRange( m_min, m_max );
setSteps( m_step, m_step * 10 );
if( precision == 0 )
setValidator( new KIntValidator( m_min, m_max, this, 10, "KFloatValidator::KIntValidator" ) );
@@ -65,14 +65,14 @@ void KFloatSpinBox::setRange( float minValue, float maxValue, float step, unsign
float KFloatSpinBox::value() const
{
- float ret = (float)QSpinBox::value() / m_factor;
+ float ret = (float)TQSpinBox::value() / m_factor;
kdDebug( 4630 ) << ret << endl;
return ret;
}
void KFloatSpinBox::setValue( float value )
{
- QSpinBox::setValue( (int)( value * m_factor ) );
+ TQSpinBox::setValue( (int)( value * m_factor ) );
}
void KFloatSpinBox::setValueBlocking( float value )
@@ -84,7 +84,7 @@ void KFloatSpinBox::setValueBlocking( float value )
m_doselection = true;
}
-QString KFloatSpinBox::mapValueToText( int value )
+TQString KFloatSpinBox::mapValueToText( int value )
{
return KGlobal::locale()->formatNumber( (float)value / (float)m_factor, 4 );
}
@@ -97,13 +97,13 @@ int KFloatSpinBox::mapTextToValue( bool * ok )
void KFloatSpinBox::valueChange()
{
if( m_doselection )
- QSpinBox::valueChange();
+ TQSpinBox::valueChange();
else
{
updateDisplay();
emit valueChanged( value() );
#if defined(QT_ACCESSIBILITY_SUPPORT)
- QAccessible::updateAccessibility( this, 0, QAccessible::ValueChanged );
+ TQAccessible::updateAccessibility( this, 0, TQAccessible::ValueChanged );
#endif
}
}
diff --git a/kview/modules/scale/kfloatspinbox.h b/kview/modules/scale/kfloatspinbox.h
index 9407a0f1..6424df38 100644
--- a/kview/modules/scale/kfloatspinbox.h
+++ b/kview/modules/scale/kfloatspinbox.h
@@ -21,13 +21,13 @@
#ifndef __kfloatspinbox_h_
#define __kfloatspinbox_h_
-#include <qspinbox.h>
+#include <tqspinbox.h>
class KFloatSpinBox : public QSpinBox
{
Q_OBJECT
public:
- KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, QWidget * parent = 0, const char * name = 0 );
+ KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, TQWidget * parent = 0, const char * name = 0 );
virtual ~KFloatSpinBox();
void setRange( float minValue, float maxValue, float step, unsigned int precision );
@@ -43,7 +43,7 @@ class KFloatSpinBox : public QSpinBox
virtual void setValueBlocking( float value );
protected:
- virtual QString mapValueToText( int value );
+ virtual TQString mapValueToText( int value );
virtual int mapTextToValue( bool * ok );
virtual void valueChange();
diff --git a/kview/modules/scale/kview_scale.cpp b/kview/modules/scale/kview_scale.cpp
index aa8dec82..29e71b13 100644
--- a/kview/modules/scale/kview_scale.cpp
+++ b/kview/modules/scale/kview_scale.cpp
@@ -21,8 +21,8 @@
#include "kview_scale.h"
#include "scaledlg.h"
-#include <qimage.h>
-#include <qvbox.h>
+#include <tqimage.h>
+#include <tqvbox.h>
#include <kaction.h>
#include <klocale.h>
@@ -35,7 +35,7 @@
typedef KGenericFactory<KViewScale> KViewScaleFactory;
K_EXPORT_COMPONENT_FACTORY( kview_scale, KViewScaleFactory( "kview_scale" ) )
-KViewScale::KViewScale( QObject* parent, const char* name, const QStringList & )
+KViewScale::KViewScale( TQObject* parent, const char* name, const TQStringList & )
: Plugin( parent, name )
, m_pViewer( 0 )
, m_pCanvas( 0 )
@@ -47,7 +47,7 @@ KViewScale::KViewScale( QObject* parent, const char* name, const QStringList & )
m_pCanvas = m_pViewer->canvas();
(void) new KAction( i18n( "&Scale Image..." ), 0, 0,
- this, SLOT( slotScaleDlg() ),
+ this, TQT_SLOT( slotScaleDlg() ),
actionCollection(), "plugin_scale" );
}
else
@@ -64,36 +64,36 @@ void KViewScale::slotScaleDlg()
KDialogBase dlg( m_pViewer->widget(), "KView scale dialog", true, i18n( "Scale Image" ), KDialogBase::Ok|KDialogBase::Cancel );
ScaleDlg widget( m_pCanvas->imageSize(), dlg.makeVBoxMainWidget() );
#if 0
- QVBox * layout = dlg.makeVBoxMainWidget();
+ TQVBox * layout = dlg.makeVBoxMainWidget();
- QGroupBox * pixelgroup = new QGroupBox( i18n( "Pixel Dimensions" ), layout );
- QGridLayout * pixelgroupgrid = new QGridLayout( pixelgroup, 1, 1, 0, KDialog::spacingHint() );
+ TQGroupBox * pixelgroup = new TQGroupBox( i18n( "Pixel Dimensions" ), layout );
+ TQGridLayout * pixelgroupgrid = new TQGridLayout( pixelgroup, 1, 1, 0, KDialog::spacingHint() );
pixelgroupgrid->setSpacing( KDialog::spacingHint() );
pixelgroupgrid->setMargin( KDialog::marginHint() );
- QLabel * label;
- QSize imagesize = m_pCanvas->imageSize();
+ TQLabel * label;
+ TQSize imagesize = m_pCanvas->imageSize();
// show original width
- label = new QLabel( i18n( "Original width:" ), pixelgroup );
- label->setAlignment( QLabel::AlignRight );
+ label = new TQLabel( i18n( "Original width:" ), pixelgroup );
+ label->setAlignment( TQLabel::AlignRight );
pixelgroupgrid->addWidget( label, 0, 0 );
- pixelgroupgrid->addWidget( new QLabel( QString::number( imagesize.width() ), pixelgroup ), 0, 1 );
- label = new QLabel( i18n( "Height:" ), pixelgroup );
- label->setAlignment( QLabel::AlignRight );
+ pixelgroupgrid->addWidget( new TQLabel( TQString::number( imagesize.width() ), pixelgroup ), 0, 1 );
+ label = new TQLabel( i18n( "Height:" ), pixelgroup );
+ label->setAlignment( TQLabel::AlignRight );
pixelgroupgrid->addWidget( label, 1, 0 );
- pixelgroupgrid->addWidget( new QLabel( QString::number( imagesize.height() ), pixelgroup ), 1, 1 );
+ pixelgroupgrid->addWidget( new TQLabel( TQString::number( imagesize.height() ), pixelgroup ), 1, 1 );
pixelgroupgrid->addRowSpacing( 2, KDialog::spacingHint() );
- label = new QLabel( i18n( "New width:" ), pixelgroup );
- label->setAlignment( QLabel::AlignRight );
+ label = new TQLabel( i18n( "New width:" ), pixelgroup );
+ label->setAlignment( TQLabel::AlignRight );
pixelgroupgrid->addWidget( label, 3, 0 );
- label = new QLabel( i18n( "Height:" ), pixelgroup );
- label->setAlignment( QLabel::AlignRight );
+ label = new TQLabel( i18n( "Height:" ), pixelgroup );
+ label->setAlignment( TQLabel::AlignRight );
pixelgroupgrid->addWidget( label, 4, 0 );
- QSpinBox * newwidth = new QSpinBox( 1, 100000, 1, pixelgroup );
+ TQSpinBox * newwidth = new TQSpinBox( 1, 100000, 1, pixelgroup );
pixelgroupgrid->addWidget( newwidth, 3, 1 );
- QSpinBox * newheight = new QSpinBox( 1, 100000, 1, pixelgroup );
+ TQSpinBox * newheight = new TQSpinBox( 1, 100000, 1, pixelgroup );
pixelgroupgrid->addWidget( newheight, 4, 1 );
KComboBox * newsizeunit = new KComboBox( pixelgroup );
newsizeunit->insertItem( i18n( "px" ) );
@@ -102,34 +102,34 @@ void KViewScale::slotScaleDlg()
pixelgroupgrid->addRowSpacing( 5, KDialog::spacingHint() );
- label = new QLabel( i18n( "Ratio X:" ), pixelgroup );
- label->setAlignment( QLabel::AlignRight );
+ label = new TQLabel( i18n( "Ratio X:" ), pixelgroup );
+ label->setAlignment( TQLabel::AlignRight );
pixelgroupgrid->addWidget( label, 6, 0 );
- label = new QLabel( i18n( "Y:" ), pixelgroup );
- label->setAlignment( QLabel::AlignRight );
+ label = new TQLabel( i18n( "Y:" ), pixelgroup );
+ label->setAlignment( TQLabel::AlignRight );
pixelgroupgrid->addWidget( label, 7, 0 );
- QSpinBox * ratiox = new QSpinBox( pixelgroup );
- ratiox->setValidator( new QDoubleValidator( 0.0001, 10000, 4, ratiox ) );
+ TQSpinBox * ratiox = new TQSpinBox( pixelgroup );
+ ratiox->setValidator( new TQDoubleValidator( 0.0001, 10000, 4, ratiox ) );
pixelgroupgrid->addWidget( ratiox, 6, 1 );
- QSpinBox * ratioy = new QSpinBox( pixelgroup );
- ratioy->setValidator( new QDoubleValidator( 0.0001, 10000, 4, ratioy ) );
+ TQSpinBox * ratioy = new TQSpinBox( pixelgroup );
+ ratioy->setValidator( new TQDoubleValidator( 0.0001, 10000, 4, ratioy ) );
pixelgroupgrid->addWidget( ratioy, 7, 1 );
- pixelgroupgrid->addMultiCellWidget( new QCheckBox( i18n( "Link" ), pixelgroup ), 6, 7, 2, 2, Qt::AlignVCenter );
+ pixelgroupgrid->addMultiCellWidget( new TQCheckBox( i18n( "Link" ), pixelgroup ), 6, 7, 2, 2, Qt::AlignVCenter );
- QGroupBox * printgroup = new QGroupBox( i18n( "Print Size && Display Units" ), layout );
- QGridLayout * printgroupgrid = new QGridLayout( printgroup, 1, 1, 0, KDialog::spacingHint() );
+ TQGroupBox * printgroup = new TQGroupBox( i18n( "Print Size && Display Units" ), layout );
+ TQGridLayout * printgroupgrid = new TQGridLayout( printgroup, 1, 1, 0, KDialog::spacingHint() );
printgroupgrid->setSpacing( KDialog::spacingHint() );
printgroupgrid->setMargin( KDialog::marginHint() );
- label = new QLabel( i18n( "New width:" ), printgroup );
- label->setAlignment( QLabel::AlignRight );
+ label = new TQLabel( i18n( "New width:" ), printgroup );
+ label->setAlignment( TQLabel::AlignRight );
printgroupgrid->addWidget( label, 0, 0 );
- label = new QLabel( i18n( "Height:" ), printgroup );
- label->setAlignment( QLabel::AlignRight );
+ label = new TQLabel( i18n( "Height:" ), printgroup );
+ label->setAlignment( TQLabel::AlignRight );
printgroupgrid->addWidget( label, 1, 0 );
- QSpinBox * newwidth2 = new QSpinBox( printgroup );
+ TQSpinBox * newwidth2 = new TQSpinBox( printgroup );
printgroupgrid->addWidget( newwidth2, 0, 1 );
- QSpinBox * newheight2 = new QSpinBox( printgroup );
+ TQSpinBox * newheight2 = new TQSpinBox( printgroup );
printgroupgrid->addWidget( newheight2, 1, 1 );
KComboBox * newsizeunit2 = new KComboBox( printgroup );
newsizeunit2->insertItem( i18n( "in" ) );
@@ -138,17 +138,17 @@ void KViewScale::slotScaleDlg()
printgroupgrid->addRowSpacing( 2, KDialog::spacingHint() );
- label = new QLabel( i18n( "Resolution X:" ), printgroup );
- label->setAlignment( QLabel::AlignRight );
+ label = new TQLabel( i18n( "Resolution X:" ), printgroup );
+ label->setAlignment( TQLabel::AlignRight );
printgroupgrid->addWidget( label, 3, 0 );
- label = new QLabel( i18n( "Y:" ), printgroup );
- label->setAlignment( QLabel::AlignRight );
+ label = new TQLabel( i18n( "Y:" ), printgroup );
+ label->setAlignment( TQLabel::AlignRight );
printgroupgrid->addWidget( label, 4, 0 );
- QSpinBox * resx = new QSpinBox( printgroup );
+ TQSpinBox * resx = new TQSpinBox( printgroup );
printgroupgrid->addWidget( resx, 3, 1 );
- QSpinBox * resy = new QSpinBox( printgroup );
+ TQSpinBox * resy = new TQSpinBox( printgroup );
printgroupgrid->addWidget( resy, 4, 1 );
- printgroupgrid->addMultiCellWidget( new QCheckBox( i18n( "Link" ), printgroup ), 3, 4, 2, 2, Qt::AlignVCenter );
+ printgroupgrid->addMultiCellWidget( new TQCheckBox( i18n( "Link" ), printgroup ), 3, 4, 2, 2, Qt::AlignVCenter );
//KComboBox * newsizeunit2 = new KComboBox( printgroup );
//newsizeunit2->insertItem( i18n( "in" ) );
//newsizeunit2->insertItem( i18n( "mm" ) );
@@ -162,12 +162,12 @@ void KViewScale::slotScale()
{
// retrieve current image
kdDebug( 4630 ) << "m_pCanvas = " << m_pCanvas << endl;
- const QImage * image = m_pCanvas->image();
+ const TQImage * image = m_pCanvas->image();
kdDebug( 4630 ) << "image pointer retrieved" << endl;
if( image )
{
// scale
- QImage newimage = image->smoothScale( 50, 50 );
+ TQImage newimage = image->smoothScale( 50, 50 );
// put back (modified)
m_pCanvas->setImage( newimage );
m_pViewer->setModified( true );
diff --git a/kview/modules/scale/kview_scale.h b/kview/modules/scale/kview_scale.h
index 2022f0ac..3ac45257 100644
--- a/kview/modules/scale/kview_scale.h
+++ b/kview/modules/scale/kview_scale.h
@@ -32,7 +32,7 @@ class KViewScale : public KParts::Plugin
{
Q_OBJECT
public:
- KViewScale( QObject* parent, const char* name, const QStringList & );
+ KViewScale( TQObject* parent, const char* name, const TQStringList & );
virtual ~KViewScale();
private slots:
diff --git a/kview/modules/scale/scaledlg.cpp b/kview/modules/scale/scaledlg.cpp
index 997be86d..929aafcd 100644
--- a/kview/modules/scale/scaledlg.cpp
+++ b/kview/modules/scale/scaledlg.cpp
@@ -20,13 +20,13 @@
#include "scaledlg.h"
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qsize.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqsize.h>
#include <kdebug.h>
#include <kcombobox.h>
@@ -37,8 +37,8 @@
#define ONEINCHINMM 2.54
-ScaleDlg::ScaleDlg( const QSize & origsize, QVBox * parent, const char * name )
- : QObject( parent, name )
+ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name )
+ : TQObject( parent, name )
, m_origsize( origsize )
, m_newsizeunit( 0 )
, m_newsizeunit2( 0 )
@@ -48,66 +48,66 @@ ScaleDlg::ScaleDlg( const QSize & origsize, QVBox * parent, const char * name )
, m_resx( 72 )
, m_resy( 72 )
{
- QGroupBox * pixelgroup = new QGroupBox( i18n( "Pixel Dimensions" ), parent );
- QGroupBox * printgroup = new QGroupBox( i18n( "Print Size && Display Units" ), parent );
+ TQGroupBox * pixelgroup = new TQGroupBox( i18n( "Pixel Dimensions" ), parent );
+ TQGroupBox * printgroup = new TQGroupBox( i18n( "Print Size && Display Units" ), parent );
- QGridLayout * pixelgroupgrid = new QGridLayout( pixelgroup, 1, 1,
+ TQGridLayout * pixelgroupgrid = new TQGridLayout( pixelgroup, 1, 1,
KDialog::marginHint(), KDialog::spacingHint() );
- QGridLayout * printgroupgrid = new QGridLayout( printgroup, 1, 1,
+ TQGridLayout * printgroupgrid = new TQGridLayout( printgroup, 1, 1,
KDialog::marginHint(), KDialog::spacingHint() );
- QLabel * label;
+ TQLabel * label;
pixelgroupgrid->addRowSpacing( 0, KDialog::spacingHint() );
- label = new QLabel( i18n( "Original width:" ), pixelgroup );
- label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ label = new TQLabel( i18n( "Original width:" ), pixelgroup );
+ label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
pixelgroupgrid->addWidget( label, 1, 0 );
- label = new QLabel( i18n( "Height:" ), pixelgroup );
- label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ label = new TQLabel( i18n( "Height:" ), pixelgroup );
+ label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
pixelgroupgrid->addWidget( label, 2, 0 );
pixelgroupgrid->addRowSpacing( 3, KDialog::spacingHint() );
- label = new QLabel( i18n( "New width:" ), pixelgroup );
- label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ label = new TQLabel( i18n( "New width:" ), pixelgroup );
+ label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
pixelgroupgrid->addWidget( label, 4, 0 );
- label = new QLabel( i18n( "Height:" ), pixelgroup );
- label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ label = new TQLabel( i18n( "Height:" ), pixelgroup );
+ label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
pixelgroupgrid->addWidget( label, 5, 0 );
pixelgroupgrid->addRowSpacing( 6, KDialog::spacingHint() );
- label = new QLabel( i18n( "Ratio X:" ), pixelgroup );
- label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ label = new TQLabel( i18n( "Ratio X:" ), pixelgroup );
+ label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
pixelgroupgrid->addWidget( label, 7, 0 );
- label = new QLabel( i18n( "Y:" ), pixelgroup );
- label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ label = new TQLabel( i18n( "Y:" ), pixelgroup );
+ label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
pixelgroupgrid->addWidget( label, 8, 0 );
printgroupgrid->addRowSpacing( 0, KDialog::spacingHint() );
- label = new QLabel( i18n( "New width:" ), printgroup );
- label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ label = new TQLabel( i18n( "New width:" ), printgroup );
+ label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
printgroupgrid->addWidget( label, 1, 0 );
- label = new QLabel( i18n( "Height:" ), printgroup );
- label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ label = new TQLabel( i18n( "Height:" ), printgroup );
+ label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
printgroupgrid->addWidget( label, 2, 0 );
printgroupgrid->addRowSpacing( 3, KDialog::spacingHint() );
- label = new QLabel( i18n( "Resolution X:" ), printgroup );
- label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ label = new TQLabel( i18n( "Resolution X:" ), printgroup );
+ label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
printgroupgrid->addWidget( label, 4, 0 );
- label = new QLabel( i18n( "Y:" ), printgroup );
- label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ label = new TQLabel( i18n( "Y:" ), printgroup );
+ label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
printgroupgrid->addWidget( label, 5, 0 );
- m_pOldWidth = new QLabel( QString::number( origsize.width() ), pixelgroup );
- m_pOldWidth->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ m_pOldWidth = new TQLabel( TQString::number( origsize.width() ), pixelgroup );
+ m_pOldWidth->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
pixelgroupgrid->addWidget( m_pOldWidth, 1, 1 );
- m_pOldHeight = new QLabel( QString::number( origsize.height() ), pixelgroup );
- m_pOldHeight->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ m_pOldHeight = new TQLabel( TQString::number( origsize.height() ), pixelgroup );
+ m_pOldHeight->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
pixelgroupgrid->addWidget( m_pOldHeight, 2, 1 );
m_pNewWidth = new KFloatSpinBox( 1.0, 100000.0, 10.0, 0, pixelgroup );
@@ -125,7 +125,7 @@ ScaleDlg::ScaleDlg( const QSize & origsize, QVBox * parent, const char * name )
m_pRatioY = new KFloatSpinBox( 0.0001, 10000.0, 0.1, 4, pixelgroup );
pixelgroupgrid->addWidget( m_pRatioY, 8, 1 );
- m_pLinkRatio = new QCheckBox( i18n( "Link" ), pixelgroup );
+ m_pLinkRatio = new TQCheckBox( i18n( "Link" ), pixelgroup );
pixelgroupgrid->addMultiCellWidget( m_pLinkRatio, 7, 8, 2, 2, Qt::AlignVCenter );
m_pNewWidth2 = new KFloatSpinBox( 0.0001, 10000.0, 0.1, 4, printgroup );
@@ -143,7 +143,7 @@ ScaleDlg::ScaleDlg( const QSize & origsize, QVBox * parent, const char * name )
m_pResolutionY = new KFloatSpinBox( 0.0001, 6000.0, 1.0, 4, printgroup );
printgroupgrid->addWidget( m_pResolutionY, 5, 1 );
- m_pLinkResolution = new QCheckBox( i18n( "Link" ), printgroup );
+ m_pLinkResolution = new TQCheckBox( i18n( "Link" ), printgroup );
printgroupgrid->addMultiCellWidget( m_pLinkResolution, 4, 5, 2, 2, Qt::AlignVCenter );
m_pResolutionUnit = new KComboBox( printgroup );
m_pResolutionUnit->insertItem( i18n( "pixels/in" ) );
@@ -157,16 +157,16 @@ ScaleDlg::ScaleDlg( const QSize & origsize, QVBox * parent, const char * name )
m_newsizeunit2 = 0;
m_resolutionunit = 0;
- connect( m_pNewWidth, SIGNAL( valueChanged( float ) ), SLOT( slotNewWidth( float ) ) );
- connect( m_pNewHeight, SIGNAL( valueChanged( float ) ), SLOT( slotNewHeight( float ) ) );
- connect( m_pNewWidth2, SIGNAL( valueChanged( float ) ), SLOT( slotNewWidth2( float ) ) );
- connect( m_pNewHeight2, SIGNAL( valueChanged( float ) ), SLOT( slotNewHeight2( float ) ) );
- connect( m_pResolutionX, SIGNAL( valueChanged( float ) ), SLOT( slotResolutionX( float ) ) );
- connect( m_pResolutionY, SIGNAL( valueChanged( float ) ), SLOT( slotResolutionY( float ) ) );
+ connect( m_pNewWidth, TQT_SIGNAL( valueChanged( float ) ), TQT_SLOT( slotNewWidth( float ) ) );
+ connect( m_pNewHeight, TQT_SIGNAL( valueChanged( float ) ), TQT_SLOT( slotNewHeight( float ) ) );
+ connect( m_pNewWidth2, TQT_SIGNAL( valueChanged( float ) ), TQT_SLOT( slotNewWidth2( float ) ) );
+ connect( m_pNewHeight2, TQT_SIGNAL( valueChanged( float ) ), TQT_SLOT( slotNewHeight2( float ) ) );
+ connect( m_pResolutionX, TQT_SIGNAL( valueChanged( float ) ), TQT_SLOT( slotResolutionX( float ) ) );
+ connect( m_pResolutionY, TQT_SIGNAL( valueChanged( float ) ), TQT_SLOT( slotResolutionY( float ) ) );
- connect( m_pNewSizeUnit, SIGNAL( activated( int ) ), SLOT( slotChangeNewSizeUnit( int ) ) );
- connect( m_pNewSizeUnit2, SIGNAL( activated( int ) ), SLOT( slotChangeNewSizeUnit2( int ) ) );
- connect( m_pResolutionUnit, SIGNAL( activated( int ) ), SLOT( slotChangeResolutionUnit( int ) ) );
+ connect( m_pNewSizeUnit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotChangeNewSizeUnit( int ) ) );
+ connect( m_pNewSizeUnit2, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotChangeNewSizeUnit2( int ) ) );
+ connect( m_pResolutionUnit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotChangeResolutionUnit( int ) ) );
}
ScaleDlg::~ScaleDlg()
diff --git a/kview/modules/scale/scaledlg.h b/kview/modules/scale/scaledlg.h
index ac5a6c44..71fa23d5 100644
--- a/kview/modules/scale/scaledlg.h
+++ b/kview/modules/scale/scaledlg.h
@@ -21,20 +21,20 @@
#ifndef __scaledlg_h_
#define __scaledlg_h_
-#include <qobject.h>
+#include <tqobject.h>
-class QLabel;
+class TQLabel;
class KFloatSpinBox;
class KComboBox;
-class QCheckBox;
-class QVBox;
-class QSize;
+class TQCheckBox;
+class TQVBox;
+class TQSize;
class ScaleDlg : public QObject
{
Q_OBJECT
public:
- ScaleDlg( const QSize & originalsize, QVBox * parent, const char * name = 0 );
+ ScaleDlg( const TQSize & originalsize, TQVBox * parent, const char * name = 0 );
~ScaleDlg();
private slots:
@@ -49,7 +49,7 @@ class ScaleDlg : public QObject
void slotChangeResolutionUnit( int );
private:
- QSize m_origsize;
+ TQSize m_origsize;
int m_newsizeunit;
int m_newsizeunit2;
int m_resolutionunit;
@@ -57,21 +57,21 @@ class ScaleDlg : public QObject
float m_newwidth, m_newheight; // in Pixel
float m_resx, m_resy; // in dpi
- QLabel * m_pOldWidth;
- QLabel * m_pOldHeight;
+ TQLabel * m_pOldWidth;
+ TQLabel * m_pOldHeight;
KFloatSpinBox * m_pNewWidth;
KFloatSpinBox * m_pNewHeight;
KComboBox * m_pNewSizeUnit;
KFloatSpinBox * m_pRatioX;
KFloatSpinBox * m_pRatioY;
- QCheckBox * m_pLinkRatio;
+ TQCheckBox * m_pLinkRatio;
KFloatSpinBox * m_pNewWidth2;
KFloatSpinBox * m_pNewHeight2;
KComboBox * m_pNewSizeUnit2;
KFloatSpinBox * m_pResolutionX;
KFloatSpinBox * m_pResolutionY;
- QCheckBox * m_pLinkResolution;
+ TQCheckBox * m_pLinkResolution;
KComboBox * m_pResolutionUnit;
};
diff --git a/kview/modules/scanner/kviewscanner.cpp b/kview/modules/scanner/kviewscanner.cpp
index d1f96e5f..bf99e282 100644
--- a/kview/modules/scanner/kviewscanner.cpp
+++ b/kview/modules/scanner/kviewscanner.cpp
@@ -20,8 +20,8 @@
#include "kviewscanner.h"
-#include <qimage.h>
-#include <qobjectlist.h>
+#include <tqimage.h>
+#include <tqobjectlist.h>
#include <kaction.h>
#include <kinstance.h>
@@ -35,19 +35,19 @@
typedef KGenericFactory<KViewScanner> KViewScannerFactory;
K_EXPORT_COMPONENT_FACTORY( kview_scannerplugin, KViewScannerFactory( "kviewscannerplugin" ) )
-KViewScanner::KViewScanner( QObject* parent, const char* name,
- const QStringList & )
+KViewScanner::KViewScanner( TQObject* parent, const char* name,
+ const TQStringList & )
: Plugin( parent, name ),
m_pScandlg( 0 ),
m_pViewer( 0 )
{
- QObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false );
+ TQObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false );
m_pViewer = static_cast<KImageViewer::Viewer *>( viewerList->getFirst() );
delete viewerList;
if( m_pViewer )
{
(void) new KAction( i18n( "&Scan Image..." ), "scanner", 0,
- this, SLOT( slotScan() ),
+ this, TQT_SLOT( slotScan() ),
actionCollection(), "plugin_scan" );
}
else
@@ -67,8 +67,8 @@ void KViewScanner::slotScan()
{
m_pScandlg->setMinimumSize( 300, 300 );
- connect( m_pScandlg, SIGNAL( finalImage( const QImage &, int ) ),
- this, SLOT( slotImgScanned( const QImage & ) ) );
+ connect( m_pScandlg, TQT_SIGNAL( finalImage( const TQImage &, int ) ),
+ this, TQT_SLOT( slotImgScanned( const TQImage & ) ) );
}
else
{
@@ -86,7 +86,7 @@ void KViewScanner::slotScan()
m_pScandlg->show();
}
-void KViewScanner::slotImgScanned( const QImage & img )
+void KViewScanner::slotImgScanned( const TQImage & img )
{
kdDebug( 4630 ) << "received an image from the scanner" << endl;
m_pViewer->newImage( img );
diff --git a/kview/modules/scanner/kviewscanner.h b/kview/modules/scanner/kviewscanner.h
index cdb32d67..56b59472 100644
--- a/kview/modules/scanner/kviewscanner.h
+++ b/kview/modules/scanner/kviewscanner.h
@@ -32,14 +32,14 @@ class KViewScanner : public KParts::Plugin
{
Q_OBJECT
public:
- KViewScanner( QObject* parent, const char* name, const QStringList & );
+ KViewScanner( TQObject* parent, const char* name, const TQStringList & );
virtual ~KViewScanner();
//public slots:
private slots:
void slotScan();
- void slotImgScanned( const QImage & );
+ void slotImgScanned( const TQImage & );
private:
KScanDialog * m_pScandlg;
diff --git a/kview/modules/template/kviewtemplate.cpp b/kview/modules/template/kviewtemplate.cpp
index c8c6dc9d..f8277162 100644
--- a/kview/modules/template/kviewtemplate.cpp
+++ b/kview/modules/template/kviewtemplate.cpp
@@ -4,7 +4,7 @@
#include "kviewtemplate.h"
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
#include <kaction.h>
/*#include <klocale.h>*/
@@ -15,16 +15,16 @@
typedef KGenericFactory<KViewTemplate> KViewTemplateFactory;
K_EXPORT_COMPONENT_FACTORY( kview_templateplugin, KViewTemplateFactory( "kviewtemplateplugin" ) )
-KViewTemplate::KViewTemplate( QObject* parent, const char* name, const QStringList & )
+KViewTemplate::KViewTemplate( TQObject* parent, const char* name, const TQStringList & )
: Plugin( parent, name )
{
- QObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false );
+ TQObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false );
m_pViewer = static_cast<KImageViewer::Viewer *>( viewerList->getFirst() );
delete viewerList;
if( m_pViewer )
{
(void) new KAction( /*i18n(*/ "&Do Something" /*)*/, 0, 0,
- this, SLOT( yourSlot() ),
+ this, TQT_SLOT( yourSlot() ),
actionCollection(), "plugin_template" );
}
else
diff --git a/kview/modules/template/kviewtemplate.h b/kview/modules/template/kviewtemplate.h
index 1d158b05..5d49890e 100644
--- a/kview/modules/template/kviewtemplate.h
+++ b/kview/modules/template/kviewtemplate.h
@@ -13,7 +13,7 @@ class KViewTemplate : public KParts::Plugin
{
Q_OBJECT
public:
- KViewTemplate( QObject* parent, const char* name, const QStringList & );
+ KViewTemplate( TQObject* parent, const char* name, const TQStringList & );
virtual ~KViewTemplate();
private slots:
diff --git a/kview/photobook/photobook.cpp b/kview/photobook/photobook.cpp
index 082bfd49..2558279a 100644
--- a/kview/photobook/photobook.cpp
+++ b/kview/photobook/photobook.cpp
@@ -44,30 +44,30 @@ Copyright (c) 2004,2005 Charles Samuels <charles@kde.org>
#include <kstdaccel.h>
#include <kstandarddirs.h>
-Previews::Previews(PhotoBook *parent, const QStringList &mimetypes)
+Previews::Previews(PhotoBook *parent, const TQStringList &mimetypes)
: KFileIconView(parent, 0)
{
mPhotoBook = parent;
mMimeTypes = mimetypes;
- connect(&mDirLister, SIGNAL(clear()), SLOT(slotClearView()));
- connect(&mDirLister, SIGNAL(completed()), SLOT(doneListing()));
+ connect(&mDirLister, TQT_SIGNAL(clear()), TQT_SLOT(slotClearView()));
+ connect(&mDirLister, TQT_SIGNAL(completed()), TQT_SLOT(doneListing()));
connect(
- &mDirLister, SIGNAL(newItems(const KFileItemList &)),
- SLOT(insertNewFiles(const KFileItemList &))
+ &mDirLister, TQT_SIGNAL(newItems(const KFileItemList &)),
+ TQT_SLOT(insertNewFiles(const KFileItemList &))
);
connect(
- signaler(), SIGNAL(fileSelected(const KFileItem*)),
- SLOT(open(const KFileItem*))
+ signaler(), TQT_SIGNAL(fileSelected(const KFileItem*)),
+ TQT_SLOT(open(const KFileItem*))
);
connect(
- &mDirLister, SIGNAL(deleteItem(KFileItem *)),
- SLOT(removeItem(KFileItem *))
+ &mDirLister, TQT_SIGNAL(deleteItem(KFileItem *)),
+ TQT_SLOT(removeItem(KFileItem *))
);
connect(
- &mDirLister, SIGNAL( refreshItems( const KFileItemList& ) ),
- SLOT( slotRefreshItems( const KFileItemList& ) )
+ &mDirLister, TQT_SIGNAL( refreshItems( const KFileItemList& ) ),
+ TQT_SLOT( slotRefreshItems( const KFileItemList& ) )
);
setFixedWidth(128);
@@ -136,7 +136,7 @@ void Previews::open(const KFileItem *item)
void Previews::doneListing()
{
// eep! -- this should not be necessary
- QTimer::singleShot(0, this, SLOT(goToFirst()));
+ TQTimer::singleShot(0, this, TQT_SLOT(goToFirst()));
}
void Previews::goToFirst()
@@ -149,15 +149,15 @@ void Previews::goToFirst()
-PhotoBook::PhotoBook(QWidget *parent, PhotoBookPart *part, const char *name)
- : QSplitter(parent, name)
+PhotoBook::PhotoBook(TQWidget *parent, PhotoBookPart *part, const char *name)
+ : TQSplitter(parent, name)
{
- QStringList mimetypes;
+ TQStringList mimetypes;
KTrader::OfferList offers = KTrader::self()->query(
"KImageViewer/Viewer", "KParts/ReadOnlyPart",
- "DesktopEntryName == 'kviewviewer'", QString::null
+ "DesktopEntryName == 'kviewviewer'", TQString::null
);
for (
@@ -174,7 +174,7 @@ PhotoBook::PhotoBook(QWidget *parent, PhotoBookPart *part, const char *name)
{
KSimpleConfig e(locate("services", service->desktopEntryPath()));
e.setGroup("Desktop Entry");
- mimetypes = QStringList::split(';', e.readEntry("MimeType"));
+ mimetypes = TQStringList::split(';', e.readEntry("MimeType"));
break;
}
}
@@ -184,8 +184,8 @@ PhotoBook::PhotoBook(QWidget *parent, PhotoBookPart *part, const char *name)
mFit = mViewer->action("fittowin");
- connect(mList, SIGNAL(open(const KURL&)), mViewer, SLOT(openURL(const KURL&)));
- connect(mViewer, SIGNAL(completed()), mFit, SLOT(activate()));
+ connect(mList, TQT_SIGNAL(open(const KURL&)), mViewer, TQT_SLOT(openURL(const KURL&)));
+ connect(mViewer, TQT_SIGNAL(completed()), mFit, TQT_SLOT(activate()));
part->insertChildClient(mViewer);
}
@@ -220,9 +220,9 @@ void PhotoBook::updateButton( bool nextExist, bool previousExit)
K_EXPORT_COMPONENT_FACTORY(libphotobook, PhotoBookFactory )
PhotoBookPart::PhotoBookPart(
- QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QStringList&
+ TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQStringList&
)
: KParts::ReadOnlyPart(parent, name)
{
@@ -233,11 +233,11 @@ PhotoBookPart::PhotoBookPart(
setWidget(bv);
connect(
- bv, SIGNAL(emitUpdateButton(bool, bool)),
- this, SLOT(slotUpdateButton(bool, bool))
+ bv, TQT_SIGNAL(emitUpdateButton(bool, bool)),
+ this, TQT_SLOT(slotUpdateButton(bool, bool))
);
- m_pNextAction = KStdAction::next(bv, SLOT(next()), actionCollection(), "next");
- m_pPreviousAction = KStdAction::prior(bv, SLOT(previous()), actionCollection(), "previous");
+ m_pNextAction = KStdAction::next(bv, TQT_SLOT(next()), actionCollection(), "next");
+ m_pPreviousAction = KStdAction::prior(bv, TQT_SLOT(previous()), actionCollection(), "previous");
setXMLFile( "photobookui.rc" );
diff --git a/kview/photobook/photobook.h b/kview/photobook/photobook.h
index 3da5cf78..adae0e23 100644
--- a/kview/photobook/photobook.h
+++ b/kview/photobook/photobook.h
@@ -39,7 +39,7 @@ Copyright (c) 2004 Charles Samuels <charles@kde.org>
#ifndef PHOTOBOOK_H
#define PHOTOBOOK_H
-#include <qsplitter.h>
+#include <tqsplitter.h>
#include <kfileiconview.h>
#include <kdirlister.h>
@@ -58,7 +58,7 @@ Q_OBJECT
KParts::ReadOnlyPart *mViewer;
public:
- PhotoBook(QWidget *parent, PhotoBookPart *part, const char *name=0);
+ PhotoBook(TQWidget *parent, PhotoBookPart *part, const char *name=0);
void openURL(const KURL &url);
void updateButton(bool, bool );
@@ -76,10 +76,10 @@ Q_OBJECT
KDirLister mDirLister;
PhotoBook *mPhotoBook;
- QStringList mMimeTypes;
+ TQStringList mMimeTypes;
public:
- Previews(PhotoBook *parent, const QStringList &mimetypes);
+ Previews(PhotoBook *parent, const TQStringList &mimetypes);
~Previews();
void openURL(const KURL &url);
@@ -112,9 +112,9 @@ Q_OBJECT
public:
PhotoBookPart(
- QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name=0,
- const QStringList& args = QStringList()
+ TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name=0,
+ const TQStringList& args = TQStringList()
);
~PhotoBookPart();
diff --git a/kviewshell/bookmark.h b/kviewshell/bookmark.h
index 1df245fb..a1a310fb 100644
--- a/kviewshell/bookmark.h
+++ b/kviewshell/bookmark.h
@@ -24,8 +24,8 @@
#include "anchor.h"
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
/** \brief Bookmark
@@ -54,13 +54,13 @@ class Bookmark {
@param pos an Anchor that specifies the position of the bookmark
*/
- Bookmark(const QString &text, const Anchor &pos) {
+ Bookmark(const TQString &text, const Anchor &pos) {
Bookmark();
bookmarkText = text;
position = pos;
}
- /** Convenience funtion, behaves as Bookmark(const QString &text, const Anchor &pos)
+ /** Convenience funtion, behaves as Bookmark(const TQString &text, const Anchor &pos)
@param text name of the bookmark, as it appears in the GUI
@@ -70,7 +70,7 @@ class Bookmark {
@param distance_from_top position on the page, distance from
top of the page
*/
- Bookmark(const QString& text, const PageNumber& page, const Length& distance_from_top) {
+ Bookmark(const TQString& text, const PageNumber& page, const Length& distance_from_top) {
Bookmark();
bookmarkText = text;
position.page = page;
@@ -79,7 +79,7 @@ class Bookmark {
/** Label of the bookmark as it will appear in the GUI to the user,
such as "Section 1", "Theorem 12", etc. */
- QString bookmarkText;
+ TQString bookmarkText;
/** The anchor that specifies the position of the bookmark */
Anchor position;
@@ -95,7 +95,7 @@ class Bookmark {
true. Thus, extra care must be taken when copying this
list. Otherwise, a segfault could result.
*/
- QPtrList<Bookmark> subordinateBookmarks;
+ TQPtrList<Bookmark> subordinateBookmarks;
// Returns true if the bookmark is valid, false otherwise. A
// bookmark is valid if the text is not empty and the anchor is
diff --git a/kviewshell/documentPageCache.cpp b/kviewshell/documentPageCache.cpp
index 2c9a46a5..b2322321 100644
--- a/kviewshell/documentPageCache.cpp
+++ b/kviewshell/documentPageCache.cpp
@@ -9,7 +9,7 @@
#include <config.h>
#include <kdebug.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include "documentPageCache.h"
#include "documentRenderer.h"
@@ -79,16 +79,16 @@ void DocumentPageCache::setResolution(double res)
resolutionInDPI = res;
}
-QSize DocumentPageCache::sizeOfPageInPixel(const PageNumber& pg) const
+TQSize DocumentPageCache::sizeOfPageInPixel(const PageNumber& pg) const
{
// Paranoid safety checks
if (renderer.isNull()) {
kdError(1223) << "DocumentPageCache::sizeOfPageInPixel( " << pg << " ) called but no renderer was set" << endl;
- return QSize();
+ return TQSize();
}
if (!pg.isValid()) {
kdError(1223) << "DocumentPageCache::sizeOfPageInPixel( " << pg << " ) called with invalid argument" << endl;
- return QSize();
+ return TQSize();
}
SimplePageSize ps = sizeOfPage(pg);
@@ -98,7 +98,7 @@ QSize DocumentPageCache::sizeOfPageInPixel(const PageNumber& pg) const
}
-bool DocumentPageCache::isPageCached(const PageNumber& pageNumber, const QSize& size)
+bool DocumentPageCache::isPageCached(const PageNumber& pageNumber, const TQSize& size)
{
// Paranoid checks
if (renderer.isNull()) {
@@ -115,7 +115,7 @@ bool DocumentPageCache::isPageCached(const PageNumber& pageNumber, const QSize&
return false;
}
- QString key = createKey(pageNumber, size);
+ TQString key = createKey(pageNumber, size);
// Check if the page that we are looking for is in the cache.
// We are not accessing the page, so we don't want it to be moved into the front.
@@ -127,24 +127,24 @@ bool DocumentPageCache::isPageCached(const PageNumber& pageNumber, const QSize&
return false;
}
-QString DocumentPageCache::createKey(const PageNumber& pageNumber, const QSize& size)
+TQString DocumentPageCache::createKey(const PageNumber& pageNumber, const TQSize& size)
{
- QString key;
+ TQString key;
- key = QString::number(pageNumber) + ":" +
- QString::number(size.width()) + ":" + QString::number(size.height());
+ key = TQString::number(pageNumber) + ":" +
+ TQString::number(size.width()) + ":" + TQString::number(size.height());
return key;
}
-QString DocumentPageCache::createKey(const PageNumber& pageNumber)
+TQString DocumentPageCache::createKey(const PageNumber& pageNumber)
{
- QSize pageSize = sizeOfPageInPixel(pageNumber);
+ TQSize pageSize = sizeOfPageInPixel(pageNumber);
- QString key;
+ TQString key;
- key = QString::number(pageNumber) + ":" +
- QString::number(pageSize.width()) + ":" + QString::number(pageSize.height());
+ key = TQString::number(pageNumber) + ":" +
+ TQString::number(pageSize.width()) + ":" + TQString::number(pageSize.height());
return key;
}
@@ -214,9 +214,9 @@ RenderedDocumentPagePixmap* DocumentPageCache::getPage(const PageNumber& pageNr)
if (resolutionInDPI > 0.0)
{
page->resize(sizeOfPageInPixel(pageNr));
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
renderer->drawPage(resolutionInDPI, page);
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
// We always set the cache capacity to be at least n times the cost of the page we want to insert.
// Where n is the number of pages that can be visible at the same time at very high zoomlevels.
@@ -284,7 +284,7 @@ void DocumentPageCache::setUseDocumentSpecifiedSize(bool b)
}
-QPixmap DocumentPageCache::createThumbnail(const PageNumber& pageNr, int width)
+TQPixmap DocumentPageCache::createThumbnail(const PageNumber& pageNr, int width)
{
// Paranoid checks
if (renderer.isNull()) {
diff --git a/kviewshell/documentPageCache.h b/kviewshell/documentPageCache.h
index c885123a..8477d152 100644
--- a/kviewshell/documentPageCache.h
+++ b/kviewshell/documentPageCache.h
@@ -15,12 +15,12 @@
#include "pageSize.h"
#include "selection.h"
-#include <qcache.h>
-#include <qguardedptr.h>
-#include <qobject.h>
+#include <tqcache.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
class DocumentRenderer;
-class QPixmap;
+class TQPixmap;
class RenderedDocumentPage;
@@ -56,7 +56,7 @@ class DocumentPageCache: public QObject
set with setResolution(). If the document does not specify a
size (which happens, e.g., for some DVI-files), the
userPreferredSize is used. */
- QSize sizeOfPageInPixel(const PageNumber& page) const;
+ TQSize sizeOfPageInPixel(const PageNumber& page) const;
/** Returns a pointer to a documentPage structure, or 0, if the
documentPage could not be generated for some reason (e.g.,
@@ -64,16 +64,16 @@ class DocumentPageCache: public QObject
RenderedDocumentPagePixmap* getPage(const PageNumber& pageNr);
/** Checks if the given page is already in the cache. */
- bool isPageCached(const PageNumber& pageNumber, const QSize& size);
+ bool isPageCached(const PageNumber& pageNumber, const TQSize& size);
/** Checks if the given page is already in the cache. Here we don't care about the size
of the page. */
bool isPageCached(const PageNumber& pageNumber);
/** Returns a "width" pixels width thumbnail of the given page. This
- method returns an empty QPixmap if one of the arguments is
+ method returns an empty TQPixmap if one of the arguments is
invalid, or if the page cannot be rendered for any reason. */
- QPixmap createThumbnail(const PageNumber& pageNr, int width);
+ TQPixmap createThumbnail(const PageNumber& pageNr, int width);
signals:
/** This signal is emitted when setUserPreferredSize() or
@@ -102,13 +102,13 @@ class DocumentPageCache: public QObject
virtual RenderedDocumentPagePixmap* createDocumentPagePixmap() const;
/** Creates the hashing key for the cache. */
- QString createKey(const PageNumber& pageNumber, const QSize& size);
+ TQString createKey(const PageNumber& pageNumber, const TQSize& size);
/** Creates the hashing function. The size of the page is calculated
based on the current resolution. */
- QString createKey(const PageNumber& pageNumber);
+ TQString createKey(const PageNumber& pageNumber);
- QGuardedPtr<DocumentRenderer> renderer;
+ TQGuardedPtr<DocumentRenderer> renderer;
private:
/** The maximum of memory used by the cache. (32MB)
@@ -132,7 +132,7 @@ class DocumentPageCache: public QObject
/** This list holds the cache. */
- QCache<RenderedDocumentPagePixmap> LRUCache;
+ TQCache<RenderedDocumentPagePixmap> LRUCache;
/** This is a dummy documentPage structure which is used internally
by the 'createThumbnail' method. */
diff --git a/kviewshell/documentRenderer.cpp b/kviewshell/documentRenderer.cpp
index f9837fa2..34bf59ac 100644
--- a/kviewshell/documentRenderer.cpp
+++ b/kviewshell/documentRenderer.cpp
@@ -16,9 +16,9 @@
#include "renderedDocumentPage.h"
-DocumentRenderer::DocumentRenderer(QWidget* par)
+DocumentRenderer::DocumentRenderer(TQWidget* par)
: mutex(true), parentWidget(par), accessibilityBackground(false),
- accessibilityBackgroundColor(QColor(255,255,255))
+ accessibilityBackgroundColor(TQColor(255,255,255))
{
numPages = 0;
_isModified = false;
@@ -28,7 +28,7 @@ DocumentRenderer::DocumentRenderer(QWidget* par)
DocumentRenderer::~DocumentRenderer()
{
// Wait for all access to this DocumentRenderer to finish
- QMutexLocker lock(&mutex);
+ TQMutexLocker lock(&mutex);
clear();
}
@@ -37,7 +37,7 @@ DocumentRenderer::~DocumentRenderer()
void DocumentRenderer::clear()
{
// Wait for all access to this DocumentRenderer to finish
- QMutexLocker lock(&mutex);
+ TQMutexLocker lock(&mutex);
numPages = 0;
pageSizes.clear();
@@ -46,10 +46,10 @@ void DocumentRenderer::clear()
_isModified = false;
}
-void DocumentRenderer::setAccessibleBackground(bool accessibleMode, const QColor& background)
+void DocumentRenderer::setAccessibleBackground(bool accessibleMode, const TQColor& background)
{
// Wait for all access to this DocumentRenderer to finish
- QMutexLocker lock(&mutex);
+ TQMutexLocker lock(&mutex);
accessibilityBackground = accessibleMode;
accessibilityBackgroundColor = background;
@@ -58,7 +58,7 @@ void DocumentRenderer::setAccessibleBackground(bool accessibleMode, const QColor
SimplePageSize DocumentRenderer::sizeOfPage(const PageNumber& page)
{
// Wait for all access to this DocumentRenderer to finish
- QMutexLocker locker(&mutex);
+ TQMutexLocker locker(&mutex);
if (!page.isValid())
return SimplePageSize();
@@ -74,7 +74,7 @@ SimplePageSize DocumentRenderer::sizeOfPage(const PageNumber& page)
void DocumentRenderer::drawThumbnail(double resolution, RenderedDocumentPage* page)
{
// Wait for all access to this DocumentRenderer to finish
- QMutexLocker locker(&mutex);
+ TQMutexLocker locker(&mutex);
drawPage(resolution, page);
}
@@ -85,16 +85,16 @@ void DocumentRenderer::getText(RenderedDocumentPage* page)
drawPage(100.0, page);
}
-bool DocumentRenderer::isValidFile(const QString&) const
+bool DocumentRenderer::isValidFile(const TQString&) const
{
return true;
}
-Anchor DocumentRenderer::parseReference(const QString &reference)
+Anchor DocumentRenderer::parseReference(const TQString &reference)
{
// Wait for all access to this documentRenderer to finish
- QMutexLocker locker(&mutex);
+ TQMutexLocker locker(&mutex);
if (isEmpty())
return Anchor();
@@ -117,12 +117,12 @@ Anchor DocumentRenderer::parseReference(const QString &reference)
return Anchor();
}
-Anchor DocumentRenderer::findAnchor(const QString &locallink)
+Anchor DocumentRenderer::findAnchor(const TQString &locallink)
{
// Wait for all access to this DocumentRenderer to finish
- QMutexLocker locker(&mutex);
+ TQMutexLocker locker(&mutex);
- QMap<QString,Anchor>::Iterator it = anchorList.find(locallink);
+ TQMap<TQString,Anchor>::Iterator it = anchorList.find(locallink);
if (it != anchorList.end())
return *it;
else
diff --git a/kviewshell/documentRenderer.h b/kviewshell/documentRenderer.h
index a8a87410..9282d005 100644
--- a/kviewshell/documentRenderer.h
+++ b/kviewshell/documentRenderer.h
@@ -16,11 +16,11 @@
#include "pageNumber.h"
#include "pageSize.h"
-#include <qguardedptr.h>
-#include <qcolor.h>
-#include <qmutex.h>
-#include <qobject.h>
-#include <qvaluevector.h>
+#include <tqguardedptr.h>
+#include <tqcolor.h>
+#include <tqmutex.h>
+#include <tqobject.h>
+#include <tqvaluevector.h>
class Anchor;
class KURL;
@@ -54,7 +54,7 @@ class DocumentRenderer : public QObject
public:
/** \brief default constructor */
- DocumentRenderer(QWidget* parent);
+ DocumentRenderer(TQWidget* parent);
virtual ~DocumentRenderer();
@@ -123,7 +123,7 @@ public:
method returns 'false' the class must act reasonably, i.e. by
clear()ing the document
*/
- virtual bool setFile(const QString &fname, const KURL &base) = 0;
+ virtual bool setFile(const TQString &fname, const KURL &base) = 0;
/** \brief clearing the document renderer
@@ -162,7 +162,7 @@ public:
current document is empty. */
PageNumber totalPages() const {return numPages; }
- QPtrList<Bookmark> getBookmarks() const { return bookmarks; }
+ TQPtrList<Bookmark> getBookmarks() const { return bookmarks; }
/* Returns the size of page 'page'. If the document is empty, if the
page specified is not a page of the document or if the document
@@ -190,10 +190,10 @@ public:
and the do all of the following, in no particular order
- - obtain the pointer to the QPaintDevice from the documentPage using
+ - obtain the pointer to the TQPaintDevice from the documentPage using
the documentPage::getPaintDevice() method and draw a graphical
representation of the page number page->getPageNumber() into the
- QPaintDevice, using the given resolution. If the member
+ TQPaintDevice, using the given resolution. If the member
accessibilityBackground is true, the accessibilityBackgroundColor
should be used for a background color, if possible. Otherwise,
white should be used, if possible. If you need to compute the size
@@ -321,12 +321,12 @@ public:
section of the DVI file can be found. If so, it returns an anchor
to that section. If not, it returns an invalid anchor.
*/
- virtual Anchor parseReference(const QString &reference);
+ virtual Anchor parseReference(const TQString &reference);
/* Looks up a anchor in the "anchorList". Returns the anchor found,
or an invalid anchor otherwise.
*/
- Anchor findAnchor(const QString &);
+ Anchor findAnchor(const TQString &);
/* Quick file validity check
@@ -352,9 +352,9 @@ public:
true otherwise. The default implementation always returns
'true'.
*/
- virtual bool isValidFile(const QString& fileName) const;
+ virtual bool isValidFile(const TQString& fileName) const;
- void setAccessibleBackground(bool accessibleMode, const QColor& background = QColor(255, 255, 255));
+ void setAccessibleBackground(bool accessibleMode, const TQColor& background = TQColor(255, 255, 255));
signals:
/** signals that the document is changed
@@ -377,7 +377,7 @@ signals:
via the status bar. Since the status bar is not always visible, and
since the duration that the message is shown is not quite specified,
this should not be used for important information. */
- void setStatusBarText( const QString& );
+ void setStatusBarText( const TQString& );
protected:
/** mutex used to make method thread-safe
@@ -389,7 +389,7 @@ protected:
implementation is THREAD-SAFE, if not, this can result in infrequent
and very hard-to-find crashes of your programm.
*/
- QMutex mutex;
+ TQMutex mutex;
/** number of pages in the document
@@ -417,7 +417,7 @@ protected:
@warning Only the constructor and the methods setFile() and clear()
may write to this member.
*/
- QValueVector<SimplePageSize> pageSizes;
+ TQValueVector<SimplePageSize> pageSizes;
/** bookmarks
@@ -428,7 +428,7 @@ protected:
@warning Only the constructor and the methods setFile() and clear()
may write to this member.
*/
- QPtrList<Bookmark> bookmarks;
+ TQPtrList<Bookmark> bookmarks;
/** map of anchors in a document.
@@ -439,14 +439,14 @@ protected:
@warning Only the constructor and the methods setFile() and clear()
may write to this member.
*/
- QMap<QString, Anchor> anchorList;
+ TQMap<TQString, Anchor> anchorList;
/** pointer to the parent widget
This pointer can be used by implementations e.g. to display error
messages. This pointer can well be zero.
*/
- QGuardedPtr<QWidget> parentWidget;
+ TQGuardedPtr<TQWidget> parentWidget;
/** specifies if accessibilityBackgroundColor should be used
@@ -462,7 +462,7 @@ protected:
drawThumbnail() methods should use this color as the backgroundcolor
of the pages.
*/
- QColor accessibilityBackgroundColor;
+ TQColor accessibilityBackgroundColor;
/** Flag if document is modified
diff --git a/kviewshell/documentWidget.cpp b/kviewshell/documentWidget.cpp
index 95b6f771..59316d7a 100644
--- a/kviewshell/documentWidget.cpp
+++ b/kviewshell/documentWidget.cpp
@@ -17,11 +17,11 @@
#include <kglobalsettings.h>
#include <kiconloader.h>
#include <klocale.h>
-#include <qclipboard.h>
-#include <qcursor.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqclipboard.h>
+#include <tqcursor.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include "documentWidget.h"
#include "pageView.h"
@@ -49,24 +49,24 @@ const int DocumentWidget::bottom_left_corner[16] =
const int DocumentWidget::shadow_strip[4] =
{ 56, 67, 83, 94 };
-QColor DocumentWidget::backgroundColorForCorners;
+TQColor DocumentWidget::backgroundColorForCorners;
namespace {
/** Holds the icon used as a overlay on pages which are not drawn yet. */
-QPixmap* busyIcon = 0;
+TQPixmap* busyIcon = 0;
/** Internal storages used in the shadow drawing routines in the
drawContents method.*/
-QPixmap* URShadow = 0;
-QPixmap* BRShadow = 0;
-QPixmap* BLShadow = 0;
+TQPixmap* URShadow = 0;
+TQPixmap* BRShadow = 0;
+TQPixmap* BLShadow = 0;
} // namespace anon
-DocumentWidget::DocumentWidget(QWidget *parent, PageView *sv, DocumentPageCache *cache, const char *name )
- : QWidget( parent, name ), indexOfUnderlinedLink(-1)
+DocumentWidget::DocumentWidget(TQWidget *parent, PageView *sv, DocumentPageCache *cache, const char *name )
+ : TQWidget( parent, name ), indexOfUnderlinedLink(-1)
{
moveTool = true;
@@ -83,18 +83,18 @@ DocumentWidget::DocumentWidget(QWidget *parent, PageView *sv, DocumentPageCache
scrollGuide = -1;
setMouseTracking(true);
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
- connect(&clearStatusBarTimer, SIGNAL(timeout()), this, SLOT(clearStatusBar()));
+ connect(&clearStatusBarTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(clearStatusBar()));
setBackgroundMode(Qt::NoBackground);
if (!busyIcon)
{
- busyIcon = new QPixmap(KGlobal::iconLoader()->loadIcon("gear", KIcon::NoGroup, KIcon::SizeMedium));
+ busyIcon = new TQPixmap(KGlobal::iconLoader()->loadIcon("gear", KIcon::NoGroup, KIcon::SizeMedium));
- URShadow = new QPixmap();
- BRShadow = new QPixmap();
- BLShadow = new QPixmap();
+ URShadow = new TQPixmap();
+ BRShadow = new TQPixmap();
+ BLShadow = new TQPixmap();
URShadow->resize(4,4);
BRShadow->resize(4,4);
@@ -114,7 +114,7 @@ void DocumentWidget::setPageNumber(Q_UINT16 nr)
indexOfUnderlinedLink = -1;
// Resize Widget if the size of the new page is different than the size of the old page.
- QSize _pageSize = documentCache->sizeOfPageInPixel(pageNr);
+ TQSize _pageSize = documentCache->sizeOfPageInPixel(pageNr);
if (_pageSize != pageSize())
{
setPageSize(_pageSize);
@@ -122,14 +122,14 @@ void DocumentWidget::setPageNumber(Q_UINT16 nr)
update();
}
-QRect DocumentWidget::linkFlashRect()
+TQRect DocumentWidget::linkFlashRect()
{
int width = pageSize().width()/(11 - animationCounter);
int height = pageSize().height()/(60 - 4 * animationCounter);
- return QRect((pageSize().width()-width)/2, flashOffset - height/2, width, height);
+ return TQRect((pageSize().width()-width)/2, flashOffset - height/2, width, height);
}
-void DocumentWidget::timerEvent( QTimerEvent *e )
+void DocumentWidget::timerEvent( TQTimerEvent *e )
{
if (animationCounter == 0) {
killTimer(e->timerId());
@@ -138,7 +138,7 @@ void DocumentWidget::timerEvent( QTimerEvent *e )
animationCounter++;
- QRect flashRect = linkFlashRect();
+ TQRect flashRect = linkFlashRect();
flashRect.addCoords(-1, -1, 1, 1);
if (animationCounter >= 10) {
@@ -158,7 +158,7 @@ void DocumentWidget::flash(int fo)
killTimer(timerIdent);
// Delete old flash rectangle
animationCounter = 10;
- QRect flashRect = linkFlashRect();
+ TQRect flashRect = linkFlashRect();
flashRect.addCoords(-1, -1, 1, 1);
repaint(flashRect, false);
}
@@ -168,7 +168,7 @@ void DocumentWidget::flash(int fo)
}
-void DocumentWidget::paintEvent(QPaintEvent *e)
+void DocumentWidget::paintEvent(TQPaintEvent *e)
{
#ifdef DEBUG_DOCUMENTWIDGET
kdDebug(1223) << "DocumentWidget::paintEvent() called" << endl;
@@ -191,25 +191,25 @@ void DocumentWidget::paintEvent(QPaintEvent *e)
return;
}
- QPainter p(this);
+ TQPainter p(this);
p.setClipRegion(e->region());
// Paint a black border around the widget
p.setRasterOp(Qt::CopyROP);
p.setBrush(NoBrush);
p.setPen(Qt::black);
- QRect outlineRect = pageRect();
+ TQRect outlineRect = pageRect();
outlineRect.addCoords(-1, -1, 1, 1);
p.drawRect(outlineRect);
// Paint page shadow
- QColor backgroundColor = colorGroup().mid();
+ TQColor backgroundColor = colorGroup().mid();
// (Re-)generate the Pixmaps for the shadow corners, if necessary
if (backgroundColor != backgroundColorForCorners)
{
backgroundColorForCorners = backgroundColor;
- QImage tmp(4, 4, 32);
+ TQImage tmp(4, 4, 32);
for(int x=0; x<4; x++)
for(int y=0; y<4; y++)
tmp.setPixel(x, y, backgroundColor.light(bottom_right_corner[x+4*y]).rgb() );
@@ -243,7 +243,7 @@ void DocumentWidget::paintEvent(QPaintEvent *e)
if (!documentCache->isPageCached(pageNr, pageSize()))
{
- QRect destRect = e->rect().intersect(pageRect());
+ TQRect destRect = e->rect().intersect(pageRect());
if (KVSPrefs::changeColors() && KVSPrefs::renderMode() == KVSPrefs::EnumRenderMode::Paper)
p.fillRect(destRect, KVSPrefs::paperColor());
else
@@ -260,7 +260,7 @@ void DocumentWidget::paintEvent(QPaintEvent *e)
{
// Request page pixmap.
pixmapRequested = true;
- QTimer::singleShot(50, this, SLOT(delayedRequestPage()));
+ TQTimer::singleShot(50, this, TQT_SLOT(delayedRequestPage()));
}
return;
}
@@ -273,15 +273,15 @@ void DocumentWidget::paintEvent(QPaintEvent *e)
return;
}
- QMemArray<QRect> damagedRects = e->region().rects();
+ TQMemArray<TQRect> damagedRects = e->region().rects();
for (unsigned int i = 0; i < damagedRects.count(); i++)
{
// Paint the page where it intersects with the damaged area.
- QRect destRect = damagedRects[i].intersect(pageRect());
+ TQRect destRect = damagedRects[i].intersect(pageRect());
// The actual page starts at point (1,1) because of the outline.
// Therefore we need to shift the destination rectangle.
- QRect pixmapRect = destRect;
+ TQRect pixmapRect = destRect;
pixmapRect.moveBy(-1,-1);
if (KVSPrefs::changeColors() && KVSPrefs::renderMode() != KVSPrefs::EnumRenderMode::Paper)
@@ -309,7 +309,7 @@ void DocumentWidget::paintEvent(QPaintEvent *e)
int w = pageData->hyperLinkList[i].box.width();
int y = pageData->hyperLinkList[i].baseline;
- QRect hyperLinkRect(x, y, w, h);
+ TQRect hyperLinkRect(x, y, w, h);
if (hyperLinkRect.intersects(e->rect()))
{
#ifdef DEBUG_DOCUMENTWIDGET
@@ -324,7 +324,7 @@ void DocumentWidget::paintEvent(QPaintEvent *e)
if (animationCounter > 0 && animationCounter < 10)
{
int gbChannel = 255 - (9-animationCounter)*28;
- p.setPen(QPen(QColor(255, gbChannel, gbChannel), 3));
+ p.setPen(TQPen(TQColor(255, gbChannel, gbChannel), 3));
p.drawRect(linkFlashRect());
}
@@ -344,7 +344,7 @@ void DocumentWidget::paintEvent(QPaintEvent *e)
p.setBrush(white);
p.setRasterOp(Qt::XorROP);
- QMemArray<QRect> selectionRects = selectedRegion.rects();
+ TQMemArray<TQRect> selectionRects = selectedRegion.rects();
for (unsigned int i = 0; i < selectionRects.count(); i++)
p.drawRect(selectionRects[i]);
@@ -365,8 +365,8 @@ void DocumentWidget::drawScrollGuide(int ycoord)
{
//kdDebug() << "draw scroll guide for page " << pageNr << " at y = " << ycoord << endl;
scrollGuide = ycoord;
- update(QRect(1, scrollGuide, pageSize().width(), 1));
- QTimer::singleShot(1000, this, SLOT(clearScrollGuide()));
+ update(TQRect(1, scrollGuide, pageSize().width(), 1));
+ TQTimer::singleShot(1000, this, TQT_SLOT(clearScrollGuide()));
}
void DocumentWidget::clearScrollGuide()
@@ -374,7 +374,7 @@ void DocumentWidget::clearScrollGuide()
//kdDebug() << "clear scroll guide for page " << pageNr << " at y = " << scrollGuide << endl;
int temp = scrollGuide;
scrollGuide = -1;
- update(QRect(1, temp, pageSize().width(), 1));
+ update(TQRect(1, temp, pageSize().width(), 1));
}
void DocumentWidget::select(const TextSelection& newSelection)
@@ -410,7 +410,7 @@ void DocumentWidget::selectAll()
TextSelection selection;
// mark everything as selected
- QString selectedText("");
+ TQString selectedText("");
for(unsigned int i = 0; i < pageData->textBoxList.size(); i++) {
selectedText += pageData->textBoxList[i].text;
selectedText += "\n";
@@ -426,7 +426,7 @@ void DocumentWidget::selectAll()
}
-void DocumentWidget::mousePressEvent ( QMouseEvent * e )
+void DocumentWidget::mousePressEvent ( TQMouseEvent * e )
{
#ifdef DEBUG_DOCUMENTWIDGET
kdDebug(1223) << "DocumentWidget::mousePressEvent(...) called" << endl;
@@ -471,15 +471,15 @@ void DocumentWidget::mousePressEvent ( QMouseEvent * e )
if (!(e->state() & ShiftButton))
{
firstSelectedPoint = e->pos();
- selectedRectangle = QRect();
- selectedRegion = QRegion();
+ selectedRectangle = TQRect();
+ selectedRegion = TQRegion();
emit clearSelection();
}
}
}
-void DocumentWidget::mouseReleaseEvent ( QMouseEvent *e )
+void DocumentWidget::mouseReleaseEvent ( TQMouseEvent *e )
{
// Make sure the event is passed on to the higher-level widget;
// otherwise the mouse cursor in the centeringScrollview is wrong
@@ -512,7 +512,7 @@ void DocumentWidget::mouseReleaseEvent ( QMouseEvent *e )
}
-void DocumentWidget::mouseMoveEvent ( QMouseEvent * e )
+void DocumentWidget::mouseMoveEvent ( TQMouseEvent * e )
{
#ifdef DEBUG_DOCUMENTWIDGET
kdDebug(1223) << "DocumentWidget::mouseMoveEvent(...) called" << endl;
@@ -540,7 +540,7 @@ void DocumentWidget::mouseMoveEvent ( QMouseEvent * e )
if (pageData->hyperLinkList[i].box.contains(e->pos())) {
clearStatusBarTimer.stop();
setCursor(pointingHandCursor);
- QString link = pageData->hyperLinkList[i].linkText;
+ TQString link = pageData->hyperLinkList[i].linkText;
if ( link.startsWith("#") )
link = link.remove(0,1);
@@ -550,7 +550,7 @@ void DocumentWidget::mouseMoveEvent ( QMouseEvent * e )
if (KVSPrefs::underlineLinks() == KVSPrefs::EnumUnderlineLinks::OnlyOnHover &&
indexOfUnderlinedLink != lastUnderlinedLink)
{
- QRect newUnderline = pageData->hyperLinkList[i].box;
+ TQRect newUnderline = pageData->hyperLinkList[i].box;
// Increase Rectangle so that the whole line really lines in it.
newUnderline.addCoords(0, 0, 0, 2);
// Redraw widget
@@ -559,7 +559,7 @@ void DocumentWidget::mouseMoveEvent ( QMouseEvent * e )
if (lastUnderlinedLink != -1 && lastUnderlinedLink < pageData->hyperLinkList.size())
{
// Erase old underline
- QRect oldUnderline = pageData->hyperLinkList[lastUnderlinedLink].box;
+ TQRect oldUnderline = pageData->hyperLinkList[lastUnderlinedLink].box;
oldUnderline.addCoords(0, 0, 0, 2);
update(oldUnderline);
}
@@ -573,7 +573,7 @@ void DocumentWidget::mouseMoveEvent ( QMouseEvent * e )
lastUnderlinedLink != -1 && lastUnderlinedLink < pageData->hyperLinkList.size())
{
// Erase old underline
- QRect oldUnderline = pageData->hyperLinkList[lastUnderlinedLink].box;
+ TQRect oldUnderline = pageData->hyperLinkList[lastUnderlinedLink].box;
// Increase Rectangle so that the whole line really lines in it.
oldUnderline.addCoords(0, 0, 0, 2);
// Redraw widget
@@ -626,8 +626,8 @@ void DocumentWidget::updateSelection(const TextSelection& newTextSelection)
{
// Clear selection
documentCache->deselectText();
- selectedRectangle = QRect();
- selectedRegion = QRegion();
+ selectedRectangle = TQRect();
+ selectedRegion = TQRegion();
update();
}
else
@@ -645,10 +645,10 @@ void DocumentWidget::updateSelection(const TextSelection& newTextSelection)
documentCache->selectText(newTextSelection);
- QRegion newlySelectedRegion = pageData->selectedRegion(documentCache->selectedText());
+ TQRegion newlySelectedRegion = pageData->selectedRegion(documentCache->selectedText());
// Compute the region that needs to be updated
- QRegion updateRegion;
+ TQRegion updateRegion;
if(!selectedRegion.isEmpty())
{
updateRegion = newlySelectedRegion.eor(selectedRegion);
@@ -660,7 +660,7 @@ void DocumentWidget::updateSelection(const TextSelection& newTextSelection)
selectedRegion = newlySelectedRegion;
- QMemArray<QRect> rectangles = updateRegion.rects();
+ TQMemArray<TQRect> rectangles = updateRegion.rects();
for (unsigned int i = 0; i < rectangles.count(); i++)
{
repaint(rectangles[i]);
@@ -672,7 +672,7 @@ void DocumentWidget::updateSelection(const TextSelection& newTextSelection)
void DocumentWidget::clearStatusBar()
{
- emit setStatusBarText( QString::null );
+ emit setStatusBarText( TQString::null );
}
@@ -701,21 +701,21 @@ void DocumentWidget::delayedRequestPage()
kapp->processEvents();
}
-QSize DocumentWidget::pageSize() const
+TQSize DocumentWidget::pageSize() const
{
// Substract size of the shadow.
- return size() - QSize(6, 6);
+ return size() - TQSize(6, 6);
}
-QRect DocumentWidget::pageRect() const
+TQRect DocumentWidget::pageRect() const
{
- QRect boundingRect = rect();
+ TQRect boundingRect = rect();
// Substract the shadow.
boundingRect.addCoords(1,1,-5,-5);
return boundingRect;
}
-void DocumentWidget::setPageSize(const QSize& pageSize)
+void DocumentWidget::setPageSize(const TQSize& pageSize)
{
// When the page size changes this means either the paper size
// has been changed, or the zoomlevel has been changed.
@@ -724,12 +724,12 @@ void DocumentWidget::setPageSize(const QSize& pageSize)
selectionNeedsUpdating = true;
// Add size of the shadow.
- resize(pageSize + QSize(6,6));
+ resize(pageSize + TQSize(6,6));
}
void DocumentWidget::setPageSize(int width, int height)
{
- setPageSize(QSize(width, height));
+ setPageSize(TQSize(width, height));
}
@@ -756,8 +756,8 @@ void DocumentWidget::setStandardCursor()
bool DocumentWidget::isVisible()
{
- QRect visibleRect(scrollView->contentsX(), scrollView->contentsY(), scrollView->visibleWidth(), scrollView->visibleHeight());
- QRect widgetRect(scrollView->childX(this), scrollView->childY(this), width(), height());
+ TQRect visibleRect(scrollView->contentsX(), scrollView->contentsY(), scrollView->visibleWidth(), scrollView->visibleHeight());
+ TQRect widgetRect(scrollView->childX(this), scrollView->childY(this), width(), height());
return widgetRect.intersects(visibleRect);
}
diff --git a/kviewshell/documentWidget.h b/kviewshell/documentWidget.h
index 50f2ee44..c568d11c 100644
--- a/kviewshell/documentWidget.h
+++ b/kviewshell/documentWidget.h
@@ -15,14 +15,14 @@
#include "selection.h"
-#include <qregion.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqregion.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
class DocumentPageCache;
class PageView;
-class QMouseEvent;
-class QPaintEvent;
+class TQMouseEvent;
+class TQPaintEvent;
/* DocumentWidget */
@@ -32,15 +32,15 @@ class DocumentWidget : public QWidget
Q_OBJECT
public:
- DocumentWidget(QWidget *parent, PageView *sv, DocumentPageCache *cache, const char *name);
+ DocumentWidget(TQWidget *parent, PageView *sv, DocumentPageCache *cache, const char *name);
void setPageNumber(Q_UINT16 pageNr);
Q_UINT16 getPageNumber() const {return pageNr;}
/** Returns the size of the widget without the page shadow. */
- QSize pageSize() const;
+ TQSize pageSize() const;
/** Returns the bounding rectangle of the widget without the page shadow. */
- QRect pageRect() const;
+ TQRect pageRect() const;
/** Draw a red vertical line at y-coordinate ycoord. The line is removed again
after one second. This is used to make it easier to regain reading focus if
@@ -59,13 +59,13 @@ public slots:
/** Sets the size of the widget so that the page is of the given size.
The widget gets slightly bigger because of the page shadow. */
- void setPageSize(const QSize&);
+ void setPageSize(const TQSize&);
void setPageSize(int width, int height);
signals:
/** Passed through to the top-level kpart. */
- void setStatusBarText( const QString& );
- void localLink( const QString& );
+ void setStatusBarText( const TQString& );
+ void localLink( const TQString& );
/** This signal is emitted when the widget resizes itself */
void resized();
@@ -74,9 +74,9 @@ signals:
void clearSelection();
protected:
- virtual void paintEvent (QPaintEvent *);
- virtual void mousePressEvent ( QMouseEvent * e );
- virtual void mouseReleaseEvent (QMouseEvent *);
+ virtual void paintEvent (TQPaintEvent *);
+ virtual void mousePressEvent ( TQMouseEvent * e );
+ virtual void mouseReleaseEvent (TQMouseEvent *);
/** This method is used by the DocumentWidget to find out of the
mouse pointer hovers over a hyperlink, and to update the
@@ -91,7 +91,7 @@ protected:
DocumentWidget::mouseMoveEvent(e);
- 2) Ignore the QMouseEvent if a mouse button is pressed
+ 2) Ignore the TQMouseEvent if a mouse button is pressed
3) If no mouse button is pressed, analyze the mouse movement and
take appropriate actions. To set statusbar text, do
@@ -109,7 +109,7 @@ protected:
areas in the widget.
*/
- virtual void mouseMoveEvent (QMouseEvent *);
+ virtual void mouseMoveEvent (TQMouseEvent *);
protected:
void updateSelection(const TextSelection& newTextSelection);
@@ -117,7 +117,7 @@ protected:
/** Methods and counters used for the animation to mark the target of
an hyperlink. */
int timerIdent;
- void timerEvent( QTimerEvent *e );
+ void timerEvent( TQTimerEvent *e );
int animationCounter;
int flashOffset;
@@ -128,11 +128,11 @@ protected:
moves over a block of text that contains source hyperlinks. The
signal timeout() is connected to the method clearStatusBar() of
*this. */
- QTimer clearStatusBarTimer;
+ TQTimer clearStatusBarTimer;
/* Data structures used for marking text with the mouse */
- QPoint firstSelectedPoint;
- QRect selectedRectangle;
+ TQPoint firstSelectedPoint;
+ TQRect selectedRectangle;
/** Pointer to the PageView that contains this
widget. This pointer is used in the re-implementation of the
@@ -141,7 +141,7 @@ protected:
DocumentPageCache *documentCache;
/** Currently selected Region */
- QRegion selectedRegion;
+ TQRegion selectedRegion;
/** This is set to the index of the link over which the mouse pointer currently resides,
and -1 if the no link is hovered.
@@ -156,7 +156,7 @@ protected:
virtual void setStandardCursor();
private slots:
- /** This slot emits the signal setStatusBarText(QString::null) to
+ /** This slot emits the signal setStatusBarText(TQString::null) to
clear the status bar. It is connected to the timeout slot of the
clearStatusBarTimer. */
void clearStatusBar();
@@ -167,13 +167,13 @@ private slots:
void clearScrollGuide();
private:
- QRect linkFlashRect();
+ TQRect linkFlashRect();
/** If this variable is positive draw a vertical line at this y-coordinate. */
int scrollGuide;
/** Color used by in the shadow drawing to check if the background color has been changed. */
- static QColor backgroundColorForCorners;
+ static TQColor backgroundColorForCorners;
/** The following tables store grey values for roundish shadow
corners. They were shamelessly stolen from kdelibs/kdefx/kstyle.cpp. */
diff --git a/kviewshell/emptyRenderer.cpp b/kviewshell/emptyRenderer.cpp
index e89ffd6e..deeef488 100644
--- a/kviewshell/emptyRenderer.cpp
+++ b/kviewshell/emptyRenderer.cpp
@@ -21,7 +21,7 @@
#include "emptyRenderer.h"
-EmptyRenderer::EmptyRenderer(QWidget* parent)
+EmptyRenderer::EmptyRenderer(TQWidget* parent)
: DocumentRenderer(parent)
{
}
diff --git a/kviewshell/emptyRenderer.h b/kviewshell/emptyRenderer.h
index 62fd46f7..71cf30aa 100644
--- a/kviewshell/emptyRenderer.h
+++ b/kviewshell/emptyRenderer.h
@@ -31,9 +31,9 @@ class EmptyRenderer : public DocumentRenderer
Q_OBJECT
public:
- EmptyRenderer(QWidget* parent);
+ EmptyRenderer(TQWidget* parent);
- virtual bool setFile(const QString &, const KURL &) { return false; }
+ virtual bool setFile(const TQString &, const KURL &) { return false; }
void drawPage(double res, RenderedDocumentPage* page) { Q_UNUSED(res); Q_UNUSED(page); }
};
diff --git a/kviewshell/empty_multipage.cpp b/kviewshell/empty_multipage.cpp
index 39de90a3..8fc1a0f8 100644
--- a/kviewshell/empty_multipage.cpp
+++ b/kviewshell/empty_multipage.cpp
@@ -26,8 +26,8 @@
K_EXPORT_COMPONENT_FACTORY(emptymultipagepart, EmptyMultiPageFactory)
-EmptyMultiPage::EmptyMultiPage(QWidget* parentWidget, const char* widgetName, QObject* parent, const char* name,
- const QStringList& args)
+EmptyMultiPage::EmptyMultiPage(TQWidget* parentWidget, const char* widgetName, TQObject* parent, const char* name,
+ const TQStringList& args)
: KMultiPage(parentWidget, widgetName, parent, name), emptyRenderer(parentWidget)
{
Q_UNUSED(args);
diff --git a/kviewshell/empty_multipage.h b/kviewshell/empty_multipage.h
index 92d824b7..455474f1 100644
--- a/kviewshell/empty_multipage.h
+++ b/kviewshell/empty_multipage.h
@@ -32,10 +32,10 @@ class EmptyMultiPage : public KMultiPage
Q_OBJECT
public:
- EmptyMultiPage(QWidget* parentWidget, const char* widgetName, QObject* parent, const char* name,
- const QStringList& args = QStringList());
+ EmptyMultiPage(TQWidget* parentWidget, const char* widgetName, TQObject* parent, const char* name,
+ const TQStringList& args = TQStringList());
- virtual QStringList fileFormats() const { return QString::null; }
+ virtual TQStringList fileFormats() const { return TQString::null; }
/// opens a file
virtual bool openFile() { return false; }
diff --git a/kviewshell/history.cpp b/kviewshell/history.cpp
index a8765220..0452efc1 100644
--- a/kviewshell/history.cpp
+++ b/kviewshell/history.cpp
@@ -47,7 +47,7 @@ void History::add(Q_UINT32 page, Q_UINT32 ypos)
currentItem = historyList.insert(currentItem, item);
}
// Delete items starting after currentItem to the end of the list.
- QValueList<HistoryItem>::iterator deleteItemsStart = currentItem;
+ TQValueList<HistoryItem>::iterator deleteItemsStart = currentItem;
deleteItemsStart++;
historyList.erase(deleteItemsStart, historyList.end());
diff --git a/kviewshell/history.h b/kviewshell/history.h
index 2c651475..822e31d7 100644
--- a/kviewshell/history.h
+++ b/kviewshell/history.h
@@ -7,8 +7,8 @@
// (C) 2001 Stefan Kebekus
// Distributed under the GPL
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
#define HISTORYLENGTH 10
@@ -50,9 +50,9 @@ signals:
private:
// List of history items. First item is the oldest.
- QValueList<HistoryItem> historyList;
+ TQValueList<HistoryItem> historyList;
- QValueList<HistoryItem>::iterator currentItem;
+ TQValueList<HistoryItem>::iterator currentItem;
};
#endif
diff --git a/kviewshell/hyperlink.h b/kviewshell/hyperlink.h
index bd07fef5..66de5c6f 100644
--- a/kviewshell/hyperlink.h
+++ b/kviewshell/hyperlink.h
@@ -9,8 +9,8 @@
#ifndef _hyperlink_h_
#define _hyperlink_h_
-#include <qrect.h>
-#include <qstring.h>
+#include <tqrect.h>
+#include <tqstring.h>
/** Represents a named, rectangular region in a rendered documentPage
@@ -39,7 +39,7 @@ public:
@param re value for the box
@param lT valus for the text field
*/
- Hyperlink(Q_UINT32 bl, const QRect& re, const QString& lT): baseline(bl), box(re), linkText(lT) {}
+ Hyperlink(Q_UINT32 bl, const TQRect& re, const TQString& lT): baseline(bl), box(re), linkText(lT) {}
/** \brief Base line of a hyperlink
@@ -62,7 +62,7 @@ public:
documentRenderer.drawPage() method. The box is used to determine if
the mouse pointer hovers over the link.
*/
- QRect box;
+ TQRect box;
/** \brief Name of the region
@@ -70,7 +70,7 @@ public:
e.g. "http://www.kde.org". If the Hyperlink class is used to
represent text, then the text is stored here.
*/
- QString linkText;
+ TQString linkText;
};
diff --git a/kviewshell/kmultipage.cpp b/kviewshell/kmultipage.cpp
index b747ce0f..679b0dcf 100644
--- a/kviewshell/kmultipage.cpp
+++ b/kviewshell/kmultipage.cpp
@@ -10,14 +10,14 @@
#include <kmessagebox.h>
#include <kprinter.h>
#include <kstdaction.h>
-#include <qobject.h>
-#include <qlayout.h>
-#include <qpaintdevicemetrics.h>
-#include <qprogressdialog.h>
-#include <qsplitter.h>
-#include <qurl.h>
-#include <qtoolbox.h>
-#include <qvbox.h>
+#include <tqobject.h>
+#include <tqlayout.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqprogressdialog.h>
+#include <tqsplitter.h>
+#include <tqurl.h>
+#include <tqtoolbox.h>
+#include <tqvbox.h>
#include "documentWidget.h"
#include "marklist.h"
@@ -34,7 +34,7 @@
//#define DEBUG_KMULTIPAGE
-KMultiPage::KMultiPage(QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name)
+KMultiPage::KMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name)
: DCOPObject("kmultipage"), KParts::ReadOnlyPart(parent, name)
{
// For reasons which I don't understand, the initialization of the
@@ -48,56 +48,56 @@ KMultiPage::KMultiPage(QWidget *parentWidget, const char *widgetName, QObject *p
timer_id = -1;
searchInProgress = false;
- QVBox* verticalBox = new QVBox(parentWidget);
- verticalBox->setFocusPolicy(QWidget::StrongFocus);
+ TQVBox* verticalBox = new TQVBox(parentWidget);
+ verticalBox->setFocusPolicy(TQWidget::StrongFocus);
setWidget(verticalBox);
- splitterWidget = new QSplitter(verticalBox, widgetName);
+ splitterWidget = new TQSplitter(verticalBox, widgetName);
splitterWidget->setOpaqueResize(false);
- splitterWidget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
+ splitterWidget->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
// Create SideBar
- sideBar = new QToolBox(splitterWidget, "sidebar");
+ sideBar = new TQToolBox(splitterWidget, "sidebar");
// Create ContentsList
tableOfContents = new TableOfContents(sideBar);
- sideBar->addItem(tableOfContents, QIconSet(SmallIcon("contents")), i18n("Contents"));
+ sideBar->addItem(tableOfContents, TQIconSet(SmallIcon("contents")), i18n("Contents"));
- connect(tableOfContents, SIGNAL(gotoPage(const Anchor&)), this, SLOT(gotoPage(const Anchor&)));
+ connect(tableOfContents, TQT_SIGNAL(gotoPage(const Anchor&)), this, TQT_SLOT(gotoPage(const Anchor&)));
// Create MarkList
_markList = new MarkList(sideBar, "marklist");
- sideBar->addItem(_markList, QIconSet(SmallIcon("thumbnail")), i18n("Thumbnails"));
+ sideBar->addItem(_markList, TQIconSet(SmallIcon("thumbnail")), i18n("Thumbnails"));
// Restore state of the sidebar
sideBar->setCurrentItem(sideBar->item(KVSPrefs::sideBarItem()));
- splitterWidget->setResizeMode(sideBar, QSplitter::KeepSize);
+ splitterWidget->setResizeMode(sideBar, TQSplitter::KeepSize);
- connect(_markList, SIGNAL(selected(const PageNumber&)), this, SLOT(gotoPage(const PageNumber&)));
+ connect(_markList, TQT_SIGNAL(selected(const PageNumber&)), this, TQT_SLOT(gotoPage(const PageNumber&)));
_scrollView = new PageView(splitterWidget, widgetName);
// Create Search Panel
searchWidget = new SearchWidget(verticalBox);
searchWidget->hide();
- connect(searchWidget, SIGNAL(findNextText()), this, SLOT(findNextText()));
- connect(searchWidget, SIGNAL(findPrevText()), this, SLOT(findPrevText()));
+ connect(searchWidget, TQT_SIGNAL(findNextText()), this, TQT_SLOT(findNextText()));
+ connect(searchWidget, TQT_SIGNAL(findPrevText()), this, TQT_SLOT(findPrevText()));
sideBar->setMinimumWidth(80);
sideBar->setMaximumWidth(300);
- connect(_scrollView, SIGNAL(currentPageChanged(const PageNumber&)), this, SLOT(setCurrentPageNumber(const PageNumber&)));
- connect(_scrollView, SIGNAL(viewSizeChanged(const QSize&)), scrollView(), SLOT(calculateCurrentPageNumber()));
- connect(_scrollView, SIGNAL(wheelEventReceived(QWheelEvent *)), this, SLOT(wheelEvent(QWheelEvent*)));
+ connect(_scrollView, TQT_SIGNAL(currentPageChanged(const PageNumber&)), this, TQT_SLOT(setCurrentPageNumber(const PageNumber&)));
+ connect(_scrollView, TQT_SIGNAL(viewSizeChanged(const TQSize&)), scrollView(), TQT_SLOT(calculateCurrentPageNumber()));
+ connect(_scrollView, TQT_SIGNAL(wheelEventReceived(TQWheelEvent *)), this, TQT_SLOT(wheelEvent(TQWheelEvent*)));
- connect(this, SIGNAL(enableMoveTool(bool)), _scrollView, SLOT(slotEnableMoveTool(bool)));
+ connect(this, TQT_SIGNAL(enableMoveTool(bool)), _scrollView, TQT_SLOT(slotEnableMoveTool(bool)));
splitterWidget->setCollapsible(sideBar, false);
splitterWidget->setSizes(KVSPrefs::guiLayout());
- connect(searchWidget, SIGNAL(searchEnabled(bool)), this, SIGNAL(searchEnabled(bool)));
- connect(searchWidget, SIGNAL(stopSearch()), this, SLOT(stopSearch()));
+ connect(searchWidget, TQT_SIGNAL(searchEnabled(bool)), this, TQT_SIGNAL(searchEnabled(bool)));
+ connect(searchWidget, TQT_SIGNAL(stopSearch()), this, TQT_SLOT(stopSearch()));
}
@@ -126,12 +126,12 @@ void KMultiPage::writeSettings()
KVSPrefs::writeConfig();
}
-QString KMultiPage::name_of_current_file()
+TQString KMultiPage::name_of_current_file()
{
return m_file;
}
-bool KMultiPage::is_file_loaded(const QString& filename)
+bool KMultiPage::is_file_loaded(const TQString& filename)
{
return (filename == m_file);
}
@@ -144,18 +144,18 @@ void KMultiPage::slotSave_defaultFilename()
void KMultiPage::slotSave()
{
// Try to guess the proper ending...
- QString formats;
- QString ending;
+ TQString formats;
+ TQString ending;
int rindex = m_file.findRev(".");
if (rindex == -1) {
- ending = QString::null;
- formats = QString::null;
+ ending = TQString::null;
+ formats = TQString::null;
} else {
ending = m_file.mid(rindex); // e.g. ".dvi"
formats = fileFormats().grep(ending).join("\n");
}
- QString fileName = KFileDialog::getSaveFileName(QString::null, formats, 0, i18n("Save File As"));
+ TQString fileName = KFileDialog::getSaveFileName(TQString::null, formats, 0, i18n("Save File As"));
if (fileName.isEmpty())
return;
@@ -165,7 +165,7 @@ void KMultiPage::slotSave()
if (!ending.isEmpty() && fileName.find(ending) == -1)
fileName = fileName+ending;
- if (QFile(fileName).exists()) {
+ if (TQFile(fileName).exists()) {
int r = KMessageBox::warningContinueCancel (0, i18n("The file %1\nexists. Shall I overwrite that file?").arg(fileName),
i18n("Overwrite File"), i18n("Overwrite"));
if (r == KMessageBox::Cancel)
@@ -173,7 +173,7 @@ void KMultiPage::slotSave()
}
KIO::Job *job = KIO::file_copy( KURL( m_file ), KURL( fileName ), 0600, true, false, true );
- connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotIOJobFinished ( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotIOJobFinished ( KIO::Job * ) ) );
return;
}
@@ -198,7 +198,7 @@ bool KMultiPage::closeURL()
document_history.clear();
// Close the file.
- renderer->setFile(QString::null, KURL());
+ renderer->setFile(TQString::null, KURL());
renderer->clear();
// Delete Page Widgets.
@@ -217,7 +217,7 @@ bool KMultiPage::closeURL()
tableOfContents->clear();
// Clear Status Bar
- emit setStatusBarText(QString::null);
+ emit setStatusBarText(TQString::null);
return true;
}
@@ -352,8 +352,8 @@ void KMultiPage::initializePageCache()
DocumentWidget* KMultiPage::createDocumentWidget()
{
DocumentWidget* documentWidget = new DocumentWidget(scrollView()->viewport(), scrollView(), pageCache, "singlePageWidget");
- connect(documentWidget, SIGNAL(clearSelection()), this, SLOT(clearSelection()));
- connect(this, SIGNAL(enableMoveTool(bool)), documentWidget, SLOT(slotEnableMoveTool(bool)));
+ connect(documentWidget, TQT_SIGNAL(clearSelection()), this, TQT_SLOT(clearSelection()));
+ connect(this, TQT_SIGNAL(enableMoveTool(bool)), documentWidget, TQT_SLOT(slotEnableMoveTool(bool)));
return documentWidget;
}
@@ -436,8 +436,8 @@ void KMultiPage::generateDocumentWidgets(const PageNumber& _startPage)
widgetList.insert(i, documentWidget);
documentWidget->show();
- connect(documentWidget, SIGNAL(localLink(const QString &)), this, SLOT(handleLocalLink(const QString &)));
- connect(documentWidget, SIGNAL(setStatusBarText(const QString&)), this, SIGNAL(setStatusBarText(const QString&)) );
+ connect(documentWidget, TQT_SIGNAL(localLink(const TQString &)), this, TQT_SLOT(handleLocalLink(const TQString &)));
+ connect(documentWidget, TQT_SIGNAL(setStatusBarText(const TQString&)), this, TQT_SIGNAL(setStatusBarText(const TQString&)) );
}
}
@@ -606,7 +606,7 @@ bool KMultiPage::gotoPage(const PageNumber& page, int y, bool isLink)
}
-void KMultiPage::handleLocalLink(const QString &linkText)
+void KMultiPage::handleLocalLink(const TQString &linkText)
{
#ifdef DEBUG_SPECIAL
kdDebug(4300) << "hit: local link to " << linkText << endl;
@@ -617,7 +617,7 @@ void KMultiPage::handleLocalLink(const QString &linkText)
return;
}
- QString locallink;
+ TQString locallink;
if (linkText[0] == '#' )
locallink = linkText.mid(1); // Drop the '#' at the beginning
else
@@ -633,10 +633,10 @@ void KMultiPage::handleLocalLink(const QString &linkText)
// it is perhaps not a very good idea to allow a DVI-file to
// specify arbitrary commands, such as "rm -rvf /". Using
// the kfmclient seems to be MUCH safer.
- QUrl DVI_Url(m_file);
- QUrl Link_Url(DVI_Url, linkText, true);
+ TQUrl DVI_Url(m_file);
+ TQUrl Link_Url(DVI_Url, linkText, true);
- QStringList args;
+ TQStringList args;
args << "openURL";
args << Link_Url.toString();
kapp->kdeinitExec("kfmclient", args);
@@ -720,7 +720,7 @@ void KMultiPage::repaintAllVisibleWidgets()
continue;
// Resize, if necessary
- QSize pageSize = pageCache->sizeOfPageInPixel(documentWidget->getPageNumber());
+ TQSize pageSize = pageCache->sizeOfPageInPixel(documentWidget->getPageNumber());
if (pageSize != documentWidget->pageSize())
{
documentWidget->setPageSize(pageSize);
@@ -747,7 +747,7 @@ double KMultiPage::setZoom(double zoom)
if (zoom > ZoomLimits::MaxZoom/1000.0)
zoom = ZoomLimits::MaxZoom/1000.0;
- pageCache->setResolution(QPaintDevice::x11AppDpiX()*zoom);
+ pageCache->setResolution(TQPaintDevice::x11AppDpiX()*zoom);
emit zoomChanged();
return zoom;
}
@@ -769,7 +769,7 @@ void KMultiPage::print()
// initialize the printer using the print dialog
if ( printer->setup(parentWdg, i18n("Print %1").arg(m_file.section('/', -1))) ) {
// Now do the printing.
- QValueList<int> pageList = printer->pageList();
+ TQValueList<int> pageList = printer->pageList();
if (pageList.isEmpty())
printer->abort();
else {
@@ -780,11 +780,11 @@ void KMultiPage::print()
// Obtain papersize information that is required to perform
// the resizing and centering, if this is wanted by the user.
Length paperWidth, paperHeight;
- QPaintDeviceMetrics pdm(printer);
+ TQPaintDeviceMetrics pdm(printer);
paperWidth.setLength_in_mm(pdm.widthMM());
paperHeight.setLength_in_mm(pdm.heightMM());
- QValueList<int>::ConstIterator it = pageList.begin();
+ TQValueList<int>::ConstIterator it = pageList.begin();
while (true) {
SimplePageSize paper_s(paperWidth, paperHeight);
@@ -792,7 +792,7 @@ void KMultiPage::print()
// updated.
qApp->processEvents();
- QPainter *paint = rdpp.getPainter();
+ TQPainter *paint = rdpp.getPainter();
if (paint != 0) {
// Before drawing the page, we figure out the zoom-value,
// taking the "page sizes and placement" options from the
@@ -868,11 +868,11 @@ void KMultiPage::setRenderer(DocumentRenderer* _renderer)
widgetList.resize(0);
// Relay signals.
- connect(renderer, SIGNAL(setStatusBarText(const QString&)), this, SIGNAL(setStatusBarText(const QString&)));
- connect(pageCache, SIGNAL(paperSizeChanged()), this, SLOT(renderModeChanged()));
- connect(pageCache, SIGNAL(textSelected(bool)), this, SIGNAL(textSelected(bool)));
- connect(renderer, SIGNAL(documentIsChanged()), this, SLOT(renderModeChanged()));
- connect(this, SIGNAL(zoomChanged()), this, SLOT(repaintAllVisibleWidgets()));
+ connect(renderer, TQT_SIGNAL(setStatusBarText(const TQString&)), this, TQT_SIGNAL(setStatusBarText(const TQString&)));
+ connect(pageCache, TQT_SIGNAL(paperSizeChanged()), this, TQT_SLOT(renderModeChanged()));
+ connect(pageCache, TQT_SIGNAL(textSelected(bool)), this, TQT_SIGNAL(textSelected(bool)));
+ connect(renderer, TQT_SIGNAL(documentIsChanged()), this, TQT_SLOT(renderModeChanged()));
+ connect(this, TQT_SIGNAL(zoomChanged()), this, TQT_SLOT(repaintAllVisibleWidgets()));
}
@@ -887,7 +887,7 @@ void KMultiPage::updateWidgetSize(const PageNumber& pageNumber)
if (documentWidget->getPageNumber() == pageNumber)
{
// Resize, if necessary
- QSize pageSize = pageCache->sizeOfPageInPixel(documentWidget->getPageNumber());
+ TQSize pageSize = pageCache->sizeOfPageInPixel(documentWidget->getPageNumber());
if (pageSize != documentWidget->pageSize())
{
documentWidget->setPageSize(pageSize);
@@ -1119,7 +1119,7 @@ void KMultiPage::lastPage()
void KMultiPage::scroll(Q_INT32 deltaInPixel)
{
- QScrollBar* scrollBar = scrollView()->verticalScrollBar();
+ TQScrollBar* scrollBar = scrollView()->verticalScrollBar();
if (scrollBar == 0) {
kdError(4300) << "KMultiPage::scroll called without scrollBar" << endl;
return;
@@ -1168,7 +1168,7 @@ void KMultiPage::scroll(Q_INT32 deltaInPixel)
void KMultiPage::scrollUp()
{
- QScrollBar* scrollBar = scrollView()->verticalScrollBar();
+ TQScrollBar* scrollBar = scrollView()->verticalScrollBar();
if (scrollBar == 0)
return;
@@ -1178,7 +1178,7 @@ void KMultiPage::scrollUp()
void KMultiPage::scrollDown()
{
- QScrollBar* scrollBar = scrollView()->verticalScrollBar();
+ TQScrollBar* scrollBar = scrollView()->verticalScrollBar();
if (scrollBar == 0)
return;
@@ -1187,7 +1187,7 @@ void KMultiPage::scrollDown()
void KMultiPage::scrollLeft()
{
- QScrollBar* scrollBar = scrollView()->horizontalScrollBar();
+ TQScrollBar* scrollBar = scrollView()->horizontalScrollBar();
if (scrollBar)
scrollBar->subtractLine();
}
@@ -1195,7 +1195,7 @@ void KMultiPage::scrollLeft()
void KMultiPage::scrollRight()
{
- QScrollBar* scrollBar = scrollView()->horizontalScrollBar();
+ TQScrollBar* scrollBar = scrollView()->horizontalScrollBar();
if (scrollBar)
scrollBar->addLine();
}
@@ -1203,7 +1203,7 @@ void KMultiPage::scrollRight()
void KMultiPage::scrollUpPage()
{
- QScrollBar* scrollBar = scrollView()->verticalScrollBar();
+ TQScrollBar* scrollBar = scrollView()->verticalScrollBar();
if (scrollBar)
scrollBar->subtractPage();
}
@@ -1211,7 +1211,7 @@ void KMultiPage::scrollUpPage()
void KMultiPage::scrollDownPage()
{
- QScrollBar* scrollBar = scrollView()->verticalScrollBar();
+ TQScrollBar* scrollBar = scrollView()->verticalScrollBar();
if (scrollBar)
scrollBar->addPage();
}
@@ -1219,7 +1219,7 @@ void KMultiPage::scrollDownPage()
void KMultiPage::scrollLeftPage()
{
- QScrollBar* scrollBar = scrollView()->horizontalScrollBar();
+ TQScrollBar* scrollBar = scrollView()->horizontalScrollBar();
if (scrollBar)
scrollBar->subtractPage();
}
@@ -1227,7 +1227,7 @@ void KMultiPage::scrollLeftPage()
void KMultiPage::scrollRightPage()
{
- QScrollBar* scrollBar = scrollView()->horizontalScrollBar();
+ TQScrollBar* scrollBar = scrollView()->horizontalScrollBar();
if (scrollBar)
scrollBar->addPage();
}
@@ -1273,7 +1273,7 @@ void KMultiPage::readUp()
}
-void KMultiPage::jumpToReference(const QString& reference)
+void KMultiPage::jumpToReference(const TQString& reference)
{
if (renderer.isNull())
return;
@@ -1379,7 +1379,7 @@ void KMultiPage::findNextText()
// If not we need to delete it manually to avoid a memory leak.
bool cachedPage = false;
- QString searchText = searchWidget->getText();
+ TQString searchText = searchWidget->getText();
if (searchText.isEmpty())
{
@@ -1479,7 +1479,7 @@ void KMultiPage::findNextText()
if (answ != KMessageBox::Yes)
{
- setStatusBarText(QString::null);
+ setStatusBarText(TQString::null);
searchInProgress = false;
if (!cachedPage)
delete searchPage;
@@ -1491,7 +1491,7 @@ void KMultiPage::findNextText()
{
pageCache->selectText(foundSelection);
gotoPage(pageCache->selectedText());
- setStatusBarText(QString::null);
+ setStatusBarText(TQString::null);
searchInProgress = false;
if (!cachedPage)
delete searchPage;
@@ -1500,7 +1500,7 @@ void KMultiPage::findNextText()
}
KMessageBox::sorry(scrollView(), i18n("<qt>The search string <strong>%1</strong> could not be found.</qt>").arg(searchText));
- setStatusBarText(QString::null);
+ setStatusBarText(TQString::null);
searchInProgress = false;
if (!cachedPage)
delete searchPage;
@@ -1519,7 +1519,7 @@ void KMultiPage::findPrevText()
// If not we need to delete it manually to avoid a memory leak.
bool cachedPage = false;
- QString searchText = searchWidget->getText();
+ TQString searchText = searchWidget->getText();
if (searchText.isEmpty())
{
@@ -1621,7 +1621,7 @@ void KMultiPage::findPrevText()
if (answ != KMessageBox::Yes)
{
- setStatusBarText(QString::null);
+ setStatusBarText(TQString::null);
searchInProgress = false;
if (!cachedPage)
delete searchPage;
@@ -1633,7 +1633,7 @@ void KMultiPage::findPrevText()
{
pageCache->selectText(foundSelection);
gotoPage(pageCache->selectedText());
- setStatusBarText(QString::null);
+ setStatusBarText(TQString::null);
searchInProgress = false;
if (!cachedPage)
delete searchPage;
@@ -1642,7 +1642,7 @@ void KMultiPage::findPrevText()
}
KMessageBox::sorry(scrollView(), i18n("<qt>The search string <strong>%1</strong> could not be found.</qt>").arg(searchText));
- setStatusBarText(QString::null);
+ setStatusBarText(TQString::null);
searchInProgress = false;
if (!cachedPage)
delete searchPage;
@@ -1686,7 +1686,7 @@ void KMultiPage::copyText()
pageCache->selectedText().copyText();
}
-void KMultiPage::timerEvent( QTimerEvent * )
+void KMultiPage::timerEvent( TQTimerEvent * )
{
#ifdef KMULTIPAGE_DEBUG
kdDebug(4300) << "Timer Event " << endl;
@@ -1728,7 +1728,7 @@ void KMultiPage::reload()
setCurrentPageNumber(pg);
setFile(r);
- emit setStatusBarText(QString::null);
+ emit setStatusBarText(TQString::null);
} else {
if (timer_id == -1)
timer_id = startTimer(1000);
@@ -1758,25 +1758,25 @@ bool KMultiPage::openFile()
markList()->clear();
markList()->setNumberOfPages(numberOfPages(), KVSPrefs::showThumbnails());
- QString reference = url().ref();
+ TQString reference = url().ref();
if (!reference.isEmpty())
gotoPage(renderer->parseReference(reference));
// Set Table of Contents
tableOfContents->setContents(renderer->getBookmarks());
} else
- m_file = QString::null;
+ m_file = TQString::null;
setFile(r);
// Clear Statusbar
- emit setStatusBarText(QString::null);
+ emit setStatusBarText(TQString::null);
return r;
}
-bool KMultiPage::openURL(const QString &filename, const KURL &base_url)
+bool KMultiPage::openURL(const TQString &filename, const KURL &base_url)
{
m_file = filename;
m_url = base_url;
@@ -1794,9 +1794,9 @@ void KMultiPage::enableActions(bool fileLoaded)
Q_UNUSED(fileLoaded);
}
-void KMultiPage::wheelEvent(QWheelEvent *e)
+void KMultiPage::wheelEvent(TQWheelEvent *e)
{
- QScrollBar *sb = scrollView()->verticalScrollBar();
+ TQScrollBar *sb = scrollView()->verticalScrollBar();
if (sb == 0)
return;
@@ -1858,22 +1858,22 @@ KPrinter *KMultiPage::getPrinter(bool enablePageSizeFeatures)
// printer. We try to be smart and optimize the list by using ranges
// ("5-11") wherever possible. The user will be tankful for
// that. Complicated? Yeah, but that's life.
- QValueList<int> selectedPageNo = selectedPages();
+ TQValueList<int> selectedPageNo = selectedPages();
if (selectedPageNo.isEmpty() == true)
printer->setOption( "kde-range", "" );
else {
int commaflag = 0;
- QString range;
- QValueList<int>::ConstIterator it = selectedPageNo.begin();
+ TQString range;
+ TQValueList<int>::ConstIterator it = selectedPageNo.begin();
do{
int val = *it;
if (commaflag == 1)
- range += QString(", ");
+ range += TQString(", ");
else
commaflag = 1;
int endval = val;
if (it != selectedPageNo.end()) {
- QValueList<int>::ConstIterator jt = it;
+ TQValueList<int>::ConstIterator jt = it;
jt++;
do{
int val2 = *jt;
@@ -1887,9 +1887,9 @@ KPrinter *KMultiPage::getPrinter(bool enablePageSizeFeatures)
} else
it++;
if (endval == val)
- range += QString("%1").arg(val);
+ range += TQString("%1").arg(val);
else
- range += QString("%1-%2").arg(val).arg(endval);
+ range += TQString("%1-%2").arg(val).arg(endval);
} while (it != selectedPageNo.end() );
printer->setOption( "kde-range", range );
}
@@ -1900,15 +1900,15 @@ KPrinter *KMultiPage::getPrinter(bool enablePageSizeFeatures)
void KMultiPage::doExportText()
{
// Generate a suggestion for a reasonable file name
- QString suggestedName = url().filename();
+ TQString suggestedName = url().filename();
suggestedName = suggestedName.left(suggestedName.find(".")) + ".txt";
- QString fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.txt|Plain Text (Latin 1) (*.txt)"), scrollView(), i18n("Export File As"));
+ TQString fileName = KFileDialog::getSaveFileName(suggestedName, i18n("*.txt|Plain Text (Latin 1) (*.txt)"), scrollView(), i18n("Export File As"));
if (fileName.isEmpty())
return;
- QFileInfo finfo(fileName);
+ TQFileInfo finfo(fileName);
if (finfo.exists())
{
int r = KMessageBox::warningContinueCancel (scrollView(),
@@ -1919,11 +1919,11 @@ void KMultiPage::doExportText()
return;
}
- QFile textFile(fileName);
+ TQFile textFile(fileName);
textFile.open(IO_WriteOnly);
- QTextStream stream(&textFile);
+ TQTextStream stream(&textFile);
- QProgressDialog progress(i18n("Exporting to text..."), i18n("Abort"), renderer->totalPages(),
+ TQProgressDialog progress(i18n("Exporting to text..."), i18n("Abort"), renderer->totalPages(),
scrollView(), "export_text_progress", true);
progress.setMinimumDuration(300);
diff --git a/kviewshell/kmultipage.h b/kviewshell/kmultipage.h
index 7f24a809..285031ca 100644
--- a/kviewshell/kmultipage.h
+++ b/kviewshell/kmultipage.h
@@ -10,7 +10,7 @@
#include "marklist.h"
#include <kparts/part.h>
-#include <qtimer.h>
+#include <tqtimer.h>
class Anchor;
class DocumentWidget;
@@ -18,9 +18,9 @@ class KConfigDialog;
class KPrintDialogPage_PageOptions;
class KPrinter;
class PageView;
-class QPainter;
-class QSplitter;
-class QToolBox;
+class TQPainter;
+class TQSplitter;
+class TQToolBox;
class simplePageSize;
class TableOfContents;
class PageNumber;
@@ -39,25 +39,25 @@ class KMultiPage : public KParts::ReadOnlyPart, virtual public kmultipageInterfa
Q_OBJECT
public:
- KMultiPage(QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name);
+ KMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name);
virtual ~KMultiPage();
/* returns the scrollview used for the display */
- virtual QWidget* mainWidget() {return _scrollView;}
+ virtual TQWidget* mainWidget() {return _scrollView;}
/* Methods which are associated with the DCOP functionality of the
kmultipage. This method returns the file name (not the URL) of
the currently loaded file. */
- QString name_of_current_file();
+ TQString name_of_current_file();
/* Methods which are associated with the DCOP functionality of the
kmultipage. This method can be implemented by the multipage,
e.g. to jump to a certain location. */
- virtual ASYNC jumpToReference(const QString& /*reference*/);
+ virtual ASYNC jumpToReference(const TQString& /*reference*/);
/* Methods which are associated with the DCOP functionality of the
kmultipage. This method checks if a given file is loaded. */
- bool is_file_loaded(const QString& filename);
+ bool is_file_loaded(const TQString& filename);
/* Opens file and sets URL
@@ -78,7 +78,7 @@ public:
@returns true on success, false on failure
*/
- virtual bool openURL(const QString &filename, const KURL &base_url);
+ virtual bool openURL(const TQString &filename, const KURL &base_url);
/** Prints a document
@@ -130,7 +130,7 @@ public:
printer->pageList() gives a list of pages to be printed, where "1"
denotes the first page, "2" the second, etc.> ...
- printer->printFiles( QStringList(tmpPSFile), true );
+ printer->printFiles( TQStringList(tmpPSFile), true );
delete printer;
@endcode
@@ -173,7 +173,7 @@ public:
printer->pageList() gives a list of pages to be printed, where "1"
denotes the first page, "2" the second, etc.> ...
- printer->printFiles( QStringList(tmpPSFile), true );
+ printer->printFiles( TQStringList(tmpPSFile), true );
delete printer;
@endcode
@@ -214,7 +214,7 @@ public:
kviewshell will not allow the user to see and select compressed
dvi-files.
*/
- virtual QStringList fileFormats() const = 0;
+ virtual TQStringList fileFormats() const = 0;
/// closes a file
virtual bool closeURL();
@@ -262,7 +262,7 @@ public:
@returns a list with the numbers of the currently selected
pages. */
- virtual QValueList<int> selectedPages() {return markList()->selectedPages();}
+ virtual TQValueList<int> selectedPages() {return markList()->selectedPages();}
virtual History* history() { return &document_history; }
@@ -361,7 +361,7 @@ protected:
virtual void initializePageCache();
/* Returns a pointer to the renderer. */
- virtual QGuardedPtr<DocumentRenderer> getRenderer() const { return renderer; }
+ virtual TQGuardedPtr<DocumentRenderer> getRenderer() const { return renderer; }
PageView* scrollView() { return _scrollView; }
@@ -496,7 +496,7 @@ protected slots:
void gotoPage(const TextSelection&);
private slots:
- void handleLocalLink(const QString &linkText);
+ void handleLocalLink(const TQString &linkText);
signals:
/** Emitted with argument "true" when the move tool is selected, and
@@ -539,7 +539,7 @@ public slots:
from the multipage/scrollview. This method calles scroll, a
delta-value of 120 (i.e. one notch on a standard wheel mouse)
scrolls by two 'lines'. */
- void wheelEvent(QWheelEvent *);
+ void wheelEvent(TQWheelEvent *);
protected:
/** Allocates and initializes a KPrinter structure
@@ -568,9 +568,9 @@ protected:
This pointer is automatically set by the constructor.
*/
- QGuardedPtr<QWidget> parentWdg;
+ TQGuardedPtr<TQWidget> parentWdg;
- QPtrVector<DocumentWidget> widgetList;
+ TQPtrVector<DocumentWidget> widgetList;
History document_history;
@@ -614,7 +614,7 @@ private:
timer. It may well happen that KDirWatch calls us several times
while we are waiting for the file to become good, but that does
not do any harm. */
- void timerEvent( QTimerEvent *e );
+ void timerEvent( TQTimerEvent *e );
/* This method opens a file and sets up the GUI when the file is
loaded. It calls setFile() so that implementations of kmultipage
@@ -622,16 +622,16 @@ private:
bool openFile();
/* Is set by setRenderer. */
- QGuardedPtr<DocumentRenderer> renderer;
+ TQGuardedPtr<DocumentRenderer> renderer;
PageView *_scrollView;
SearchWidget* searchWidget;
- QToolBox* sideBar;
+ TQToolBox* sideBar;
MarkList* _markList;
TableOfContents* tableOfContents;
- QSplitter* splitterWidget;
+ TQSplitter* splitterWidget;
/* This timer is used to implement a brief delay when the user
scrolls past the beginning or the end of the page before a the
@@ -639,7 +639,7 @@ private:
the user to scroll with the mouse wheel or the keyboard without
involuntarily moving to another page. The timer is used in the
scroll() method. */
- QTimer changePageDelayTimer;
+ TQTimer changePageDelayTimer;
// This is set to true while a text search is performed.
// If set to false the search is interrupted.
diff --git a/kviewshell/kmultipageInterface.h b/kviewshell/kmultipageInterface.h
index 0ad6e914..4c498900 100644
--- a/kviewshell/kmultipageInterface.h
+++ b/kviewshell/kmultipageInterface.h
@@ -9,9 +9,9 @@ class kmultipageInterface : virtual public DCOPObject
K_DCOP
k_dcop:
- virtual ASYNC jumpToReference(const QString& reference) = 0;
- virtual QString name_of_current_file() = 0;
- virtual bool is_file_loaded(const QString& filename) = 0;
+ virtual ASYNC jumpToReference(const TQString& reference) = 0;
+ virtual TQString name_of_current_file() = 0;
+ virtual bool is_file_loaded(const TQString& filename) = 0;
};
#endif
diff --git a/kviewshell/kprintDialogPage_pageoptions.cpp b/kviewshell/kprintDialogPage_pageoptions.cpp
index dbadd759..c0c4b15e 100644
--- a/kviewshell/kprintDialogPage_pageoptions.cpp
+++ b/kviewshell/kprintDialogPage_pageoptions.cpp
@@ -10,17 +10,17 @@
#include <config.h>
#include <klocale.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
#include "kprintDialogPage_pageoptions.h"
-KPrintDialogPage_PageOptions::KPrintDialogPage_PageOptions( QWidget *parent, const char *name )
+KPrintDialogPage_PageOptions::KPrintDialogPage_PageOptions( TQWidget *parent, const char *name )
: KPrintDialogPage( parent, name )
{
setTitle( i18n("Page Size & Placement") );
@@ -31,27 +31,27 @@ KPrintDialogPage_PageOptions::KPrintDialogPage_PageOptions( QWidget *parent, con
checkBox_shrink = 0;
checkBox_expand = 0;
- kprintDialogPage_pageoptions_baseLayout = new QVBoxLayout( this, 11, 6, "kprintDialogPage_pageoptions_baseLayout");
+ kprintDialogPage_pageoptions_baseLayout = new TQVBoxLayout( this, 11, 6, "kprintDialogPage_pageoptions_baseLayout");
if (kprintDialogPage_pageoptions_baseLayout == 0) {
kdError(1223) << "KPrintDialogPage_PageOptions::KPrintDialogPage_PageOptions() cannot create layout" << endl;
return;
}
- checkBox_center = new QCheckBox( this, "checkBox_center" );
+ checkBox_center = new TQCheckBox( this, "checkBox_center" );
if (checkBox_center != 0) {
checkBox_center->setText( i18n( "Center the page on paper" ) );
- QToolTip::add( checkBox_center, i18n( "If this option is enabled, the pages are centered on the paper." ) );
- QWhatsThis::add( checkBox_center, i18n( "<qt><p>If this option is enabled, the pages will be printed centered on the paper; this makes "
+ TQToolTip::add( checkBox_center, i18n( "If this option is enabled, the pages are centered on the paper." ) );
+ TQWhatsThis::add( checkBox_center, i18n( "<qt><p>If this option is enabled, the pages will be printed centered on the paper; this makes "
"more visually-appealing printouts.</p>"
"<p>If the option is not enabled, all pages will be placed in the top-left corner of the paper.</p></qt>" ) );
kprintDialogPage_pageoptions_baseLayout->addWidget( checkBox_center );
}
- checkBox_rotate = new QCheckBox( this, "checkBox_rotate" );
+ checkBox_rotate = new TQCheckBox( this, "checkBox_rotate" );
if (checkBox_rotate != 0) {
checkBox_rotate->setText( i18n( "Automatically choose landscape or portrait orientation" ) );
- QToolTip::add( checkBox_rotate, i18n( "If this option is enabled, some pages might be rotated to better fit the paper size." ) );
- QWhatsThis::add( checkBox_rotate, i18n( "<qt><p>If this option is enabled, landscape or portrait orientation are automatically chosen on a "
+ TQToolTip::add( checkBox_rotate, i18n( "If this option is enabled, some pages might be rotated to better fit the paper size." ) );
+ TQWhatsThis::add( checkBox_rotate, i18n( "<qt><p>If this option is enabled, landscape or portrait orientation are automatically chosen on a "
"page-by-page basis. This makes better use of the paper and gives more visually-"
"appealing printouts.</p>"
"<p><b>Note:</b> This option overrides the Portrait/Landscape option chosen in the printer "
@@ -60,30 +60,30 @@ KPrintDialogPage_PageOptions::KPrintDialogPage_PageOptions( QWidget *parent, con
kprintDialogPage_pageoptions_baseLayout->addWidget( checkBox_rotate );
}
- QFrame *line = new QFrame( this, "line1" );
+ TQFrame *line = new TQFrame( this, "line1" );
if (line != 0) {
- line->setFrameShape( QFrame::HLine );
- line->setFrameShadow( QFrame::Sunken );
- line->setFrameShape( QFrame::HLine );
+ line->setFrameShape( TQFrame::HLine );
+ line->setFrameShadow( TQFrame::Sunken );
+ line->setFrameShape( TQFrame::HLine );
kprintDialogPage_pageoptions_baseLayout->addWidget( line );
}
- checkBox_shrink = new QCheckBox( this, "checkBox_shrink" );
+ checkBox_shrink = new TQCheckBox( this, "checkBox_shrink" );
if (checkBox_shrink != 0) {
checkBox_shrink->setText( i18n( "Shrink oversized pages to fit paper size" ) );
- QToolTip::add( checkBox_shrink, i18n( "If this option is enabled, large pages that would not fit the printer's paper size will be shrunk." ) );
- QWhatsThis::add( checkBox_shrink, i18n( "<qt><p>If this option is enabled, large pages that would not fit the printer's paper size will be "
+ TQToolTip::add( checkBox_shrink, i18n( "If this option is enabled, large pages that would not fit the printer's paper size will be shrunk." ) );
+ TQWhatsThis::add( checkBox_shrink, i18n( "<qt><p>If this option is enabled, large pages that would not fit the printer's paper size will be "
"shrunk so that edges won't be cut off during printing.</p>"
"<p><b>Note:</b> If this option is enabled, and if the pages in your document have different sizes, "
"then different pages might be shrunk by different scaling factors.</p></qt>" ) );
kprintDialogPage_pageoptions_baseLayout->addWidget( checkBox_shrink );
}
- checkBox_expand = new QCheckBox( this, "checkBox_expand" );
+ checkBox_expand = new TQCheckBox( this, "checkBox_expand" );
if (checkBox_expand != 0) {
checkBox_expand->setText( i18n( "Expand small pages to fit paper size" ) );
- QToolTip::add( checkBox_expand, i18n( "If this option is enabled, small pages will be enlarged so that they fit the printer's paper size." ) );
- QWhatsThis::add( checkBox_expand, i18n( "<qt><p>If this option is enabled, small pages will be enlarged so that they fit the printer's "
+ TQToolTip::add( checkBox_expand, i18n( "If this option is enabled, small pages will be enlarged so that they fit the printer's paper size." ) );
+ TQWhatsThis::add( checkBox_expand, i18n( "<qt><p>If this option is enabled, small pages will be enlarged so that they fit the printer's "
"paper size.</p>"
"<p><b>Note:</b> If this option is enabled, and if the pages in your document have different sizes, "
"then different pages might be expanded by different scaling factors.</p></qt>" ) );
@@ -91,13 +91,13 @@ KPrintDialogPage_PageOptions::KPrintDialogPage_PageOptions( QWidget *parent, con
}
- resize( QSize(319, 166).expandedTo(minimumSizeHint()) );
+ resize( TQSize(319, 166).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
}
-void KPrintDialogPage_PageOptions::getOptions( QMap<QString,QString>& opts, bool incldef )
+void KPrintDialogPage_PageOptions::getOptions( TQMap<TQString,TQString>& opts, bool incldef )
{
// Save options, taking default values into consideration: by
// default "center" is checked, "expand" and "shrink" are
@@ -134,12 +134,12 @@ void KPrintDialogPage_PageOptions::getOptions( QMap<QString,QString>& opts, bool
}
-void KPrintDialogPage_PageOptions::setOptions( const QMap<QString,QString>& opts )
+void KPrintDialogPage_PageOptions::setOptions( const TQMap<TQString,TQString>& opts )
{
// Sets the centering option. By default, this option is
// checked. Warning: All default values are also coded into
// getOptions() and kmultipage::print(..).
- QString op = opts[ "kde-kviewshell-centerpage" ];
+ TQString op = opts[ "kde-kviewshell-centerpage" ];
if (checkBox_center != 0)
checkBox_center->setChecked( op != "false" );
@@ -160,7 +160,7 @@ void KPrintDialogPage_PageOptions::setOptions( const QMap<QString,QString>& opts
}
-bool KPrintDialogPage_PageOptions::isValid( QString& )
+bool KPrintDialogPage_PageOptions::isValid( TQString& )
{
return true;
}
diff --git a/kviewshell/kprintDialogPage_pageoptions.h b/kviewshell/kprintDialogPage_pageoptions.h
index 0c274248..8fea375f 100644
--- a/kviewshell/kprintDialogPage_pageoptions.h
+++ b/kviewshell/kprintDialogPage_pageoptions.h
@@ -13,8 +13,8 @@
#include <kdeprint/kprintdialogpage.h>
-class QCheckBox;
-class QVBoxLayout;
+class TQCheckBox;
+class TQVBoxLayout;
// This is a fairly standard KPrintDialogPage that allows the user to
@@ -24,19 +24,19 @@ class QVBoxLayout;
class KPrintDialogPage_PageOptions : public KPrintDialogPage
{
public:
- KPrintDialogPage_PageOptions( QWidget *parent = 0, const char *name = 0 );
+ KPrintDialogPage_PageOptions( TQWidget *parent = 0, const char *name = 0 );
- void getOptions( QMap<QString,QString>& opts, bool incldef = false );
- void setOptions( const QMap<QString,QString>& opts );
- bool isValid( QString& msg );
+ void getOptions( TQMap<TQString,TQString>& opts, bool incldef = false );
+ void setOptions( const TQMap<TQString,TQString>& opts );
+ bool isValid( TQString& msg );
- QCheckBox* checkBox_center;
- QCheckBox* checkBox_rotate;
- QCheckBox* checkBox_shrink;
- QCheckBox* checkBox_expand;
+ TQCheckBox* checkBox_center;
+ TQCheckBox* checkBox_rotate;
+ TQCheckBox* checkBox_shrink;
+ TQCheckBox* checkBox_expand;
private:
- QVBoxLayout* kprintDialogPage_pageoptions_baseLayout;
+ TQVBoxLayout* kprintDialogPage_pageoptions_baseLayout;
};
diff --git a/kviewshell/kviewpart.cpp b/kviewshell/kviewpart.cpp
index ef21dca7..56e13b64 100644
--- a/kviewshell/kviewpart.cpp
+++ b/kviewshell/kviewpart.cpp
@@ -1,12 +1,12 @@
-#include <qfileinfo.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qscrollview.h>
-#include <qscrollbar.h>
-#include <qtimer.h>
-#include <qpainter.h>
-#include <qprinter.h>
-#include <qprintdialog.h>
+#include <tqfileinfo.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqscrollview.h>
+#include <tqscrollbar.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
+#include <tqprinter.h>
+#include <tqprintdialog.h>
#include <kaboutdialog.h>
#include <kaccel.h>
@@ -56,10 +56,10 @@
typedef KParts::GenericFactory<KViewPart> KViewPartFactory;
K_EXPORT_COMPONENT_FACTORY(kviewerpart, KViewPartFactory)
-KViewPart::KViewPart(QWidget *parentWidget, const char *widgetName, QObject *parent,
- const char *name, const QStringList& args)
+KViewPart::KViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *parent,
+ const char *name, const TQStringList& args)
: KViewPart_Iface(parent, name), showSidebar(0), saveAction(0), partManager(0),
- multiPageLibrary(QString::null), aboutDialog(0)
+ multiPageLibrary(TQString::null), aboutDialog(0)
{
KGlobal::locale()->insertCatalogue("kviewshell");
@@ -68,11 +68,11 @@ KViewPart::KViewPart(QWidget *parentWidget, const char *widgetName, QObject *par
setInstance(KViewPartFactory::instance());
watch = KDirWatch::self();
- connect(watch, SIGNAL(dirty(const QString&)), this, SLOT(fileChanged(const QString&)));
+ connect(watch, TQT_SIGNAL(dirty(const TQString&)), this, TQT_SLOT(fileChanged(const TQString&)));
watch->startScan();
- mainWidget = new QHBox(parentWidget, widgetName);
- mainWidget->setFocusPolicy(QWidget::StrongFocus);
+ mainWidget = new TQHBox(parentWidget, widgetName);
+ mainWidget->setFocusPolicy(TQWidget::StrongFocus);
setWidget(mainWidget);
// Setup part manager
@@ -83,7 +83,7 @@ KViewPart::KViewPart(QWidget *parentWidget, const char *widgetName, QObject *par
// Without this the GUI-items of the KMultiPages are not merged
partManager->setAllowNestedParts(true);
- connect(partManager, SIGNAL(activePartChanged(KParts::Part*)), this, SIGNAL(pluginChanged(KParts::Part*)));
+ connect(partManager, TQT_SIGNAL(activePartChanged(KParts::Part*)), this, TQT_SIGNAL(pluginChanged(KParts::Part*)));
partManager->addPart(this);
// create the displaying part
@@ -94,10 +94,10 @@ KViewPart::KViewPart(QWidget *parentWidget, const char *widgetName, QObject *par
if (!args.isEmpty())
{
// If a default MimeType is specified try to load a MultiPage supporting it.
- QString defaultMimeType = args.first();
+ TQString defaultMimeType = args.first();
offers = KTrader::self()->query(
- QString::fromLatin1("KViewShell/MultiPage" ),
- QString("([X-KDE-MultiPageVersion] == %1) and "
+ TQString::fromLatin1("KViewShell/MultiPage" ),
+ TQString("([X-KDE-MultiPageVersion] == %1) and "
"([X-KDE-MimeTypes] == '%2')").arg(MULTIPAGE_VERSION).arg(defaultMimeType));
}
@@ -105,8 +105,8 @@ KViewPart::KViewPart(QWidget *parentWidget, const char *widgetName, QObject *par
if (offers.isEmpty())
{
offers = KTrader::self()->query(
- QString::fromLatin1("KViewShell/MultiPage" ),
- QString("([X-KDE-MultiPageVersion] == %1) and "
+ TQString::fromLatin1("KViewShell/MultiPage" ),
+ TQString("([X-KDE-MultiPageVersion] == %1) and "
"([X-KDE-EmptyMultiPage] == 1)").arg(MULTIPAGE_VERSION));
}
@@ -123,11 +123,11 @@ KViewPart::KViewPart(QWidget *parentWidget, const char *widgetName, QObject *par
// Try to load the multiPage
int error;
multiPage = static_cast<KMultiPage*>(KParts::ComponentFactory::createInstanceFromService<KParts::ReadOnlyPart>(service, mainWidget,
- service->name().utf8(), QStringList(), &error ));
+ service->name().utf8(), TQStringList(), &error ));
// If the loading of the MultiPage failed report and error and abort.
if (!multiPage) {
- QString reason;
+ TQString reason;
switch(error) {
case KParts::ComponentFactory::ErrNoServiceFound:
reason = i18n("<qt>No service implementing the given mimetype and fullfilling the given constraint expression can be found.</qt>");
@@ -147,7 +147,7 @@ KViewPart::KViewPart(QWidget *parentWidget, const char *widgetName, QObject *par
break;
}
- QString text = i18n("<qt><p><b>Problem:</b> The document <b>%1</b> cannot be shown.</p>"
+ TQString text = i18n("<qt><p><b>Problem:</b> The document <b>%1</b> cannot be shown.</p>"
"<p><b>Reason:</b> The software component <b>%2</b> which is required to "
"display your files could not be initialized. This could point to "
"serious misconfiguration of your KDE system, or to damaged program files.</p>"
@@ -156,9 +156,9 @@ KViewPart::KViewPart(QWidget *parentWidget, const char *widgetName, QObject *par
"provider of your software (e.g. the vendor of your Linux distribution), or "
"directly to the authors of the software. The entry <b>Report Bug...</b> in the "
"<b>Help</b> menu helps you to contact the KDE programmers.</p></qt>").arg(m_file).arg(service->library());
- QString caption = i18n("Error Initializing Software Component");
+ TQString caption = i18n("Error Initializing Software Component");
KMessageBox::detailedError(mainWidget, text, reason, caption);
- emit setStatusBarText(QString::null);
+ emit setStatusBarText(TQString::null);
return;
}
// Make the KViewPart the parent of the MultiPage.
@@ -170,35 +170,35 @@ KViewPart::KViewPart(QWidget *parentWidget, const char *widgetName, QObject *par
// Add the multipage to the GUI.
partManager->addPart(multiPage);
- exportTextAction = new KAction(i18n("Text..."), 0, this, SLOT(mp_exportText()), actionCollection(), "export_text");
+ exportTextAction = new KAction(i18n("Text..."), 0, this, TQT_SLOT(mp_exportText()), actionCollection(), "export_text");
// edit menu
- findTextAction = KStdAction::find(this, SLOT(mp_showFindTextDialog()), actionCollection(), "find");
- findNextAction = KStdAction::findNext(this, SLOT(mp_findNextText()), actionCollection(), "findnext");
+ findTextAction = KStdAction::find(this, TQT_SLOT(mp_showFindTextDialog()), actionCollection(), "find");
+ findNextAction = KStdAction::findNext(this, TQT_SLOT(mp_findNextText()), actionCollection(), "findnext");
findNextAction->setEnabled(false);
- findPrevAction = KStdAction::findPrev(this, SLOT(mp_findPrevText()), actionCollection(), "findprev");
+ findPrevAction = KStdAction::findPrev(this, TQT_SLOT(mp_findPrevText()), actionCollection(), "findprev");
findPrevAction->setEnabled(false);
- selectAllAction = KStdAction::selectAll(this, SLOT(mp_doSelectAll()), actionCollection(), "edit_select_all");
+ selectAllAction = KStdAction::selectAll(this, TQT_SLOT(mp_doSelectAll()), actionCollection(), "edit_select_all");
- copyTextAction = KStdAction::copy(this, SLOT(mp_copyText()), actionCollection(), "copy_text");
+ copyTextAction = KStdAction::copy(this, TQT_SLOT(mp_copyText()), actionCollection(), "copy_text");
copyTextAction->setEnabled(false);
- deselectAction = KStdAction::deselect(this, SLOT(mp_clearSelection()), actionCollection(), "edit_deselect_all");
+ deselectAction = KStdAction::deselect(this, TQT_SLOT(mp_clearSelection()), actionCollection(), "edit_deselect_all");
deselectAction->setEnabled(false);
- saveAction = KStdAction::save(this, SLOT(mp_slotSave_defaultFilename()), actionCollection());
+ saveAction = KStdAction::save(this, TQT_SLOT(mp_slotSave_defaultFilename()), actionCollection());
// settings menu
showSidebar = new KToggleAction (i18n("Show &Sidebar"), "show_side_panel", 0, this,
- SLOT(slotShowSidebar()), actionCollection(), "show_sidebar");
+ TQT_SLOT(slotShowSidebar()), actionCollection(), "show_sidebar");
showSidebar->setCheckedState(i18n("Hide &Sidebar"));
watchAct = new KToggleAction(i18n("&Watch File"), 0, 0, 0, actionCollection(), "watch_file");
scrollbarHandling = new KToggleAction (i18n("Show Scrollbars"), 0, 0, 0, actionCollection(), "scrollbarHandling");
scrollbarHandling->setCheckedState(i18n("Hide Scrollbars"));
// View modes
- QStringList viewModes;
+ TQStringList viewModes;
viewModes.append(i18n("Single Page"));
viewModes.append(i18n("Continuous"));
viewModes.append(i18n("Continuous - Facing"));
@@ -207,38 +207,38 @@ KViewPart::KViewPart(QWidget *parentWidget, const char *widgetName, QObject *par
viewModeAction->setItems(viewModes);
// Orientation menu
- QStringList orientations;
+ TQStringList orientations;
orientations.append(i18n("Portrait"));
orientations.append(i18n("Landscape"));
orientation = new KSelectAction (i18n("Preferred &Orientation"), 0, 0, 0, actionCollection(), "view_orientation");
orientation->setItems(orientations);
- connect(orientation, SIGNAL(activated (int)), &userRequestedPaperSize, SLOT(setOrientation(int)));
+ connect(orientation, TQT_SIGNAL(activated (int)), &userRequestedPaperSize, TQT_SLOT(setOrientation(int)));
// Zoom Menu
zoom_action = new KSelectAction (i18n("&Zoom"), 0, 0, 0, actionCollection(), "view_zoom");
zoom_action->setEditable(true);
zoom_action->setItems(_zoomVal.zoomNames());
- connect (&_zoomVal, SIGNAL(zoomNamesChanged(const QStringList &)), zoom_action, SLOT(setItems(const QStringList &)));
- connect (&_zoomVal, SIGNAL(valNoChanged(int)), zoom_action, SLOT(setCurrentItem(int)));
- connect (&_zoomVal, SIGNAL(zoomNameChanged(const QString &)), this, SIGNAL(zoomChanged(const QString &)) );
- connect (zoom_action, SIGNAL(activated(const QString &)), this, SLOT(setZoomValue(const QString &)));
+ connect (&_zoomVal, TQT_SIGNAL(zoomNamesChanged(const TQStringList &)), zoom_action, TQT_SLOT(setItems(const TQStringList &)));
+ connect (&_zoomVal, TQT_SIGNAL(valNoChanged(int)), zoom_action, TQT_SLOT(setCurrentItem(int)));
+ connect (&_zoomVal, TQT_SIGNAL(zoomNameChanged(const TQString &)), this, TQT_SIGNAL(zoomChanged(const TQString &)) );
+ connect (zoom_action, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(setZoomValue(const TQString &)));
_zoomVal.setZoomValue(1.0); // should not be necessary @@@@
emit(zoomChanged("100%"));
// Paper Size Menu
media = new KSelectAction (i18n("Preferred Paper &Size"), 0, 0, 0, actionCollection(), "view_media");
- QStringList items = userRequestedPaperSize.pageSizeNames();
+ TQStringList items = userRequestedPaperSize.pageSizeNames();
items.prepend(i18n("Custom Size..."));
media->setItems(items);
- connect (media, SIGNAL(activated(int)), this, SLOT(slotMedia(int)));
+ connect (media, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMedia(int)));
- useDocumentSpecifiedSize = new KToggleAction(i18n("&Use Document Specified Paper Size"), 0, this, SLOT(slotShowSidebar()),
+ useDocumentSpecifiedSize = new KToggleAction(i18n("&Use Document Specified Paper Size"), 0, this, TQT_SLOT(slotShowSidebar()),
actionCollection(), "view_use_document_specified_size");
// Zoom Actions
- zoomInAct = KStdAction::zoomIn (this, SLOT(zoomIn()), actionCollection());
- zoomOutAct = KStdAction::zoomOut(this, SLOT(zoomOut()), actionCollection());
+ zoomInAct = KStdAction::zoomIn (this, TQT_SLOT(zoomIn()), actionCollection());
+ zoomOutAct = KStdAction::zoomOut(this, TQT_SLOT(zoomOut()), actionCollection());
fitPageAct = new KToggleAction(i18n("&Fit to Page"), "view_fit_window", Key_P,
actionCollection(), "view_fit_to_page");
@@ -251,24 +251,24 @@ KViewPart::KViewPart(QWidget *parentWidget, const char *widgetName, QObject *par
fitWidthAct -> setExclusiveGroup("view_fit");
fitHeightAct -> setExclusiveGroup("view_fit");
- connect(fitPageAct, SIGNAL(toggled(bool)), this, SLOT(enableFitToPage(bool)));
- connect(fitWidthAct, SIGNAL(toggled(bool)), this, SLOT(enableFitToWidth(bool)));
- connect(fitHeightAct, SIGNAL(toggled(bool)), this, SLOT(enableFitToHeight(bool)));
+ connect(fitPageAct, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableFitToPage(bool)));
+ connect(fitWidthAct, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableFitToWidth(bool)));
+ connect(fitHeightAct, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableFitToHeight(bool)));
// go menu
- backAct = KStdAction::prior(this, SLOT(mp_prevPage()), actionCollection());
- forwardAct = KStdAction::next(this, SLOT(mp_nextPage()), actionCollection());
- startAct = KStdAction::firstPage(this, SLOT(mp_firstPage()), actionCollection());
- endAct = KStdAction::lastPage(this, SLOT(mp_lastPage()), actionCollection());
- gotoAct = KStdAction::gotoPage(this, SLOT(goToPage()), actionCollection());
+ backAct = KStdAction::prior(this, TQT_SLOT(mp_prevPage()), actionCollection());
+ forwardAct = KStdAction::next(this, TQT_SLOT(mp_nextPage()), actionCollection());
+ startAct = KStdAction::firstPage(this, TQT_SLOT(mp_firstPage()), actionCollection());
+ endAct = KStdAction::lastPage(this, TQT_SLOT(mp_lastPage()), actionCollection());
+ gotoAct = KStdAction::gotoPage(this, TQT_SLOT(goToPage()), actionCollection());
gotoAct->setShortcut("CTRL+G");
- readUpAct = new KAction(i18n("Read Up Document"), "up", SHIFT+Key_Space, this, SLOT(mp_readUp()), actionCollection(), "go_read_up");
- readDownAct = new KAction(i18n("Read Down Document"), "down", Key_Space, this, SLOT(mp_readDown()), actionCollection(), "go_read_down");
+ readUpAct = new KAction(i18n("Read Up Document"), "up", SHIFT+Key_Space, this, TQT_SLOT(mp_readUp()), actionCollection(), "go_read_up");
+ readDownAct = new KAction(i18n("Read Down Document"), "down", Key_Space, this, TQT_SLOT(mp_readDown()), actionCollection(), "go_read_down");
- printAction = KStdAction::print(this, SLOT(slotPrint()), actionCollection());
+ printAction = KStdAction::print(this, TQT_SLOT(slotPrint()), actionCollection());
- saveAsAction = KStdAction::saveAs(this, SLOT(mp_slotSave()), actionCollection());
+ saveAsAction = KStdAction::saveAs(this, TQT_SLOT(mp_slotSave()), actionCollection());
// mode action
moveModeAction = new KRadioAction(i18n("&Move Tool"), "movetool", Key_F4, actionCollection(), "move_tool");
@@ -279,20 +279,20 @@ KViewPart::KViewPart(QWidget *parentWidget, const char *widgetName, QObject *par
moveModeAction->setChecked(true);
- connect(moveModeAction, SIGNAL(toggled(bool)), this, SLOT(slotEnableMoveTool(bool)));
- //connect(selectionModeAction, SIGNAL(toggled(bool)), this, SLOT(slotEnableSelectionTool(bool)));
+ connect(moveModeAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEnableMoveTool(bool)));
+ //connect(selectionModeAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEnableSelectionTool(bool)));
// history action
backAction = new KAction(i18n("&Back"), "1leftarrow", 0,
- this, SLOT(mp_doGoBack()), actionCollection(), "go_back");
+ this, TQT_SLOT(mp_doGoBack()), actionCollection(), "go_back");
forwardAction = new KAction(i18n("&Forward"), "1rightarrow", 0,
- this, SLOT(mp_doGoForward()), actionCollection(), "go_forward");
+ this, TQT_SLOT(mp_doGoForward()), actionCollection(), "go_forward");
backAction->setEnabled(false);
forwardAction->setEnabled(false);
- settingsAction = KStdAction::preferences(this, SLOT(doSettings()), actionCollection());
+ settingsAction = KStdAction::preferences(this, TQT_SLOT(doSettings()), actionCollection());
// We only show this menuitem if no default mimetype is set. This usually means kviewshell
// has been started by itself. Otherwise if KDVI or KFaxView has been started show the
@@ -300,20 +300,20 @@ KViewPart::KViewPart(QWidget *parentWidget, const char *widgetName, QObject *par
if (!args.isEmpty())
{
aboutAction = new KAction(i18n("About KViewShell"), "kviewshell", 0, this,
- SLOT(aboutKViewShell()), actionCollection(), "help_about_kviewshell");
+ TQT_SLOT(aboutKViewShell()), actionCollection(), "help_about_kviewshell");
}
// keyboard accelerators
accel = new KAccel(mainWidget);
- accel->insert(I18N_NOOP("Scroll Up"), Key_Up, this, SLOT(mp_scrollUp()));
- accel->insert(I18N_NOOP("Scroll Down"), Key_Down, this, SLOT(mp_scrollDown()));
- accel->insert(I18N_NOOP("Scroll Left"), Key_Left, this, SLOT(mp_scrollLeft()));
- accel->insert(I18N_NOOP("Scroll Right"), Key_Right, this, SLOT(mp_scrollRight()));
+ accel->insert(I18N_NOOP("Scroll Up"), Key_Up, this, TQT_SLOT(mp_scrollUp()));
+ accel->insert(I18N_NOOP("Scroll Down"), Key_Down, this, TQT_SLOT(mp_scrollDown()));
+ accel->insert(I18N_NOOP("Scroll Left"), Key_Left, this, TQT_SLOT(mp_scrollLeft()));
+ accel->insert(I18N_NOOP("Scroll Right"), Key_Right, this, TQT_SLOT(mp_scrollRight()));
- accel->insert(I18N_NOOP("Scroll Up Page"), SHIFT+Key_Up, this, SLOT(mp_scrollUpPage()));
- accel->insert(I18N_NOOP("Scroll Down Page"), SHIFT+Key_Down, this, SLOT(mp_scrollDownPage()));
- accel->insert(I18N_NOOP("Scroll Left Page"), SHIFT+Key_Left, this, SLOT(mp_scrollLeftPage()));
- accel->insert(I18N_NOOP("Scroll Right Page"), SHIFT+Key_Right, this, SLOT(mp_scrollRightPage()));
+ accel->insert(I18N_NOOP("Scroll Up Page"), SHIFT+Key_Up, this, TQT_SLOT(mp_scrollUpPage()));
+ accel->insert(I18N_NOOP("Scroll Down Page"), SHIFT+Key_Down, this, TQT_SLOT(mp_scrollDownPage()));
+ accel->insert(I18N_NOOP("Scroll Left Page"), SHIFT+Key_Left, this, TQT_SLOT(mp_scrollLeftPage()));
+ accel->insert(I18N_NOOP("Scroll Right Page"), SHIFT+Key_Right, this, TQT_SLOT(mp_scrollRightPage()));
accel->readSettings();
readSettings();
@@ -333,7 +333,7 @@ KViewPart::KViewPart(QWidget *parentWidget, const char *widgetName, QObject *par
// We disconnect because we dont want some FocusEvents to trigger a GUI update, which might mess
// with our menus.
- disconnect(partManager, SIGNAL(activePartChanged(KParts::Part*)), this, SIGNAL(pluginChanged(KParts::Part*)));
+ disconnect(partManager, TQT_SIGNAL(activePartChanged(KParts::Part*)), this, TQT_SIGNAL(pluginChanged(KParts::Part*)));
}
KViewPart::~KViewPart()
@@ -360,41 +360,41 @@ void KViewPart::initializeMultiPage()
// Paper Size handling
multiPage->setUseDocumentSpecifiedSize(useDocumentSpecifiedSize->isChecked());
multiPage->setUserPreferredSize(userRequestedPaperSize);
- connect(&userRequestedPaperSize, SIGNAL(sizeChanged(const SimplePageSize&)), multiPage, SLOT(setUserPreferredSize(const SimplePageSize&)));
- connect(useDocumentSpecifiedSize, SIGNAL(toggled(bool)), multiPage, SLOT(setUseDocumentSpecifiedSize(bool)));
+ connect(&userRequestedPaperSize, TQT_SIGNAL(sizeChanged(const SimplePageSize&)), multiPage, TQT_SLOT(setUserPreferredSize(const SimplePageSize&)));
+ connect(useDocumentSpecifiedSize, TQT_SIGNAL(toggled(bool)), multiPage, TQT_SLOT(setUseDocumentSpecifiedSize(bool)));
- connect(scrollbarHandling, SIGNAL(toggled(bool)), multiPage, SLOT(slotShowScrollbars(bool)));
+ connect(scrollbarHandling, TQT_SIGNAL(toggled(bool)), multiPage, TQT_SLOT(slotShowScrollbars(bool)));
// connect to the multi page view
- connect( this, SIGNAL(scrollbarStatusChanged(bool)), multiPage, SLOT(slotShowScrollbars(bool)));
- connect( multiPage, SIGNAL(pageInfo(int, int)), this, SLOT(pageInfo(int, int)) );
- connect( multiPage, SIGNAL(askingToCheckActions()), this, SLOT(checkActions()) );
- connect( multiPage, SIGNAL( started( KIO::Job * ) ), this, SIGNAL( started( KIO::Job * ) ) );
- connect( multiPage, SIGNAL( completed() ), this, SIGNAL( completed() ) );
- connect( multiPage, SIGNAL( canceled( const QString & ) ), this, SIGNAL( canceled( const QString & ) ) );
- connect( multiPage, SIGNAL( setStatusBarText( const QString& ) ), this, SLOT( setStatusBarTextFromMultiPage( const QString& ) ) );
+ connect( this, TQT_SIGNAL(scrollbarStatusChanged(bool)), multiPage, TQT_SLOT(slotShowScrollbars(bool)));
+ connect( multiPage, TQT_SIGNAL(pageInfo(int, int)), this, TQT_SLOT(pageInfo(int, int)) );
+ connect( multiPage, TQT_SIGNAL(askingToCheckActions()), this, TQT_SLOT(checkActions()) );
+ connect( multiPage, TQT_SIGNAL( started( KIO::Job * ) ), this, TQT_SIGNAL( started( KIO::Job * ) ) );
+ connect( multiPage, TQT_SIGNAL( completed() ), this, TQT_SIGNAL( completed() ) );
+ connect( multiPage, TQT_SIGNAL( canceled( const TQString & ) ), this, TQT_SIGNAL( canceled( const TQString & ) ) );
+ connect( multiPage, TQT_SIGNAL( setStatusBarText( const TQString& ) ), this, TQT_SLOT( setStatusBarTextFromMultiPage( const TQString& ) ) );
- connect( multiPage, SIGNAL(zoomIn()), this, SLOT(zoomIn()) );
- connect( multiPage, SIGNAL(zoomOut()), this, SLOT(zoomOut()) );
+ connect( multiPage, TQT_SIGNAL(zoomIn()), this, TQT_SLOT(zoomIn()) );
+ connect( multiPage, TQT_SIGNAL(zoomOut()), this, TQT_SLOT(zoomOut()) );
// change the viewmode
- connect(viewModeAction, SIGNAL(activated (int)), multiPage, SLOT(setViewMode(int)));
+ connect(viewModeAction, TQT_SIGNAL(activated (int)), multiPage, TQT_SLOT(setViewMode(int)));
// Update zoomlevel on viewmode changes
- connect(multiPage, SIGNAL(viewModeChanged()), this, SLOT(updateZoomLevel()));
+ connect(multiPage, TQT_SIGNAL(viewModeChanged()), this, TQT_SLOT(updateZoomLevel()));
// navigation history
- connect(multiPage->history(), SIGNAL(backItem(bool)), backAction, SLOT(setEnabled(bool)));
- connect(multiPage->history(), SIGNAL(forwardItem(bool)), forwardAction, SLOT(setEnabled(bool)));
+ connect(multiPage->history(), TQT_SIGNAL(backItem(bool)), backAction, TQT_SLOT(setEnabled(bool)));
+ connect(multiPage->history(), TQT_SIGNAL(forwardItem(bool)), forwardAction, TQT_SLOT(setEnabled(bool)));
// text selection
- connect(multiPage, SIGNAL(textSelected(bool)), copyTextAction, SLOT(setEnabled(bool)));
- connect(multiPage, SIGNAL(textSelected(bool)), deselectAction, SLOT(setEnabled(bool)));
+ connect(multiPage, TQT_SIGNAL(textSelected(bool)), copyTextAction, TQT_SLOT(setEnabled(bool)));
+ connect(multiPage, TQT_SIGNAL(textSelected(bool)), deselectAction, TQT_SLOT(setEnabled(bool)));
// text search
- connect(multiPage, SIGNAL(searchEnabled(bool)), findNextAction, SLOT(setEnabled(bool)));
- connect(multiPage, SIGNAL(searchEnabled(bool)), findPrevAction, SLOT(setEnabled(bool)));
+ connect(multiPage, TQT_SIGNAL(searchEnabled(bool)), findNextAction, TQT_SLOT(setEnabled(bool)));
+ connect(multiPage, TQT_SIGNAL(searchEnabled(bool)), findPrevAction, TQT_SLOT(setEnabled(bool)));
// allow parts to have a GUI, too :-)
// (will be merged automatically)
@@ -407,22 +407,22 @@ void KViewPart::slotStartFitTimer()
}
-QString KViewPart::pageSizeDescription()
+TQString KViewPart::pageSizeDescription()
{
PageNumber nr = multiPage->currentPageNumber();
if (!nr.isValid())
- return QString::null;
+ return TQString::null;
SimplePageSize ss = multiPage->sizeOfPage(nr);
if (!ss.isValid())
- return QString::null;
+ return TQString::null;
pageSize s(ss);
- QString size = " ";
+ TQString size = " ";
if (s.formatNumber() == -1) {
if (KGlobal::locale()-> measureSystem() == KLocale::Metric)
- size += QString("%1x%2 mm").arg(s.width().getLength_in_mm(), 0, 'f', 0).arg(s.height().getLength_in_mm(), 0, 'f', 0);
+ size += TQString("%1x%2 mm").arg(s.width().getLength_in_mm(), 0, 'f', 0).arg(s.height().getLength_in_mm(), 0, 'f', 0);
else
- size += QString("%1x%2 in").arg(s.width().getLength_in_inch(), 0, 'g', 2).arg(s.height().getLength_in_inch(), 0, 'g', 2);
+ size += TQString("%1x%2 in").arg(s.width().getLength_in_inch(), 0, 'g', 2).arg(s.height().getLength_in_inch(), 0, 'g', 2);
} else {
size += s.formatName() + "/";
if (s.getOrientation() == 0)
@@ -459,20 +459,20 @@ void KViewPart::slotFileOpen()
return;
}
- KURL url = KFileDialog::getOpenURL(QString::null, supportedMimeTypes().join(" "));
+ KURL url = KFileDialog::getOpenURL(TQString::null, supportedMimeTypes().join(" "));
if (!url.isEmpty())
openURL(url);
}
-QStringList KViewPart::supportedMimeTypes()
+TQStringList KViewPart::supportedMimeTypes()
{
- QStringList supportedMimeTypes;
+ TQStringList supportedMimeTypes;
// Search for service
KTrader::OfferList offers = KTrader::self()->query(
- QString::fromLatin1("KViewShell/MultiPage"),
- QString("([X-KDE-MultiPageVersion] == %1)").arg(MULTIPAGE_VERSION)
+ TQString::fromLatin1("KViewShell/MultiPage"),
+ TQString("([X-KDE-MultiPageVersion] == %1)").arg(MULTIPAGE_VERSION)
);
if (!offers.isEmpty())
@@ -483,7 +483,7 @@ QStringList KViewPart::supportedMimeTypes()
for (; iterator != end; ++iterator)
{
KService::Ptr service = *iterator;
- QString mimeType = service->property("X-KDE-MimeTypes").toString();
+ TQString mimeType = service->property("X-KDE-MimeTypes").toString();
supportedMimeTypes << mimeType;
}
@@ -505,19 +505,19 @@ QStringList KViewPart::supportedMimeTypes()
return supportedMimeTypes;
}
-QStringList KViewPart::fileFormats() const
+TQStringList KViewPart::fileFormats() const
{
// Compile a list of the supported filename patterns
// First we build a list of the mimetypes which are supported by the
// currently installed KMultiPage-Plugins.
- QStringList supportedMimeTypes;
- QStringList supportedPattern;
+ TQStringList supportedMimeTypes;
+ TQStringList supportedPattern;
// Search for service
KTrader::OfferList offers = KTrader::self()->query(
- QString::fromLatin1("KViewShell/MultiPage"),
- QString("([X-KDE-MultiPageVersion] == %1)").arg(MULTIPAGE_VERSION)
+ TQString::fromLatin1("KViewShell/MultiPage"),
+ TQString("([X-KDE-MultiPageVersion] == %1)").arg(MULTIPAGE_VERSION)
);
if (!offers.isEmpty())
@@ -528,10 +528,10 @@ QStringList KViewPart::fileFormats() const
for (; iterator != end; ++iterator)
{
KService::Ptr service = *iterator;
- QString mimeType = service->property("X-KDE-MimeTypes").toString();
+ TQString mimeType = service->property("X-KDE-MimeTypes").toString();
supportedMimeTypes << mimeType;
- QStringList pattern = KMimeType::mimeType(mimeType)->patterns();
+ TQStringList pattern = KMimeType::mimeType(mimeType)->patterns();
while(!pattern.isEmpty())
{
supportedPattern.append(pattern.front().stripWhiteSpace());
@@ -549,9 +549,9 @@ QStringList KViewPart::fileFormats() const
// Check if this version of KDE supports bzip2
bool bzip2Available = (KFilterBase::findFilterByMimeType( "application/x-bzip2" ) != 0L);
- QStringList compressedPattern;
+ TQStringList compressedPattern;
- for(QStringList::Iterator it = supportedPattern.begin(); it != supportedPattern.end(); ++it )
+ for(TQStringList::Iterator it = supportedPattern.begin(); it != supportedPattern.end(); ++it )
{
if ((*it).find(".gz", -3) == -1) // Paranoia safety check
compressedPattern.append(*it + ".gz");
@@ -602,15 +602,15 @@ bool KViewPart::openFile()
// We try to be error-tolerant about filenames. If the user calls us
// with something like "test", and we are using the DVI-part, we'll
// also look for "testdvi" and "test.dvi".
- QFileInfo fi(m_file);
+ TQFileInfo fi(m_file);
m_file = fi.absFilePath();
if (!fi.exists())
{
- QStringList supportedPatterns = fileFormats();
- QStringList endings;
+ TQStringList supportedPatterns = fileFormats();
+ TQStringList endings;
- for (QStringList::Iterator it = supportedPatterns.begin(); it != supportedPatterns.end(); ++it)
+ for (TQStringList::Iterator it = supportedPatterns.begin(); it != supportedPatterns.end(); ++it)
{
// Only consider patterns starting with "*."
if ((*it).find("*.") == 0)
@@ -623,7 +623,7 @@ bool KViewPart::openFile()
// Now try to append the endings with and without "." to the given filename,
// and see if that gives a existing file.
- for (QStringList::Iterator it = endings.begin(); it != endings.end(); ++it)
+ for (TQStringList::Iterator it = endings.begin(); it != endings.end(); ++it)
{
fi.setFile(m_file+(*it));
if (fi.exists())
@@ -643,10 +643,10 @@ bool KViewPart::openFile()
if (!fi.exists())
{
KMessageBox::error(mainWidget, i18n("<qt>File <nobr><strong>%1</strong></nobr> does not exist.</qt>").arg(m_file));
- emit setStatusBarText(QString::null);
+ emit setStatusBarText(TQString::null);
return false;
}
- m_url.setPath(QFileInfo(m_file).absFilePath());
+ m_url.setPath(TQFileInfo(m_file).absFilePath());
}
// Set the window caption now, before we do any uncompression and generation of temporary files.
@@ -670,8 +670,8 @@ bool KViewPart::openFile()
{
KMessageBox::error(mainWidget, i18n("<qt><strong>File Error!</strong> Could not create "
"temporary file.</qt>"));
- emit setWindowCaption(QString::null);
- emit setStatusBarText(QString::null);
+ emit setWindowCaption(TQString::null);
+ emit setStatusBarText(TQString::null);
return false;
}
tmpUnzipped->setAutoDelete(true);
@@ -679,12 +679,12 @@ bool KViewPart::openFile()
{
KMessageBox::error(mainWidget, i18n("<qt><strong>File Error!</strong> Could not create temporary file "
"<nobr><strong>%1</strong></nobr>.</qt>").arg(strerror(tmpUnzipped->status())));
- emit setWindowCaption(QString::null);
- emit setStatusBarText(QString::null);
+ emit setWindowCaption(TQString::null);
+ emit setStatusBarText(TQString::null);
return false;
}
- QIODevice* filterDev;
+ TQIODevice* filterDev;
if (( mimetype->parentMimeType() == "application/x-gzip" ) ||
( mimetype->parentMimeType() == "application/x-bzip2" ))
filterDev = KFilterDev::deviceForFile(m_file, mimetype->parentMimeType());
@@ -692,8 +692,8 @@ bool KViewPart::openFile()
filterDev = KFilterDev::deviceForFile(m_file);
if (filterDev == 0L)
{
- emit setWindowCaption(QString::null);
- emit setStatusBarText(QString::null);
+ emit setWindowCaption(TQString::null);
+ emit setStatusBarText(TQString::null);
return false;
}
if(!filterDev->open(IO_ReadOnly))
@@ -704,9 +704,9 @@ bool KViewPart::openFile()
i18n("<qt>This error typically occurs if you do not have enough permissions to read the file. "
"You can check ownership and permissions if you right-click on the file in the Konqueror "
"file manager and then choose the 'Properties' menu.</qt>"));
- emit setWindowCaption(QString::null);
+ emit setWindowCaption(TQString::null);
delete filterDev;
- emit setStatusBarText(QString::null);
+ emit setStatusBarText(TQString::null);
return false;
}
@@ -718,7 +718,7 @@ bool KViewPart::openFile()
prog->progressBar()->setProgress(0);
prog->setMinimumDuration(250);
- QByteArray buf(1024);
+ TQByteArray buf(1024);
int read = 0, wrtn = 0;
bool progress_dialog_was_cancelled = false;
@@ -739,7 +739,7 @@ bool KViewPart::openFile()
tmpUnzipped->sync();
if (progress_dialog_was_cancelled) {
- emit setStatusBarText(QString::null);
+ emit setStatusBarText(TQString::null);
return false;
}
@@ -749,8 +749,8 @@ bool KViewPart::openFile()
"the file <nobr><strong>%1</strong></nobr>. The file will not be loaded.</qt>").arg( m_file ),
i18n("<qt>This error typically occurs if the file is corrupt. "
"If you want to be sure, try to decompress the file manually using command-line tools.</qt>"));
- emit setWindowCaption(QString::null);
- emit setStatusBarText(QString::null);
+ emit setWindowCaption(TQString::null);
+ emit setStatusBarText(TQString::null);
return false;
}
tmpUnzipped->close();
@@ -768,8 +768,8 @@ bool KViewPart::openFile()
// Search for service
KTrader::OfferList offers = KTrader::self()->query(
- QString::fromLatin1("KViewShell/MultiPage" ),
- QString("([X-KDE-MultiPageVersion] == %1) and "
+ TQString::fromLatin1("KViewShell/MultiPage" ),
+ TQString("([X-KDE-MultiPageVersion] == %1) and "
"([X-KDE-MimeTypes] == '%2')").arg(MULTIPAGE_VERSION).arg(mimetype->name()));
if (offers.isEmpty()) {
@@ -777,8 +777,8 @@ bool KViewPart::openFile()
"its file type is not supported.</qt>").arg(m_file),
i18n("<qt>The file has mime type <b>%1</b> which is not supported by "
"any of the installed KViewShell plugins.</qt>").arg(mimetype->name()));
- emit setWindowCaption(QString::null);
- emit setStatusBarText(QString::null);
+ emit setWindowCaption(TQString::null);
+ emit setStatusBarText(TQString::null);
return false;
}
@@ -801,10 +801,10 @@ bool KViewPart::openFile()
// Try to load the multiPage
int error;
multiPage = static_cast<KMultiPage*>(KParts::ComponentFactory::createInstanceFromService<KParts::ReadOnlyPart>(service, mainWidget,
- service->name().utf8(), QStringList(), &error ));
+ service->name().utf8(), TQStringList(), &error ));
if (multiPage.isNull()) {
- QString reason;
+ TQString reason;
switch(error) {
case KParts::ComponentFactory::ErrNoServiceFound:
reason = i18n("<qt>No service implementing the given mimetype and fullfilling the given constraint expression can be found.</qt>");
@@ -823,7 +823,7 @@ bool KViewPart::openFile()
break;
}
- QString text = i18n("<qt><p><b>Problem:</b> The document <b>%1</b> cannot be shown.</p>"
+ TQString text = i18n("<qt><p><b>Problem:</b> The document <b>%1</b> cannot be shown.</p>"
"<p><b>Reason:</b> The software "
"component <b>%2</b> which is required to display files of type <b>%3</b> could "
"not be initialized. This could point to serious misconfiguration of your KDE "
@@ -833,19 +833,19 @@ bool KViewPart::openFile()
"provider of your software (e.g. the vendor of your Linux distribution), or "
"directly to the authors of the software. The entry <b>Report Bug...</b> in the "
"<b>Help</b> menu helps you to contact the KDE programmers.</p></qt>").arg(m_file).arg(service->library()).arg(mimetype->name());
- QString caption = i18n("Error Initializing Software Component");
+ TQString caption = i18n("Error Initializing Software Component");
if (reason.isEmpty())
KMessageBox::error(mainWidget, text, caption);
else
KMessageBox::detailedError(mainWidget, text, reason, caption);
- emit setStatusBarText(QString::null);
+ emit setStatusBarText(TQString::null);
return false;
}
// Remember the name of the part. So only need to switch if really necessary.
multiPageLibrary = service->library();
- connect(partManager, SIGNAL(activePartChanged(KParts::Part*)), this, SIGNAL(pluginChanged(KParts::Part*)));
+ connect(partManager, TQT_SIGNAL(activePartChanged(KParts::Part*)), this, TQT_SIGNAL(pluginChanged(KParts::Part*)));
// Switch to the new multiPage
partManager->replacePart(oldMultiPage, multiPage);
@@ -862,7 +862,7 @@ bool KViewPart::openFile()
// We disconnect because we dont want some FocusEvents to trigger a GUI update, which might mess
// with our menus.
- disconnect(partManager, SIGNAL(activePartChanged(KParts::Part*)), this, SIGNAL(pluginChanged(KParts::Part*)));
+ disconnect(partManager, TQT_SIGNAL(activePartChanged(KParts::Part*)), this, TQT_SIGNAL(pluginChanged(KParts::Part*)));
readSettings();
}
@@ -895,13 +895,13 @@ bool KViewPart::openFile()
// Notify the ViewShell about the newly opened file.
emit fileOpened();
} else {
- m_url = QString::null;
- emit setWindowCaption(QString::null);
+ m_url = TQString::null;
+ emit setWindowCaption(TQString::null);
}
checkActions();
- emit zoomChanged(QString("%1%").arg((int)(_zoomVal.value()*100.0+0.5)));
- emit setStatusBarText(QString::null);
+ emit zoomChanged(TQString("%1%").arg((int)(_zoomVal.value()*100.0+0.5)));
+ emit setStatusBarText(TQString::null);
return r;
}
@@ -912,7 +912,7 @@ void KViewPart::reload()
}
-void KViewPart::fileChanged(const QString &file)
+void KViewPart::fileChanged(const TQString &file)
{
if (file == m_file && watchAct->isChecked())
multiPage->reload();
@@ -946,7 +946,7 @@ bool KViewPart::closeURL()
KParts::ReadOnlyPart::closeURL();
multiPage->closeURL();
- m_url = QString::null;
+ m_url = TQString::null;
checkActions();
emit setWindowCaption("");
@@ -994,7 +994,7 @@ void KViewPart::pageInfo(int numpages, int currentpage)
updateZoomLevel();
// ATTN: The string here must be the same as in setPage() below
- QString pageString = i18n("Page %1 of %2").arg(currentpage).arg(numpages);
+ TQString pageString = i18n("Page %1 of %2").arg(currentpage).arg(numpages);
if (pageChangeIsConnected) {
emit pageChanged(pageString);
emit sizeChanged(pageSizeDescription());
@@ -1083,15 +1083,15 @@ void KViewPart::enableFitToPage(bool enable)
if (enable)
{
fitToPage();
- connect(multiPage->mainWidget(), SIGNAL(viewSizeChanged(const QSize&)),
- this, SLOT(slotStartFitTimer()));
- connect(&fitTimer, SIGNAL(timeout()), SLOT(fitToPage()));
+ connect(multiPage->mainWidget(), TQT_SIGNAL(viewSizeChanged(const TQSize&)),
+ this, TQT_SLOT(slotStartFitTimer()));
+ connect(&fitTimer, TQT_SIGNAL(timeout()), TQT_SLOT(fitToPage()));
}
else
{
- disconnect(multiPage->mainWidget(), SIGNAL(viewSizeChanged(const QSize&)),
- this, SLOT(slotStartFitTimer()));
- disconnect(&fitTimer, SIGNAL(timeout()), this, SLOT(fitToPage()));
+ disconnect(multiPage->mainWidget(), TQT_SIGNAL(viewSizeChanged(const TQSize&)),
+ this, TQT_SLOT(slotStartFitTimer()));
+ disconnect(&fitTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(fitToPage()));
}
}
@@ -1100,15 +1100,15 @@ void KViewPart::enableFitToWidth(bool enable)
if (enable)
{
fitToWidth();
- connect(multiPage->mainWidget(), SIGNAL(viewSizeChanged(const QSize&)),
- this, SLOT(slotStartFitTimer()));
- connect(&fitTimer, SIGNAL(timeout()), SLOT(fitToWidth()));
+ connect(multiPage->mainWidget(), TQT_SIGNAL(viewSizeChanged(const TQSize&)),
+ this, TQT_SLOT(slotStartFitTimer()));
+ connect(&fitTimer, TQT_SIGNAL(timeout()), TQT_SLOT(fitToWidth()));
}
else
{
- disconnect(multiPage->mainWidget(), SIGNAL(viewSizeChanged(const QSize&)),
- this, SLOT(slotStartFitTimer()));
- disconnect(&fitTimer, SIGNAL(timeout()), this, SLOT(fitToWidth()));
+ disconnect(multiPage->mainWidget(), TQT_SIGNAL(viewSizeChanged(const TQSize&)),
+ this, TQT_SLOT(slotStartFitTimer()));
+ disconnect(&fitTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(fitToWidth()));
}
}
@@ -1117,15 +1117,15 @@ void KViewPart::enableFitToHeight(bool enable)
if (enable)
{
fitToHeight();
- connect(multiPage->mainWidget(), SIGNAL(viewSizeChanged(const QSize&)),
- this, SLOT(slotStartFitTimer()));
- connect(&fitTimer, SIGNAL(timeout()), SLOT(fitToHeight()));
+ connect(multiPage->mainWidget(), TQT_SIGNAL(viewSizeChanged(const TQSize&)),
+ this, TQT_SLOT(slotStartFitTimer()));
+ connect(&fitTimer, TQT_SIGNAL(timeout()), TQT_SLOT(fitToHeight()));
}
else
{
- disconnect(multiPage->mainWidget(), SIGNAL(viewSizeChanged(const QSize&)),
- this, SLOT(slotStartFitTimer()));
- disconnect(&fitTimer, SIGNAL(timeout()), this, SLOT(fitToHeight()));
+ disconnect(multiPage->mainWidget(), TQT_SIGNAL(viewSizeChanged(const TQSize&)),
+ this, TQT_SLOT(slotStartFitTimer()));
+ disconnect(&fitTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(fitToHeight()));
}
}
@@ -1179,7 +1179,7 @@ void KViewPart::fitToWidth()
}
-void KViewPart::setZoomValue(const QString &sval)
+void KViewPart::setZoomValue(const TQString &sval)
{
if (sval == i18n("Fit to Page Width"))
{
@@ -1382,17 +1382,17 @@ void KViewPart::writeSettings()
void KViewPart::connectNotify ( const char *sig )
{
- if (QString(sig).contains("pageChanged"))
+ if (TQString(sig).contains("pageChanged"))
pageChangeIsConnected = true;
}
-void KViewPart::setStatusBarTextFromMultiPage( const QString &msg )
+void KViewPart::setStatusBarTextFromMultiPage( const TQString &msg )
{
if (msg.isEmpty())
{
if (pageChangeIsConnected)
- emit setStatusBarText(QString::null);
+ emit setStatusBarText(TQString::null);
else
{
int currentPage = multiPage->currentPageNumber();
@@ -1420,26 +1420,26 @@ void KViewPart::aboutKViewShell()
aboutDialog = new KAboutDialog(mainWidget, "about_kviewshell");
aboutDialog->setTitle(I18N_NOOP("KViewShell"));
aboutDialog->setVersion("0.6");
- aboutDialog->setAuthor("Matthias Hoelzer-Kluepfel", QString::null, QString::null,
+ aboutDialog->setAuthor("Matthias Hoelzer-Kluepfel", TQString::null, TQString::null,
I18N_NOOP("Original Author"));
- aboutDialog->addContributor("Matthias Hoelzer-Kluepfel", "mhk@caldera.de", QString::null,
+ aboutDialog->addContributor("Matthias Hoelzer-Kluepfel", "mhk@caldera.de", TQString::null,
I18N_NOOP("Framework"));
aboutDialog->addContributor("David Sweet", "dsweet@kde.org", "http://www.chaos.umd.edu/~dsweet",
I18N_NOOP("Former KGhostView Maintainer"));
- aboutDialog->addContributor("Mark Donohoe", QString::null, QString::null,
+ aboutDialog->addContributor("Mark Donohoe", TQString::null, TQString::null,
I18N_NOOP("KGhostView Author"));
- aboutDialog->addContributor("Markku Hihnala", QString::null, QString::null,
+ aboutDialog->addContributor("Markku Hihnala", TQString::null, TQString::null,
I18N_NOOP("Navigation widgets"));
- aboutDialog->addContributor("David Faure", QString::null, QString::null,
+ aboutDialog->addContributor("David Faure", TQString::null, TQString::null,
I18N_NOOP("Basis for shell"));
- aboutDialog->addContributor("Daniel Duley", QString::null, QString::null,
+ aboutDialog->addContributor("Daniel Duley", TQString::null, TQString::null,
I18N_NOOP("Port to KParts"));
- aboutDialog->addContributor("Espen Sand", QString::null, QString::null,
+ aboutDialog->addContributor("Espen Sand", TQString::null, TQString::null,
I18N_NOOP("Dialog boxes"));
- aboutDialog->addContributor("Stefan Kebekus", "kebekus@kde.org", QString::null,
+ aboutDialog->addContributor("Stefan Kebekus", "kebekus@kde.org", TQString::null,
I18N_NOOP("DCOP-Interface, major improvements"));
- aboutDialog->addContributor("Wilfried Huss", "Wilfried.Huss@gmx.at", QString::null,
+ aboutDialog->addContributor("Wilfried Huss", "Wilfried.Huss@gmx.at", TQString::null,
I18N_NOOP("Interface enhancements"));
}
aboutDialog->show();
@@ -1460,7 +1460,7 @@ void KViewPart::doSettings()
multiPage->addConfigDialogs(configDialog);
- connect(configDialog, SIGNAL(settingsChanged()), this, SLOT(preferencesChanged()));
+ connect(configDialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(preferencesChanged()));
configDialog->show();
}
@@ -1471,13 +1471,13 @@ void KViewPart::preferencesChanged()
void KViewPart::partActivateEvent( KParts::PartActivateEvent *ev )
{
- QApplication::sendEvent( multiPage, ev );
+ TQApplication::sendEvent( multiPage, ev );
}
void KViewPart::guiActivateEvent( KParts::GUIActivateEvent *ev )
{
- QApplication::sendEvent( multiPage, ev );
+ TQApplication::sendEvent( multiPage, ev );
}
diff --git a/kviewshell/kviewpart.h b/kviewshell/kviewpart.h
index f30b1109..446fe47f 100644
--- a/kviewshell/kviewpart.h
+++ b/kviewshell/kviewpart.h
@@ -7,7 +7,7 @@
#include "zoom.h"
#include <kparts/browserextension.h>
-#include <qtimer.h>
+#include <tqtimer.h>
class KAboutData;
class KAboutDialog;
@@ -23,9 +23,9 @@ class KTempFile;
class KToggleAction;
class KURL;
class KViewPartExtension;
-class QHBoxLayout;
+class TQHBoxLayout;
class pageSizeDialog;
-class QSize;
+class TQSize;
class KViewPart : public KViewPart_Iface
@@ -33,8 +33,8 @@ class KViewPart : public KViewPart_Iface
Q_OBJECT
public:
- KViewPart(QWidget *parentWidget, const char *widgetName, QObject *parent,
- const char *name, const QStringList& args);
+ KViewPart(TQWidget *parentWidget, const char *widgetName, TQObject *parent,
+ const char *name, const TQStringList& args);
virtual ~KViewPart();
static KAboutData* createAboutData();
@@ -48,15 +48,15 @@ public:
/* Returns a description of the current page size, for use in the
statusbar of the kviewshell that embeds this KViewPart. */
- QString pageSizeDescription();
+ TQString pageSizeDescription();
/** Returns a list of mimetypes supported by the installed KViewShell plugins. */
- virtual QStringList supportedMimeTypes();
+ virtual TQStringList supportedMimeTypes();
signals:
- void zoomChanged(const QString &);
- void pageChanged(const QString &);
- void sizeChanged(const QString &);
+ void zoomChanged(const TQString &);
+ void pageChanged(const TQString &);
+ void sizeChanged(const TQString &);
void scrollbarStatusChanged(bool);
void fileOpened();
@@ -67,8 +67,8 @@ public slots:
virtual void slotFileOpen();
virtual bool closeURL();
- virtual QStringList fileFormats() const;
- void setStatusBarTextFromMultiPage(const QString &);
+ virtual TQStringList fileFormats() const;
+ void setStatusBarTextFromMultiPage(const TQString &);
/** Calling this slot will cause the kmultipage to reload the file */
void reload();
@@ -98,10 +98,10 @@ protected slots:
void slotPrint();
- void fileChanged(const QString&);
+ void fileChanged(const TQString&);
- // Connected to the QLineEdit in the toolbar.
- void setZoomValue(const QString &);
+ // Connected to the TQLineEdit in the toolbar.
+ void setZoomValue(const TQString &);
protected:
@@ -207,17 +207,17 @@ private:
KParts::PartManager* partManager;
- QGuardedPtr<KMultiPage> multiPage;
+ TQGuardedPtr<KMultiPage> multiPage;
// Name of the library of the currently loaded multiPage.
// Is used to check if it is really necessary to load a new MultiPage.
- QString multiPageLibrary;
+ TQString multiPageLibrary;
KViewPartExtension *m_extension;
bool pageChangeIsConnected;
- QWidget *mainWidget;
- QHBoxLayout* mainLayout;
+ TQWidget *mainWidget;
+ TQHBoxLayout* mainLayout;
/** This entry stores the paper size that the user has requested in
the preferences dialog. If that paper size is actually used or
@@ -230,7 +230,7 @@ private:
Zoom _zoomVal;
pageSizeDialog *_pageSizeDialog;
- QTimer fitTimer;
+ TQTimer fitTimer;
KAboutDialog* aboutDialog;
};
diff --git a/kviewshell/kviewpart_iface.h b/kviewshell/kviewpart_iface.h
index 9e488f3e..d5603b01 100644
--- a/kviewshell/kviewpart_iface.h
+++ b/kviewshell/kviewpart_iface.h
@@ -4,32 +4,32 @@
#include <kparts/part.h>
-class QStringList;
+class TQStringList;
class KViewPart_Iface : public KParts::ReadOnlyPart
{
Q_OBJECT
public:
- KViewPart_Iface(QObject *parent, const char *name)
+ KViewPart_Iface(TQObject *parent, const char *name)
: KParts::ReadOnlyPart(parent, name) {}
virtual ~KViewPart_Iface() {}
/* Returns a description of the current page size, for use in the
statusbar of the kviewshell that embeds this KViewPart. */
- virtual QString pageSizeDescription() = 0;
+ virtual TQString pageSizeDescription() = 0;
/* This method calls closeURL(), but asks first ("The document was
modified. Do you really want to close?") if the document has been
modified after it has been loaded. */
virtual bool closeURL_ask() = 0;
- virtual QStringList supportedMimeTypes() = 0;
+ virtual TQStringList supportedMimeTypes() = 0;
public slots:
virtual void slotSetFullPage(bool fullpage) = 0;
- virtual QStringList fileFormats() const = 0;
+ virtual TQStringList fileFormats() const = 0;
};
#endif
diff --git a/kviewshell/kviewshell.cpp b/kviewshell/kviewshell.cpp
index 90e1e474..968fd365 100644
--- a/kviewshell/kviewshell.cpp
+++ b/kviewshell/kviewshell.cpp
@@ -8,9 +8,9 @@
*/
-#include <qfileinfo.h>
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqfileinfo.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
#include <kiconloader.h>
#include <kstandarddirs.h>
@@ -29,7 +29,7 @@
#include <kmimetype.h>
#include <kprogress.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <stdlib.h>
#include <unistd.h>
@@ -45,7 +45,7 @@
#define StatusBar_ID_Zoom 3
-KViewShell::KViewShell(const QString& defaultMimeType)
+KViewShell::KViewShell(const TQString& defaultMimeType)
: KParts::MainWindow()
{
// create the viewer part
@@ -53,13 +53,13 @@ KViewShell::KViewShell(const QString& defaultMimeType)
// Try to load
KLibFactory *factory = KLibLoader::self()->factory("kviewerpart");
if (factory) {
- if (defaultMimeType == QString::null)
+ if (defaultMimeType == TQString::null)
{
view = (KViewPart_Iface*) factory->create(this, "kviewerpart", "KViewPart");
}
else
{
- QStringList args;
+ TQStringList args;
args << defaultMimeType;
view = (KViewPart_Iface*) factory->create(this, "kviewerpart", "KViewPart", args);
}
@@ -73,33 +73,33 @@ KViewShell::KViewShell(const QString& defaultMimeType)
setCentralWidget(view->widget());
// file menu
- KStdAction::open(view, SLOT(slotFileOpen()), actionCollection());
- recent = KStdAction::openRecent (this, SLOT(openURL(const KURL &)), actionCollection());
- reloadAction = new KAction(i18n("Reload"), "reload", CTRL + Key_R, view, SLOT(reload()), actionCollection(), "reload");
- closeAction = KStdAction::close(this, SLOT(slotFileClose()), actionCollection());
- KStdAction::quit (this, SLOT(slotQuit()), actionCollection());
+ KStdAction::open(view, TQT_SLOT(slotFileOpen()), actionCollection());
+ recent = KStdAction::openRecent (this, TQT_SLOT(openURL(const KURL &)), actionCollection());
+ reloadAction = new KAction(i18n("Reload"), "reload", CTRL + Key_R, view, TQT_SLOT(reload()), actionCollection(), "reload");
+ closeAction = KStdAction::close(this, TQT_SLOT(slotFileClose()), actionCollection());
+ KStdAction::quit (this, TQT_SLOT(slotQuit()), actionCollection());
- connect(view, SIGNAL(fileOpened()), this, SLOT(addRecentFile()));
+ connect(view, TQT_SIGNAL(fileOpened()), this, TQT_SLOT(addRecentFile()));
// view menu
- fullScreenAction = KStdAction::fullScreen(this, SLOT(slotFullScreen()), actionCollection(), this, "fullscreen" );
+ fullScreenAction = KStdAction::fullScreen(this, TQT_SLOT(slotFullScreen()), actionCollection(), this, "fullscreen" );
// settings menu
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
- KStdAction::keyBindings(this, SLOT(slotConfigureKeys()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(slotEditToolbar()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(slotConfigureKeys()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(slotEditToolbar()), actionCollection());
// statusbar connects
- connect( view, SIGNAL( zoomChanged(const QString &) ), this,SLOT( slotChangeZoomText(const QString &) ) );
- connect( view, SIGNAL( pageChanged(const QString &) ), this,SLOT( slotChangePageText(const QString &) ) );
- connect( view, SIGNAL( sizeChanged(const QString &) ), this,SLOT( slotChangeSizeText(const QString &) ) );
+ connect( view, TQT_SIGNAL( zoomChanged(const TQString &) ), this,TQT_SLOT( slotChangeZoomText(const TQString &) ) );
+ connect( view, TQT_SIGNAL( pageChanged(const TQString &) ), this,TQT_SLOT( slotChangePageText(const TQString &) ) );
+ connect( view, TQT_SIGNAL( sizeChanged(const TQString &) ), this,TQT_SLOT( slotChangeSizeText(const TQString &) ) );
// Setup session management
- connect( this, SIGNAL( restoreDocument(const KURL &, int) ), view, SLOT( restoreDocument(const KURL &, int)));
- connect( this, SIGNAL( saveDocumentRestoreInfo(KConfig*) ), view, SLOT( saveDocumentRestoreInfo(KConfig*)));
+ connect( this, TQT_SIGNAL( restoreDocument(const KURL &, int) ), view, TQT_SLOT( restoreDocument(const KURL &, int)));
+ connect( this, TQT_SIGNAL( saveDocumentRestoreInfo(KConfig*) ), view, TQT_SLOT( saveDocumentRestoreInfo(KConfig*)));
setXMLFile( "kviewshell.rc" );
createGUI(view);
@@ -120,7 +120,7 @@ KViewShell::KViewShell(const QString& defaultMimeType)
statusBar()->changeItem("", StatusBar_ID_Zoom);
statusBar()->insertItem(view->pageSizeDescription(), StatusBar_ID_PageSize, 0, true);
- connect( view, SIGNAL(pluginChanged(KParts::Part*)), this, SLOT(createGUI(KParts::Part*)));
+ connect( view, TQT_SIGNAL(pluginChanged(KParts::Part*)), this, TQT_SLOT(createGUI(KParts::Part*)));
}
@@ -176,11 +176,11 @@ void KViewShell::readSettings()
// Constant source of annoyance in KDVI < 1.0: the 'recent-files'
// menu contains lots of files which don't exist (any longer). Thus,
// we'll sort out the non-existent files here.
- QStringList items = recent->items();
- for ( QStringList::Iterator it = items.begin(); it != items.end(); ++it ) {
+ TQStringList items = recent->items();
+ for ( TQStringList::Iterator it = items.begin(); it != items.end(); ++it ) {
KURL url(*it);
if (url.isLocalFile()) {
- QFileInfo info(url.path());
+ TQFileInfo info(url.path());
if (!info.exists())
recent->removeURL(url);
}
@@ -229,7 +229,7 @@ void KViewShell::addRecentFile()
KURL actualURL = view->url();
// To store the URL in the list of recent files, we remove the
// reference part.
- actualURL.setRef(QString::null);
+ actualURL.setRef(TQString::null);
recent->addURL(actualURL);
checkActions();
}
@@ -290,7 +290,7 @@ void KViewShell::slotEditToolbar()
{
saveMainWindowSettings( KGlobal::config(), autoSaveGroup() );
KEditToolbar dlg(factory());
- connect( &dlg, SIGNAL( newToolbarConfig() ), SLOT( slotNewToolbarConfig() ) );
+ connect( &dlg, TQT_SIGNAL( newToolbarConfig() ), TQT_SLOT( slotNewToolbarConfig() ) );
dlg.exec();
}
@@ -300,7 +300,7 @@ void KViewShell::slotNewToolbarConfig()
applyMainWindowSettings( KGlobal::config(), autoSaveGroup() );
}
-void KViewShell::dragEnterEvent(QDragEnterEvent *event)
+void KViewShell::dragEnterEvent(TQDragEnterEvent *event)
{
if (KURLDrag::canDecode(event))
{
@@ -325,10 +325,10 @@ void KViewShell::dragEnterEvent(QDragEnterEvent *event)
// Safety check
if (view)
{
- QStringList mimetypeList = view->supportedMimeTypes();
+ TQStringList mimetypeList = view->supportedMimeTypes();
kdDebug() << "[dragEnterEvent] Supported mime types: " << mimetypeList << endl;
- for (QStringList::Iterator it = mimetypeList.begin(); it != mimetypeList.end(); ++it)
+ for (TQStringList::Iterator it = mimetypeList.begin(); it != mimetypeList.end(); ++it)
{
if (mimetype->is(*it))
{
@@ -345,7 +345,7 @@ void KViewShell::dragEnterEvent(QDragEnterEvent *event)
}
-void KViewShell::dropEvent(QDropEvent *event)
+void KViewShell::dropEvent(TQDropEvent *event)
{
KURL::List urls;
if (KURLDrag::decode(event, urls) && !urls.isEmpty())
@@ -353,7 +353,7 @@ void KViewShell::dropEvent(QDropEvent *event)
}
-void KViewShell::keyPressEvent(QKeyEvent *event)
+void KViewShell::keyPressEvent(TQKeyEvent *event)
{
// The Escape Key is used to return to normal mode from fullscreen
// mode
@@ -366,19 +366,19 @@ void KViewShell::keyPressEvent(QKeyEvent *event)
}
-void KViewShell::slotChangePageText(const QString &message)
+void KViewShell::slotChangePageText(const TQString &message)
{
statusBar()->changeItem(" "+message+" ",StatusBar_ID_PageNr);
}
-void KViewShell::slotChangeSizeText(const QString &message)
+void KViewShell::slotChangeSizeText(const TQString &message)
{
statusBar()->changeItem(" "+message+" ",StatusBar_ID_PageSize);
}
-void KViewShell::slotChangeZoomText(const QString &message)
+void KViewShell::slotChangeZoomText(const TQString &message)
{
statusBar()->changeItem(" "+message+" ",StatusBar_ID_Zoom);
}
diff --git a/kviewshell/kviewshell.h b/kviewshell/kviewshell.h
index c6aa0620..89131db8 100644
--- a/kviewshell/kviewshell.h
+++ b/kviewshell/kviewshell.h
@@ -2,7 +2,7 @@
#ifndef KVIEWSHELL_H
#define KVIEWSHELL_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kparts/mainwindow.h>
@@ -11,7 +11,7 @@ class KURL;
class KViewPart_Iface;
-class QLabel;
+class TQLabel;
class KViewShell : public KParts::MainWindow
{
@@ -21,7 +21,7 @@ public:
KStatusBar *statusbar;
KStatusBar *action;
- KViewShell(const QString& defaultMimeType = QString::null);
+ KViewShell(const TQString& defaultMimeType = TQString::null);
virtual ~KViewShell();
public slots:
@@ -37,9 +37,9 @@ protected slots:
void slotFileClose();
void slotNewToolbarConfig();
- void slotChangeZoomText(const QString &);
- void slotChangePageText(const QString &);
- void slotChangeSizeText(const QString &);
+ void slotChangeZoomText(const TQString &);
+ void slotChangePageText(const TQString &);
+ void slotChangeSizeText(const TQString &);
signals:
void restoreDocument(const KURL &url, int page);
@@ -64,15 +64,15 @@ protected:
void checkActions();
- void dragEnterEvent(QDragEnterEvent *event);
- void dropEvent(QDropEvent *event);
- void keyPressEvent(QKeyEvent * e);
+ void dragEnterEvent(TQDragEnterEvent *event);
+ void dropEvent(TQDropEvent *event);
+ void keyPressEvent(TQKeyEvent * e);
private:
KViewPart_Iface *view;
KRecentFilesAction *recent;
- QString cwd;
+ TQString cwd;
KAction *closeAction, *reloadAction;
KToggleAction *fullScreenAction;
diff --git a/kviewshell/main.cpp b/kviewshell/main.cpp
index c87cb07e..1a858049 100644
--- a/kviewshell/main.cpp
+++ b/kviewshell/main.cpp
@@ -9,7 +9,7 @@
#include <kurl.h>
#include <klocale.h>
#include <kaboutdata.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <stdlib.h>
@@ -88,20 +88,20 @@ int main(int argc, char **argv)
KURL url(args->url(0));
if (!args->url(0).isValid()) {
- kdError(1223) << QString(I18N_NOOP("The URL %1 is not well-formed.")).arg(args->arg(0)) << endl;
+ kdError(1223) << TQString(I18N_NOOP("The URL %1 is not well-formed.")).arg(args->arg(0)) << endl;
return -1;
}
if (!args->url(0).isLocalFile()) {
- kdError(1223) << QString(I18N_NOOP("The URL %1 does not point to a local file. You can only specify local "
+ kdError(1223) << 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;
return -1;
}
- QString qualPath = QFileInfo(args->url(0).path()).absFilePath();
+ TQString qualPath = TQFileInfo(args->url(0).path()).absFilePath();
app.dcopClient()->attach();
- QCString id = app.dcopClient()->registerAs("unique-kviewshell");
+ TQCString id = app.dcopClient()->registerAs("unique-kviewshell");
if (id.isNull())
kdError(1223) << "There was an error using dcopClient()->registerAs()." << endl;
QCStringList apps = app.dcopClient()->registeredApplications();
@@ -109,22 +109,22 @@ int main(int argc, char **argv)
{
if ((*it).find("kviewshell") == 0)
{
- QByteArray data, replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
bool result;
arg << qualPath.stripWhiteSpace();
- if (!app.dcopClient()->call( *it, "kmultipage", "is_file_loaded(QString)", data, replyType, replyData))
+ if (!app.dcopClient()->call( *it, "kmultipage", "is_file_loaded(TQString)", data, replyType, replyData))
kdError(1223) << "There was an error using DCOP." << endl;
else
{
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
if (replyType == "bool")
{
reply >> result;
if (result == true)
{
- if (app.dcopClient()->send(*it, "kmultipage", "jumpToReference(QString)", args->url(0).ref()) == true)
+ if (app.dcopClient()->send(*it, "kmultipage", "jumpToReference(TQString)", args->url(0).ref()) == true)
{
app.dcopClient()->detach();
return 0;
@@ -173,7 +173,7 @@ int main(int argc, char **argv)
// If the url doesn't already has a reference part, add the
// argument of --goto to the url as reference, to make the
// KViewShell jump to this page.
- QString reference = args->getOption("goto");
+ TQString reference = args->getOption("goto");
url.setHTMLRef(reference);
}
shell->openURL(url);
diff --git a/kviewshell/marklist.cpp b/kviewshell/marklist.cpp
index 8e39f619..a9c7518a 100644
--- a/kviewshell/marklist.cpp
+++ b/kviewshell/marklist.cpp
@@ -19,15 +19,15 @@
#include <config.h>
-#include <qcheckbox.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
-#include <qpainter.h>
-#include <qtimer.h>
+#include <tqcheckbox.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kglobalsettings.h>
@@ -47,7 +47,7 @@
namespace {
/** Holds the icon used as a overlay on pages which are not drawn yet. */
-QPixmap* waitIcon = 0;
+TQPixmap* waitIcon = 0;
} // namespace anon
@@ -55,7 +55,7 @@ QPixmap* waitIcon = 0;
/****** ThumbnailWidget ******/
ThumbnailWidget::ThumbnailWidget(MarkListWidget* _parent, const PageNumber& _pageNumber, DocumentPageCache* _pageCache)
- : QWidget(_parent), pageNumber(_pageNumber), pageCache(_pageCache), parent(_parent)
+ : TQWidget(_parent), pageNumber(_pageNumber), pageCache(_pageCache), parent(_parent)
{
setBackgroundMode(Qt::NoBackground);
@@ -63,11 +63,11 @@ ThumbnailWidget::ThumbnailWidget(MarkListWidget* _parent, const PageNumber& _pag
if (!waitIcon)
{
- waitIcon = new QPixmap(KGlobal::iconLoader()->loadIcon("gear", KIcon::NoGroup, KIcon::SizeMedium));
+ waitIcon = new TQPixmap(KGlobal::iconLoader()->loadIcon("gear", KIcon::NoGroup, KIcon::SizeMedium));
}
}
-void ThumbnailWidget::paintEvent(QPaintEvent* e)
+void ThumbnailWidget::paintEvent(TQPaintEvent* e)
{
// Only repaint if the widget is really visible. We need to check this because Qt
// sends paintEvents to all widgets that have ever been visible in the Scrollview
@@ -79,7 +79,7 @@ void ThumbnailWidget::paintEvent(QPaintEvent* e)
return;
}
- QPainter p(this);
+ TQPainter p(this);
p.setClipRect(e->rect());
// Paint a black border around the widget
@@ -90,7 +90,7 @@ void ThumbnailWidget::paintEvent(QPaintEvent* e)
// Remove 1 pixel from all sides of the rectangle, to eliminate overdraw with
// the black border.
- QRect thumbRect = rect();
+ TQRect thumbRect = rect();
thumbRect.addCoords(1,1,-1,-1);
// If the thumbnail is empty or has been marked for updating generate a new thumbnail.
@@ -108,7 +108,7 @@ void ThumbnailWidget::paintEvent(QPaintEvent* e)
// TODO: Disable or find something less distractiong.
p.drawPixmap(10, 10, *waitIcon);
- QTimer::singleShot(50, this, SLOT(setThumbnail()));
+ TQTimer::singleShot(50, this, TQT_SLOT(setThumbnail()));
return;
}
@@ -122,14 +122,14 @@ void ThumbnailWidget::paintEvent(QPaintEvent* e)
// The actual page starts at point (1,1) because of the outline.
// Therefore we need to shift the destination rectangle.
- QRect pixmapRect = thumbRect;
+ TQRect pixmapRect = thumbRect;
pixmapRect.moveBy(-1,-1);
// Paint widget
bitBlt (this, thumbRect.topLeft(), &thumbnail, pixmapRect, CopyROP);
}
-void ThumbnailWidget::resizeEvent(QResizeEvent*)
+void ThumbnailWidget::resizeEvent(TQResizeEvent*)
{
thumbnail.resize(width(), height());
// Generate a new thumbnail in the next paintEvent.
@@ -164,12 +164,12 @@ void ThumbnailWidget::setThumbnail()
/****** MarkListWidget ******/
-MarkListWidget::MarkListWidget(QWidget* _parent, MarkList* _markList, const PageNumber& _pageNumber,
+MarkListWidget::MarkListWidget(TQWidget* _parent, MarkList* _markList, const PageNumber& _pageNumber,
DocumentPageCache* _pageCache, bool _showThumbnail)
- : QWidget(_parent), showThumbnail(_showThumbnail), pageNumber(_pageNumber),
+ : TQWidget(_parent), showThumbnail(_showThumbnail), pageNumber(_pageNumber),
pageCache(_pageCache), markList(_markList)
{
- QBoxLayout* layout = new QVBoxLayout(this, margin);
+ TQBoxLayout* layout = new TQVBoxLayout(this, margin);
thumbnailWidget = 0;
if (showThumbnail)
@@ -178,14 +178,14 @@ MarkListWidget::MarkListWidget(QWidget* _parent, MarkList* _markList, const Page
layout->addWidget(thumbnailWidget, 1, Qt::AlignTop);
}
- QBoxLayout* bottomLayout = new QHBoxLayout(layout);
+ TQBoxLayout* bottomLayout = new TQHBoxLayout(layout);
- checkBox = new QCheckBox(QString::null, this );
- checkBox->setFocusPolicy(QWidget::NoFocus);
- QToolTip::add(checkBox, i18n("Select for printing"));
+ checkBox = new TQCheckBox(TQString::null, this );
+ checkBox->setFocusPolicy(TQWidget::NoFocus);
+ TQToolTip::add(checkBox, i18n("Select for printing"));
bottomLayout->addWidget(checkBox, 0, Qt::AlignAuto);
- pageLabel = new QLabel(QString("%1").arg(pageNumber), this);
+ pageLabel = new TQLabel(TQString("%1").arg(pageNumber), this);
bottomLayout->addWidget(pageLabel, 1);
_backgroundColor = KGlobalSettings::baseColor();
@@ -217,7 +217,7 @@ void MarkListWidget::setChecked( bool checked )
void MarkListWidget::setSelected( bool selected )
{
if (selected)
- setPaletteBackgroundColor( QApplication::palette().active().highlight() );
+ setPaletteBackgroundColor( TQApplication::palette().active().highlight() );
else
setPaletteBackgroundColor( _backgroundColor );
}
@@ -232,7 +232,7 @@ int MarkListWidget::setNewWidth(int width)
int thumbnailHeight = (int)((thumbnailWidth - 2*margin - 2) / pageCache->sizeOfPage(pageNumber).aspectRatio() + 0.5) + 2;
// Resize Thumbnail if necessary
- if (thumbnailWidget->size() != QSize(thumbnailWidth, thumbnailHeight))
+ if (thumbnailWidget->size() != TQSize(thumbnailWidth, thumbnailHeight))
thumbnailWidget->setFixedSize(thumbnailWidth - 2*margin, thumbnailHeight);
height += thumbnailHeight + 2*margin;
@@ -244,9 +244,9 @@ int MarkListWidget::setNewWidth(int width)
bool MarkListWidget::isVisible()
{
- QRect visibleRect(markList->contentsX(), markList->contentsY(),
+ TQRect visibleRect(markList->contentsX(), markList->contentsY(),
markList->visibleWidth(), markList->visibleHeight());
- QRect widgetRect(markList->childX(this), markList->childY(this), width(), height());
+ TQRect widgetRect(markList->childX(this), markList->childY(this), width(), height());
if (widgetRect.intersects(visibleRect))
return true;
@@ -255,7 +255,7 @@ bool MarkListWidget::isVisible()
}
-void MarkListWidget::mousePressEvent(QMouseEvent* e)
+void MarkListWidget::mousePressEvent(TQMouseEvent* e)
{
// Select Page
if (e->button() == LeftButton)
@@ -272,19 +272,19 @@ void MarkListWidget::mousePressEvent(QMouseEvent* e)
/****** MarkList ******/
-MarkList::MarkList(QWidget* parent, const char* name)
- : QScrollView(parent, name), clickedThumbnail(0), showThumbnails(true), contextMenu(0)
+MarkList::MarkList(TQWidget* parent, const char* name)
+ : TQScrollView(parent, name), clickedThumbnail(0), showThumbnails(true), contextMenu(0)
{
currentPage = PageNumber::invalidPage;
widgetList.setAutoDelete(true);
- setFocusPolicy( QWidget::StrongFocus );
- //viewport()->setFocusPolicy( QWidget::WheelFocus );
- setResizePolicy(QScrollView::Manual);
+ setFocusPolicy( TQWidget::StrongFocus );
+ //viewport()->setFocusPolicy( TQWidget::WheelFocus );
+ setResizePolicy(TQScrollView::Manual);
- setVScrollBarMode(QScrollView::AlwaysOn);
- setHScrollBarMode(QScrollView::AlwaysOff);
+ setVScrollBarMode(TQScrollView::AlwaysOn);
+ setHScrollBarMode(TQScrollView::AlwaysOff);
- setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
+ setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
viewport()->setBackgroundMode(Qt::PaletteBase);
enableClipper(true);
@@ -300,9 +300,9 @@ void MarkList::setPageCache(DocumentPageCache* _pageCache)
pageCache = _pageCache;
}
-QValueList<int> MarkList::selectedPages() const
+TQValueList<int> MarkList::selectedPages() const
{
- QValueList<int> list;
+ TQValueList<int> list;
MarkListWidget* item;
for(unsigned int i = 0; i < widgetList.count(); i++)
{
@@ -325,8 +325,8 @@ void MarkList::setNumberOfPages(int numberOfPages, bool _showThumbnails)
{
MarkListWidget* item = new MarkListWidget(viewport(), this, page, pageCache, showThumbnails);
- connect(item, SIGNAL(selected(const PageNumber&)), this, SLOT(thumbnailSelected(const PageNumber&)));
- connect(item, SIGNAL(showPopupMenu(const PageNumber&, const QPoint&)), this, SLOT(showPopupMenu(const PageNumber&, const QPoint&)));
+ connect(item, TQT_SIGNAL(selected(const PageNumber&)), this, TQT_SLOT(thumbnailSelected(const PageNumber&)));
+ connect(item, TQT_SIGNAL(showPopupMenu(const PageNumber&, const TQPoint&)), this, TQT_SLOT(showPopupMenu(const PageNumber&, const TQPoint&)));
widgetList.insert(page - 1, item);
@@ -438,7 +438,7 @@ void MarkList::removeSelection()
}
}
-void MarkList::viewportResizeEvent(QResizeEvent*)
+void MarkList::viewportResizeEvent(TQResizeEvent*)
{
MarkListWidget* item;
@@ -500,7 +500,7 @@ void MarkList::updateWidgetSize(const PageNumber& pageNumber)
viewport()->update();
}
-void MarkList::mousePressEvent(QMouseEvent* e)
+void MarkList::mousePressEvent(TQMouseEvent* e)
{
if (e->button() == RightButton)
{
@@ -523,7 +523,7 @@ void MarkList::slotShowThumbnails(bool show)
PageNumber _currentPage = currentPage;
// Save page selections.
- QValueVector<bool> selections;
+ TQValueVector<bool> selections;
selections.resize(widgetList.count());
for (unsigned int i = 0; i < widgetList.count(); i++)
selections[i] = widgetList[i]->isChecked();
@@ -553,7 +553,7 @@ void MarkList::repaintThumbnails()
}
-void MarkList::showPopupMenu(const PageNumber& pageNumber, const QPoint& position)
+void MarkList::showPopupMenu(const PageNumber& pageNumber, const TQPoint& position)
{
if (contextMenu == 0)
{
diff --git a/kviewshell/marklist.h b/kviewshell/marklist.h
index 01458db3..dd8c07a4 100644
--- a/kviewshell/marklist.h
+++ b/kviewshell/marklist.h
@@ -23,12 +23,12 @@
#include "pageNumber.h"
-#include <qpixmap.h>
-#include <qptrvector.h>
-#include <qscrollview.h>
+#include <tqpixmap.h>
+#include <tqptrvector.h>
+#include <tqscrollview.h>
-class QCheckBox;
-class QLabel;
+class TQCheckBox;
+class TQLabel;
class KPopupMenu;
class DocumentPageCache;
@@ -48,8 +48,8 @@ public:
ThumbnailWidget(MarkListWidget* parent_, const PageNumber& _pageNumber, DocumentPageCache*);
private:
- virtual void paintEvent(QPaintEvent*);
- virtual void resizeEvent(QResizeEvent*);
+ virtual void paintEvent(TQPaintEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
private slots:
void setThumbnail();
@@ -63,7 +63,7 @@ private:
MarkListWidget* parent;
- QPixmap thumbnail;
+ TQPixmap thumbnail;
};
@@ -75,7 +75,7 @@ class MarkListWidget : public QWidget
Q_OBJECT
public:
- MarkListWidget(QWidget* _parent, MarkList*, const PageNumber& _pageNumber, DocumentPageCache*, bool _showThumbnail = true);
+ MarkListWidget(TQWidget* _parent, MarkList*, const PageNumber& _pageNumber, DocumentPageCache*, bool _showThumbnail = true);
bool isChecked() const;
@@ -94,19 +94,19 @@ signals:
void selected(const PageNumber&);
/** Emitted on right click. */
- void showPopupMenu(const PageNumber& pageNumber, const QPoint& position);
+ void showPopupMenu(const PageNumber& pageNumber, const TQPoint& position);
protected:
- virtual void mousePressEvent(QMouseEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
private:
bool showThumbnail;
ThumbnailWidget* thumbnailWidget;
- QCheckBox* checkBox;
- QLabel* pageLabel;
- QColor _backgroundColor;
+ TQCheckBox* checkBox;
+ TQLabel* pageLabel;
+ TQColor _backgroundColor;
const PageNumber pageNumber;
@@ -126,18 +126,18 @@ class MarkList: public QScrollView
Q_OBJECT
public:
- MarkList(QWidget* parent = 0, const char* name = 0);
+ MarkList(TQWidget* parent = 0, const char* name = 0);
virtual ~MarkList();
void setPageCache(DocumentPageCache*);
- QValueList<int> selectedPages() const;
+ TQValueList<int> selectedPages() const;
PageNumber currentPageNumber() { return currentPage; }
PageNumber numberOfPages() { return widgetList.count(); }
- virtual QSize sizeHint() const { return QSize(); }
+ virtual TQSize sizeHint() const { return TQSize(); }
public slots:
void setNumberOfPages(int numberOfPages, bool showThumbnails = true);
@@ -153,15 +153,15 @@ public slots:
void updateWidgetSize(const PageNumber&);
protected:
- virtual void viewportResizeEvent(QResizeEvent*);
+ virtual void viewportResizeEvent(TQResizeEvent*);
- virtual void mousePressEvent(QMouseEvent*);
+ virtual void mousePressEvent(TQMouseEvent*);
signals:
void selected(const PageNumber&);
private slots:
- void showPopupMenu(const PageNumber& pageNumber, const QPoint& position);
+ void showPopupMenu(const PageNumber& pageNumber, const TQPoint& position);
void selectAll();
void selectEven();
@@ -170,7 +170,7 @@ private slots:
void removeSelection();
private:
- QPtrVector<MarkListWidget> widgetList;
+ TQPtrVector<MarkListWidget> widgetList;
PageNumber currentPage;
diff --git a/kviewshell/pageNumber.h b/kviewshell/pageNumber.h
index 71ba3e50..161760fc 100644
--- a/kviewshell/pageNumber.h
+++ b/kviewshell/pageNumber.h
@@ -12,7 +12,7 @@
#ifndef PAGENUMBER_H
#define PAGENUMBER_H
-#include <qglobal.h>
+#include <tqglobal.h>
/** \brief Class to represent a page number
diff --git a/kviewshell/pageSize.cpp b/kviewshell/pageSize.cpp
index f52f01a4..43e21f74 100644
--- a/kviewshell/pageSize.cpp
+++ b/kviewshell/pageSize.cpp
@@ -13,7 +13,7 @@
#include <kglobal.h>
#include <klocale.h>
#include <math.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "pageSize.h"
#include "units.h"
@@ -61,10 +61,10 @@ pageSize::pageSize(const SimplePageSize& s)
}
-bool pageSize::setPageSize(const QString& name)
+bool pageSize::setPageSize(const TQString& name)
{
// See if we can recognize the string
- QString currentName;
+ TQString currentName;
for(int i=0; staticList[i].name != 0; i++) {
currentName = staticList[i].name;
if (currentName == name) {
@@ -138,14 +138,14 @@ void pageSize::setPageSize(double width, double height)
}
-void pageSize::setPageSize(const QString& width, const QString& _widthUnits, const QString& height, const QString& _heightUnits)
+void pageSize::setPageSize(const TQString& width, const TQString& _widthUnits, const TQString& height, const TQString& _heightUnits)
{
SimplePageSize oldPage = *this;
double w = width.toFloat();
double h = height.toFloat();
- QString widthUnits = _widthUnits;
+ TQString widthUnits = _widthUnits;
if ((widthUnits != "cm") && (widthUnits != "mm") && (widthUnits != "in")) {
kdError(1223) << "Unrecognized page width unit '" << widthUnits << "'. Assuming mm" << endl;
widthUnits = "mm";
@@ -156,7 +156,7 @@ void pageSize::setPageSize(const QString& width, const QString& _widthUnits, con
if (widthUnits == "in")
pageWidth.setLength_in_inch(w);
- QString heightUnits = _heightUnits;
+ TQString heightUnits = _heightUnits;
if ((heightUnits != "cm") && (heightUnits != "mm") && (heightUnits != "in")) {
kdError(1223) << "Unrecognized page height unit '" << widthUnits << "'. Assuming mm" << endl;
heightUnits = "mm";
@@ -204,7 +204,7 @@ void pageSize::rectifySizes()
}
-QString pageSize::preferredUnit() const
+TQString pageSize::preferredUnit() const
{
if (currentSize >= 0)
return staticList[currentSize].preferredUnit;
@@ -217,9 +217,9 @@ QString pageSize::preferredUnit() const
}
-QString pageSize::widthString(const QString& unit) const
+TQString pageSize::widthString(const TQString& unit) const
{
- QString answer = "--";
+ TQString answer = "--";
if (unit == "cm")
answer.setNum(pageWidth.getLength_in_cm());
@@ -232,9 +232,9 @@ QString pageSize::widthString(const QString& unit) const
}
-QString pageSize::heightString(const QString& unit) const
+TQString pageSize::heightString(const TQString& unit) const
{
- QString answer = "--";
+ TQString answer = "--";
if (unit == "cm")
answer.setNum(pageHeight.getLength_in_cm());
@@ -247,9 +247,9 @@ QString pageSize::heightString(const QString& unit) const
}
-QStringList pageSize::pageSizeNames()
+TQStringList pageSize::pageSizeNames()
{
- QStringList names;
+ TQStringList names;
for(int i=0; staticList[i].name != 0; i++)
names << staticList[i].name;
@@ -258,12 +258,12 @@ QStringList pageSize::pageSizeNames()
}
-QString pageSize::formatName() const
+TQString pageSize::formatName() const
{
if (currentSize >= 0)
return staticList[currentSize].name;
else
- return QString::null;
+ return TQString::null;
}
@@ -299,12 +299,12 @@ void pageSize::setOrientation(int orient)
}
-QString pageSize::serialize() const
+TQString pageSize::serialize() const
{
if ((currentSize >= 0) && (fabs(staticList[currentSize].height-pageHeight.getLength_in_mm()) <= 0.5))
return staticList[currentSize].name;
else
- return QString("%1x%2").arg(pageWidth.getLength_in_mm()).arg(pageHeight.getLength_in_mm());
+ return TQString("%1x%2").arg(pageWidth.getLength_in_mm()).arg(pageHeight.getLength_in_mm());
}
@@ -330,7 +330,7 @@ void pageSize::reconstructCurrentSize()
int pageSize::defaultPageSize()
{
- // FIXME: static_cast<QPrinter::PageSize>(KGlobal::locale()->pageSize())
+ // FIXME: static_cast<TQPrinter::PageSize>(KGlobal::locale()->pageSize())
// is the proper solution here. Then you can determine the values
// without using your hardcoded table too!
if (KGlobal::locale()-> measureSystem() == KLocale::Metric)
diff --git a/kviewshell/pageSize.h b/kviewshell/pageSize.h
index 5ba0194e..27b30501 100644
--- a/kviewshell/pageSize.h
+++ b/kviewshell/pageSize.h
@@ -14,10 +14,10 @@
#include "simplePageSize.h"
-#include <qobject.h>
+#include <tqobject.h>
-class QString;
-class QStringList;
+class TQString;
+class TQStringList;
/* \brief This class represents physical page sizes.
@@ -38,7 +38,7 @@ The main difference to the SimplePageSize class are the following.
@version 1.0.0
*/
-class pageSize : public QObject, public SimplePageSize
+class pageSize : public TQObject, public SimplePageSize
{
Q_OBJECT
@@ -58,15 +58,15 @@ public:
/** \brief List of standard pageSizes
This method returns the names of standard pageSizes,
- e.g. "A4". These can be used, e.g., by a QComboBox to let the user
+ e.g. "A4". These can be used, e.g., by a TQComboBox to let the user
choose known sizes. The returned list is also a list of all possible
return values of the formatName() method explained below. If you
call pageSizeNames() more than once, it is guaranteed that the
same list of strings will be returned.
- @returns QStringList that contains
+ @returns TQStringList that contains
*/
- QStringList pageSizeNames();
+ TQStringList pageSizeNames();
/** \brief Set page size by name.
@@ -97,7 +97,7 @@ public:
@returns 'True', if the parameter could be parsed, and 'false'
otherwise.
*/
- bool setPageSize(const QString& name);
+ bool setPageSize(const TQString& name);
/** \brief Set page size from width and height strings
@@ -125,7 +125,7 @@ public:
@param heightUnits units for the height string. Currently "mm", "cm"
and "in" are allowed.
*/
- void setPageSize(const QString& width, const QString& widthUnits, const QString& height, const QString& heightUnits);
+ void setPageSize(const TQString& width, const TQString& widthUnits, const TQString& height, const TQString& heightUnits);
/** \brief Set page size
@@ -157,7 +157,7 @@ public:
US Letter and US Legal are best given in inches, to avoid very
odd numbers. If the page format is unknown, returns a guess
based on the current locale. */
- QString preferredUnit() const;
+ TQString preferredUnit() const;
/** \brief Returns the page width as a string
@@ -167,7 +167,7 @@ public:
@returns a string containing a number, e.g. "3.1415", which gives the page
width in the given unit. If the unit is not recognized, the string "--" is returned.
*/
- QString widthString(const QString& unit) const;
+ TQString widthString(const TQString& unit) const;
/** \brief Returns the page height as a string
@@ -178,7 +178,7 @@ public:
the given unit. If the unit is not recognized, the string "--" is
returned.
*/
- QString heightString(const QString& unit) const;
+ TQString heightString(const TQString& unit) const;
/** \brief Returns a name for the page size, if this is a standard
size
@@ -188,11 +188,11 @@ public:
297x210.
@returns A name for the current page size, if the format has a
- name, or QString::null otherwise. If the result is not
- QString::null, it is guaranteed to be one of the strings
+ name, or TQString::null otherwise. If the result is not
+ TQString::null, it is guaranteed to be one of the strings
returned by the pageSizeNames() method.
*/
- QString formatName() const;
+ TQString formatName() const;
/** \brief Returns an number for the page size, if this is a
standard size
@@ -203,7 +203,7 @@ public:
@returns If the current format is one of the standard sizes, a
non-negative integer is returned, which is an index to the
- QStringList returned by the pageSizeNames() method. If the
+ TQStringList returned by the pageSizeNames() method. If the
current format is none of the standard sizes, -1 is returned.
*/
int formatNumber() const {return currentSize;}
@@ -220,13 +220,13 @@ public:
*/
int getOrientation() const;
- /** \brief Returns a string that can be read by setPageSize(QString)
+ /** \brief Returns a string that can be read by setPageSize(TQString)
@returns This method returns a string like "210x297". The numbers
- are page width and height in millimeters. The setPageSize(QString)
+ are page width and height in millimeters. The setPageSize(TQString)
method will understand this output.
*/
- QString serialize() const;
+ TQString serialize() const;
public slots:
/** \brief Sets orientation
diff --git a/kviewshell/pageSizeDialog.cpp b/kviewshell/pageSizeDialog.cpp
index 3a64cbe3..75c4409d 100644
--- a/kviewshell/pageSizeDialog.cpp
+++ b/kviewshell/pageSizeDialog.cpp
@@ -13,11 +13,11 @@
#include <kcombobox.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qvalidator.h>
-#include <qhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqvalidator.h>
+#include <tqhbox.h>
@@ -25,13 +25,13 @@
#include "pageSizeWidget.h"
-pageSizeDialog::pageSizeDialog( QWidget *parent, pageSize *userPrefdPageSize, const char *name, bool modal)
+pageSizeDialog::pageSizeDialog( TQWidget *parent, pageSize *userPrefdPageSize, const char *name, bool modal)
:KDialogBase( parent, name, modal, i18n("Page Size"), Ok|Apply|Cancel, Ok,
true )
{
userPreferredPageSize = userPrefdPageSize;
pageSizeW = new pageSizeWidget(this, "PageSizeWidget");
- pageSizeW->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, 0, 0,
+ pageSizeW->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0,
pageSizeW->sizePolicy().hasHeightForWidth() ) );
setMainWidget(pageSizeW);
}
@@ -52,7 +52,7 @@ void pageSizeDialog::slotApply()
}
-void pageSizeDialog::setPageSize(const QString& name)
+void pageSizeDialog::setPageSize(const TQString& name)
{
if (pageSizeW == 0)
return;
diff --git a/kviewshell/pageSizeDialog.h b/kviewshell/pageSizeDialog.h
index 17a4a0df..50e8c0b6 100644
--- a/kviewshell/pageSizeDialog.h
+++ b/kviewshell/pageSizeDialog.h
@@ -36,8 +36,8 @@ public:
// value whenever the user clicks on 'accept' or 'ok'. Programmers
// can then connect to the signal sizeChanged() of the object to be
// informed about the changes.
- pageSizeDialog( QWidget *parent=0, pageSize *userPrefdPageSize=0, const char *name=0, bool modal=true);
- void setPageSize(const QString&);
+ pageSizeDialog( TQWidget *parent=0, pageSize *userPrefdPageSize=0, const char *name=0, bool modal=true);
+ void setPageSize(const TQString&);
protected slots:
virtual void slotOk();
diff --git a/kviewshell/pageSizeWidget.cpp b/kviewshell/pageSizeWidget.cpp
index d485f3bb..a745d1ef 100644
--- a/kviewshell/pageSizeWidget.cpp
+++ b/kviewshell/pageSizeWidget.cpp
@@ -12,8 +12,8 @@
#include <kcombobox.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qlineedit.h>
-#include <qvalidator.h>
+#include <tqlineedit.h>
+#include <tqvalidator.h>
#include "pageSize.h"
#include "pageSizeWidget.h"
@@ -23,10 +23,10 @@
// Constructs a pageSizeWidget_base which is a child of 'parent', with
// the name 'name' and widget flags set to 'f'.
-pageSizeWidget::pageSizeWidget( QWidget* parent, const char* name, WFlags fl )
+pageSizeWidget::pageSizeWidget( TQWidget* parent, const char* name, WFlags fl )
: pageSizeWidget_base( parent, name, fl )
{
- connect(&chosenSize, SIGNAL(sizeChanged(const SimplePageSize&)), previewer, SLOT(setSize(const SimplePageSize&)));
+ connect(&chosenSize, TQT_SIGNAL(sizeChanged(const SimplePageSize&)), previewer, TQT_SLOT(setSize(const SimplePageSize&)));
// Set up the formatChoice QComboBox
formatChoice->insertItem(i18n("Custom Size"));
@@ -42,23 +42,23 @@ pageSizeWidget::pageSizeWidget( QWidget* parent, const char* name, WFlags fl )
}
paperSize(formatChoice->currentItem());
- connect(formatChoice, SIGNAL(activated(int)), this, SLOT(paperSize(int)));
- connect(orientationChoice, SIGNAL(activated(int)), this, SLOT(orientationChanged(int)));
+ connect(formatChoice, TQT_SIGNAL(activated(int)), this, TQT_SLOT(paperSize(int)));
+ connect(orientationChoice, TQT_SIGNAL(activated(int)), this, TQT_SLOT(orientationChanged(int)));
// Update the text fields when the user switches to a new unit, and
// when the "custom format" is NOT selected.
- connect(widthUnits, SIGNAL(activated(int)), this, SLOT(unitsChanged(int)));
- connect(heightUnits, SIGNAL(activated(int)), this, SLOT(unitsChanged(int)));
+ connect(widthUnits, TQT_SIGNAL(activated(int)), this, TQT_SLOT(unitsChanged(int)));
+ connect(heightUnits, TQT_SIGNAL(activated(int)), this, TQT_SLOT(unitsChanged(int)));
// Upate the chosen size whenever the user edits the input field.
- connect(widthInput, SIGNAL(textChanged(const QString &)), this, SLOT(input(const QString &)));
- connect(heightInput, SIGNAL(textChanged(const QString &)), this, SLOT(input(const QString &)));
+ connect(widthInput, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(input(const TQString &)));
+ connect(heightInput, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(input(const TQString &)));
// Allow entries between 0 and 1200. More filtering is done by the
// pageSize class, which silently ignores values which are out of
// range.
- widthInput->setValidator(new QDoubleValidator(0.0, 1200.0, 1, this, "widthValidator"));
- heightInput->setValidator(new QDoubleValidator(0.0, 1200.0, 1, this, "heightValidator"));
+ widthInput->setValidator(new TQDoubleValidator(0.0, 1200.0, 1, this, "widthValidator"));
+ heightInput->setValidator(new TQDoubleValidator(0.0, 1200.0, 1, this, "heightValidator"));
}
@@ -81,7 +81,7 @@ void pageSizeWidget::paperSize(int index)
}
-void pageSizeWidget::setPageSize(const QString& sizeName)
+void pageSizeWidget::setPageSize(const TQString& sizeName)
{
chosenSize.setPageSize(sizeName);
@@ -104,9 +104,9 @@ void pageSizeWidget::fillTextFields()
// Warning! It is really necessary here to first generate both
// strings, and then call setText() on the input widgets. Reason?
// Calling setText() implicitly calls the input() method via the
- // textChanged()-Signal of the QLineEdit widgets.
- QString width = chosenSize.widthString(widthUnits->currentText());
- QString height = chosenSize.heightString(heightUnits->currentText());
+ // textChanged()-Signal of the TQLineEdit widgets.
+ TQString width = chosenSize.widthString(widthUnits->currentText());
+ TQString height = chosenSize.heightString(heightUnits->currentText());
widthInput->setText(width);
heightInput->setText(height);
@@ -120,7 +120,7 @@ void pageSizeWidget::unitsChanged(int)
if (formatChoice->currentItem() != 0)
fillTextFields();
else
- input(QString::null);
+ input(TQString::null);
}
@@ -138,7 +138,7 @@ void pageSizeWidget::orientationChanged(int orient)
}
-void pageSizeWidget::input(const QString &)
+void pageSizeWidget::input(const TQString &)
{
chosenSize.setPageSize(widthInput->text(), widthUnits->currentText(), heightInput->text(), heightUnits->currentText());
}
diff --git a/kviewshell/pageSizeWidget.h b/kviewshell/pageSizeWidget.h
index 76cc0d02..ac95dd4e 100644
--- a/kviewshell/pageSizeWidget.h
+++ b/kviewshell/pageSizeWidget.h
@@ -14,19 +14,19 @@
#include "pageSize.h"
#include "pageSizeWidget_base.h"
-class QDoubleValidator;
+class TQDoubleValidator;
class pageSizeWidget : public pageSizeWidget_base
{
Q_OBJECT
public:
- pageSizeWidget( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ pageSizeWidget( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
// Sets the page size. If the dialog is already shown, updates all
// the GUI. Accepts the same strings as input as the setPageSize()
// method of the pageSize() class.
- void setPageSize(const QString&);
+ void setPageSize(const TQString&);
void setOrientation(int ori);
@@ -40,13 +40,13 @@ protected slots:
// the fillTextFields() slot.
void unitsChanged(int);
void orientationChanged(int = 0);
- void input(const QString &);
+ void input(const TQString &);
private:
pageSize chosenSize;
- QDoubleValidator *widthValidator;
- QDoubleValidator *heightValidator;
+ TQDoubleValidator *widthValidator;
+ TQDoubleValidator *heightValidator;
};
#endif // PAGESIZEWIDGET_H
diff --git a/kviewshell/pageView.cpp b/kviewshell/pageView.cpp
index c7813280..884d7288 100644
--- a/kviewshell/pageView.cpp
+++ b/kviewshell/pageView.cpp
@@ -22,26 +22,26 @@
#include <config.h>
#include <kdebug.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qrect.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqrect.h>
#include <math.h>
#include "pageView.h"
#include "pageNumber.h"
-PageView::PageView( QWidget* parent, const char* name )
- : QScrollView( parent, name, WStaticContents | WNoAutoErase)
+PageView::PageView( TQWidget* parent, const char* name )
+ : TQScrollView( parent, name, WStaticContents | WNoAutoErase)
{
moveTool = true;
widgetList = 0;
- viewport()->setFocusPolicy(QWidget::StrongFocus);
+ viewport()->setFocusPolicy(TQWidget::StrongFocus);
- setResizePolicy(QScrollView::Manual);
+ setResizePolicy(TQScrollView::Manual);
- setVScrollBarMode(QScrollView::Auto);
- setHScrollBarMode(QScrollView::Auto);
+ setVScrollBarMode(TQScrollView::Auto);
+ setHScrollBarMode(TQScrollView::Auto);
viewport()->setBackgroundMode(Qt::NoBackground);
@@ -54,11 +54,11 @@ PageView::PageView( QWidget* parent, const char* name )
continuousViewmode = true;
fullScreen = false;
- connect(this, SIGNAL(contentsMoving(int, int)), this, SLOT(calculateCurrentPageNumber(int, int)));
+ connect(this, TQT_SIGNAL(contentsMoving(int, int)), this, TQT_SLOT(calculateCurrentPageNumber(int, int)));
}
-void PageView::addChild( QPtrVector<DocumentWidget> *wdgList )
+void PageView::addChild( TQPtrVector<DocumentWidget> *wdgList )
{
if( wdgList == 0 ) {
kdError(1223) << "PageView::addChild(...) called with invalid arguments" << endl;
@@ -171,7 +171,7 @@ void PageView::scrollTop()
verticalScrollBar()->setValue( verticalScrollBar()->minValue() );
}
-void PageView::keyPressEvent( QKeyEvent* e )
+void PageView::keyPressEvent( TQKeyEvent* e )
{
switch ( e->key() ) {
case Key_Up:
@@ -193,7 +193,7 @@ void PageView::keyPressEvent( QKeyEvent* e )
e->accept();
}
-void PageView::contentsMousePressEvent( QMouseEvent* e )
+void PageView::contentsMousePressEvent( TQMouseEvent* e )
{
if (e->button() == LeftButton)
{
@@ -213,26 +213,26 @@ void PageView::contentsMousePressEvent( QMouseEvent* e )
}
}
-void PageView::contentsMouseReleaseEvent( QMouseEvent* )
+void PageView::contentsMouseReleaseEvent( TQMouseEvent* )
{
setCursor(Qt::arrowCursor);
}
-void PageView::contentsMouseMoveEvent( QMouseEvent* e )
+void PageView::contentsMouseMoveEvent( TQMouseEvent* e )
{
- QPoint newPos = e->globalPos();
+ TQPoint newPos = e->globalPos();
if (e->state() == LeftButton && moveTool)
{
- QPoint delta = dragGrabPos - newPos;
+ TQPoint delta = dragGrabPos - newPos;
scrollBy(delta.x(), delta.y());
}
dragGrabPos = newPos;
}
-void PageView::viewportResizeEvent( QResizeEvent* e )
+void PageView::viewportResizeEvent( TQResizeEvent* e )
{
- QScrollView::viewportResizeEvent( e );
+ TQScrollView::viewportResizeEvent( e );
if (!widgetList)
return;
@@ -265,11 +265,11 @@ bool PageView::singlePageFullScreenMode()
void PageView::slotShowScrollbars(bool status)
{
if (status == true) {
- setVScrollBarMode(QScrollView::Auto);
- setHScrollBarMode(QScrollView::Auto);
+ setVScrollBarMode(TQScrollView::Auto);
+ setHScrollBarMode(TQScrollView::Auto);
} else {
- setVScrollBarMode(QScrollView::AlwaysOff);
- setHScrollBarMode(QScrollView::AlwaysOff);
+ setVScrollBarMode(TQScrollView::AlwaysOff);
+ setHScrollBarMode(TQScrollView::AlwaysOff);
}
}
@@ -278,10 +278,10 @@ void PageView::setFullScreenMode(bool fullScreen)
this -> fullScreen = fullScreen;
if (fullScreen == true)
{
- setVScrollBarMode(QScrollView::AlwaysOff);
- setHScrollBarMode(QScrollView::AlwaysOff);
+ setVScrollBarMode(TQScrollView::AlwaysOff);
+ setHScrollBarMode(TQScrollView::AlwaysOff);
oldFrameStyle = frameStyle();
- setFrameStyle(QFrame::NoFrame);
+ setFrameStyle(TQFrame::NoFrame);
backgroundColor = viewport()->paletteBackgroundColor();
if (singlePageFullScreenMode())
{
@@ -307,7 +307,7 @@ void PageView::layoutPages(bool zoomChanged)
// (we detect that by looking at the contentsWidth and -Height).
if (widgetList->isEmpty()) {
if ((contentsWidth() != 0) || (contentsHeight() != 0)) {
- QScrollView::resizeContents(0,0);
+ TQScrollView::resizeContents(0,0);
}
return;
}
@@ -321,7 +321,7 @@ void PageView::layoutPages(bool zoomChanged)
distance = 0;
}
- QMemArray<Q_UINT32> colWidth(nrCols);
+ TQMemArray<Q_UINT32> colWidth(nrCols);
for(Q_UINT8 i=0; i<colWidth.size(); i++)
colWidth[i] = 0;
@@ -335,7 +335,7 @@ void PageView::layoutPages(bool zoomChanged)
numRows = (Q_INT16)ceil(((double)widgetList->size()) / nrCols);
}
- QMemArray<Q_UINT32> rowHeight(numRows);
+ TQMemArray<Q_UINT32> rowHeight(numRows);
for(Q_UINT16 i=0; i<rowHeight.size(); i++)
rowHeight[i] = 0;
@@ -369,7 +369,7 @@ void PageView::layoutPages(bool zoomChanged)
totalWidth += colWidth[i];
totalWidth += (nrCols+1)*distance;
- QSize newViewportSize = viewportSize( totalWidth, totalHeight );
+ TQSize newViewportSize = viewportSize( totalWidth, totalHeight );
Q_UINT32 centeringLeft = 0;
if( (Q_UINT32)newViewportSize.width() > totalWidth )
centeringLeft = ( newViewportSize.width() - totalWidth )/2;
@@ -381,7 +381,7 @@ void PageView::layoutPages(bool zoomChanged)
if (((Q_UINT32)contentsWidth() != totalWidth) || ((Q_UINT32)contentsHeight() != totalHeight))
{
// Calculate the point in the coordinates of the contents which is currently at the center of the viewport.
- QPoint midPoint = QPoint(visibleWidth() / 2 + contentsX(), visibleHeight() / 2 + contentsY());
+ TQPoint midPoint = TQPoint(visibleWidth() / 2 + contentsX(), visibleHeight() / 2 + contentsY());
double midPointRatioX = (double)(midPoint.x()) / contentsWidth();
double midPointRatioY = (double)(midPoint.y()) / contentsHeight();
@@ -394,12 +394,12 @@ void PageView::layoutPages(bool zoomChanged)
// Finally, calculate the left and top coordinates of each row and
// column, respectively
- QMemArray<Q_UINT32> colLeft(nrCols);
+ TQMemArray<Q_UINT32> colLeft(nrCols);
colLeft[0] = distance;
for(Q_UINT8 i=1; i<colLeft.size(); i++)
colLeft[i] = colLeft[i-1]+colWidth[i-1]+distance;
- QMemArray<Q_UINT32> rowTop(numRows);
+ TQMemArray<Q_UINT32> rowTop(numRows);
rowTop[0] = distance;
for(Q_UINT16 i=1; i<rowTop.size(); i++)
rowTop[i] = rowTop[i-1]+rowHeight[i-1]+distance;
@@ -442,13 +442,13 @@ void PageView::layoutPages(bool zoomChanged)
}
-void PageView::contentsWheelEvent ( QWheelEvent * e )
+void PageView::contentsWheelEvent ( TQWheelEvent * e )
{
emit(wheelEventReceived(e));
}
-void PageView::moveViewportToWidget(QWidget* widget, int y)
+void PageView::moveViewportToWidget(TQWidget* widget, int y)
{
int verticalPos = 0;
int verticalPosTop = 0;
@@ -487,10 +487,10 @@ void PageView::moveViewportToWidget(QWidget* widget, int y)
}
-void PageView::viewportPaintEvent(QPaintEvent* e)
+void PageView::viewportPaintEvent(TQPaintEvent* e)
{
// Region from which rectangles occupied by child widgets will by substracted.
- QRegion backgroundArea(e->rect());
+ TQRegion backgroundArea(e->rect());
if (widgetList != 0)
{
@@ -502,12 +502,12 @@ void PageView::viewportPaintEvent(QPaintEvent* e)
if (!item->geometry().intersects(e->rect()))
continue;
- QRect widgetGeometry = item->geometry();
+ TQRect widgetGeometry = item->geometry();
// Draw the widget.
if (e->rect().intersects(widgetGeometry))
{
- QRect widgetRect = e->rect().intersect(widgetGeometry);
+ TQRect widgetRect = e->rect().intersect(widgetGeometry);
widgetRect.moveBy(-widgetGeometry.left(), -widgetGeometry.top());
item->update(widgetRect);
@@ -519,9 +519,9 @@ void PageView::viewportPaintEvent(QPaintEvent* e)
}
// Paint the background.
- QPainter p(viewport());
+ TQPainter p(viewport());
- QMemArray<QRect> backgroundRects = backgroundArea.rects();
+ TQMemArray<TQRect> backgroundRects = backgroundArea.rects();
for (unsigned int i = 0; i < backgroundRects.count(); i++)
p.fillRect(backgroundRects[i], colorGroup().mid());
@@ -534,7 +534,7 @@ void PageView::calculateCurrentPageNumber(int x, int y)
if (widgetList == 0)
return;
- QRect viewportRect(x, y, visibleWidth(), visibleHeight());
+ TQRect viewportRect(x, y, visibleWidth(), visibleHeight());
//kdDebug() << "viewportRect(" << viewportRect.x() << ", " << viewportRect.y() << ", "
// << viewportRect.width() << ", " << viewportRect.height() << ")" << endl;
@@ -552,14 +552,14 @@ void PageView::calculateCurrentPageNumber(int x, int y)
// Check if the Widget is visible
int cx = childX(documentWidget);
int cy = childY(documentWidget);
- QRect widgetRect(cx, cy, documentWidget->width(), documentWidget->height());
+ TQRect widgetRect(cx, cy, documentWidget->width(), documentWidget->height());
bool isVisible = widgetRect.intersects(viewportRect);
if (!isVisible)
continue;
// Calculate the number of visible pixels of the widget
- QRect visibleRect = widgetRect.intersect(viewportRect);
+ TQRect visibleRect = widgetRect.intersect(viewportRect);
int visiblePixels = visibleRect.width() * visibleRect.height();
//kdDebug() << visiblePixels << " pixels are visible of page " << documentWidget->getPageNumber() << endl;
diff --git a/kviewshell/pageView.h b/kviewshell/pageView.h
index d87ae0ca..e2dfd59e 100644
--- a/kviewshell/pageView.h
+++ b/kviewshell/pageView.h
@@ -25,13 +25,13 @@
#include "documentWidget.h"
-#include <qptrvector.h>
-#include <qscrollview.h>
+#include <tqptrvector.h>
+#include <tqscrollview.h>
class PageNumber;
/*
- * PageView is a customized QScrollView, which can hold one
+ * PageView is a customized TQScrollView, which can hold one
* page. This page will be centered on the viewport.
*/
class PageView : public QScrollView
@@ -39,10 +39,10 @@ class PageView : public QScrollView
Q_OBJECT
public:
- PageView( QWidget* parent = 0, const char* name = 0 );
+ PageView( TQWidget* parent = 0, const char* name = 0 );
~PageView() {}
- void addChild( QPtrVector<DocumentWidget> *wdgList );
+ void addChild( TQPtrVector<DocumentWidget> *wdgList );
/** Sets the number of columns into which the widgets are
aligned. If nothing is set, '2' is the default. */
@@ -85,7 +85,7 @@ public:
int distanceBetweenPages() { return distanceBetweenWidgets; }
/** Moves the viewport so that the widget is at the top left corner. */
- void moveViewportToWidget(QWidget* widget, int y = 0);
+ void moveViewportToWidget(TQWidget* widget, int y = 0);
bool isMoveToolEnabled() const { return moveTool; }
@@ -112,31 +112,31 @@ public slots:
void slotEnableMoveTool(bool enable);
signals:
- void viewSizeChanged(const QSize& size);
- void pageSizeChanged(const QSize& size);
+ void viewSizeChanged(const TQSize& size);
+ void pageSizeChanged(const TQSize& size);
void currentPageChanged(const PageNumber&);
/** This signal is emitted when the scrollView receives a mouse
wheel event. */
- void wheelEventReceived( QWheelEvent * );
+ void wheelEventReceived( TQWheelEvent * );
protected:
- void keyPressEvent( QKeyEvent* );
+ void keyPressEvent( TQKeyEvent* );
- /** Reimplemented from QScrollView to make sure that the page is
+ /** Reimplemented from TQScrollView to make sure that the page is
centered when it fits in the viewport. */
- void viewportResizeEvent( QResizeEvent* );
- void viewportPaintEvent(QPaintEvent*);
+ void viewportResizeEvent( TQResizeEvent* );
+ void viewportPaintEvent(TQPaintEvent*);
- /** Reimplemented from QScrollView, because the kviepart needs to
+ /** Reimplemented from TQScrollView, because the kviepart needs to
handle the wheel events itself. The wheel event is passed on by
emitting the singal "wheelEventReceived". Nothing else is done. */
- void contentsWheelEvent ( QWheelEvent * );
+ void contentsWheelEvent ( TQWheelEvent * );
- void contentsMousePressEvent(QMouseEvent*);
- void contentsMouseReleaseEvent(QMouseEvent*);
- void contentsMouseMoveEvent(QMouseEvent*);
+ void contentsMousePressEvent(TQMouseEvent*);
+ void contentsMouseReleaseEvent(TQMouseEvent*);
+ void contentsMouseMoveEvent(TQMouseEvent*);
private slots:
void calculateCurrentPageNumber(int x, int y);
@@ -144,9 +144,9 @@ private slots:
private:
/** Stores the mouse position between two mouse events. This is used
to implement the "grab and drag the viewport contents" feature. */
- QPoint dragGrabPos;
+ TQPoint dragGrabPos;
- QPtrVector<DocumentWidget>* widgetList;
+ TQPtrVector<DocumentWidget>* widgetList;
/** Used internally by the centerContents()-method. Set with the
setNrColumns() method */
@@ -163,7 +163,7 @@ private:
/** color of the viewport's background. This is also
stored on entering the fullscreen mode. */
- QColor backgroundColor;
+ TQColor backgroundColor;
/** Distance between pages in pixels
(this is independent of the zoom level). */
diff --git a/kviewshell/plugins/djvu/djvumultipage.cpp b/kviewshell/plugins/djvu/djvumultipage.cpp
index 2599cc29..0f0c7074 100644
--- a/kviewshell/plugins/djvu/djvumultipage.cpp
+++ b/kviewshell/plugins/djvu/djvumultipage.cpp
@@ -28,10 +28,10 @@
#include <kprinter.h>
#include <ktempfile.h>
#include "kvsprefs.h"
-#include <qapplication.h>
-#include <qpaintdevicemetrics.h>
-#include <qprinter.h>
-#include <qtooltip.h>
+#include <tqapplication.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqprinter.h>
+#include <tqtooltip.h>
#include "ByteStream.h"
#include "DjVuToPS.h"
@@ -47,8 +47,8 @@ typedef KParts::GenericFactory<DjVuMultiPage> DjVuMultiPageFactory;
K_EXPORT_COMPONENT_FACTORY(djvuviewpart, DjVuMultiPageFactory)
-DjVuMultiPage::DjVuMultiPage(QWidget *parentWidget, const char *widgetName, QObject *parent,
- const char *name, const QStringList&)
+DjVuMultiPage::DjVuMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent,
+ const char *name, const TQStringList&)
: KMultiPage(parentWidget, widgetName, parent, name), djvuRenderer(parentWidget)
{
/* This is kparts wizardry that cannot be understood by man. Simply
@@ -57,7 +57,7 @@ DjVuMultiPage::DjVuMultiPage(QWidget *parentWidget, const char *widgetName, QObj
djvuRenderer.setName("DjVu renderer");
// Render modes
- QStringList renderModes;
+ TQStringList renderModes;
renderModes.append(i18n("Color"));
renderModes.append(i18n("Black and White"));
renderModes.append(i18n("Show foreground only"));
@@ -67,10 +67,10 @@ DjVuMultiPage::DjVuMultiPage(QWidget *parentWidget, const char *widgetName, QObj
renderModeAction->setCurrentItem(Prefs::renderMode());
- deletePagesAction = new KAction(i18n("Delete Pages..."), 0, this, SLOT(slotDeletePages()), actionCollection(), "delete_pages");
+ deletePagesAction = new KAction(i18n("Delete Pages..."), 0, this, TQT_SLOT(slotDeletePages()), actionCollection(), "delete_pages");
// change the rendermode
- connect(renderModeAction, SIGNAL(activated(int)), this, SLOT(setRenderMode(int)));
+ connect(renderModeAction, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setRenderMode(int)));
/* It is very important that this method is called in the
constructor. Otherwise kmultipage does not know how to render
@@ -122,11 +122,11 @@ void DjVuMultiPage::setFile(bool r)
enableActions(r);
}
-QStringList DjVuMultiPage::fileFormats() const
+TQStringList DjVuMultiPage::fileFormats() const
{
/* This list is used in the file selection dialog when the file is
saved */
- QStringList r;
+ TQStringList r;
r << i18n("*.djvu|DjVu file (*.djvu)");
return r;
}
@@ -164,10 +164,10 @@ void DjVuMultiPage::slotDeletePages()
KDialogBase dialog( parentWdg, "urldialog", true, i18n("Delete Pages"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true );
PageRangeWidget range( 1, numberOfPages(), currentPageNumber(), &dialog, "range widget" );
- QToolTip::add( &range, i18n( "Select the pages you wish to delete." ) );
+ TQToolTip::add( &range, i18n( "Select the pages you wish to delete." ) );
dialog.setButtonOK(i18n("Delete Pages"));
dialog.setMainWidget(&range);
- if (dialog.exec() != QDialog::Accepted)
+ if (dialog.exec() != TQDialog::Accepted)
return;
djvuRenderer.deletePages(range.getFrom(), range.getTo());
@@ -188,7 +188,7 @@ void DjVuMultiPage::slotDeletePages()
//@@@@@@@@@@ tableOfContents->setContents(renderer->getBookmarks());
// Clear Statusbar
- emit setStatusBarText(QString::null);
+ emit setStatusBarText(TQString::null);
}
@@ -222,7 +222,7 @@ void DjVuMultiPage::print()
// initialize the printer using the print dialog
if ( printer->setup(parentWdg, i18n("Print %1").arg(m_file.section('/', -1))) ) {
// Now do the printing.
- QValueList<int> pageList = printer->pageList();
+ TQValueList<int> pageList = printer->pageList();
if (pageList.isEmpty())
printer->abort();
else {
@@ -236,7 +236,7 @@ void DjVuMultiPage::print()
// Set PostScript Language Level, taking 3 as the default
options.set_format(DjVuToPS::Options::PS);
- QString op = printer->option( "kde-kdjvu-pslevel" );
+ TQString op = printer->option( "kde-kdjvu-pslevel" );
if (op == "1")
options.set_level(1);
else
@@ -279,12 +279,12 @@ void DjVuMultiPage::print()
else
options.set_zoom(100);
- KTempFile tmpPSFile(QString::null, "ps");
+ KTempFile tmpPSFile(TQString::null, "ps");
tmpPSFile.close();
tmpPSFile.setAutoDelete(true);
if (djvuRenderer.convertToPSFile(converter, tmpPSFile.name(), pageList ) == true)
- printer->printFiles( QStringList(tmpPSFile.name()), true );
+ printer->printFiles( TQStringList(tmpPSFile.name()), true );
else
printer->abort();
}
@@ -312,18 +312,18 @@ void DjVuMultiPage::slotSave()
return;
// Try to guess the proper ending...
- QString formats;
- QString ending;
+ TQString formats;
+ TQString ending;
int rindex = m_file.findRev(".");
if (rindex == -1) {
- ending = QString::null;
- formats = QString::null;
+ ending = TQString::null;
+ formats = TQString::null;
} else {
ending = m_file.mid(rindex); // e.g. ".dvi"
formats = fileFormats().grep(ending).join("\n");
}
- QString fileName = KFileDialog::getSaveFileName(QString::null, formats, 0, i18n("Save File As"));
+ TQString fileName = KFileDialog::getSaveFileName(TQString::null, formats, 0, i18n("Save File As"));
if (fileName.isEmpty())
return;
@@ -333,7 +333,7 @@ void DjVuMultiPage::slotSave()
if (!ending.isEmpty() && fileName.find(ending) == -1)
fileName = fileName+ending;
- if (QFile(fileName).exists()) {
+ if (TQFile(fileName).exists()) {
int r = KMessageBox::warningContinueCancel(parentWdg, i18n("The file %1\nalready exists. Do you want to overwrite it?").arg(fileName),
i18n("Overwrite File"), i18n("Overwrite"));
if (r == KMessageBox::Cancel)
diff --git a/kviewshell/plugins/djvu/djvumultipage.h b/kviewshell/plugins/djvu/djvumultipage.h
index b417144b..c460e6b3 100644
--- a/kviewshell/plugins/djvu/djvumultipage.h
+++ b/kviewshell/plugins/djvu/djvumultipage.h
@@ -24,7 +24,7 @@
#ifndef __DJVUMULTIPAGE_H
#define __DJVUMULTIPAGE_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "kmultipage.h"
#include "djvurenderer.h"
@@ -95,8 +95,8 @@ public:
kmultipage. Please have a look at the constructor's source code to
see how to adjust this for your implementation.
*/
- DjVuMultiPage(QWidget *parentWidget, const char *widgetName, QObject *parent,
- const char *name, const QStringList& args = QStringList());
+ DjVuMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent,
+ const char *name, const TQStringList& args = TQStringList());
/** Destructor
@@ -111,7 +111,7 @@ public:
This method returns the list of supported file formats for saving
the file.
*/
- virtual QStringList fileFormats() const;
+ virtual TQStringList fileFormats() const;
/** Author information
diff --git a/kviewshell/plugins/djvu/djvurenderer.cpp b/kviewshell/plugins/djvu/djvurenderer.cpp
index 54a96b38..49413818 100644
--- a/kviewshell/plugins/djvu/djvurenderer.cpp
+++ b/kviewshell/plugins/djvu/djvurenderer.cpp
@@ -24,9 +24,9 @@
#include <kmessagebox.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qfileinfo.h>
-#include <qimage.h>
-#include <qpainter.h>
+#include <tqfileinfo.h>
+#include <tqimage.h>
+#include <tqpainter.h>
#include <kapp.h>
#include "GBitmap.h"
@@ -44,21 +44,21 @@
//#define KF_DEBUG
-inline GUTF8String GStringFromQString(const QString& x)
+inline GUTF8String GStringFromQString(const TQString& x)
{
GUTF8String retval=(const char*)x.utf8();
return retval;
}
-inline QString QStringFromGString(const GUTF8String& x)
+inline TQString QStringFromGString(const GUTF8String& x)
{
- QString retval=QString::fromUtf8((const char*)x);
+ TQString retval=TQString::fromUtf8((const char*)x);
return retval;
}
-DjVuRenderer::DjVuRenderer(QWidget* par)
+DjVuRenderer::DjVuRenderer(TQWidget* par)
: DocumentRenderer(par)
{
#ifdef KF_DEBUG
@@ -77,7 +77,7 @@ DjVuRenderer::~DjVuRenderer()
#endif
// Wait for all access to this documentRenderer to finish
- QMutexLocker locker( &mutex );
+ TQMutexLocker locker( &mutex );
}
@@ -98,7 +98,7 @@ void DjVuRenderer::drawPage(double resolution, RenderedDocumentPage* page)
}
// Wait for all access to this documentRenderer to finish
- QMutexLocker locker( &mutex );
+ TQMutexLocker locker( &mutex );
// more paranoid safety checks
if (page->getPageNumber() > numPages) {
@@ -151,7 +151,7 @@ void DjVuRenderer::drawPage(double resolution, RenderedDocumentPage* page)
else if (Prefs::renderMode() == Prefs::EnumRenderMode::Background)
djvuPixmap = djvuPage->get_bg_pixmap(pageRect, pageRect);
- QPainter* foreGroundPaint = page->getPainter();
+ TQPainter* foreGroundPaint = page->getPainter();
if (foreGroundPaint != 0)
{
if(djvuPixmap && Prefs::renderMode() != Prefs::EnumRenderMode::BlackAndWhite)
@@ -180,7 +180,7 @@ void DjVuRenderer::drawPage(double resolution, RenderedDocumentPage* page)
for (int j = 0; j < pageWidth; j++)
{
GPixel pixel = pixmapRow[j];
- foreGroundPaint->setPen(QColor(pixel.r, pixel.g, pixel.b));
+ foreGroundPaint->setPen(TQColor(pixel.r, pixel.g, pixel.b));
foreGroundPaint->drawPoint(j, pageHeight - i - 1);
}
}*/
@@ -217,7 +217,7 @@ void DjVuRenderer::drawPage(double resolution, RenderedDocumentPage* page)
for (int j = 0; j < pageWidth; j++)
{
unsigned char pixel = 255-bitmapRow[j];
- foreGroundPaint->setPen(QColor(pixel, pixel, pixel));
+ foreGroundPaint->setPen(TQColor(pixel, pixel, pixel));
foreGroundPaint->drawPoint(j, pageHeight - i - 1);
}
}*/
@@ -237,7 +237,7 @@ void DjVuRenderer::drawPage(double resolution, RenderedDocumentPage* page)
if (pageText)
{
- QSize djvuPageSize(djvuPage->get_width(), djvuPage->get_real_height());
+ TQSize djvuPageSize(djvuPage->get_width(), djvuPage->get_real_height());
fillInText(page, pageText, pageText->page_zone, djvuPageSize);
//kdDebug() << "Text of page " << pageNumber << endl;
//kdDebug() << (const char*)pageText->textUTF8 << endl;
@@ -249,14 +249,14 @@ void DjVuRenderer::drawPage(double resolution, RenderedDocumentPage* page)
}
-bool DjVuRenderer::setFile(const QString &fname, const KURL &)
+bool DjVuRenderer::setFile(const TQString &fname, const KURL &)
{
#ifdef KF_DEBUG
kdDebug() << "DjVuRenderer::setFile(" << fname << ") called" << endl;
#endif
// Wait for all access to this documentRenderer to finish
- QMutexLocker locker( &mutex );
+ TQMutexLocker locker( &mutex );
// If fname is the empty string, then this means: "close".
if (fname.isEmpty()) {
@@ -267,8 +267,8 @@ bool DjVuRenderer::setFile(const QString &fname, const KURL &)
// Paranoid saftey checks: make sure the file actually exists, and
// that it is a file, not a directory. Otherwise, show an error
// message and exit..
- QFileInfo fi(fname);
- QString filename = fi.absFilePath();
+ TQFileInfo fi(fname);
+ TQString filename = fi.absFilePath();
if (!fi.exists() || fi.isDir()) {
KMessageBox::error( parentWidget,
i18n("<qt><strong>File error.</strong> The specified file '%1' does not exist.</qt>").arg(filename),
@@ -353,12 +353,12 @@ void DjVuRenderer::getAnnotations(RenderedDocumentPage* page, GP<DjVuImage> djvu
GRect rect = map[pos]->get_bound_rect();
- QRect hyperlinkRect((int)(rect.xmin*scaleX+0.5), (int)((djvuPage->get_height()-rect.ymax)*scaleY+0.5),
+ TQRect hyperlinkRect((int)(rect.xmin*scaleX+0.5), (int)((djvuPage->get_height()-rect.ymax)*scaleY+0.5),
(int)(rect.width()*scaleX +0.5), (int)(rect.height()*scaleY+0.5));
- QString url((const char*)map[pos]->url);
- QString target((const char*)map[pos]->target);
- QString comment((const char*)map[pos]->comment);
+ TQString url((const char*)map[pos]->url);
+ TQString target((const char*)map[pos]->target);
+ TQString comment((const char*)map[pos]->comment);
// Create an anchor for this link.
if (!anchorList.contains(url))
@@ -418,7 +418,7 @@ bool DjVuRenderer::initializeDocument()
pageSizes[i].setPageSize(w, h);
}
}
- emit setStatusBarText(QString::null);
+ emit setStatusBarText(TQString::null);
// We will also generate a list of hyperlink-anchors in the document.
// So declare the existing lists empty.
@@ -459,7 +459,7 @@ GP<DjVuTXT> DjVuRenderer::getText(PageNumber pageNumber)
return 0;
}
-void DjVuRenderer::fillInText(RenderedDocumentPage* page, const GP<DjVuTXT>& text, DjVuTXT::Zone& zone, QSize& djvuPageSize)
+void DjVuRenderer::fillInText(RenderedDocumentPage* page, const GP<DjVuTXT>& text, DjVuTXT::Zone& zone, TQSize& djvuPageSize)
{
if (zone.children.isempty())
{
@@ -469,11 +469,11 @@ void DjVuRenderer::fillInText(RenderedDocumentPage* page, const GP<DjVuTXT>& tex
double scaleX = pageWidth / (double)djvuPageSize.width();
double scaleY = pageHeight / (double)djvuPageSize.height();
- QString zoneString = QStringFromGString(text->textUTF8.substr(zone.text_start, zone.text_length));
+ TQString zoneString = QStringFromGString(text->textUTF8.substr(zone.text_start, zone.text_length));
//kdDebug() << "zone text: " << zoneString << endl;
- QRect textRect((int)(zone.rect.xmin*scaleX+0.5), (int)((djvuPageSize.height()-zone.rect.ymax)*scaleY+0.5),
+ TQRect textRect((int)(zone.rect.xmin*scaleX+0.5), (int)((djvuPageSize.height()-zone.rect.ymax)*scaleY+0.5),
(int)(zone.rect.width()*scaleX+0.5), (int)(zone.rect.height()*scaleY+0.5));
//kdDebug() << "zone rect: " << textRect.x() << ", " << textRect.y() << ", " << textRect.width() << ", " << textRect.height() << endl;
TextBox textBox(textRect, zoneString);
@@ -545,7 +545,7 @@ bool DjVuRenderer::getPageInfo(GP<DjVuFile> file, int& width, int& height, int&
void DjVuRenderer::getText(RenderedDocumentPage* page)
{
- QMutexLocker locker( &mutex );
+ TQMutexLocker locker( &mutex );
int pageNumber = page->getPageNumber() - 1;
GP<DjVuTXT> pageText = getText(pageNumber);
@@ -560,37 +560,37 @@ void DjVuRenderer::getText(RenderedDocumentPage* page)
if (ok)
{
- QSize djvuPageSize(pageWidth, pageHeight);
+ TQSize djvuPageSize(pageWidth, pageHeight);
fillInText(page, pageText, pageText->page_zone, djvuPageSize);
}
}
}
-bool DjVuRenderer::convertToPSFile( DjVuToPS &converter, QString filename, QValueList<int> &pageList )
+bool DjVuRenderer::convertToPSFile( DjVuToPS &converter, TQString filename, TQValueList<int> &pageList )
{
if (document == 0) {
kdError(1223) << "DjVuRenderer::convertToPSFile(..) called when document was 0" << endl;
return false;
}
- QMutexLocker locker( &mutex );
+ TQMutexLocker locker( &mutex );
// Set up progress dialog
KProgressDialog *pdialog = new KProgressDialog(parentWidget, "Printing-ProgressDialog", i18n("Printing..."), i18n("Preparing pages for printing..."), true);
pdialog->setButtonText(i18n("Abort"));
pdialog->showCancelButton(true);
pdialog->progressBar()->setTotalSteps(pageList.size());
- pdialog->progressBar()->setFormat(QString::null);
+ pdialog->progressBar()->setFormat(TQString::null);
// Open output file
GURL outname = GURL::Filename::UTF8(GStringFromQString(filename));
GP<ByteStream> obs = ByteStream::create(outname, "w");
- QString pagename;
- QValueList<int>::ConstIterator it = pageList.begin();
+ TQString pagename;
+ TQValueList<int>::ConstIterator it = pageList.begin();
while (true) {
- pagename += QString::number(*it);
+ pagename += TQString::number(*it);
++it;
if (it == pageList.end())
break;
@@ -630,14 +630,14 @@ void DjVuRenderer::deletePages(Q_UINT16 from, Q_UINT16 to)
return;
}
- QMutexLocker locker( &mutex );
+ TQMutexLocker locker( &mutex );
KProgressDialog *pdialog = 0;
if (to-from > 9) {
pdialog = new KProgressDialog(parentWidget, "Printing-ProgressDialog", i18n("Deleting pages..."), i18n("Please wait while pages are removed..."), true);
pdialog->showCancelButton(false);
pdialog->progressBar()->setTotalSteps(to-from+1);
- pdialog->progressBar()->setFormat(QString::null);
+ pdialog->progressBar()->setFormat(TQString::null);
pdialog->show();
kapp->processEvents();
}
@@ -669,14 +669,14 @@ void DjVuRenderer::deletePages(Q_UINT16 from, Q_UINT16 to)
}
-bool DjVuRenderer::save(const QString &filename)
+bool DjVuRenderer::save(const TQString &filename)
{
if (document == 0) {
kdError() << "DjVuRenderer::save(..) called when document==0" << endl;
return false;
}
- QMutexLocker locker( &mutex );
+ TQMutexLocker locker( &mutex );
G_TRY {
document->save_as(GURL::Filename::UTF8(GStringFromQString(filename)), true);
@@ -688,7 +688,7 @@ bool DjVuRenderer::save(const QString &filename)
document->save_as(GURL::Filename::UTF8(filename.ascii()), true);
- if (QFile::exists(filename) == false)
+ if (TQFile::exists(filename) == false)
return false;
_isModified = false;
diff --git a/kviewshell/plugins/djvu/djvurenderer.h b/kviewshell/plugins/djvu/djvurenderer.h
index 40418c23..85b40626 100644
--- a/kviewshell/plugins/djvu/djvurenderer.h
+++ b/kviewshell/plugins/djvu/djvurenderer.h
@@ -25,7 +25,7 @@
#define _DJVURENDERER_H_
#include <kprogress.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include "DjVuImage.h"
#include "DjVuDocEditor.h"
@@ -57,7 +57,7 @@ public:
This constructor simply prints a message and calls the default constructor.
*/
- DjVuRenderer(QWidget* parent);
+ DjVuRenderer(TQWidget* parent);
/** Destructor
@@ -77,7 +77,7 @@ public:
@param fname the name of the file that should be opened.
*/
- virtual bool setFile(const QString& fname, const KURL &);
+ virtual bool setFile(const TQString& fname, const KURL &);
/** Rendering a page
@param res resolution at which drawing should take place
@@ -110,13 +110,13 @@ public:
wasn't. The conversion can fail, for example, when the user aborts
the operation.
*/
- bool convertToPSFile( DjVuToPS &converter, QString filename, QValueList<int> &pageList );
+ bool convertToPSFile( DjVuToPS &converter, TQString filename, TQValueList<int> &pageList );
/** Deletes pages from the document */
void deletePages(Q_UINT16 from, Q_UINT16 to);
/** Saves the file */
- bool save(const QString &filename);
+ bool save(const TQString &filename);
private:
/* This method is called after a document is loaded with
@@ -131,7 +131,7 @@ private:
GP<DjVuTXT> getText(PageNumber pageNumber);
- void fillInText(RenderedDocumentPage* page, const GP<DjVuTXT>& text, DjVuTXT::Zone& zone, QSize& djvuPageSize);
+ void fillInText(RenderedDocumentPage* page, const GP<DjVuTXT>& text, DjVuTXT::Zone& zone, TQSize& djvuPageSize);
GP<DjVuDocEditor> document;
@@ -139,7 +139,7 @@ private:
PostScript conversion */
static void printerInfoCallBack(int page_num, int page_count, int tot_pages, DjVuToPS::Stage, void *);
- QPixmap pixmap;
+ TQPixmap pixmap;
GP<ByteStream> PPMstream;
};
diff --git a/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions.cpp b/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions.cpp
index aea7d6b7..24b7dfbb 100644
--- a/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions.cpp
+++ b/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions.cpp
@@ -19,22 +19,22 @@
***************************************************************************/
#include <klocale.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
#include "kprintDialogPage_DJVUconversionoptions.h"
#include "kprintDialogPage_DJVUconversionoptions_basewidget.h"
-KPrintDialogPage_DJVUConversionOptions::KPrintDialogPage_DJVUConversionOptions( QWidget *parent, const char *name )
+KPrintDialogPage_DJVUConversionOptions::KPrintDialogPage_DJVUConversionOptions( TQWidget *parent, const char *name )
: KPrintDialogPage( parent, name )
{
setTitle( i18n("DJVU to PS Conversion") );
- kprintDialogPage_pageoptions_baseLayout = new QVBoxLayout( this, 11, 6, "kprintDialogPage_pageoptions_baseLayout");
+ kprintDialogPage_pageoptions_baseLayout = new TQVBoxLayout( this, 11, 6, "kprintDialogPage_pageoptions_baseLayout");
if (kprintDialogPage_pageoptions_baseLayout == 0) {
kdError(1223) << "KPrintDialogPage_DJVUPageOptions::KPrintDialogPage_DJVUPageOptions() cannot create layout" << endl;
return;
@@ -48,12 +48,12 @@ KPrintDialogPage_DJVUConversionOptions::KPrintDialogPage_DJVUConversionOptions(
-void KPrintDialogPage_DJVUConversionOptions::getOptions( QMap<QString,QString>& opts, bool )
+void KPrintDialogPage_DJVUConversionOptions::getOptions( TQMap<TQString,TQString>& opts, bool )
{
if (wdg == 0)
return;
- opts["kde-kdjvu-pslevel"] = QString::number(wdg->psLevel->currentItem() + 1);
+ opts["kde-kdjvu-pslevel"] = TQString::number(wdg->psLevel->currentItem() + 1);
kdDebug() << "getOptions: renderMode = " << wdg->renderMode->currentItem() << endl;
switch (wdg->renderMode->currentItem())
@@ -73,7 +73,7 @@ void KPrintDialogPage_DJVUConversionOptions::getOptions( QMap<QString,QString>&
}
-void KPrintDialogPage_DJVUConversionOptions::setOptions( const QMap<QString,QString>& opts )
+void KPrintDialogPage_DJVUConversionOptions::setOptions( const TQMap<TQString,TQString>& opts )
{
if (wdg == 0)
return;
@@ -92,7 +92,7 @@ void KPrintDialogPage_DJVUConversionOptions::setOptions( const QMap<QString,QStr
}
// Set render mode, taking "color" as default
- QString op = opts["kde-kdjvu-rendermode"];
+ TQString op = opts["kde-kdjvu-rendermode"];
if (op == "black-and-white")
{
wdg->renderMode->setCurrentItem(1);
@@ -112,7 +112,7 @@ void KPrintDialogPage_DJVUConversionOptions::setOptions( const QMap<QString,QStr
}
-bool KPrintDialogPage_DJVUConversionOptions::isValid( QString& )
+bool KPrintDialogPage_DJVUConversionOptions::isValid( TQString& )
{
return true;
}
diff --git a/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions.h b/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions.h
index 9e3faa90..c1ec4b3c 100644
--- a/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions.h
+++ b/kviewshell/plugins/djvu/kprintDialogPage_DJVUconversionoptions.h
@@ -34,16 +34,16 @@ class kprintDialogPage_DJVUconversionoptions_basewidget;
class KPrintDialogPage_DJVUConversionOptions : public KPrintDialogPage
{
public:
- KPrintDialogPage_DJVUConversionOptions( QWidget *parent = 0, const char *name = 0 );
+ KPrintDialogPage_DJVUConversionOptions( TQWidget *parent = 0, const char *name = 0 );
- void getOptions( QMap<QString,QString>& opts, bool incldef = false );
- void setOptions( const QMap<QString,QString>& opts );
- bool isValid( QString& msg );
+ void getOptions( TQMap<TQString,TQString>& opts, bool incldef = false );
+ void setOptions( const TQMap<TQString,TQString>& opts );
+ bool isValid( TQString& msg );
kprintDialogPage_DJVUconversionoptions_basewidget* wdg;
private:
- QVBoxLayout* kprintDialogPage_pageoptions_baseLayout;
+ TQVBoxLayout* kprintDialogPage_pageoptions_baseLayout;
};
diff --git a/kviewshell/plugins/djvu/kprintDialogPage_DJVUpageoptions.cpp b/kviewshell/plugins/djvu/kprintDialogPage_DJVUpageoptions.cpp
index cd77fa0e..e6872648 100644
--- a/kviewshell/plugins/djvu/kprintDialogPage_DJVUpageoptions.cpp
+++ b/kviewshell/plugins/djvu/kprintDialogPage_DJVUpageoptions.cpp
@@ -19,16 +19,16 @@
***************************************************************************/
#include <klocale.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
#include "kprintDialogPage_DJVUpageoptions.h"
-KPrintDialogPage_DJVUPageOptions::KPrintDialogPage_DJVUPageOptions( QWidget *parent, const char *name )
+KPrintDialogPage_DJVUPageOptions::KPrintDialogPage_DJVUPageOptions( TQWidget *parent, const char *name )
: KPrintDialogPage( parent, name )
{
setTitle( i18n("Page Size & Placement") );
@@ -38,17 +38,17 @@ KPrintDialogPage_DJVUPageOptions::KPrintDialogPage_DJVUPageOptions( QWidget *par
checkBox_fitpage = 0;
- kprintDialogPage_pageoptions_baseLayout = new QVBoxLayout( this, 11, 6, "kprintDialogPage_pageoptions_baseLayout");
+ kprintDialogPage_pageoptions_baseLayout = new TQVBoxLayout( this, 11, 6, "kprintDialogPage_pageoptions_baseLayout");
if (kprintDialogPage_pageoptions_baseLayout == 0) {
kdError(1223) << "KPrintDialogPage_DJVUPageOptions::KPrintDialogPage_DJVUPageOptions() cannot create layout" << endl;
return;
}
- checkBox_rotate = new QCheckBox( this, "checkBox_rotate" );
+ checkBox_rotate = new TQCheckBox( this, "checkBox_rotate" );
if (checkBox_rotate != 0) {
checkBox_rotate->setText( i18n( "Automatically choose landscape or portrait orientation" ) );
- QToolTip::add( checkBox_rotate, i18n( "If this option is enabled, some pages might be rotated to better fit the paper size." ) );
- QWhatsThis::add( checkBox_rotate, i18n( "<qt><p>If this option is enabled, landscape or portrait orientation are automatically chosen on a "
+ TQToolTip::add( checkBox_rotate, i18n( "If this option is enabled, some pages might be rotated to better fit the paper size." ) );
+ TQWhatsThis::add( checkBox_rotate, i18n( "<qt><p>If this option is enabled, landscape or portrait orientation are automatically chosen on a "
"page-by-page basis. This makes better use of the paper and gives more visually-"
"appealing printouts.</p>"
"<p><b>Note:</b> This option overrides the Portrait/Landscape option chosen in the printer "
@@ -57,11 +57,11 @@ KPrintDialogPage_DJVUPageOptions::KPrintDialogPage_DJVUPageOptions( QWidget *par
kprintDialogPage_pageoptions_baseLayout->addWidget( checkBox_rotate );
}
- checkBox_fitpage = new QCheckBox( this, "checkBox_shrink" );
+ checkBox_fitpage = new TQCheckBox( this, "checkBox_shrink" );
if (checkBox_fitpage != 0) {
checkBox_fitpage->setText( i18n( "Scale pages to fit paper size" ) );
- QToolTip::add( checkBox_fitpage, i18n( "If this option is enabled, all pages will be scaled to optimally fit the printer's paper size." ) );
- QWhatsThis::add( checkBox_fitpage, i18n( "<qt><p>If this option is enabled, all pages will be scaled to optimally fit the printer's "
+ TQToolTip::add( checkBox_fitpage, i18n( "If this option is enabled, all pages will be scaled to optimally fit the printer's paper size." ) );
+ TQWhatsThis::add( checkBox_fitpage, i18n( "<qt><p>If this option is enabled, all pages will be scaled to optimally fit the printer's "
"paper size.</p>"
"<p><b>Note:</b> If this option is enabled, and if the pages in your document have different sizes, "
"then different pages might be scaled by different scaling factors.</p></qt>" ) );
@@ -70,13 +70,13 @@ KPrintDialogPage_DJVUPageOptions::KPrintDialogPage_DJVUPageOptions( QWidget *par
kprintDialogPage_pageoptions_baseLayout->addStretch();
- resize( QSize(319, 166).expandedTo(minimumSizeHint()) );
+ resize( TQSize(319, 166).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
}
-void KPrintDialogPage_DJVUPageOptions::getOptions( QMap<QString,QString>& opts, bool )
+void KPrintDialogPage_DJVUPageOptions::getOptions( TQMap<TQString,TQString>& opts, bool )
{
// Save options, taking default values into consideration. Warning:
// The default values are also coded into setOptions() and
@@ -96,13 +96,13 @@ void KPrintDialogPage_DJVUPageOptions::getOptions( QMap<QString,QString>& opts,
}
-void KPrintDialogPage_DJVUPageOptions::setOptions( const QMap<QString,QString>& opts )
+void KPrintDialogPage_DJVUPageOptions::setOptions( const TQMap<TQString,TQString>& opts )
{
// Warning: All default values are also coded into getOptions() and
// kmultipage::print(..).
// same for rotation
- QString op = opts[ "kde-kviewshell-rotatepage" ];
+ TQString op = opts[ "kde-kviewshell-rotatepage" ];
if (checkBox_rotate != 0)
checkBox_rotate->setChecked( op != "false" );
@@ -113,7 +113,7 @@ void KPrintDialogPage_DJVUPageOptions::setOptions( const QMap<QString,QString>&
}
-bool KPrintDialogPage_DJVUPageOptions::isValid( QString& )
+bool KPrintDialogPage_DJVUPageOptions::isValid( TQString& )
{
return true;
}
diff --git a/kviewshell/plugins/djvu/kprintDialogPage_DJVUpageoptions.h b/kviewshell/plugins/djvu/kprintDialogPage_DJVUpageoptions.h
index 0121c1a0..5bb5833e 100644
--- a/kviewshell/plugins/djvu/kprintDialogPage_DJVUpageoptions.h
+++ b/kviewshell/plugins/djvu/kprintDialogPage_DJVUpageoptions.h
@@ -14,8 +14,8 @@
#include <kdeprint/kprintdialogpage.h>
-class QVBoxLayout;
-class QCheckBox;
+class TQVBoxLayout;
+class TQCheckBox;
// This is a fairly standard KPrintDialogPage that allows the user to
@@ -25,17 +25,17 @@ class QCheckBox;
class KPrintDialogPage_DJVUPageOptions : public KPrintDialogPage
{
public:
- KPrintDialogPage_DJVUPageOptions( QWidget *parent = 0, const char *name = 0 );
+ KPrintDialogPage_DJVUPageOptions( TQWidget *parent = 0, const char *name = 0 );
- void getOptions( QMap<QString,QString>& opts, bool incldef = false );
- void setOptions( const QMap<QString,QString>& opts );
- bool isValid( QString& msg );
+ void getOptions( TQMap<TQString,TQString>& opts, bool incldef = false );
+ void setOptions( const TQMap<TQString,TQString>& opts );
+ bool isValid( TQString& msg );
- QCheckBox* checkBox_rotate;
- QCheckBox* checkBox_fitpage;
+ TQCheckBox* checkBox_rotate;
+ TQCheckBox* checkBox_fitpage;
private:
- QVBoxLayout* kprintDialogPage_pageoptions_baseLayout;
+ TQVBoxLayout* kprintDialogPage_pageoptions_baseLayout;
};
diff --git a/kviewshell/plugins/djvu/pageRangeWidget.cpp b/kviewshell/plugins/djvu/pageRangeWidget.cpp
index 338624b8..ddff8299 100644
--- a/kviewshell/plugins/djvu/pageRangeWidget.cpp
+++ b/kviewshell/plugins/djvu/pageRangeWidget.cpp
@@ -23,7 +23,7 @@
#include "pageRangeWidget.h"
-PageRangeWidget::PageRangeWidget( Q_UINT16 _from, Q_UINT16 _to, Q_UINT16 _current, QWidget *parent, const char *name) : PageRangeWidget_base(parent, name)
+PageRangeWidget::PageRangeWidget( Q_UINT16 _from, Q_UINT16 _to, Q_UINT16 _current, TQWidget *parent, const char *name) : PageRangeWidget_base(parent, name)
{
// Paranoid security checks
if ((from == 0) || (to == 0))
@@ -41,8 +41,8 @@ PageRangeWidget::PageRangeWidget( Q_UINT16 _from, Q_UINT16 _to, Q_UINT16 _curren
_current = _to;
}
- connect(from, SIGNAL(valueChanged(int)), this, SLOT(fromValueChanged(int)));
- connect(to, SIGNAL(valueChanged(int)), this, SLOT(toValueChanged(int)));
+ connect(from, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(fromValueChanged(int)));
+ connect(to, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(toValueChanged(int)));
from->setRange(_from, _to);
from->setValue(_current);
diff --git a/kviewshell/plugins/djvu/pageRangeWidget.h b/kviewshell/plugins/djvu/pageRangeWidget.h
index ca9b4a00..3ddb497b 100644
--- a/kviewshell/plugins/djvu/pageRangeWidget.h
+++ b/kviewshell/plugins/djvu/pageRangeWidget.h
@@ -31,7 +31,7 @@ class PageRangeWidget : public PageRangeWidget_base
Q_OBJECT
public:
- PageRangeWidget( Q_UINT16 _from, Q_UINT16 _to, Q_UINT16 _current, QWidget *parent = 0, const char *name = 0 );
+ PageRangeWidget( Q_UINT16 _from, Q_UINT16 _to, Q_UINT16 _current, TQWidget *parent = 0, const char *name = 0 );
Q_UINT16 getFrom() const {return (from == 0) ? 0 : from->value(); }
Q_UINT16 getTo() const {return (to == 0) ? 0 : to->value(); }
diff --git a/kviewshell/renderedDocumentPage.cpp b/kviewshell/renderedDocumentPage.cpp
index c5f0d361..1d535bc5 100644
--- a/kviewshell/renderedDocumentPage.cpp
+++ b/kviewshell/renderedDocumentPage.cpp
@@ -21,7 +21,7 @@ RenderedDocumentPage::RenderedDocumentPage()
textBoxList.reserve(250);
pageNr = 0;
isEmpty = true;
- pageText = QString::null;
+ pageText = TQString::null;
}
@@ -46,23 +46,23 @@ void RenderedDocumentPage::clear()
textBoxList.clear();
hyperLinkList.clear();
- pageText = QString::null;
+ pageText = TQString::null;
isEmpty = true;
}
-QRegion RenderedDocumentPage::selectedRegion(const TextSelection& selection)
+TQRegion RenderedDocumentPage::selectedRegion(const TextSelection& selection)
{
if (selection.isEmpty() || selection.getPageNumber() != pageNr)
- return QRegion();
+ return TQRegion();
int startIndex = selection.getSelectedTextStart();
int endIndex = selection.getSelectedTextEnd();
- QValueVector<QRect> wordBox;
+ TQValueVector<TQRect> wordBox;
- QRect currentWordBox;
+ TQRect currentWordBox;
//unsigned int currentBaseline = 0;
// Merge character boxes into boxes containing complete words.
@@ -93,12 +93,12 @@ QRegion RenderedDocumentPage::selectedRegion(const TextSelection& selection)
// we still need to store the last word
wordBox.push_back(currentWordBox);
- QValueVector<QRect> lineBox;
+ TQValueVector<TQRect> lineBox;
// Merge word boxes into boxes containing whole lines.
// We start a new line if we encounter a wordbox which does not
// vertically overlap which the current lineBox.
- QRect currentLineBox;
+ TQRect currentLineBox;
for (unsigned int i = 0; i < wordBox.size(); i++)
{
@@ -143,17 +143,17 @@ QRegion RenderedDocumentPage::selectedRegion(const TextSelection& selection)
}
// Add the lineboxes to a Region
- QRegion selectedRegion;
+ TQRegion selectedRegion;
for (unsigned int i = 0; i < lineBox.size(); i++)
{
- selectedRegion += QRegion(lineBox[i]);
+ selectedRegion += TQRegion(lineBox[i]);
}
return selectedRegion;
}
-TextSelection RenderedDocumentPage::select(const QRect& selectedRectangle)
+TextSelection RenderedDocumentPage::select(const TQRect& selectedRectangle)
{
int selectedTextStart = -1;
int selectedTextEnd = -1;
@@ -172,7 +172,7 @@ TextSelection RenderedDocumentPage::select(const QRect& selectedRectangle)
TextSelection selection;
- QString selectedText;
+ TQString selectedText;
if (selectedTextStart != -1)
{
@@ -187,7 +187,7 @@ TextSelection RenderedDocumentPage::select(const QRect& selectedRectangle)
return selection;
}
-TextSelection RenderedDocumentPage::select(const QPoint& point)
+TextSelection RenderedDocumentPage::select(const TQPoint& point)
{
int selectedTextStart = -1;
int selectedTextEnd = -1;
@@ -204,7 +204,7 @@ TextSelection RenderedDocumentPage::select(const QPoint& point)
TextSelection selection;
- QString selectedText;
+ TQString selectedText;
if (selectedTextStart != -1)
{
@@ -216,12 +216,12 @@ TextSelection RenderedDocumentPage::select(const QPoint& point)
return selection;
}
-TextSelection RenderedDocumentPage::find(const QString& str, int index, bool caseSensitive)
+TextSelection RenderedDocumentPage::find(const TQString& str, int index, bool caseSensitive)
{
if (pageText.isNull())
{
// Create the pageText by joining all entries of textBoxList.
- for (QValueVector<TextBox>::Iterator i = textBoxList.begin(); i != textBoxList.end(); i++)
+ for (TQValueVector<TextBox>::Iterator i = textBoxList.begin(); i != textBoxList.end(); i++)
{
pageText = pageText + i->text;
}
@@ -291,7 +291,7 @@ TextSelection RenderedDocumentPage::find(const QString& str, int index, bool cas
}
-TextSelection RenderedDocumentPage::findRev(const QString& str, int index, bool caseSensitive)
+TextSelection RenderedDocumentPage::findRev(const TQString& str, int index, bool caseSensitive)
{
// Negative index means we start the search at the end of the text.
if (index < 0)
@@ -302,7 +302,7 @@ TextSelection RenderedDocumentPage::findRev(const QString& str, int index, bool
if (pageText.isNull())
{
// Create the pageText by joining all entries of textBoxList.
- for (QValueVector<TextBox>::Iterator i = textBoxList.begin(); i != textBoxList.end(); i++)
+ for (TQValueVector<TextBox>::Iterator i = textBoxList.begin(); i != textBoxList.end(); i++)
{
pageText = pageText + i->text;
}
diff --git a/kviewshell/renderedDocumentPage.h b/kviewshell/renderedDocumentPage.h
index f91144cc..979f46e8 100644
--- a/kviewshell/renderedDocumentPage.h
+++ b/kviewshell/renderedDocumentPage.h
@@ -13,14 +13,14 @@
#include "pageNumber.h"
-#include <qobject.h>
-#include <qstring.h>
-#include <qvaluevector.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
class Hyperlink;
-class QPainter;
-class QRect;
-class QRegion;
+class TQPainter;
+class TQRect;
+class TQRegion;
class TextBox;
class TextSelection;
@@ -44,9 +44,9 @@ class TextSelection;
mouse or for the "export as text..." functionality
- the implementations of the documentPage will also contain a
- QPaintDevice, onto which the graphical representation of the page
- is rendered. This could for instance be a QPixmap, if the page is
- to be displayed on a computer screen, or a QPrinter for printing.
+ TQPaintDevice, onto which the graphical representation of the page
+ is rendered. This could for instance be a TQPixmap, if the page is
+ to be displayed on a computer screen, or a TQPrinter for printing.
The kviewshell program uses the documentPage class in the
following manner: first, it is constructed, the page number is
@@ -54,7 +54,7 @@ class TextSelection;
the setPageNumber() method. After this, the
documentRenderer.drawPage() method of an implementation of the
documentRenderer is used to render a graphical representation into
- the QPaintDevice at a given resolution, and to fill the
+ the TQPaintDevice at a given resolution, and to fill the
(source-)hyperlink and text vectors, which are also
resolution-dependent. After the data has been used, the
documentPage is clear()ed, perhaps a new page number set, and
@@ -95,11 +95,11 @@ class RenderedDocumentPage : public QObject
/** \brief Get paint device
This method is used for instance by the documentRenderer.drawPage()
- method to draw on the page. It returns a pointer to a QPainter (in
- most implementation a painter on either a QPixmap, or a
- QPrinter). The pointer returned points to an active QPainter and is
+ method to draw on the page. It returns a pointer to a TQPainter (in
+ most implementation a painter on either a TQPixmap, or a
+ TQPrinter). The pointer returned points to an active TQPainter and is
valid as long as *this RenderedDocumentPage exists. The pointer
- returned must not be deleted nor should QPainter::end() be
+ returned must not be deleted nor should TQPainter::end() be
called. Instead, the method returnPainter() must be called as soon
as drawing is finished.
@@ -107,7 +107,7 @@ class RenderedDocumentPage : public QObject
@code
RenderedDocumentPage rdp;
- QPainter *paint = rdp.getPainter()
+ TQPainter *paint = rdp.getPainter()
if (paint != 0) {
<Do some painting, don't call paint->end() >
@@ -121,11 +121,11 @@ class RenderedDocumentPage : public QObject
results. Do not delete a renderedDocumentPage when you still hold a
pointer. Call returnPainter() first.
- @returns A pointer to a QPainter (in most implementation a painter
- on either a QPixmap, or a QPrinter), or NULL, if painting is not
- possible. The QPainter object is owned by the RenderedDocumentPage.
+ @returns A pointer to a TQPainter (in most implementation a painter
+ on either a TQPixmap, or a TQPrinter), or NULL, if painting is not
+ possible. The TQPainter object is owned by the RenderedDocumentPage.
*/
- virtual QPainter *getPainter() = 0;
+ virtual TQPainter *getPainter() = 0;
/** \brief Returns a pointer to the paint device.
@@ -137,13 +137,13 @@ class RenderedDocumentPage : public QObject
@warning Returning a pointer twice, or returning arbitrary pointers
will lead to a segfault.
- @param pt a pointer to a QPainter, as returned by the getPainter()
+ @param pt a pointer to a TQPainter, as returned by the getPainter()
method
*/
- virtual void returnPainter(QPainter *pt) = 0;
+ virtual void returnPainter(TQPainter *pt) = 0;
/** \brief Returns the size of the page in pixel. */
- virtual QSize size() = 0;
+ virtual TQSize size() = 0;
/** \brief Returns the width of the page in pixel.
@@ -183,26 +183,26 @@ class RenderedDocumentPage : public QObject
kviewshell e.g. for selecting text with the mouse or for the "export
as text..." functionality.
*/
- QValueVector<TextBox> textBoxList;
+ TQValueVector<TextBox> textBoxList;
/** \brief Calculates the text selected by the given rectangle. */
- TextSelection select(const QRect&);
+ TextSelection select(const TQRect&);
/** \brief Selects the character which lies at the given point. */
- TextSelection select(const QPoint&);
+ TextSelection select(const TQPoint&);
- QRegion selectedRegion(const TextSelection& selection);
+ TQRegion selectedRegion(const TextSelection& selection);
/** Finds the first occurence of str starting by the current index.
If the text is found a corresponding TextSelection is returned.
If the text is not found a empty selection is returned. */
- TextSelection find(const QString& str, int index = 0, bool caseSensitive = true);
+ TextSelection find(const TQString& str, int index = 0, bool caseSensitive = true);
/** Finds the first occurence of str starting by the current index searching backwards.
If the text is found a corresponding TextSelection is returned.
If the text is not found a empty selection is returned.
If index < 0 start the search at the end of the page. */
- TextSelection findRev(const QString& str, int index = 0, bool cs = true);
+ TextSelection findRev(const TQString& str, int index = 0, bool cs = true);
/** \brief Hyperlinks on the document page
@@ -211,7 +211,7 @@ class RenderedDocumentPage : public QObject
method. It is used in kviewshell so users can use the mouse to
navigate in the document through hyperlinks.
*/
- QValueVector<Hyperlink> hyperLinkList;
+ TQValueVector<Hyperlink> hyperLinkList;
// set to 'false' in the constructor, set to 'true' by the renderer,
// if something really has been rendered
@@ -234,7 +234,7 @@ class RenderedDocumentPage : public QObject
*/
PageNumber pageNr;
- QString pageText;
+ TQString pageText;
};
diff --git a/kviewshell/renderedDocumentPagePixmap.cpp b/kviewshell/renderedDocumentPagePixmap.cpp
index aaa06878..f7f91ed9 100644
--- a/kviewshell/renderedDocumentPagePixmap.cpp
+++ b/kviewshell/renderedDocumentPagePixmap.cpp
@@ -22,7 +22,7 @@
#include <kimageeffect.h>
#include <kdebug.h>
-#include <qimage.h>
+#include <tqimage.h>
#include "kvsprefs.h"
#include "renderedDocumentPagePixmap.h"
@@ -38,39 +38,39 @@ RenderedDocumentPagePixmap::~RenderedDocumentPagePixmap()
}
-QPainter* RenderedDocumentPagePixmap::getPainter()
+TQPainter* RenderedDocumentPagePixmap::getPainter()
{
if (paintingActive()) {
kdError(1223) << "RenderedDocumentPagePixmap::getPainter() called when painting was active" << endl;
return 0;
} else
- return new QPainter(this);
+ return new TQPainter(this);
}
void RenderedDocumentPagePixmap::resize(int width, int height)
{
- QPixmap::resize(width, height);
+ TQPixmap::resize(width, height);
if(_accessiblePixmap)
_accessiblePixmap->resize(width, height);
dirty = true;
}
-void RenderedDocumentPagePixmap::resize(const QSize& size)
+void RenderedDocumentPagePixmap::resize(const TQSize& size)
{
resize(size.width(), size.height());
}
-QPixmap RenderedDocumentPagePixmap::accessiblePixmap()
+TQPixmap RenderedDocumentPagePixmap::accessiblePixmap()
{
if (!_accessiblePixmap || dirty)
{
- QImage backImage = this->convertToImage();
+ TQImage backImage = this->convertToImage();
switch (KVSPrefs::renderMode())
{
case KVSPrefs::EnumRenderMode::Inverted:
- // Invert image pixels using QImage internal function
+ // Invert image pixels using TQImage internal function
backImage.invertPixels(false);
break;
case KVSPrefs::EnumRenderMode::Recolor:
@@ -105,7 +105,7 @@ QPixmap RenderedDocumentPagePixmap::accessiblePixmap()
break;
}
if (!_accessiblePixmap)
- _accessiblePixmap = new QPixmap(width(), height());
+ _accessiblePixmap = new TQPixmap(width(), height());
_accessiblePixmap->convertFromImage(backImage);
dirty = false;
diff --git a/kviewshell/renderedDocumentPagePixmap.h b/kviewshell/renderedDocumentPagePixmap.h
index 112650ba..5e6e79fb 100644
--- a/kviewshell/renderedDocumentPagePixmap.h
+++ b/kviewshell/renderedDocumentPagePixmap.h
@@ -13,8 +13,8 @@
#include "renderedDocumentPage.h"
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
// This class contains everything documentRenderer needs to know
@@ -29,28 +29,28 @@ public:
virtual ~RenderedDocumentPagePixmap();
/** Returns a pointer to the paintDevice (in most implementation
- either a QPixmap, or a QPrinter). The pointer returned is valid
+ either a TQPixmap, or a TQPrinter). The pointer returned is valid
as long as *this RenderedDocumentPage exists. This method is
used by the renderer to draw on the page. */
- virtual QPainter *getPainter();
+ virtual TQPainter *getPainter();
- /** This implementation delete the QPainter *pt (and thereby initiates the drawing) */
- virtual void returnPainter(QPainter *pt) {delete pt;}
+ /** This implementation delete the TQPainter *pt (and thereby initiates the drawing) */
+ virtual void returnPainter(TQPainter *pt) {delete pt;}
- QPixmap accessiblePixmap();
+ TQPixmap accessiblePixmap();
- void resize(const QSize& size);
+ void resize(const TQSize& size);
void resize(int width, int height);
- virtual QSize size() { return QPixmap::size(); }
- virtual int width() { return QPixmap::width(); }
- virtual int height() { return QPixmap::height(); }
+ virtual TQSize size() { return TQPixmap::size(); }
+ virtual int width() { return TQPixmap::width(); }
+ virtual int height() { return TQPixmap::height(); }
/** Returns the amount of memory used by this pixmap */
unsigned int memory();
private:
- QPixmap* _accessiblePixmap;
+ TQPixmap* _accessiblePixmap;
/** true if _accessiblePixmap needs updateing */
bool dirty;
};
diff --git a/kviewshell/renderedDocumentPagePrinter.cpp b/kviewshell/renderedDocumentPagePrinter.cpp
index 6e0ba57a..ff5171a0 100644
--- a/kviewshell/renderedDocumentPagePrinter.cpp
+++ b/kviewshell/renderedDocumentPagePrinter.cpp
@@ -21,8 +21,8 @@
#include <config.h>
#include <kdebug.h>
-#include <qguardedptr.h>
-#include <qpaintdevicemetrics.h>
+#include <tqguardedptr.h>
+#include <tqpaintdevicemetrics.h>
#include <kprinter.h>
#include "renderedDocumentPagePrinter.h"
@@ -37,17 +37,17 @@ RenderedDocumentPagePrinter::RenderedDocumentPagePrinter(KPrinter *kp)
return;
}
- printerPainter = new QPainter(printer);
+ printerPainter = new TQPainter(printer);
}
-QSize RenderedDocumentPagePrinter::size()
+TQSize RenderedDocumentPagePrinter::size()
{
if (printer == 0) {
kdError(1223) << "RenderedDocumentPagePrinter::size() called with printer == 0" << endl;
- return QSize(0,0);
+ return TQSize(0,0);
}
- QPaintDeviceMetrics pdm( printer );
- return QSize(pdm.width(), pdm.height());
+ TQPaintDeviceMetrics pdm( printer );
+ return TQSize(pdm.width(), pdm.height());
}
diff --git a/kviewshell/renderedDocumentPagePrinter.h b/kviewshell/renderedDocumentPagePrinter.h
index 44bdc6d2..f0b78f91 100644
--- a/kviewshell/renderedDocumentPagePrinter.h
+++ b/kviewshell/renderedDocumentPagePrinter.h
@@ -12,7 +12,7 @@
#define _rendereddocumentpageprinter_h_
#include "renderedDocumentPage.h"
-#include <qpainter.h>
+#include <tqpainter.h>
class KPrinter;
@@ -25,21 +25,21 @@ public:
virtual ~RenderedDocumentPagePrinter() { delete printerPainter; }
/** Returns a pointer to the paintDevice, in this implementation
- either a QPrinter. The pointer returned is valid as long as
+ either a TQPrinter. The pointer returned is valid as long as
*this RenderedDocumentPage exists. This method is used by the
renderer to draw on the page. */
- virtual QPainter *getPainter() { return printerPainter; }
+ virtual TQPainter *getPainter() { return printerPainter; }
- virtual QSize size();
+ virtual TQSize size();
/** This method does nothing. In particular, it does NOT delete the
- QPainter. The QPainter is deleted automatically when this
+ TQPainter. The TQPainter is deleted automatically when this
RenderedDocumentPagePrinter is destructed. */
- virtual void returnPainter(QPainter *) {;}
+ virtual void returnPainter(TQPainter *) {;}
private:
KPrinter *printer;
- QPainter *printerPainter;
+ TQPainter *printerPainter;
};
diff --git a/kviewshell/searchWidget.cpp b/kviewshell/searchWidget.cpp
index 7c4422e6..27ca42f8 100644
--- a/kviewshell/searchWidget.cpp
+++ b/kviewshell/searchWidget.cpp
@@ -20,12 +20,12 @@
#include <config.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -36,20 +36,20 @@
#include "searchWidget.h"
-SearchWidget::SearchWidget(QWidget* parent, const char* name, WFlags fl)
- : QWidget(parent, name, fl)
+SearchWidget::SearchWidget(TQWidget* parent, const char* name, WFlags fl)
+ : TQWidget(parent, name, fl)
{
setName("SearchWidget");
- setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
+ setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed);
- layout = new QHBoxLayout(this, 4, 6, "SearchWidgetLayout");
+ layout = new TQHBoxLayout(this, 4, 6, "SearchWidgetLayout");
- stopButton = new QPushButton(this, "stopButton");
+ stopButton = new TQPushButton(this, "stopButton");
stopButton->setPixmap(KGlobal::iconLoader()->loadIcon("stop", KIcon::Small, KIcon::SizeSmall));
layout->addWidget(stopButton);
- searchLabel = new QLabel(this, "searchLabel");
+ searchLabel = new TQLabel(this, "searchLabel");
searchLabel->setText(i18n("Search:"));
layout->addWidget(searchLabel);
@@ -58,26 +58,26 @@ SearchWidget::SearchWidget(QWidget* parent, const char* name, WFlags fl)
searchLabel->setBuddy(searchText);
- findPrevButton = new QPushButton(this, "findPrevButton");
+ findPrevButton = new TQPushButton(this, "findPrevButton");
findPrevButton->setPixmap(KGlobal::iconLoader()->loadIcon("back", KIcon::NoGroup, KIcon::SizeSmall));
- QToolTip::add(findPrevButton, i18n("Find previous"));
+ TQToolTip::add(findPrevButton, i18n("Find previous"));
layout->addWidget(findPrevButton);
- findNextButton = new QPushButton(this, "findNextButton");
+ findNextButton = new TQPushButton(this, "findNextButton");
findNextButton->setPixmap(KGlobal::iconLoader()->loadIcon("forward", KIcon::NoGroup, KIcon::SizeSmall));
- QToolTip::add(findNextButton, i18n("Find next"));
+ TQToolTip::add(findNextButton, i18n("Find next"));
layout->addWidget(findNextButton);
- caseSensitiveCheckBox = new QCheckBox(this, "caseSensitiveCheckBox");
+ caseSensitiveCheckBox = new TQCheckBox(this, "caseSensitiveCheckBox");
caseSensitiveCheckBox->setText(i18n("Case sensitive"));
layout->addWidget(caseSensitiveCheckBox);
- connect(stopButton, SIGNAL(clicked()), this, SIGNAL(stopSearch()));
+ connect(stopButton, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(stopSearch()));
- connect(findNextButton, SIGNAL(clicked()), this, SIGNAL(findNextText()));
- connect(findPrevButton, SIGNAL(clicked()), this, SIGNAL(findPrevText()));
+ connect(findNextButton, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(findNextText()));
+ connect(findPrevButton, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(findPrevText()));
- connect(searchText, SIGNAL(textChanged(const QString&)), this, SLOT(textChanged()));
+ connect(searchText, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(textChanged()));
textChanged();
}
@@ -86,7 +86,7 @@ SearchWidget::~SearchWidget()
{
}
-QString SearchWidget::getText() const
+TQString SearchWidget::getText() const
{
return searchText->text();
}
@@ -109,14 +109,14 @@ void SearchWidget::show()
{
searchText->setEnabled(true);
searchText->selectAll();
- QWidget::show();
+ TQWidget::show();
emit searchEnabled(!searchText->text().isEmpty());
}
void SearchWidget::hide()
{
searchText->setEnabled(false);
- QWidget::hide();
+ TQWidget::hide();
}
void SearchWidget::setFocus()
@@ -124,7 +124,7 @@ void SearchWidget::setFocus()
searchText->setFocus();
}
-void SearchWidget::keyPressEvent(QKeyEvent* e)
+void SearchWidget::keyPressEvent(TQKeyEvent* e)
{
if (e->key() == Qt::Key_Escape)
emit stopSearch();
diff --git a/kviewshell/searchWidget.h b/kviewshell/searchWidget.h
index 49b2c5cb..8875597d 100644
--- a/kviewshell/searchWidget.h
+++ b/kviewshell/searchWidget.h
@@ -22,24 +22,24 @@
#ifndef SEARCHWIDGET_H
#define SEARCHWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
-class QHBoxLayout;
-class QLabel;
+class TQHBoxLayout;
+class TQLabel;
class KLineEdit;
-class QPushButton;
-class QCheckBox;
-class QString;
+class TQPushButton;
+class TQCheckBox;
+class TQString;
class SearchWidget : public QWidget
{
Q_OBJECT
public:
- SearchWidget(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
+ SearchWidget(TQWidget* parent = 0, const char* name = 0, WFlags fl = 0);
~SearchWidget();
- QString getText() const;
+ TQString getText() const;
bool caseSensitive() const;
public slots:
@@ -54,20 +54,20 @@ signals:
void stopSearch();
protected:
- virtual void keyPressEvent(QKeyEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
private slots:
void textChanged();
private:
- QPushButton* stopButton;
- QLabel* searchLabel;
+ TQPushButton* stopButton;
+ TQLabel* searchLabel;
KLineEdit* searchText;
- QPushButton* findNextButton;
- QPushButton* findPrevButton;
- QCheckBox* caseSensitiveCheckBox;
+ TQPushButton* findNextButton;
+ TQPushButton* findPrevButton;
+ TQCheckBox* caseSensitiveCheckBox;
- QHBoxLayout* layout;
+ TQHBoxLayout* layout;
};
#endif
diff --git a/kviewshell/selection.cpp b/kviewshell/selection.cpp
index be288fe0..83b9b5db 100644
--- a/kviewshell/selection.cpp
+++ b/kviewshell/selection.cpp
@@ -8,18 +8,18 @@
#include <config.h>
-#include <qapplication.h>
-#include <qclipboard.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
#include "selection.h"
TextSelection::TextSelection()
: page(PageNumber::invalidPage),
- selectedText(QString::null)
+ selectedText(TQString::null)
{}
-void TextSelection::set(const PageNumber& pageNr, Q_INT32 start, Q_INT32 end, const QString& text)
+void TextSelection::set(const PageNumber& pageNr, Q_INT32 start, Q_INT32 end, const TQString& text)
{
page = pageNr;
selectedTextStart = start;
@@ -27,11 +27,11 @@ void TextSelection::set(const PageNumber& pageNr, Q_INT32 start, Q_INT32 end, co
if (page != 0)
selectedText = text;
else
- selectedText = QString::null;
+ selectedText = TQString::null;
if (page != 0) {
- QApplication::clipboard()->setSelectionMode(true);
- QApplication::clipboard()->setText(selectedText);
+ TQApplication::clipboard()->setSelectionMode(true);
+ TQApplication::clipboard()->setText(selectedText);
}
}
@@ -53,14 +53,14 @@ bool TextSelection::operator!= (const TextSelection& s) const
void TextSelection::copyText() const
{
if (!isEmpty()) {
- QApplication::clipboard()->setSelectionMode(false);
- QApplication::clipboard()->setText(selectedText);
+ TQApplication::clipboard()->setSelectionMode(false);
+ TQApplication::clipboard()->setText(selectedText);
}
}
void TextSelection::clear()
{
- set(0, -1, -1, QString::null);
+ set(0, -1, -1, TQString::null);
}
diff --git a/kviewshell/selection.h b/kviewshell/selection.h
index 23261d49..30fe415d 100644
--- a/kviewshell/selection.h
+++ b/kviewshell/selection.h
@@ -10,7 +10,7 @@
#include "pageNumber.h"
-#include <qstring.h>
+#include <tqstring.h>
/* The --very simple-- class TextSelection represents text that the
@@ -22,7 +22,7 @@
should hold indiced referring to the start and the end of the
selected text in the appropriate documentPage's textLinkList
- a QString, 'selectedText' that holds the text that is selected
+ a TQString, 'selectedText' that holds the text that is selected
these values can be stored, retrieved, it can be checked if the
selection is empty, and signals are emitted when the values change
@@ -47,7 +47,7 @@ public:
// values; it is not even checked if selectedTextStart <=
// selectedTextEnd! The signals pageChanged() and
// selectionIsNotEmpty() are emitted if appropriate.
- void set(const PageNumber& pageNr, Q_INT32 selectedTextStart, Q_INT32 selectedTextEnd, const QString& text);
+ void set(const PageNumber& pageNr, Q_INT32 selectedTextStart, Q_INT32 selectedTextEnd, const TQString& text);
// This method can be used to find out if the selection is empty,
// i.e. if the page number is invalid or the selected text is empty.
@@ -60,7 +60,7 @@ public:
Q_INT32 getSelectedTextEnd() const {return selectedTextEnd;}
// Method used to retrieve the data described above
- const QString &getSelectedText() const {return selectedText;}
+ const TQString &getSelectedText() const {return selectedText;}
// Method used to retrieve the data described above
PageNumber getPageNumber() const {return page;}
@@ -80,7 +80,7 @@ public:
Q_INT32 selectedTextStart, selectedTextEnd;
// Described above
- QString selectedText;
+ TQString selectedText;
};
#endif
diff --git a/kviewshell/simplePageSize.cpp b/kviewshell/simplePageSize.cpp
index cc235ef8..9f222105 100644
--- a/kviewshell/simplePageSize.cpp
+++ b/kviewshell/simplePageSize.cpp
@@ -10,7 +10,7 @@
#include <config.h>
#include <kdebug.h>
-#include <qpaintdevice.h>
+#include <tqpaintdevice.h>
#include "simplePageSize.h"
@@ -21,7 +21,7 @@ double SimplePageSize::zoomForHeight(Q_UINT32 height) const
kdError(1223) << "SimplePageSize::zoomForHeight() called when paper height was invalid" << endl;
return 0.1;
}
- return (double)(height)/(QPaintDevice::x11AppDpiY()*(pageHeight.getLength_in_inch()));
+ return (double)(height)/(TQPaintDevice::x11AppDpiY()*(pageHeight.getLength_in_inch()));
}
@@ -31,7 +31,7 @@ double SimplePageSize::zoomForWidth(Q_UINT32 width) const
kdError(1223) << "SimplePageSize::zoomForWidth() called when paper width was invalid" << endl;
return 0.1;
}
- return (double)(width)/(QPaintDevice::x11AppDpiX()*(pageWidth.getLength_in_inch()));
+ return (double)(width)/(TQPaintDevice::x11AppDpiX()*(pageWidth.getLength_in_inch()));
}
diff --git a/kviewshell/simplePageSize.h b/kviewshell/simplePageSize.h
index bd5f9ca8..523eb62b 100644
--- a/kviewshell/simplePageSize.h
+++ b/kviewshell/simplePageSize.h
@@ -13,10 +13,10 @@
#include "length.h"
-#include <qsize.h>
+#include <tqsize.h>
-class QString;
-class QStringList;
+class TQString;
+class TQStringList;
/** \brief This class represents phyiscal page sizes.
@@ -74,16 +74,16 @@ class SimplePageSize
@param resolution in dots per inch
- @returns the pixel size, represented by a QSize. If the page size is
+ @returns the pixel size, represented by a TQSize. If the page size is
invalid, the result is undefined. */
- QSize sizeInPixel(double resolution) const {return QSize( (int)(resolution*pageWidth.getLength_in_inch() + 0.5),
+ TQSize sizeInPixel(double resolution) const {return TQSize( (int)(resolution*pageWidth.getLength_in_inch() + 0.5),
(int)(resolution*pageHeight.getLength_in_inch() + 0.5)); }
/** \brief Zoom value required to scale to a certain height
If the pageSize is valid, this method returns the zoom value
required to scale the page size down to 'height' pixels on the
- currently used display. The method uses QPaintDevice::x11AppDpiY()
+ currently used display. The method uses TQPaintDevice::x11AppDpiY()
to find the resolution of the display. If the pageSize is invalid,
an error message is printed, and an undefined value is returned.
@@ -99,7 +99,7 @@ class SimplePageSize
If the pageSize is valid, this method returns the zoom value
required to scale the page size down to 'width' pixels on the
- currently used display. The method uses QPaintDevice::x11AppDpiX()
+ currently used display. The method uses TQPaintDevice::x11AppDpiX()
to find the resolution of the display. If the pageSize is invalid,
an error message is printed, and an undefined value is returned.
diff --git a/kviewshell/sizePreview.cpp b/kviewshell/sizePreview.cpp
index e6d56715..37f7bb66 100644
--- a/kviewshell/sizePreview.cpp
+++ b/kviewshell/sizePreview.cpp
@@ -11,15 +11,15 @@
#include <kdebug.h>
#include <krandomsequence.h>
-#include <qevent.h>
-#include <qpainter.h>
+#include <tqevent.h>
+#include <tqpainter.h>
#include "sizePreview.h"
#include "simplePageSize.h"
-SizePreview::SizePreview( QWidget *parent, const char *name, WFlags)
- : QWidget( parent, name, WStaticContents | WNoAutoErase )
+SizePreview::SizePreview( TQWidget *parent, const char *name, WFlags)
+ : TQWidget( parent, name, WStaticContents | WNoAutoErase )
{
// Set a sane default
_width = _height = 50.0;
@@ -44,12 +44,12 @@ void SizePreview::setSize(const SimplePageSize& size)
update();
}
-void SizePreview::resizeEvent(QResizeEvent*)
+void SizePreview::resizeEvent(TQResizeEvent*)
{
update();
}
-void SizePreview::paintEvent( QPaintEvent * )
+void SizePreview::paintEvent( TQPaintEvent * )
{
int displayedWidth, displayedHeight;
@@ -73,7 +73,7 @@ void SizePreview::paintEvent( QPaintEvent * )
// Now draw the graphics
pixmap.resize(width(), height());
- QPainter p(&pixmap);
+ TQPainter p(&pixmap);
p.fillRect(rect(), colorGroup().background());
p.setPen(Qt::black);
p.setBrush(Qt::white);
@@ -81,7 +81,7 @@ void SizePreview::paintEvent( QPaintEvent * )
// mark the textbox; we assume 25mm margin
int margin = (int)(25.0*displayedWidth/_width + 0.5);
- QRect textBox(hOffset+margin, vOffset+margin, displayedWidth-2*margin, displayedHeight-2*margin);
+ TQRect textBox(hOffset+margin, vOffset+margin, displayedWidth-2*margin, displayedHeight-2*margin);
p.setPen(Qt::lightGray);
p.drawRect(textBox);
diff --git a/kviewshell/sizePreview.h b/kviewshell/sizePreview.h
index 4d5a5b3b..96e37a04 100644
--- a/kviewshell/sizePreview.h
+++ b/kviewshell/sizePreview.h
@@ -11,8 +11,8 @@
#ifndef SIZEPREVIEW_H
#define SIZEPREVIEW_H
-#include <qpixmap.h>
-#include <qwidget.h>
+#include <tqpixmap.h>
+#include <tqwidget.h>
class SimplePageSize;
@@ -21,7 +21,7 @@ class SizePreview : public QWidget
Q_OBJECT
public:
- SizePreview( QWidget *parent, const char* name=0, WFlags f=0 );
+ SizePreview( TQWidget *parent, const char* name=0, WFlags f=0 );
public slots:
// Sets the size.
@@ -31,8 +31,8 @@ public slots:
void setOrientation(int ori);
protected:
- void paintEvent(QPaintEvent*);
- void resizeEvent(QResizeEvent*);
+ void paintEvent(TQPaintEvent*);
+ void resizeEvent(TQResizeEvent*);
private:
int orientation; // 0 = portrait, other = landscape
@@ -41,7 +41,7 @@ private:
float _width; // in mm
float _height; // in mm
- QPixmap pixmap;
+ TQPixmap pixmap;
};
#endif
diff --git a/kviewshell/tableOfContents.cpp b/kviewshell/tableOfContents.cpp
index e7c5db28..51618d9a 100644
--- a/kviewshell/tableOfContents.cpp
+++ b/kviewshell/tableOfContents.cpp
@@ -33,13 +33,13 @@ TocItem::TocItem(TocItem* parent)
{
}
-TocItem::TocItem(QListView* parent)
+TocItem::TocItem(TQListView* parent)
: KListViewItem(parent)
{
}
-TableOfContents::TableOfContents(QWidget* parent)
+TableOfContents::TableOfContents(TQWidget* parent)
: KListView(parent)
{
addColumn(i18n("Topic"));
@@ -47,7 +47,7 @@ TableOfContents::TableOfContents(QWidget* parent)
setSorting(-1);
setRootIsDecorated(true);
- setSelectionMode(QListView::NoSelection);
+ setSelectionMode(TQListView::NoSelection);
setResizeMode(AllColumns);
setColumnWidthMode(0, Manual);
setColumnWidthMode(1, Manual);
@@ -55,7 +55,7 @@ TableOfContents::TableOfContents(QWidget* parent)
readSettings();
- connect(this, SIGNAL(executed(QListViewItem*)), this, SLOT(itemClicked(QListViewItem*)));
+ connect(this, TQT_SIGNAL(executed(TQListViewItem*)), this, TQT_SLOT(itemClicked(TQListViewItem*)));
}
TableOfContents::~TableOfContents()
@@ -73,21 +73,21 @@ void TableOfContents::readSettings()
restoreLayout(KVSPrefs::self()->config(), "tocLayout");
}
-void TableOfContents::setContents(const QPtrList<Bookmark>& bookmarks)
+void TableOfContents::setContents(const TQPtrList<Bookmark>& bookmarks)
{
clear();
addItems(bookmarks);
}
-void TableOfContents::addItems(const QPtrList<Bookmark>& _bookmarks, TocItem* parent)
+void TableOfContents::addItems(const TQPtrList<Bookmark>& _bookmarks, TocItem* parent)
{
kdDebug(1223) << "TableOfContents::setContents()" << endl;
if (_bookmarks.isEmpty())
return;
kdDebug(1223) << "Bookmarks are not empty" << endl;
- // Why isn't QPtrList const-correct?
- QPtrList<Bookmark> bookmarks = _bookmarks;
+ // Why isn't TQPtrList const-correct?
+ TQPtrList<Bookmark> bookmarks = _bookmarks;
for (Bookmark* current = bookmarks.last(); current; current = bookmarks.prev() ) {
TocItem* item;
if (!parent)
@@ -97,7 +97,7 @@ void TableOfContents::addItems(const QPtrList<Bookmark>& _bookmarks, TocItem* pa
item->setText(0, current->bookmarkText);
if (current->position.page != 0)
- item->setText(1, QString().setNum(current->position.page));
+ item->setText(1, TQString().setNum(current->position.page));
else
item->setText(1, "--");
item->setAnchor(current->position);
@@ -107,7 +107,7 @@ void TableOfContents::addItems(const QPtrList<Bookmark>& _bookmarks, TocItem* pa
}
}
-void TableOfContents::itemClicked(QListViewItem* _item)
+void TableOfContents::itemClicked(TQListViewItem* _item)
{
TocItem* item = static_cast<TocItem*>(_item);
diff --git a/kviewshell/tableOfContents.h b/kviewshell/tableOfContents.h
index 4f653d25..de5885ac 100644
--- a/kviewshell/tableOfContents.h
+++ b/kviewshell/tableOfContents.h
@@ -33,7 +33,7 @@ class TocItem : public KListViewItem
{
public:
TocItem(TocItem* parent);
- TocItem(QListView* parent);
+ TocItem(TQListView* parent);
void setAnchor(const Anchor & _anchor) { anchor = _anchor; }
Anchor getAnchor() { return anchor; }
@@ -48,10 +48,10 @@ class TableOfContents : public KListView
Q_OBJECT
public:
- TableOfContents(QWidget* parent);
+ TableOfContents(TQWidget* parent);
virtual ~TableOfContents();
- void setContents(const QPtrList<Bookmark>& bookmarks);
+ void setContents(const TQPtrList<Bookmark>& bookmarks);
void writeSettings();
void readSettings();
@@ -60,10 +60,10 @@ signals:
void gotoPage(const Anchor&);
private:
- void addItems(const QPtrList<Bookmark>& bookmarks, TocItem* parent = 0);
+ void addItems(const TQPtrList<Bookmark>& bookmarks, TocItem* parent = 0);
private slots:
- void itemClicked(QListViewItem*);
+ void itemClicked(TQListViewItem*);
};
#endif
diff --git a/kviewshell/textBox.h b/kviewshell/textBox.h
index 281de465..682b5583 100644
--- a/kviewshell/textBox.h
+++ b/kviewshell/textBox.h
@@ -10,8 +10,8 @@
#ifndef _textbox_h_
#define _textbox_h_
-#include <qrect.h>
-#include <qstring.h>
+#include <tqrect.h>
+#include <tqstring.h>
/** Represents a rectangular region in a RenderedDocumentPage that contains text
@@ -41,7 +41,7 @@ public:
@param re value for the box
@param lT valus for the text field
*/
- TextBox(const QRect& re, const QString& lT): box(re), text(lT) {}
+ TextBox(const TQRect& re, const TQString& lT): box(re), text(lT) {}
/** \brief Bounding box of the text or hyperlink
@@ -51,13 +51,13 @@ public:
documentRenderer.drawPage() method. The contents of the box is
graphically inverted to indicate marked text.
*/
- QRect box;
+ TQRect box;
/** \brief Name of the region
The text associated with the box is stored here.
*/
- QString text;
+ TQString text;
};
diff --git a/kviewshell/units.cpp b/kviewshell/units.cpp
index e675f916..99dc2da9 100644
--- a/kviewshell/units.cpp
+++ b/kviewshell/units.cpp
@@ -13,7 +13,7 @@
#include <kglobal.h>
#include <klocale.h>
#include <math.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "units.h"
@@ -53,7 +53,7 @@ unitOfDistance distanceUnitTable[] = {
-float distance::convertToMM(const QString &distance, bool *ok)
+float distance::convertToMM(const TQString &distance, bool *ok)
{
// kdDebug() << "convertToMM( " << distance << " )" << endl;
@@ -78,6 +78,6 @@ float distance::convertToMM(const QString &distance, bool *ok)
return 0.0;
}
- QString val = distance.left(unitPos).simplifyWhiteSpace();
+ TQString val = distance.left(unitPos).simplifyWhiteSpace();
return MMperUnit*val.toFloat(ok);
}
diff --git a/kviewshell/units.h b/kviewshell/units.h
index 48708c01..db83d675 100644
--- a/kviewshell/units.h
+++ b/kviewshell/units.h
@@ -10,7 +10,7 @@
#ifndef UNITS_H
#define UNITS_H
-class QString;
+class TQString;
class distance {
public:
@@ -28,7 +28,7 @@ class distance {
// although the string is malformed.
//
// It is fine to set ok to 0.
- static float convertToMM(const QString &distance, bool *ok=0);
+ static float convertToMM(const TQString &distance, bool *ok=0);
};
#endif
diff --git a/kviewshell/zoom.cpp b/kviewshell/zoom.cpp
index 3c3e56df..1c3ee6f6 100644
--- a/kviewshell/zoom.cpp
+++ b/kviewshell/zoom.cpp
@@ -10,7 +10,7 @@
#include <config.h>
#include <math.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <klocale.h>
@@ -28,16 +28,16 @@ Zoom::Zoom()
_zoomValue = 1.0;
valNo = 6; // 1.0 is 6rd entry in the list
for(int i=0; zoomVals[i] != 0; i++)
- valueNames << QString("%1%").arg(zoomVals[i]);
+ valueNames << TQString("%1%").arg(zoomVals[i]);
}
-void Zoom::setZoomValue(const QString &cval)
+void Zoom::setZoomValue(const TQString &cval)
{
float fval;
// Remove a trailing '%', if any
- QString val = cval.stripWhiteSpace();
+ TQString val = cval.stripWhiteSpace();
if (val.right(1) == "%")
val = val.left(val.length()-1).stripWhiteSpace();
@@ -49,7 +49,7 @@ void Zoom::setZoomValue(const QString &cval)
else {
emit(zoomNamesChanged(valueNames));
emit(valNoChanged(valNo));
- emit(zoomNameChanged(QString("%1%").arg((int)(_zoomValue*100.0+0.5))));
+ emit(zoomNameChanged(TQString("%1%").arg((int)(_zoomValue*100.0+0.5))));
}
}
@@ -64,7 +64,7 @@ void Zoom::setZoomFitWidth(float zoom)
valNo = 0;
emit(valNoChanged(valNo));
- emit(zoomNameChanged(QString("%1%").arg((int)(_zoomValue*100.0+0.5))));
+ emit(zoomNameChanged(TQString("%1%").arg((int)(_zoomValue*100.0+0.5))));
}
void Zoom::setZoomFitHeight(float zoom)
@@ -78,7 +78,7 @@ void Zoom::setZoomFitHeight(float zoom)
valNo = 1;
emit(valNoChanged(valNo));
- emit(zoomNameChanged(QString("%1%").arg((int)(_zoomValue*100.0+0.5))));
+ emit(zoomNameChanged(TQString("%1%").arg((int)(_zoomValue*100.0+0.5))));
}
void Zoom::setZoomFitPage(float zoom)
@@ -92,7 +92,7 @@ void Zoom::setZoomFitPage(float zoom)
valNo = 2;
emit(valNoChanged(valNo));
- emit(zoomNameChanged(QString("%1%").arg((int)(_zoomValue*100.0+0.5))));
+ emit(zoomNameChanged(TQString("%1%").arg((int)(_zoomValue*100.0+0.5))));
}
void Zoom::setZoomValue(float f)
@@ -117,19 +117,19 @@ void Zoom::setZoomValue(float f)
flag = true;
valNo = i + 3;
if (fabs(_zoomValue-zoomVals[i]) > 0.01)
- valueNames << QString("%1%").arg((int)(_zoomValue*100.0+0.5));
+ valueNames << TQString("%1%").arg((int)(_zoomValue*100.0+0.5));
}
- valueNames << QString("%1%").arg((int)(zoomVals[i]*100.0+0.5));
+ valueNames << TQString("%1%").arg((int)(zoomVals[i]*100.0+0.5));
}
if (flag == false) {
valNo = valueNames.size();
- valueNames << QString("%1%").arg((int)(_zoomValue*100.0+0.5));
+ valueNames << TQString("%1%").arg((int)(_zoomValue*100.0+0.5));
}
emit(zoomNamesChanged(valueNames));
emit(valNoChanged(valNo));
- emit(zoomNameChanged(QString("%1%").arg((int)(_zoomValue*100.0+0.5))));
+ emit(zoomNameChanged(TQString("%1%").arg((int)(_zoomValue*100.0+0.5))));
}
float Zoom::zoomIn()
diff --git a/kviewshell/zoom.h b/kviewshell/zoom.h
index 985e18a9..b6108d05 100644
--- a/kviewshell/zoom.h
+++ b/kviewshell/zoom.h
@@ -11,8 +11,8 @@
#ifndef ZOOM_H
#define ZOOM_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
class Zoom : public QObject
@@ -26,7 +26,7 @@ public:
/** Returns a list like "33%", "100%", etc. If you call
zoomNames() more than once, it is guaranteed that the same
list of strings will be returned. */
- QStringList zoomNames() const { return valueNames; }
+ TQStringList zoomNames() const { return valueNames; }
float zoomIn();
float zoomOut();
@@ -34,21 +34,21 @@ public:
public slots:
void setZoomValue(float);
- void setZoomValue(const QString &);
+ void setZoomValue(const TQString &);
void setZoomFitWidth(float zoom);
void setZoomFitHeight(float zoom);
void setZoomFitPage(float zoom);
signals:
- void zoomNamesChanged(const QStringList &);
- void zoomNameChanged(const QString &);
+ void zoomNamesChanged(const TQStringList &);
+ void zoomNameChanged(const TQString &);
void valNoChanged(int);
private:
float _zoomValue;
- QStringList valueNames;
- // This will be the number of the current value in the generated QStringList.
+ TQStringList valueNames;
+ // This will be the number of the current value in the generated TQStringList.
int valNo;
};
diff --git a/libkscan/devselector.cpp b/libkscan/devselector.cpp
index 8d1a90ad..b30316c9 100644
--- a/libkscan/devselector.cpp
+++ b/libkscan/devselector.cpp
@@ -19,16 +19,16 @@
#include <stdlib.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qcstring.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qfile.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qstrlist.h>
-#include <qstringlist.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqcstring.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqfile.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqstrlist.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -41,36 +41,36 @@
#include "devselector.h"
-DeviceSelector::DeviceSelector( QWidget *parent, QStrList& devList,
- const QStringList& hrdevList )
+DeviceSelector::DeviceSelector( TQWidget *parent, TQStrList& devList,
+ const TQStringList& hrdevList )
: KDialogBase( parent, "DeviceSel", true, i18n("Welcome to Kooka"),
Ok|Cancel, Ok, true )
{
kdDebug(29000) << "Starting DevSelector!" << endl;
// Layout-Boxes
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
Q_CHECK_PTR( page );
setMainWidget( page );
- QVBoxLayout *topLayout = new QVBoxLayout( page, marginHint(), spacingHint() );
- QLabel *label = new QLabel( page, "captionImage" );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, marginHint(), spacingHint() );
+ TQLabel *label = new TQLabel( page, "captionImage" );
Q_CHECK_PTR( label );
- label->setPixmap( QPixmap( "kookalogo.png" ));
+ label->setPixmap( TQPixmap( "kookalogo.png" ));
label->resize( 100, 350 );
topLayout->addWidget( label );
- selectBox = new QButtonGroup( 1, Horizontal, i18n( "Select Scan Device" ),
+ selectBox = new TQButtonGroup( 1, Horizontal, i18n( "Select Scan Device" ),
page, "ButtonBox");
Q_CHECK_PTR( selectBox );
selectBox->setExclusive( true );
topLayout->addWidget( selectBox );
setScanSources( devList, hrdevList );
- cbSkipDialog = new QCheckBox( i18n("&Do not ask on startup again, always use this device"),
+ cbSkipDialog = new TQCheckBox( i18n("&Do not ask on startup again, always use this device"),
page, "CBOX_SKIP_ON_START" );
KConfig *gcfg = KGlobal::config();
- gcfg->setGroup(QString::fromLatin1(GROUP_STARTUP));
+ gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP));
bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false );
cbSkipDialog->setChecked( skipDialog );
@@ -78,18 +78,18 @@ DeviceSelector::DeviceSelector( QWidget *parent, QStrList& devList,
}
-QCString DeviceSelector::getDeviceFromConfig( void ) const
+TQCString DeviceSelector::getDeviceFromConfig( void ) const
{
KConfig *gcfg = KGlobal::config();
- gcfg->setGroup(QString::fromLatin1(GROUP_STARTUP));
+ gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP));
bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false );
- QCString result;
+ TQCString result;
/* in this case, the user has checked 'Do not ask me again' and does not
* want to be bothered any more.
*/
- result = QFile::encodeName(gcfg->readEntry( STARTUP_SCANDEV, "" ));
+ result = TQFile::encodeName(gcfg->readEntry( STARTUP_SCANDEV, "" ));
kdDebug(29000) << "Got scanner from config file to use: " << result << endl;
/* Now check if the scanner read from the config file is available !
@@ -102,7 +102,7 @@ QCString DeviceSelector::getDeviceFromConfig( void ) const
else
{
kdDebug(29000) << "Scanner from Config file is _not_ available" << endl;
- result = QCString();
+ result = TQCString();
}
return( result );
@@ -113,7 +113,7 @@ bool DeviceSelector::getShouldSkip( void ) const
return( cbSkipDialog->isChecked());
}
-QCString DeviceSelector::getSelectedDevice( void ) const
+TQCString DeviceSelector::getSelectedDevice( void ) const
{
unsigned int selID = selectBox->id( selectBox->selected() );
@@ -126,7 +126,7 @@ QCString DeviceSelector::getSelectedDevice( void ) const
/* Store scanner selection settings */
KConfig *c = KGlobal::config();
- c->setGroup(QString::fromLatin1(GROUP_STARTUP));
+ c->setGroup(TQString::fromLatin1(GROUP_STARTUP));
/* Write both the scan device and the skip-start-dialog flag global. */
c->writeEntry( STARTUP_SCANDEV, dev, true, true );
c->writeEntry( STARTUP_SKIP_ASK, getShouldSkip(), true, true );
@@ -136,24 +136,24 @@ QCString DeviceSelector::getSelectedDevice( void ) const
}
-void DeviceSelector::setScanSources( const QStrList& sources,
- const QStringList& hrSources )
+void DeviceSelector::setScanSources( const TQStrList& sources,
+ const TQStringList& hrSources )
{
bool default_ok = false;
KConfig *gcfg = KGlobal::config();
- gcfg->setGroup(QString::fromLatin1(GROUP_STARTUP));
- QCString defstr = gcfg->readEntry( STARTUP_SCANDEV, "" ).local8Bit();
+ gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP));
+ TQCString defstr = gcfg->readEntry( STARTUP_SCANDEV, "" ).local8Bit();
/* Selector-Stuff*/
uint nr = 0;
int checkDefNo = 0;
- QStrListIterator it( sources );
- QStringList::ConstIterator it2 = hrSources.begin();
+ TQStrListIterator it( sources );
+ TQStringList::ConstIterator it2 = hrSources.begin();
for ( ; it.current(); ++it, ++it2 )
{
- QString text = QString::fromLatin1("&%1. %2\n%3").arg(1+nr).arg( QString::fromLocal8Bit(*it) ).arg( *it2 );
- QRadioButton *rb = new QRadioButton( text, selectBox );
+ TQString text = TQString::fromLatin1("&%1. %2\n%3").arg(1+nr).arg( TQString::fromLocal8Bit(*it) ).arg( *it2 );
+ TQRadioButton *rb = new TQRadioButton( text, selectBox );
selectBox->insert( rb );
devices.append( *it );
@@ -168,7 +168,7 @@ void DeviceSelector::setScanSources( const QStrList& sources,
if( ! default_ok )
{
/* if no default found, set the first */
- QRadioButton *rb = (QRadioButton*) selectBox->find( checkDefNo );
+ TQRadioButton *rb = (TQRadioButton*) selectBox->find( checkDefNo );
if ( rb )
rb->setChecked( true );
}
diff --git a/libkscan/devselector.h b/libkscan/devselector.h
index 9fa80469..011c4a4e 100644
--- a/libkscan/devselector.h
+++ b/libkscan/devselector.h
@@ -23,10 +23,10 @@
#include <kdialogbase.h>
-class QButtonGroup;
-class QStrList;
-class QStringList;
-class QCheckBox;
+class TQButtonGroup;
+class TQStrList;
+class TQStringList;
+class TQCheckBox;
/**
*@author Klaas Freitag
@@ -57,11 +57,11 @@ class DeviceSelector: public KDialogBase
public:
/**
* constructs the dialog class
- * @param QWidget *parent - the parent
- * @param QStrList backends - a list of device names retrieved from the scan device
- * @param QStrList scannerNames - a list of corresponding human readable sanner names.
+ * @param TQWidget *parent - the parent
+ * @param TQStrList backends - a list of device names retrieved from the scan device
+ * @param TQStrList scannerNames - a list of corresponding human readable sanner names.
*/
- DeviceSelector( QWidget *parent, QStrList&, const QStringList& );
+ DeviceSelector( TQWidget *parent, TQStrList&, const TQStringList& );
~DeviceSelector();
/**
@@ -69,7 +69,7 @@ public:
* @return a CString containing the technical name of the selected device (taken from
* the backends-list from the constructor)
*/
- QCString getSelectedDevice( void ) const;
+ TQCString getSelectedDevice( void ) const;
/**
* returns the users selection if the dialog should be skipped in future.
@@ -85,15 +85,15 @@ public:
* @return a string containing the device to open or null if no device is specified or the
* one specified is not valid.
*/
- QCString getDeviceFromConfig( void ) const;
+ TQCString getDeviceFromConfig( void ) const;
public slots:
- void setScanSources( const QStrList&, const QStringList& );
+ void setScanSources( const TQStrList&, const TQStringList& );
private:
- QButtonGroup *selectBox;
- mutable QStrList devices;
- QCheckBox *cbSkipDialog;
+ TQButtonGroup *selectBox;
+ mutable TQStrList devices;
+ TQCheckBox *cbSkipDialog;
bool configDevValid;
class DeviceSelectorPrivate;
diff --git a/libkscan/dispgamma.cpp b/libkscan/dispgamma.cpp
index 2892d563..478096e9 100644
--- a/libkscan/dispgamma.cpp
+++ b/libkscan/dispgamma.cpp
@@ -17,12 +17,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include "dispgamma.h"
-DispGamma::DispGamma( QWidget *parent ) : QWidget( parent )
+DispGamma::DispGamma( TQWidget *parent ) : TQWidget( parent )
{
vals = 0;
margin = 10;
@@ -33,14 +33,14 @@ DispGamma::~DispGamma()
}
-void DispGamma::resizeEvent (QResizeEvent* )
+void DispGamma::resizeEvent (TQResizeEvent* )
{
repaint();
}
-void DispGamma::paintEvent( QPaintEvent *ev )
+void DispGamma::paintEvent( TQPaintEvent *ev )
{
- QPainter p(this);
+ TQPainter p(this);
int w = vals->size() +1;
// Viewport auf margin setzen.
@@ -53,7 +53,7 @@ void DispGamma::paintEvent( QPaintEvent *ev )
p.setBrush( colorGroup().base() );
// Backgrond
p.drawRect( 0,0, w, 256 );
- p.setPen( QPen(colorGroup().midlight(), 1, DotLine));
+ p.setPen( TQPen(colorGroup().midlight(), 1, DotLine));
// horizontal Grid
for( int l = 1; l < 5; l++ )
p.drawLine( 1, l*51, 255, l*51 );
@@ -73,13 +73,13 @@ void DispGamma::paintEvent( QPaintEvent *ev )
}
-QSize DispGamma::sizeHint( void )
+TQSize DispGamma::sizeHint( void )
{
- return QSize( 256 + 2*margin,256 + 2 * margin );
+ return TQSize( 256 + 2*margin,256 + 2 * margin );
}
-QSizePolicy DispGamma::sizePolicy( void )
+TQSizePolicy DispGamma::sizePolicy( void )
{
- return QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding );
+ return TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding );
}
#include "dispgamma.moc"
diff --git a/libkscan/dispgamma.h b/libkscan/dispgamma.h
index 86c8c1b4..8e917d83 100644
--- a/libkscan/dispgamma.h
+++ b/libkscan/dispgamma.h
@@ -20,10 +20,10 @@
#ifndef DISPGAMMA_H
#define DISPGAMMA_H
-#include <qwidget.h>
-#include <qsizepolicy.h>
-#include <qsize.h>
-#include <qmemarray.h>
+#include <tqwidget.h>
+#include <tqsizepolicy.h>
+#include <tqsize.h>
+#include <tqmemarray.h>
extern "C"{
#include <sane/sane.h>
@@ -33,26 +33,26 @@ extern "C"{
*@author Klaas Freitag
*/
-class DispGamma : public QWidget {
+class DispGamma : public TQWidget {
Q_OBJECT
public:
- DispGamma( QWidget *parent );
+ DispGamma( TQWidget *parent );
~DispGamma();
- QSize sizeHint( void );
- QSizePolicy sizePolicy( void );
+ TQSize sizeHint( void );
+ TQSizePolicy sizePolicy( void );
- void setValueRef( QMemArray<SANE_Word> *newVals )
+ void setValueRef( TQMemArray<SANE_Word> *newVals )
{
vals = newVals;
}
protected:
- void paintEvent (QPaintEvent *ev );
- void resizeEvent( QResizeEvent* );
+ void paintEvent (TQPaintEvent *ev );
+ void resizeEvent( TQResizeEvent* );
private:
- QMemArray<SANE_Word> *vals;
+ TQMemArray<SANE_Word> *vals;
int margin;
class DispGammaPrivate;
diff --git a/libkscan/gammadialog.cpp b/libkscan/gammadialog.cpp
index 4a8b3302..ef8a87a2 100644
--- a/libkscan/gammadialog.cpp
+++ b/libkscan/gammadialog.cpp
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qslider.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqslider.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
#include <kscanslider.h>
#include <klocale.h>
@@ -29,34 +29,34 @@
#include "gammadialog.h"
-GammaDialog::GammaDialog( QWidget *parent ) :
+GammaDialog::GammaDialog( TQWidget *parent ) :
KDialogBase( parent, "GammaDialog", true, i18n("Custom Gamma Tables"),
Ok|Cancel|Apply, Ok, true )
{
gt = new KGammaTable();
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
Q_CHECK_PTR( page );
setMainWidget( page );
/* This connect is for recalculating the table every time a new
* Bright., Contrast or Gamma-Value is set */
- connect( gt, SIGNAL(tableChanged()), gt, SLOT(getTable()));
+ connect( gt, TQT_SIGNAL(tableChanged()), gt, TQT_SLOT(getTable()));
gtDisp = new DispGamma( page );
gtDisp->setValueRef( gt->getArrayPtr() );
gtDisp->resize( 280, 280 );
- connect( gt, SIGNAL(tableChanged()), gtDisp, SLOT( repaint()));
+ connect( gt, TQT_SIGNAL(tableChanged()), gtDisp, TQT_SLOT( repaint()));
// setCaption( i18n( "Gamma Table" ));
// Layout-Boxes
- QVBoxLayout *bigdad = new QVBoxLayout( page, 10 );
- QHBoxLayout *lhMiddle = new QHBoxLayout( 5 );
- QVBoxLayout *lvSliders = new QVBoxLayout( 10 );
+ TQVBoxLayout *bigdad = new TQVBoxLayout( page, 10 );
+ TQHBoxLayout *lhMiddle = new TQHBoxLayout( 5 );
+ TQVBoxLayout *lvSliders = new TQVBoxLayout( 10 );
- QLabel *l_top = new QLabel( i18n( "<B>Edit the custom gamma table</B><BR>This gamma table is passed to the scanner hardware." ), page );
+ TQLabel *l_top = new TQLabel( i18n( "<B>Edit the custom gamma table</B><BR>This gamma table is passed to the scanner hardware." ), page );
bigdad->addWidget( l_top, 1 );
bigdad->addLayout( lhMiddle, 6 );
@@ -67,17 +67,17 @@ GammaDialog::GammaDialog( QWidget *parent ) :
wBright = new KScanSlider ( page, i18n("Brightness"), -50.0, 50.0 );
Q_CHECK_PTR(wBright);
wBright->slSetSlider( 0 );
- connect( wBright, SIGNAL(valueChanged(int)), gt, SLOT(setBrightness(int)));
+ connect( wBright, TQT_SIGNAL(valueChanged(int)), gt, TQT_SLOT(setBrightness(int)));
wContrast = new KScanSlider ( page, i18n("Contrast") , -50.0, 50.0 );
Q_CHECK_PTR(wContrast);
wContrast->slSetSlider( 0 );
- connect( wContrast, SIGNAL(valueChanged(int)), gt, SLOT(setContrast(int)));
+ connect( wContrast, TQT_SIGNAL(valueChanged(int)), gt, TQT_SLOT(setContrast(int)));
wGamma = new KScanSlider ( page, i18n("Gamma"), 30.0, 300.0 );
Q_CHECK_PTR(wGamma);
wGamma->slSetSlider(100);
- connect( wGamma, SIGNAL(valueChanged(int)), gt, SLOT(setGamma(int)));
+ connect( wGamma, TQT_SIGNAL(valueChanged(int)), gt, TQT_SLOT(setGamma(int)));
/* and add the Sliders */
lvSliders->addWidget( wBright, 1 );
diff --git a/libkscan/gammadialog.h b/libkscan/gammadialog.h
index 8ba648a3..0c63a967 100644
--- a/libkscan/gammadialog.h
+++ b/libkscan/gammadialog.h
@@ -20,8 +20,8 @@
#ifndef GAMMADIALOG_H
#define GAMMADIALOG_H
-#include <qwidget.h>
-#include <qlayout.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
#include <kgammatable.h>
#include <kdialogbase.h>
@@ -45,7 +45,7 @@ class GammaDialog : public KDialogBase
// Q_PROPERTY( KGammaTable *gt READ getGt WRITE setGt )
public:
- GammaDialog ( QWidget *parent );
+ GammaDialog ( TQWidget *parent );
~GammaDialog( );
KGammaTable *getGt( ) const { return gt; }
@@ -61,8 +61,8 @@ private:
KGammaTable *gt;
DispGamma *gtDisp;
- QHBoxLayout *lhMiddle;
- QVBoxLayout *lvSliders;
+ TQHBoxLayout *lhMiddle;
+ TQVBoxLayout *lvSliders;
KScanSlider *wGamma;
KScanSlider *wBright;
diff --git a/libkscan/img_canvas.cpp b/libkscan/img_canvas.cpp
index eccaa412..18c1f606 100644
--- a/libkscan/img_canvas.cpp
+++ b/libkscan/img_canvas.cpp
@@ -17,16 +17,16 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qfiledialog.h>
-#include <qstring.h>
-#include <qmessagebox.h>
-#include <qscrollview.h>
+#include <tqapplication.h>
+#include <tqfiledialog.h>
+#include <tqstring.h>
+#include <tqmessagebox.h>
+#include <tqscrollview.h>
#include <kpopupmenu.h>
-#include <qlabel.h>
-#include <qdict.h>
-#include <qimage.h>
-#include <qpainter.h>
+#include <tqlabel.h>
+#include <tqdict.h>
+#include <tqimage.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kstyle.h>
@@ -36,7 +36,7 @@
#include <kdebug.h>
#include <kiconloader.h>
#include <kcmenumngr.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
#define __IMG_CANVAS_CPP__
@@ -48,7 +48,7 @@
#define MIN(x,y) (x<y?x:y)
-inline void debug_rect( const char *name, QRect *r )
+inline void debug_rect( const char *name, TQRect *r )
{
kdDebug(29000) << (name ? name: "NONAME") << ": " << r->x() << ", " << r->y() << ", " << r->width() << ", " << r->height() << endl;
}
@@ -69,20 +69,20 @@ public:
ScaleKinds scaleKind;
ScaleKinds defaultScaleKind;
- QValueList<QRect> highlightRects;
+ TQValueList<TQRect> highlightRects;
};
-ImageCanvas::ImageCanvas(QWidget *parent,
- const QImage *start_image,
+ImageCanvas::ImageCanvas(TQWidget *parent,
+ const TQImage *start_image,
const char *name ):
- QScrollView( parent, name ),
+ TQScrollView( parent, name ),
m_contextMenu(0)
{
d = new ImageCanvasPrivate();
scale_factor = 100; // means original size
maintain_aspect = true;
- selected = new QRect;
+ selected = new TQRect;
selected->setWidth(0);
selected->setHeight(0);
@@ -92,12 +92,12 @@ ImageCanvas::ImageCanvas(QWidget *parent,
image = start_image;
moving = MOVE_NONE;
- QSize img_size;
+ TQSize img_size;
if( image && ! image->isNull() )
{
img_size = image->size();
- pmScaled = new QPixmap( img_size );
+ pmScaled = new TQPixmap( img_size );
#ifdef USE_KPIXMAPIO
*pmScaled = pixIO.convertToPixmap(*image);
@@ -114,8 +114,8 @@ ImageCanvas::ImageCanvas(QWidget *parent,
update_scaled_pixmap();
// timer-Start and stop
- connect( this, SIGNAL( newRect()), SLOT( newRectSlot()));
- connect( this, SIGNAL( noRect()), SLOT( noRectSlot()));
+ connect( this, TQT_SIGNAL( newRect()), TQT_SLOT( newRectSlot()));
+ connect( this, TQT_SIGNAL( noRect()), TQT_SLOT( noRectSlot()));
//zoomOut();scrollview/scrollview
viewport()->setCursor( crossCursor );
@@ -138,9 +138,9 @@ ImageCanvas::~ImageCanvas()
delete d;
}
-void ImageCanvas::deleteView( QImage *delimage )
+void ImageCanvas::deleteView( TQImage *delimage )
{
- const QImage *img = rootImage();
+ const TQImage *img = rootImage();
if( delimage == img )
{
@@ -151,7 +151,7 @@ void ImageCanvas::deleteView( QImage *delimage )
}
-void ImageCanvas::newImageHoldZoom( QImage *new_image )
+void ImageCanvas::newImageHoldZoom( TQImage *new_image )
{
bool holdZ = d->keepZoom;
@@ -160,7 +160,7 @@ void ImageCanvas::newImageHoldZoom( QImage *new_image )
d->keepZoom = holdZ;
}
-void ImageCanvas::newImage( QImage *new_image )
+void ImageCanvas::newImage( TQImage *new_image )
{
/** do cleanups **/
@@ -190,10 +190,10 @@ void ImageCanvas::newImage( QImage *new_image )
if( image )
{
if( image->depth() == 1 ) {
- pmScaled = new QPixmap( image->size(), 1 );
+ pmScaled = new TQPixmap( image->size(), 1 );
} else {
- int i = QPixmap::defaultDepth();
- pmScaled = new QPixmap( image->size(), i);
+ int i = TQPixmap::defaultDepth();
+ pmScaled = new TQPixmap( image->size(), i);
}
// image->convertDepth(32);
@@ -231,9 +231,9 @@ void ImageCanvas::newImage( QImage *new_image )
kdDebug(29000) << "repaint ok" << endl;
}
-QSize ImageCanvas::sizeHint() const
+TQSize ImageCanvas::sizeHint() const
{
- return( QSize( 2, 2 ));
+ return( TQSize( 2, 2 ));
}
void ImageCanvas::enableContextMenu( bool wantContextMenu )
@@ -304,9 +304,9 @@ void ImageCanvas::handle_popup( int item )
* sizes, eg. 500 means 50.0 % of original width/height.
* That makes it easier to work with different scales and units
*/
-QRect ImageCanvas::sel( void )
+TQRect ImageCanvas::sel( void )
{
- QRect retval;
+ TQRect retval;
retval.setCoords(0, 0, 0, 0);
if( selected && image && selected->width()>MIN_AREA_WIDTH
@@ -315,7 +315,7 @@ QRect ImageCanvas::sel( void )
/* Get the size in real image pixels */
// debug_rect( "PRE map", selected );
- QRect mapped = inv_scale_matrix.map( (const QRect) *selected );
+ TQRect mapped = inv_scale_matrix.map( (const TQRect) *selected );
// debug_rect( "Postmap", &mapped );
if( mapped.x() > 0 )
retval.setLeft((int) (1000.0/( (double)image->width() / (double)mapped.x())));
@@ -335,16 +335,16 @@ QRect ImageCanvas::sel( void )
}
-bool ImageCanvas::selectedImage( QImage *retImg )
+bool ImageCanvas::selectedImage( TQImage *retImg )
{
- QRect r = sel();
+ TQRect r = sel();
bool result = false;
- const QImage* entireImg = this->rootImage();
+ const TQImage* entireImg = this->rootImage();
if( entireImg )
{
- QSize s = entireImg->size();
+ TQSize s = entireImg->size();
int x = (s.width() * r.x())/1000;
int y = (s.height() * r.y())/1000;
@@ -361,7 +361,7 @@ bool ImageCanvas::selectedImage( QImage *retImg )
}
-void ImageCanvas::drawContents( QPainter * p, int clipx, int clipy, int clipw, int cliph )
+void ImageCanvas::drawContents( TQPainter * p, int clipx, int clipy, int clipw, int cliph )
{
if( !pmScaled ) return;
int x1 = 0;
@@ -388,19 +388,19 @@ void ImageCanvas::drawContents( QPainter * p, int clipx, int clipy, int clipw, i
}
-void ImageCanvas::timerEvent(QTimerEvent *)
+void ImageCanvas::timerEvent(TQTimerEvent *)
{
if(moving!=MOVE_NONE || !acquired ) return;
cr1++;
- QPainter p(viewport());
+ TQPainter p(viewport());
// p.setWindow( contentsX(), contentsY(), contentsWidth(), contentsHeight());
drawAreaBorder(&p);
}
-void ImageCanvas::newRectSlot( QRect newSel )
+void ImageCanvas::newRectSlot( TQRect newSel )
{
- QRect to_map;
- QPainter p(viewport());
+ TQRect to_map;
+ TQPainter p(viewport());
drawAreaBorder(&p,TRUE);
selected->setWidth(0);
selected->setHeight(0);
@@ -453,7 +453,7 @@ void ImageCanvas::noRectSlot( void )
selected->setCoords( 0,0,0,0 );
}
-void ImageCanvas::viewportMousePressEvent(QMouseEvent *ev)
+void ImageCanvas::viewportMousePressEvent(TQMouseEvent *ev)
{
if( ! acquired || ! image ) return;
@@ -469,7 +469,7 @@ void ImageCanvas::viewportMousePressEvent(QMouseEvent *ev)
if( moving == MOVE_NONE )
{
- QPainter p( viewport());
+ TQPainter p( viewport());
drawAreaBorder(&p,TRUE);
moving = classifyPoint( x+cx ,y+cy);
@@ -484,13 +484,13 @@ void ImageCanvas::viewportMousePressEvent(QMouseEvent *ev)
}
-void ImageCanvas::viewportMouseReleaseEvent(QMouseEvent *ev)
+void ImageCanvas::viewportMouseReleaseEvent(TQMouseEvent *ev)
{
if(ev->button()!=LeftButton || !acquired ) return;
//// debug( "Mouse Release at %d/%d", ev->x(), ev->y());
if(moving!=MOVE_NONE) {
- QPainter p(viewport());
+ TQPainter p(viewport());
drawAreaBorder(&p,TRUE);
moving = MOVE_NONE;
*selected = selected->normalize();
@@ -511,7 +511,7 @@ void ImageCanvas::viewportMouseReleaseEvent(QMouseEvent *ev)
}
-void ImageCanvas::viewportMouseMoveEvent(QMouseEvent *ev)
+void ImageCanvas::viewportMouseMoveEvent(TQMouseEvent *ev)
{
if( ! acquired || !image) return;
@@ -580,7 +580,7 @@ void ImageCanvas::viewportMouseMoveEvent(QMouseEvent *ev)
//At ButtonRelease : normalize + clip
if( moving!=MOVE_NONE ) {
int mx, my;
- QPainter p(viewport());
+ TQPainter p(viewport());
drawAreaBorder(&p,TRUE);
switch(moving) {
case MOVE_NONE: //Just to make compiler happy
@@ -653,9 +653,9 @@ void ImageCanvas::setScaleFactor( int i )
}
-void ImageCanvas::resizeEvent( QResizeEvent * event )
+void ImageCanvas::resizeEvent( TQResizeEvent * event )
{
- QScrollView::resizeEvent( event );
+ TQScrollView::resizeEvent( event );
update_scaled_pixmap();
}
@@ -669,13 +669,13 @@ void ImageCanvas::update_scaled_pixmap( void )
return;
}
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
kdDebug(28000) << "Updating scaled_pixmap" << endl;
if( scaleKind() == DYNAMIC )
kdDebug(28000) << "Scaling DYNAMIC" << endl;
- QSize noSBSize( visibleWidth(), visibleHeight());
- const int sbWidth = kapp->style().pixelMetric( QStyle::PM_ScrollBarExtent );
+ TQSize noSBSize( visibleWidth(), visibleHeight());
+ const int sbWidth = kapp->style().pixelMetric( TQStyle::PM_ScrollBarExtent );
// if( verticalScrollBar()->visible() ) noSBSize.width()+=sbWidth;
// if( horizontalScrollBar()->visible() ) noSBSize.height()+=sbWidth;
@@ -729,7 +729,7 @@ void ImageCanvas::update_scaled_pixmap( void )
// reconvert the selection to orig size
if( selected ) {
- *selected = inv_scale_matrix.map( (const QRect) *selected );
+ *selected = inv_scale_matrix.map( (const TQRect) *selected );
}
scale_matrix.reset(); // transformation matrix
@@ -747,7 +747,7 @@ void ImageCanvas::update_scaled_pixmap( void )
inv_scale_matrix = scale_matrix.invert(); // for redraw of selection
if( selected ) {
- *selected = scale_matrix.map( (const QRect )*selected );
+ *selected = scale_matrix.map( (const TQRect )*selected );
}
#ifdef USE_KPIXMAPIO
@@ -764,11 +764,11 @@ void ImageCanvas::update_scaled_pixmap( void )
resizeContents( static_cast<int>(image->width() * used_xscaler),
static_cast<int>(image->height() * used_yscaler ) );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
-void ImageCanvas::drawHAreaBorder(QPainter &p,int x1,int x2,int y,int r)
+void ImageCanvas::drawHAreaBorder(TQPainter &p,int x1,int x2,int y,int r)
{
if( ! acquired || !image ) return;
@@ -780,17 +780,17 @@ void ImageCanvas::drawHAreaBorder(QPainter &p,int x1,int x2,int y,int r)
if(!r) {
if(cr2 & 4) p.setPen(black);
else p.setPen(white);
- } else if(!acquired) p.setPen(QPen(QColor(150,150,150)));
+ } else if(!acquired) p.setPen(TQPen(TQColor(150,150,150)));
for(;;) {
- if(rect().contains(QPoint(x1,y))) {
+ if(rect().contains(TQPoint(x1,y))) {
if( r && acquired ) {
int re_x1, re_y;
inv_scale_matrix.map( x1+cx, y+cy, &re_x1, &re_y );
re_x1 = MIN( image->width()-1, re_x1 );
re_y = MIN( image->height()-1, re_y );
- p.setPen( QPen( QColor( image->pixel(re_x1, re_y))));
+ p.setPen( TQPen( TQColor( image->pixel(re_x1, re_y))));
}
p.drawPoint(x1,y);
}
@@ -808,7 +808,7 @@ void ImageCanvas::drawHAreaBorder(QPainter &p,int x1,int x2,int y,int r)
}
-void ImageCanvas::drawVAreaBorder(QPainter &p, int x, int y1, int y2, int r )
+void ImageCanvas::drawVAreaBorder(TQPainter &p, int x, int y1, int y2, int r )
{
if( ! acquired || !image ) return;
if( moving!=MOVE_NONE ) cr2 = 0;
@@ -823,17 +823,17 @@ void ImageCanvas::drawVAreaBorder(QPainter &p, int x, int y1, int y2, int r )
else
p.setPen(white);
} else
- if( !acquired ) p.setPen( QPen( QColor(150,150,150) ) );
+ if( !acquired ) p.setPen( TQPen( TQColor(150,150,150) ) );
for(;;) {
- if(rect().contains( QPoint(x,y1) )) {
+ if(rect().contains( TQPoint(x,y1) )) {
if( r && acquired ) {
int re_y1, re_x;
inv_scale_matrix.map( x+cx, y1+cy, &re_x, &re_y1 );
re_x = MIN( image->width()-1, re_x );
re_y1 = MIN( image->height()-1, re_y1 );
- p.setPen( QPen( QColor( image->pixel( re_x, re_y1) )));
+ p.setPen( TQPen( TQColor( image->pixel( re_x, re_y1) )));
}
p.drawPoint(x,y1);
}
@@ -852,7 +852,7 @@ void ImageCanvas::drawVAreaBorder(QPainter &p, int x, int y1, int y2, int r )
}
-void ImageCanvas::drawAreaBorder(QPainter *p,int r )
+void ImageCanvas::drawAreaBorder(TQPainter *p,int r )
{
if(selected->isNull()) return;
@@ -890,7 +890,7 @@ preview_state ImageCanvas::classifyPoint(int x,int y)
{
if(selected->isEmpty()) return MOVE_NONE;
- QRect a = selected->normalize();
+ TQRect a = selected->normalize();
int top = 0,left = 0,right = 0,bottom = 0;
int lx = a.left()-x, rx = x-a.right();
@@ -921,7 +921,7 @@ preview_state ImageCanvas::classifyPoint(int x,int y)
if(x>=a.left()&&x<=a.right()) {
if(top) return MOVE_TOP;
if(bottom) return MOVE_BOTTOM;
- if(selected->contains(QPoint(x,y))) return MOVE_WHOLE;
+ if(selected->contains(TQPoint(x,y))) return MOVE_WHOLE;
}
return MOVE_NONE;
}
@@ -947,7 +947,7 @@ int ImageCanvas::getScaleFactor() const
return( scale_factor );
}
-const QImage *ImageCanvas::rootImage( )
+const TQImage *ImageCanvas::rootImage( )
{
return( image );
}
@@ -1009,7 +1009,7 @@ void ImageCanvas::setDefaultScaleKind( ScaleKinds k )
d->defaultScaleKind = k;
}
-const QString ImageCanvas::imageInfoString( int w, int h, int d )
+const TQString ImageCanvas::imageInfoString( int w, int h, int d )
{
if( w == 0 && h == 0 && d == 0 )
{
@@ -1020,13 +1020,13 @@ const QString ImageCanvas::imageInfoString( int w, int h, int d )
d = image->depth();
}
else
- return QString("-");
+ return TQString("-");
}
return i18n("%1x%2 pixel, %3 bit").arg(w).arg(h).arg(d);
}
-const QString ImageCanvas::scaleKindString()
+const TQString ImageCanvas::scaleKindString()
{
switch( scaleKind() )
{
@@ -1043,7 +1043,7 @@ const QString ImageCanvas::scaleKindString()
return i18n("Fit Height");
break;
case ZOOM:
- return i18n("Zoom to %1 %%").arg( QString::number(getScaleFactor()));
+ return i18n("Zoom to %1 %%").arg( TQString::number(getScaleFactor()));
break;
default:
return i18n("Unknown scaling!");
@@ -1052,17 +1052,17 @@ const QString ImageCanvas::scaleKindString()
}
-int ImageCanvas::highlight( const QRect& rect, const QPen& pen, const QBrush&, bool ensureVis )
+int ImageCanvas::highlight( const TQRect& rect, const TQPen& pen, const TQBrush&, bool ensureVis )
{
- QRect saveRect;
+ TQRect saveRect;
saveRect.setRect( rect.x()-2, rect.y()-2, rect.width()+4, rect.height()+4 );
d->highlightRects.append( saveRect );
int idx = d->highlightRects.findIndex(saveRect);
- QRect targetRect = scale_matrix.map( rect );
+ TQRect targetRect = scale_matrix.map( rect );
- QPainter p( pmScaled );
+ TQPainter p( pmScaled );
p.setPen(pen);
p.drawLine( targetRect.x(), targetRect.y()+targetRect.height(),
@@ -1074,7 +1074,7 @@ int ImageCanvas::highlight( const QRect& rect, const QPen& pen, const QBrush&, b
if( ensureVis )
{
- QPoint p = targetRect.center();
+ TQPoint p = targetRect.center();
ensureVisible( p.x(), p.y(), 10+targetRect.width()/2, 10+targetRect.height()/2 );
}
@@ -1090,17 +1090,17 @@ void ImageCanvas::removeHighlight( int idx )
}
/* take the rectangle from the stored highlight rects and map it to the viewer scaling */
- QRect r = d->highlightRects[idx];
+ TQRect r = d->highlightRects[idx];
d->highlightRects.remove(r);
- QRect targetRect = scale_matrix.map( r );
+ TQRect targetRect = scale_matrix.map( r );
/* create a small pixmap with a copy of the region in question of the original image */
- QPixmap origPix;
+ TQPixmap origPix;
origPix.convertFromImage( image->copy(r) );
/* and scale it */
- QPixmap scaledPix = origPix.xForm( scale_matrix );
+ TQPixmap scaledPix = origPix.xForm( scale_matrix );
/* and finally draw it */
- QPainter p( pmScaled );
+ TQPainter p( pmScaled );
p.drawPixmap( targetRect, scaledPix );
p.flush();
diff --git a/libkscan/img_canvas.h b/libkscan/img_canvas.h
index 5abf267c..958fecbb 100644
--- a/libkscan/img_canvas.h
+++ b/libkscan/img_canvas.h
@@ -20,22 +20,22 @@
#ifndef __IMG_CANVAS_H__
#define __IMG_CANVAS_H__
-#include <qwidget.h>
-#include <qrect.h>
+#include <tqwidget.h>
+#include <tqrect.h>
#include <stdlib.h>
-#include <qsize.h>
-#include <qwmatrix.h>
-#include <qscrollview.h>
-#include <qstrlist.h>
+#include <tqsize.h>
+#include <tqwmatrix.h>
+#include <tqscrollview.h>
+#include <tqstrlist.h>
#ifdef USE_KPIXMAPIO
#include <kpixmapio.h>
#endif
-class QPopupMenu;
-class QPixmap;
-class QImage;
-class QPainter;
+class TQPopupMenu;
+class TQPixmap;
+class TQImage;
+class TQPainter;
enum preview_state {
MOVE_NONE,
@@ -81,8 +81,8 @@ class ImageCanvas: public QScrollView
Q_PROPERTY( int scale_factor READ getScaleFactor WRITE setScaleFactor )
public:
- ImageCanvas( QWidget *parent = 0,
- const QImage *start_image = 0,
+ ImageCanvas( TQWidget *parent = 0,
+ const TQImage *start_image = 0,
const char *name = 0);
~ImageCanvas( );
@@ -92,25 +92,25 @@ public:
int getScaleFactor() const;
- const QImage *rootImage();
+ const TQImage *rootImage();
bool hasImage( void ) { return acquired; }
- QPopupMenu* contextMenu() { return m_contextMenu; }
- QRect sel( void );
+ TQPopupMenu* contextMenu() { return m_contextMenu; }
+ TQRect sel( void );
enum ScaleKinds { UNSPEC, DYNAMIC, FIT_ORIG, FIT_WIDTH, FIT_HEIGHT, ZOOM };
enum PopupIDs { ID_POP_ZOOM, ID_POP_CLOSE, ID_FIT_WIDTH,
ID_FIT_HEIGHT, ID_ORIG_SIZE };
- bool selectedImage( QImage* );
+ bool selectedImage( TQImage* );
ScaleKinds scaleKind();
- const QString scaleKindString();
+ const TQString scaleKindString();
ScaleKinds defaultScaleKind();
- const QString imageInfoString( int w=0, int h=0, int d=0 );
+ const TQString imageInfoString( int w=0, int h=0, int d=0 );
public slots:
void setBrightness(int);
@@ -122,12 +122,12 @@ public slots:
maintain_aspect = aspect_in_mind;
repaint();
}
- virtual QSize sizeHint() const;
- void newImage( QImage* );
- void newImageHoldZoom( QImage* );
- void deleteView( QImage *);
+ virtual TQSize sizeHint() const;
+ void newImage( TQImage* );
+ void newImageHoldZoom( TQImage* );
+ void deleteView( TQImage *);
void newRectSlot();
- void newRectSlot( QRect newSel );
+ void newRectSlot( TQRect newSel );
void noRectSlot( void );
void setScaleFactor( int i );
void handle_popup(int item );
@@ -141,7 +141,7 @@ public slots:
* and pen.
* The function returns a id that needs to be given to the remove method.
*/
- int highlight( const QRect&, const QPen&, const QBrush&, bool ensureVis=false );
+ int highlight( const TQRect&, const TQPen&, const TQBrush&, bool ensureVis=false );
/**
* reverts the highlighted region back to normal view.
@@ -158,10 +158,10 @@ public slots:
signals:
void noRect( void );
void newRect( void );
- void newRect( QRect );
+ void newRect( TQRect );
void scalingRequested();
void closingRequested();
- void scalingChanged( const QString& );
+ void scalingChanged( const TQString& );
/**
* signal emitted if the permission of the currently displayed image changed,
* ie. if it goes from writeable to readable.
@@ -170,20 +170,20 @@ signals:
void imageReadOnly( bool isRO );
protected:
- void drawContents( QPainter * p, int clipx, int clipy, int clipw, int cliph );
+ void drawContents( TQPainter * p, int clipx, int clipy, int clipw, int cliph );
- void timerEvent(QTimerEvent *);
- void viewportMousePressEvent(QMouseEvent *);
- void viewportMouseReleaseEvent(QMouseEvent *);
- void viewportMouseMoveEvent(QMouseEvent *);
+ void timerEvent(TQTimerEvent *);
+ void viewportMousePressEvent(TQMouseEvent *);
+ void viewportMouseReleaseEvent(TQMouseEvent *);
+ void viewportMouseMoveEvent(TQMouseEvent *);
- void resizeEvent( QResizeEvent * event );
+ void resizeEvent( TQResizeEvent * event );
private:
- QStrList urls;
+ TQStrList urls;
int scale_factor;
- const QImage *image;
+ const TQImage *image;
int brightness, contrast, gamma;
@@ -193,23 +193,23 @@ private:
QWMatrix scale_matrix;
QWMatrix inv_scale_matrix;
- QPixmap *pmScaled;
+ TQPixmap *pmScaled;
float used_yscaler;
float used_xscaler;
- QPopupMenu *m_contextMenu;
+ TQPopupMenu *m_contextMenu;
bool maintain_aspect;
int timer_id;
- QRect *selected;
+ TQRect *selected;
preview_state moving;
int cr1,cr2;
int lx,ly;
bool acquired;
/* private functions for the running ant */
- void drawHAreaBorder(QPainter &p,int x1,int x2,int y,int r = FALSE);
- void drawVAreaBorder(QPainter &p,int x,int y1,int y2,int r = FALSE);
- void drawAreaBorder(QPainter *p,int r = FALSE);
+ void drawHAreaBorder(TQPainter &p,int x1,int x2,int y,int r = FALSE);
+ void drawVAreaBorder(TQPainter &p,int x,int y1,int y2,int r = FALSE);
+ void drawAreaBorder(TQPainter *p,int r = FALSE);
void update_scaled_pixmap( void );
preview_state classifyPoint(int x,int y);
diff --git a/libkscan/imgscaledialog.cpp b/libkscan/imgscaledialog.cpp
index 535d3ffd..2deb4544 100644
--- a/libkscan/imgscaledialog.cpp
+++ b/libkscan/imgscaledialog.cpp
@@ -19,15 +19,15 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
#include <knumvalidator.h>
#include "imgscaledialog.h"
/* ############################################################################## */
-ImgScaleDialog::ImgScaleDialog( QWidget *parent, int curr_sel,
+ImgScaleDialog::ImgScaleDialog( TQWidget *parent, int curr_sel,
const char *name )
:KDialogBase( parent, name , true, i18n("Zoom"),
Ok|Cancel, Ok, true )
@@ -37,88 +37,88 @@ ImgScaleDialog::ImgScaleDialog( QWidget *parent, int curr_sel,
int one_is_selected = false;
enableButtonSeparator( false );
- // (void) new QLabel( , main, "Page");
+ // (void) new TQLabel( , main, "Page");
//
// makeMainWidget();
- QButtonGroup *radios = new QButtonGroup ( 2, Qt::Horizontal, this );
+ TQButtonGroup *radios = new TQButtonGroup ( 2, Qt::Horizontal, this );
setMainWidget(radios);
Q_CHECK_PTR(radios);
radios->setTitle( i18n("Select Image Zoom") );
- connect( radios, SIGNAL( clicked( int )),
- this, SLOT( setSelValue( int )));
+ connect( radios, TQT_SIGNAL( clicked( int )),
+ this, TQT_SLOT( setSelValue( int )));
// left gap: smaller Image
- QRadioButton *rb25 = new QRadioButton (i18n ("25 %"), radios);
+ TQRadioButton *rb25 = new TQRadioButton (i18n ("25 %"), radios);
if( curr_sel == 25 ){
rb25->setChecked( true );
one_is_selected = true;
}
- QRadioButton *rb50 = new QRadioButton (i18n ("50 %"), radios );
+ TQRadioButton *rb50 = new TQRadioButton (i18n ("50 %"), radios );
if( curr_sel == 50 ){
rb50->setChecked( true );
one_is_selected = true;
}
- QRadioButton *rb75 = new QRadioButton (i18n ("75 %"), radios );
+ TQRadioButton *rb75 = new TQRadioButton (i18n ("75 %"), radios );
if( curr_sel == 75 ) {
rb75->setChecked( true );
one_is_selected = true;
}
- QRadioButton *rb100 = new QRadioButton (i18n ("100 %"), radios);
+ TQRadioButton *rb100 = new TQRadioButton (i18n ("100 %"), radios);
if( curr_sel == 100 ) {
rb100->setChecked( true );
one_is_selected = true;
}
- QRadioButton *rb150 = new QRadioButton (i18n ("150 %"), radios);
+ TQRadioButton *rb150 = new TQRadioButton (i18n ("150 %"), radios);
if( curr_sel == 150 ) {
rb150->setChecked( true );
one_is_selected = true;
}
- QRadioButton *rb200 = new QRadioButton (i18n ("200 %"), radios );
+ TQRadioButton *rb200 = new TQRadioButton (i18n ("200 %"), radios );
if( curr_sel == 200 ) {
rb200->setChecked( true );
one_is_selected = true;
}
- QRadioButton *rb300 = new QRadioButton (i18n ("300 %"), radios );
+ TQRadioButton *rb300 = new TQRadioButton (i18n ("300 %"), radios );
if( curr_sel == 300 ) {
rb300->setChecked( true );
one_is_selected = true;
}
- QRadioButton *rb400 = new QRadioButton (i18n ("400 %"), radios);
+ TQRadioButton *rb400 = new TQRadioButton (i18n ("400 %"), radios);
if( curr_sel == 400 ) {
rb400->setChecked( true );
one_is_selected = true;
}
// Custom Scaler at the bottom
- QRadioButton *rbCust = new QRadioButton (i18n ("Custom scale factor:"),
+ TQRadioButton *rbCust = new TQRadioButton (i18n ("Custom scale factor:"),
radios);
if( ! one_is_selected )
rbCust->setChecked( true );
- leCust = new QLineEdit( radios );
- QString sn;
+ leCust = new TQLineEdit( radios );
+ TQString sn;
sn.setNum(curr_sel );
leCust->setValidator( new KIntValidator( leCust ) );
leCust->setText(sn );
- connect( leCust, SIGNAL( textChanged( const QString& )),
- this, SLOT( customChanged( const QString& )));
- connect( rbCust, SIGNAL( toggled( bool )),
- this, SLOT(enableAndFocus(bool)));
+ connect( leCust, TQT_SIGNAL( textChanged( const TQString& )),
+ this, TQT_SLOT( customChanged( const TQString& )));
+ connect( rbCust, TQT_SIGNAL( toggled( bool )),
+ this, TQT_SLOT(enableAndFocus(bool)));
leCust->setEnabled( rbCust->isChecked());
}
-void ImgScaleDialog::customChanged( const QString& s )
+void ImgScaleDialog::customChanged( const TQString& s )
{
bool ok;
int okval = s.toInt( &ok );
@@ -148,7 +148,7 @@ void ImgScaleDialog::setSelValue( int val )
// Custom size selected
if( selected == -1 ) {
- QString s = leCust->text();
+ TQString s = leCust->text();
bool ok;
int okval = s.toInt( &ok );
diff --git a/libkscan/imgscaledialog.h b/libkscan/imgscaledialog.h
index 8bbe1963..6ab4cb78 100644
--- a/libkscan/imgscaledialog.h
+++ b/libkscan/imgscaledialog.h
@@ -20,7 +20,7 @@
#ifndef __IMGSCALEDIALOG_H__
#define __IMGSCALEDIALOG_H__
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <kdialogbase.h>
@@ -35,7 +35,7 @@ class ImgScaleDialog : public KDialogBase
Q_PROPERTY( int selected READ getSelected WRITE setSelValue )
public:
- ImgScaleDialog( QWidget *parent, int curr_sel = 100,
+ ImgScaleDialog( TQWidget *parent, int curr_sel = 100,
const char *name = 0 );
public slots:
@@ -50,9 +50,9 @@ public slots:
signals:
void customScaleChange( int );
public slots:
- void customChanged( const QString& );
+ void customChanged( const TQString& );
private:
- QLineEdit *leCust;
+ TQLineEdit *leCust;
int selected;
class ImgScaleDialogPrivate;
diff --git a/libkscan/imgscaninfo.cpp b/libkscan/imgscaninfo.cpp
index a3287a5b..eee481c6 100644
--- a/libkscan/imgscaninfo.cpp
+++ b/libkscan/imgscaninfo.cpp
@@ -54,22 +54,22 @@ int ImgScanInfo::getYResolution()
return m_yRes;
}
-void ImgScanInfo::setMode( const QString& smode )
+void ImgScanInfo::setMode( const TQString& smode )
{
m_mode = smode;
}
-QString ImgScanInfo::getMode()
+TQString ImgScanInfo::getMode()
{
return m_mode;
}
-void ImgScanInfo::setScannerName( const QString& name )
+void ImgScanInfo::setScannerName( const TQString& name )
{
m_scanner = name;
}
-QString ImgScanInfo::getScannerName()
+TQString ImgScanInfo::getScannerName()
{
return m_scanner;
}
diff --git a/libkscan/imgscaninfo.h b/libkscan/imgscaninfo.h
index 05ff63e2..8c87d3e5 100644
--- a/libkscan/imgscaninfo.h
+++ b/libkscan/imgscaninfo.h
@@ -20,7 +20,7 @@
#ifndef __IMGSCANINFO_H__
#define __IMGSCANINFO_H__
-#include <qstring.h>
+#include <tqstring.h>
/* ----------------------------------------------------------------------
*
@@ -32,18 +32,18 @@ public:
int getXResolution();
int getYResolution();
- QString getMode();
- QString getScannerName();
+ TQString getMode();
+ TQString getScannerName();
void setXResolution( int );
void setYResolution( int );
- void setMode( const QString& );
- void setScannerName( const QString& );
+ void setMode( const TQString& );
+ void setScannerName( const TQString& );
private:
int m_xRes;
int m_yRes;
- QString m_mode;
- QString m_scanner;
+ TQString m_mode;
+ TQString m_scanner;
class ImgScanInfoPrivate;
ImgScanInfoPrivate *d;
diff --git a/libkscan/kgammatable.cpp b/libkscan/kgammatable.cpp
index 4f1ef64f..d364d989 100644
--- a/libkscan/kgammatable.cpp
+++ b/libkscan/kgammatable.cpp
@@ -23,7 +23,7 @@
#include "kgammatable.h"
KGammaTable::KGammaTable( int gamma, int brightness, int contrast )
- : QObject()
+ : TQObject()
{
g = gamma < 1 ? 1 : gamma;
b = brightness;
diff --git a/libkscan/kgammatable.h b/libkscan/kgammatable.h
index 05e71ddd..49540a82 100644
--- a/libkscan/kgammatable.h
+++ b/libkscan/kgammatable.h
@@ -20,8 +20,8 @@
#ifndef KGAMMATABLE_H
#define KGAMMATABLE_H
-#include <qmemarray.h>
-#include <qobject.h>
+#include <tqmemarray.h>
+#include <tqobject.h>
extern "C" {
#include <sane/sane.h>
@@ -39,7 +39,7 @@ public:
KGammaTable ( int gamma = 100, int brightness = 0,
int contrast = 0 );
void setAll ( int gamma, int brightness, int contrast );
- QMemArray<SANE_Word> *getArrayPtr( void ) { return &gt; }
+ TQMemArray<SANE_Word> *getArrayPtr( void ) { return &gt; }
int getGamma( ) const { return g; }
int getBrightness( ) const { return b; }
@@ -62,7 +62,7 @@ private:
void calcTable( );
int g, b, c;
bool dirty;
- QMemArray<SANE_Word> gt;
+ TQMemArray<SANE_Word> gt;
class KGammaTablePrivate;
KGammaTablePrivate *d;
diff --git a/libkscan/kscandevice.cpp b/libkscan/kscandevice.cpp
index ca678eac..c5237eb4 100644
--- a/libkscan/kscandevice.cpp
+++ b/libkscan/kscandevice.cpp
@@ -18,19 +18,19 @@
*/
#include <stdlib.h>
-#include <qwidget.h>
-#include <qobject.h>
-#include <qasciidict.h>
-#include <qcombobox.h>
-#include <qslider.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qimage.h>
-#include <qfileinfo.h>
-#include <qapplication.h>
+#include <tqwidget.h>
+#include <tqobject.h>
+#include <tqasciidict.h>
+#include <tqcombobox.h>
+#include <tqslider.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqimage.h>
+#include <tqfileinfo.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <klocale.h>
#include <kglobal.h>
@@ -74,13 +74,13 @@ public:
/* ---------------------------------------------------------------------------
------------------------------------------------------------------------- */
-void KScanDevice::guiSetEnabled( const QCString& name, bool state )
+void KScanDevice::guiSetEnabled( const TQCString& name, bool state )
{
KScanOption *so = getExistingGuiElement( name );
if( so )
{
- QWidget *w = so->widget();
+ TQWidget *w = so->widget();
if( w )
w->setEnabled( state );
@@ -91,11 +91,11 @@ void KScanDevice::guiSetEnabled( const QCString& name, bool state )
/* ---------------------------------------------------------------------------
------------------------------------------------------------------------- */
-KScanOption *KScanDevice::getExistingGuiElement( const QCString& name )
+KScanOption *KScanDevice::getExistingGuiElement( const TQCString& name )
{
KScanOption *ret = 0L;
- QCString alias = aliasName( name );
+ TQCString alias = aliasName( name );
/* gui_elements is a QList<KScanOption> */
for( ret = gui_elements.first(); ret != 0; ret = gui_elements.next())
@@ -109,15 +109,15 @@ KScanOption *KScanDevice::getExistingGuiElement( const QCString& name )
------------------------------------------------------------------------- */
-KScanOption *KScanDevice::getGuiElement( const QCString& name, QWidget *parent,
- const QString& desc,
- const QString& tooltip )
+KScanOption *KScanDevice::getGuiElement( const TQCString& name, TQWidget *parent,
+ const TQString& desc,
+ const TQString& tooltip )
{
if( name.isEmpty() ) return(0);
- QWidget *w = 0;
+ TQWidget *w = 0;
KScanOption *so = 0;
- QCString alias = aliasName( name );
+ TQCString alias = aliasName( name );
/* Check if already exists */
so = getExistingGuiElement( name );
@@ -135,8 +135,8 @@ KScanOption *KScanDevice::getGuiElement( const QCString& name, QWidget *parent,
w = so->createWidget( parent, desc, tooltip );
if( w )
{
- connect( so, SIGNAL( optionChanged( KScanOption* ) ),
- this, SLOT( slOptChanged( KScanOption* )));
+ connect( so, TQT_SIGNAL( optionChanged( KScanOption* ) ),
+ this, TQT_SLOT( slOptChanged( KScanOption* )));
w->setEnabled( so->active() );
}
else
@@ -163,14 +163,14 @@ KScanOption *KScanDevice::getGuiElement( const QCString& name, QWidget *parent,
// ---------------------------------------------------------------------------
-KScanDevice::KScanDevice( QObject *parent )
- : QObject( parent )
+KScanDevice::KScanDevice( TQObject *parent )
+ : TQObject( parent )
{
SANE_Status sane_stat = sane_init(NULL, NULL );
d = new KScanDevicePrivate();
- option_dic = new QAsciiDict<int>;
+ option_dic = new TQAsciiDict<int>;
option_dic->setAutoDelete( true );
gui_elements.setAutoDelete( true );
@@ -209,7 +209,7 @@ KScanDevice::KScanDevice( QObject *parent )
}
}
#if 0
- connect( this, SIGNAL(sigOptionsChanged()), SLOT(slReloadAll()));
+ connect( this, TQT_SIGNAL(sigOptionsChanged()), TQT_SLOT(slReloadAll()));
#endif
gammaTables = new KScanOptSet( "GammaTables" );
}
@@ -218,7 +218,7 @@ KScanDevice::KScanDevice( QObject *parent )
kdDebug(29000) << "ERROR: sane_init failed -> SANE installed ?" << endl;
}
- connect( this, SIGNAL( sigScanFinished( KScanStat )), SLOT( slScanFinished( KScanStat )));
+ connect( this, TQT_SIGNAL( sigScanFinished( KScanStat )), TQT_SLOT( slScanFinished( KScanStat )));
}
@@ -232,7 +232,7 @@ KScanDevice::~KScanDevice()
}
-KScanStat KScanDevice::openDevice( const QCString& backend )
+KScanStat KScanDevice::openDevice( const TQCString& backend )
{
KScanStat stat = KSCAN_OK;
SANE_Status sane_stat = SANE_STATUS_GOOD;
@@ -299,9 +299,9 @@ void KScanDevice::slCloseDevice( )
}
-QString KScanDevice::getScannerName(const QCString& name) const
+TQString KScanDevice::getScannerName(const TQCString& name) const
{
- QString ret = i18n("No scanner selected");
+ TQString ret = i18n("No scanner selected");
SANE_Device *scanner = 0L;
if( scanner_name && scanner_initialised && name.isEmpty())
@@ -311,7 +311,7 @@ QString KScanDevice::getScannerName(const QCString& name) const
else if ( ! name.isEmpty() )
{
scanner = scannerDevices[ name ];
- ret = QString::null;
+ ret = TQString::null;
}
if( scanner ) {
@@ -324,9 +324,9 @@ QString KScanDevice::getScannerName(const QCString& name) const
}
-QSize KScanDevice::getMaxScanSize( void ) const
+TQSize KScanDevice::getMaxScanSize( void ) const
{
- QSize s;
+ TQSize s;
double min, max, q;
KScanOption so_w( SANE_NAME_SCAN_BR_X );
@@ -386,7 +386,7 @@ KScanStat KScanDevice::find_options()
option_list.append( (const char*) d->name );
#if 0
KScanOption *newOpt = new KScanOption( d->name );
- const QString qq = newOpt->get();
+ const TQString qq = newOpt->get();
qDebug( "INIT: <%s> = <%s>", d->name, qq );
allOptionSet->insert( d->name, newOpt );
#endif
@@ -405,16 +405,16 @@ KScanStat KScanDevice::find_options()
}
-QStrList KScanDevice::getAllOptions()
+TQStrList KScanDevice::getAllOptions()
{
return( option_list );
}
-QStrList KScanDevice::getCommonOptions()
+TQStrList KScanDevice::getCommonOptions()
{
- QStrList com_opt;
+ TQStrList com_opt;
- QCString s = option_list.first();
+ TQCString s = option_list.first();
while( !s.isEmpty() )
{
@@ -426,11 +426,11 @@ QStrList KScanDevice::getCommonOptions()
return( com_opt );
}
-QStrList KScanDevice::getAdvancedOptions()
+TQStrList KScanDevice::getAdvancedOptions()
{
- QStrList com_opt;
+ TQStrList com_opt;
- QCString s = option_list.first();
+ TQCString s = option_list.first();
while( !s.isEmpty() )
{
@@ -450,7 +450,7 @@ KScanStat KScanDevice::apply( KScanOption *opt, bool isGammaTable )
int *num = (*option_dic)[ opt->getName() ];
SANE_Status sane_stat = SANE_STATUS_GOOD;
- const QCString& oname = opt->getName();
+ const TQCString& oname = opt->getName();
if ( oname == "preview" || oname == "mode" ) {
sane_stat = sane_control_option( scanner_handle, *num,
@@ -551,12 +551,12 @@ KScanStat KScanDevice::apply( KScanOption *opt, bool isGammaTable )
return( stat );
}
-bool KScanDevice::optionExists( const QCString& name )
+bool KScanDevice::optionExists( const TQCString& name )
{
if( name.isEmpty() ) return false;
int *i = 0L;
- QCString altname = aliasName( name );
+ TQCString altname = aliasName( name );
if( ! altname.isNull() )
i = (*option_dic)[ altname ];
@@ -566,7 +566,7 @@ bool KScanDevice::optionExists( const QCString& name )
return( *i > -1 );
}
-void KScanDevice::slSetDirty( const QCString& name )
+void KScanDevice::slSetDirty( const TQCString& name )
{
if( optionExists( name ) )
{
@@ -585,10 +585,10 @@ void KScanDevice::slSetDirty( const QCString& name )
* cool thing :-|
* Maybe this helps us out ?
*/
-QCString KScanDevice::aliasName( const QCString& name )
+TQCString KScanDevice::aliasName( const TQCString& name )
{
int *i = (*option_dic)[ name ];
- QCString ret;
+ TQCString ret;
if( i ) return( name );
ret = name;
@@ -667,36 +667,36 @@ void KScanDevice::slStopScanning( void )
}
-const QString KScanDevice::previewFile()
+const TQString KScanDevice::previewFile()
{
- QString dir = (KGlobal::dirs())->saveLocation( "data", "ScanImages", true );
+ TQString dir = (KGlobal::dirs())->saveLocation( "data", "ScanImages", true );
if( !dir.endsWith("/") )
dir += "/";
- QString fname = dir + QString::fromLatin1(".previews/");
- QString sname( getScannerName(shortScannerName()) );
+ TQString fname = dir + TQString::fromLatin1(".previews/");
+ TQString sname( getScannerName(shortScannerName()) );
sname.replace( '/', "_");
return fname+sname;
}
-QImage KScanDevice::loadPreviewImage()
+TQImage KScanDevice::loadPreviewImage()
{
- const QString prevFile = previewFile();
+ const TQString prevFile = previewFile();
kdDebug(29000) << "Loading preview from file " << prevFile << endl;
- QImage image;
+ TQImage image;
image.load( prevFile );
return image;
}
-bool KScanDevice::savePreviewImage( const QImage &image )
+bool KScanDevice::savePreviewImage( const TQImage &image )
{
if( image.isNull() )
return false;
- const QString prevFile = previewFile();
+ const TQString prevFile = previewFile();
kdDebug(29000) << "Saving preview to file " << prevFile << endl;
return image.save( prevFile, "BMP" );
@@ -757,7 +757,7 @@ KScanStat KScanDevice::acquirePreview( bool forceGray, int dpi )
if( optionExists( SANE_NAME_SCAN_MODE ) )
{
KScanOption mode( SANE_NAME_SCAN_MODE );
- const QString kk = mode.get();
+ const TQString kk = mode.get();
kdDebug(29000) << "Mode is <" << kk << ">" << endl;
storeOptions->backupOption( mode );
/* apply if it has a widget, or apply always ? */
@@ -766,7 +766,7 @@ KScanStat KScanDevice::acquirePreview( bool forceGray, int dpi )
/** Scan Resolution should always exist. **/
KScanOption res ( SANE_NAME_SCAN_RESOLUTION );
- const QString p = res.get();
+ const TQString p = res.get();
kdDebug(29000) << "Scan Resolution pre Preview is " << p << endl;
storeOptions->backupOption( res );
@@ -842,10 +842,10 @@ KScanStat KScanDevice::acquirePreview( bool forceGray, int dpi )
**/
#define NOTIFIER(X) optionNotifyString(X)
-QString KScanDevice::optionNotifyString( int i ) const
+TQString KScanDevice::optionNotifyString( int i ) const
{
- const QString sOff = " |";
- const QString sOn = " X |";
+ const TQString sOff = " |";
+ const TQString sOn = " X |";
if( i > 0 )
{
return sOn;
@@ -856,7 +856,7 @@ QString KScanDevice::optionNotifyString( int i ) const
void KScanDevice::prepareScan( void )
{
- QAsciiDictIterator<int> it( *option_dic ); // iterator for dict
+ TQAsciiDictIterator<int> it( *option_dic ); // iterator for dict
kdDebug(29000) << "########################################################################################################" << endl;
kdDebug(29000) << "Scanner: " << scanner_name << endl;
@@ -876,7 +876,7 @@ void KScanDevice::prepareScan( void )
{
int cap = d->cap;
- QString s = QString(it.currentKey()).leftJustify(32, ' ');
+ TQString s = TQString(it.currentKey()).leftJustify(32, ' ');
kdDebug(29000) << " " << s << " |" <<
NOTIFIER( ((cap) & SANE_CAP_SOFT_SELECT)) <<
NOTIFIER( ((cap) & SANE_CAP_HARD_SELECT)) <<
@@ -892,7 +892,7 @@ void KScanDevice::prepareScan( void )
kdDebug(29000) << "----------------------------------+--------+--------+--------+--------+--------+--------+--------+" << endl;
KScanOption pso( SANE_NAME_PREVIEW );
- const QString q = pso.get();
+ const TQString q = pso.get();
kdDebug(29000) << "Preview-Switch is at the moment: " << q << endl;
@@ -903,7 +903,7 @@ void KScanDevice::prepareScan( void )
* depending on if a filename is given or not, the function tries to open
* the file using the Qt-Image-IO or really scans the image.
**/
-KScanStat KScanDevice::acquire( const QString& filename )
+KScanStat KScanDevice::acquire( const TQString& filename )
{
if( ! scanner_handle )
return KSCAN_ERR_NO_DEVICE;
@@ -944,10 +944,10 @@ KScanStat KScanDevice::acquire( const QString& filename )
else
{
/* a filename is in the parameter */
- QFileInfo file( filename );
+ TQFileInfo file( filename );
if( file.exists() )
{
- QImage i;
+ TQImage i;
ImgScanInfo info;
if( i.load( filename ))
{
@@ -964,7 +964,7 @@ KScanStat KScanDevice::acquire( const QString& filename )
/**
- * Creates a new QImage from the retrieved Image Options
+ * Creates a new TQImage from the retrieved Image Options
**/
KScanStat KScanDevice::createNewImage( SANE_Parameters *p )
{
@@ -978,7 +978,7 @@ KScanStat KScanDevice::createNewImage( SANE_Parameters *p )
if( p->depth == 1 ) // Lineart !!
{
- img = new QImage( p->pixels_per_line, p->lines, 8 );
+ img = new TQImage( p->pixels_per_line, p->lines, 8 );
if( img )
{
img->setNumColors( 2 );
@@ -992,7 +992,7 @@ KScanStat KScanDevice::createNewImage( SANE_Parameters *p )
if( p->format == SANE_FRAME_GRAY )
{
/* Grayscale */
- img = new QImage( p->pixels_per_line, p->lines, 8 );
+ img = new TQImage( p->pixels_per_line, p->lines, 8 );
if( img )
{
img->setNumColors( 256 );
@@ -1004,7 +1004,7 @@ KScanStat KScanDevice::createNewImage( SANE_Parameters *p )
else
{
/* true color image */
- img = new QImage( p->pixels_per_line, p->lines, 32 );
+ img = new TQImage( p->pixels_per_line, p->lines, 32 );
if( img )
img->setAlphaBuffer( false );
}
@@ -1104,9 +1104,9 @@ KScanStat KScanDevice::acquire_data( bool isPreview )
int fd = 0;
if( sane_get_select_fd( scanner_handle, &fd ) == SANE_STATUS_GOOD )
{
- sn = new QSocketNotifier( fd, QSocketNotifier::Read, this );
- QObject::connect( sn, SIGNAL(activated(int)),
- this, SLOT( doProcessABlock() ) );
+ sn = new TQSocketNotifier( fd, TQSocketNotifier::Read, this );
+ TQObject::connect( sn, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT( doProcessABlock() ) );
}
}
@@ -1147,7 +1147,7 @@ void KScanDevice::loadOptionSet( KScanOptSet *optSet )
}
// kdDebug(29000) << "Loading Option set: " << optSet->optSetName() << endl;
- QAsciiDictIterator<KScanOption> it(*optSet);
+ TQAsciiDictIterator<KScanOption> it(*optSet);
kdDebug(29000) << "Postinstalling " << optSet->count() << " options" << endl;
while( it.current() )
@@ -1161,7 +1161,7 @@ void KScanDevice::loadOptionSet( KScanOptSet *optSet )
if( so && so->active() && so->initialised())
{
- const QString qq = so->get();
+ const TQString qq = so->get();
kdDebug(29000) << "Post-Scan-apply <" << it.currentKey() << ">: " << qq << endl;
apply( so );
@@ -1240,7 +1240,7 @@ void KScanDevice::slScanFinished( KScanStat status )
/* This function calls at least sane_read and converts the read data from the scanner
* to the qimage.
* The function needs:
- * QImage img valid
+ * TQImage img valid
* the data-buffer set to a appropriate size
**/
@@ -1460,7 +1460,7 @@ void KScanDevice::doProcessABlock( void )
} /* end of fkt */
-void KScanDevice::slSaveScanConfigSet( const QString& setName, const QString& descr )
+void KScanDevice::slSaveScanConfigSet( const TQString& setName, const TQString& descr )
{
if( setName.isEmpty() || setName.isNull()) return;
@@ -1491,7 +1491,7 @@ void KScanDevice::getCurrentOptions( KScanOptSet *optSet )
dirtyList.removeRef( so->getName());
}
- QStrListIterator it( dirtyList );
+ TQStrListIterator it( dirtyList );
while( it.current())
{
KScanOption so( it.current() );
@@ -1500,9 +1500,9 @@ void KScanDevice::getCurrentOptions( KScanOptSet *optSet )
}
}
-QString KScanDevice::getConfig( const QString& key, const QString& def ) const
+TQString KScanDevice::getConfig( const TQString& key, const TQString& def ) const
{
- QString confFile = SCANNER_DB_FILE;
+ TQString confFile = SCANNER_DB_FILE;
KSimpleConfig scanConfig( confFile, true );
scanConfig.setGroup( shortScannerName() );
@@ -1510,10 +1510,10 @@ QString KScanDevice::getConfig( const QString& key, const QString& def ) const
return scanConfig.readEntry( key, def );
}
-void KScanDevice::slStoreConfig( const QString& key, const QString& val )
+void KScanDevice::slStoreConfig( const TQString& key, const TQString& val )
{
- QString confFile = SCANNER_DB_FILE;
- QString scannerName = shortScannerName();
+ TQString confFile = SCANNER_DB_FILE;
+ TQString scannerName = shortScannerName();
if( scannerName.isEmpty() || scannerName == UNDEF_SCANNERNAME )
{
@@ -1534,7 +1534,7 @@ void KScanDevice::slStoreConfig( const QString& key, const QString& val )
bool KScanDevice::scanner_initialised = false;
SANE_Handle KScanDevice::scanner_handle = 0L;
SANE_Device const **KScanDevice::dev_list = 0L;
-QAsciiDict<int> *KScanDevice::option_dic = 0L;
+TQAsciiDict<int> *KScanDevice::option_dic = 0L;
KScanOptSet *KScanDevice::gammaTables = 0L;
diff --git a/libkscan/kscandevice.h b/libkscan/kscandevice.h
index dd849566..f52af74d 100644
--- a/libkscan/kscandevice.h
+++ b/libkscan/kscandevice.h
@@ -20,12 +20,12 @@
#ifndef _KSCANDEV_H_
#define _KSCANDEV_H_
-#include <qwidget.h>
-#include <qasciidict.h>
-#include <qsize.h>
-#include <qobject.h>
-#include <qstrlist.h>
-#include <qsocketnotifier.h>
+#include <tqwidget.h>
+#include <tqasciidict.h>
+#include <tqsize.h>
+#include <tqobject.h>
+#include <tqstrlist.h>
+#include <tqsocketnotifier.h>
#include "kscanoption.h"
@@ -75,7 +75,7 @@ public:
*
*/
- KScanDevice( QObject *parent = 0 );
+ KScanDevice( TQObject *parent = 0 );
/**
* Destructor
@@ -89,22 +89,22 @@ public:
* @return the state of the operation
* @param backend: the name of the backend to open
*/
- KScanStat openDevice( const QCString& backend );
+ KScanStat openDevice( const TQCString& backend );
/**
* returns the names of all existing Scan Devices in the system.
* @param enable_net: allow net devices.
- * @return a QStrList of available Scanners in the system
+ * @return a TQStrList of available Scanners in the system
* @see KScanDevice
*/
- QStrList getDevices( ) const
+ TQStrList getDevices( ) const
{ return( scanner_avail ); }
/**
* returns the short, technical name of the currently attached backend.
* It is in the form 'umax:/dev/sg1'.
*/
- QCString shortScannerName() const { return scanner_name; }
+ TQCString shortScannerName() const { return scanner_name; }
/**
* returns a long, human readable name of the scanner, like
@@ -113,17 +113,17 @@ public:
* If the name of the backend is skipped, the selected backend is
* returned.
*
- * @param a QString with a backend string
- * @return a QString containing a human readable scanner name
+ * @param a TQString with a backend string
+ * @return a TQString containing a human readable scanner name
**/
- QString getScannerName( const QCString& name = 0 ) const;
+ TQString getScannerName( const TQCString& name = 0 ) const;
/*
* ========= Preview Functions ==========
*/
/**
- * QImage * acquirePreview( bool forceGray = 0, int dpi = 0 )
+ * TQImage * acquirePreview( bool forceGray = 0, int dpi = 0 )
*
* acquires a preview on the selected device. KScanDevice allocs
* memory for the qimage returned. This qimage remains valid
@@ -144,29 +144,29 @@ public:
* the Parameter image needs to point to a object qimage,
* which is filled by the SANE-Dev. After the function returns,
* the qimage is valid, if the returnvalue is OK.
- * @param QImage *image - Pointer to a reserved image
+ * @param TQImage *image - Pointer to a reserved image
* @return the state of the operation in KScanStat
*/
- KScanStat acquire( const QString& filename = QString::null );
+ KScanStat acquire( const TQString& filename = TQString::null );
/**
* returns the default filename of the preview image of this scanner.
* @return default filename
**/
- const QString previewFile();
+ const TQString previewFile();
/**
* loads the last saved previewed image on this device from the default file
* @return a bitmap as QImage
**/
- QImage loadPreviewImage();
+ TQImage loadPreviewImage();
/**
* saves current previewed image from this device to the default file
* @param image current preview image which should be saved
* @return true if the saving was sucessful
**/
- bool savePreviewImage( const QImage& image );
+ bool savePreviewImage( const TQImage& image );
/*
@@ -176,9 +176,9 @@ public:
/**
* returns all existing options of the selected device.
* @see openDevice
- * @return a QStrList with the names of all options
+ * @return a TQStrList with the names of all options
**/
- QStrList getAllOptions();
+ TQStrList getAllOptions();
/**
* returns the common options of the device. A frontend should
@@ -186,18 +186,18 @@ public:
* use.
* @see getAllOptions
* @see getAdvancedOptions
- * @return a QStrList with with names of the common options.
+ * @return a TQStrList with with names of the common options.
*/
- QStrList getCommonOptions();
+ TQStrList getCommonOptions();
/**
* returns a list of advanced scan options. A frontend should
* display these options in a special dialog.
* @see getAllOptions
* @see getCommonOptions
- * @return a QStrList with names of advanced scan options.
+ * @return a TQStrList with names of advanced scan options.
*/
- QStrList getAdvancedOptions();
+ TQStrList getAdvancedOptions();
/**
* retrieves a set of the current scan options and writes them
@@ -230,15 +230,15 @@ public:
* @param name: the name of a option from a returned option-List
* @return true, if the option exists
*/
- bool optionExists( const QCString& name );
+ bool optionExists( const TQCString& name );
/**
* checks if the backend knows the option with the required name under
* a different name, like some backends do. If it does, the known name
- * is returned, otherwise a null QCString.
+ * is returned, otherwise a null TQCString.
*/
- QCString aliasName( const QCString& name );
+ TQCString aliasName( const TQCString& name );
/**
* returns a Widget suitable for the selected Option and creates the
@@ -249,20 +249,20 @@ public:
* @param desc: pointer to the text appearing as widget text
* @param tooltip: tooltip text. If zero, the SANE text will be used.
**/
- KScanOption *getGuiElement( const QCString& name, QWidget *parent,
- const QString& desc = QString::null,
- const QString& tooltip = QString::null );
+ KScanOption *getGuiElement( const TQCString& name, TQWidget *parent,
+ const TQString& desc = TQString::null,
+ const TQString& tooltip = TQString::null );
/**
* returns the pointer to an already created Scanoption from the
* gui element list. Cares for option name aliases.
*/
- KScanOption *getExistingGuiElement( const QCString& name );
+ KScanOption *getExistingGuiElement( const TQCString& name );
/**
* sets an widget of the named option enabled/disabled
**/
- void guiSetEnabled( const QCString& name, bool state );
+ void guiSetEnabled( const TQCString& name, bool state );
/**
* returns the maximum scan size. This is interesting e.g. for the
@@ -270,17 +270,17 @@ public:
* The unit of the return value is millimeter, if the sane backend
* returns millimeter. (TODO)
**/
- QSize getMaxScanSize( void ) const;
+ TQSize getMaxScanSize( void ) const;
/**
* returns the information bit stored for the currently attached scanner
* identified by the key.
*/
- QString getConfig( const QString& key, const QString& def = QString() ) const;
+ TQString getConfig( const TQString& key, const TQString& def = TQString() ) const;
static bool scanner_initialised;
static SANE_Handle scanner_handle;
- static QAsciiDict<int>* option_dic;
+ static TQAsciiDict<int>* option_dic;
static SANE_Device const **dev_list;
static KScanOptSet *gammaTables;
@@ -317,10 +317,10 @@ public slots:
/**
* Save the current configuration parameter set. Only changed options are saved.
**/
- void slSaveScanConfigSet( const QString&, const QString& );
+ void slSaveScanConfigSet( const TQString&, const TQString& );
- void slSetDirty( const QCString& name );
+ void slSetDirty( const TQCString& name );
/**
* Closes the scan device and frees all related data, makes
@@ -334,7 +334,7 @@ public slots:
* is opened, a group is created that identifies the scanner and the
* device where it is connected. The information is stored into that group.
*/
- void slStoreConfig( const QString&, const QString& );
+ void slStoreConfig( const TQString&, const TQString& );
signals:
/**
@@ -355,13 +355,13 @@ signals:
* emitted if a new image was acquired. The image has to be
* copied in the signal handler.
*/
- void sigNewImage( QImage*, ImgScanInfo* );
+ void sigNewImage( TQImage*, ImgScanInfo* );
/**
* emitted if a new preview was acquired. The image has to be
* copied in the signal handler.
*/
- void sigNewPreview( QImage*, ImgScanInfo* );
+ void sigNewPreview( TQImage*, ImgScanInfo* );
/**
* emitted to tell the application the start of scanning. That is
@@ -422,28 +422,28 @@ private:
KScanStat createNewImage( SANE_Parameters *p );
// not implemented
-// QWidget *entryField( QWidget *parent, const QString& text,
-// const QString& tooltip );
+// QWidget *entryField( TQWidget *parent, const TQString& text,
+// const TQString& tooltip );
KScanStat find_options(); // help fct. to process options
KScanStat acquire_data( bool isPreview = false );
- QStrList scanner_avail; // list of names of all scan dev.
+ TQStrList scanner_avail; // list of names of all scan dev.
QStrList option_list; // list of names of all options
- QStrList dirtyList; // option changes
+ TQStrList dirtyList; // option changes
- inline QString optionNotifyString(int) const;
+ inline TQString optionNotifyString(int) const;
- QPtrList<KScanOption> gui_elements;
- QAsciiDict<SANE_Device> scannerDevices;
+ TQPtrList<KScanOption> gui_elements;
+ TQAsciiDict<SANE_Device> scannerDevices;
- QSocketNotifier *sn;
+ TQSocketNotifier *sn;
SCANSTATUS scanStatus;
/* Data for the scan process */
/* This could/should go to a small help object */
- QCString scanner_name;
+ TQCString scanner_name;
SANE_Byte *data;
- QImage *img;
+ TQImage *img;
SANE_Parameters sane_scan_param;
long overall_bytes;
int rest_bytes;
diff --git a/libkscan/kscanoption.cpp b/libkscan/kscanoption.cpp
index 1aae1602..2bf20d48 100644
--- a/libkscan/kscanoption.cpp
+++ b/libkscan/kscanoption.cpp
@@ -18,18 +18,18 @@
*/
#include <stdlib.h>
-#include <qwidget.h>
-#include <qobject.h>
-#include <qasciidict.h>
-#include <qcombobox.h>
-#include <qslider.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qimage.h>
-#include <qregexp.h>
+#include <tqwidget.h>
+#include <tqobject.h>
+#include <tqasciidict.h>
+#include <tqcombobox.h>
+#include <tqslider.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqimage.h>
+#include <tqregexp.h>
#include <kdebug.h>
@@ -51,7 +51,7 @@
/** inline-access to the option descriptor, object to changes with global vars. **/
-inline const SANE_Option_Descriptor *getOptionDesc( const QCString& name )
+inline const SANE_Option_Descriptor *getOptionDesc( const TQCString& name )
{
int *idx = (*KScanDevice::option_dic)[ name ];
@@ -77,8 +77,8 @@ inline const SANE_Option_Descriptor *getOptionDesc( const QCString& name )
/* ************************************************************************ */
/* KScan Option */
/* ************************************************************************ */
-KScanOption::KScanOption( const QCString& new_name ) :
- QObject()
+KScanOption::KScanOption( const TQCString& new_name ) :
+ TQObject()
{
if( initOption( new_name ) )
{
@@ -102,7 +102,7 @@ KScanOption::KScanOption( const QCString& new_name ) :
}
-bool KScanOption::initOption( const QCString& new_name )
+bool KScanOption::initOption( const TQCString& new_name )
{
desc = 0;
if( new_name.isEmpty() ) return( false );
@@ -160,7 +160,7 @@ bool KScanOption::initOption( const QCString& new_name )
}
KScanOption::KScanOption( const KScanOption &so ) :
- QObject()
+ TQObject()
{
/* desc is stored by sane-lib and may be copied */
desc = so.desc;
@@ -206,9 +206,9 @@ KScanOption::KScanOption( const KScanOption &so ) :
}
-const QString KScanOption::configLine( void )
+const TQString KScanOption::configLine( void )
{
- QCString strval = this->get();
+ TQCString strval = this->get();
kdDebug(29000) << "configLine returns <" << strval << ">" << endl;
return( strval );
}
@@ -253,9 +253,9 @@ const KScanOption& KScanOption::operator= (const KScanOption& so )
return( *this );
}
-void KScanOption::slWidgetChange( const QCString& t )
+void KScanOption::slWidgetChange( const TQCString& t )
{
- kdDebug(29000) << "Received WidgetChange for " << getName() << " (const QCString&)" << endl;
+ kdDebug(29000) << "Received WidgetChange for " << getName() << " (const TQCString&)" << endl;
set( t );
emit( guiChange( this ) );
// emit( optionChanged( this ));
@@ -267,7 +267,7 @@ void KScanOption::slWidgetChange( void )
/* If Type is bool, the widget is a checkbox. */
if( type() == BOOL )
{
- bool b = ((QCheckBox*) internal_widget)->isChecked();
+ bool b = ((TQCheckBox*) internal_widget)->isChecked();
kdDebug(29000) << "Setting bool: " << b << endl;
set( b );
}
@@ -292,9 +292,9 @@ void KScanOption::slRedrawWidget( KScanOption *so )
{
// qDebug( "Checking widget %s", (const char*) so->getName());
int help = 0;
- QString string;
+ TQString string;
- QWidget *w = so->widget();
+ TQWidget *w = so->widget();
if( so->valid() && w && so->getBuffer() )
{
@@ -302,7 +302,7 @@ void KScanOption::slRedrawWidget( KScanOption *so )
{
case BOOL:
if( so->get( &help ))
- ((QCheckBox*) w)->setChecked( (bool) help );
+ ((TQCheckBox*) w)->setChecked( (bool) help );
/* Widget Type is ToggleButton */
break;
case SINGLE_VAL:
@@ -317,7 +317,7 @@ void KScanOption::slRedrawWidget( KScanOption *so )
break;
case GAMMA_TABLE:
/* Widget Type is GammaTable */
- // w = new QSlider( parent, "AUTO_GAMMA" );
+ // w = new TQSlider( parent, "AUTO_GAMMA" );
break;
case STR_LIST:
// w = comboBox( parent, text );
@@ -519,7 +519,7 @@ bool KScanOption::set( int val )
bool ret = false;
int word_size = 0;
- QMemArray<SANE_Word> qa;
+ TQMemArray<SANE_Word> qa;
SANE_Word sw = SANE_TRUE;
const SANE_Word sw1 = val;
const SANE_Word sw2 = SANE_FIX( (double) val );
@@ -585,7 +585,7 @@ bool KScanOption::set( double val )
if( ! desc ) return( false );
bool ret = false;
int word_size = 0;
- QMemArray<SANE_Word> qa;
+ TQMemArray<SANE_Word> qa;
SANE_Word sw = SANE_FALSE;
switch( desc->type )
@@ -653,7 +653,7 @@ bool KScanOption::set( int *val, int size )
int offset = 0;
int word_size = desc->size / sizeof( SANE_Word ); /* add 1 in case offset is needed */
- QMemArray<SANE_Word> qa( 1+word_size );
+ TQMemArray<SANE_Word> qa( 1+word_size );
#if 0
if( desc->constraint_type == SANE_CONSTRAINT_WORD_LIST )
{
@@ -719,7 +719,7 @@ bool KScanOption::set( int *val, int size )
return( ret );
}
-bool KScanOption::set( const QCString& c_string )
+bool KScanOption::set( const TQCString& c_string )
{
bool ret = false;
int val = 0;
@@ -729,12 +729,12 @@ bool KScanOption::set( const QCString& c_string )
/* Check if it is a gammatable. If it is, convert to KGammaTable and call
* the approbiate set method.
*/
- QRegExp re( "\\d+, \\d+, \\d+" );
+ TQRegExp re( "\\d+, \\d+, \\d+" );
re.setMinimal(true);
- if( QString(c_string).contains( re ))
+ if( TQString(c_string).contains( re ))
{
- QStringList relist = QStringList::split( ", ", QString(c_string) );
+ TQStringList relist = TQStringList::split( ", ", TQString(c_string) );
int brig = (relist[0]).toInt();
int contr = (relist[1]).toInt();
@@ -810,7 +810,7 @@ bool KScanOption::set( KGammaTable *gt )
SANE_Word *run = gt->getTable();
int word_size = desc->size / sizeof( SANE_Word );
- QMemArray<SANE_Word> qa( word_size );
+ TQMemArray<SANE_Word> qa( word_size );
kdDebug(29000) << "KScanOption::set for Gammatable !" << endl;
switch( desc->type )
{
@@ -898,9 +898,9 @@ bool KScanOption::get( int *val ) const
-QCString KScanOption::get( void ) const
+TQCString KScanOption::get( void ) const
{
- QCString retstr;
+ TQCString retstr;
SANE_Word sane_word;
@@ -960,11 +960,11 @@ bool KScanOption::get( KGammaTable *gt ) const
}
-QStrList KScanOption::getList( ) const
+TQStrList KScanOption::getList( ) const
{
if( ! desc ) return( false );
const char **sstring = 0;
- QStrList strList;
+ TQStrList strList;
if( desc->constraint_type == SANE_CONSTRAINT_STRING_LIST ) {
sstring = (const char**) desc->constraint.string_list;
@@ -979,7 +979,7 @@ QStrList KScanOption::getList( ) const
if( desc->constraint_type == SANE_CONSTRAINT_WORD_LIST ) {
const SANE_Int *sint = desc->constraint.word_list;
int amount_vals = *sint; sint ++;
- QString s;
+ TQString s;
for( int i=0; i < amount_vals; i++ ) {
if( desc->type == SANE_TYPE_FIXED )
@@ -1059,24 +1059,24 @@ bool KScanOption::getRange( double *min, double *max, double *q ) const
return( ret );
}
-QWidget *KScanOption::createWidget( QWidget *parent, const QString& w_desc,
- const QString& tooltip )
+TQWidget *KScanOption::createWidget( TQWidget *parent, const TQString& w_desc,
+ const TQString& tooltip )
{
- QStrList list;
+ TQStrList list;
if( ! valid() )
{
kdDebug(29000) << "The option is not valid!" << endl;
return( 0 );
}
- QWidget *w = 0;
+ TQWidget *w = 0;
/* free the old widget */
delete internal_widget;
internal_widget = 0;
/* check for text */
- QString text = w_desc;
+ TQString text = w_desc;
if( text.isEmpty() && desc ) {
- text = QString::fromLocal8Bit( desc->title );
+ text = TQString::fromLocal8Bit( desc->title );
}
@@ -1084,9 +1084,9 @@ QWidget *KScanOption::createWidget( QWidget *parent, const QString& w_desc,
{
case BOOL:
/* Widget Type is ToggleButton */
- w = new QCheckBox( text, parent, "AUTO_TOGGLE_BUTTON" );
- connect( w, SIGNAL(clicked()), this,
- SLOT(slWidgetChange()));
+ w = new TQCheckBox( text, parent, "AUTO_TOGGLE_BUTTON" );
+ connect( w, TQT_SIGNAL(clicked()), this,
+ TQT_SLOT(slWidgetChange()));
break;
case SINGLE_VAL:
/* Widget Type is Entry-Field */
@@ -1120,14 +1120,14 @@ QWidget *KScanOption::createWidget( QWidget *parent, const QString& w_desc,
if( w )
{
internal_widget = w;
- connect( this, SIGNAL( optionChanged( KScanOption*)),
- SLOT( slRedrawWidget( KScanOption* )));
- QString tt = tooltip;
+ connect( this, TQT_SIGNAL( optionChanged( KScanOption*)),
+ TQT_SLOT( slRedrawWidget( KScanOption* )));
+ TQString tt = tooltip;
if( tt.isEmpty() && desc )
- tt = QString::fromLocal8Bit( desc->desc );
+ tt = TQString::fromLocal8Bit( desc->desc );
if( !tt.isEmpty() )
- QToolTip::add( internal_widget, tt );
+ TQToolTip::add( internal_widget, tt );
}
/* Check if option is active, setEnabled etc. */
@@ -1137,38 +1137,38 @@ QWidget *KScanOption::createWidget( QWidget *parent, const QString& w_desc,
}
-QWidget *KScanOption::comboBox( QWidget *parent, const QString& text )
+TQWidget *KScanOption::comboBox( TQWidget *parent, const TQString& text )
{
- QStrList list = getList();
+ TQStrList list = getList();
KScanCombo *cb = new KScanCombo( parent, text, list);
- connect( cb, SIGNAL( valueChanged( const QCString& )), this,
- SLOT( slWidgetChange( const QCString& )));
+ connect( cb, TQT_SIGNAL( valueChanged( const TQCString& )), this,
+ TQT_SLOT( slWidgetChange( const TQCString& )));
return( cb );
}
-QWidget *KScanOption::entryField( QWidget *parent, const QString& text )
+TQWidget *KScanOption::entryField( TQWidget *parent, const TQString& text )
{
KScanEntry *ent = new KScanEntry( parent, text );
- connect( ent, SIGNAL( valueChanged( QCString )), this,
- SLOT( slWidgetChange( QCString )));
+ connect( ent, TQT_SIGNAL( valueChanged( TQCString )), this,
+ TQT_SLOT( slWidgetChange( TQCString )));
return( ent );
}
-QWidget *KScanOption::KSaneSlider( QWidget *parent, const QString& text )
+TQWidget *KScanOption::KSaneSlider( TQWidget *parent, const TQString& text )
{
double min, max, quant;
getRange( &min, &max, &quant );
KScanSlider *slider = new KScanSlider( parent, text, min, max );
/* Connect to the options change Slot */
- connect( slider, SIGNAL( valueChanged(int)), this,
- SLOT( slWidgetChange(int)));
+ connect( slider, TQT_SIGNAL( valueChanged(int)), this,
+ TQT_SLOT( slWidgetChange(int)));
return( slider );
}
diff --git a/libkscan/kscanoption.h b/libkscan/kscanoption.h
index 616ece23..fc1e8a0a 100644
--- a/libkscan/kscanoption.h
+++ b/libkscan/kscanoption.h
@@ -20,12 +20,12 @@
#ifndef _KSCANOPTION_H_
#define _KSCANOPTION_H_
-#include <qwidget.h>
-#include <qdict.h>
-#include <qobject.h>
-#include <qstrlist.h>
-#include <qsocketnotifier.h>
-#include <qdatastream.h>
+#include <tqwidget.h>
+#include <tqdict.h>
+#include <tqobject.h>
+#include <tqstrlist.h>
+#include <tqsocketnotifier.h>
+#include <tqdatastream.h>
extern "C" {
#include <sane/sane.h>
@@ -67,7 +67,7 @@ public:
* option is valid and contains the correct value retrieved from the
* scanner.
**/
- KScanOption( const QCString& new_name );
+ KScanOption( const TQCString& new_name );
/**
* creates a KScanOption from another
@@ -122,7 +122,7 @@ public:
bool set( int val );
bool set( double val );
bool set( int *p_val, int size );
- bool set( const QCString& );
+ bool set( const TQCString& );
bool set( bool b ){ if( b ) return(set( (int)(1==1) )); else return( set( (int) (1==0) )); }
bool set( KGammaTable *gt );
@@ -131,7 +131,7 @@ public:
**/
bool get( int* ) const;
bool get( KGammaTable* ) const;
- QCString get( void ) const;
+ TQCString get( void ) const;
/**
* This function creates a widget for the scanner option depending
@@ -148,24 +148,24 @@ public:
*
**/
- QWidget *createWidget( QWidget *parent,
- const QString& w_desc = QString::null,
- const QString& tooltip = QString::null );
+ TQWidget *createWidget( TQWidget *parent,
+ const TQString& w_desc = TQString::null,
+ const TQString& tooltip = TQString::null );
/* Operators */
const KScanOption& operator= (const KScanOption& so );
- const QString configLine( void );
+ const TQString configLine( void );
// Possible Values
- QStrList getList() const;
+ TQStrList getList() const;
bool getRangeFromList( double*, double*, double* ) const;
bool getRange( double*, double*, double* ) const;
- QCString getName() const { return( name ); }
+ TQCString getName() const { return( name ); }
void * getBuffer() const { return( buffer ); }
- QWidget *widget( ) const { return( internal_widget ); }
+ TQWidget *widget( ) const { return( internal_widget ); }
/**
* returns the type of the selected option.
* This might be SINGLE_VAL, VAL_LIST, STR_LIST, GAMMA_TABLE,
@@ -185,7 +185,7 @@ public:
### not implemented at all?
**/
- KSANE_Type typeToSet( const QCString& name );
+ KSANE_Type typeToSet( const TQCString& name );
/**
* returns a string describing the unit of given the option.
@@ -194,7 +194,7 @@ public:
### not implemented at all?
**/
- QString unitOf( const QCString& name );
+ TQString unitOf( const TQCString& name );
public slots:
void slRedrawWidget( KScanOption *so );
@@ -210,7 +210,7 @@ protected slots:
* This is an internal slot.
**/
void slWidgetChange( void );
- void slWidgetChange( const QCString& );
+ void slWidgetChange( const TQCString& );
void slWidgetChange( int );
signals:
@@ -234,17 +234,17 @@ protected slots:
private:
bool applyVal( void );
- bool initOption( const QCString& new_name );
+ bool initOption( const TQCString& new_name );
void *allocBuffer( long );
- QWidget *entryField ( QWidget *parent, const QString& text );
- QWidget *KSaneSlider( QWidget *parent, const QString& text );
- QWidget *comboBox ( QWidget *parent, const QString& text );
+ TQWidget *entryField ( TQWidget *parent, const TQString& text );
+ TQWidget *KSaneSlider( TQWidget *parent, const TQString& text );
+ TQWidget *comboBox ( TQWidget *parent, const TQString& text );
const SANE_Option_Descriptor *desc;
- QCString name;
+ TQCString name;
void *buffer;
- QWidget *internal_widget;
+ TQWidget *internal_widget;
bool buffer_untouched;
size_t buffer_size;
diff --git a/libkscan/kscanoptset.cpp b/libkscan/kscanoptset.cpp
index ac30ae40..eac44987 100644
--- a/libkscan/kscanoptset.cpp
+++ b/libkscan/kscanoptset.cpp
@@ -17,10 +17,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qasciidict.h>
-#include <qmap.h>
-#include <qdict.h>
+#include <tqstring.h>
+#include <tqasciidict.h>
+#include <tqmap.h>
+#include <tqdict.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -28,7 +28,7 @@
#include "kscanoption.h"
#include "kscanoptset.h"
-KScanOptSet::KScanOptSet( const QCString& setName )
+KScanOptSet::KScanOptSet( const TQCString& setName )
{
name = setName;
@@ -49,7 +49,7 @@ KScanOptSet::~KScanOptSet()
-KScanOption *KScanOptSet::get( const QCString name ) const
+KScanOption *KScanOptSet::get( const TQCString name ) const
{
KScanOption *ret = 0;
@@ -58,10 +58,10 @@ KScanOption *KScanOptSet::get( const QCString name ) const
return( ret );
}
-QCString KScanOptSet::getValue( const QCString name ) const
+TQCString KScanOptSet::getValue( const TQCString name ) const
{
KScanOption *re = get( name );
- QCString retStr = "";
+ TQCString retStr = "";
if( re )
{
@@ -80,7 +80,7 @@ bool KScanOptSet::backupOption( const KScanOption& opt )
bool retval = true;
/** Allocate a new option and store it **/
- const QCString& optName = opt.getName();
+ const TQCString& optName = opt.getName();
if( !optName )
retval = false;
@@ -96,7 +96,7 @@ bool KScanOptSet::backupOption( const KScanOption& opt )
}
else
{
- const QCString& qq = opt.get();
+ const TQCString& qq = opt.get();
kdDebug(29000) << "Value is now: <" << qq << ">" << endl;
const KScanOption *newopt = new KScanOption( opt );
@@ -115,19 +115,19 @@ bool KScanOptSet::backupOption( const KScanOption& opt )
}
-QString KScanOptSet::getDescription() const
+TQString KScanOptSet::getDescription() const
{
return description;
}
-void KScanOptSet::slSetDescription( const QString& str )
+void KScanOptSet::slSetDescription( const TQString& str )
{
description = str;
}
-void KScanOptSet::backupOptionDict( const QAsciiDict<KScanOption>& optDict )
+void KScanOptSet::backupOptionDict( const TQAsciiDict<KScanOption>& optDict )
{
- QAsciiDictIterator<KScanOption> it( optDict );
+ TQAsciiDictIterator<KScanOption> it( optDict );
while ( it.current() )
{
@@ -140,14 +140,14 @@ void KScanOptSet::backupOptionDict( const QAsciiDict<KScanOption>& optDict )
}
/* */
-void KScanOptSet::saveConfig( const QString& scannerName, const QString& configName,
- const QString& descr )
+void KScanOptSet::saveConfig( const TQString& scannerName, const TQString& configName,
+ const TQString& descr )
{
- QString confFile = SCANNER_DB_FILE;
+ TQString confFile = SCANNER_DB_FILE;
kdDebug( 29000) << "Creating scan configuration file <" << confFile << ">" << endl;
KConfig *scanConfig = new KConfig( confFile );
- QString cfgName = configName;
+ TQString cfgName = configName;
if( configName.isNull() || configName.isEmpty() )
cfgName = "default";
@@ -156,12 +156,12 @@ void KScanOptSet::saveConfig( const QString& scannerName, const QString& configN
scanConfig->writeEntry( "description", descr );
scanConfig->writeEntry( "scannerName", scannerName );
- QAsciiDictIterator<KScanOption> it( *this);
+ TQAsciiDictIterator<KScanOption> it( *this);
while ( it.current() )
{
- const QString line = it.current() -> configLine();
- const QString name = it.current()->getName();
+ const TQString line = it.current() -> configLine();
+ const TQString name = it.current()->getName();
kdDebug(29000) << "writing " << name << " = <" << line << ">" << endl;
@@ -174,14 +174,14 @@ void KScanOptSet::saveConfig( const QString& scannerName, const QString& configN
delete( scanConfig );
}
-bool KScanOptSet::load( const QString& /*scannerName*/ )
+bool KScanOptSet::load( const TQString& /*scannerName*/ )
{
- QString confFile = SCANNER_DB_FILE;
+ TQString confFile = SCANNER_DB_FILE;
kdDebug( 29000) << "** Reading from scan configuration file <" << confFile << ">" << endl;
bool ret = true;
KConfig *scanConfig = new KConfig( confFile, true );
- QString cfgName = name; /* of the KScanOptSet, given in constructor */
+ TQString cfgName = name; /* of the KScanOptSet, given in constructor */
if( cfgName.isNull() || cfgName.isEmpty() )
cfgName = "default";
@@ -195,17 +195,17 @@ bool KScanOptSet::load( const QString& /*scannerName*/ )
{
scanConfig->setGroup( name );
- typedef QMap<QString, QString> StringMap;
+ typedef TQMap<TQString, TQString> StringMap;
StringMap strMap = scanConfig->entryMap( name );
StringMap::Iterator it;
for( it = strMap.begin(); it != strMap.end(); ++it )
{
- QCString optName = it.key().latin1();
+ TQCString optName = it.key().latin1();
KScanOption optset( optName );
- QCString val = it.data().latin1();
+ TQCString val = it.data().latin1();
kdDebug(29000) << "Reading for " << optName << " value " << val << endl;
optset.set( val );
diff --git a/libkscan/kscanoptset.h b/libkscan/kscanoptset.h
index 042dbe86..24cd4f8e 100644
--- a/libkscan/kscanoptset.h
+++ b/libkscan/kscanoptset.h
@@ -20,10 +20,10 @@
#ifndef KSCANOPTSET_H
#define KSCANOPTSET_H
-#include <qobject.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qasciidict.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqasciidict.h>
#include "kscanoption.h"
@@ -33,7 +33,7 @@
* about single scanner dependant options. It allows you to store a bunch
* of options and accessing them via a iterator.
*
- * The class which is inherited from QAsciiDict does no deep copy of the options
+ * The class which is inherited from TQAsciiDict does no deep copy of the options
* to store by with the standard method insert.
* @see backupOption to get a deep copy.
*
@@ -46,7 +46,7 @@
-class KScanOptSet: public QAsciiDict<KScanOption>
+class KScanOptSet: public TQAsciiDict<KScanOption>
{
public:
@@ -54,12 +54,12 @@ public:
* Constructor to create a new Container. Takes a string as a name, which
* has no special meaning yet ;)
*/
- KScanOptSet( const QCString& );
+ KScanOptSet( const TQCString& );
~KScanOptSet();
/**
* function to store a deep copy of an option. Note that this class is inherited
- * from QAsciiDict and thus does no deep copies. This method does.
+ * from TQAsciiDict and thus does no deep copies. This method does.
* @see insert
*/
bool backupOption( const KScanOption& );
@@ -67,10 +67,10 @@ public:
/**
* returns a pointer to a stored option given by name.
*/
- KScanOption *get( const QCString name ) const;
- QCString getValue( const QCString name ) const;
+ KScanOption *get( const TQCString name ) const;
+ TQCString getValue( const TQCString name ) const;
- void backupOptionDict( const QAsciiDict<KScanOption>& );
+ void backupOptionDict( const TQAsciiDict<KScanOption>& );
/**
* saves a configuration set to the configuration file 'ScanSettings'
@@ -82,7 +82,7 @@ public:
* @param configName: The name of the config, e.g. Black and White
* @param descr : A description for the config.
*/
- void saveConfig( const QString&, const QString&, const QString&);
+ void saveConfig( const TQString&, const TQString&, const TQString&);
/**
* allows to load a configuration. Simple create a optionSet with the
@@ -90,24 +90,24 @@ public:
* load for the scanner you want.
* @param scannerName: A scanner's name
*/
- bool load( const QString& scannerName );
+ bool load( const TQString& scannerName );
- QString getDescription() const;
+ TQString getDescription() const;
public slots:
- void slSetDescription( const QString& );
+ void slSetDescription( const TQString& );
private:
- QCString name;
+ TQCString name;
/* List to collect objects for which memory was allocated and must be freed */
- QPtrList<KScanOption> strayCatsList;
+ TQPtrList<KScanOption> strayCatsList;
class KScanOptSetPrivate;
KScanOptSetPrivate *d;
- QString description;
+ TQString description;
};
#endif // KScanOptSet
diff --git a/libkscan/kscanslider.cpp b/libkscan/kscanslider.cpp
index 3bf50395..e79634bd 100644
--- a/libkscan/kscanslider.cpp
+++ b/libkscan/kscanslider.cpp
@@ -17,49 +17,49 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qtooltip.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qslider.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqtooltip.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqslider.h>
+#include <tqlineedit.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kdebug.h>
#include "kscanslider.h"
-KScanSlider::KScanSlider( QWidget *parent, const QString& text,
+KScanSlider::KScanSlider( TQWidget *parent, const TQString& text,
double min, double max, bool haveStdButt,
int stdValue )
- : QFrame( parent ),
+ : TQFrame( parent ),
m_stdValue( stdValue ),
m_stdButt(0)
{
- QHBoxLayout *hb = new QHBoxLayout( this );
- l1 = new QLabel( text, this, "AUTO_SLIDER_LABEL" );
+ TQHBoxLayout *hb = new TQHBoxLayout( this );
+ l1 = new TQLabel( text, this, "AUTO_SLIDER_LABEL" );
hb->addWidget( l1,20 );
if( haveStdButt )
{
KIconLoader *loader = KGlobal::iconLoader();
- m_stdButt = new QPushButton( this );
+ m_stdButt = new TQPushButton( this );
m_stdButt->setPixmap( loader->loadIcon( "undo",KIcon::Small ));
/* connect the button click to setting the value */
- connect( m_stdButt, SIGNAL(clicked()),
- this, SLOT(slRevertValue()));
+ connect( m_stdButt, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slRevertValue()));
- QToolTip::add( m_stdButt,
+ TQToolTip::add( m_stdButt,
i18n( "Revert value back to its standard value %1" ).arg( stdValue ));
hb->addWidget( m_stdButt, 0 );
hb->addSpacing( 4 );
}
- slider = new QSlider( (int) min, (int)max, 1, (int)min, QSlider::Horizontal, this, "AUTO_SLIDER_" );
- slider->setTickmarks( QSlider::Below );
+ slider = new TQSlider( (int) min, (int)max, 1, (int)min, TQSlider::Horizontal, this, "AUTO_SLIDER_" );
+ slider->setTickmarks( TQSlider::Below );
slider->setTickInterval( int(QMAX( (max-min)/10, 1 )) );
slider->setSteps( int(QMAX( (max-min)/20, 1) ), int(QMAX( (max-min)/10, 1) ) );
slider->setMinimumWidth( 140 );
@@ -67,17 +67,17 @@ KScanSlider::KScanSlider( QWidget *parent, const QString& text,
l1->setBuddy( slider );
/* create a spinbox for displaying the values */
- m_spin = new QSpinBox( (int) min, (int) max,
+ m_spin = new TQSpinBox( (int) min, (int) max,
1, // step
this );
/* make spin box changes change the slider */
- connect( m_spin, SIGNAL(valueChanged(int)), this, SLOT(slSliderChange(int)));
+ connect( m_spin, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slSliderChange(int)));
/* Handle internal number display */
- // connect(slider, SIGNAL(valueChanged(int)), numdisp, SLOT( setNum(int) ));
- connect(slider, SIGNAL(valueChanged(int)), this, SLOT( slSliderChange(int) ));
+ // connect(slider, TQT_SIGNAL(valueChanged(int)), numdisp, TQT_SLOT( setNum(int) ));
+ connect(slider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT( slSliderChange(int) ));
/* set Value 0 to the widget */
slider->setValue( (int) min -1 );
@@ -149,28 +149,28 @@ KScanSlider::~KScanSlider()
/* ====================================================================== */
-KScanEntry::KScanEntry( QWidget *parent, const QString& text )
- : QFrame( parent )
+KScanEntry::KScanEntry( TQWidget *parent, const TQString& text )
+ : TQFrame( parent )
{
- QHBoxLayout *hb = new QHBoxLayout( this );
+ TQHBoxLayout *hb = new TQHBoxLayout( this );
- QLabel *l1 = new QLabel( text, this, "AUTO_ENTRYFIELD" );
+ TQLabel *l1 = new TQLabel( text, this, "AUTO_ENTRYFIELD" );
hb->addWidget( l1,1 );
- entry = new QLineEdit( this, "AUTO_ENTRYFIELD_E" );
+ entry = new TQLineEdit( this, "AUTO_ENTRYFIELD_E" );
l1->setBuddy( entry );
- connect( entry, SIGNAL( textChanged(const QString& )),
- this, SLOT( slEntryChange(const QString&)));
- connect( entry, SIGNAL( returnPressed()),
- this, SLOT( slReturnPressed()));
+ connect( entry, TQT_SIGNAL( textChanged(const TQString& )),
+ this, TQT_SLOT( slEntryChange(const TQString&)));
+ connect( entry, TQT_SIGNAL( returnPressed()),
+ this, TQT_SLOT( slReturnPressed()));
hb->addWidget( entry,3 );
hb->activate();
}
-QString KScanEntry::text( void ) const
+TQString KScanEntry::text( void ) const
{
- QString str = QString::null;
+ TQString str = TQString::null;
// kdDebug(29000) << "entry is "<< entry << endl;
if(entry)
{
@@ -191,7 +191,7 @@ QString KScanEntry::text( void ) const
return ( str );
}
-void KScanEntry::slSetEntry( const QString& t )
+void KScanEntry::slSetEntry( const TQString& t )
{
if( t == entry->text() )
return;
@@ -200,22 +200,22 @@ void KScanEntry::slSetEntry( const QString& t )
entry->setText( t );
}
-void KScanEntry::slEntryChange( const QString& t )
+void KScanEntry::slEntryChange( const TQString& t )
{
- emit valueChanged( QCString( t.latin1() ) );
+ emit valueChanged( TQCString( t.latin1() ) );
}
void KScanEntry::slReturnPressed( void )
{
- QString t = text();
- emit returnPressed( QCString( t.latin1()));
+ TQString t = text();
+ emit returnPressed( TQCString( t.latin1()));
}
-KScanCombo::KScanCombo( QWidget *parent, const QString& text,
- const QStrList& list )
- : QHBox( parent ),
+KScanCombo::KScanCombo( TQWidget *parent, const TQString& text,
+ const TQStrList& list )
+ : TQHBox( parent ),
combo(0)
{
createCombo( text );
@@ -224,40 +224,40 @@ KScanCombo::KScanCombo( QWidget *parent, const QString& text,
combolist = list;
}
-KScanCombo::KScanCombo( QWidget *parent, const QString& text,
- const QStringList& list )
- : QHBox( parent ),
+KScanCombo::KScanCombo( TQWidget *parent, const TQString& text,
+ const TQStringList& list )
+ : TQHBox( parent ),
combo(0)
{
createCombo( text );
if( combo )
combo->insertStringList( list );
- for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) {
+ for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) {
combolist.append( (*it).local8Bit() );
}
}
-void KScanCombo::createCombo( const QString& text )
+void KScanCombo::createCombo( const TQString& text )
{
setSpacing( 12 );
setMargin( 2 );
- (void) new QLabel( text, this, "AUTO_COMBOLABEL" );
+ (void) new TQLabel( text, this, "AUTO_COMBOLABEL" );
- combo = new QComboBox( this, "AUTO_COMBO" );
+ combo = new TQComboBox( this, "AUTO_COMBO" );
- connect( combo, SIGNAL(activated( const QString &)), this,
- SLOT( slComboChange( const QString &)));
- connect( combo, SIGNAL(activated( int )),
- this, SLOT(slFireActivated(int)));
+ connect( combo, TQT_SIGNAL(activated( const TQString &)), this,
+ TQT_SLOT( slComboChange( const TQString &)));
+ connect( combo, TQT_SIGNAL(activated( int )),
+ this, TQT_SLOT(slFireActivated(int)));
}
-void KScanCombo::slSetEntry( const QString &t )
+void KScanCombo::slSetEntry( const TQString &t )
{
if( t.isNull() ) return;
int i = combolist.find( t.local8Bit() );
@@ -272,13 +272,13 @@ void KScanCombo::slSetEntry( const QString &t )
kdDebug(29000) << "Combo item not in list !" << endl;
}
-void KScanCombo::slComboChange( const QString &t )
+void KScanCombo::slComboChange( const TQString &t )
{
- emit valueChanged( QCString( t.latin1() ) );
+ emit valueChanged( TQCString( t.latin1() ) );
kdDebug(29000) << "Combo: valueChanged emitted!" << endl;
}
-void KScanCombo::slSetIcon( const QPixmap& pix, const QString& str)
+void KScanCombo::slSetIcon( const TQPixmap& pix, const TQString& str)
{
for( int i=0; i < combo->count(); i++ )
{
@@ -290,13 +290,13 @@ void KScanCombo::slSetIcon( const QPixmap& pix, const QString& str)
}
}
-QString KScanCombo::currentText( void ) const
+TQString KScanCombo::currentText( void ) const
{
return( combo->currentText() );
}
-QString KScanCombo::text( int i ) const
+TQString KScanCombo::text( int i ) const
{
return( combo->text(i) );
}
diff --git a/libkscan/kscanslider.h b/libkscan/kscanslider.h
index 7502ecad..9d95bd7c 100644
--- a/libkscan/kscanslider.h
+++ b/libkscan/kscanslider.h
@@ -20,19 +20,19 @@
#ifndef KSCANSLIDER_H
#define KSCANSLIDER_H
-#include <qframe.h>
-#include <qstrlist.h>
-#include <qhbox.h>
-#include <qcombobox.h>
-#include <qslider.h>
-#include <qlineedit.h>
+#include <tqframe.h>
+#include <tqstrlist.h>
+#include <tqhbox.h>
+#include <tqcombobox.h>
+#include <tqslider.h>
+#include <tqlineedit.h>
/**
*@author Klaas Freitag
*/
-class QPushButton;
-class QSpinBox;
-class QLabel;
+class TQPushButton;
+class TQSpinBox;
+class TQLabel;
/**
* a kind of extended slider which has a spinbox beside the slider offering
@@ -60,7 +60,7 @@ public:
* appears on the left of the slider.
* @param stdValue the value to which the standard button resets the slider.
*/
- KScanSlider( QWidget *parent, const QString& text,
+ KScanSlider( TQWidget *parent, const TQString& text,
double min, double max, bool haveStdButt=false,
int stdValue=0);
/**
@@ -103,9 +103,9 @@ private slots:
private:
QSlider *slider;
QLabel *l1, *numdisp;
- QSpinBox *m_spin;
+ TQSpinBox *m_spin;
int m_stdValue;
- QPushButton *m_stdButt;
+ TQPushButton *m_stdButt;
class KScanSliderPrivate;
KScanSliderPrivate *d;
@@ -117,7 +117,7 @@ private:
class KScanEntry : public QFrame
{
Q_OBJECT
- Q_PROPERTY( QString text READ text WRITE slSetEntry )
+ Q_PROPERTY( TQString text READ text WRITE slSetEntry )
public:
/**
@@ -125,20 +125,20 @@ public:
* @param parent the parent widget
* @text the prefix text
*/
- KScanEntry( QWidget *parent, const QString& text );
+ KScanEntry( TQWidget *parent, const TQString& text );
// ~KScanEntry();
/**
* @return the current entry field contents.
*/
- QString text( ) const;
+ TQString text( ) const;
public slots:
/**
* set the current text
* @param t the new string
*/
- void slSetEntry( const QString& t );
+ void slSetEntry( const TQString& t );
/**
* enable or disable the text entry.
* @param b set enabled if true, else disabled.
@@ -149,14 +149,14 @@ protected slots:
void slReturnPressed( void );
signals:
- void valueChanged( const QCString& );
- void returnPressed( const QCString& );
+ void valueChanged( const TQCString& );
+ void returnPressed( const TQCString& );
private slots:
- void slEntryChange( const QString& );
+ void slEntryChange( const TQString& );
private:
- QLineEdit *entry;
+ TQLineEdit *entry;
class KScanEntryPrivate;
KScanEntryPrivate *d;
@@ -170,7 +170,7 @@ private:
class KScanCombo : public QHBox
{
Q_OBJECT
- Q_PROPERTY( QString cbEntry READ currentText WRITE slSetEntry )
+ Q_PROPERTY( TQString cbEntry READ currentText WRITE slSetEntry )
public:
/**
@@ -180,19 +180,19 @@ public:
* @param text the text the combobox is prepended by
* @param list a stringlist with values the list should contain.
*/
- KScanCombo( QWidget *parent, const QString& text, const QStrList& list );
- KScanCombo( QWidget *parent, const QString& text, const QStringList& list );
+ KScanCombo( TQWidget *parent, const TQString& text, const TQStrList& list );
+ KScanCombo( TQWidget *parent, const TQString& text, const TQStringList& list );
// ~KScanCombo();
/**
* @return the current selected text
*/
- QString currentText( ) const;
+ TQString currentText( ) const;
/**
* @return the text a position i
*/
- QString text( int i ) const;
+ TQString text( int i ) const;
/**
* @return the amount of list entries.
@@ -204,7 +204,7 @@ public slots:
* set the current entry to the given string if it is member of the list.
* if not, the entry is not changed.
*/
- void slSetEntry( const QString &);
+ void slSetEntry( const TQString &);
/**
* enable or disable the combobox.
@@ -217,7 +217,7 @@ public slots:
* @param pix the pixmap to set.
* @param str the string for which the pixmap should be set.
*/
- void slSetIcon( const QPixmap& pix, const QString& str);
+ void slSetIcon( const TQPixmap& pix, const TQString& str);
/**
* set the current item of the combobox.
@@ -226,14 +226,14 @@ public slots:
private slots:
void slFireActivated( int);
- void slComboChange( const QString & );
+ void slComboChange( const TQString & );
signals:
- void valueChanged( const QCString& );
+ void valueChanged( const TQCString& );
void activated(int);
private:
- void createCombo( const QString& text );
+ void createCombo( const TQString& text );
QComboBox *combo;
QStrList combolist;
diff --git a/libkscan/massscandialog.cpp b/libkscan/massscandialog.cpp
index c86cd4e5..9d4a5f91 100644
--- a/libkscan/massscandialog.cpp
+++ b/libkscan/massscandialog.cpp
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qprogressbar.h>
-#include <qgroupbox.h>
-#include <qframe.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqprogressbar.h>
+#include <tqgroupbox.h>
+#include <tqframe.h>
#include <klocale.h>
#include <kdebug.h>
@@ -30,67 +30,67 @@
#include "massscandialog.h"
-MassScanDialog::MassScanDialog( QWidget *parent )
- :QDialog( parent, "MASS_SCAN", true )
+MassScanDialog::MassScanDialog( TQWidget *parent )
+ :TQDialog( parent, "MASS_SCAN", true )
{
setCaption( i18n( "ADF Scanning" ));
kdDebug(29000) << "Starting MassScanDialog!" << endl;
// Layout-Boxes
- QVBoxLayout *bigdad = new QVBoxLayout( this, 5 );
- // QHBoxLayout *hl1= new QHBoxLayout( ); // Caption
- QHBoxLayout *l_but = new QHBoxLayout( 10 ); // Buttons
+ TQVBoxLayout *bigdad = new TQVBoxLayout( this, 5 );
+ // TQHBoxLayout *hl1= new TQHBoxLayout( ); // Caption
+ TQHBoxLayout *l_but = new TQHBoxLayout( 10 ); // Buttons
/* Caption */
- QLabel *l1 = new QLabel( i18n( "<B>Mass Scanning</B>" ), this);
+ TQLabel *l1 = new TQLabel( i18n( "<B>Mass Scanning</B>" ), this);
bigdad->addWidget( l1, 1);
/* Scan parameter information */
- QGroupBox *f1 = new QGroupBox( i18n("Scan Parameter"), this );
- f1->setFrameStyle( QFrame::Box | QFrame::Sunken );
+ TQGroupBox *f1 = new TQGroupBox( i18n("Scan Parameter"), this );
+ f1->setFrameStyle( TQFrame::Box | TQFrame::Sunken );
f1->setMargin(5);
f1->setLineWidth( 1 );
- QVBoxLayout *l_main = new QVBoxLayout( f1, f1->frameWidth()+3, 3 );
+ TQVBoxLayout *l_main = new TQVBoxLayout( f1, f1->frameWidth()+3, 3 );
bigdad->addWidget( f1, 6 );
scanopts = i18n("Scanning <B>%s</B> with <B>%d</B> dpi");
- l_scanopts = new QLabel( scanopts, f1 );
+ l_scanopts = new TQLabel( scanopts, f1 );
l_main->addWidget( l_scanopts );
tofolder = i18n("Storing new images in folder <B>%s</B>");
- l_tofolder = new QLabel( tofolder, f1 );
+ l_tofolder = new TQLabel( tofolder, f1 );
l_main->addWidget( l_tofolder );
/* Scan Progress information */
- QGroupBox *f2 = new QGroupBox( i18n("Scan Progress"), this );
- f2->setFrameStyle( QFrame::Box | QFrame::Sunken );
+ TQGroupBox *f2 = new TQGroupBox( i18n("Scan Progress"), this );
+ f2->setFrameStyle( TQFrame::Box | TQFrame::Sunken );
f2->setMargin(15);
f2->setLineWidth( 1 );
- QVBoxLayout *l_pro = new QVBoxLayout( f2, f2->frameWidth()+3, 3 );
+ TQVBoxLayout *l_pro = new TQVBoxLayout( f2, f2->frameWidth()+3, 3 );
bigdad->addWidget( f2, 6 );
- QHBoxLayout *l_scanp = new QHBoxLayout( );
+ TQHBoxLayout *l_scanp = new TQHBoxLayout( );
l_pro->addLayout( l_scanp, 5 );
progress = i18n("Scanning page %1");
- l_progress = new QLabel( progress, f2 );
+ l_progress = new TQLabel( progress, f2 );
l_scanp->addWidget( l_progress, 3 );
l_scanp->addStretch( 1 );
- QPushButton *pb_cancel_scan = new QPushButton( i18n("Cancel Scan"), f2);
+ TQPushButton *pb_cancel_scan = new TQPushButton( i18n("Cancel Scan"), f2);
l_scanp->addWidget( pb_cancel_scan,3 );
- progressbar = new QProgressBar( 1000, f2 );
+ progressbar = new TQProgressBar( 1000, f2 );
l_pro->addWidget( progressbar, 3 );
/* Buttons to start scanning and close the Window */
bigdad->addLayout( l_but );
- QPushButton *b_start = new QPushButton( i18n("Start Scan"), this, "ButtOK" );
- connect( b_start, SIGNAL(clicked()), this, SLOT( slStartScan()) );
+ TQPushButton *b_start = new TQPushButton( i18n("Start Scan"), this, "ButtOK" );
+ connect( b_start, TQT_SIGNAL(clicked()), this, TQT_SLOT( slStartScan()) );
- QPushButton *b_cancel = new QPushButton( i18n("Stop"), this, "ButtCancel" );
- connect( b_cancel, SIGNAL(clicked()), this, SLOT(slStopScan()) );
+ TQPushButton *b_cancel = new TQPushButton( i18n("Stop"), this, "ButtCancel" );
+ connect( b_cancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(slStopScan()) );
- QPushButton *b_finish = new KPushButton( KStdGuiItem::close(), this, "ButtFinish" );
- connect( b_finish, SIGNAL(clicked()), this, SLOT(slFinished()) );
+ TQPushButton *b_finish = new KPushButton( KStdGuiItem::close(), this, "ButtFinish" );
+ connect( b_finish, TQT_SIGNAL(clicked()), this, TQT_SLOT(slFinished()) );
l_but->addWidget( b_start );
l_but->addWidget( b_cancel );
diff --git a/libkscan/massscandialog.h b/libkscan/massscandialog.h
index 6e57b098..dc1120b5 100644
--- a/libkscan/massscandialog.h
+++ b/libkscan/massscandialog.h
@@ -20,11 +20,11 @@
#ifndef MASSSCANDIALOG_H
#define MASSSCANDIALOG_H
-#include <qstring.h>
-#include <qdialog.h>
+#include <tqstring.h>
+#include <tqdialog.h>
-class QProgressBar;
-class QLabel;
+class TQProgressBar;
+class TQLabel;
/**
*@author Klaas Freitag
@@ -34,7 +34,7 @@ class MassScanDialog : public QDialog
{
Q_OBJECT
public:
- MassScanDialog( QWidget *parent);
+ MassScanDialog( TQWidget *parent);
~MassScanDialog();
public slots:
@@ -49,16 +49,16 @@ public slots:
}
private:
- QString scanopts;
- QLabel *l_scanopts;
+ TQString scanopts;
+ TQLabel *l_scanopts;
- QString tofolder;
- QLabel *l_tofolder;
+ TQString tofolder;
+ TQLabel *l_tofolder;
- QString progress;
- QLabel *l_progress;
+ TQString progress;
+ TQLabel *l_progress;
- QProgressBar *progressbar;
+ TQProgressBar *progressbar;
class MassScanDialogPrivate;
MassScanDialogPrivate *d;
diff --git a/libkscan/previewer.cpp b/libkscan/previewer.cpp
index f4133ee9..ec1f9065 100644
--- a/libkscan/previewer.cpp
+++ b/libkscan/previewer.cpp
@@ -18,17 +18,17 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qfontmetrics.h>
-#include <qhbox.h>
-#include <qtooltip.h>
-#include <qpopupmenu.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qcombobox.h>
-#include <qradiobutton.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqfontmetrics.h>
+#include <tqhbox.h>
+#include <tqtooltip.h>
+#include <tqpopupmenu.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqcombobox.h>
+#include <tqradiobutton.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <klocale.h>
@@ -41,13 +41,13 @@
#include "sizeindicator.h"
#include "devselector.h" /* for definition of config key :( */
#include "kscandevice.h"
-#include <qslider.h>
-#include <qcheckbox.h>
+#include <tqslider.h>
+#include <tqcheckbox.h>
#include <kconfig.h>
-#include <qbuttongroup.h>
-#include <qvbuttongroup.h>
+#include <tqbuttongroup.h>
+#include <tqvbuttongroup.h>
#include <kmessagebox.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#define ID_CUSTOM 0
#define ID_A4 1
@@ -95,33 +95,33 @@ public:
bool m_bgIsWhite; /* indicates if a scan without paper
* results in black or white */
- QSlider *m_sliderThresh;
- QSlider *m_sliderDust;
- QCheckBox *m_cbAutoSel;
- QComboBox *m_cbBackground;
- QGroupBox *m_autoSelGroup;
+ TQSlider *m_sliderThresh;
+ TQSlider *m_sliderDust;
+ TQCheckBox *m_cbAutoSel;
+ TQComboBox *m_cbBackground;
+ TQGroupBox *m_autoSelGroup;
KScanDevice *m_scanner;
- QMemArray<long> m_heightSum;
- QMemArray<long> m_widthSum;
+ TQMemArray<long> m_heightSum;
+ TQMemArray<long> m_widthSum;
};
-Previewer::Previewer(QWidget *parent, const char *name )
- : QWidget(parent,name)
+Previewer::Previewer(TQWidget *parent, const char *name )
+ : TQWidget(parent,name)
{
d = new PreviewerPrivate();
// beautification to look like the left scanparams widget in the dialog
- QHBoxLayout *htop = new QHBoxLayout( this );
- QFrame *frame = new QFrame( this );
- frame->setFrameStyle( QFrame::Panel | QFrame::Raised );
+ TQHBoxLayout *htop = new TQHBoxLayout( this );
+ TQFrame *frame = new TQFrame( this );
+ frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
frame->setLineWidth( 1 );
htop->addWidget( frame );
- QVBoxLayout *top = new QVBoxLayout( frame, KDialog::marginHint(), KDialog::spacingHint() );
- layout = new QHBoxLayout( KDialog::spacingHint() );
+ TQVBoxLayout *top = new TQVBoxLayout( frame, KDialog::marginHint(), KDialog::spacingHint() );
+ layout = new TQHBoxLayout( KDialog::spacingHint() );
top->addLayout( layout, 9 );
- QVBoxLayout *left = new QVBoxLayout( KDialog::spacingHint() );
+ TQVBoxLayout *left = new TQVBoxLayout( KDialog::spacingHint() );
layout->addLayout( left, 2 );
/* Load autoselection values from Config file */
@@ -147,25 +147,25 @@ Previewer::Previewer(QWidget *parent, const char *name )
/* Actions for the previewer zoom */
KAction *act;
act = new KAction(i18n("Scale to W&idth"), "scaletowidth", CTRL+Key_I,
- this, SLOT( slScaleToWidth()), this, "preview_scaletowidth" );
+ this, TQT_SLOT( slScaleToWidth()), this, "preview_scaletowidth" );
act->plug( img_canvas->contextMenu());
act = new KAction(i18n("Scale to &Height"), "scaletoheight", CTRL+Key_H,
- this, SLOT( slScaleToHeight()), this, "preview_scaletoheight" );
+ this, TQT_SLOT( slScaleToHeight()), this, "preview_scaletoheight" );
act->plug( img_canvas->contextMenu());
/*Signals: Control the custom-field and show size of selection */
- connect( img_canvas, SIGNAL(newRect()), this, SLOT(slCustomChange()));
- connect( img_canvas, SIGNAL(newRect(QRect)), this, SLOT(slNewDimen(QRect)));
+ connect( img_canvas, TQT_SIGNAL(newRect()), this, TQT_SLOT(slCustomChange()));
+ connect( img_canvas, TQT_SIGNAL(newRect(TQRect)), this, TQT_SLOT(slNewDimen(TQRect)));
/* Stuff for the preview-Notification */
- left->addWidget( new QLabel( i18n("<B>Preview</B>"), frame ), 1);
+ left->addWidget( new TQLabel( i18n("<B>Preview</B>"), frame ), 1);
// Create a button group to contain buttons for Portrait/Landscape
- bgroup = new QVButtonGroup( i18n("Scan Size"), frame );
+ bgroup = new TQVButtonGroup( i18n("Scan Size"), frame );
// -----
- pre_format_combo = new QComboBox( frame, "PREVIEWFORMATCOMBO" );
+ pre_format_combo = new TQComboBox( frame, "PREVIEWFORMATCOMBO" );
pre_format_combo->insertItem( i18n( "Custom" ), ID_CUSTOM);
pre_format_combo->insertItem( i18n( "DIN A4" ), ID_A4);
pre_format_combo->insertItem( i18n( "DIN A5" ), ID_A5);
@@ -174,23 +174,23 @@ Previewer::Previewer(QWidget *parent, const char *name )
pre_format_combo->insertItem( i18n( "10x15 cm" ), ID_10_15 );
pre_format_combo->insertItem( i18n( "Letter" ), ID_LETTER);
- connect( pre_format_combo, SIGNAL(activated (int)),
- this, SLOT( slFormatChange(int)));
+ connect( pre_format_combo, TQT_SIGNAL(activated (int)),
+ this, TQT_SLOT( slFormatChange(int)));
left->addWidget( pre_format_combo, 1 );
/** Potrait- and Landscape Selector **/
- QFontMetrics fm = bgroup->fontMetrics();
- int w = fm.width( (const QString)i18n(" Landscape " ) );
+ TQFontMetrics fm = bgroup->fontMetrics();
+ int w = fm.width( (const TQString)i18n(" Landscape " ) );
int h = fm.height( );
- rb1 = new QRadioButton( i18n("&Landscape"), bgroup );
+ rb1 = new TQRadioButton( i18n("&Landscape"), bgroup );
landscape_id = bgroup->id( rb1 );
- rb2 = new QRadioButton( i18n("P&ortrait"), bgroup );
+ rb2 = new TQRadioButton( i18n("P&ortrait"), bgroup );
portrait_id = bgroup->id( rb2 );
bgroup->setButton( portrait_id );
- connect(bgroup, SIGNAL(clicked(int)), this, SLOT(slOrientChange(int)));
+ connect(bgroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slOrientChange(int)));
int rblen = 5+w+12; // 12 for the button?
rb1->setGeometry( 5, 6, rblen, h );
@@ -200,34 +200,34 @@ Previewer::Previewer(QWidget *parent, const char *name )
/** Autoselection Box **/
- d->m_autoSelGroup = new QGroupBox( 1, Horizontal, i18n("Auto-Selection"), frame);
+ d->m_autoSelGroup = new TQGroupBox( 1, Horizontal, i18n("Auto-Selection"), frame);
- QHBox *hbox = new QHBox(d->m_autoSelGroup);
- d->m_cbAutoSel = new QCheckBox( i18n("Active on"), hbox );
- QToolTip::add( d->m_cbAutoSel, i18n("Check here if you want autodetection\n"
+ TQHBox *hbox = new TQHBox(d->m_autoSelGroup);
+ d->m_cbAutoSel = new TQCheckBox( i18n("Active on"), hbox );
+ TQToolTip::add( d->m_cbAutoSel, i18n("Check here if you want autodetection\n"
"of the document on the preview."));
/* combobox to select if black or white background */
- d->m_cbBackground = new QComboBox( hbox );
+ d->m_cbBackground = new TQComboBox( hbox );
d->m_cbBackground->insertItem(i18n("Black"), BG_ITEM_BLACK );
d->m_cbBackground->insertItem(i18n("White"), BG_ITEM_WHITE );
- connect( d->m_cbBackground, SIGNAL(activated(int) ),
- this, SLOT( slScanBackgroundChanged( int )));
+ connect( d->m_cbBackground, TQT_SIGNAL(activated(int) ),
+ this, TQT_SLOT( slScanBackgroundChanged( int )));
- QToolTip::add( d->m_cbBackground,
+ TQToolTip::add( d->m_cbBackground,
i18n("Select whether a scan of the empty\n"
"scanner glass results in a\n"
"black or a white image."));
- connect( d->m_cbAutoSel, SIGNAL(toggled(bool) ), SLOT(slAutoSelToggled(bool)));
+ connect( d->m_cbAutoSel, TQT_SIGNAL(toggled(bool) ), TQT_SLOT(slAutoSelToggled(bool)));
- (void) new QLabel( i18n("scanner background"), d->m_autoSelGroup );
+ (void) new TQLabel( i18n("scanner background"), d->m_autoSelGroup );
- QLabel *l1= new QLabel( i18n("Thresh&old:"), d->m_autoSelGroup );
- d->m_sliderThresh = new QSlider( 0, 254, 10, d->m_autoSelThresh, Qt::Horizontal,
+ TQLabel *l1= new TQLabel( i18n("Thresh&old:"), d->m_autoSelGroup );
+ d->m_sliderThresh = new TQSlider( 0, 254, 10, d->m_autoSelThresh, Qt::Horizontal,
d->m_autoSelGroup );
- connect( d->m_sliderThresh, SIGNAL(valueChanged(int)), SLOT(slSetAutoSelThresh(int)));
- QToolTip::add( d->m_sliderThresh,
+ connect( d->m_sliderThresh, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slSetAutoSelThresh(int)));
+ TQToolTip::add( d->m_sliderThresh,
i18n("Threshold for autodetection.\n"
"All pixels higher (on black background)\n"
"or smaller (on white background)\n"
@@ -235,9 +235,9 @@ Previewer::Previewer(QWidget *parent, const char *name )
l1->setBuddy(d->m_sliderThresh);
#if 0 /** Dustsize-Slider: No deep impact on result **/
- (void) new QLabel( i18n("Dust size:"), grBox );
- d->m_sliderDust = new QSlider( 0, 50, 5, d->m_dustsize, Qt::Horizontal, grBox );
- connect( d->m_sliderDust, SIGNAL(valueChanged(int)), SLOT(slSetAutoSelDustsize(int)));
+ (void) new TQLabel( i18n("Dust size:"), grBox );
+ d->m_sliderDust = new TQSlider( 0, 50, 5, d->m_dustsize, Qt::Horizontal, grBox );
+ connect( d->m_sliderDust, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slSetAutoSelDustsize(int)));
#endif
/* disable Autoselbox as long as no scanner is connected */
@@ -246,27 +246,27 @@ Previewer::Previewer(QWidget *parent, const char *name )
left->addWidget(d->m_autoSelGroup);
/* Labels for the dimension */
- QGroupBox *gbox = new QGroupBox( 1, Horizontal, i18n("Selection"), frame, "GROUPBOX" );
+ TQGroupBox *gbox = new TQGroupBox( 1, Horizontal, i18n("Selection"), frame, "GROUPBOX" );
- QLabel *l2 = new QLabel( i18n("width - mm" ), gbox );
- QLabel *l3 = new QLabel( i18n("height - mm" ), gbox );
+ TQLabel *l2 = new TQLabel( i18n("width - mm" ), gbox );
+ TQLabel *l3 = new TQLabel( i18n("height - mm" ), gbox );
- connect( this, SIGNAL(setScanWidth(const QString&)),
- l2, SLOT(setText(const QString&)));
- connect( this, SIGNAL(setScanHeight(const QString&)),
- l3, SLOT(setText(const QString&)));
+ connect( this, TQT_SIGNAL(setScanWidth(const TQString&)),
+ l2, TQT_SLOT(setText(const TQString&)));
+ connect( this, TQT_SIGNAL(setScanHeight(const TQString&)),
+ l3, TQT_SLOT(setText(const TQString&)));
/* size indicator */
- QHBox *hb = new QHBox( gbox );
- (void) new QLabel( i18n( "Size:"), hb );
+ TQHBox *hb = new TQHBox( gbox );
+ (void) new TQLabel( i18n( "Size:"), hb );
SizeIndicator *indi = new SizeIndicator( hb );
- QToolTip::add( indi, i18n( "This size field shows how large the uncompressed image will be.\n"
+ TQToolTip::add( indi, i18n( "This size field shows how large the uncompressed image will be.\n"
"It tries to warn you, if you try to produce huge images by \n"
"changing its background color." ));
indi->setText( i18n("-") );
- connect( this, SIGNAL( setSelectionSize(long)),
- indi, SLOT( setSizeInByte (long)) );
+ connect( this, TQT_SIGNAL( setSelectionSize(long)),
+ indi, TQT_SLOT( setSizeInByte (long)) );
left->addWidget( gbox, 1 );
@@ -292,7 +292,7 @@ Previewer::~Previewer()
delete d;
}
-bool Previewer::setPreviewImage( const QImage &image )
+bool Previewer::setPreviewImage( const TQImage &image )
{
if ( image.isNull() )
return false;
@@ -303,9 +303,9 @@ bool Previewer::setPreviewImage( const QImage &image )
return true;
}
-QString Previewer::galleryRoot()
+TQString Previewer::galleryRoot()
{
- QString dir = (KGlobal::dirs())->saveLocation( "data", "ScanImages", true );
+ TQString dir = (KGlobal::dirs())->saveLocation( "data", "ScanImages", true );
if( !dir.endsWith("/") )
dir += "/";
@@ -314,7 +314,7 @@ QString Previewer::galleryRoot()
}
-void Previewer::newImage( QImage *ni )
+void Previewer::newImage( TQImage *ni )
{
/* image canvas does not copy the image, so we hold a copy here */
m_previewImage = *ni;
@@ -352,7 +352,7 @@ void Previewer::slOrientChange( int id )
/** Slot called whenever the format selection combo changes. **/
void Previewer::slFormatChange( int id )
{
- QPoint p(0,0);
+ TQPoint p(0,0);
bool lands_allowed;
bool portr_allowed;
bool setSelection = true;
@@ -421,10 +421,10 @@ void Previewer::slFormatChange( int id )
bgroup->setButton( portrait_id );
format_id = portrait_id;
}
- /* Convert the new dimension to a new QRect and call slot in canvas */
+ /* Convert the new dimension to a new TQRect and call slot in canvas */
if( setSelection )
{
- QRect newrect;
+ TQRect newrect;
newrect.setRect( 0,0, p.y(), p.x() );
if( format_id == portrait_id )
@@ -469,14 +469,14 @@ void Previewer::slNewScanResolutions( int x, int y )
* in values between 0..1000. It emits signals, that redraw the
* size labels.
*/
-void Previewer::slNewDimen(QRect r)
+void Previewer::slNewDimen(TQRect r)
{
if( r.height() > 0)
selectionWidthMm = (overallWidth / 1000 * r.width());
if( r.width() > 0)
selectionHeightMm = (overallHeight / 1000 * r.height());
- QString s;
+ TQString s;
s = i18n("width %1 mm").arg( int(selectionWidthMm));
emit(setScanWidth(s));
@@ -507,9 +507,9 @@ void Previewer::recalcFileSize( void )
}
-QPoint Previewer::calcPercent( int w_mm, int h_mm )
+TQPoint Previewer::calcPercent( int w_mm, int h_mm )
{
- QPoint p(0,0);
+ TQPoint p(0,0);
if( overallWidth < 1.0 || overallHeight < 1.0 ) return( p );
if( sizeUnit == KRuler::Millimetres ) {
@@ -547,20 +547,20 @@ void Previewer::slConnectScanner( KScanDevice *scan )
{
/* Enable the by-default disabled autoselection group */
d->m_autoSelGroup->setEnabled(true);
- QString h;
+ TQString h;
- h = scan->getConfig( CFG_AUTOSEL_DO, QString("unknown") );
- if( h == QString("on") )
+ h = scan->getConfig( CFG_AUTOSEL_DO, TQString("unknown") );
+ if( h == TQString("on") )
d->m_cbAutoSel->setChecked(true);
else
d->m_cbAutoSel->setChecked(false);
- QString isWhite = d->m_scanner->getConfig( CFG_SCANNER_EMPTY_BG, "unknown" );
+ TQString isWhite = d->m_scanner->getConfig( CFG_SCANNER_EMPTY_BG, "unknown" );
- h = scan->getConfig( CFG_AUTOSEL_DUSTSIZE, QString("5") );
+ h = scan->getConfig( CFG_AUTOSEL_DUSTSIZE, TQString("5") );
d->m_dustsize = h.toInt();
- QString thresh = DEF_THRESH_BLACK; /* for black */
+ TQString thresh = DEF_THRESH_BLACK; /* for black */
if( isWhite.lower() == "yes" )
thresh = DEF_THRESH_WHITE;
@@ -584,7 +584,7 @@ void Previewer::slSetScannerBgIsWhite( bool b )
d->m_cbBackground->setCurrentItem( BG_ITEM_BLACK );
}
- d->m_scanner->slStoreConfig( CFG_SCANNER_EMPTY_BG, b ? QString("Yes") : QString("No"));
+ d->m_scanner->slStoreConfig( CFG_SCANNER_EMPTY_BG, b ? TQString("Yes") : TQString("No"));
}
}
@@ -597,7 +597,7 @@ void Previewer::checkForScannerBg()
{
if( d->m_scanner ) /* Is the scan device already known? */
{
- QString isWhite = d->m_scanner->getConfig( CFG_SCANNER_EMPTY_BG, "unknown" );
+ TQString isWhite = d->m_scanner->getConfig( CFG_SCANNER_EMPTY_BG, "unknown" );
bool goWhite = false;
if( isWhite == "unknown" )
{
@@ -634,7 +634,7 @@ void Previewer::slAutoSelToggled(bool isOn )
if( d->m_cbAutoSel )
{
- QRect r = img_canvas->sel();
+ TQRect r = img_canvas->sel();
kdDebug(29000) << "The rect is " << r.width() << " x " << r.height() << endl;
d->m_doAutoSelection = isOn;
@@ -673,7 +673,7 @@ void Previewer::slSetAutoSelThresh(int t)
d->m_autoSelThresh = t;
kdDebug(29000) << "Setting threshold to " << t << endl;
if( d->m_scanner )
- d->m_scanner->slStoreConfig( CFG_AUTOSEL_THRESH, QString::number(t) );
+ d->m_scanner->slStoreConfig( CFG_AUTOSEL_THRESH, TQString::number(t) );
findSelection();
}
@@ -701,22 +701,22 @@ void Previewer::findSelection( )
if( ! d->m_doAutoSelection ) return;
int line;
int x;
- const QImage *img = img_canvas->rootImage();
+ const TQImage *img = img_canvas->rootImage();
if( ! img ) return;
long iWidth = img->width();
long iHeight = img->height();
- QMemArray<long> heightSum;
- QMemArray<long> widthSum;
+ TQMemArray<long> heightSum;
+ TQMemArray<long> widthSum;
kdDebug(29000)<< "Preview size is " << iWidth << "x" << iHeight << endl;
if( (d->m_heightSum).size() == 0 && (iHeight>0) )
{
kdDebug(29000) << "Starting to fill Array " << endl;
- QMemArray<long> heightSum(iHeight);
- QMemArray<long> widthSum(iWidth);
+ TQMemArray<long> heightSum(iHeight);
+ TQMemArray<long> widthSum(iWidth);
heightSum.fill(0);
widthSum.fill(0);
@@ -753,9 +753,9 @@ void Previewer::findSelection( )
#if 0
/* debug output */
{
- QFile fi( "/tmp/thheight.dat");
+ TQFile fi( "/tmp/thheight.dat");
if( fi.open( IO_ReadWrite ) ) {
- QTextStream str( &fi );
+ TQTextStream str( &fi );
str << "# height ##################" << endl;
for( x = 0; x < iHeight; x++ )
@@ -763,10 +763,10 @@ void Previewer::findSelection( )
fi.close();
}
}
- QFile fi1( "/tmp/thwidth.dat");
+ TQFile fi1( "/tmp/thwidth.dat");
if( fi1.open( IO_ReadWrite ))
{
- QTextStream str( &fi1 );
+ TQTextStream str( &fi1 );
str << "# width ##################" << endl;
str << "# " << iWidth << " points" << endl;
for( x = 0; x < iWidth; x++ )
@@ -777,7 +777,7 @@ void Previewer::findSelection( )
#endif
int start = 0;
int end = 0;
- QRect r;
+ TQRect r;
/** scale to 0..1000 range **/
start = 0;
@@ -813,7 +813,7 @@ void Previewer::findSelection( )
/*
* returns an Array containing the
*/
-bool Previewer::imagePiece( QMemArray<long> src, int& start, int& end )
+bool Previewer::imagePiece( TQMemArray<long> src, int& start, int& end )
{
for( uint x = 0; x < src.size(); x++ )
{
diff --git a/libkscan/previewer.h b/libkscan/previewer.h
index b2f993a0..6d9a7b10 100644
--- a/libkscan/previewer.h
+++ b/libkscan/previewer.h
@@ -20,31 +20,31 @@
#ifndef PREVIEWER_H
#define PREVIEWER_H
-#include <qwidget.h>
-#include <qimage.h>
-#include <qrect.h>
-#include <qbuttongroup.h>
-#include <qpoint.h>
+#include <tqwidget.h>
+#include <tqimage.h>
+#include <tqrect.h>
+#include <tqbuttongroup.h>
+#include <tqpoint.h>
#include <kruler.h>
-#include <qmemarray.h>
+#include <tqmemarray.h>
/**
*@author Klaas Freitag
*/
class ImageCanvas;
-class QCheckBox;
-class QSlider;
+class TQCheckBox;
+class TQSlider;
class KScanDevice;
-class QComboBox;
-class QRadioButton;
-class QHBoxLayout;
+class TQComboBox;
+class TQRadioButton;
+class TQHBoxLayout;
class Previewer : public QWidget
{
Q_OBJECT
public:
- Previewer(QWidget *parent=0, const char *name=0);
+ Previewer(TQWidget *parent=0, const char *name=0);
~Previewer();
ImageCanvas *getImageCanvas( void ){ return( img_canvas ); }
@@ -52,18 +52,18 @@ public:
/**
* Static function that returns the image gallery base dir.
*/
- static QString galleryRoot();
- bool setPreviewImage( const QImage &image );
+ static TQString galleryRoot();
+ bool setPreviewImage( const TQImage &image );
void findSelection();
public slots:
- void newImage( QImage* );
+ void newImage( TQImage* );
void slFormatChange( int id );
void slOrientChange(int);
void slSetDisplayUnit( KRuler::MetricStyle unit );
void setScanSize( int w, int h, KRuler::MetricStyle unit );
void slCustomChange( void );
- void slNewDimen(QRect r);
+ void slNewDimen(TQRect r);
void slNewScanResolutions( int, int );
void recalcFileSize( void );
void slSetAutoSelThresh(int);
@@ -77,27 +77,27 @@ protected slots:
void slScanBackgroundChanged(int);
signals:
- void newRect( QRect );
+ void newRect( TQRect );
void noRect( void );
- void setScanWidth(const QString&);
- void setScanHeight(const QString&);
+ void setScanWidth(const TQString&);
+ void setScanHeight(const TQString&);
void setSelectionSize( long );
private:
void checkForScannerBg();
- QPoint calcPercent( int, int );
+ TQPoint calcPercent( int, int );
- QHBoxLayout *layout;
+ TQHBoxLayout *layout;
ImageCanvas *img_canvas;
- QComboBox *pre_format_combo;
- QMemArray<QCString> format_ids;
- QButtonGroup * bgroup;
- QRadioButton * rb1;
- QRadioButton * rb2;
- QImage m_previewImage;
-
- bool imagePiece( QMemArray<long> src,
+ TQComboBox *pre_format_combo;
+ TQMemArray<TQCString> format_ids;
+ TQButtonGroup * bgroup;
+ TQRadioButton * rb1;
+ TQRadioButton * rb2;
+ TQImage m_previewImage;
+
+ bool imagePiece( TQMemArray<long> src,
int& start,
int& end );
diff --git a/libkscan/scandialog.cpp b/libkscan/scandialog.cpp
index 8a6689fa..2e3db229 100644
--- a/libkscan/scandialog.cpp
+++ b/libkscan/scandialog.cpp
@@ -18,14 +18,14 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qstringlist.h>
-#include <qstrlist.h>
-#include <qtooltip.h>
-#include <qsizepolicy.h>
-#include <qapplication.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
+#include <tqstrlist.h>
+#include <tqtooltip.h>
+#include <tqsizepolicy.h>
+#include <tqapplication.h>
+#include <tqcheckbox.h>
#include <kglobal.h>
#include <klocale.h>
@@ -51,14 +51,14 @@ extern "C" {
}
}
-ScanDialogFactory::ScanDialogFactory( QObject *parent, const char *name )
+ScanDialogFactory::ScanDialogFactory( TQObject *parent, const char *name )
: KScanDialogFactory( parent, name )
{
setName( "ScanDialogFactory" );
- KGlobal::locale()->insertCatalogue( QString::fromLatin1("libkscan") );
+ KGlobal::locale()->insertCatalogue( TQString::fromLatin1("libkscan") );
}
-KScanDialog * ScanDialogFactory::createDialog( QWidget *parent,
+KScanDialog * ScanDialogFactory::createDialog( TQWidget *parent,
const char *name, bool modal)
{
return new ScanDialog( parent, name, modal );
@@ -68,24 +68,24 @@ KScanDialog * ScanDialogFactory::createDialog( QWidget *parent,
///////////////////////////////////////////////////////////////////
-ScanDialog::ScanDialog( QWidget *parent, const char *name, bool modal )
+ScanDialog::ScanDialog( TQWidget *parent, const char *name, bool modal )
: KScanDialog( Tabbed, Close|Help, parent, name, modal ),
good_scan_connect(false)
{
- QVBox *page = addVBoxPage( i18n("&Scanning") );
+ TQVBox *page = addVBoxPage( i18n("&Scanning") );
- splitter = new QSplitter( Horizontal, page, "splitter" );
+ splitter = new TQSplitter( Horizontal, page, "splitter" );
Q_CHECK_PTR( splitter );
m_scanParams = 0;
m_device = new KScanDevice( this );
- connect(m_device, SIGNAL(sigNewImage(QImage *, ImgScanInfo*)),
- this, SLOT(slotFinalImage(QImage *, ImgScanInfo *)));
+ connect(m_device, TQT_SIGNAL(sigNewImage(TQImage *, ImgScanInfo*)),
+ this, TQT_SLOT(slotFinalImage(TQImage *, ImgScanInfo *)));
- connect( m_device, SIGNAL(sigScanStart()), this, SLOT(slotScanStart()));
- connect( m_device, SIGNAL(sigScanFinished(KScanStat)),
- this, SLOT(slotScanFinished(KScanStat)));
- connect( m_device, SIGNAL(sigAcquireStart()), this, SLOT(slotAcquireStart()));
+ connect( m_device, TQT_SIGNAL(sigScanStart()), this, TQT_SLOT(slotScanStart()));
+ connect( m_device, TQT_SIGNAL(sigScanFinished(KScanStat)),
+ this, TQT_SLOT(slotScanFinished(KScanStat)));
+ connect( m_device, TQT_SIGNAL(sigAcquireStart()), this, TQT_SLOT(slotAcquireStart()));
/* Create a preview widget to the right side of the splitter */
m_previewer = new Previewer( splitter );
Q_CHECK_PTR(m_previewer );
@@ -93,8 +93,8 @@ ScanDialog::ScanDialog( QWidget *parent, const char *name, bool modal )
/* ... and connect to the selector-slots. They communicate user's
* selection to the scanner parameter engine */
/* a new preview signal */
- connect( m_device, SIGNAL( sigNewPreview( QImage*, ImgScanInfo* )),
- this, SLOT( slotNewPreview( QImage* )));
+ connect( m_device, TQT_SIGNAL( sigNewPreview( TQImage*, ImgScanInfo* )),
+ this, TQT_SLOT( slotNewPreview( TQImage* )));
m_previewer->setEnabled( false ); // will be enabled in setup()
@@ -107,44 +107,44 @@ ScanDialog::ScanDialog( QWidget *parent, const char *name, bool modal )
void ScanDialog::createOptionsTab( void )
{
- QVBox *page = addVBoxPage( i18n("&Options"));
+ TQVBox *page = addVBoxPage( i18n("&Options"));
setMainWidget(page);
- QGroupBox *gb = new QGroupBox( 1, Qt::Horizontal, i18n("Startup Options"), page, "GB_STARTUP" );
- QLabel *label = new QLabel( i18n( "Note: changing these options will affect the scan plugin on next start." ),
+ TQGroupBox *gb = new TQGroupBox( 1, Qt::Horizontal, i18n("Startup Options"), page, "GB_STARTUP" );
+ TQLabel *label = new TQLabel( i18n( "Note: changing these options will affect the scan plugin on next start." ),
gb );
- label->setSizePolicy( QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ label->setSizePolicy( TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
/* Checkbox for asking for scanner on startup */
- cb_askOnStart = new QCheckBox( i18n( "&Ask for the scan device on plugin startup"), gb );
- QToolTip::add( cb_askOnStart,
+ cb_askOnStart = new TQCheckBox( i18n( "&Ask for the scan device on plugin startup"), gb );
+ TQToolTip::add( cb_askOnStart,
i18n("You can uncheck this if you do not want to be asked which scanner to use on startup."));
Q_CHECK_PTR( cb_askOnStart );
/* Checkbox for network access */
- cb_network = new QCheckBox( i18n( "&Query the network for scan devices"), gb );
- QToolTip::add( cb_network,
+ cb_network = new TQCheckBox( i18n( "&Query the network for scan devices"), gb );
+ TQToolTip::add( cb_network,
i18n("Check this if you want to query for configured network scan stations."));
Q_CHECK_PTR( cb_network );
/* Read settings for startup behavior */
KConfig *gcfg = KGlobal::config();
- gcfg->setGroup(QString::fromLatin1(GROUP_STARTUP));
+ gcfg->setGroup(TQString::fromLatin1(GROUP_STARTUP));
bool skipDialog = gcfg->readBoolEntry( STARTUP_SKIP_ASK, false );
bool onlyLocal = gcfg->readBoolEntry( STARTUP_ONLY_LOCAL, false );
/* Note: flag must be inverted because of question is 'the other way round' */
cb_askOnStart->setChecked( !skipDialog );
- connect( cb_askOnStart, SIGNAL(toggled(bool)), this, SLOT(slotAskOnStartToggle(bool)));
+ connect( cb_askOnStart, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotAskOnStartToggle(bool)));
cb_network->setChecked( !onlyLocal );
- connect( cb_network, SIGNAL(toggled(bool)), this, SLOT(slotNetworkToggle(bool)));
+ connect( cb_network, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotNetworkToggle(bool)));
- QWidget *spaceEater = new QWidget( page );
+ TQWidget *spaceEater = new TQWidget( page );
Q_CHECK_PTR( spaceEater );
- spaceEater->setSizePolicy( QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding) );
+ spaceEater->setSizePolicy( TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding) );
}
@@ -154,7 +154,7 @@ void ScanDialog::slotNetworkToggle( bool state)
kdDebug(29000) << "slotNetworkToggle: Writing state " << writestate << endl;
KConfig *c = KGlobal::config();
- c->setGroup(QString::fromLatin1(GROUP_STARTUP));
+ c->setGroup(TQString::fromLatin1(GROUP_STARTUP));
c->writeEntry( STARTUP_ONLY_LOCAL, writestate, true, true );
}
@@ -164,7 +164,7 @@ void ScanDialog::slotAskOnStartToggle(bool state)
kdDebug(29000) << "slotAskOnStartToggle: Writing state " << writestate << endl;
KConfig *c = KGlobal::config();
- c->setGroup(QString::fromLatin1(GROUP_STARTUP));
+ c->setGroup(TQString::fromLatin1(GROUP_STARTUP));
c->writeEntry( STARTUP_SKIP_ASK, writestate, true, true );
}
@@ -230,20 +230,20 @@ bool ScanDialog::setup()
}
m_scanParams = new ScanParams( splitter );
- connect( m_previewer->getImageCanvas(), SIGNAL( newRect(QRect)),
- m_scanParams, SLOT(slCustomScanSize(QRect)));
- connect( m_previewer->getImageCanvas(), SIGNAL( noRect()),
- m_scanParams, SLOT(slMaximalScanSize()));
+ connect( m_previewer->getImageCanvas(), TQT_SIGNAL( newRect(TQRect)),
+ m_scanParams, TQT_SLOT(slCustomScanSize(TQRect)));
+ connect( m_previewer->getImageCanvas(), TQT_SIGNAL( noRect()),
+ m_scanParams, TQT_SLOT(slMaximalScanSize()));
- connect( m_scanParams, SIGNAL( scanResolutionChanged( int, int )),
- m_previewer, SLOT( slNewScanResolutions( int, int )));
+ connect( m_scanParams, TQT_SIGNAL( scanResolutionChanged( int, int )),
+ m_previewer, TQT_SLOT( slNewScanResolutions( int, int )));
/* continue to attach a real scanner */
/* first, get the list of available devices from libkscan */
- QStringList scannerNames;
- QStrList backends = m_device->getDevices();;
- QStrListIterator it( backends );
+ TQStringList scannerNames;
+ TQStrList backends = m_device->getDevices();;
+ TQStrListIterator it( backends );
while ( it.current() ) {
scannerNames.append( m_device->getScannerName( it.current() ));
@@ -251,7 +251,7 @@ bool ScanDialog::setup()
}
/* ..if there are devices.. */
- QCString configDevice;
+ TQCString configDevice;
good_scan_connect = true;
if( scannerNames.count() > 0 )
{
@@ -262,7 +262,7 @@ bool ScanDialog::setup()
if( configDevice.isEmpty() || configDevice.isNull() )
{
kdDebug(29000) << "configDevice is not valid - starting selector!" << configDevice << endl;
- if ( ds.exec() == QDialog::Accepted )
+ if ( ds.exec() == TQDialog::Accepted )
{
configDevice = ds.getSelectedDevice();
}
@@ -310,11 +310,11 @@ bool ScanDialog::setup()
KConfig *kfg = KGlobal::config();
if( kfg )
{
- QRect r = KGlobalSettings::desktopGeometry(this);
+ TQRect r = KGlobalSettings::desktopGeometry(this);
kfg->setGroup( GROUP_STARTUP );
/* Since this is a vertical splitter, only the width is important */
- QString key = QString::fromLatin1( SCANDIA_SPLITTER_SIZES ).arg( r.width());
+ TQString key = TQString::fromLatin1( SCANDIA_SPLITTER_SIZES ).arg( r.width());
kdDebug(29000) << "Read Splitter-Sizes " << key << endl;
splitter->setSizes( kfg->readIntListEntry( key ));
}
@@ -332,11 +332,11 @@ void ScanDialog::slotClose()
KConfig *kfg = KGlobal::config();
if( kfg )
{
- QRect r = KGlobalSettings::desktopGeometry(this);
+ TQRect r = KGlobalSettings::desktopGeometry(this);
kfg->setGroup( GROUP_STARTUP );
/* Since this is a vertical splitter, only the width is important */
- QString key = QString::fromLatin1( SCANDIA_SPLITTER_SIZES ).arg( r.width());
+ TQString key = TQString::fromLatin1( SCANDIA_SPLITTER_SIZES ).arg( r.width());
kfg->writeEntry( key, splitter->sizes(), true, true);
}
}
@@ -354,7 +354,7 @@ void ScanDialog::slotClose()
accept();
}
-void ScanDialog::slotNewPreview( QImage *image )
+void ScanDialog::slotNewPreview( TQImage *image )
{
if( image )
{
@@ -372,7 +372,7 @@ ScanDialog::~ScanDialog()
{
}
-void ScanDialog::slotFinalImage(QImage *image, ImgScanInfo *)
+void ScanDialog::slotFinalImage(TQImage *image, ImgScanInfo *)
{
emit finalImage(*image, nextId());
}
diff --git a/libkscan/scandialog.h b/libkscan/scandialog.h
index 02aa48b1..71667326 100644
--- a/libkscan/scandialog.h
+++ b/libkscan/scandialog.h
@@ -21,20 +21,20 @@
#ifndef SCAN_H
#define SCAN_H
-#include <qimage.h>
+#include <tqimage.h>
#include <kscan.h>
class ScanParams;
class KScanDevice;
class Previewer;
-class QSplitter;
+class TQSplitter;
class ScanDialog : public KScanDialog
{
Q_OBJECT
public:
- ScanDialog( QWidget *parent=0, const char *name=0, bool modal=false );
+ ScanDialog( TQWidget *parent=0, const char *name=0, bool modal=false );
~ScanDialog();
virtual bool setup();
@@ -43,8 +43,8 @@ private:
void createOptionsTab( void );
protected slots:
- void slotFinalImage( QImage *, ImgScanInfo * );
- void slotNewPreview( QImage * );
+ void slotFinalImage( TQImage *, ImgScanInfo * );
+ void slotNewPreview( TQImage * );
void slotScanStart( );
void slotScanFinished( KScanStat status );
void slotAcquireStart();
@@ -59,11 +59,11 @@ private:
ScanParams *m_scanParams;
KScanDevice *m_device;
Previewer *m_previewer;
- QImage m_previewImage;
+ TQImage m_previewImage;
bool good_scan_connect;
- QCheckBox *cb_askOnStart;
- QCheckBox *cb_network;
- QSplitter *splitter;
+ TQCheckBox *cb_askOnStart;
+ TQCheckBox *cb_network;
+ TQSplitter *splitter;
class ScanDialogPrivate;
ScanDialogPrivate *d;
};
@@ -71,10 +71,10 @@ private:
class ScanDialogFactory : public KScanDialogFactory
{
public:
- ScanDialogFactory( QObject *parent=0, const char *name=0 );
+ ScanDialogFactory( TQObject *parent=0, const char *name=0 );
protected:
- virtual KScanDialog * createDialog( QWidget *parent=0, const char *name=0,
+ virtual KScanDialog * createDialog( TQWidget *parent=0, const char *name=0,
bool modal=false );
diff --git a/libkscan/scanparams.cpp b/libkscan/scanparams.cpp
index d886d113..b121c77d 100644
--- a/libkscan/scanparams.cpp
+++ b/libkscan/scanparams.cpp
@@ -18,22 +18,22 @@
*/
#include <sane/saneopts.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qimage.h>
-#include <qtooltip.h>
-#include <qmessagebox.h>
-#include <qlayout.h>
-#include <qdict.h>
-#include <qprogressdialog.h>
-#include <qscrollview.h>
-#include <qsizepolicy.h>
-#include <qcheckbox.h>
-#include <qbuttongroup.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqimage.h>
+#include <tqtooltip.h>
+#include <tqmessagebox.h>
+#include <tqlayout.h>
+#include <tqdict.h>
+#include <tqprogressdialog.h>
+#include <tqscrollview.h>
+#include <tqsizepolicy.h>
+#include <tqcheckbox.h>
+#include <tqbuttongroup.h>
#include <kfiledialog.h>
@@ -53,8 +53,8 @@
-ScanParams::ScanParams( QWidget *parent, const char *name )
- : QVBox( parent, name ),
+ScanParams::ScanParams( TQWidget *parent, const char *name )
+ : TQVBox( parent, name ),
m_firstGTEdit( true )
{
/* first some initialisation and debug messages */
@@ -94,17 +94,17 @@ bool ScanParams::connectDevice( KScanDevice *newScanDevice )
}
sane_device = newScanDevice;
- QStrList strl = sane_device->getCommonOptions();
- QString emp;
+ TQStrList strl = sane_device->getCommonOptions();
+ TQString emp;
for ( emp=strl.first(); strl.current(); emp=strl.next() )
kdDebug(29000) << "Common: " << strl.current() << endl;
/* Start path for virual scanner */
- last_virt_scan_path = QDir::home();
+ last_virt_scan_path = TQDir::home();
adf = ADF_OFF;
/* Frame stuff for toplevel of scanparams - beautification */
- setFrameStyle( QFrame::Panel | QFrame::Raised );
+ setFrameStyle( TQFrame::Panel | TQFrame::Raised );
setLineWidth( 1 );
@@ -112,21 +112,21 @@ bool ScanParams::connectDevice( KScanDevice *newScanDevice )
cb_gray_preview = 0;
/* A top layout box */
- // QVBoxLayout *top = new QVBoxLayout(this, 6);
- QHBox *hb = new QHBox( this );
+ // TQVBoxLayout *top = new TQVBoxLayout(this, 6);
+ TQHBox *hb = new TQHBox( this );
hb->setSpacing( KDialog::spacingHint() );
- QString cap = i18n("<B>Scanner Settings</B>") + " : ";
+ TQString cap = i18n("<B>Scanner Settings</B>") + " : ";
cap += sane_device->getScannerName();
- (void ) new QLabel( cap, hb );
+ (void ) new TQLabel( cap, hb );
m_led = new KLed( hb );
m_led->setState( KLed::Off );
- m_led->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ));
+ m_led->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ));
(void) new KSeparator( KSeparator::HLine, this);
/* Now create Widgets for the important scan settings */
- QScrollView *sv = 0;
+ TQScrollView *sv = 0;
if( sane_device->optionExists( SANE_NAME_FILE ) )
{
@@ -156,25 +156,25 @@ bool ScanParams::connectDevice( KScanDevice *newScanDevice )
/* Create a Start-Scan-Button */
(void) new KSeparator( KSeparator::HLine, this);
KButtonBox *kbb = new KButtonBox( this );
- QPushButton* pb = kbb->addButton( KGuiItem( i18n( "Final S&can" ), "scanner" ) );
- connect( pb, SIGNAL(clicked()), this, SLOT(slStartScan()) );
+ TQPushButton* pb = kbb->addButton( KGuiItem( i18n( "Final S&can" ), "scanner" ) );
+ connect( pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slStartScan()) );
pb = kbb->addButton( i18n( "&Preview Scan" ));
- connect( pb, SIGNAL(clicked()), this, SLOT(slAcquirePreview()) );
+ connect( pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slAcquirePreview()) );
kbb->layout();
/* Initialise the progress dialog */
- progressDialog = new QProgressDialog( i18n("Scanning in progress"),
+ progressDialog = new TQProgressDialog( i18n("Scanning in progress"),
i18n("Stop"), 100, 0L,
"SCAN_PROGRESS", true, 0 );
progressDialog->setAutoClose( true );
progressDialog->setAutoReset( true );
- connect( sane_device, SIGNAL(sigScanProgress(int)),
- progressDialog, SLOT(setProgress(int)));
+ connect( sane_device, TQT_SIGNAL(sigScanProgress(int)),
+ progressDialog, TQT_SLOT(setProgress(int)));
/* Connect the Progress Dialogs cancel-Button */
- connect( progressDialog, SIGNAL( cancelled() ), sane_device,
- SLOT( slStopScanning() ) );
+ connect( progressDialog, TQT_SIGNAL( cancelled() ), sane_device,
+ TQT_SLOT( slStopScanning() ) );
return( true );
}
@@ -202,9 +202,9 @@ void ScanParams::initialise( KScanOption *so )
if( startupOptset )
{
- QCString name = so->getName();
+ TQCString name = so->getName();
if( ! name.isEmpty() ){
- QCString val = startupOptset->getValue( name );
+ TQCString val = startupOptset->getValue( name );
kdDebug( 29000) << "Initialising <" << name << "> with value <" << val << ">" << endl;
so->set( val );
sane_device->apply(so);
@@ -218,19 +218,19 @@ void ScanParams::initialise( KScanOption *so )
}
}
-QScrollView *ScanParams::scannerParams( )
+TQScrollView *ScanParams::scannerParams( )
{
KScanOption *so = 0;
/* Its a real scanner */
- QScrollView *sv = new QScrollView( this );
- sv->setHScrollBarMode( QScrollView::AlwaysOff );
- sv->setResizePolicy( QScrollView::AutoOneFit );
- QVBox *pbox = new QVBox( sv->viewport());
+ TQScrollView *sv = new TQScrollView( this );
+ sv->setHScrollBarMode( TQScrollView::AlwaysOff );
+ sv->setResizePolicy( TQScrollView::AutoOneFit );
+ TQVBox *pbox = new TQVBox( sv->viewport());
pbox->setSpacing( KDialog::spacingHint() );
- sv->setFrameStyle( QFrame::NoFrame );
+ sv->setFrameStyle( TQFrame::NoFrame );
- QHBox *hb = new QHBox(pbox);
+ TQHBox *hb = new TQHBox(pbox);
/* Mode setting */
so = sane_device->getGuiElement( SANE_NAME_SCAN_MODE, hb,
@@ -260,24 +260,24 @@ QScrollView *ScanParams::scannerParams( )
hb->setStretchFactor( cb, 5 );
initialise( so );
- connect( so, SIGNAL(guiChange(KScanOption*)),
- this, SLOT(slReloadAllGui( KScanOption* )));
+ connect( so, TQT_SIGNAL(guiChange(KScanOption*)),
+ this, TQT_SLOT(slReloadAllGui( KScanOption* )));
}
/* Add a button for Source-Selection */
if( sane_device->optionExists( SANE_NAME_SCAN_SOURCE ))
{
KScanOption source( SANE_NAME_SCAN_SOURCE );
- QStrList l = source.getList();
+ TQStrList l = source.getList();
- QWidget *spacer = new QWidget(hb);
+ TQWidget *spacer = new TQWidget(hb);
hb->setStretchFactor( spacer, 1 );
kdDebug(29000) << "Source list size: " << l.count() << endl;
if( l.count() > 1 )
{
- pb_source_sel = new QPushButton( i18n("Source..."), hb );
- connect( pb_source_sel, SIGNAL(clicked()), this, SLOT(slSourceSelect()));
+ pb_source_sel = new TQPushButton( i18n("Source..."), hb );
+ connect( pb_source_sel, TQT_SIGNAL(clicked()), this, TQT_SLOT(slSourceSelect()));
initialise( &source );
hb->setStretchFactor( pb_source_sel, 3 );
@@ -302,8 +302,8 @@ QScrollView *ScanParams::scannerParams( )
if( so )
{
initialise(so);
- connect( so, SIGNAL(guiChange(KScanOption*)),
- this, SLOT(slReloadAllGui( KScanOption* )));
+ connect( so, TQT_SIGNAL(guiChange(KScanOption*)),
+ this, TQT_SLOT(slReloadAllGui( KScanOption* )));
}
}
@@ -316,8 +316,8 @@ QScrollView *ScanParams::scannerParams( )
if( so )
{
initialise(so);
- connect( so, SIGNAL(guiChange(KScanOption*)),
- this, SLOT(slReloadAllGui( KScanOption* )));
+ connect( so, TQT_SIGNAL(guiChange(KScanOption*)),
+ this, TQT_SLOT(slReloadAllGui( KScanOption* )));
}
}
@@ -330,8 +330,8 @@ QScrollView *ScanParams::scannerParams( )
if( so )
{
initialise(so);
- connect( so, SIGNAL(guiChange(KScanOption*)),
- this, SLOT(slReloadAllGui( KScanOption* )));
+ connect( so, TQT_SIGNAL(guiChange(KScanOption*)),
+ this, TQT_SLOT(slReloadAllGui( KScanOption* )));
}
}
@@ -349,11 +349,11 @@ QScrollView *ScanParams::scannerParams( )
so->slRedrawWidget( so );
/* connect to slot that passes the resolution to the previewer */
- connect( so, SIGNAL(guiChange(KScanOption*)),
- this, SLOT( slNewXResolution(KScanOption*)));
+ connect( so, TQT_SIGNAL(guiChange(KScanOption*)),
+ this, TQT_SLOT( slNewXResolution(KScanOption*)));
- connect( so, SIGNAL(guiChange(KScanOption*)),
- this, SLOT(slReloadAllGui( KScanOption* )));
+ connect( so, TQT_SIGNAL(guiChange(KScanOption*)),
+ this, TQT_SLOT(slReloadAllGui( KScanOption* )));
xy_resolution_bind =
sane_device->getGuiElement(SANE_NAME_RESOLUTION_BIND, pbox,
@@ -364,8 +364,8 @@ QScrollView *ScanParams::scannerParams( )
initialise( xy_resolution_bind );
xy_resolution_bind->slRedrawWidget( xy_resolution_bind );
/* Connect to Gui-change-Slot */
- connect( xy_resolution_bind, SIGNAL(guiChange(KScanOption*)),
- this, SLOT(slReloadAllGui( KScanOption* )));
+ connect( xy_resolution_bind, TQT_SIGNAL(guiChange(KScanOption*)),
+ this, TQT_SLOT(slReloadAllGui( KScanOption* )));
}
/* Resolution Setting -> Y-Resolution Setting */
@@ -443,7 +443,7 @@ QScrollView *ScanParams::scannerParams( )
/* The gamma table can be used - add a button for editing */
- QHBox *hb1 = new QHBox(pbox);
+ TQHBox *hb1 = new TQHBox(pbox);
if( sane_device->optionExists( SANE_NAME_CUSTOM_GAMMA ) )
{
@@ -451,28 +451,28 @@ QScrollView *ScanParams::scannerParams( )
SANE_TITLE_CUSTOM_GAMMA,
SANE_DESC_CUSTOM_GAMMA );
initialise( so );
- connect( so, SIGNAL(guiChange(KScanOption*)),
- this, SLOT(slReloadAllGui( KScanOption* )));
+ connect( so, TQT_SIGNAL(guiChange(KScanOption*)),
+ this, TQT_SLOT(slReloadAllGui( KScanOption* )));
}
else
{
- (void) new QLabel( i18n("Custom Gamma Table"), hb1 );
+ (void) new TQLabel( i18n("Custom Gamma Table"), hb1 );
}
/* Connect a signal to refresh activity of the gamma tables */
- (void) new QWidget( hb1 ); /* dummy widget to eat space */
+ (void) new TQWidget( hb1 ); /* dummy widget to eat space */
- pb_edit_gtable = new QPushButton( i18n("Edit..."), hb1 );
+ pb_edit_gtable = new TQPushButton( i18n("Edit..."), hb1 );
Q_CHECK_PTR(pb_edit_gtable);
- connect( pb_edit_gtable, SIGNAL( clicked () ),
- this, SLOT( slEditCustGamma () ) );
+ connect( pb_edit_gtable, TQT_SIGNAL( clicked () ),
+ this, TQT_SLOT( slEditCustGamma () ) );
setEditCustomGammaTableState();
/* This connection cares for enabling/disabling the edit-Button */
if(so )
- connect( so, SIGNAL(guiChange(KScanOption*)),
- this, SLOT(slOptionNotify(KScanOption*)));
+ connect( so, TQT_SIGNAL(guiChange(KScanOption*)),
+ this, TQT_SLOT(slOptionNotify(KScanOption*)));
/* my Epson Perfection backends offer a list of user defined gamma values */
@@ -496,12 +496,12 @@ QScrollView *ScanParams::scannerParams( )
SANE_TITLE_GRAY_PREVIEW,
SANE_DESC_GRAY_PREVIEW );
initialise( so );
- cb_gray_preview = (QCheckBox*) so->widget();
- QToolTip::add( cb_gray_preview, i18n("Acquire a gray preview even in color mode (faster)") );
+ cb_gray_preview = (TQCheckBox*) so->widget();
+ TQToolTip::add( cb_gray_preview, i18n("Acquire a gray preview even in color mode (faster)") );
}
- QWidget *spacer = new QWidget( pbox );
- spacer->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding);
+ TQWidget *spacer = new TQWidget( pbox );
+ spacer->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding);
pbox->setMinimumWidth( pbox->sizeHint().width() );
sv->setMinimumWidth( pbox->minimumWidth() );
@@ -514,10 +514,10 @@ QScrollView *ScanParams::scannerParams( )
void ScanParams::createNoScannerMsg( void )
{
/* Mode setting */
- QString cap;
+ TQString cap;
cap = i18n( "<B>Problem: No Scanner was found</B><P>Your system does not provide a SANE <I>(Scanner Access Now Easy)</I> installation, which is required by the KDE scan support.<P>Please install and configure SANE correctly on your system.<P>Visit the SANE homepage under http://www.sane-project.org to find out more about SANE installation and configuration. " );
- (void) new QLabel( cap, this );
+ (void) new TQLabel( cap, this );
}
@@ -538,9 +538,9 @@ void ScanParams::slSourceSelect( void )
KScanOption so( SANE_NAME_SCAN_SOURCE );
ADF_BEHAVE adf = ADF_OFF;
- const QCString& currSource = so.get();
+ const TQCString& currSource = so.get();
kdDebug(29000) << "Current Source is <" << currSource << ">" << endl;
- QStrList sources;
+ TQStrList sources;
if( so.valid() )
{
@@ -554,13 +554,13 @@ void ScanParams::slSourceSelect( void )
ScanSourceDialog d( this, sources, adf );
d.slSetSource( currSource );
- if( d.exec() == QDialog::Accepted )
+ if( d.exec() == TQDialog::Accepted )
{
- QString sel_source = d.getText();
+ TQString sel_source = d.getText();
adf = d.getAdfBehave();
/* set the selected Document source, the behavior is stored in a membervar */
- so.set( QCString(sel_source.latin1()) ); // FIX in ScanSourceDialog, then here
+ so.set( TQCString(sel_source.latin1()) ); // FIX in ScanSourceDialog, then here
sane_device->apply( &so );
kdDebug(29000) << "Dialog finished OK: " << sel_source << ", " << adf << endl;
@@ -580,18 +580,18 @@ void ScanParams::slSourceSelect( void )
void ScanParams::slFileSelect( void )
{
kdDebug(29000) << "File Selector" << endl;
- QString filter;
- QCString prefix = "\n*.";
+ TQString filter;
+ TQCString prefix = "\n*.";
if( scan_mode == ID_QT_IMGIO )
{
- QStrList filterList = QImage::inputFormats();
+ TQStrList filterList = TQImage::inputFormats();
filter = i18n( "*|All Files (*)");
- for( QCString fi_item = filterList.first(); !fi_item.isEmpty();
+ for( TQCString fi_item = filterList.first(); !fi_item.isEmpty();
fi_item = filterList.next() )
{
- filter.append( QString::fromLatin1( prefix + fi_item.lower()) );
+ filter.append( TQString::fromLatin1( prefix + fi_item.lower()) );
}
}
else
@@ -604,11 +604,11 @@ void ScanParams::slFileSelect( void )
KFileDialog fd(last_virt_scan_path.path(), filter, this, "FileDialog",true);
fd.setCaption( i18n("Select Input File") );
/* Read the filename and remind it */
- QString fileName;
- if ( fd.exec() == QDialog::Accepted ) {
+ TQString fileName;
+ if ( fd.exec() == TQDialog::Accepted ) {
fileName = fd.selectedFile();
- QFileInfo ppath( fileName );
- last_virt_scan_path = QDir(ppath.dirPath(true));
+ TQFileInfo ppath( fileName );
+ last_virt_scan_path = TQDir(ppath.dirPath(true));
} else {
return;
}
@@ -616,7 +616,7 @@ void ScanParams::slFileSelect( void )
if ( !fileName.isNull() && virt_filename ) { // got a file name
kdDebug(29000) << "Got fileName: " << fileName << endl;
// write Value to SANEOption, it updates itself.
- virt_filename->set( QFile::encodeName( fileName ) );
+ virt_filename->set( TQFile::encodeName( fileName ) );
}
}
@@ -634,12 +634,12 @@ void ScanParams::slVirtScanModeSelect( int id )
/* Check if the entered filename to delete */
if( virt_filename ) {
- QString vf = virt_filename->get();
+ TQString vf = virt_filename->get();
kdDebug(29000) << "Found File in Filename-Option: " << vf << endl;
- QFileInfo fi( vf );
- if( fi.extension() != QString::fromLatin1("pnm") )
- virt_filename->set(QCString(""));
+ TQFileInfo fi( vf );
+ if( fi.extension() != TQString::fromLatin1("pnm") )
+ virt_filename->set(TQCString(""));
}
} else {
scan_mode = ID_QT_IMGIO;
@@ -659,20 +659,20 @@ void ScanParams::virtualScannerParams( void )
{
#if 0
KScanOption *so = 0;
- QWidget *w = 0;
+ TQWidget *w = 0;
/* Selection if virt. Scanner or SANE Debug */
- bg_virt_scan_mode = new QButtonGroup( 2, Qt::Horizontal,
+ bg_virt_scan_mode = new TQButtonGroup( 2, Qt::Horizontal,
this, "GroupBoxVirtScanner" );
- connect( bg_virt_scan_mode, SIGNAL(clicked(int)),
- this, SLOT( slVirtScanModeSelect(int)));
+ connect( bg_virt_scan_mode, TQT_SIGNAL(clicked(int)),
+ this, TQT_SLOT( slVirtScanModeSelect(int)));
- QRadioButton *rb1 = new QRadioButton( i18n("SANE debug (pnm only)"),
+ TQRadioButton *rb1 = new TQRadioButton( i18n("SANE debug (pnm only)"),
bg_virt_scan_mode, "VirtScanSANEDebug" );
- QRadioButton *rb2 = new QRadioButton( i18n("virt. Scan (all Qt modes)"),
+ TQRadioButton *rb2 = new TQRadioButton( i18n("virt. Scan (all Qt modes)"),
bg_virt_scan_mode, "VirtScanQtModes" );
rb1->setChecked( true );
@@ -692,20 +692,20 @@ void ScanParams::virtualScannerParams( void )
SANE_DESC_FILE );
if( virt_filename )
{
- QHBoxLayout *hb = new QHBoxLayout();
+ TQHBoxLayout *hb = new TQHBoxLayout();
top->addLayout( hb );
w = virt_filename->widget();
w->setMinimumHeight( (w->sizeHint()).height());
- connect( w, SIGNAL(returnPressed()), this,
- SLOT( slCheckGlob()));
+ connect( w, TQT_SIGNAL(returnPressed()), this,
+ TQT_SLOT( slCheckGlob()));
hb->addWidget( w, 12 );
- QPushButton *pb_file_sel = new QPushButton( this );
+ TQPushButton *pb_file_sel = new TQPushButton( this );
pb_file_sel->setPixmap(miniFloppyPixmap);
//hb->addStretch( 1 );
hb->addWidget( pb_file_sel, 1 );
- connect( pb_file_sel, SIGNAL(clicked()), this, SLOT(slFileSelect()));
+ connect( pb_file_sel, TQT_SIGNAL(clicked()), this, TQT_SLOT(slFileSelect()));
}
@@ -764,7 +764,7 @@ void ScanParams::slStartScan( void )
KScanStat stat = KSCAN_OK;
kdDebug(29000) << "Called start-scan-Slot!" << endl;
- QString q;
+ TQString q;
if( scan_mode == ID_SANE_DEBUG || scan_mode == ID_QT_IMGIO )
{
@@ -772,7 +772,7 @@ void ScanParams::slStartScan( void )
q = virt_filename->get();
if( q.isEmpty() )
{
- QMessageBox::information( this, i18n("KSANE"),
+ TQMessageBox::information( this, i18n("KSANE"),
i18n("The filename for virtual scanning is not set.\n"
"Please set the filename first.") );
stat = KSCAN_ERR_PARAM;
@@ -863,12 +863,12 @@ void ScanParams::slEditCustGamma( void )
kdDebug(29000) << "Old gamma table: " << old_gt.getGamma() << ", " << old_gt.getBrightness() << ", " << old_gt.getContrast() << endl;
GammaDialog gdiag( this );
- connect( &gdiag, SIGNAL( gammaToApply(KGammaTable*) ),
- this, SLOT( slApplyGamma(KGammaTable*) ) );
+ connect( &gdiag, TQT_SIGNAL( gammaToApply(KGammaTable*) ),
+ this, TQT_SLOT( slApplyGamma(KGammaTable*) ) );
gdiag.setGt( old_gt );
- if( gdiag.exec() == QDialog::Accepted )
+ if( gdiag.exec() == TQDialog::Accepted )
{
slApplyGamma( gdiag.getGt() );
kdDebug(29000) << "Fine, applied new Gamma Table !" << endl;
@@ -1013,10 +1013,10 @@ void ScanParams::slAcquirePreview( void )
}
/* Custom Scan size setting.
- * The custom scan size is given in the QRect parameter. It must contain values
+ * The custom scan size is given in the TQRect parameter. It must contain values
* from 0..1000 which are interpreted as tenth of percent of the overall dimension.
*/
-void ScanParams::slCustomScanSize( QRect sel)
+void ScanParams::slCustomScanSize( TQRect sel)
{
kdDebug(29000) << "Custom-Size: " << sel.x() << ", " << sel.y() << " - " << sel.width() << "x" << sel.height() << endl;
@@ -1069,7 +1069,7 @@ void ScanParams::slCustomScanSize( QRect sel)
void ScanParams::slMaximalScanSize( void )
{
kdDebug(29000) << "Setting to default" << endl;
- slCustomScanSize(QRect( 0,0,1000,1000));
+ slCustomScanSize(TQRect( 0,0,1000,1000));
}
diff --git a/libkscan/scanparams.h b/libkscan/scanparams.h
index c80e1ce6..7508cdb9 100644
--- a/libkscan/scanparams.h
+++ b/libkscan/scanparams.h
@@ -23,11 +23,11 @@
#include "kscandevice.h"
#include "scansourcedialog.h"
-#include <qvbox.h>
-#include <qhbox.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
-#include <qdir.h>
-#include <qpixmap.h>
+#include <tqdir.h>
+#include <tqpixmap.h>
/**
*@author Klaas Freitag
@@ -35,12 +35,12 @@
class GammaDialog;
class KScanOptSet;
-class QScrollView;
+class TQScrollView;
class KLed;
-class QProgressDialog;
-class QPushButton;
-class QCheckBox;
-class QButtonGroup;
+class TQProgressDialog;
+class TQPushButton;
+class TQCheckBox;
+class TQButtonGroup;
typedef enum { ID_SANE_DEBUG, ID_QT_IMGIO, ID_SCAN } ScanMode;
@@ -48,10 +48,10 @@ class ScanParams : public QVBox
{
Q_OBJECT
public:
- ScanParams( QWidget *parent, const char *name = 0);
+ ScanParams( TQWidget *parent, const char *name = 0);
~ScanParams();
#if 0
- QSize sizeHint( );
+ TQSize sizeHint( );
#endif
bool connectDevice( KScanDevice* );
@@ -64,7 +64,7 @@ public slots:
* between 0 and 1000, which are interpreted as tenth of percent of the
* whole image dimensions.
**/
-void slCustomScanSize( QRect );
+void slCustomScanSize( TQRect );
/**
* sets the scan area to the default, which is the whole area.
@@ -147,7 +147,7 @@ void slSourceSelect( void );
private:
- QScrollView* scannerParams( );
+ TQScrollView* scannerParams( );
void virtualScannerParams( void );
void createNoScannerMsg( void );
void initialise( KScanOption* );
@@ -157,21 +157,21 @@ private:
KScanDevice *sane_device;
KScanOption *virt_filename;
- QCheckBox *cb_gray_preview;
- QPushButton *pb_edit_gtable;
- QPushButton *pb_source_sel;
+ TQCheckBox *cb_gray_preview;
+ TQPushButton *pb_edit_gtable;
+ TQPushButton *pb_source_sel;
ADF_BEHAVE adf;
- QButtonGroup *bg_virt_scan_mode;
+ TQButtonGroup *bg_virt_scan_mode;
ScanMode scan_mode;
- QDir last_virt_scan_path;
+ TQDir last_virt_scan_path;
KScanOption *xy_resolution_bind;
KScanOptSet *startupOptset;
- QProgressDialog *progressDialog;
+ TQProgressDialog *progressDialog;
- QPixmap pixLineArt, pixGray, pixColor, pixHalftone, pixMiniFloppy;
+ TQPixmap pixLineArt, pixGray, pixColor, pixHalftone, pixMiniFloppy;
KLed *m_led;
bool m_firstGTEdit;
diff --git a/libkscan/scansourcedialog.cpp b/libkscan/scansourcedialog.cpp
index 01d71dc1..fcb3fc25 100644
--- a/libkscan/scansourcedialog.cpp
+++ b/libkscan/scansourcedialog.cpp
@@ -23,18 +23,18 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qradiobutton.h>
-#include <qslider.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqradiobutton.h>
+#include <tqslider.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
-#include <qvbuttongroup.h>
-#include <qbuttongroup.h>
+#include <tqvbuttongroup.h>
+#include <tqbuttongroup.h>
extern "C"{
@@ -45,21 +45,21 @@ extern "C"{
#endif
-ScanSourceDialog::ScanSourceDialog( QWidget *parent, const QStrList list, ADF_BEHAVE adfBehave )
+ScanSourceDialog::ScanSourceDialog( TQWidget *parent, const TQStrList list, ADF_BEHAVE adfBehave )
: KDialogBase( parent, "SOURCE_DIALOG", true, i18n("Scan Source Selection"),
Ok|Cancel,Ok, true)
{
- QVBox *vbox = makeVBoxMainWidget();
+ TQVBox *vbox = makeVBoxMainWidget();
- (void) new QLabel( i18n("<B>Source selection</B><P>"
+ (void) new TQLabel( i18n("<B>Source selection</B><P>"
"Note that you may see more sources than actually exist"), vbox );
/* Combo Box for sources */
- const QStrList xx = list;
+ const TQStrList xx = list;
sources = new KScanCombo( vbox,
i18n("Select the Scanner document source:"),
xx);
- connect( sources, SIGNAL( activated(int)), this, SLOT( slChangeSource(int)));
+ connect( sources, TQT_SIGNAL( activated(int)), this, TQT_SLOT( slChangeSource(int)));
/* Button Group for ADF-Behaviour */
@@ -68,16 +68,16 @@ ScanSourceDialog::ScanSourceDialog( QWidget *parent, const QStrList list, ADF_BE
if( sourceAdfEntry() > -1 )
{
- bgroup = new QVButtonGroup( i18n("Advanced ADF-Options"), vbox, "ADF_BGROUP" );
+ bgroup = new TQVButtonGroup( i18n("Advanced ADF-Options"), vbox, "ADF_BGROUP" );
- connect( bgroup, SIGNAL(clicked(int)), this, SLOT( slNotifyADF(int)));
+ connect( bgroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT( slNotifyADF(int)));
/* Two buttons inside */
- QRadioButton *rbADFTillEnd = new QRadioButton( i18n("Scan until ADF reports out of paper"),
+ TQRadioButton *rbADFTillEnd = new TQRadioButton( i18n("Scan until ADF reports out of paper"),
bgroup );
bgroup->insert( rbADFTillEnd, ADF_SCAN_ALONG );
- QRadioButton *rbADFOnce = new QRadioButton( i18n("Scan only one sheet of ADF per click"),
+ TQRadioButton *rbADFOnce = new TQRadioButton( i18n("Scan only one sheet of ADF per click"),
bgroup );
bgroup->insert( rbADFOnce, ADF_SCAN_ONCE );
@@ -104,7 +104,7 @@ ScanSourceDialog::ScanSourceDialog( QWidget *parent, const QStrList list, ADF_BE
}
}
-QString ScanSourceDialog::getText( void ) const
+TQString ScanSourceDialog::getText( void ) const
{
return( sources->currentText() );
}
@@ -115,7 +115,7 @@ void ScanSourceDialog::slNotifyADF( int )
/* this seems to be broken, adf_text is a visible string?
* needs rework if SANE 2 comes up which supports i18n */
#if 0
- QString adf_text = getText();
+ TQString adf_text = getText();
adf = ADF_OFF;
@@ -161,7 +161,7 @@ int ScanSourceDialog::sourceAdfEntry( void ) const
for( int i = 0; i < cou; i++ )
{
- QString q = sources->text( i );
+ TQString q = sources->text( i );
#if 0
if( q == "ADF" || q == SANE_NAME_DOCUMENT_FEEDER )
@@ -174,7 +174,7 @@ int ScanSourceDialog::sourceAdfEntry( void ) const
-void ScanSourceDialog::slSetSource( const QString source )
+void ScanSourceDialog::slSetSource( const TQString source )
{
if( !sources ) return;
kdDebug(29000) << "Setting <" << source << "> as source" << endl;
@@ -189,7 +189,7 @@ void ScanSourceDialog::slSetSource( const QString source )
if( sources->text( i ) == source )
{
sources->setCurrentItem( i );
- if( source == QString::number(sourceAdfEntry()) )
+ if( source == TQString::number(sourceAdfEntry()) )
{
if( bgroup )
bgroup->setEnabled( true );
diff --git a/libkscan/scansourcedialog.h b/libkscan/scansourcedialog.h
index 3379843f..61ae4a6e 100644
--- a/libkscan/scansourcedialog.h
+++ b/libkscan/scansourcedialog.h
@@ -19,10 +19,10 @@
#ifndef SCANSOURCEDIALOG_H
#define SCANSOURCEDIALOG_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdialogbase.h>
-#include <qstrlist.h>
-#include <qstring.h>
+#include <tqstrlist.h>
+#include <tqstring.h>
/**
*@author Klaas Freitag
@@ -31,18 +31,18 @@
typedef enum { ADF_OFF, ADF_SCAN_ALONG, ADF_SCAN_ONCE } ADF_BEHAVE;
class KScanCombo;
-class QRadioButton;
-class QButtonGroup;
+class TQRadioButton;
+class TQButtonGroup;
class ScanSourceDialog : public KDialogBase
{
Q_OBJECT
public:
- ScanSourceDialog( QWidget *parent, const QStrList, ADF_BEHAVE );
+ ScanSourceDialog( TQWidget *parent, const TQStrList, ADF_BEHAVE );
~ScanSourceDialog();
- // void fillWithSources( QStrList *list );
- QString getText( void ) const;
+ // void fillWithSources( TQStrList *list );
+ TQString getText( void ) const;
ADF_BEHAVE getAdfBehave( void ) const
{ return( adf ); }
@@ -52,13 +52,13 @@ public slots:
void slNotifyADF( int );
void slChangeSource( int );
int sourceAdfEntry( void ) const;
- void slSetSource( const QString source );
+ void slSetSource( const TQString source );
private:
KScanCombo *sources;
- QButtonGroup *bgroup;
- QRadioButton *rb0, *rb1;
+ TQButtonGroup *bgroup;
+ TQRadioButton *rb0, *rb1;
ADF_BEHAVE adf;
bool adf_enabled;
diff --git a/libkscan/sizeindicator.cpp b/libkscan/sizeindicator.cpp
index 4ad1986d..bd259bd3 100644
--- a/libkscan/sizeindicator.cpp
+++ b/libkscan/sizeindicator.cpp
@@ -19,22 +19,22 @@
#include "sizeindicator.h"
-#include <qpalette.h>
-#include <qimage.h>
+#include <tqpalette.h>
+#include <tqimage.h>
#include <kimageeffect.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qpainter.h>
+#include <tqpainter.h>
-SizeIndicator::SizeIndicator( QWidget *parent, long thres, long crit )
- :QLabel( parent )
+SizeIndicator::SizeIndicator( TQWidget *parent, long thres, long crit )
+ :TQLabel( parent )
{
sizeInByte = -1;
- setFrameStyle( QFrame::Box | QFrame::Sunken );
- setMinimumWidth( fontMetrics().width( QString::fromLatin1("MMM.MM MB") ));
+ setFrameStyle( TQFrame::Box | TQFrame::Sunken );
+ setMinimumWidth( fontMetrics().width( TQString::fromLatin1("MMM.MM MB") ));
setCritical( crit );
threshold = thres;
@@ -64,9 +64,9 @@ void SizeIndicator::setSizeInByte( long newSize )
sizeInByte = newSize;
kdDebug(29000) << "New size in byte: " << newSize << endl ;
- QString t;
+ TQString t;
- QString unit = i18n( "%1 kB" );
+ TQString unit = i18n( "%1 kB" );
double sizer = double(sizeInByte)/1024.0; // produces kiloBytes
int precision = 1;
int fwidth = 3;
@@ -86,11 +86,11 @@ void SizeIndicator::setSizeInByte( long newSize )
-void SizeIndicator::drawContents( QPainter *p )
+void SizeIndicator::drawContents( TQPainter *p )
{
- QSize s = size();
+ TQSize s = size();
- QColor warnColor;
+ TQColor warnColor;
if( sizeInByte >= threshold )
{
@@ -104,7 +104,7 @@ void SizeIndicator::drawContents( QPainter *p )
warnColor, KImageEffect::CrossDiagonalGradient, 200,200 ));
}
/* Displaying the text */
- QString t = text();
+ TQString t = text();
p->drawText( 0, 0, s.width(), s.height(),
AlignHCenter | AlignVCenter, t);
diff --git a/libkscan/sizeindicator.h b/libkscan/sizeindicator.h
index 213fe931..d49c60b5 100644
--- a/libkscan/sizeindicator.h
+++ b/libkscan/sizeindicator.h
@@ -23,8 +23,8 @@
#define DEFAULT_CRITICAL (3*1024*1024)
#define DEFAULT_THRESHOLD (1*1024*1024)
-class QPainter;
-#include <qlabel.h>
+class TQPainter;
+#include <tqlabel.h>
/**
* @short small size indication widget for file sizes
@@ -49,7 +49,7 @@ public:
* @param crit: Critical value, not yet used.
*/
- SizeIndicator( QWidget *parent, long thres = DEFAULT_THRESHOLD,
+ SizeIndicator( TQWidget *parent, long thres = DEFAULT_THRESHOLD,
long crit = DEFAULT_CRITICAL );
/**
* destructor does not really do much yet.
@@ -82,7 +82,7 @@ protected:
/**
* reimplemented to display the color
*/
- virtual void drawContents( QPainter* );
+ virtual void drawContents( TQPainter* );
private: